On Tue, Jul 29, 2025 at 3:46 AM Zdenek Dohnal <zdoh...@redhat.com> wrote:
>
> Hi,
>
> per
> https://fedoraproject.org/wiki/Changes/FoomaticRipRejectsUnknownValues
> I've got feedback about turning RPM scriptlet into systemd service to
> have the change applied even on immutable systems, like bootable
> containers, Fedora CoreOS etc.
>
> Does anyone use such systemd service for upgrade tasks in their packages?
>
> Would you mind sharing the name of component which uses such service, so
> I can check how it is supposed to look?
>

In general, it's a flawed way to approach the problem.

If it was trivial to handle, it would probably be done by the programs
themselves automatically. If it is not trivial to handle, it is not
reasonable to use a systemd service to do it.

Delayed execution of scriptlets by migrating them to systemd units
also creates problems because it de-links the execution from the
transaction. This means that the risk of breakage goes up depending on
things happening on the system between transaction execution and the
reboot.

My previous attempts at doing stuff like this (like rpmdb-rebuild and
rpmdb-migrate) wound up being fraught with peril (and my fixes never
were merged, resulting in somewhat broken migrations for years). If
something needs to be executed as part of the transaction, it just
needs to happen there. If it can be done outside of the transaction,
it should be handled as part of the program or service itself, and not
as a separate systemd unit.



--
真実はいつも一つ!/ Always, there's only one truth!
-- 
_______________________________________________
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