From nobody@FreeBSD.org  Tue Jun 14 07:06:04 2011
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 502181065679
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 14 Jun 2011 07:06:04 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 40B738FC1F
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 14 Jun 2011 07:06:04 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p5E763j5063577
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 14 Jun 2011 07:06:03 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p5E763Jm063576;
	Tue, 14 Jun 2011 07:06:03 GMT
	(envelope-from nobody)
Message-Id: <201106140706.p5E763Jm063576@red.freebsd.org>
Date: Tue, 14 Jun 2011 07:06:03 GMT
From: Roland Behme <rb@nugman.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Syntax error in /usr/local/etc/rc.d/mailman
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         157868
>Category:       ports
>Synopsis:       mail/mailman: Possible problem with MAIL_GID
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    crees
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 14 07:10:07 UTC 2011
>Closed-Date:    Tue Jun 21 16:01:15 UTC 2011
>Last-Modified:  Tue Jun 21 16:10:11 UTC 2011
>Originator:     Roland Behme
>Release:        8.2-RELEASE
>Organization:
>Environment:
FreeBSD james.nugman.de 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Wed Feb 23 00:02:08 UTC 2011     root@i0103.twx.de:/usr/obj/usr/src/sys/VIMAGE  i386
>Description:
After upgrade to mailman-2.1.14_2 I get a syntax error in /usr/local/etc/rc.d/mailman:

/usr/local/etc/rc.d/mailman: 35: Syntax error: "(" unexpected (expecting "}")
>How-To-Repeat:
run '/usr/local/etc/rc.d/mailman [start|stop]'
>Fix:
There are two backslashes mssing. Correct would be:

mailman_stop() {
        [ -f $pidfile ] \
          && /usr/local/mailman/bin/mailmanctl -q stop \
          || echo ${name} not running? \(check ${pidfile}\)
}


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->wxs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue Jun 14 07:13:24 UTC 2011 
Responsible-Changed-Why:  
Fix synopsis and assign. 

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

From: Guido Falsi <mad@madpilot.net>
To: bug-followup@FreeBSD.org, rb@nugman.de
Cc: wxs@FreeBSD.org
Subject: Re: ports/157868: mail/mailman: Syntax error in
 /usr/local/etc/rc.d/mailman
