From bcf92c509e584663874013c977db3837d6013f30 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 28 Jun 2022 06:55:02 -0400 Subject: [PATCH] import dracut-049-202.git20220511.el8_6 --- SOURCES/0201.patch | 33 +++++++++++++++++++++++++++++++++ SPECS/dracut.spec | 6 +++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 SOURCES/0201.patch diff --git a/SOURCES/0201.patch b/SOURCES/0201.patch new file mode 100644 index 0000000..856e184 --- /dev/null +++ b/SOURCES/0201.patch @@ -0,0 +1,33 @@ +From d7c2342fb26a52142ce1fb9b10b636565aba7780 Mon Sep 17 00:00:00 2001 +From: Pavel Valena +Date: Mon, 2 May 2022 20:12:25 +0200 +Subject: [PATCH] fix(fips): start iterating from 0 over BOOT_IMAGE entries + +as the code contains a bug which sets default 0, but iterates from 1. +Correct approach is indexing from 0. + +https://github.com/redhat-plumbers/dracut-rhel8/pull/9 +--- + modules.d/01fips/fips.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh +index c57fd426..e8952489 100755 +--- a/modules.d/01fips/fips.sh ++++ b/modules.d/01fips/fips.sh +@@ -124,13 +124,13 @@ do_fips() + elif [ -d /boot/loader/entries ]; then + i=0 + for bls in $(ls -d /boot/loader/entries/*.conf | sort -rV); do +- ((i++)) +- + if [ $i -eq ${BOOT_IMAGE:-0} ] && [ -r "$bls" ]; then + BOOT_IMAGE="$(grep -e '^linux' "$bls" | grep -o ' .*$')" + BOOT_IMAGE=${BOOT_IMAGE:1} + break + fi ++ ++ ((i++)) + done + fi + fi diff --git a/SPECS/dracut.spec b/SPECS/dracut.spec index 9da2ef9..e6b91d6 100644 --- a/SPECS/dracut.spec +++ b/SPECS/dracut.spec @@ -5,7 +5,7 @@ # strip the automatically generated dep here and instead co-own the # directory. %global __requires_exclude pkg-config -%define dist_free_release 201.git20220131 +%define dist_free_release 202.git20220511 Name: dracut Version: 049 @@ -228,6 +228,7 @@ Patch197: 0197.patch Patch198: 0198.patch Patch199: 0199.patch Patch200: 0200.patch +Patch201: 0201.patch Source1: https://www.gnu.org/licenses/lgpl-2.1.txt @@ -680,6 +681,9 @@ echo '# Since rhel-8.3 dracut moved to use NetworkManager add_dracutmodules+=" network-legacy "' > /etc/dracut.conf.d/50-network-legacy.conf %changelog +* Wed May 11 2022 Pavel Valena - 049-202.git20220511 +- fix(fips): start iterating from 0 over BOOT_IMAGE entries + * Mon Jan 31 2022 Pavel Valena - 049-201.git20220131 - ci: introduce C8S based GHA CI - ci: backport TEST-21-NFS-NM