diff options
author | ache <ache@FreeBSD.org> | 2001-10-22 02:41:45 +0800 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2001-10-22 02:41:45 +0800 |
commit | 6d9b61cc004d1de360762b5f2b5481dd1df36712 (patch) | |
tree | e8d6d29ad79cc5e9155e293b1cd97ef9ed300849 /databases/msql | |
parent | ec0ea348ed1b7877e9c613727eda352476cc89ff (diff) | |
download | freebsd-ports-graphics-6d9b61cc004d1de360762b5f2b5481dd1df36712.tar.gz freebsd-ports-graphics-6d9b61cc004d1de360762b5f2b5481dd1df36712.tar.zst freebsd-ports-graphics-6d9b61cc004d1de360762b5f2b5481dd1df36712.zip |
Upgrade to 2.0.12
Diffstat (limited to 'databases/msql')
-rw-r--r-- | databases/msql/Makefile | 7 | ||||
-rw-r--r-- | databases/msql/distinfo | 2 | ||||
-rw-r--r-- | databases/msql/pkg-deinstall | 20 | ||||
-rw-r--r-- | databases/msql/pkg-install | 34 | ||||
-rw-r--r-- | databases/msql/scripts/createuser | 50 |
5 files changed, 58 insertions, 55 deletions
diff --git a/databases/msql/Makefile b/databases/msql/Makefile index 71ee6fdefbc..1530397c454 100644 --- a/databases/msql/Makefile +++ b/databases/msql/Makefile @@ -6,15 +6,14 @@ # PORTNAME= msql -PORTVERSION= 2.0.11 -PORTREVISION= 2 +PORTVERSION= 2.0.12 CATEGORIES= databases MAINTAINER= ports@FreeBSD.org INSTALLS_SHLIB= YES -# Not free for commercial use. Must create a user on the local system +# Not free for commercial use. NO_PACKAGE= YES RESTRICTED= "restrictive copyright (no commercial use)" @@ -35,7 +34,7 @@ do-configure: pre-install: @${SETENV} ${MAKE_ENV} ${PERL} ${SCRIPTDIR}/check_old_version - @${SETENV} ${MAKE_ENV} ${PERL} ${SCRIPTDIR}/createuser + PKG_PREFIX=${PREFIX} ./pkg-install ${PKGNAME} PRE-INSTALL post-install: @${INSTALL_SCRIPT} ${WRKSRC}/scripts/run_daemon ${PREFIX}/bin diff --git a/databases/msql/distinfo b/databases/msql/distinfo index d43a362eaf3..84b34837941 100644 --- a/databases/msql/distinfo +++ b/databases/msql/distinfo @@ -1 +1 @@ -MD5 (msql-2.0.11.tar.gz) = 199890d9cd536d878f68458f4f5db3e5 +MD5 (msql-2.0.12.tar.gz) = 920eaf4fd6128d8fd4dfa66301f86dcc diff --git a/databases/msql/pkg-deinstall b/databases/msql/pkg-deinstall new file mode 100644 index 00000000000..964422e53c1 --- /dev/null +++ b/databases/msql/pkg-deinstall @@ -0,0 +1,20 @@ +#!/bin/sh +# $FreeBSD$ +# + +if [ "$2" != "POST-DEINSTALL" ]; then + exit 0 +fi + +USER=msql + +if pw usershow "${USER}" 2>/dev/null 1>&2; then + if pw userdel ${USER}; then + echo "Delete user/group \"${USER}\"." + else + echo "Deleting user/group \"${USER}\" failed..." + exit 1 + fi +fi + +exit 0 diff --git a/databases/msql/pkg-install b/databases/msql/pkg-install new file mode 100644 index 00000000000..f140382da51 --- /dev/null +++ b/databases/msql/pkg-install @@ -0,0 +1,34 @@ +#!/bin/sh +# $FreeBSD$ +# + +if [ "$2" != "PRE-INSTALL" ]; then + exit 0 +fi + +USER=msql +GROUP=${USER} +UID=87 +GID=${UID} + +if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then + if pw groupadd ${GROUP} -g ${GID}; then + echo "Added group \"${GROUP}\"." + else + echo "Adding group \"${GROUP}\" failed..." + exit 1 + fi +fi + +if ! pw usershow "${USER}" 2>/dev/null 1>&2; then + if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ + -s "/bin/sh" -d "/var/db/msqldb" \ + -c "mSQL-2 pseudo-user"; \ + then + echo "Added user \"${USER}\"." + else + echo "Adding user \"${USER}\" failed..." + exit 1 + fi +fi +exit 0 diff --git a/databases/msql/scripts/createuser b/databases/msql/scripts/createuser deleted file mode 100644 index 67928eedf9e..00000000000 --- a/databases/msql/scripts/createuser +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/perl -# - -eval '(exit $?0)' && eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' -& eval 'exec /usr/bin/perl -S $0 $argv:q' -if 0; - -if( $> ) { - print "\nYou must be root to run this step!\n\n"; - exit 1; -} - -if( getpwnam( "msql" ) ) { - ( $null, $null, $msqlUID ) = getpwnam( "msql" ); -} else { - $msqlUID = 87; - while( getpwuid( $msqlUID ) ) { - $msqlUID++; - } -} - -if( getgrnam( "msql" ) ) { - ( $null, $null, $msqlGID ) = getgrnam( "msql" ); -} else { - $msqlGID = 87; - while( getgrgid( $msqlGID ) ) { - $msqlGID++; - } - &append_file( "/etc/group", "msql:*:$msqlGID:" ); -} - -print "msql user using uid $msqlUID\n"; -print "msql user using gid $msqlGID\n"; - -system( "/usr/bin/chpass -a \"msql:*:$msqlUID:$msqlGID\::0:0:mSQL-2 pseudo-user:/var/db/msqldb:/bin/sh\"" ); - -sub append_file { - local($file,@list) = @_; - local($LOCK_EX) = 2; - local($LOCK_NB) = 4; - local($LOCK_UN) = 8; - - open(F, ">> $file") || die "$file: $!\n"; - while( ! flock( F, $LOCK_EX | $LOCK_NB ) ) { - exit 1; - } - print F join( "\n", @list) . "\n"; - close F; - flock( F, $LOCK_UN ); -} |