Date: Tue, 14 Jun 2011 11:54:35 +0200

 --cNdxnHkX5QqsyA0e
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 Unluckily the last patch creates also other problems.
 
 First setting the MAIL_GID to nobody in postfix case will break
 integration. Especially for people having integration already configured
 this could be a problem, some advice in UPDATING could be of help to
 avoid surprises.
 
 A bigger problem is that the lines(in post-patch):
 
 # Disable username check in configure -- we promise to make the users!
         @${REINPLACE_CMD} \
                 -e 's#^MM_FIND_\([^_]*\)_NAME.*#MAILMAN_\1=$${\1NAME}#' \
                 ${WRKSRC}/configure.in
 
 Create a problem. Here the mailman binary gets created without the GID
 defined.
 
 That macro gets used to define various variables in configure.
 
 I'm attaching a patch which instead modifies the macro to blindly accept
 whatever values are passed to it instead of overriding it.
 
 The patch creates files/patch-configure.in.
 
 -- 
 Guido Falsi <mad@madpilot.net>
 
 --cNdxnHkX5QqsyA0e
 Content-Type: text/x-diff; charset=us-ascii
 Content-Disposition: attachment; filename="mm.diff"
 
 diff -ruN mailman.old/Makefile mailman/Makefile
 --- mailman.old/Makefile	2011-06-14 11:23:19.482461682 +0200
 +++ mailman/Makefile	2011-06-14 11:36:36.148014388 +0200
 @@ -154,10 +154,6 @@
  post-patch:
  	@${REINPLACE_CMD} -e 's#%%LOCALBASE%%#${LOCALBASE}#g' \
  	  ${WRKSRC}/Mailman/Defaults.py.in
 -# Disable username check in configure -- we promise to make the users!
 -	@${REINPLACE_CMD} \
 -		-e 's#^MM_FIND_\([^_]*\)_NAME.*#MAILMAN_\1=$${\1NAME}#' \
 -		${WRKSRC}/configure.in
  	@${SED} \
  	  -e 's#%%USER%%#${MM_USERNAME}#g' \
  	  -e 's#%%MAILMANDIR%%#${MAILMANDIR}#g' \
 diff -ruN mailman.old/files/patch-configure.in mailman/files/patch-configure.in
 --- mailman.old/files/patch-configure.in	1970-01-01 01:00:00.000000000 +0100
 +++ mailman/files/patch-configure.in	2011-06-14 11:39:14.446161292 +0200
 @@ -0,0 +1,70 @@
 +--- configure.in.old	2010-09-20 20:18:27.000000000 +0200
 ++++ configure.in	2011-06-14 11:38:38.442321110 +0200
 +@@ -308,31 +308,10 @@
 + # new macro for finding group names
 + AC_DEFUN([MM_FIND_GROUP_NAME], [
 + # $1 == variable name
 +-# $2 == user id to check for
 ++# $2 == user group name
 + AC_SUBST($1)
 + changequote(,)
 +-if test -z "$$1"
 +-then
 +-    cat > conftest.py <<EOF
 +-import grp
 +-gid = ''
 +-for group in "$2".split():
 +-    try:
 +-        try:
 +-            gname = grp.getgrgid(int(group))[0]
 +-            break
 +-        except ValueError:
 +-            gname = grp.getgrnam(group)[0]
 +-            break
 +-    except KeyError:
 +-        gname = ''
 +-fp = open("conftest.out", "w")
 +-fp.write("%s\n" % gname)
 +-fp.close()
 +-EOF
 +-    $PYTHON conftest.py
 +-    $1=`cat conftest.out`
 +-fi
 ++$1=$2
 + changequote([, ])
 + rm -f conftest.out conftest.py])
 + 
 +@@ -340,31 +319,10 @@
 + # new macro for finding UIDs
 + AC_DEFUN([MM_FIND_USER_NAME], [
 + # $1 == variable name
 +-# $2 == user id to check for
 ++# $2 == user name
 + AC_SUBST($1)
 + changequote(,)
 +-if test -z "$$1"
 +-then
 +-    cat > conftest.py <<EOF
 +-import pwd
 +-uid = ''
 +-for user in "$2".split():
 +-    try:
 +-        try:
 +-            uname = pwd.getpwuid(int(user))[0]
 +-            break
 +-        except ValueError:
 +-            uname = pwd.getpwnam(user)[0]
 +-            break
 +-    except KeyError:
 +-        uname = ''
 +-fp = open("conftest.out", "w")
 +-fp.write("%s\n" % uname)
 +-fp.close()
 +-EOF
 +-    $PYTHON conftest.py
 +-    $1=`cat conftest.out`
 +-fi
 ++$1=$2
 + changequote([, ])
 + rm -f conftest.out conftest.py])
 + 
 
 --cNdxnHkX5QqsyA0e--

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/157868: commit references a PR
Date: Tue, 14 Jun 2011 11:49:39 +0000 (UTC)

 wxs         2011-06-14 11:49:25 UTC
 
   FreeBSD ports repository
 
   Modified files:
     mail/mailman         Makefile 
     mail/mailman/files   mailman.in 
   Log:
   - Fix missing escapes in the rc script.
   
   PR:             ports/157868
   Submitted by:   Roland Behme <rb@nugman.de>
   
   Revision  Changes    Path
   1.89      +1 -1      ports/mail/mailman/Makefile
   1.5       +2 -2      ports/mail/mailman/files/mailman.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"
 
Responsible-Changed-From-To: wxs->crees 
Responsible-Changed-By: crees 
Responsible-Changed-When: Tue Jun 14 15:55:42 UTC 2011 
Responsible-Changed-Why:  
I'll take it. 

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

