summaryrefslogtreecommitdiff
path: root/sys-apps/util-linux/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-03-18 18:50:06 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-03-18 18:50:06 +0000
commitbc7e0dbdbd194a8c2e09f82e1a5a4ea5e1b556f4 (patch)
treecb9186c88b5cfbd6c51e4b283677075c5c6ea38e /sys-apps/util-linux/files
parentebb07c94f800907e02d2a6b92c1bc757b2f86f49 (diff)
gentoo auto-resync : 18:03:2024 - 18:50:06
Diffstat (limited to 'sys-apps/util-linux/files')
-rw-r--r--sys-apps/util-linux/files/util-linux-2.39.3-libblkid-luks.patch40
-rw-r--r--sys-apps/util-linux/files/util-linux-2.39.3-musl-1.2.5-basename.patch56
2 files changed, 96 insertions, 0 deletions
diff --git a/sys-apps/util-linux/files/util-linux-2.39.3-libblkid-luks.patch b/sys-apps/util-linux/files/util-linux-2.39.3-libblkid-luks.patch
new file mode 100644
index 000000000000..222243426d5e
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.39.3-libblkid-luks.patch
@@ -0,0 +1,40 @@
+https://bugs.gentoo.org/926950
+https://gitlab.com/lvmteam/lvm2/-/issues/11
+https://bugzilla.opensuse.org/show_bug.cgi?id=1213227
+https://github.com/util-linux/util-linux/pull/2373
+https://github.com/util-linux/util-linux/commit/93ba7961779789217a1f814ce3110ff8c040c8c3
+
+From 93ba7961779789217a1f814ce3110ff8c040c8c3 Mon Sep 17 00:00:00 2001
+From: Fabian Vogt <fvogt@suse.de>
+Date: Wed, 12 Jul 2023 15:48:27 +0200
+Subject: [PATCH] Revert "libblkid: try LUKS2 first when probing"
+
+mdadm superblocks before 1.1 are placed at the end of the device, which
+means that the data contained inside the array starts at offset 0. For
+LUKS inside MD, blkid falsely detects this as plain LUKS instead of a
+linux_raid_member. This causes e.g. dracut to not assemble the array
+during boot and system startup fails.
+
+This reverts commit b8889c0a214aeb3dd47bf1ab280fe5534b64d2aa.
+--- a/libblkid/src/superblocks/superblocks.c
++++ b/libblkid/src/superblocks/superblocks.c
+@@ -94,11 +94,6 @@ static int blkid_probe_set_usage(blkid_probe pr, int usage);
+ */
+ static const struct blkid_idinfo *idinfos[] =
+ {
+- /* In case the volume is locked with OPAL we are going to get
+- * an I/O error when reading past the LUKS header, so try it
+- * first. */
+- &luks_idinfo,
+-
+ /* RAIDs */
+ &linuxraid_idinfo,
+ &ddfraid_idinfo,
+@@ -124,6 +119,7 @@ static const struct blkid_idinfo *idinfos[] =
+ &snapcow_idinfo,
+ &verity_hash_idinfo,
+ &integrity_idinfo,
++ &luks_idinfo,
+ &vmfs_volume_idinfo,
+ &ubi_idinfo,
+ &vdo_idinfo,
diff --git a/sys-apps/util-linux/files/util-linux-2.39.3-musl-1.2.5-basename.patch b/sys-apps/util-linux/files/util-linux-2.39.3-musl-1.2.5-basename.patch
new file mode 100644
index 000000000000..519545e17088
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.39.3-musl-1.2.5-basename.patch
@@ -0,0 +1,56 @@
+https://bugs.gentoo.org/926293
+https://github.com/util-linux/util-linux/commit/77454e58d58f904cfdc02d3ca5bb65f1bd8739fc
+
+From 77454e58d58f904cfdc02d3ca5bb65f1bd8739fc Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 3 Dec 2023 19:59:46 -0800
+Subject: [PATCH] login-utils: include libgen.h for basename API
+
+musl has removed the non-prototype declaration of basename from string.h [1] which now results in build errors with clang-17+ compiler
+
+include libgen.h for using the posix declaration of the funciton.
+
+Fixes
+
+../util-linux-2.39.2/login-utils/su-common.c:847:20: error: call to undeclared function 'basename'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
+ 847 | shell_basename = basename(shell);
+ | ^
+
+[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+--- a/login-utils/su-common.c
++++ b/login-utils/su-common.c
+@@ -26,6 +26,7 @@
+ #include <sys/types.h>
+ #include <pwd.h>
+ #include <grp.h>
++#include <libgen.h>
+ #include <security/pam_appl.h>
+ #ifdef HAVE_SECURITY_PAM_MISC_H
+ # include <security/pam_misc.h>
+@@ -840,17 +841,20 @@ static void run_shell(
+ su->simulate_login ? " login" : "",
+ su->fast_startup ? " fast-start" : ""));
+
++ char* tmp = xstrdup(shell);
+ if (su->simulate_login) {
+ char *arg0;
+ char *shell_basename;
+
+- shell_basename = basename(shell);
++ shell_basename = basename(tmp);
+ arg0 = xmalloc(strlen(shell_basename) + 2);
+ arg0[0] = '-';
+ strcpy(arg0 + 1, shell_basename);
+ args[0] = arg0;
+- } else
+- args[0] = basename(shell);
++ } else {
++ args[0] = basename(tmp);
++ }
++ free(tmp);
+
+ if (su->fast_startup)
+ args[argno++] = "-f";
+