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

Bug 761763

Summary: sysusers.d configuration provided by sys-apps/systemd conflicts with acct-group/* and acct-user/*
Product: Gentoo Linux Reporter: Garry Filakhtov <filakhtov>
Component: Current packagesAssignee: Gentoo systemd Team <systemd>
Status: RESOLVED FIXED    
Severity: normal CC: alexander, crabbedhaloablution, sam
Priority: Normal Keywords: PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/gentoo/pull/18841
Whiteboard:
Package list:
Runtime testing required: ---

Description Garry Filakhtov 2020-12-26 11:24:37 UTC
Needed to run systemd-sysusers to create users in a chroot environment and realized that sysusers.d configuration files provided by various packages in acct-group and acct-user conflict with definitions inside of the sysusers.d files from sys-apps/systemd or sys-apps/dbus.

This leads to systemd-sysusers utility to be confused by conflicted definitions and being unable to create users and groups that contain multiple entries.


Reproducible: Always

Steps to Reproduce:
1. Install sys-apps/systemd, which will in turn require sys-apps/dbus as a dependency and install a few acct-user and acct-group packages
2. Run systemd-sysusers to create or modify users and groups
3. Observe the problem with some of the entries
Actual Results:  
$ systemd-sysusers
Two or more conflicting lines for adm configured, ignoring.
Two or more conflicting lines for wheel configured, ignoring.
Two or more conflicting lines for kmem configured, ignoring.
Two or more conflicting lines for utmp configured, ignoring.
Two or more conflicting lines for audio configured, ignoring.
Two or more conflicting lines for cdrom configured, ignoring.
Two or more conflicting lines for dialout configured, ignoring.
Two or more conflicting lines for disk configured, ignoring.
Two or more conflicting lines for input configured, ignoring.
Two or more conflicting lines for kvm configured, ignoring.
Two or more conflicting lines for render configured, ignoring.
Two or more conflicting lines for tape configured, ignoring.
Two or more conflicting lines for video configured, ignoring.
Two or more conflicting lines for messagebus configured, ignoring.
Two or more conflicting lines for systemd-journal configured, ignoring.
Two or more conflicting lines for systemd-network configured, ignoring.
Two or more conflicting lines for systemd-resolve configured, ignoring.
Two or more conflicting lines for systemd-timesync configured, ignoring.
Two or more conflicting lines for systemd-coredump configured, ignoring.

Users and groups in the list above are never created by the systemd-sysusers utility.

Expected Results:  
There should be no duplicate entries within sysusers.d configuration files and systemd-sysusers should create all the defined users and groups.

I think, in this case, systemd-sysusers does exactly what it should. Instead, we should probably fix the configuration by dropping the bundled files and providing only custom acct-user and acct-group packages, expanding them to cover all the bundled ones. Alternatively, we can patch the bundled files to exclude duplicates, and this might end-up being a better option, as these packages might expand their sysuser.d configuration files in the future and be broken if a custom acct-group or acct-user package is not covering for the new entry.
Comment 1 Garry Filakhtov 2020-12-26 11:25:27 UTC
sys-apps/systemd-246.6::gentoo was built with the following:
USE="acl build lzma seccomp (split-usr) sysv-utils -apparmor -audit -cgroup-hybrid -cryptsetup -curl -dns-over-tls -elfutils -gcrypt -gnuefi -homed -http -hwdb -idn -importd -kmod -lz4 -nat -pam -pcre -pkcs11 -policykit -pwquality -qrcode -repart -resolvconf (-selinux) -static-libs -test -vanilla -xkb -zstd"
Comment 2 Larry the Git Cow gentoo-dev 2020-12-27 19:21:38 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=111e1527e7be452a15e0b02dea401c87ed937264

commit 111e1527e7be452a15e0b02dea401c87ed937264
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2020-12-27 19:13:42 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2020-12-27 19:19:26 +0000

    sys-apps/systemd: drop sysusers.d files
    
    These conflict with the files generated by the acct-* packages.
    
    Bug: https://bugs.gentoo.org/761763
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 sys-apps/systemd/{systemd-247.2-r1.ebuild => systemd-247.2-r2.ebuild} | 3 +++
 sys-apps/systemd/systemd-9999.ebuild                                  | 3 +++
 2 files changed, 6 insertions(+)
Comment 3 Larry the Git Cow gentoo-dev 2020-12-28 00:29:55 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f81767d08412294129f34b6c66fe6a0137b3b34f

commit f81767d08412294129f34b6c66fe6a0137b3b34f
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2020-12-27 19:35:27 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2020-12-28 00:27:32 +0000

    acct-group/users: new group (100)
    
    Bug: https://bugs.gentoo.org/761763
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 acct-group/users/metadata.xml   | 7 +++++++
 acct-group/users/users-0.ebuild | 8 ++++++++
 2 files changed, 15 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91ff144f07fcb6be49752531c8e207886e26eb61

commit 91ff144f07fcb6be49752531c8e207886e26eb61
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2020-12-27 19:33:56 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2020-12-28 00:27:31 +0000

    acct-user/nobody: new user (65534)
    
    Bug: https://bugs.gentoo.org/761763
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 acct-user/nobody/metadata.xml    |  7 +++++++
 acct-user/nobody/nobody-0.ebuild | 17 +++++++++++++++++
 2 files changed, 24 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d1786b1388ec2ff2883e12a322f595163542a81

commit 0d1786b1388ec2ff2883e12a322f595163542a81
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2020-12-27 19:32:38 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2020-12-28 00:27:31 +0000

    acct-group/nobody: new group (65534)
    
    Bug: https://bugs.gentoo.org/761763
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 acct-group/nobody/metadata.xml    | 7 +++++++
 acct-group/nobody/nobody-0.ebuild | 9 +++++++++
 2 files changed, 16 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc8600613c1c5732a2d3ef95306dadc4cb5649fb

commit bc8600613c1c5732a2d3ef95306dadc4cb5649fb
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2020-12-27 19:28:22 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2020-12-28 00:27:30 +0000

    acct-user/root: new user (0)
    
    Bug: https://bugs.gentoo.org/761763
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 acct-user/root/metadata.xml  |  7 +++++++
 acct-user/root/root-0.ebuild | 15 +++++++++++++++
 2 files changed, 22 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3faa8a1307be729aaca34159dac780722af807c

commit a3faa8a1307be729aaca34159dac780722af807c
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2020-12-27 19:27:33 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2020-12-28 00:27:28 +0000

    acct-group/root: new group (0)
    
    Bug: https://bugs.gentoo.org/761763
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 acct-group/root/metadata.xml  | 7 +++++++
 acct-group/root/root-0.ebuild | 9 +++++++++
 2 files changed, 16 insertions(+)
Comment 4 Larry the Git Cow gentoo-dev 2020-12-28 00:35:40 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=57c8670a3ab2c493f15e812c010d8ac9aa9d35a4

commit 57c8670a3ab2c493f15e812c010d8ac9aa9d35a4
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2020-12-28 00:34:07 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2020-12-28 00:34:07 +0000

    sys-apps/systemd: depend on acct-user/{nobody,root} and acct-group/users
    
    Closes: https://bugs.gentoo.org/761763
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 sys-apps/systemd/{systemd-247.2-r2.ebuild => systemd-247.2-r3.ebuild} | 3 +++
 sys-apps/systemd/systemd-9999.ebuild                                  | 3 +++
 2 files changed, 6 insertions(+)