ports/157584: Fix port: japanese/p5-Mail-SpamAssassin should use USERS

Chris Rees utisoft at gmail.com
Sat Jun 4 09:30:13 UTC 2011


>Number:         157584
>Category:       ports
>Synopsis:       Fix port: japanese/p5-Mail-SpamAssassin should use USERS
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 04 09:30:11 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Chris Rees
>Release:        FreeBSD 8.2-RELEASE-p1 i386
>Organization:
bayofrum
>Environment:
System: FreeBSD zeus.bayofrum.net 8.2-RELEASE-p1 FreeBSD 8.2-RELEASE-p1 #0: Sat Apr 30 15:09:06 BST 2011 root at zeus.bayofrum.net:/usr/obj/usr/src/sys/ZEUS i386


	
>Description:
	

	This port uses pkg-install to create new users instead of using USERS= and GROUPS=

>How-To-Repeat:
	
>Fix:

	

	- Use USERS and GROUPS

	Submitted by: Chris Rees (utisoft at gmail.com)


--- japanese-p5-Mail-SpamAssassin.patch begins here ---
Index: Makefile
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/japanese/p5-Mail-SpamAssassin/Makefile,v
retrieving revision 1.23
diff -u -r1.23 Makefile
--- Makefile	18 Apr 2011 06:55:33 -0000	1.23
+++ Makefile	2 Jun 2011 20:21:53 -0000
@@ -39,6 +39,9 @@
 
 CONFLICTS=	p5-Mail-SpamAssassin-[0-9]*
 
+USERS=		spamd
+GROUPS=		${USERS}
+
 PERL_CONFIGURE=	yes
 USE_PERL5_RUN=	5.8.8+
 USE_LDCONFIG=	yes
Index: pkg-deinstall
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/japanese/p5-Mail-SpamAssassin/pkg-deinstall,v
retrieving revision 1.3
diff -u -r1.3 pkg-deinstall
--- pkg-deinstall	7 Feb 2008 04:42:43 -0000	1.3
+++ pkg-deinstall	2 Jun 2011 20:21:11 -0000
@@ -8,10 +8,4 @@
         echo "To delete /var/db/spamassassin, use 'rm -rf /var/db/spamassassin'"
 fi
 
-USER=spamd
-
-if pw usershow "${USER}" 2>/dev/null 1>&2; then
-	echo "To delete ${USER} user permanently, use 'rmuser ${USER}'"
-fi
-
 exit 0
Index: pkg-install
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/japanese/p5-Mail-SpamAssassin/pkg-install,v
retrieving revision 1.5
diff -u -r1.5 pkg-install
--- pkg-install	22 Aug 2010 01:45:23 -0000	1.5
+++ pkg-install	2 Jun 2011 20:20:57 -0000
@@ -1,10 +1,5 @@
 #!/bin/sh
 PKG_PREFIX=${PKG_PREFIX:-/usr/local}
-USER=spamd
-GROUP=${USER}
-UID=58
-GID=${UID}
-HOME=/var/spool/${USER}
 
 if [ "$2" = "POST-INSTALL" ];then
 ask() {
@@ -32,28 +27,6 @@
                 echo "Please answer yes or no."
         done
 }
-    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 "/sbin/nologin" -d "${HOME}" \
-    		-c "SpamAssassin user"; \
-    	then
-    		echo "Added user \"${USER}\"."
-    		mkdir ${HOME} && chown ${USER}:${GROUP} ${HOME}
-    	else
-    		echo "Adding user \"${USER}\" failed..."
-    		exit 1
-    	fi
-    fi
-    
     # Create pid directory
     mkdir /var/run/spamd 2> /dev/null && chown ${USER}:${GROUP} /var/run/spamd
     /usr/bin/su root -c "${PKG_PREFIX}/bin/spamassassin -x -L --lint"
--- japanese-p5-Mail-SpamAssassin.patch ends here ---



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list