Bugzilla – Bug 1220040
sysuser-tools: 'm' directive not processed correctly
Last modified: 2024-02-19 09:59:10 UTC
== Observed behavior == The sysusers infrastructure under Leap 15.5 does not create groups when the 'm' directive is encountered. Tumbleweed is not affected. == Expected behavior == Create groups as documented in sysusers.d(5). == Testcase input == Name: system-user-grochat Version: 3 Release: 0 Summary: System user and group grochat License: MIT BuildArch: noarch BuildRequires: systemd-rpm-macros BuildRequires: sysuser-tools %sysusers_requires %description %prep %build cat >u.conf <<-EOF u grochat - "grommunio chat services" m grochat gromoxcf EOF %sysusers_generate_pre u.conf user %install install -Dpm0644 u.conf "%buildroot/%_sysusersdir/system-user-grochat.conf" %pre -f user.pre %files %_sysusersdir/*.conf %changelog == Observation Tumbleweed (good state) == $ osc build openSUSE_Tumbleweed x86_64 system-user-grochat.spec [...] # rpm -Uhv /var/tmp/build-root/openSUSE_Tumbleweed-x86_64/home/abuild/rpmbuild/RPMS/noarch/system-user-grochat-3-0.noarch.rpm Verifying... ################################# [100%] Preparing... ################################# [100%] /usr/bin/systemd-sysusers - Creating group 'gromoxcf' with GID 450. Updating / installing... 1:system-user-grochat-3-0 ################################# [100%] == Observation Leap 15.5 (bad state) == $ osc build openSUSE_Tumbleweed x86_64 system-user-grochat.spec [...] # rpm -Uhv /var/tmp/build-root/openSUSE_Leap_15.5-x86_64/home/abuild/rpmbuild/RPMS/noarch/system-user-grochat-3-0.noarch.rpm Preparing... ################################# [100%] /usr/sbin/usermod -a -G gromoxcf grochat usermod: group 'gromoxcf' does not exist error: %prein(system-user-grochat-3-lp155.1.1.noarch) scriptlet failed, exit status 1 error: system-user-grochat-3-lp155.1.1.noarch: install failed
Tumbleweed has the same problem, this is only a new enhancement of systemd-sysusers, not of sysuser-tools. If it works for you on Tumbleweed, then because you had luck and sysuser-tools was able to use the systemd-sysusers path for you. sysuser-tools does not support everything systemd-sysusers supports and never will. Best solution is to explicit create the group upfront with "g". This will also make sure that rpm 4.19 creates the correct group dependencies, which will not happen with "m" only.