[linux-signed] 03/04: Invoke hooks under /etc/kernel/signed_post{inst, rm} from maintainer scripts

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Mon Apr 18 02:44:38 UTC 2016


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch master
in repository linux-signed.

commit dc11437202166577df262f819eb796493aa7448b
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Sun Apr 17 17:24:01 2016 +0100

    Invoke hooks under /etc/kernel/signed_post{inst,rm} from maintainer scripts
    
    ... instead of running update-grub directly
---
 debian/changelog                          |  2 ++
 debian/templates/image-signed.postinst.in |  8 ++++----
 debian/templates/image-signed.postrm.in   | 10 +++++-----
 3 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index e1d5f0f..3ba2061 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,8 @@ linux-signed (1~exp3) UNRELEASED; urgency=medium
     (fixes FTBFS on all architectures with multiple signed flavours)
   * debian/control: Add Breaks relationship to ensure busybox runs kmod's
     modprobe in the initramfs (see #821307)
+  * Invoke hooks under /etc/kernel/signed_post{inst,rm} from maintainer
+    scripts instead of running update-grub directly
 
  -- Ben Hutchings <ben at decadent.org.uk>  Sun, 17 Apr 2016 13:41:41 +0100
 
diff --git a/debian/templates/image-signed.postinst.in b/debian/templates/image-signed.postinst.in
index 6f5b33f..e9efe23 100644
--- a/debian/templates/image-signed.postinst.in
+++ b/debian/templates/image-signed.postinst.in
@@ -12,11 +12,11 @@ if [ "$1" = configure ] && \
     sync /boot/$vmlinuz_name.efi.unsigned
     mv /boot/$vmlinuz_name.efi.unsigned /boot/$vmlinuz_name.efi.signed
     sync /boot/$vmlinuz_name.efi.signed
+fi
 
-    # Currently only GRUB supports signature verification
-    if command -v update-grub >/dev/null; then
-	update-grub
-    fi
+if [ -d /etc/kernel/signed_postinst.d ]; then
+    run-parts --report --exit-on-error --arg=$kernel_version \
+	      /etc/kernel/signed_postinst.d
 fi
 
 #DEBHELPER#
diff --git a/debian/templates/image-signed.postrm.in b/debian/templates/image-signed.postrm.in
index 940d2e8..1f5a25d 100644
--- a/debian/templates/image-signed.postrm.in
+++ b/debian/templates/image-signed.postrm.in
@@ -8,14 +8,14 @@ if [ "$1" = remove ]; then
 
     if [ -f /boot/$vmlinuz_name.efi.signed ]; then
 	rm -f /boot/$vmlinuz_name.efi.signed
-
-	# Currently only GRUB supports signature verification
-	if command -v update-grub >/dev/null; then
-	    update-grub
-	fi
     fi
 fi
 
+if [ -d /etc/kernel/signed_postrm.d ]; then
+    run-parts --report --exit-on-error --arg=$kernel_version \
+	      /etc/kernel/signed_postrm.d
+fi
+
 #DEBHELPER#
 
 exit 0

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux-signed.git



More information about the Kernel-svn-changes mailing list