diff --git a/0001-Revert-libblkid-try-LUKS2-first-when-probing.patch b/0001-Revert-libblkid-try-LUKS2-first-when-probing.patch new file mode 100644 index 0000000..7325285 --- /dev/null +++ b/0001-Revert-libblkid-try-LUKS2-first-when-probing.patch @@ -0,0 +1,43 @@ +From 93ba7961779789217a1f814ce3110ff8c040c8c3 Mon Sep 17 00:00:00 2001 +From: Fabian Vogt +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. +--- + libblkid/src/superblocks/superblocks.c | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/libblkid/src/superblocks/superblocks.c b/libblkid/src/superblocks/superblocks.c +index fb0392707..c7789a15b 100644 +--- 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, +-- +2.43.0 + diff --git a/util-linux.spec b/util-linux.spec index 50ead93..3ff8388 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.39.3 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -100,6 +100,9 @@ Patch1: login-default-motd-file.patch # 2258501 - dnf5 unusable with libsmartcols Patch2: libsmartcols-fix-columns-reduction.patch +# Upstream backports +Patch100: 0001-Revert-libblkid-try-LUKS2-first-when-probing.patch + %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -932,6 +935,9 @@ fi %files -n util-linux-i18n -f %{name}.lang %changelog +* Tue Feb 06 2024 Adam Williamson - 2.39.3-5 +- Backport upstream PR #2373 to fix #2249392 (mdraid detection problem) + * Thu Jan 25 2024 Karel Zak - 2.39.3-4 - improve fix for #2256391 (util-linux-i18n conflicts)