Bug 8067 - mailman systemd service doesn't reference 64-bit paths
Summary: mailman systemd service doesn't reference 64-bit paths
Status: RESOLVED OLD
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 2
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Remco Rijnders
QA Contact:
URL:
Whiteboard: has_procedure
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-13 14:47 CET by Daniel McDonald
Modified: 2013-11-22 23:01 CET (History)
6 users (show)

See Also:
Source RPM: mailman-2.1.13-9.mga2.src.rpm
CVE:
Status comment:


Attachments

Description Daniel McDonald 2012-11-13 14:47:55 CET
Description of problem:
/lib/systemd/system/mailman.service provided by the 64-bit RPM refers to the 32-bit paths.  As a consequence, the mailman service is not able to start.

There is also no mailman-update-cfg script in the supplied RPM.  That file is also referenced in the systemd service file.

Version-Release number of selected component (if applicable):
2.1.13-9

How reproducible:
Every Time

Steps to Reproduce:
1. install Mageia 2 as 64-bit OS
2. install mailman rpm
3. service mailman start
4. observe failures

Steps to fix:
Change references to /usr/lib/mailman to /usr/lib64/mailman
comment out the lines referencing mailman-update-cfg
service mailman start
Remco Rijnders 2012-11-13 14:54:06 CET

CC: (none) => remco

Comment 1 Luca Olivetti 2012-12-18 12:12:02 CET
In the same file there's also this line

ExecStartPre=/bin/chown mailman:mailman /var/log/mailman/error


but

1) the rpm doesn't create a mailman user/group, because...
2) the rpm configures mailman to run as mail/mail

so the line has to be changed to

ExecStartPre=/bin/chown mail:mail /var/log/mailman/error


BTW: I don't understand why those file are under /usr/lib64 since they are all architecture independent.

CC: (none) => luca

Comment 2 Remco Rijnders 2012-12-23 17:26:30 CET
@qa: Please test the updated package mailman-2.1.13-10.mga2 which should address the issues as identified by Daniel and Luca. The changes I've made address the following issues:

"The systemd unit file as shipped would not work for several reasons:

- mailman-update-cfg was called which is not shipped by us;
- ownership of logfiles was set to mailman instead of mail;
- on x86_64 it referred to /usr/lib instead of /usr/lib64"

With the updated package, "service mailman start" should work on both architectures.

@luca: I am also not sure why some of these files are under /usr/lib64, but rather than break things further, I left that "as is" for now.

CC: (none) => mageia
Assignee: bugsquad => qa-bugs

Comment 3 claire robinson 2013-01-02 18:44:13 CET
Daniel & Luca can you please confirm the packages in core/updates_testing work ok for you.

Thanks!
Comment 4 Daniel McDonald 2013-01-02 23:20:05 CET
Appears to work fine on my system:
[dmcdonald@ns1 ~]$ rpm -V mailman 
S.5...GT.  c /etc/mailman
S.5....T.    /usr/lib64/mailman/Mailman/mm_cfg.pyc
Comment 5 claire robinson 2013-01-09 17:11:40 CET
SRPM: mailman-2.1.13-10.mga2.src.rpm
------------------------------------
mailman

Testing mga2 64

Before
------
# urpmi mailman

lots of errors

warning: %post(mailman-2.1.13-9.mga2.x86_64) scriptlet failed, exit status 1

# service mailman start
# tail /var/log/syslog

(date-cfg)[21108]: Failed at step EXEC spawning /usr/bin/mailman-update-cfg: No such file or directory
systemd[1]: mailman.service: control process exited, code=exited status=203
systemd[1]: Unit mailman.service entered failed state.

# ll -d /var/log/mailman
drwxrwsr-x 2 mail mail 4096 Jan  9 15:50 /var/log/mailman/
# ll /var/log/mailman/error
-rw-rw-r-- 1 mail mail 0 Jan  9 15:50 /var/log/mailman/error

So logs already owned by 'mail' user.


After
-----
No errors but..
'Migrating sysvinit service 'mailman' to systemd native unit 'mailman.service' via systemd install rules.'

Logs are still owned by 'mail'

# service mailman start
Starting mailman (via systemctl):  Job failed. See system journal and 'systemctl status' for details.

# systemctl status mailman.service
mailman.service - GNU Mailing List Manager
          Loaded: loaded (/lib/systemd/system/mailman.service; enabled)
          Active: failed (Result: exit-code) since Wed, 09 Jan 2013 16:00:06 +0000; 55s ago
         Process: 23374 ExecStart=/usr/lib64/mailman/bin/mailmanctl -s start (code=exited, status=1/FAILURE)
         Process: 23372 ExecStartPre=/bin/chmod 660 /var/log/mailman/error (code=exited, status=0/SUCCESS)
         Process: 23370 ExecStartPre=/bin/chown mail:mail /var/log/mailman/error (code=exited, status=0/SUCCESS)
         Process: 23368 ExecStartPre=/bin/touch /var/log/mailman/error (code=exited, status=0/SUCCESS)
         Process: 23365 ExecStartPre=/usr/bin/install -m644 -o root -g root /usr/lib64/mailman/cron/crontab.in /etc/cron.d/mailman (code=exited, status=0/SUCCESS)
          CGroup: name=systemd:/system/mailman.service

