From a2d48d038c669d6ab0a1ce7325d38a565c159617 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Rolim?= Date: Mon, 20 Jul 2020 15:36:28 -0300 Subject: [PATCH] gummiboot: add configuration file. This makes it possible to easily disable the gummiboot kernel hook. Change hook permissions to 744 to allow them to be read by anyone. --- srcpkgs/gummiboot/files/kernel.d/gummiboot.confd | 2 ++ srcpkgs/gummiboot/files/kernel.d/gummiboot.post-install | 6 ++++++ srcpkgs/gummiboot/template | 9 ++++++--- 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 srcpkgs/gummiboot/files/kernel.d/gummiboot.confd diff --git a/srcpkgs/gummiboot/files/kernel.d/gummiboot.confd b/srcpkgs/gummiboot/files/kernel.d/gummiboot.confd new file mode 100644 index 00000000000..a878b673006 --- /dev/null +++ b/srcpkgs/gummiboot/files/kernel.d/gummiboot.confd @@ -0,0 +1,2 @@ +# uncomment this line to disable the gummiboot hook +#GUMMIBOOT_DISABLE=1 diff --git a/srcpkgs/gummiboot/files/kernel.d/gummiboot.post-install b/srcpkgs/gummiboot/files/kernel.d/gummiboot.post-install index b2bf190be5f..7f4d27e985d 100644 --- a/srcpkgs/gummiboot/files/kernel.d/gummiboot.post-install +++ b/srcpkgs/gummiboot/files/kernel.d/gummiboot.post-install @@ -7,6 +7,12 @@ PKGNAME="$1" VERSION="$2" +. "$ROOTDIR/etc/default/gummiboot" + +if [ "$GUMMIBOOT_DISABLE" ]; then + exit 0 +fi + boot=$ROOTDIR/boot entries=$boot/loader/entries name=void-$VERSION diff --git a/srcpkgs/gummiboot/template b/srcpkgs/gummiboot/template index d23620e6170..0fa29b966b2 100644 --- a/srcpkgs/gummiboot/template +++ b/srcpkgs/gummiboot/template @@ -1,9 +1,10 @@ # Template file for 'gummiboot' pkgname=gummiboot version=48.1 -revision=3 +revision=4 archs="i686* x86_64* aarch64*" build_style=gnu-configure +conf_files="/etc/default/gummiboot" hostmakedepends="automake pkg-config libxslt docbook-xsl" makedepends="gnu-efi-libs liblzma-devel libblkid-devel" short_desc="Simple UEFI Boot Manager" @@ -26,8 +27,10 @@ pre_configure() { } post_install() { - vinstall ${FILESDIR}/kernel.d/gummiboot.post-install 750 \ + vinstall ${FILESDIR}/kernel.d/gummiboot.post-install 744 \ etc/kernel.d/post-install 50-gummiboot - vinstall ${FILESDIR}/kernel.d/gummiboot.post-remove 750 \ + vinstall ${FILESDIR}/kernel.d/gummiboot.post-remove 744 \ etc/kernel.d/post-remove 50-gummiboot + vinstall ${FILESDIR}/kernel.d/gummiboot.confd 644 \ + etc/default gummiboot }