Mailman 2.1: hardcoded site-packages dir prefix doesn't work on some 64 bit filesystem layouts
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Mailman |
Fix Released
|
Low
|
Mark Sapiro | ||
mailman (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Mailman's paths.py.in contains code to add the python site-packages dir to the path. This uses a hardcoded "lib" prefix:
# Include Python's site-packages directory.
sitedir = os.path.
sys.path.
On 64 bit systems this is usually lib64 and some distros started removing the compatibility symlink lib->lib64 and split up lib and lib64 (e.g. latest Gentoo profiles). So relying on "lib" as a prefix is not compatible any more.
Python has a function getsitepackages in the site module and I believe it's best to rely on python knowing best where its directories are. It returns an array, so this would look like this:
sitedirs = site.getsitepac
for sitedir in sitedirs:
sys.
Patch attached, please apply.
Related branches
Changed in mailman: | |
assignee: | nobody → Mark Sapiro (msapiro) |
importance: | Undecided → Low |
milestone: | none → 2.1.30 |
status: | New → Fix Committed |
Changed in mailman: | |
status: | Fix Committed → Confirmed |
status: | Confirmed → Fix Committed |
affects: | ubuntu → mailman (Ubuntu) |
Changed in mailman: | |
status: | Fix Committed → Fix Released |
I appreciate the patch. Thank you.
One issue is that site.getsitepac kages() requires Python 2.7. It is probably time to stop supporting older versions anyway, so this shouldn't be a problem.