Skip to content

Commit

Permalink
packaging/spec.in: Enable rpm-ostree-countme.timer following presets
Browse files Browse the repository at this point in the history
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
  • Loading branch information
travier authored and cgwalters committed Aug 25, 2023
1 parent 295d1ad commit 94b039a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packaging/rpm-ostree.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 94b039a

Please sign in to comment.