Jan 09 16:00:06 mega mailmanctl[23374]: Site list is missing: mailman


Fails at the ExecStart. Is this a problem or is it just missing some configuration?
claire robinson 2013-01-09 17:39:14 CET

Whiteboard: (none) => has_procedure feedback

Comment 6 Colin Guthrie 2013-01-09 18:29:04 CET
(In reply to comment #5)
> Jan 09 16:00:06 mega mailmanctl[23374]: Site list is missing: mailman
> 
> 
> Fails at the ExecStart. Is this a problem or is it just missing some
> configuration?

I'm not a mailman expert but from the looks of the error it would appear to be an "expected" failure - i.e. what happens when you've not configured any mailing lists (or "sites" as they appear to call them). Hopefully someone more versed in mailman can confirm.
Comment 7 claire robinson 2013-01-11 14:21:31 CET
Thanks Colin, I suspected as much.

Remco anything to add?

Whiteboard: has_procedure feedback => has_procedure

Comment 8 Luca Olivetti 2013-01-13 16:01:58 CET
I haven't had a chance to test the updated package (and I won't for a while, sorry), but the previous one created the mailman list in postinstall, so the service should start right out of the box.
Comment 9 claire robinson 2013-01-15 01:44:42 CET
Remmy, pinging for this one please. Sorry. Thanks.

Whiteboard: has_procedure => has_procedure feedback

Comment 10 Remco Rijnders 2013-01-15 07:33:07 CET
@MrsB: No problem, though I probably won't be able to look into this before the weekend I fear. I'll have a look at the postinstall to see where it goes wrong.
Comment 11 claire robinson 2013-01-15 10:12:22 CET
Thanks Remco. There is no rush, just trying to assess whether it should be validated or not. 

I'll assign it back to you for now. Please reassign to QA when you've had a chance to look at it.

CC: (none) => qa-bugs
Assignee: qa-bugs => remco
Whiteboard: has_procedure feedback => has_procedure

Comment 12 Remco Rijnders 2013-01-20 07:13:37 CET
@MrsB: I have reproduced the problem on my VM, it works as is on my main machine. I've tracked it down to the post install script trying to create the needed mailman list. If your machine has no FQDN, the newlist command will fail, not accepting mailman@localdomain as a valid list address.

Setting the machines domainname properly before installing mailman should result in a working installation.

As this is no regression from before, and as people wanting to install mailman will probably (hopefully) have configured their hostname properly already to handle mail on their machine, I'd like to hand this back to QA for testing as is.

I'll put an item to handle this more gracefully on my to do list.

Assignee: remco => qa-bugs

