On Fri, Mar 28, 2025 at 02:26:37PM +0100, Michal Schorm wrote:
> Hi Zbyszek,
> 
> I encountered several things during testing I want to bring up.
> 
> 1)
> The output on Fedora Rawhide always look like this:
>   | >>> Running unknown scriptlet: mariadb-server-3:10.11.11-200.fc43.x86_64
> 
> The term "unknown scriptlet" doesn't sit right with me.
> Is there some way to name it, or somehow else to clear up that it's
> quite known and expected scriptlet?

I think that's something between rpm and dnf5.
Panu?
 
> I assume this issue is shared among all of the packages using
> sysusers.d now (but I haven't tested it)
It is.

> Also I have this scriptlet in the same RPM:
>   | %post -n %{pkgname}-server
>   | %systemd_post %{daemon_name}.service
> and it does not produce any such output.
> Does it mean that this scriptlet is known, but the other is not ?
No, I don't think so. I think it just doesn't produce any output so it
is not reported.

> 2)
> I noticed the sysusers.d functionality executed on RHEL 9.
> Do you know what is the expected compatibility with RHEL 10, 9, 8?

8 — no, 9 — no, 10 — at least right now no.

> 3)
> I added the '%sysusers_create_compat' macro to my code:
>   
> https://src.fedoraproject.org/fork/mschorm/rpms/mariadb10.11/commits/sysusers
> but it doesn't work correctly.
> 
> On Fedora 41, 40, C10S, RHEL 9, it executes AFTER the RPM is
> installed, instead of during the '%pre' phase.
> The user and group are required to be present before the RPM is
> installed, as they own files in it.
> 
>   | [10/10] Installing mariadb-server-3:10.11.11-200.fc41.x86_64
>   | >>> [RPM] user mysql does not exist - using root
>   | >>> [RPM] group mysql does not exist - using root
>   | >>> [RPM] user mysql does not exist - using root
>   | >>> [RPM] group mysql does not exist - using root
>   | >>> [RPM] user mysql does not exist - using root
>   | >>> [RPM] group mysql does not exist - using root
>   | >>> Running trigger-install scriptlet: systemd-0:256.12-1.fc41.x86_64
>   | >>> Finished trigger-install scriptlet: systemd-0:256.12-1.fc41.x86_64
>   | >>> Scriptlet output:
>   | >>> Creating group 'mysql' with GID 27.
>   | >>> Creating user 'mysql' (MySQL Server) with UID 27 and GID 27.
Those last two lines seem to be from the systemd %transfiletriggerin
scriptlet ("trigger-install scriptlet: systemd").

Dunno, maybe check if 'rpm -qp --scriptlets …' show the expected values.
The %pre scriptlet should definitely run before the package is installed.

> Hopefully I just use the macro incorrectly and you can spot the mistake:
>   
> https://src.fedoraproject.org/fork/mschorm/rpms/mariadb10.11/c/1ba22?branch=sysusers
> 
> But if not, it might be a serious issue for every package that use the
> '%sysusers_create_compat' macro on older Fedora releases AND requires
> the user / group to be present before the RPM installation. (I guess
> that's not too many packages, but still ... )
No, no, this should all work. I'll try to do some debugging.

Zbyszek
-- 
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
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@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to