From: Chris Rees <crees@freebsd.org>
To: bug-followup@freebsd.org, Guido Falsi <mad@madpilot.net>
Cc:  
Subject: Re: ports/157868: mail/mailman: Possible problem with MAIL_GID
Date: Sat, 18 Jun 2011 12:57:47 +0000

 Hi,
 
 I've reverted the problem commit, but I will push forward with
 changing the method for creating users because the state of the port
 at the moment is unacceptable (fiddling with base files before install
 phase).
 
 Please would you give the attached patch to mailman a spin, and let me know?
 
 Madpilot, this is mostly your patch!
 
 Chris
 
 http://people.freebsd.org/~crees/patches/mailman-uids-fix.diff

From: Guido Falsi <mad@madpilot.net>
To: Chris Rees <crees@freebsd.org>
Cc: bug-followup@freebsd.org
Subject: Re: ports/157868: mail/mailman: Possible problem with MAIL_GID
Date: Mon, 20 Jun 2011 11:22:11 +0200

 On Sat, Jun 18, 2011 at 12:57:47PM +0000, Chris Rees wrote:
 > Hi,
 > 
 > I've reverted the problem commit, but I will push forward with
 > changing the method for creating users because the state of the port
 > at the moment is unacceptable (fiddling with base files before install
 > phase).
 > 
 > Please would you give the attached patch to mailman a spin, and let me know?
 > 
 > Madpilot, this is mostly your patch!
 
 Tested the patch, it works correctly. I'm happy my fix was useful :)
 
 This patch adds the need to manually add MAIL_GID to make.conf for
 people using postfix integration and maybe similar options for other
 MTAs. Perhaps it's better to mention this in UPDATING to avoid surprises
 to users.
 
 -- 
 Guido Falsi <mad@madpilot.net>

From: Chris Rees <crees@freebsd.org>
To: Guido Falsi <mad@madpilot.net>, ports@freebsd.org
Cc: bug-followup@freebsd.org
Subject: Re: ports/157868: mail/mailman: Possible problem with MAIL_GID
Date: Mon, 20 Jun 2011 10:30:58 +0100

 On 20 June 2011 10:22, Guido Falsi <mad@madpilot.net> wrote:
 > On Sat, Jun 18, 2011 at 12:57:47PM +0000, Chris Rees wrote:
 >> Hi,
 >>
 >> I've reverted the problem commit, but I will push forward with
 >> changing the method for creating users because the state of the port
 >> at the moment is unacceptable (fiddling with base files before install
 >> phase).
 >>
 >> Please would you give the attached patch to mailman a spin, and let me know?
 >>
 >> Madpilot, this is mostly your patch!
 >
 > Tested the patch, it works correctly. I'm happy my fix was useful :)
 >
 > This patch adds the need to manually add MAIL_GID to make.conf for
 > people using postfix integration and maybe similar options for other
 > MTAs. Perhaps it's better to mention this in UPDATING to avoid surprises
 > to users.
 >
 
 Hi,
 
 Bear in mind that I reverted the MAIL_GID=nobody change for postfix
 after huge amounts of hatemail... I'll remove that from this patch too
 -- is that what you meant?
 
 Chris
 
 Chris

From: Guido Falsi <mad@madpilot.net>
To: Chris Rees <crees@freebsd.org>
Cc: ports@freebsd.org, bug-followup@freebsd.org
Subject: Re: ports/157868: mail/mailman: Possible problem with MAIL_GID
Date: Mon, 20 Jun 2011 12:10:13 +0200

 On Mon, Jun 20, 2011 at 10:30:58AM +0100, Chris Rees wrote:
 > On 20 June 2011 10:22, Guido Falsi <mad@madpilot.net> wrote:
 > > On Sat, Jun 18, 2011 at 12:57:47PM +0000, Chris Rees wrote:
 > >> Hi,
 > >>
 > >> I've reverted the problem commit, but I will push forward with
 > >> changing the method for creating users because the state of the port
 > >> at the moment is unacceptable (fiddling with base files before install
 > >> phase).
 > >>
 > >> Please would you give the attached patch to mailman a spin, and let me know?
 > >>
 > >> Madpilot, this is mostly your patch!
 > >
 > > Tested the patch, it works correctly. I'm happy my fix was useful :)
 > >
 > > This patch adds the need to manually add MAIL_GID to make.conf for
 > > people using postfix integration and maybe similar options for other
 > > MTAs. Perhaps it's better to mention this in UPDATING to avoid surprises
 > > to users.
 > >
 > 
 > Hi,
 > 
 > Bear in mind that I reverted the MAIL_GID=nobody change for postfix
 > after huge amounts of hatemail... I'll remove that from this patch too
 > -- is that what you meant?
 
 I think that's a good solution. I'm sorry for the hatemail. I hope I
 wasn't that rude!
 
 -- 
 Guido Falsi <mad@madpilot.net>

