From renato@data.galle.com.br  Wed May 11 18:41:25 2005
Return-Path: <renato@data.galle.com.br>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id D06E916A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 11 May 2005 18:41:25 +0000 (GMT)
Received: from data.galle.com.br (data.galle.com.br [200.246.25.10])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 8598B43D72
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 11 May 2005 18:41:24 +0000 (GMT)
	(envelope-from renato@data.galle.com.br)
Received: from data.galle.com.br (data.galle.com.br [200.246.25.10])
	by data.galle.com.br (8.13.3/8.13.1) with ESMTP id j4BIfLDj059167
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 11 May 2005 15:41:21 -0300 (BRST)
	(envelope-from renato@data.galle.com.br)
Received: (from root@localhost)
	by data.galle.com.br (8.13.3/8.13.1/Submit) id j4BIfGV9059166;
	Wed, 11 May 2005 15:41:16 -0300 (BRST)
	(envelope-from renato)
Message-Id: <200505111841.j4BIfGV9059166@data.galle.com.br>
Date: Wed, 11 May 2005 15:41:16 -0300 (BRST)
From: Renato Botelho <freebsd@galle.com.br>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [MAINTAINER] mail/qmail: Rewrite pkg-install
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         80911
>Category:       ports
>Synopsis:       [MAINTAINER] mail/qmail: Rewrite pkg-install
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    sem
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 11 18:50:01 GMT 2005
>Closed-Date:    Tue May 17 09:15:04 GMT 2005
>Last-Modified:  Tue May 17 09:15:04 GMT 2005
>Originator:     Renato Botelho
>Release:        FreeBSD 5.4-RELEASE i386
>Organization:
Galle Folheados - http://www.galle.com.br
>Environment:
System: FreeBSD data.galle.com.br 5.4-RELEASE FreeBSD 5.4-RELEASE #0: Tue May 10 09:20:42 BRST 2005
>Description:
- Rewrite pkg-install using switch case for PRE-INSTALL and POST-INSTALL
parameters, and, use this parameters to call PKGINSTALL on Makefile.
- Remove some redundant things from Makefile and use it only on
pkg-install.
- Move pkg-install to files/pkg-install.in because i'm using some
%%MACROS%% on this.

Added file(s):
- files/pkg-install.in

Removed file(s):
- pkg-install

Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:

--- qmail-1.03_4.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/mail/qmail/Makefile,v
retrieving revision 1.61
diff -u -r1.61 Makefile
--- Makefile	11 May 2005 13:12:09 -0000	1.61
+++ Makefile	11 May 2005 18:34:23 -0000
@@ -197,8 +197,11 @@
 
 SUB_FILES+=	pkg-message${PKGMESSAGE_SUFFIX} mailer.conf.sample \
 		bootfiles.sed enable-qmail
+PKGINSTALL?=	${WRKDIR}/pkg-install
 PKGMESSAGE?=	${WRKDIR}/pkg-message${PKGMESSAGE_SUFFIX}
 
+CSH?=	/bin/csh
+
 DOCFILES+=	${WRKSRC}/BLURB ${WRKSRC}/BLURB2 ${WRKSRC}/BLURB3 \
 		${WRKSRC}/BLURB4 ${WRKSRC}/INTERNALS ${WRKSRC}/SECURITY \
 		${WRKSRC}/THOUGHTS ${FILESDIR}/PORT_NOTES \
@@ -304,8 +307,10 @@
 
 .if defined(WITH_RCDLINK)
 PLIST_SUB+=	RCDLINK=""
+RCDLINK=
 .else
 PLIST_SUB+=	RCDLINK="@comment "
+RCDLINK=	\#
 .endif
 
 # Fill SELECTED_OPTIONS with options to write conf-spamcontrol
@@ -448,12 +453,10 @@
 			   /"doc"/d; /"boot","/d' \
 		${WRKSRC}/hier.c
 
