Harald Hoyer 99c743
From 4916dfc2b94dca0e84eb7dc58a9266d02c416b4a Mon Sep 17 00:00:00 2001
Harald Hoyer 99c743
From: David Tardon <dtardon@redhat.com>
Harald Hoyer 99c743
Date: Thu, 1 Oct 2020 14:08:38 +0200
Harald Hoyer 99c743
Subject: [PATCH] dracut-install: ignore bogus preload libs
Harald Hoyer 99c743
Harald Hoyer 99c743
If there are any nonexistent libraries listed in /etc/ld.so.preload, ldd
Harald Hoyer 99c743
prints error messages like:
Harald Hoyer 99c743
Harald Hoyer 99c743
ERROR: ld.so: object '/usr/lib64/libfoo.so.1' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
Harald Hoyer 99c743
Harald Hoyer 99c743
This causes resolve_deps() to return error, which leads to symlinks
Harald Hoyer 99c743
(like usr/bin/awk) not being copied into the initrd.
Harald Hoyer 99c743
---
Harald Hoyer 99c743
 install/dracut-install.c | 3 +++
Harald Hoyer 99c743
 1 file changed, 3 insertions(+)
Harald Hoyer 99c743
Harald Hoyer 99c743
diff --git a/install/dracut-install.c b/install/dracut-install.c
Harald Hoyer 99c743
index 9fbd72cd..ea0668b8 100644
Harald Hoyer 99c743
--- a/install/dracut-install.c
Harald Hoyer 99c743
+++ b/install/dracut-install.c
Harald Hoyer 99c743
@@ -569,6 +569,9 @@ static int resolve_deps(const char *src)
Harald Hoyer 99c743
                 if (strstr(buf, "cannot read header"))
Harald Hoyer 99c743
                         break;
Harald Hoyer 99c743
 
Harald Hoyer 99c743
+                if (strstr(buf, "cannot be preloaded"))
Harald Hoyer 99c743
+                        break;
Harald Hoyer 99c743
+
Harald Hoyer 99c743
                 if (strstr(buf, destrootdir))
Harald Hoyer 99c743
                         break;
Harald Hoyer 99c743
 
Harald Hoyer 99c743