Mailman configuration script causes syntax error in "/var/lib/mailman/Mailman/mm_cfg.py", line 76

Bug #904410 reported by Ben Johnson
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
mailman (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

# lsb_release -rd
Description: Ubuntu 10.04.2 LTS
Release: 10.04

# apt-cache policy mailman
mailman:
  Installed: 1:2.1.13-1ubuntu0.2
  Candidate: 1:2.1.13-1ubuntu0.2
  Version table:
 *** 1:2.1.13-1ubuntu0.2 0
        500 http://us.archive.ubuntu.com/ubuntu/ lucid-updates/main Packages
        500 http://us.archive.ubuntu.com/ubuntu/ lucid-security/main Packages
        100 /var/lib/dpkg/status
     1:2.1.13-1 0
        500 http://us.archive.ubuntu.com/ubuntu/ lucid/main Packages

The problem is that the Mailman configuration script that is included with the package fails to insert the default Mailman language string into "/var/lib/mailman/Mailman/mm_cfg.py", line 76, which causes a syntax error. This syntax error makes it impossible to work with the package (reinstall, remove, etc.), because every attempted operation chokes.

Here is the full log of the terminal output:

-------------------------------------
# apt-get install mailman
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  wwwconfig-common javascript-common libjs-mootools
Use 'apt-get autoremove' to remove them.
Suggested packages:
  listadmin
The following NEW packages will be installed:
  mailman
0 upgraded, 1 newly installed, 0 to remove and 14 not upgraded.
Need to get 9677kB of archives.
After this operation, 44.9MB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ lucid-updates/main mailman 1:2.1.13-1ubuntu0.2 [9677kB]
Fetched 9677kB in 1s (5759kB/s)
Preconfiguring packages ...
Selecting previously deselected package mailman.
(Reading database ... 59028 files and directories currently installed.)
Unpacking mailman (from .../mailman_1%3a2.1.13-1ubuntu0.2_amd64.deb) ...
Setting up mailman (1:2.1.13-1ubuntu0.2) ...
Looking for enabled languages (this may take some time) ... done.
Traceback (most recent call last):
  File "/var/lib/mailman/bin/list_lists", line 46, in <module>
    from Mailman import mm_cfg
  File "/var/lib/mailman/Mailman/mm_cfg.py", line 76
    DEFAULT_SERVER_LANGUAGE =
                             ^
SyntaxError: invalid syntax
Installing site language en ............................................ done.
Traceback (most recent call last):
  File "/usr/lib/mailman/bin/update", line 49, in <module>
    from Mailman import mm_cfg
  File "/var/lib/mailman/Mailman/mm_cfg.py", line 76
    DEFAULT_SERVER_LANGUAGE =
                             ^
SyntaxError: invalid syntax
dpkg: error processing mailman (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 mailman
E: Sub-process /usr/bin/dpkg returned an error code (1)

-------------------------------------

If I examine the file and line cited in the error message, there is no value for DEFAULT_SERVER_LANGUAGE:

#-------------------------------------------------------------
# The default language for this server.
DEFAULT_SERVER_LANGUAGE =

This is despite the fact that I chose a valid language (English) from the list that is presented during installation by highlighting said language and pressing the spacebar. (The selection is evidenced by the * character next to the English option.)

The only means by which I was able to remove the package was to fix problem by editing "/var/lib/mailman/Mailman/mm_cfg.py" directly and changing the line in question to:

DEFAULT_SERVER_LANGUAGE = 'en'

Dave Walker (davewalker)
Changed in mailman (Ubuntu):
importance: Undecided → Medium
Revision history for this message
doekia (doekia) wrote :

Is there any progress regarding this "major" issue, since mailman cannot be installed on Lucid LTS?

Revision history for this message
Robie Basak (racb) wrote :

Failed to reproduce on Ubuntu 10.04.4 using a fresh cloud image. "apt-get install mailman" completed successfully. I specified English (only) in response to the debconf prompt, and my /var/lib/mailman/Mailman/mm_cfg.py now contains DEFAULT_SERVER_LANGUAGE = 'en'.

Revision history for this message
Ben Johnson (a03-6eo-chg) wrote :

Robie, if you will, what is the output of "apt-cache policy mailman" on your system?

Revision history for this message
Robie Basak (racb) wrote :

@Ben:

ubuntu@server-7616:~$ dpkg-query -W mailman
mailman 1:2.1.13-1ubuntu0.2

ubuntu@server-7616:~$ apt-cache policy mailman
mailman:
  Installed: 1:2.1.13-1ubuntu0.2
  Candidate: 1:2.1.13-1ubuntu0.2
  Version table:
 *** 1:2.1.13-1ubuntu0.2 0
        500 http://archive.ubuntu.com/ubuntu/ lucid-updates/main Packages
        500 http://security.ubuntu.com/ubuntu/ lucid-security/main Packages
        100 /var/lib/dpkg/status
     1:2.1.13-1 0
        500 http://archive.ubuntu.com/ubuntu/ lucid/main Packages

Revision history for this message
Ben Johnson (a03-6eo-chg) wrote :

Thanks, Robie. Given that your package version is identical to that contained in the initial report, further research seems warranted.

Perhaps the package installation script attempts to obtain locale information from the operating system in order to populate the DEFAULT_SERVER_LANGUAGE value in the configuration file, which may explain why this problem affects some people and not others.

Revision history for this message
Jeff (0cs935kb517wwmwa7m9428daadkyev88f-mail-wz6bkyhu4uqpfausw0ege9b0y33ege6o4) wrote :

Any way to fix this for now? Having the same issue

Revision history for this message
Jeff (0cs935kb517wwmwa7m9428daadkyev88f-mail-wz6bkyhu4uqpfausw0ege9b0y33ege6o4) wrote :

Sorry, my version as well

mailman:
  Installed: 1:2.1.14-3
  Candidate: 1:2.1.14-3
  Version table:
 *** 1:2.1.14-3 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/main i386 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Ben Johnson (a03-6eo-chg) wrote :

@Jeff:

The workaround is contained at the bottom of the initial report:

The only means by which I was able to remove the package was to fix problem by editing "/var/lib/mailman/Mailman/mm_cfg.py" directly and changing the line in question to:

DEFAULT_SERVER_LANGUAGE = 'en'

Revision history for this message
Jeff (0cs935kb517wwmwa7m9428daadkyev88f-mail-wz6bkyhu4uqpfausw0ege9b0y33ege6o4) wrote :

Oops, did not spot that. Thanks for your help!

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mailman (Ubuntu):
status: New → Confirmed
Revision history for this message
Robie Basak (racb) wrote :

I've now seen three reports of this issue, so marking as Confirmed.

Revision history for this message
Robie Basak (racb) wrote :

Would the next person affected by this bug please list the output for each of the following commands before applying the workaround?

debconf-show mailman
stat /etc/mailman
stat /etc/mailman/mm_cfg.py
stat /var/lib/mailman/Mailman/mm_cfg.py
grep DEFAULT_SERVER_LANGUAGE /etc/mailman/mm_cfg.py
grep DEFAULT_SERVER_LANGUAGE /var/lib/mailman/Mailman/mm_cfg.py

Revision history for this message
Tom Hanifin (zenbuddha77) wrote :

Robie, here is the output of what you asked for:

root@Ubuntu-12:/home/tom# debconf-show mailman
  mailman/queue_files_present: abort installation
* mailman/default_server_language: en
* mailman/site_languages: en
* mailman/used_languages:
* mailman/create_site_list:

root@Ubuntu-12:/home/tom# stat /etc/mailman
  File: `/etc/mailman'
  Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 801h/2049d Inode: 9437691 Links: 3
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2012-09-30 21:12:28.919605766 -0400
Modify: 2012-09-30 21:12:31.935672994 -0400
Change: 2012-09-30 21:12:31.935672994 -0400
 Birth: -

root@Ubuntu-12:/home/tom# stat /etc/mailman/mm_cfg.py
  File: `/etc/mailman/mm_cfg.py'
  Size: 4371 Blocks: 16 IO Block: 4096 regular file
Device: 801h/2049d Inode: 9438281 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2012-09-30 21:12:31.975673885 -0400
Modify: 2012-09-30 21:19:05.364426238 -0400
Change: 2012-09-30 21:19:05.364426238 -0400
 Birth: -

root@Ubuntu-12:/home/tom# stat /var/lib/mailman/Mailman/mm_cfg.py
  File: `/var/lib/mailman/Mailman/mm_cfg.py' -> `/etc/mailman/mm_cfg.py'
  Size: 22 Blocks: 0 IO Block: 4096 symbolic link
Device: 801h/2049d Inode: 8264873 Links: 1
Access: (0777/lrwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2012-09-30 08:00:01.671370480 -0400
Modify: 2012-07-17 13:45:53.000000000 -0400
Change: 2012-09-19 01:30:21.539650246 -0400
 Birth: -

root@Ubuntu-12:/home/tom# grep DEFAULT_SERVER_LANGUAGE /etc/mailman/mm_cfg.py
DEFAULT_SERVER_LANGUAGE = 'en'
root@Ubuntu-12:/home/tom# grep DEFAULT_SERVER_LANGUAGE /var/lib/mailman/Mailman/mm_cfg.py
DEFAULT_SERVER_LANGUAGE = 'en'
root@Ubuntu-12:/home/tom#

Hope it helps.
Tom

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.