-# If you want to change the qmail users, they must be changed in both
-# work/*/conf-users and pkg/INSTALL.
-
 do-configure:
-	@# Create/Check the necessary groups/users
-	@PKG_PREFIX=${PREFIX} ${PKGINSTALL}
+	@${SED} -e 's,%%RCDLINK%%,${RCDLINK2},g; s,%%LOCALBASE%%,${LOCALBASE},g' \
+		${FILESDIR}/pkg-install.in > ${WRKDIR}/pkg-install
+	@${SETENV} PKG_PREFIX="${PREFIX}" ${CSH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
 	@${ECHO_CMD} "${CC} ${CFLAGS}" > ${WRKSRC}/conf-cc
 	@${ECHO_CMD} ${PREFIX} > ${WRKSRC}/conf-qmail
 .if defined(WITH_BIG_CONCURRENCY_PATCH) \
@@ -473,8 +476,6 @@
 		${SED} -f ${WRKDIR}/bootfiles.sed ${FILESDIR}/$i > ${WRKDIR}/${i} ; \
 	fi
 .endfor
-	@# Check again, just in case (ideally should error if not found)
-	@PKG_PREFIX=${PREFIX} ${PKGINSTALL}
 	@${MKDIR} ${DOCSDIR} ${PREFIX}/configure
 	@cd ${WRKSRC} ; ./install
 	${INSTALL_PROGRAM} ${CONFIGUREPROGS} ${PREFIX}/configure
@@ -504,17 +505,7 @@
 	@cd ${WRKSRC} && ${CAT} `${CAT} SYSDEPS` \
 		> ${DOCSDIR}/SYSDEPS
 .endif
-.for i in root postmaster mailer-daemon
-	@${TOUCH} ${PREFIX}/alias/.qmail-${i}
-.endfor
-	@# This is not part of qmail proper, hence the 2nd class citizenship
-	@if [ ! -e ${PREFIX}/control/me ]; then \
-		cd ${PREFIX}/configure ; ./config ; \
-	fi
-.if !defined(WITHOUT_RCDLINK)
-	@${MKDIR} ${LOCALBASE}/etc/rc.d
-	@${LN} -sf ${PREFIX}/rc ${LOCALBASE}/etc/rc.d/qmail.sh
-.endif
+	@${SETENV} PKG_PREFIX="${PREFIX}" ${CSH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
 	@${ECHO_CMD}
 	@${CAT} ${PKGMESSAGE}
 	@${ECHO_CMD}
Index: pkg-install
===================================================================
RCS file: pkg-install
diff -N pkg-install
--- pkg-install	11 May 2005 12:50:32 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,124 +0,0 @@
-#!/bin/csh -f
-#
-# $FreeBSD: ports/mail/qmail/pkg-install,v 1.5 2005/05/11 12:50:32 pav Exp $
-#
-
-# Author : Marcos Tischer Vallim
-# E-Mail : tischer@gmail.com
-# Date   : Tue Mar 22 00:40:45 BRT 2005
-
-# Variables
-set pw = '/usr/sbin/pw';
-set touch = '/usr/bin/touch';
-set sed = '/usr/bin/sed';
-set null = '/dev/null';
-
-if ($uid != 0) then
-	echo "It is necessary to add missing qmail users/groups at";
-	echo "this stage.  Please either add them manually or retry";
-	echo "as root.";
-	exit 1;
-endif
-
-if (! -x "$pw") then
-	echo "This system looks like a pre-2.2 version of FreeBSD.  We see that it";
-	echo "is missing the "pw" utility.  We need this utility.  Please get and";
-	echo "install it, and try again.  You can get the source from:";
-	echo "";
-	echo "  ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/src/usr.sbin/pw.tar.gz";
-	echo "";
-	echo "No $pw";
-	exit 1;
-endif
-
-set groups  = (qmail qnofiles);
-set gids    = (82 81);
-set users   = (alias qmaild qmaill qmailp qmailq qmailr qmails);
-set users_g = (qnofiles qnofiles qnofiles qnofiles qmail qmail qmail);
-set uids    = (81 82 83 84 85 86 87);
-set doguid  = 0;
-
-if ($#argv) then
-	if ($argv[1] == "POST-INSTALL") then
-		${PKG_PREFIX}/configure/install x;
-		if ( ! `filetest -e ${PKG_PREFIX}/control/me` ) then
-			cd ${PKG_PREFIX}/configure && ./config;
-		endif
-
-		$touch "${PKG_PREFIX}/alias/.{qmail-postmaster,qmail-root,qmail-mailer-daemon}";
-
-		if ($status) then
-			echo "Failed to create files :";
-			echo "  ${PKG_PREFIX}/alias/.qmail-postmaster";
-			echo "  ${PKG_PREFIX}/alias/.qmail-root";
-			echo "  ${PKG_PREFIX}/alias/.qmail-mailer-daemon";
-			exit 1;
-		endif
-
-		exit 0;
-	endif
-
-	if ($argv[1] == "PRE-INSTALL") then
-		set doguid = 1;
-	endif
-endif
-
-if (${?PACKAGE_BUILDING}) then
-	set doguid = 1;
-endif
-
-set k = 1;
-foreach group ($groups)
-	$pw groupshow $group >& $null;
-
-	if ($status) then
-		$pw groupadd $group -g $gids[$k];
-
-		if ($status) then
-			echo "Failed to add group '$group' as gid '$gids[$k]'";
-			exit 1;
-		endif
-	endif
-
-	if ($doguid) then
-		set chkgid = (`$pw groupshow $group | $sed -e "s/:/ /g"`); 
-		if ($chkgid[3] != $gids[$k]) then
-			echo "Group '$group' should have gid '$gids[$k]'";
-			exit 1;
-		endif
-	endif
-
-	@ k = $k + 1;
-end
-
-set k = 1;
-foreach user ($users)
-	$pw usershow $user >& $null;
-
-	if ($status) then
-		if ($user == "alias") then
-			set home = ${PKG_PREFIX}/alias;
-		else
-			set home = ${PKG_PREFIX};
-		endif
-
-		$pw useradd $user -g $users_g[$k] -d $home -s /nonexistent -u $uids[$k];
-
-		if ($status) then
-			echo "Failed to add user '$user' as uid '$uids[$k]'";
-			exit 1;
-		endif
-	endif
-
-	if ($doguid) then
-		set chkuid = (`$pw usershow $user | $sed -e "s/:/ /g"`); 
-		if ($chkuid[3] != $uids[$k]) then
-			echo "User '$user' should have uid '$uids[$k]'";
-			exit 1;
-		endif
-	endif
-
-	@ k = $k + 1;
-end
-
-exit 0;
Index: files/pkg-install.in
===================================================================
RCS file: files/pkg-install.in
diff -N files/pkg-install.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/pkg-install.in	11 May 2005 18:34:24 -0000
@@ -0,0 +1,114 @@
+#!/bin/csh -f
+#
+# $FreeBSD: ports/mail/qmail/pkg-install,v 1.5 2005/05/11 12:50:32 pav Exp $
+#
+
+# Author : Marcos Tischer Vallim
+# E-Mail : tischer@gmail.com
+# Date   : Tue Mar 22 00:40:45 BRT 2005
+
+set path = ( /bin /sbin /usr/bin /usr/sbin )
+
+if ($uid != 0) then
+	echo "It is necessary to add missing qmail users/groups at";
+	echo "this stage.  Please either add them manually or retry";
+	echo "as root.";
+	exit 1;
+endif
+
+if (! -x `which pw`) then
+	echo "This system looks like a pre-2.2 version of FreeBSD.  We see that it";
+	echo "is missing the "pw" utility.  We need this utility.  Please get and";
+	echo "install it, and try again.  You can get the source from:";
+	echo "";
+	echo "  ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/src/usr.sbin/pw.tar.gz";
+	echo "";
+	echo "No pw";
+	exit 1;
+endif
+
+switch ($argv[2])
+
+case "PRE-INSTALL":
+	set groups  = (qmail qnofiles);
+	set gids    = (82 81);
+	set users   = (alias qmaild qmaill qmailp qmailq qmailr qmails);
+	set users_g = (qnofiles qnofiles qnofiles qnofiles qmail qmail qmail);
+	set uids    = (81 82 83 84 85 86 87);
+
+
+	set k = 1;
+	foreach group ($groups)
+		pw groupshow $group >& /dev/null;
+	
+		if ($status) then
+			pw groupadd $group -g $gids[$k];
+	
+			if ($status) then
+				echo "Failed to add group '$group' as gid '$gids[$k]'";
+				exit 1;
+			endif
+		endif
+	
+		set chkgid = (`pw groupshow $group | sed -e "s,:, ,g"`); 
+		if ($chkgid[3] != $gids[$k]) then
+			echo "Group '$group' should have gid '$gids[$k]'";
+			exit 1;
+		endif
+	
+		@ k++;
+	end
+	
+	set k = 1;
+	foreach user ($users)
+		pw usershow $user >& /dev/null;
+	
+		if ($status) then
+			if ($user == "alias") then
+				set home = ${PKG_PREFIX}/alias;
+			else
+				set home = ${PKG_PREFIX};
+			endif
+	
+			pw useradd $user -g $users_g[$k] -d $home -s /nonexistent -u $uids[$k];
+	
+			if ($status) then
+				echo "Failed to add user '$user' as uid '$uids[$k]'";
+				exit 1;
+			endif
+		endif
+	
+		set chkuid = (`pw usershow $user | sed -e "s,:, ,g"`); 
+		if ($chkuid[3] != $uids[$k]) then
+			echo "User '$user' should have uid '$uids[$k]'";
+			exit 1;
+		endif
+	
+		@ k++;
+	end
+
+	breaksw;
+
+case "POST-INSTALL":
+	${PKG_PREFIX}/configure/install x;
+
+	if ( ! `filetest -e ${PKG_PREFIX}/control/me` ) then
+		cd ${PKG_PREFIX}/configure && ./config;
+	endif
+
+	%%RCDLINK%%ln -s ${PKG_PREFIX}/rc %%LOCALBASE%%/etc/rc.d/qmail.sh;
+
+	touch "${PKG_PREFIX}/alias/.qmail-{postmaster,root,mailer-daemon}";
+
+	if ($status) then
+		echo "Failed to create files :";
+		echo "  ${PKG_PREFIX}/alias/.qmail-postmaster";
+		echo "  ${PKG_PREFIX}/alias/.qmail-root";
+		echo "  ${PKG_PREFIX}/alias/.qmail-mailer-daemon";
+		exit 1;
+	endif
+
+	breaksw;
+endsw
+
+exit 0;
--- qmail-1.03_4.patch ends here ---

>Release-Note:
>Audit-Trail:

From: Renato Botelho <freebsd@galle.com.br>
To: bug-followup@FreeBSD.org, freebsd@galle.com.br
Cc:  
Subject: Re: ports/80911: [MAINTAINER] mail/qmail: Rewrite pkg-install
Date: Fri, 13 May 2005 15:59:47 -0300

 Dear commiter,
 
 Here is a new patch, it adds CONFLICTS var for all slave-ports, I didn't
 generate it using cvs because we are having some problems with internet
 here and I can't access anoncvs server.
 
 --- qmail.diff starts here ---
 diff -ruN --exclude=CVS /usr/ports/mail/qmail/Makefile /usr/home/renato/ports/mail/qmail/Makefile
 --- /usr/ports/mail/qmail/Makefile	Wed May 11 11:32:04 2005
 +++ /usr/home/renato/ports/mail/qmail/Makefile	Fri May 13 15:06:44 2005
 @@ -17,6 +17,34 @@
  
  DIST_SUBDIR=	qmail
  
 +.if defined(SLAVE_LDAP) || \
 +    defined(SLAVE_MYSQL) || \
 +    defined(SLAVE_SMTP_AUTH_TLS) || \
 +    defined(SLAVE_SPAMCONTROL) || \
 +    defined(SLAVE_TLS)
 +CONFLICTS+=	qmail-[0-9]*
 +.endif
 +
 +.if !defined(SLAVE_LDAP)
 +CONFLICTS+=	qmail-ldap2*-[0-9]*
 +.endif
 +
 +.if !defined(SLAVE_MYSQL)
 +CONFLICTS+=	qmail-mysql-[0-9]*
 +.endif
 +
 +.if !defined(SLAVE_SMTP_AUTH_TLS)
 +CONFLICTS+=	qmail-smtp_auth+tls-[0-9]*
 +.endif
 +
 +.if !defined(SLAVE_SPAMCONTROL)
 +CONFLICTS+=	qmail-spamcontrol-[0-9]*
 +.endif
 +
 +.if !defined(SLAVE_TLS)
 +CONFLICTS+=	qmail-tls-[0-9]*
 +.endif
 +
  .if defined(SLAVE_LDAP) || defined(SLAVE_SPAMCONTROL)
  BARRIER_DNS_PATCH=yes
  BARRIER_BIG_CONCURRENCY_PATCH=yes
 @@ -197,8 +225,11 @@
  
  SUB_FILES+=	pkg-message${PKGMESSAGE_SUFFIX} mailer.conf.sample \
  		bootfiles.sed enable-qmail
 +PKGINSTALL?=	${WRKDIR}/pkg-install
  PKGMESSAGE?=	${WRKDIR}/pkg-message${PKGMESSAGE_SUFFIX}
  
 +CSH?=	/bin/csh
 +
  DOCFILES+=	${WRKSRC}/BLURB ${WRKSRC}/BLURB2 ${WRKSRC}/BLURB3 \
  		${WRKSRC}/BLURB4 ${WRKSRC}/INTERNALS ${WRKSRC}/SECURITY \
  		${WRKSRC}/THOUGHTS ${FILESDIR}/PORT_NOTES \
 @@ -304,8 +335,10 @@
  
  .if defined(WITH_RCDLINK)
  PLIST_SUB+=	RCDLINK=""
 +RCDLINK=
  .else
  PLIST_SUB+=	RCDLINK="@comment "
 +RCDLINK=	\#
  .endif
  
  # Fill SELECTED_OPTIONS with options to write conf-spamcontrol
 @@ -448,12 +481,10 @@
  			   /"doc"/d; /"boot","/d' \
  		${WRKSRC}/hier.c
  
 -# If you want to change the qmail users, they must be changed in both
 -# work/*/conf-users and pkg/INSTALL.
 -
  do-configure:
 -	@# Create/Check the necessary groups/users
 -	@PKG_PREFIX=${PREFIX} ${PKGINSTALL}
 +	@${SED} -e 's,%%RCDLINK%%,${RCDLINK2},g; s,%%LOCALBASE%%,${LOCALBASE},g' \
 +		${FILESDIR}/pkg-install.in > ${WRKDIR}/pkg-install
 +	@${SETENV} PKG_PREFIX="${PREFIX}" ${CSH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
  	@${ECHO_CMD} "${CC} ${CFLAGS}" > ${WRKSRC}/conf-cc
  	@${ECHO_CMD} ${PREFIX} > ${WRKSRC}/conf-qmail
  .if defined(WITH_BIG_CONCURRENCY_PATCH) \
 @@ -473,8 +504,6 @@
  		${SED} -f ${WRKDIR}/bootfiles.sed ${FILESDIR}/$i > ${WRKDIR}/${i} ; \
  	fi
  .endfor
 -	@# Check again, just in case (ideally should error if not found)
 -	@PKG_PREFIX=${PREFIX} ${PKGINSTALL}
  	@${MKDIR} ${DOCSDIR} ${PREFIX}/configure
  	@cd ${WRKSRC} ; ./install
  	${INSTALL_PROGRAM} ${CONFIGUREPROGS} ${PREFIX}/configure
 @@ -504,17 +533,7 @@
  	@cd ${WRKSRC} && ${CAT} `${CAT} SYSDEPS` \
  		> ${DOCSDIR}/SYSDEPS
  .endif
 -.for i in root postmaster mailer-daemon
 -	@${TOUCH} ${PREFIX}/alias/.qmail-${i}
 -.endfor
 -	@# This is not part of qmail proper, hence the 2nd class citizenship
 -	@if [ ! -e ${PREFIX}/control/me ]; then \
 -		cd ${PREFIX}/configure ; ./config ; \
 -	fi
 -.if !defined(WITHOUT_RCDLINK)
 -	@${MKDIR} ${LOCALBASE}/etc/rc.d
 -	@${LN} -sf ${PREFIX}/rc ${LOCALBASE}/etc/rc.d/qmail.sh
 -.endif
 +	@${SETENV} PKG_PREFIX="${PREFIX}" ${CSH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
  	@${ECHO_CMD}
  	@${CAT} ${PKGMESSAGE}
  	@${ECHO_CMD}
 diff -ruN --exclude=CVS /usr/ports/mail/qmail/files/pkg-install.in /usr/home/renato/ports/mail/qmail/files/pkg-install.in
 --- /usr/ports/mail/qmail/files/pkg-install.in	Wed Dec 31 21:00:00 1969
 +++ /usr/home/renato/ports/mail/qmail/files/pkg-install.in	Wed May 11 14:38:50 2005
 @@ -0,0 +1,114 @@
 +#!/bin/csh -f
 +#
 +# $FreeBSD: ports/mail/qmail/pkg-install,v 1.5 2005/05/11 12:50:32 pav Exp $
 +#
 +
 +# Author : Marcos Tischer Vallim
 +# E-Mail : tischer@gmail.com
 +# Date   : Tue Mar 22 00:40:45 BRT 2005
 +
 +set path = ( /bin /sbin /usr/bin /usr/sbin )
 +
 +if ($uid != 0) then
 +	echo "It is necessary to add missing qmail users/groups at";
 +	echo "this stage.  Please either add them manually or retry";
 +	echo "as root.";
 +	exit 1;
 +endif
 +
 +if (! -x `which pw`) then
 +	echo "This system looks like a pre-2.2 version of FreeBSD.  We see that it";
 +	echo "is missing the "pw" utility.  We need this utility.  Please get and";
 +	echo "install it, and try again.  You can get the source from:";
 +	echo "";
 +	echo "  ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/src/usr.sbin/pw.tar.gz";
 +	echo "";
 +	echo "No pw";
 +	exit 1;
 +endif
 +
 +switch ($argv[2])
 +
 +case "PRE-INSTALL":
 +	set groups  = (qmail qnofiles);
 +	set gids    = (82 81);
 +	set users   = (alias qmaild qmaill qmailp qmailq qmailr qmails);
 +	set users_g = (qnofiles qnofiles qnofiles qnofiles qmail qmail qmail);
 +	set uids    = (81 82 83 84 85 86 87);
 +
 +
 +	set k = 1;
 +	foreach group ($groups)
 +		pw groupshow $group >& /dev/null;
 +	
 +		if ($status) then
 +			pw groupadd $group -g $gids[$k];
 +	
 +			if ($status) then
 +				echo "Failed to add group '$group' as gid '$gids[$k]'";
 +				exit 1;
 +			endif
 +		endif
 +	
 +		set chkgid = (`pw groupshow $group | sed -e "s,:, ,g"`); 
 +		if ($chkgid[3] != $gids[$k]) then
 +			echo "Group '$group' should have gid '$gids[$k]'";
 +			exit 1;
 +		endif
 +	
 +		@ k++;
 +	end
 +	
 +	set k = 1;
 +	foreach user ($users)
 +		pw usershow $user >& /dev/null;
 +	
 +		if ($status) then
 +			if ($user == "alias") then
 +				set home = ${PKG_PREFIX}/alias;
 +			else
 +				set home = ${PKG_PREFIX};
 +			endif
 +	
 +			pw useradd $user -g $users_g[$k] -d $home -s /nonexistent -u $uids[$k];
 +	
 +			if ($status) then
 +				echo "Failed to add user '$user' as uid '$uids[$k]'";
 +				exit 1;
 +			endif
 +		endif
 +	
 +		set chkuid = (`pw usershow $user | sed -e "s,:, ,g"`); 
 +		if ($chkuid[3] != $uids[$k]) then
 +			echo "User '$user' should have uid '$uids[$k]'";
 +			exit 1;
 +		endif
 +	
 +		@ k++;
 +	end
 +
 +	breaksw;
 +
 +case "POST-INSTALL":
 +	${PKG_PREFIX}/configure/install x;
 +
 +	if ( ! `filetest -e ${PKG_PREFIX}/control/me` ) then
 +		cd ${PKG_PREFIX}/configure && ./config;
 +	endif
 +
 +	%%RCDLINK%%ln -s ${PKG_PREFIX}/rc %%LOCALBASE%%/etc/rc.d/qmail.sh;
 +
 +	touch "${PKG_PREFIX}/alias/.qmail-{postmaster,root,mailer-daemon}";
 +
 +	if ($status) then
 +		echo "Failed to create files :";
 +		echo "  ${PKG_PREFIX}/alias/.qmail-postmaster";
 +		echo "  ${PKG_PREFIX}/alias/.qmail-root";
 +		echo "  ${PKG_PREFIX}/alias/.qmail-mailer-daemon";
 +		exit 1;
 +	endif
 +
 +	breaksw;
 +endsw
 +
 +exit 0;
 diff -ruN --exclude=CVS /usr/ports/mail/qmail/pkg-install /usr/home/renato/ports/mail/qmail/pkg-install
 --- /usr/ports/mail/qmail/pkg-install	Wed May 11 11:32:04 2005
 +++ /usr/home/renato/ports/mail/qmail/pkg-install	Wed Dec 31 21:00:00 1969
 @@ -1,124 +0,0 @@
 -#!/bin/csh -f
 -#
 -# $FreeBSD: ports/mail/qmail/pkg-install,v 1.5 2005/05/11 12:50:32 pav Exp $
 -#
 -
 -# Author : Marcos Tischer Vallim
 -# E-Mail : tischer@gmail.com
 -# Date   : Tue Mar 22 00:40:45 BRT 2005
 -
 -# Variables
 -set pw = '/usr/sbin/pw';
 -set touch = '/usr/bin/touch';
 -set sed = '/usr/bin/sed';
 -set null = '/dev/null';
 -
 -if ($uid != 0) then
 -	echo "It is necessary to add missing qmail users/groups at";
 -	echo "this stage.  Please either add them manually or retry";
 -	echo "as root.";
 -	exit 1;
 -endif
 -
 -if (! -x "$pw") then
 -	echo "This system looks like a pre-2.2 version of FreeBSD.  We see that it";
 -	echo "is missing the "pw" utility.  We need this utility.  Please get and";
 -	echo "install it, and try again.  You can get the source from:";
 -	echo "";
 -	echo "  ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/src/usr.sbin/pw.tar.gz";
 -	echo "";
 -	echo "No $pw";
 -	exit 1;
 -endif
 -
 -set groups  = (qmail qnofiles);
 -set gids    = (82 81);
 -set users   = (alias qmaild qmaill qmailp qmailq qmailr qmails);
 -set users_g = (qnofiles qnofiles qnofiles qnofiles qmail qmail qmail);
 -set uids    = (81 82 83 84 85 86 87);
 -set doguid  = 0;
 -
 -if ($#argv) then
 -	if ($argv[1] == "POST-INSTALL") then
 -		${PKG_PREFIX}/configure/install x;
 -		if ( ! `filetest -e ${PKG_PREFIX}/control/me` ) then
 -			cd ${PKG_PREFIX}/configure && ./config;
 -		endif
 -
 -		$touch "${PKG_PREFIX}/alias/.{qmail-postmaster,qmail-root,qmail-mailer-daemon}";
 -
 -		if ($status) then
 -			echo "Failed to create files :";
 -			echo "  ${PKG_PREFIX}/alias/.qmail-postmaster";
 -			echo "  ${PKG_PREFIX}/alias/.qmail-root";
 -			echo "  ${PKG_PREFIX}/alias/.qmail-mailer-daemon";
 -			exit 1;
 -		endif
 -
 -		exit 0;
 -	endif
 -
 -	if ($argv[1] == "PRE-INSTALL") then
 -		set doguid = 1;
 -	endif
 -endif
 -
 -if (${?PACKAGE_BUILDING}) then
 -	set doguid = 1;
 -endif
 -
 -set k = 1;
 -foreach group ($groups)
 -	$pw groupshow $group >& $null;
 -
 -	if ($status) then
 -		$pw groupadd $group -g $gids[$k];
 -
 -		if ($status) then
 -			echo "Failed to add group '$group' as gid '$gids[$k]'";
 -			exit 1;
 -		endif
 -	endif
 -
 -	if ($doguid) then
 -		set chkgid = (`$pw groupshow $group | $sed -e "s/:/ /g"`); 
 -		if ($chkgid[3] != $gids[$k]) then
 -			echo "Group '$group' should have gid '$gids[$k]'";
 -			exit 1;
 -		endif
 -	endif
 -
 -	@ k = $k + 1;
 -end
 -
 -set k = 1;
 -foreach user ($users)
 -	$pw usershow $user >& $null;
 -
 -	if ($status) then
 -		if ($user == "alias") then
 -			set home = ${PKG_PREFIX}/alias;
 -		else
 -			set home = ${PKG_PREFIX};
 -		endif
 -
 -		$pw useradd $user -g $users_g[$k] -d $home -s /nonexistent -u $uids[$k];
 -
 -		if ($status) then
 -			echo "Failed to add user '$user' as uid '$uids[$k]'";
 -			exit 1;
 -		endif
 -	endif
 -
 -	if ($doguid) then
 -		set chkuid = (`$pw usershow $user | $sed -e "s/:/ /g"`); 
 -		if ($chkuid[3] != $uids[$k]) then
 -			echo "User '$user' should have uid '$uids[$k]'";
 -			exit 1;
 -		endif
 -	endif
 -
 -	@ k = $k + 1;
 -end
 -
 -exit 0;
 --- qmail.diff end here ---
 
 Thanks
 -- 
 Renato Botelho <freebsd at galle dot com dot br>
 AIM: RBGargaBR | ICQ: 54596223
 GnuPG Key: http://www.galle.com.br/~renato/pubkey.asc
 
 H. L. Mencken suffers from the hallucination that he is H. L.
 Mencken -- there is no cure for a disease of that magnitude.
 		-- Maxwell Bodenheim
Responsible-Changed-From-To: freebsd-ports-bugs->sem 
Responsible-Changed-By: sem 
Responsible-Changed-When: Mon May 16 12:52:31 GMT 2005 
Responsible-Changed-Why:  
Take it 

http://www.freebsd.org/cgi/query-pr.cgi?pr=80911 
State-Changed-From-To: open->closed 
State-Changed-By: sem 
State-Changed-When: Tue May 17 09:14:57 GMT 2005 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=80911 
>Unformatted:
