Re: force merging of the remaining pull requests for sysusers

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

 



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?

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?

Michal

--

Michal Schorm
Software Engineer
Databases Team
Red Hat

--
On Wed, Mar 5, 2025 at 5:33 PM Zbigniew Jędrzejewski-Szmek
<zbyszek@xxxxxxxxx> wrote:
>
> On Wed, Mar 05, 2025 at 03:26:44PM +0100, Michal Schorm wrote:
> > I started testing the patches in MariaDB and MySQL.
> > I merged PRs to other packages, but since MariaDB and MySQL share the
> > same user and group config, I want to check if it works fine for them
> > in various combinations.
> >
> > However I noticed a behavior that surprised me:
> > When installing MariaDB on Fedora 42 or Rawhide, the current scriptlet
> > (now, before the sysusers patch) does not guarantee the user / group
> > ID number anymore.
> >
> > | # rpm -q --scripts mariadb-server
> > | preinstall scriptlet (using /bin/sh):
> > | /usr/sbin/groupadd -g 27 -o -r mysql >/dev/null 2>&1 || :
> > | /usr/sbin/useradd -M -N -g mysql -o -r -d /var/lib/mysql -s /sbin/nologin \
> > |   -c "MySQL Server" -u 27 mysql >/dev/null 2>&1 || :
> >
> > Results in:
> > | Finished unknown scriptlet: mariadb-server-3:10.11.11-1.fc42.x86_64
> > | Scriptlet output:
> > | Creating group 'mysql' with GID 990.
> > | Creating user 'mysql' (MariaDB) with UID 990 and GID 990.
> >
> > And the UID/GID 27 will remain unused, free.
> >
> > While on Fedora 41 and older it guarantees the UID/GID 27.
> >
> > I checked the Fedora changes for F42 by title and the
> > RPMSuportForSystemdSysusers in full, but none seem to mention this.
>
> The output shown above is from sysusers. So it looks like there's a
> sysusers config for 'mysql'. Oh, there was a second sysusers file
> already provided by the package, just without the uid.
> I updated the PR.
>
> 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

-- 
_______________________________________________
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