diff options
author | dirk <dirk@FreeBSD.org> | 1999-07-04 22:55:14 +0800 |
---|---|---|
committer | dirk <dirk@FreeBSD.org> | 1999-07-04 22:55:14 +0800 |
commit | 0e949fa5caa53593b35e01662a11860e8783b78d (patch) | |
tree | 7725b2905d9a7c363dd0cd794bab6186b44a06f7 /databases/mysql41-server | |
parent | 839673c1221ee7ae0e367474f6ad61d2e85ed355 (diff) | |
download | freebsd-ports-gnome-0e949fa5caa53593b35e01662a11860e8783b78d.tar.gz freebsd-ports-gnome-0e949fa5caa53593b35e01662a11860e8783b78d.tar.zst freebsd-ports-gnome-0e949fa5caa53593b35e01662a11860e8783b78d.zip |
- install gifs for HTML documentation
- put mysqld in a sandbox:
- create user and group 'mysql' (uid and gid 88)
- start mysqld with user 'mysql'
Diffstat (limited to 'databases/mysql41-server')
-rw-r--r-- | databases/mysql41-server/Makefile | 8 | ||||
-rw-r--r-- | databases/mysql41-server/pkg-install | 38 | ||||
-rw-r--r-- | databases/mysql41-server/pkg-plist | 34 |
3 files changed, 77 insertions, 3 deletions
diff --git a/databases/mysql41-server/Makefile b/databases/mysql41-server/Makefile index 8e7bbe5ed1a6..b93784998562 100644 --- a/databases/mysql41-server/Makefile +++ b/databases/mysql41-server/Makefile @@ -3,7 +3,7 @@ # Date created: 26 Jan 1998 # Whom: Josh Tiefenbach <josh@ican.net> # -# $Id: Makefile,v 1.56 1999/06/23 21:29:27 billf Exp $ +# $Id: Makefile,v 1.57 1999/07/01 08:44:48 dirk Exp $ # DISTNAME= mysql-3.22.23b @@ -78,21 +78,23 @@ pre-install: post-install: .if !defined(PACKAGE_BUILDING) ${PREFIX}/bin/mysql_install_db + @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .endif @${ECHO} "#!/bin/sh" > ${PREFIX}/etc/rc.d/mysql-server.sh @${ECHO} "#" >> ${PREFIX}/etc/rc.d/mysql-server.sh @${ECHO} "" >> ${PREFIX}/etc/rc.d/mysql-server.sh @${ECHO} "if [ -x ${PREFIX}/bin/safe_mysqld ]" >> ${PREFIX}/etc/rc.d/mysql-server.sh @${ECHO} "then" >> ${PREFIX}/etc/rc.d/mysql-server.sh - @${ECHO} " ${PREFIX}/bin/safe_mysqld > /dev/null & && ${ECHO} -n ' mysql'" >> ${PREFIX}/etc/rc.d/mysql-server.sh + @${ECHO} " ${PREFIX}/bin/safe_mysqld --user=mysql > /dev/null & && ${ECHO} -n ' mysql'" >> ${PREFIX}/etc/rc.d/mysql-server.sh @${ECHO} "fi" >> ${PREFIX}/etc/rc.d/mysql-server.sh @/bin/chmod 750 ${PREFIX}/etc/rc.d/mysql-server.sh .if !defined(NOPORTDOCS) - ${MKDIR} ${PREFIX}/share/doc/mysql + ${MKDIR} ${PREFIX}/share/doc/mysql/Img .for doc in manual.html manual.ps manual_toc.html manual.txt manual.texi include.texi ${INSTALL_DATA} ${WRKSRC}/Docs/${doc} ${PREFIX}/share/doc/mysql .endfor + ${INSTALL_DATA} ${WRKSRC}/Docs/Img/*.gif ${PREFIX}/share/doc/mysql/Img ${INSTALL_DATA} ${WRKSRC}/Docs/mysql.info ${PREFIX}/info @install-info ${PREFIX}/info/mysql.info ${PREFIX}/info/dir .endif diff --git a/databases/mysql41-server/pkg-install b/databases/mysql41-server/pkg-install new file mode 100644 index 000000000000..1c5dd869d825 --- /dev/null +++ b/databases/mysql41-server/pkg-install @@ -0,0 +1,38 @@ +#!/bin/sh + +PATH=/usr/sbin + +case $2 in +POST-INSTALL) + USER=mysql + GROUP=${USER} + UID=88 + GID=${UID} + + if pw group show "${GROUP}" 2>/dev/null; then + echo "You already have a group \"${GROUP}\", so I will use it." + else + if pw groupadd ${GROUP} -g ${GID}; then + echo "Added group \"${GROUP}\"." + else + echo "Adding group \"${GROUP}\" failed..." + exit 1 + fi + fi + + if pw user show "${USER}" 2>/dev/null; then + echo "You already have a user \"${USER}\", so I will use it." + else + if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ + -d /var/db/mysql -s /sbin/nologin -c "MySQL Daemon" + then + echo "Added user \"${USER}\"." + else + echo "Adding user \"${USER}\" failed..." + exit 1 + fi + fi + + chown -R ${USER}.${GROUP} /var/db/mysql + ;; +esac diff --git a/databases/mysql41-server/pkg-plist b/databases/mysql41-server/pkg-plist index ad8ec6d06dd1..a3b826437b1a 100644 --- a/databases/mysql41-server/pkg-plist +++ b/databases/mysql41-server/pkg-plist @@ -23,6 +23,39 @@ lib/mysql/libmystrings.a lib/mysql/libmysys.a lib/mysql/libnisam.a libexec/mysqld +share/doc/mysql/Img/australia.gif +share/doc/mysql/Img/austria.gif +share/doc/mysql/Img/bulgaria.gif +share/doc/mysql/Img/canada.gif +share/doc/mysql/Img/chile.gif +share/doc/mysql/Img/czech-republic.gif +share/doc/mysql/Img/denmark.gif +share/doc/mysql/Img/estonia.gif +share/doc/mysql/Img/finland.gif +share/doc/mysql/Img/france.gif +share/doc/mysql/Img/germany.gif +share/doc/mysql/Img/great-britain.gif +share/doc/mysql/Img/greece.gif +share/doc/mysql/Img/hungary.gif +share/doc/mysql/Img/israel.gif +share/doc/mysql/Img/italy.gif +share/doc/mysql/Img/japan.gif +share/doc/mysql/Img/mysql5.gif +share/doc/mysql/Img/netherlands.gif +share/doc/mysql/Img/poland.gif +share/doc/mysql/Img/portugal.gif +share/doc/mysql/Img/romania.gif +share/doc/mysql/Img/russia.gif +share/doc/mysql/Img/singapore.gif +share/doc/mysql/Img/south-africa.gif +share/doc/mysql/Img/south-africa1.gif +share/doc/mysql/Img/south-korea.gif +share/doc/mysql/Img/sweden.gif +share/doc/mysql/Img/switzerland.gif +share/doc/mysql/Img/taiwan.gif +share/doc/mysql/Img/tcxlogo3.gif +share/doc/mysql/Img/ukraine.gif +share/doc/mysql/Img/usa.gif share/doc/mysql/include.texi share/doc/mysql/manual.html share/doc/mysql/manual.ps @@ -69,6 +102,7 @@ share/mysql/spanish/errmsg.sys share/mysql/spanish/errmsg.txt share/mysql/swedish/errmsg.sys share/mysql/swedish/errmsg.txt +@dirrm share/doc/mysql/Img @dirrm share/doc/mysql @dirrm share/mysql/czech @dirrm share/mysql/dutch |