diff options
author | Steffen Winter <steffen.winter@proton.me> | 2024-06-23 16:44:48 +0200 |
---|---|---|
committer | John Helmert III <ajak@gentoo.org> | 2024-06-27 11:34:21 -0700 |
commit | becfea3c2a348982323838e525525d57501b0c07 (patch) | |
tree | 87b85cc40e5ba859430bd499de293d83f8e025f7 | |
parent | www-apps/mediawiki: bump to 1.39.8 (diff) | |
download | gentoo-becfea3c2a348982323838e525525d57501b0c07.tar.gz gentoo-becfea3c2a348982323838e525525d57501b0c07.tar.bz2 gentoo-becfea3c2a348982323838e525525d57501b0c07.zip |
app-crypt/sbctl: backport bashism fix in kernel install hook
Closes: https://bugs.gentoo.org/934768
Signed-off-by: Steffen Winter <steffen.winter@proton.me>
Closes: https://github.com/gentoo/gentoo/pull/37253
Signed-off-by: John Helmert III <ajak@gentoo.org>
-rw-r--r-- | app-crypt/sbctl/files/sbctl-0.14-installkernel-bashism.patch | 37 | ||||
-rw-r--r-- | app-crypt/sbctl/sbctl-0.14-r1.ebuild (renamed from app-crypt/sbctl/sbctl-0.14.ebuild) | 4 |
2 files changed, 41 insertions, 0 deletions
diff --git a/app-crypt/sbctl/files/sbctl-0.14-installkernel-bashism.patch b/app-crypt/sbctl/files/sbctl-0.14-installkernel-bashism.patch new file mode 100644 index 000000000000..bc1b988769fc --- /dev/null +++ b/app-crypt/sbctl/files/sbctl-0.14-installkernel-bashism.patch @@ -0,0 +1,37 @@ +From 1167500b9da76febe85342e09b1bf9eeaf367ca6 Mon Sep 17 00:00:00 2001 +From: MithicSpirit <rpc01234@gmail.com> +Date: Fri, 10 May 2024 17:51:59 -0400 +Subject: [PATCH] nit(91-sbctl.install): consistent syntax for tests + +Unifies usage of testing commands like `[]`, `test`, and `[[]]` to just +use `[]` everywhere. This also improves compatibility, as `[[]]` is not +available in POSIX sh. + +Bug: https://bugs.gentoo.org/934768 +Signed-off-by: Steffen Winter <steffen.winter@proton.me> +--- a/contrib/kernel-install/91-sbctl.install ++++ b/contrib/kernel-install/91-sbctl.install +@@ -31,7 +31,7 @@ add) + + # exit without error if keys don't exist + # https://github.com/Foxboron/sbctl/issues/187 +- if ! test -d /usr/share/secureboot/keys; then ++ if ! [ -d /usr/share/secureboot/keys ]; then + echo "Secureboot key directory doesn't exist, not signing!" + exit 0 + fi +@@ -39,10 +39,10 @@ add) + sbctl sign -s "$IMAGE_FILE" 1>/dev/null + ;; + remove) +- if [[ -e "$IMAGE_FILE" ]]; then +- [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && +- printf 'sbctl: Removing kernel %s from signing database\n' "$IMAGE_FILE" +- sbctl remove-file "$IMAGE_FILE" 1>/dev/null ++ if [ -e "$IMAGE_FILE" ]; then ++ [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && ++ printf 'sbctl: Removing kernel %s from signing database\n' "$IMAGE_FILE" ++ sbctl remove-file "$IMAGE_FILE" 1>/dev/null + fi + ;; + esac diff --git a/app-crypt/sbctl/sbctl-0.14.ebuild b/app-crypt/sbctl/sbctl-0.14-r1.ebuild index 97f67663daf4..8cdded303c60 100644 --- a/app-crypt/sbctl/sbctl-0.14.ebuild +++ b/app-crypt/sbctl/sbctl-0.14-r1.ebuild @@ -20,6 +20,10 @@ BDEPEND="app-text/asciidoc VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/foxboron.asc" +PATCHES=( + "${FILESDIR}/sbctl-0.14-installkernel-bashism.patch" +) + src_unpack() { if use verify-sig; then verify-sig_verify_detached "${DISTDIR}"/${P}.tar.gz{,.sig} |