From owner-freebsd-ports Tue Apr 3 13:40: 9 2001 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 76A3237B726 for ; Tue, 3 Apr 2001 13:40:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f33Ke1T36638; Tue, 3 Apr 2001 13:40:01 -0700 (PDT) (envelope-from gnats) Received: from titanic.medinet.si (titanic.medinet.si [212.18.32.66]) by hub.freebsd.org (Postfix) with ESMTP id 7510237B724 for ; Tue, 3 Apr 2001 13:30:11 -0700 (PDT) (envelope-from blaz@amis.net) Received: by titanic.medinet.si (Postfix, from userid 1000) id 28E2526C02; Tue, 3 Apr 2001 22:30:07 +0200 (CEST) Message-Id: <20010403203007.28E2526C02@titanic.medinet.si> Date: Tue, 3 Apr 2001 22:30:07 +0200 (CEST) From: blaz@amis.net Reply-To: blaz@amis.net To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: ports/26327: [MAINTAINER UPDATE] netsaint-plugins port update Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 26327 >Category: ports >Synopsis: [MAINTAINER UPDATE] netsaint-plugins port update >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Apr 03 13:40:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Blaz Zupan >Release: FreeBSD 4.2-STABLE i386 >Organization: Medinet >Environment: >Description: Update netsaint-plugins to 1.2.9.3. Don't depend on netsaint port as netsaint port depends on us and this creates a circular dependency. Instead create the netsaint user/group ourselves (which is the only reason for the netsaint dependency). Move data directory to /var/netsaint. Warning to the commiter: contains new file (scripts/createuser), don't forget to cvs add. This patch is needed for the upcoming netsaint port update. >How-To-Repeat: >Fix: diff -uNr netsaint-plugins.old/Makefile netsaint-plugins/Makefile --- netsaint-plugins.old/Makefile Sat Mar 31 05:32:40 2001 +++ netsaint-plugins/Makefile Tue Apr 3 21:22:27 2001 @@ -6,10 +6,10 @@ # PORTNAME= netsaint-plugins -PORTVERSION= 1.2.9.2 +PORTVERSION= 1.2.9.3 CATEGORIES= net MASTER_SITES= http://download.sourceforge.net/netsaintplug/ -DISTNAME= ${PORTNAME}-1.2.9-2 +DISTNAME= ${PORTNAME}-1.2.9-3 MAINTAINER= blaz@amis.net @@ -18,15 +18,11 @@ --libexecdir=${PREFIX}/libexec/netsaint \ --datadir=${PREFIX}/share/netsaint \ --sysconfdir=${PREFIX}/etc/netsaint \ - --localstatedir=${PREFIX}/var/netsaint + --localstatedir=/var/netsaint CONFIGURE_ENV= LOCALBASE=${LOCALBASE} USE_AUTOMAKE= yes USE_GMAKE= yes -# make absolutely sure we have the user/group added! -BUILD_DEPENDS= netsaint:${PORTSDIR}/net/netsaint -RUN_DEPENDS= netsaint:${PORTSDIR}/net/netsaint - .if defined(WANT_QSTAT) BUILD_DEPENDS+= qstat:${PORTSDIR}/games/qstat RUN_DEPENDS+= qstat:${PORTSDIR}/games/qstat @@ -67,5 +63,8 @@ .else PLIST_SUB+= WANT_MYSQL="@comment " .endif + +pre-install: + ${PERL} ${SCRIPTDIR}/createuser .include diff -uNr netsaint-plugins.old/distinfo netsaint-plugins/distinfo --- netsaint-plugins.old/distinfo Sat Mar 31 05:32:40 2001 +++ netsaint-plugins/distinfo Tue Apr 3 21:14:57 2001 @@ -1 +1 @@ -MD5 (netsaint-plugins-1.2.9-2.tar.gz) = 531cd7774bfd2f195f46136dcba1b78f +MD5 (netsaint-plugins-1.2.9-3.tar.gz) = 2e9928dcb1d522144ba0bb9a98619035 diff -uNr netsaint-plugins.old/scripts/createuser netsaint-plugins/scripts/createuser --- netsaint-plugins.old/scripts/createuser Thu Jan 1 01:00:00 1970 +++ netsaint-plugins/scripts/createuser Tue Apr 3 21:24:11 2001 @@ -0,0 +1,49 @@ +#!/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( "netsaint" ) ) { + ( $null, $null, $nsUID ) = getpwnam( "netsaint" ); +} else { + $nsUID = 70; + while( getpwuid( $nsUID ) ) { + $nsUID++; + } +} + +if( getgrnam( "netsaint" ) ) { + ( $null, $null, $nsGID ) = getgrnam( "netsaint" ); +} else { + $nsGID = 70; + while( getgrgid( $nsGID ) ) { + $nsGID++; + } + &append_file( "/etc/group", "netsaint:*:$nsGID:" ); +} + +print "netsaint user using uid $nsUID and gid $nsGID\n"; + +system( "/usr/bin/chpass -a \"netsaint:*:$nsUID:$nsGID\:\:0:0:Netsaint pseudo-user:/var/netsaint:/sbin/nologin\"" ); + +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 ); +} >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message