From nobody@FreeBSD.org  Sat Sep  8 17:27:12 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B515516A417
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  8 Sep 2007 17:27:12 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 8DEE513C45A
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  8 Sep 2007 17:27:12 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.1/8.14.1) with ESMTP id l88HRAPa015132
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 8 Sep 2007 17:27:10 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.1/8.14.1/Submit) id l88HRAIG015131;
	Sat, 8 Sep 2007 17:27:10 GMT
	(envelope-from nobody)
Message-Id: <200709081727.l88HRAIG015131@www.freebsd.org>
Date: Sat, 8 Sep 2007 17:27:10 GMT
From: Felippe de Meirelles Motta <lippe@freebsdbrasil.com.br>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [PATCH] mail/qmail-scanner
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         116203
>Category:       ports
>Synopsis:       [PATCH] mail/qmail-scanner
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Sep 08 17:30:01 GMT 2007
>Closed-Date:    Sun Sep 09 07:49:40 GMT 2007
>Last-Modified:  Sun Sep  9 07:50:09 GMT 2007
>Originator:     Felippe de Meirelles Motta
>Release:        FreeBSD 6.2-STABLE i386
>Organization:
FreeBSD Brasil LTDA
>Environment:
FreeBSD dev.bh.freebsdbrasil.com.br 6.2-STABLE FreeBSD 6.2-STABLE #0: Mon Jun 25 13:46:23 BRT 2007     lippe@dev.bh.freebsdbrasil.com.br:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
- Reported by Richard Secor <rsecor@seqlogic.com> that the script pkg-install dont works fine, is now patched! :);
- Domestic changes in his port.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/mail/qmail-scanner/Makefile,v
retrieving revision 1.16
diff -u -r1.16 Makefile
--- Makefile	4 Sep 2007 13:18:38 -0000	1.16
+++ Makefile	8 Sep 2007 17:21:24 -0000
@@ -58,13 +58,11 @@
 		--mime-unpacker "reformime" \
 		--batch
 
-SUB_FILES=	pkg-message
+SUB_FILES=	pkg-message pkg-install
 SUB_LIST=	SPOOLDIR="${SPOOLDIR}" \
 		QS_USER=${QS_USER} \
 		QS_ID=${QS_ID}
 
-PKGINSTALL?=	${WRKDIR}/pkg-install
-
 .include <bsd.port.pre.mk>
 
 .if defined(WITH_TNEF)
@@ -222,7 +220,7 @@
 	@${SED} -e 's,%%SPOOLDIR%%,${SPOOLDIR},g; s,%%QS_USER%%,${QS_USER},g; \
 		s,%%QS_ID%%,${QS_ID},g; s,%%PREFIX%%,${PREFIX},g' \
 		${FILESDIR}/pkg-install.in > ${WRKDIR}/pkg-install
-	@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+	@${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
 
 do-install:
 .if !defined(NOPORTDOCS)
@@ -239,9 +237,10 @@
 	@${INSTALL_SCRIPT} ${WRKSRC}/qmail-scanner-queue.template ${PREFIX}/bin/qmail-scanner-queue.pl
 	@${ECHO_MSG} ""
 	@${CAT} ${PKGMESSAGE}
+	@${ECHO_MSG} ""
 
 post-install:
-	@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+	@${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
 
 post-deinstall:
 	@${ECHO_MSG} ""
Index: files/pkg-install.in
===================================================================
RCS file: /home/ncvs/ports/mail/qmail-scanner/files/pkg-install.in,v
retrieving revision 1.1
diff -u -r1.1 pkg-install.in
--- files/pkg-install.in	4 Sep 2007 13:18:38 -0000	1.1
+++ files/pkg-install.in	8 Sep 2007 17:21:24 -0000
@@ -13,7 +13,7 @@
 
 SPOOLDIR=%%SPOOLDIR%%
 
-case "$1" in
+case "$2" in
 PRE-INSTALL)
   # User and group
   ${PW} groupshow -n ${QS_USER} >/dev/null 2>&1 \
@@ -39,10 +39,6 @@
   ${CHOWN} ${QS_USER}:${QS_USER} ${PREFIX}/bin/qmail-scanner-queue.pl
   ${CHMOD} 4755 ${PREFIX}/bin/qmail-scanner-queue.pl
 
-  # Initialize
-  ${PREFIX}/bin/qmail-scanner-queue.pl -z
-  ${PREFIX}/bin/qmail-scanner-queue.pl -g
-
   # Mod and owner (final)
   ${CHOWN} -R ${QS_USER}:${QS_USER} ${SPOOLDIR}
   ;;
Index: files/pkg-message.in
===================================================================
RCS file: /home/ncvs/ports/mail/qmail-scanner/files/pkg-message.in,v
retrieving revision 1.1
diff -u -r1.1 pkg-message.in
--- files/pkg-message.in	4 Sep 2007 13:18:38 -0000	1.1
+++ files/pkg-message.in	8 Sep 2007 17:21:24 -0000
@@ -3,8 +3,8 @@
 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
  - Please, configure correctly your anti-virus and anti-spam;
- - You HAVE to reinstall this port each time you add or remo-;
-ve one;
+ - You HAVE to reinstall this port each time you add or remo-
+ve an Anti-Virus or Anti-Spam;
  - Now configure the environment variable to use qmail-scanner:
 
  You just need to add for your tcpserver file (generally called
@@ -20,3 +20,7 @@
 
 You can test your installation by running 'make test' in port dir.
 
+Please, run the following commands:
+
+%%PREFIX%%/bin/qmail-scanner-queue.pl -z
+%%PREFIX%%/bin/qmail-scanner-queue.pl -g


>Release-Note:
>Audit-Trail:
Class-Changed-From-To: update->maintainer-update 
Class-Changed-By: edwin 
Class-Changed-When: Sat Sep 8 17:30:07 UTC 2007 
Class-Changed-Why:  
Fix category (submitter is maintainer) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=116203 
State-Changed-From-To: open->closed 
State-Changed-By: rafan 
State-Changed-When: Sun Sep 9 07:49:38 UTC 2007 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=116203 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/116203: commit references a PR
Date: Sun,  9 Sep 2007 07:49:41 +0000 (UTC)

 rafan       2007-09-09 07:49:33 UTC
 
   FreeBSD ports repository
 
   Modified files:
     mail/qmail-scanner   Makefile 
     mail/qmail-scanner/files pkg-install.in pkg-message.in 
   Log:
   - Fix pkg-install script (the action is passed as 2nd argument)
   - Some cosmetic changes
   
   PR:             ports/116203
   Reported by:    Richard Secor <rsecor at seqlogic.com>
   Submitted by:   Felippe de Meirelles Motta <lippe at freebsdbrasil.com.br> (maintainer)
   
   Revision  Changes    Path
   1.17      +5 -5      ports/mail/qmail-scanner/Makefile
   1.2       +1 -5      ports/mail/qmail-scanner/files/pkg-install.in
   1.2       +6 -2      ports/mail/qmail-scanner/files/pkg-message.in
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