From: Chris Rees <crees@freebsd.org>
To: Guido Falsi <mad@madpilot.net>
Cc: ports@freebsd.org, bug-followup@freebsd.org
Subject: Re: ports/157868: mail/mailman: Possible problem with MAIL_GID
Date: Mon, 20 Jun 2011 12:00:40 +0100

 On 20 June 2011 11:10, Guido Falsi <mad@madpilot.net> wrote:
 > On Mon, Jun 20, 2011 at 10:30:58AM +0100, Chris Rees wrote:
 >> On 20 June 2011 10:22, Guido Falsi <mad@madpilot.net> wrote:
 >> > On Sat, Jun 18, 2011 at 12:57:47PM +0000, Chris Rees wrote:
 >> >> Hi,
 >> >>
 >> >> I've reverted the problem commit, but I will push forward with
 >> >> changing the method for creating users because the state of the port
 >> >> at the moment is unacceptable (fiddling with base files before install
 >> >> phase).
 >> >>
 >> >> Please would you give the attached patch to mailman a spin, and let me know?
 >> >>
 >> >> Madpilot, this is mostly your patch!
 >> >
 >> > Tested the patch, it works correctly. I'm happy my fix was useful :)
 >> >
 >> > This patch adds the need to manually add MAIL_GID to make.conf for
 >> > people using postfix integration and maybe similar options for other
 >> > MTAs. Perhaps it's better to mention this in UPDATING to avoid surprises
 >> > to users.
 >> >
 >>
 >> Hi,
 >>
 >> Bear in mind that I reverted the MAIL_GID=nobody change for postfix
 >> after huge amounts of hatemail... I'll remove that from this patch too
 >> -- is that what you meant?
 >
 > I think that's a good solution. I'm sorry for the hatemail. I hope I
 > wasn't that rude!
 
 No serious rudeness from anyone, and anything coming my way was fully
 deserved :)
 
 Chris
State-Changed-From-To: open->closed 
State-Changed-By: crees 
State-Changed-When: Tue Jun 21 16:01:13 UTC 2011 
State-Changed-Why:  
Committed. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/157868: commit references a PR
Date: Tue, 21 Jun 2011 16:01:01 +0000 (UTC)

 crees       2011-06-21 16:00:53 UTC
 
   FreeBSD ports repository
 
   Modified files:
     mail/mailman         Makefile pkg-deinstall pkg-install 
                          pkg-plist 
   Added files:
     mail/mailman/files   patch-configure-in 
   Log:
   Let's try this one again.
   - Stop touching files outside WRKDIR before install
   - Use USERS and GROUPS -- this time via patch [1]
   - Change BROKEN to IGNORE fo incorrect OPTIONS choices
   - Use @stopdaemon
   
   PR:             ports/157868
   Submitted by:   Guido Falsi <mad@madpilot.net>
   Approved by:    rene (mentor)
   
   Revision  Changes    Path
   1.91      +16 -26    ports/mail/mailman/Makefile
   1.1       +70 -0     ports/mail/mailman/files/patch-configure-in (new)
   1.14      +1 -9      ports/mail/mailman/pkg-deinstall
   1.11      +3 -41     ports/mail/mailman/pkg-install
   1.43      +2 -1      ports/mail/mailman/pkg-plist
 _______________________________________________
 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:
