Bug 274991 - mail/mailman: 2.1.39_2 fails to start: KeyError: 'getgrnam(): name not found: '
Summary: mail/mailman: 2.1.39_2 fails to start: KeyError: 'getgrnam(): name not found: '
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Matthias Andree
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2023-11-09 15:26 UTC by Dan Langille
Modified: 2023-11-12 00:37 UTC (History)
2 users (show)

See Also:
mandree: maintainer-feedback+


Attachments
patch (605 bytes, patch)
2023-11-10 00:38 UTC, Craig Leres
mandree: maintainer-approval-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Langille freebsd_committer freebsd_triage 2023-11-09 15:26:27 UTC
I updated today: Nov  9 13:23:13 mailman pkg[92518]: mailman upgraded: 2.1.39_1 -> 2.1.39_2 

I get this error:

[15:18 mailman dan ~] % sudo service mailman start 
Fixing mailman permissions:
Traceback (most recent call last):
  File "/usr/local/mailman/bin/check_perms", line 51, in <module>
    MAILMAN_GID = grp.getgrnam(MAILMAN_GROUP)[2]
KeyError: 'getgrnam(): name not found: '
Starting mailman.
Traceback (most recent call last):
  File "/usr/local/mailman/bin/mailmanctl", line 556, in <module>
    main()
  File "/usr/local/mailman/bin/mailmanctl", line 342, in main
    check_privs()
  File "/usr/local/mailman/bin/mailmanctl", line 289, in check_privs
    gid = grp.getgrnam(mm_cfg.MAILMAN_GROUP)[2]
KeyError: 'getgrnam(): name not found: '
/usr/local/etc/rc.d/mailman: WARNING: failed to start mailman


Reverting to 2.1.39_1 allows mailman to start.

FreeBSD 13.2-RELEASE-p4
Comment 1 Dan Langille freebsd_committer freebsd_triage 2023-11-09 16:25:38 UTC
[16:25 mailman dan ~] % grep mailman /etc/passwd
mailman:*:91:91:Mailman User:/usr/local/mailman:/usr/sbin/nologin

[16:25 mailman dan ~] % grep mailman /etc/group 
mailman:*:91:
Comment 2 Craig Leres freebsd_committer freebsd_triage 2023-11-10 00:38:10 UTC
Created attachment 246224 [details]
patch

As per my message to ports-committers@freebsd.org, the problem is that there is a patch that modifies configure.in so USES=autoreconf needs to be put back. Otherwise mailman/Mailman/Defaults.py ends up with MAILMAN_USER and MAILMAN_GROUP defined to empty strings...

Here's a patch that fixes this.
Comment 3 Matthias Andree freebsd_committer freebsd_triage 2023-11-10 01:33:06 UTC
I have something better coming up that does not require reinstating autoreconf.
Comment 4 commit-hook freebsd_committer freebsd_triage 2023-11-10 01:35:06 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=12264aff0819e4e49ab4690c70c01e64c9c496f8

commit 12264aff0819e4e49ab4690c70c01e64c9c496f8
Author:     Matthias Andree <mandree@FreeBSD.org>
AuthorDate: 2023-11-10 01:31:22 +0000
Commit:     Matthias Andree <mandree@FreeBSD.org>
CommitDate: 2023-11-10 01:34:02 +0000

    mail/mailman: fix empty group/user name regression in 2.1.39_2

    ...and drop files/patch-configure-in, which is no longer needed;
    neither is autoreconf needed to be reinstated.

    We can cheat the test -z "$VAR" inside the MM_FIND_{GROUP,USER}...
    configure[.in] macros by putting the proper contents into the
    proper environment variables.

    To fix the regression in...
    PR:             274991
    Reported by:    leres@

 mail/mailman/Makefile                        |  8 +++-
 mail/mailman/files/patch-configure-in (gone) | 67 ----------------------------
 2 files changed, 7 insertions(+), 68 deletions(-)
Comment 5 Matthias Andree freebsd_committer freebsd_triage 2023-11-10 01:35:26 UTC
Dan, Craig reported this first by e-mail, that's why his name is in the Reported by: field.
Comment 6 Dan Langille freebsd_committer freebsd_triage 2023-11-12 00:37:00 UTC
(In reply to Matthias Andree from comment #5)
No worries.

Confirmed working here. Thank you.