summaryrefslogtreecommitdiff
path: root/src/core/triggers.systemd.in
AgeCommit message (Collapse)Author
2016-04-02rpm triggers: add note about minimum supported versionZbigniew Jędrzejewski-Szmek
2015-11-23Convert file trigger scripts to luaZbigniew Jędrzejewski-Szmek
At least the %filetriggerpostun script can be invoked hundreds of times during an upgrade, so it makes sense to optimize it a bit. assert(exec(...)) is used because of https://bugzilla.redhat.com/show_bug.cgi?id=1094072. Add -P (--priority) to have %filetriggerpostun run as early as possible (before any reload/stop actions), and %transfiletriggerin as late as possible (after any enable/disable/preset actions).
2015-11-22Rework file trigger scripts to fire at the right timeZbigniew Jędrzejewski-Szmek
This turns out to be more complicated than it looked initially... %transfiletriggerun is called early, while %transfiletriggerin is called late, and neither satifisfies the requirement to call daemon-reload after new unit files have been installed, but before %postun scripts in packages get to fire. It seems that the only solution is to use %filetriggerun (which is called once per package) to do the reload, and keep state in /var/lib/rpm-state/systemd/ to avoid calling the reload multiple times. https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Saving_state_between_scriptlets says that /var/lib/rpm-state/systemd/ is the right dir.
2015-11-15Move daemon-reload from package %post scripts to file triggersZbigniew Jędrzejewski-Szmek
This uses new functionality added in rpm 4.13. Instead of doing one daemon-reload per packages, we do just one or two (When both installing and uninstalling packages, we do two. Unfortunately this also includes the common case of upgrades. When only installing or when only installing, we do just one.) New file triggers.systemd can be built, but the contents have to be copied into the rpm spec file by hand. Using %{load} does not seem to work. It can serve as documentation.