From 94b039a7e402973f8f1da38a84e91bae628267c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Ravier?= Date: Thu, 24 Aug 2023 19:09:55 +0200 Subject: [PATCH] packaging/spec.in: Enable rpm-ostree-countme.timer following presets Use systemd macros to enable/disable the rpm-ostree-countme.timer unit following the global systemd presets. This fixes the timer enablement on systems that do no preset-all like Fedora CoreOS. See: https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_systemd --- packaging/rpm-ostree.spec.in | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packaging/rpm-ostree.spec.in b/packaging/rpm-ostree.spec.in index 67d2793762..62040f2a21 100644 --- a/packaging/rpm-ostree.spec.in +++ b/packaging/rpm-ostree.spec.in @@ -234,6 +234,16 @@ $PYTHON autofiles.py > files.devel \ '%{_datadir}/gtk-doc/html/*' \ '%{_datadir}/gir-1.0/*-1.0.gir' +# Setup rpm-ostree-countme.timer according to presets +%post +%systemd_post rpm-ostree-countme.timer + +%preun +%systemd_preun rpm-ostree-countme.timer + +%postun +%systemd_postun_with_restart rpm-ostree-countme.timer + %files -f files %doc COPYING.GPL COPYING.LGPL LICENSE README.md