From e922ce366ca21622ed79c5132f064da67775372aaf25e674abd787dfa830a5ea Mon Sep 17 00:00:00 2001 From: Matthias Gerstner Date: Wed, 21 Feb 2018 12:26:58 +0000 Subject: [PATCH] - Also cover cleanup of bootloader configuration after package removal. (bnc#1078262) OBS-URL: https://build.opensuse.org/package/show/security/tboot?expand=0&rev=73 --- tboot.changes | 6 ++++++ tboot.spec | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/tboot.changes b/tboot.changes index 896d282..ac99cd1 100644 --- a/tboot.changes +++ b/tboot.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Feb 21 12:26:10 UTC 2018 - matthias.gerstner@suse.com + +- Also cover cleanup of bootloader configuration after package removal. + (bnc#1078262) + ------------------------------------------------------------------- Mon Feb 12 13:27:20 UTC 2018 - matthias.gerstner@suse.com diff --git a/tboot.spec b/tboot.spec index 9b48117..8a250c3 100644 --- a/tboot.spec +++ b/tboot.spec @@ -104,6 +104,16 @@ make debug=y install DISTDIR="%{buildroot}" MANPATH="%{buildroot}/%{_mandir}" /sbin/update-bootloader --reinit || true %endif +%postun +%if 0%{?update_bootloader_check_type_reinit_post:1} +# there is no clean solution for refresh during package removal at the moment. +# %posttrans is not executed during package removal. +%update_bootloader_check_type_reinit_post grub2 grub2-efi +%update_bootloader_posttrans +%else +/sbin/update-bootloader --reinit || true +%endif + %posttrans %{?update_bootloader_posttrans}