Bug#659752: initramfs-tools: patch for copy_exec - quote ${src} and add pattern for nonoptimized libraries on multiarch
hello,
On Mon, 13 Feb 2012, Michal Suchanek wrote:
>
>
> initramfs-tools hook-functions has copy_exec function needs some
> updates.
ack.
> There is one unquoted occurence of ${src} and the pattern for
> nonoptimized libraries does not match multiarch libraries.
okay.
> 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.
>
belows patch does not apply to current git,
probably mangled by mail client, did you use git repo?
> --- 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/};
looks good.
> @@ -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#')
this looks wrong,
untested codechange of ${x} to ${nonoptlib}
>
> if [ -e "${nonoptlib}" ]; then
> x="${nonoptlib}"
>
care to resent?
In principle first I was unsure to just use the multi-arch path,
but as we depend on a new klibc from testing..
--
maks
Reply to: