Bug 157868

Summary: mail/mailman: Possible problem with MAIL_GID
Product: Ports & Packages Reporter: Roland Behme <rb>
Component: Individual Port(s)Assignee: Chris Rees <crees>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
mm.diff none

Description Roland Behme 2011-06-14 08:10:07 UTC
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 "}")

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}\)
}
How-To-Repeat: run '/usr/local/etc/rc.d/mailman [start|stop]'
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2011-06-14 08:13:24 UTC
Responsible Changed
From-To: freebsd-ports-bugs->wxs

Fix synopsis and assign.
Comment 2 Guido Falsi freebsd_committer freebsd_triage 2011-06-14 10:54:35 UTC
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>
Comment 3 dfilter service freebsd_committer freebsd_triage 2011-06-14 12:49:39 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"
Comment 4 Chris Rees freebsd_committer freebsd_triage 2011-06-14 16:55:42 UTC
Responsible Changed
From-To: wxs->crees

I'll take it.
Comment 5 Chris Rees freebsd_committer freebsd_triage 2011-06-18 13:57:47 UTC
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
Comment 6 Guido Falsi freebsd_committer freebsd_triage 2011-06-20 10:22:11 UTC
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>
Comment 7 Chris Rees freebsd_committer freebsd_triage 2011-06-20 10:30:58 UTC
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
Comment 8 Guido Falsi freebsd_committer freebsd_triage 2011-06-20 11:10:13 UTC
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>
Comment 9 Chris Rees freebsd_committer freebsd_triage 2011-06-20 12:00:40 UTC
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
Comment 10 dfilter service freebsd_committer freebsd_triage 2011-06-21 17:01:01 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"
Comment 11 Chris Rees freebsd_committer freebsd_triage 2011-06-21 17:01:13 UTC
State Changed
From-To: open->closed

Committed. Thanks!