Re: force merging of the remaining pull requests for sysusers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 06, 2025 at 05:02:27PM +0100, Michal Schorm wrote:
> Yes, MariaDB packs it's own sysusers file.
> 
>   | # cat /usr/lib/sysusers.d/mariadb.conf
>   | u mysql - "MariaDB" /var/lib/mysql
> 
> however it wasn't used.
> Instead, the preinstall scriptlet (which I maintained to be identical
> with the MySQL one) was.
> 
> 1)
> Do I understand correctly, that with your Fedora 42 Change, the DNF
> behavior changed,
> so that the packaged sysuser file takes preference, ignoring (or
> simply just running earlier than) the preinstall scriptlet?

Yes. Looking at commit 009d1397331a89413e2c5eead163cadb47ccdb4b,
rpm executes the sysusers config before %triggerprein.
The preinstall scriptlet still gets executed, but in this case
it is a noop since the accounts already exist.

> 2)
> When does it run exactly?
> It doesn't seem to be specified in the DNF transaction output, however
> since it actually creates the user:group, it has to run before the
> preinstall scriptlet.
> So that suggests the sysusers is handled somewhere during pretrans maybe?
> I mean the package contains files owned by the user:group, so I just
> want to be sure the user:group is set when the package is actually
> being installed.
>
> 3)
> How much is it compatible with older releases?
> I strive to maintain a solid level of compatibility between Fedora,
> CentOS Stream and RHEL SPECfiles to minimize the cherry-picking effort
> required.
> Is it possible to switch to sysusers.d now, but making it work on any
> of: Fedora 40, Fedora 41, RHEL 10 or RHEL 9?
> Or would it be necessary to keep the RPM scriptlet logic conditionally
> for older releases?

The native rpm handling is only available in F42+. (Maybe it'll be
backported, but it's a fairly significant change, so I doubt that.)
There are some choices for compatibility:
- keep the existing scriptlets, probably making them conditional
- use %sysuser_create_compat as described in the Packaging Guidelines [0].
  In F43+ this will be a noop [1]. Since the package already has a
  sysusers file, this is going to be just a few lines.

[0] https://docs.fedoraproject.org/en-US/packaging-guidelines/UsersAndGroups/#_creation_of_users_and_groups_with_scriptlets
[1] https://src.fedoraproject.org/rpms/systemd/pull-request/193

Zbyszek
-- 
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux