Bug 157584

Summary: Fix port: japanese/p5-Mail-SpamAssassin should use USERS
Product: Ports & Packages Reporter: Chris Rees <utisoft>
Component: Individual Port(s)Assignee: Chris Rees <crees>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Chris Rees 2011-06-04 10:30:11 UTC
	

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

Fix: - Use USERS and GROUPS

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




-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.--aq6pu62mz3RfDIj7S6M1Q00cwGZbqLW6HUVcFuAB9j9ecM5L
Content-Type: text/plain; name="japanese-p5-Mail-SpamAssassin.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="japanese-p5-Mail-SpamAssassin.patch"

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"
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2011-06-04 10:30:26 UTC
Responsible Changed
From-To: freebsd-ports-bugs->perl

perl@ wants this port PRs (via the GNATS Auto Assign Tool)
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2011-06-04 10:30:32 UTC
Maintainer of japanese/p5-Mail-SpamAssassin,

Please note that PR ports/157584 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/157584

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 3 Edwin Groothuis freebsd_committer freebsd_triage 2011-06-04 10:30:37 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 4 Michael Scheidell 2011-06-04 13:30:54 UTC
Thanks.  I am waiting on results of a test on a perl 5.12.3 patch and will publish both of these when done

--
Michael Scheidell
CTO SECNAP Network Security
561-999-5000<tel:5619995000>


-----Original message-----
From: TAOKA Fumiyoshi <fmysh@iijmio-mail.jp>
To: "bug-followup@FreeBSD.org" <bug-followup@FreeBSD.org>
Cc: Michael Scheidell <michael.scheidell@secnap.com>
Sent: Sat, Jun 4, 2011 12:12:04 GMT+00:00
Subject: Re: ports/157584: Fix port: japanese/p5-Mail-SpamAssassin should use USERS


On 2011/06/04, at 18:30, Edwin Groothuis wrote:

> Maintainer of japanese/p5-Mail-SpamAssassin,
>
> Please note that PR ports/157584 has just been submitted.
>
> If it contains a patch for an upgrade, an enhancement or a bug fix
> you agree on, reply to this email stating that you approve the patch
> and a committer will take care of it.
>
> The full text of the PR can be found at:
>    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/157584
>
> --
> Edwin Groothuis via the GNATS Auto Assign Tool
> edwin@FreeBSD.org
>


I think the patch is okay.  But the PR is also relevant to
mail/p5-Mail-SpamAssassin, the upstream port.




Comment 5 Chris Rees freebsd_committer freebsd_triage 2011-07-02 09:35:18 UTC
Hi Michael,

Please would you clarify your approval / lack of in a plain text email 
-- unfortunately your previous reply was garbled!

Just reply to this message and I'll take care of it.

Thanks!

Chris

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Comment 6 Chris Rees freebsd_committer freebsd_triage 2011-07-02 09:35:24 UTC
Responsible Changed
From-To: perl->crees

I'll take it.
Comment 7 Michael Scheidell 2011-07-02 11:28:39 UTC
On 7/2/11 4:35 AM, Chris Rees wrote:
> Hi Michael,
>
> Please would you clarify your approval / lack of in a plain text email 
> -- unfortunately your previous reply was garbled!
>
> Just reply to this message and I'll take care of it.
I am not the maintainer of the japanese port, but, you should look at 
the upstream p5-Mail-SpamAssassin patches instead.
this also upgrades SA to the current 3.3.2 and replaces the above pr.

>
> Thanks!
>
> Chris
>

-- 
Michael Scheidell, CTO
o: 561-999-5000
d: 561-948-2259
 >*| *SECNAP Network Security Corporation

    * Best Mobile Solutions Product of 2011
    * Best Intrusion Prevention Product
    * Hot Company Finalist 2011
    * Best Email Security Product
    * Certified SNORT Integrator

______________________________________________________________________
This email has been scanned and certified safe by SpammerTrap(r). 
For Information please see http://www.secnap.com/products/spammertrap/
______________________________________________________________________
Comment 8 Chris Rees freebsd_committer freebsd_triage 2011-07-03 16:28:55 UTC
Maintainer of japanese/p5-Mail-SpamAssassin,

Please note that PR ports/157584 
<http://www.freebsd.org/cgi/query-pr.cgi?pr=157584&cat=ports> has just 
been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/157584

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Comment 9 Chris Rees freebsd_committer freebsd_triage 2011-07-17 17:44:53 UTC
State Changed
From-To: feedback->closed

Superseded by ports/158530