From 6194e7535cab766ca0613adb381eaa414d4ddcc4941ed25de7b01be90db46b97 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Mon, 23 May 2016 15:22:13 +0000 Subject: [PATCH] Accepting request 396985 from home:jengelh:branches:Base:System - Make sure all systemd unit files are passed to %service_ macros. This is merely required for completeness. At the very least this ensures that the grub2-once service really is terminally removed from the system on uninstall. OBS-URL: https://build.opensuse.org/request/show/396985 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=217 --- grub2.changes | 5 +++++ grub2.spec | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/grub2.changes b/grub2.changes index ee77b17..ae20dcd 100644 --- a/grub2.changes +++ b/grub2.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri May 20 09:28:16 UTC 2016 - jengelh@inai.de + +- Make sure all systemd unit files are passed to %service_ macros. + ------------------------------------------------------------------- Thu May 19 14:56:53 UTC 2016 - agraf@suse.com diff --git a/grub2.spec b/grub2.spec index 42e9824..0d17324 100644 --- a/grub2.spec +++ b/grub2.spec @@ -700,7 +700,11 @@ perl -ni -e ' %fdupes %buildroot%{_bindir} %fdupes %buildroot%{_libdir} +%pre +%service_add_pre grub2-once.service + %post +%service_add_post grub2-once.service /sbin/install-info %{_infodir}/grub-dev.info %{_infodir}/dir || : /sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || : @@ -785,6 +789,7 @@ exit 0 %endif %preun +%service_del_preun grub2-once.service if [ $1 = 0 ]; then /sbin/install-info --delete %{_infodir}/grub-dev.info %{_infodir}/dir || : /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || : @@ -825,6 +830,9 @@ fi %define source_dir build %endif +%postun +%service_del_postun grub2-once.service + %files -f %{source_dir}/%{name}.lang %defattr(-,root,root,-) %doc COPYING NEWS README