public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Mike Gilbert" <floppym@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-kernel/dracut/files/, sys-kernel/dracut/
Date: Fri, 23 Jul 2021 19:16:54 +0000 (UTC)	[thread overview]
Message-ID: <1627067584.b11a0316d954d186df8c61aee62402ff6026c7dc.floppym@gentoo> (raw)

commit:     b11a0316d954d186df8c61aee62402ff6026c7dc
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 23 19:13:04 2021 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Jul 23 19:13:04 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b11a0316

sys-kernel/dracut: fix quoting issues

Closes: https://bugs.gentoo.org/803548
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 .../{dracut-055.ebuild => dracut-055-r1.ebuild}    |  2 ++
 ...ase-do-not-quote-initargs-for-switch_root.patch | 32 ++++++++++++++++++
 ...x-crypt-remove-quotes-from-cryptsetupopts.patch | 39 ++++++++++++++++++++++
 3 files changed, 73 insertions(+)

diff --git a/sys-kernel/dracut/dracut-055.ebuild b/sys-kernel/dracut/dracut-055-r1.ebuild
similarity index 97%
rename from sys-kernel/dracut/dracut-055.ebuild
rename to sys-kernel/dracut/dracut-055-r1.ebuild
index 3b042f3de74..e45745cf50f 100644
--- a/sys-kernel/dracut/dracut-055.ebuild
+++ b/sys-kernel/dracut/dracut-055-r1.ebuild
@@ -60,6 +60,8 @@ BDEPEND="
 QA_MULTILIB_PATHS="usr/lib/dracut/.*"
 
 PATCHES=(
+	"${FILESDIR}"/055-fix-crypt-remove-quotes-from-cryptsetupopts.patch
+	"${FILESDIR}"/055-fix-base-do-not-quote-initargs-for-switch_root.patch
 	"${FILESDIR}"/gentoo-ldconfig-paths-r1.patch
 )
 

diff --git a/sys-kernel/dracut/files/055-fix-base-do-not-quote-initargs-for-switch_root.patch b/sys-kernel/dracut/files/055-fix-base-do-not-quote-initargs-for-switch_root.patch
new file mode 100644
index 00000000000..5568c22aede
--- /dev/null
+++ b/sys-kernel/dracut/files/055-fix-base-do-not-quote-initargs-for-switch_root.patch
@@ -0,0 +1,32 @@
+From 285e2ad01035743ff51005a74e486e09fcbb0a0d Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Fri, 23 Jul 2021 14:35:07 -0400
+Subject: [PATCH] fix(base): do not quote $initargs for switch_root
+
+We want word splitting to occur so that the arguments are passed
+separately, and we don't end up passing an empty string if no arguments
+are specified.
+
+Bug: https://bugs.gentoo.org/803548
+Fixes: 2fabaaa62dcfd31e593ca45e1374e55adae29d6b
+---
+ modules.d/99base/init.sh | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh
+index 978adb6f..ab62bb44 100755
+--- a/modules.d/99base/init.sh
++++ b/modules.d/99base/init.sh
+@@ -387,7 +387,8 @@ if [ -f /etc/capsdrop ]; then
+         }
+ else
+     unset RD_DEBUG
+-    exec "$SWITCH_ROOT" "$NEWROOT" "$INIT" "$initargs" || {
++    # shellcheck disable=SC2086
++    exec "$SWITCH_ROOT" "$NEWROOT" "$INIT" $initargs || {
+         warn "Something went very badly wrong in the initramfs.  Please "
+         warn "file a bug against dracut."
+         emergency_shell
+-- 
+2.32.0
+

diff --git a/sys-kernel/dracut/files/055-fix-crypt-remove-quotes-from-cryptsetupopts.patch b/sys-kernel/dracut/files/055-fix-crypt-remove-quotes-from-cryptsetupopts.patch
new file mode 100644
index 00000000000..355cdc461ab
--- /dev/null
+++ b/sys-kernel/dracut/files/055-fix-crypt-remove-quotes-from-cryptsetupopts.patch
@@ -0,0 +1,39 @@
+From e0abf88a15d23fbf793cf872397016ad86aeaaa8 Mon Sep 17 00:00:00 2001
+From: lapseofreason <lapseofreason0@gmail.com>
+Date: Tue, 8 Jun 2021 16:01:58 +0200
+Subject: [PATCH] fix(crypt): remove quotes from cryptsetupopts
+
+Fixes #1528.
+---
+ modules.d/90crypt/cryptroot-ask.sh | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/modules.d/90crypt/cryptroot-ask.sh b/modules.d/90crypt/cryptroot-ask.sh
+index 37a4deea..b1f8df81 100755
+--- a/modules.d/90crypt/cryptroot-ask.sh
++++ b/modules.d/90crypt/cryptroot-ask.sh
+@@ -138,8 +138,9 @@ unset allowdiscards
+ ask_passphrase=1
+ 
+ if [ -n "$luksfile" -a "$luksfile" != "none" -a -e "$luksfile" ]; then
++    # shellcheck disable=SC2086
+     if readkey "$luksfile" / "$device" \
+-        | cryptsetup -d - "$cryptsetupopts" luksOpen "$device" "$luksname"; then
++        | cryptsetup -d - $cryptsetupopts luksOpen "$device" "$luksname"; then
+         ask_passphrase=0
+     fi
+ elif [ "$is_keysource" -ne 0 ]; then
+@@ -164,8 +165,9 @@ else
+         unset tmp
+ 
+         info "Using '$keypath' on '$keydev'"
++        # shellcheck disable=SC2086
+         readkey "$keypath" "$keydev" "$device" \
+-            | cryptsetup -d - "$cryptsetupopts" luksOpen "$device" "$luksname" \
++            | cryptsetup -d - $cryptsetupopts luksOpen "$device" "$luksname" \
+             && ask_passphrase=0
+         unset keypath keydev
+         break
+-- 
+2.32.0
+


             reply	other threads:[~2021-07-23 19:16 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-23 19:16 Mike Gilbert [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-08-12  9:51 [gentoo-commits] repo/gentoo:master commit in: sys-kernel/dracut/files/, sys-kernel/dracut/ James Le Cuirot
2025-08-08 21:28 James Le Cuirot
2025-05-18 10:28 Nowa Ammerlaan
2025-03-24  1:55 Sam James
2025-02-03 17:40 Nowa Ammerlaan
2024-11-10  2:21 Mike Gilbert
2024-11-01 17:10 Andrew Ammerlaan
2024-09-30  9:09 Andrew Ammerlaan
2023-12-13  9:19 Andrew Ammerlaan
2023-09-22  6:10 Andrew Ammerlaan
2023-07-20  3:39 Sam James
2023-05-26 20:03 Mike Gilbert
2022-12-25  2:53 Mike Gilbert
2021-12-27 16:51 Mike Gilbert
2021-09-06  0:14 Mike Gilbert
2021-08-17 17:24 Mike Gilbert
2021-06-14 18:42 Mike Gilbert
2020-07-03 11:18 Thomas Deutschmann
2020-03-10 19:50 Mike Gilbert
2019-12-29 19:39 Mike Gilbert
2019-01-21 14:23 Mike Gilbert
2018-03-24 18:03 Mike Gilbert
2017-02-09 18:47 Patrick McLean
2017-02-09 18:47 Patrick McLean
2016-11-04 18:39 Mike Gilbert
2015-08-16 10:04 Amadeusz Żołnowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1627067584.b11a0316d954d186df8c61aee62402ff6026c7dc.floppym@gentoo \
    --to=floppym@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox