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