Bug 2095428

Summary: libstoragemgmt use systemd-sysusers
Product: Red Hat Enterprise Linux 9 Reporter: Pat Riehecky <riehecky>
Component: libstoragemgmtAssignee: Tony Asleson <tasleson>
Status: CLOSED ERRATA QA Contact: ChanghuiZhong <czhong>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0CC: bstinson, czhong, jwboyer, storage-qe
Target Milestone: rcKeywords: Triaged
Target Release: 9.2Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libstoragemgmt-1.9.5-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-09 07:36:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version: 1.9.5
Embargoed:

Description Pat Riehecky 2022-06-09 17:32:39 UTC
Description of problem:
libstoragemgmt is using static useradd scripts

Version-Release number of selected component (if applicable):
 	libstoragemgmt-1.9.3-1.el9

How reproducible:
100%

Steps to Reproduce:
1.review %pre
2.
3.

Actual results:
%pre
getent group libstoragemgmt >/dev/null || groupadd -r libstoragemgmt
getent passwd libstoragemgmt >/dev/null || \
    useradd -r -g libstoragemgmt -d /var/run/lsm -s /sbin/nologin \
    -c "daemon account for libstoragemgmt" libstoragemgmt


Expected results:
use of system-sysusers 

Additional info:
https://www.freedesktop.org/software/systemd/man/systemd-sysusers.html
https://fedoraproject.org/wiki/Changes/Adopting_sysusers.d_format

Comment 3 ChanghuiZhong 2022-11-09 03:35:07 UTC
libstoragemgmt-1.9.5-1.el9 has using systemd-sysusers in %pre stage,
regression test passed https://beaker.engineering.redhat.com/jobs/7211307

# rpm -qp --scripts libstoragemgmt-1.9.5-1.el9.x86_64.rpm 
preinstall scriptlet (using /bin/sh):
echo 'u libstoragemgmt - "daemon account for libstoragemgmt"' | \
        systemd-sysusers --replace=/usr/lib/sysusers.d/libstoragemgmt.conf -
postinstall scriptlet (using /bin/sh):
/sbin/ldconfig



# rpm -qp --scripts libstoragemgmt-1.9.3-1.el9.x86_64.rpm 
preinstall scriptlet (using /bin/sh):
getent group libstoragemgmt >/dev/null || groupadd -r libstoragemgmt
getent passwd libstoragemgmt >/dev/null || \
    useradd -r -g libstoragemgmt -d /var/run/lsm -s /sbin/nologin \
    -c "daemon account for libstoragemgmt" libstoragemgmt
postinstall scriptlet (using /bin/sh):
/sbin/ldconfig

move to verified

Comment 6 errata-xmlrpc 2023-05-09 07:36:19 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (libstoragemgmt bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:2221