Page MenuHomeSolus

0001-Exclude-unwanted-paths-from-libdirs-for-initrd-creat.patch

Authored By
sunnyflunk
Jun 3 2018, 10:23 AM
Size
1 KB
Referenced Files
None
Subscribers
None

0001-Exclude-unwanted-paths-from-libdirs-for-initrd-creat.patch

From 4f38ffe57aabb6ad3c9b0338eeb1d8cb02388cc1 Mon Sep 17 00:00:00 2001
From: Peter O'Connor <peter@solus-project.com>
Date: Sun, 3 Jun 2018 16:06:19 +1000
Subject: Exclude unwanted paths from libdirs for initrd creation
libdirs is generated from generic libs (/lib[64] /usr/lib[64]) but uses
ldconfig to detect further paths. In Solus, this means 3 extra directories
that are unwanted can be detected:
- lib32 paths can be installed outside of solbuild
- /usr/lib[64]/fakeroot inside solbuild
- /usr/lib[64]/haswell once avx2 libs are included in builds
By adding usr/lib32, fakeroot and haswell to be removed from the search, these
3 directories will no longer be used to search for library paths in initrd
creation excluding duplicate unused libraries, keeping the initrd as small
and compatible as possible.
Signed-off-by: Peter O'Connor <peter@solus-project.com>
---
dracut-functions.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dracut-functions.sh b/dracut-functions.sh
index ccc4897..5020bb0 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -52,7 +52,7 @@ find_binary() {
ldconfig_paths()
{
- ldconfig -pN 2>/dev/null | grep -E -v '/(lib|lib64|usr/lib|usr/lib64)/[^/]*$' | sed -n 's,.* => \(.*\)/.*,\1,p' | sort | uniq
+ ldconfig -pN 2>/dev/null | grep -E -v '/(fakeroot|haswell|lib|lib32|lib64|usr/lib|usr/lib64)/[^/]*$' | sed -n 's,.* => \(.*\)/.*,\1,p' | sort | uniq
}
# Version comparision function. Assumes Linux style version scheme.
--
2.17.1

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
523487
Default Alt Text
0001-Exclude-unwanted-paths-from-libdirs-for-initrd-creat.patch (1 KB)

Event Timeline