dracut-038-40.git20150819

- fix ldconfig paths
Resolves: rhbz#1253889
This commit is contained in:
Harald Hoyer 2015-08-19 13:27:29 +02:00
parent e1428ded1f
commit 19a17acfd8
2 changed files with 49 additions and 1 deletions

View File

@ -0,0 +1,43 @@
From 646abedf85c35874cbac4afb9d27a72651dc31da Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
Date: Tue, 23 Dec 2014 22:03:10 +0100
Subject: [PATCH] dracut-functions.sh: avoid tokenizing ldconfig output with
'read'
The space does not separate the elements reliably, spaces can be
embedded in parenthesized expressions too:
libgmpxx.so.4 (libc6, hwcap: 0x0000000004000000) => /lib/sse2/libgmpxx.so.4
libgmp.so.10 (libc6, hwcap: 0x0000000004000000) => /lib/sse2/libgmp.so.10
This results in dracut creating '0x0000000004000000' and '=>'
directories in the initramfs image.
(cherry picked from commit c59779cf9337bc0fc48c7a4d8437f7253f6822c3)
---
dracut-functions.sh | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/dracut-functions.sh b/dracut-functions.sh
index 9286828..e2e2900 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -106,17 +106,7 @@ fi
ldconfig_paths()
{
- local a i
- declare -A a
- for i in $(
- ldconfig -pN 2>/dev/null | grep -F '=>' | grep -E -v '/(lib|lib64|usr/lib|usr/lib64)/[^/]*$' | while read a b c d; do
- d=${d%/*}
- printf "%s\n" "$d";
- done
- ); do
- a["$i"]=1;
- done;
- printf "%s\n" ${!a[@]}
+ ldconfig -pN 2>/dev/null | grep -E -v '/(lib|lib64|usr/lib|usr/lib64)/[^/]*$' | sed -n 's,.* => \(.*\)/.*,\1,p' | sort | uniq
}
# Detect lib paths

View File

@ -11,7 +11,7 @@
Name: dracut
Version: 038
Release: 39.git20150518%{?dist}
Release: 40.git20150819%{?dist}
Summary: Initramfs generator using udev
%if 0%{?fedora} || 0%{?rhel}
@ -68,6 +68,7 @@ Patch35: 0035-kernel-modules-install-all-HID-drivers.patch
Patch36: 0036-drm-module-setup.sh-radeon-needs-amdkfd.patch
Patch37: 0037-50drm-add-hyperv_fb-kernel-module.patch
Patch38: 0038-kernel-modules-increase-SDHCI-driver-inclusion.patch
Patch39: 0039-dracut-functions.sh-avoid-tokenizing-ldconfig-output.patch
Source1: https://www.gnu.org/licenses/lgpl-2.1.txt
@ -516,6 +517,10 @@ rm -rf -- $RPM_BUILD_ROOT
%endif
%changelog
* Wed Aug 19 2015 Harald Hoyer <harald@redhat.com> 038-40.git20150819
- fix ldconfig paths
Resolves: rhbz#1253889
* Mon May 18 2015 Harald Hoyer <harald@redhat.com> 038-39.git20150518
- add more input drivers
Resolves: rhbz#1135734 rhbz#1204392