Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 212547

Summary: mailman-2.1.9-r3 not fully honoring VAR_PREFIX
Product: Gentoo Linux Reporter: Lindsay Haisley <fmouse-gentoo>
Component: [OLD] ServerAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch to ~mailman/bin/paths.py
Patch to ~mailman/bin/update
patch to check_perms_grsecurity.py

Description Lindsay Haisley 2008-03-06 23:46:41 UTC
There seems to be a small problem with Mailman confusing PREFIX with VAR_PREFIX at some point in the Mailman code.  After upgrading to 2.1.9-r3 (and breaking and mostly fixing my customers' list installations) I got errors in my mail logs such as the following  on attempted posts to lists:

Mar  6 01:19:24 shakti courierlocal: id=000000000015F4AC.0000000047CF9AFC.00003BEB,from=<fmouse@fmp.com>,addr=<lupe@moco
verde.org>: exceptions.OSError [Errno 2] No such file or directory: '/usr/lib64/mailman/lists'
Mar  6 01:19:24 shakti courierlocal: id=000000000015F4AC.0000000047CF9AFC.00003BEB,from=<fmouse@fmp.com>,addr=<lupe@moco
verde.org>: Line 112
Mar  6 01:19:24 shakti courierlocal: id=000000000015F4AC.0000000047CF9AFC.00003BEB,from=<fmouse@fmp.com>,addr=<lupe@moco
verde.org>,status: deferred

Line 112 in one of the Mailman files is apparently generating a python exception trying to access '/usr/lib64/mailman/lists'.  This can be worked around with a symlink, which is what I've resorted to, but this shouldn't be necessary.

Defaults.py correctly assigns PREFIX and VAR_PREFIX:

PREFIX          = '/usr/lib64/mailman'
VAR_PREFIX      = '/var/lib/mailman'

... and

LIST_DATA_DIR   = os.path.join(VAR_PREFIX, 'lists')

Grepping for other possible code errors turns up nothing obvious, except for the  bin/update script which declares that 'list_dir = os.path.join(mm_cfg.PREFIX, "lists")' which needs to be fixed, but should have no bearing on this bug.

Other parts of Mailman correctly access files in VAR_PREFIX (logs, archives), so it's not obvious what's going on here.
Comment 1 Lindsay Haisley 2008-03-06 23:59:15 UTC
Splitting PREFIX and VAR_PREFIX breaks a couple of scripts in ~mailman/bin.  I'm adding a couple of patches to address this.  Since it appears that these may be processed through autoconf the patches may need to be massaged and applied to files in the ebuild.  These are against the installed files in ~mailman/bin.
Comment 2 Lindsay Haisley 2008-03-07 00:04:00 UTC
Created attachment 145443 [details, diff]
Patch to ~mailman/bin/paths.py

Adds var_prefix to paths, which is imported elsewhere.
Comment 3 Lindsay Haisley 2008-03-07 00:11:23 UTC
Created attachment 145444 [details, diff]
Patch to ~mailman/bin/update
Comment 4 Lindsay Haisley 2008-03-07 00:18:46 UTC
Created attachment 145445 [details, diff]
patch to check_perms_grsecurity.py

Requires provided patch to ~mailman/bin/paths.py
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2008-03-07 04:19:16 UTC

*** This bug has been marked as a duplicate of bug 212462 ***