Comment 13 claire robinson 2013-01-20 18:15:52 CET
Thanks Remco. I've created bug 8759 for the fqdn issue.
Comment 14 Bit Twister 2013-01-21 07:31:35 CET
(In reply to comment #12)

> Setting the machines domainname properly before installing mailman should
> result in a working installation.

Take a clean install example: mailman is going to be installed. Problem is we do not get to change/set FQDN until Summary configuration screen shows up, later. :(

Why not set a default FQDN at start of install, maybe
127.0.0.1 mageia.home.test mageia

Just like localhost, *.test is barred from getting on the WAN.
http://www.rfc-editor.org/rfc/rfc2606.txt

.test will allow software to run locally, .example might not, .invalid might scare newbies into changing it to something already on the Internet. :(

CC: (none) => junk_no_spam

Comment 15 claire robinson 2013-02-03 16:54:45 CET
Adding marker from previous testing

Whiteboard: has_procedure => has_procedure mga2-64-OK

Comment 16 claire robinson 2013-02-05 19:00:30 CET
Can anybody verify this fix on Mageia 2 i586 please, it can then be validated and pushed to updates.
Comment 17 claire robinson 2013-02-05 19:07:47 CET
I know. I realised it's an x86_64 fix as soon as I clicked Submit. (It's been a long day :\)

It does need testing i586 before it can be pushed to updates though please.
Comment 18 Dave Hodgins 2013-02-06 04:53:26 CET
When I try to create a mailing list, it's failing with
Illegal list name: qatest@localhost

$ tail -n 4 /etc/mailman
DEFAULT_EMAIL_HOST = 'i2v.hodgins.homeip.net'
DEFAULT_URL_HOST = 'i2v.hodgins.homeip.net'
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)

CC: (none) => davidwhodgins

Comment 19 Remco Rijnders 2013-02-06 04:56:47 CET
(In reply to comment #18)
> When I try to create a mailing list, it's failing with
> Illegal list name: qatest@localhost
> 
> $ tail -n 4 /etc/mailman
> DEFAULT_EMAIL_HOST = 'i2v.hodgins.homeip.net'
> DEFAULT_URL_HOST = 'i2v.hodgins.homeip.net'
> add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)

Hi Dave, I think that's bug #8759 and not a regression from the existing package. What is your 'hostname' on that machine prior to installing the mailman package?

Thanks!
Comment 20 Dave Hodgins 2013-02-06 05:09:12 CET
$ hostname
i2v.hodgins.homeip.net

Note that I entered qatest as the listname, not qatest@localhost.
Comment 21 Dave Hodgins 2013-02-06 05:24:45 CET
Figured that part out.  I was using http://localhost/mailman, not
http://i2v.hodgins.homeip.net/mailman.

With the latter, when I try to add a list it fails with the following
error in /var/log/mailman/error ...
admin(6617): OSError: [Errno 13] Permission denied: '/var/lib/mailman/archives/private

 ll -d /var/lib/mailman/archives/private/
drwxr-s--- 4 mail apache 4096 Feb  5 22:19 /var/lib/mailman/archives/private//

The group does not have write access to the directory.
claire robinson 2013-02-06 12:04:19 CET

Whiteboard: has_procedure mga2-64-OK => has_procedure mga2-64-OK feedback

Comment 22 claire robinson 2013-02-12 15:02:20 CET
Assigning Remco. Could you please see comment 21.

Please reassign to QA when you've had a chance.

Thanks!

Whiteboard: has_procedure mga2-64-OK feedback => has_procedure mga2-64-OK
Assignee: qa-bugs => remco

Comment 23 Remco Rijnders 2013-06-23 19:17:35 CEST
Dave, can you retest with mailman-2.1.13-10.1.mga2 please?

Assignee: remco => qa-bugs

Comment 24 claire robinson 2013-07-03 17:15:09 CEST
Testing complete mga2 32

Set hostname to a fqdn before installing and added it to /etc/hosts. Started httpd and mail services and found the web interface at http://the.fqnd/mailman

# /usr/lib/mailman/bin/newlist --quiet test eeeemail@gmail.com
Initial test password:
To finish creating your mailing list, you must edit your /etc/aliases (or
equivalent) file by adding the following lines, and possibly running the
`newaliases' program:

## test mailing list
test:              "|/usr/lib/mailman/mail/mailman post test"
test-admin:        "|/usr/lib/mailman/mail/mailman admin test"
test-bounces:      "|/usr/lib/mailman/mail/mailman bounces test"
test-confirm:      "|/usr/lib/mailman/mail/mailman confirm test"
test-join:         "|/usr/lib/mailman/mail/mailman join test"
test-leave:        "|/usr/lib/mailman/mail/mailman leave test"
test-owner:        "|/usr/lib/mailman/mail/mailman owner test"
test-request:      "|/usr/lib/mailman/mail/mailman request test"
test-subscribe:    "|/usr/lib/mailman/mail/mailman subscribe test"
test-unsubscribe:  "|/usr/lib/mailman/mail/mailman unsubscribe test"

Found the new list listed at http://the.fqdn/mailman/listinfo.cgi

I don't have postfix configured so ignored the aliases but this should be enough to show it now installs properly and does what it's meant to do.

Logs are still owned by mail:mail

# ll -d /var/log/mailman
drwxrwsr-x 2 mail mail 4096 Jul  3 15:21 /var/log/mailman/

# ll /var/log/mailman
total 24
-rw-rw---- 1 mail mail    0 Jul  3 16:08 error
-rw-rw-r-- 1 mail mail  153 Jul  3 16:08 gpg
-rw-rw-r-- 1 mail mail  516 Jul  3 16:08 post
-rw-rw-r-- 1 mail mail 5887 Jul  3 16:08 qrunner
-rw-rw-r-- 1 mail mail  420 Jul  3 16:08 smtp
-rw-rw-r-- 1 mail mail  801 Jul  3 16:08 smtp-failure

Whiteboard: has_procedure mga2-64-OK => has_procedure mga2-32-ok

Comment 25 claire robinson 2013-07-03 17:29:32 CEST
Spoke too soon. There are errors when removing it Remco.

removing package mailman-2.1.13-10.1.mga2.i586
warning: /etc/mailman saved as /etc/mailman.rpmsave
sed: -e expression #1, char 44: expected newer version of sed
/etc/aliases: line 37: :include:   /var/lib/mailman/data/aliase... illegal alias name
/etc/aliases: 14 aliases, longest 10 bytes, 152 bytes total
warning: %postun(mailman-2.1.13-10.1.mga2.i586) scriptlet failed, exit status 70

Whiteboard: has_procedure mga2-32-ok => has_procedure feedback

Comment 26 claire robinson 2013-07-15 18:18:45 CEST
Assigning back Remco. Please re-assign to QA when you've had a chance to take a look.

Thanks!

Whiteboard: has_procedure feedback => has_procedure
Assignee: qa-bugs => remco

Comment 27 Manuel Hiebel 2013-11-22 23:01:45 CET
Mageia 2 changed to end-of-life (EOL) status on ''22 November''. Mageia 2 is no
longer maintained, which means that it will not receive any further security or
bug fix updates. As a result, as this bug should be fixed in mga3, an as this update was validated we are closing it.

--
The Mageia Bugsquad

Resolution: (none) => OLD
Status: NEW => RESOLVED


Note You need to log in before you can comment on or make changes to this bug.