[Pkg-dkms-commits] [dkms] 04/06: Add shim support for Ubuntu derivatives
Aron Xu
aron at debian.org
Wed Dec 28 13:18:36 UTC 2016
This is an automated email from the git hooks/post-receive script.
aron pushed a commit to branch master
in repository dkms.
commit 55cc035167e518e74d990af1876994db1d590bb2
Author: Aron Xu <aron at debian.org>
Date: Wed Dec 28 20:58:06 2016 +0800
Add shim support for Ubuntu derivatives
---
...-for-UEFI-Secure-Boot-validation-toggling.patch | 26 ++++++++++++++++++++++
debian/rules | 15 +++++++++++--
2 files changed, 39 insertions(+), 2 deletions(-)
diff --git a/debian/patches/0009-Add-support-for-UEFI-Secure-Boot-validation-toggling.patch b/debian/patches/0009-Add-support-for-UEFI-Secure-Boot-validation-toggling.patch
new file mode 100644
index 0000000..4efb3b6
--- /dev/null
+++ b/debian/patches/0009-Add-support-for-UEFI-Secure-Boot-validation-toggling.patch
@@ -0,0 +1,26 @@
+From: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre at canonical.com>
+Date: Wed, 28 Dec 2016 20:03:01 +0800
+Subject: Add support for UEFI Secure Boot validation toggling through shim
+
+This allows one to install third-party drivers and still have their system
+work (albeit without full Secure Boot validation), automatizing the step
+of disabling validation in shim.
+
+Users still have the possibility to notice this and skip the step, thus
+not disabling Secure Boot (but then, they will not be able to load the
+dkms drivers that were added).
+---
+ dkms_common.postinst | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/dkms_common.postinst b/dkms_common.postinst
+index d2ac712..2d3738e 100644
+--- a/dkms_common.postinst
++++ b/dkms_common.postinst
+@@ -290,3 +290,6 @@ for KERNEL in $KERNELS; do
+ fi
+ done
+
++if type update-secureboot-policy >/dev/null 2>&1; then
++ update-secureboot-policy || true
++fi
diff --git a/debian/rules b/debian/rules
index 75bad97..eb2e5af 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,6 +3,11 @@
CURVER = $(shell dpkg-parsechangelog | grep ^Version | cut -d" " -f2 | cut -d"-" -f1 )
+SB_PACKAGE :=
+ifeq (yes,$(shell dpkg-vendor --derives-from Ubuntu && echo yes))
+SB_PACKAGE := 1
+endif
+
%:
dh $@
@@ -14,11 +19,17 @@ dh_dkms.1: debian/scripts/dh_dkms
override_dh_auto_build:
-
override_dh_install:
$(MAKE) install-debian DESTDIR=$(CURDIR)/debian/dkms
dh_install
-
+
+override_dh_prep:
+ dh_prep
+ifneq (1,$(SB_PACKAGE))
+ echo "Reversing shim support"
+ patch -p1 -R < debian/patches/0009-Add-support-for-UEFI-Secure-Boot-validation-toggling.patch
+endif
+
get-orig-source:
uscan \
--force-download \
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-dkms/dkms.git
More information about the Pkg-dkms-commits
mailing list