From 0b7dfa52b1e8904cae47718524d971772d41975c Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Sep 29 2021 20:03:33 +0000 Subject: import dracut-049-191.git20210920.el8 --- diff --git a/SOURCES/0189.patch b/SOURCES/0189.patch index 375ad80..698c67b 100644 --- a/SOURCES/0189.patch +++ b/SOURCES/0189.patch @@ -38,3 +38,4 @@ index 7f5d365a..e73d3184 100644 fi hostonly="" instmods "loop" "squashfs" "overlay" + diff --git a/SOURCES/0190.patch b/SOURCES/0190.patch new file mode 100644 index 0000000..7e63eb0 --- /dev/null +++ b/SOURCES/0190.patch @@ -0,0 +1,58 @@ +From e6cb22f2d12dfe61abf32389fa7d8927105081e2 Mon Sep 17 00:00:00 2001 +From: David Tardon +Date: Mon, 30 Aug 2021 10:02:22 +0200 +Subject: [PATCH] fix(install): extend hwcaps library handling to libraries + under glibc-hwcaps/ + +(cherry picked from commit 10ed204f873f454dcd15ffcc82dc3a1c781c1514) + +Resolves: #1983030 +--- + install/dracut-install.c | 17 +++++++++++++---- + 1 file changed, 13 insertions(+), 4 deletions(-) + +diff --git a/install/dracut-install.c b/install/dracut-install.c +index baf6dcff..4962316d 100644 +--- a/install/dracut-install.c ++++ b/install/dracut-install.c +@@ -335,8 +335,8 @@ static int cp(const char *src, const char *dst) + static int library_install(const char *src, const char *lib) + { + _cleanup_free_ char *p = NULL; +- _cleanup_free_ char *pdir = NULL, *ppdir = NULL, *clib = NULL; +- char *q; ++ _cleanup_free_ char *pdir = NULL, *ppdir = NULL, *pppdir = NULL, *clib = NULL; ++ char *q, *clibdir; + int r, ret = 0; + + p = strdup(lib); +@@ -358,7 +358,8 @@ static int library_install(const char *src, const char *lib) + log_debug("Lib install: '%s'", p); + } + +- /* Also try to install the same library from one directory above. ++ /* Also try to install the same library from one directory above ++ * or from one directory above glibc-hwcaps. + This fixes the case, where only the HWCAP lib would be installed + # ldconfig -p|grep -F libc.so + libc.so.6 (libc6,64bit, hwcap: 0x0000001000000000, OS ABI: Linux 2.6.32) => /lib64/power6/libc.so.6 +@@ -379,10 +380,18 @@ static int library_install(const char *src, const char *lib) + return ret; + + ppdir = strdup(ppdir); ++ pppdir = dirname(ppdir); ++ if (!pppdir) ++ return ret; ++ ++ pppdir = strdup(pppdir); ++ if (!pppdir) ++ return ret; + + strcpy(p, lib); + +- clib = strjoin(ppdir, "/", basename(p), NULL); ++ clibdir = streq(basename(ppdir), "glibc-hwcaps") ? pppdir : ppdir; ++ clib = strjoin(clibdir, "/", basename(p), NULL); + if (dracut_install(clib, clib, false, false, true) == 0) + log_debug("Lib install: '%s'", clib); + /* also install lib.so for lib.so.* files */ diff --git a/SPECS/dracut.spec b/SPECS/dracut.spec index a353141..30a1521 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 190.git20210811 +%define dist_free_release 191.git20210920 Name: dracut Version: 049 @@ -217,6 +217,7 @@ Patch186: 0186.patch Patch187: 0187.patch Patch188: 0188.patch Patch189: 0189.patch +Patch190: 0190.patch Source1: https://www.gnu.org/licenses/lgpl-2.1.txt @@ -669,6 +670,9 @@ echo '# Since rhel-8.3 dracut moved to use NetworkManager add_dracutmodules+=" network-legacy "' > /etc/dracut.conf.d/50-network-legacy.conf %changelog +* Mon Sep 20 2021 Lukas Nykryn - 049-191.git20210920 +- fix(install): extend hwcaps library handling to libraries + * Wed Aug 11 2021 Lukas Nykryn - 049-190.git20210811 - fix(lsinitrd): TMP_DIR doesn't exist in RHEL8 - fix(squash): apply FIPS and libpthread workaround