[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#659752: initramfs-tools: patch for copy_exec - quote ${src} and add pattern for nonoptimized libraries on multiarch



Package: initramfs-tools
Version: 0.99
Severity: minor


Hello,

initramfs-tools hook-functions has copy_exec function needs some
updates.

There is one unquoted occurence of ${src} and the pattern for
nonoptimized libraries does not match multiarch libraries.

It does not match multilib libraries in /lib32 and /lib64 but those are
rare and should not multiply. The only library that is installed in
/lib32/i586 and /lib32/i686/cmov is libssl on mu system.

Note that for x in ... does not handle spaces in library paths but I am
not particularly concerned.


--- a/hook-functions	2011-08-04 15:50:12.000000000 +0200
+++ b/hook-functions	2012-02-13 16:00:41.000000000 +0100
@@ -126,7 +126,7 @@
 	cp -pL "${src}" "${DESTDIR}/${target}"
 
 	# Copy the dependant libraries
-	for x in $(ldd ${src} 2>/dev/null | sed -e '
+	for x in $(ldd "${src}" 2>/dev/null | sed -e '
 		/\//!d;
 		/linux-gate/d;
 		/=>/ {s/.*=>[[:blank:]]*\([^[:blank:]]*\).*/\1/};
@@ -136,6 +136,7 @@
 		# We assume that all HWCAP libraries will be in tls,
 		# sse2, vfp or neon.
 		nonoptlib=$(echo "${x}" | sed -e 's#/lib/\(tls\|i686\|sse2\|neon\|vfp\).*/\(lib.*\)#/lib/\2#')
+		nonoptlib=$(echo "${nonoptlib}" | sed -e 's#-linux-gnu/\(tls\|i686\|sse2\|neon\|vfp\).*/\(lib.*\)#-linux-gnu/\2#')
 
 		if [ -e "${nonoptlib}" ]; then
 			x="${nonoptlib}"



Reply to: