>>> Andrei Borzenkov <arvidjaar@xxxxxxxxx> schrieb am 03.06.2019 um 09:48 in Nachricht <f2d4ddbb-53a7-38df-b5d0-df35c1ee201d@xxxxxxxxx>: > 03.06.2019 10:15, Ulrich Windl пишет: >>>>> Michael Chapman <mike@xxxxxxxxxxxxxxxxx> schrieb am 31.05.2019 um 13:28 in >> Nachricht <alpine.LFD.2.21.1905312123080.3180@xxxxxxxxxx>: >>> On Fri, 31 May 2019, Reindl Harald wrote: >>>> Am 31.05.19 um 12:31 schrieb Michael Chapman: >>>>> For RPM on Fedora, the systemd package has %transfiletriggerin and >>>>> %transfiletriggerun scriptlets that run automatically at the end of the >>>>> RPM transaction if units were installed or removed. This is the cleanest >>>>> approach since it means all changes from all updated packages are applied >>>>> at once. >>>> >>>> sadly that's all theory given that all services in Fedora are >>>> automatically hard restartet when packages are updated and "at the end" >>>> is too late when the service got restarted with the old unit but new binary >>> >>> I actually got it slightly wrong: %transfiletriggerin and >>> %transfiletriggerun occur in the _middle_ of the transaction, in between > > That's not what source says: > > https://github.com/rpm-software-management/rpm/blob/096ec07465f6d223a1e9d68b > 688889e2fab103f7/lib/transaction.c#L1660 > > The sequence is > > %pretrans > %transfiletriggerun > actual transaction > %posttrans > %transfiletriggerpostun > %transfiletriggerin > > Are you sure you do not mix up %transfiletrigger and %filetrigger? > >>> installation of new packages (or new versions of packages) and removal of >>> old packages (or old versions of packages). While %transfiletriggerin >>> does perform a daemon-reload, %transfiletriggerun simply stores a >>> flag that's picked up by a separate %filetriggerpostun scriptlet. That >>> reloads systemd. >> >> Where is the definitive documentation for these (rather new) RPM features? > > I am afraid only in sources. You you can't expect people to use it if there is not official documentation. As it is now it all looks like an "experimental feature" IMHO... > >> And do all the major RPM-based dirstributions support these? >> > > Upstream RPM includes support for %transfiletrigger in 4.13 so it can be > assumed any distribution with this or newer version does support them. > Actual patch is several years earlier. OK: SLES12 SP3 has rpm-4.11.2, SLES15 has rpm-4.14.1... Regards, Ulrich Windl _______________________________________________ systemd-devel mailing list systemd-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/systemd-devel