Bug 2095477 - [RFE} tog-pegasus use systemd-sysusers
Summary: [RFE} tog-pegasus use systemd-sysusers
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: tog-pegasus
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Vitezslav Crhonek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-09 18:33 UTC by Pat Riehecky
Modified: 2022-11-23 15:43 UTC (History)
5 users (show)

Fixed In Version: tog-pegasus-2.14.1-67.fc37
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-02 13:40:58 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 2145172 0 unspecified CLOSED tog-pegasus: tog-pegasus-libs-2:2.14.1-67.fc37.i686 is not installable due to file conflict 2022-12-02 01:19:44 UTC
Red Hat Issue Tracker FC-476 0 None None None 2022-06-16 06:40:05 UTC

Internal Links: 2145172

Description Pat Riehecky 2022-06-09 18:33:07 UTC
Description of problem:
tog-pegasus has static useradd scripts

Version-Release number of selected component (if applicable):
 	tog-pegasus-2.14.1-64.el9

How reproducible:
100%

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

Actual results:
%pre libs
if [ $1 -eq 1 ]; then
#  first install: create the 'pegasus' user and group:
   /usr/sbin/groupadd -g %{pegasus_gid} -f -r pegasus >/dev/null 2>&1 || :;
   /usr/sbin/useradd -u %{pegasus_uid} -r -N -M -g pegasus -s /sbin/nologin -d /var/lib/Pegasus \
     -c "tog-pegasus OpenPegasus WBEM/CIM services" pegasus >/dev/null 2>&1 || :;
fi
:;

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 2 Vitezslav Crhonek 2022-06-14 07:46:13 UTC
Hello,

The guideline ([1]) doesn't prefer either of methods. It states, that
"Any package can use dynamic allocation; it is especially appropriate for packages that use separate
identities only for privilege separation and don’t create any files owned by that group/user account."

tog-pegasus creates files owned by that group/user account.

Is there any problem with static user and group creation? What would be the benefit
of creating them dynamically?

[1] https://docs.fedoraproject.org/en-US/packaging-guidelines/UsersAndGroups/

Comment 3 Pat Riehecky 2022-06-15 13:34:32 UTC
I'm mostly looking for greater consistency across various distributions.  Suse is trying to standardize around this method.  Clear Linux is similarly focused in this way.  I'm hopeful to eventually make an `/etc/` reset possible.  But first I need to be sure of user creation.

If you wanted to do this in Fedora and wait for RHEL10 that would be fine with me.

Comment 4 Vitezslav Crhonek 2022-06-16 06:13:31 UTC
(In reply to Pat Riehecky from comment #3)
> I'm mostly looking for greater consistency across various distributions. 
> Suse is trying to standardize around this method.  Clear Linux is similarly
> focused in this way.  I'm hopeful to eventually make an `/etc/` reset
> possible.  But first I need to be sure of user creation.
> 
> If you wanted to do this in Fedora and wait for RHEL10 that would be fine
> with me.

I see, thanks! Yes, I prefer to do such a change in Fedora first. I'm changing the
Product and Version field appropriately.

Comment 5 Vitezslav Crhonek 2022-08-02 13:40:58 UTC
Fixed.


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