FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 02-13-2012, 02:25 PM
Michal Suchanek
 
Default 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}"



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120213152534.19803.25694.reportbug@OptiPlex960.r uk.cuni.cz">http://lists.debian.org/20120213152534.19803.25694.reportbug@OptiPlex960.r uk.cuni.cz
 
Old 03-03-2012, 07:09 PM
maximilian attems
 
Default 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



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120303200905.GG4762@stro.at">http://lists.debian.org/20120303200905.GG4762@stro.at
 
Old 03-05-2012, 11:36 AM
Michal Suchanek
 
Default Bug#659752: initramfs-tools: patch for copy_exec - quote ${src} and add pattern for nonoptimized libraries on multiarch

hello

Excerpts from maximilian attems's message of Sat Mar 03 21:09:05 +0100 2012:
> hello,

> 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}

This is tested codechange.

Since the value is first filtered from x to nonoptlib next pattern
filters nonoptlib to nonoptlib again.

It could be done with one sed invocation but then the line would be very
long and the changeset way more obscure.

> >
> > 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..
>
This was only a heuristic from the very start, and this patch is an
update to the heuristic which makes it work with multiarch.

The second hunk does not apply because there is a new pattern which
also matches subdirectories so this should handle multiarch now without
this second part.

Attaching updated patch.

Thanks

Michal
 

Thread Tools




All times are GMT. The time now is 10:08 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org