Skip to contentSkip to conversation

Fix grep pattern when mklibs collects executables in rootfs

PATCH In review Lei Liu 3 participants 5 messages Nov 11, 2013 – Nov 27, 2013 1 message not in the archive

lore
Share & tools
lore

Lei Liu

author
#0 lore raw

PATCH 2/2 Fix grep pattern when mklibs collects executables in rootfs

From: Lei Liu <[email protected]>

File command in some version could print extra space between "LSB" and "executable" - it causes mklibs can't find any executables using grep "LSB executable". Fix the grep pattern to catch multiple spaces.

---
 meta/classes/image-mklibs.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
meta/classes/image-mklibs.bbclass +1 -1
index 66b0f52..e975f5d 100644
@@ -9,7 +9,7 @@ mklibs_optimize_image_doit() {
 	du -bs > ${WORKDIR}/mklibs/du.before.mklibs.txt
 	for i in `find .`; do file $i; done \
 		| grep ELF \
-		| grep "LSB executable" \
+		| grep "LSB *executable" \
 		| grep "dynamically linked" \
 		| sed "s/:.*//" \
 		| sed "s+^\./++" \
Signature · 1 line
1.7.0.4
#1 lore raw
Quoted 11 lines · Lei Liu

From: Lei Liu <[email protected]>

File command in some version could print extra space between "LSB" and "executable" - it causes mklibs can't find any executables using grep "LSB executable". Fix the grep pattern to catch multiple spaces.

---
 meta/classes/image-mklibs.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

I've queued this but please put the area name in the short line of the commit in future ("image-mklibs: " in this case).

Cheers,

Richard

author
#2 lore raw
Quoted 8 lines · Richard Purdie
Quoted 7 lines · Lei Liu

From: Lei Liu <[email protected]>

File command in some version could print extra space between "LSB" and "executable" - it causes mklibs can't find any executables using grep "LSB executable". Fix the grep pattern to catch multiple spaces.

Quoted 7 lines
Quoted 4 lines
---
 meta/classes/image-mklibs.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

I've queued this but please put the area name in the short line of the commit in future ("image-mklibs: " in this case).

Okay. Thanks.

Lei

#3 lore raw

hi,

Quoted 13 lines · Lei Liu
Quoted 12 lines · Richard Purdie
Quoted 11 lines · Lei Liu

From: Lei Liu <[email protected]>

File command in some version could print extra space between "LSB" and "executable" - it causes mklibs can't find any executables using grep "LSB executable". Fix the grep pattern to catch multiple spaces.

---
 meta/classes/image-mklibs.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Quoted 5 lines
Quoted 3 lines

I've queued this but please put the area name in the short line of the commit in future ("image-mklibs: " in this case).

Okay. Thanks.

First of all, this patch is needed on dora branch too , and it applies cleanly, can that be merged?

Now, the real question... i am not able to get mklibs to work at all (even with this patch). What i am seeing is that mklibs 0.1.38 doesn't support anymore the use of 'sysroot'. I think this is because of this upstream change

http://anonscm.debian.org/gitweb/?p=d-i/mklibs.git;a=commit;h=60bda7e2132d197e1c88afb5012f9677b6967db2

If I revert to 0.1.34 (that we had on dylan branch), i can build my image just fine (note that I am building an arm soft-float image), so are you able to use image-mklibs with dora or master which have 0.1.38?

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw
Quoted 10 lines · Lei Liu
Quoted 1 line

If I revert to 0.1.34 (that we had on dylan branch), i can build my

image just fine (note that I am building an arm soft-float image), so are you able to use image-mklibs with dora or master which have 0.1.38?

Quoted 1 line

Hi,

I'm testing on master. And I'm able to build my qemux86 image with mklibs-0.1.38.

ok, thanks for your answer.

I tested this morning, and confirm that 'master' + mklibs is broken on ARM (i tested qemuarm), altough qemux86 is working.. i will try to look into that... in fact to be honest, i still believe that mklibs 0.1.38 is broken, even on x86 and that it's working for qemux86 because it uses the loader from your host instead of the one in the sysroot. In my case it's failing because it doesn't find the loader in /lib (/lib in my host):

Exception: Cannot find lib /lib/ld-linux.so.3

it should in theory look for that file in the sysroot... if you look at the upstream commit i referenced above, upstream no longer uses 'sysroot' variable to locate the loader...