* [PATCH] acl attr libcap: mark shared libraries executable
@ 2013-06-14 8:09 jackie.huang
2013-06-14 8:53 ` Burton, Ross
0 siblings, 1 reply; 3+ messages in thread
From: jackie.huang @ 2013-06-14 8:09 UTC (permalink / raw)
To: openembedded-core
From: Jackie Huang <jackie.huang@windriver.com>
While it is not necessary that shared libraries be executable,
if they are not marked as such bitbake will not examine them
for debug information. So, we make them executable at the end of
installation.
Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
meta/recipes-support/attr/acl.inc | 4 ++++
meta/recipes-support/attr/attr.inc | 4 ++++
meta/recipes-support/libcap/libcap.inc | 7 ++++++-
3 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/meta/recipes-support/attr/acl.inc b/meta/recipes-support/attr/acl.inc
index b504517..060d09b 100644
--- a/meta/recipes-support/attr/acl.inc
+++ b/meta/recipes-support/attr/acl.inc
@@ -20,7 +20,11 @@ do_configure_append() {
}
# libdir should point to .la
+# install somehow leaves the actual shared library 644 instead of 755
+# this means it will be ignored for debug info extraction
+#
do_install_append() {
sed -i ${D}${libdir}/libacl.la -e \
s,^libdir=\'${base_libdir}\'$,libdir=\'${libdir}\',
+ chmod a+x ${D}${base_libdir}/*.so.*.*
}
diff --git a/meta/recipes-support/attr/attr.inc b/meta/recipes-support/attr/attr.inc
index eaed7af..375d2e9 100644
--- a/meta/recipes-support/attr/attr.inc
+++ b/meta/recipes-support/attr/attr.inc
@@ -18,7 +18,11 @@ SRC_URI = "http://download.savannah.gnu.org/releases/attr/${BP}.src.tar.gz \
require ea-acl.inc
# libdir should point to .la
+# install somehow leaves the actual shared library 644 instead of 755
+# this means it will be ignored for debug info extraction
+#
do_install_append() {
sed -i ${D}${libdir}/libattr.la -e \
s,^libdir=\'${base_libdir}\'$,libdir=\'${libdir}\',
+ chmod a+x ${D}${base_libdir}/*.so.*.*
}
diff --git a/meta/recipes-support/libcap/libcap.inc b/meta/recipes-support/libcap/libcap.inc
index 7f16a56..2fd5718 100644
--- a/meta/recipes-support/libcap/libcap.inc
+++ b/meta/recipes-support/libcap/libcap.inc
@@ -12,7 +12,7 @@ DEPENDS_class-native = "perl-native-runtime"
SRC_URI = "${DEBIAN_MIRROR}/main/libc/libcap2/${BPN}2_${PV}.orig.tar.gz"
-PR = "r1"
+PR = "r2"
inherit lib_package
@@ -51,6 +51,11 @@ do_install_append() {
mv ${D}${libdir}/* ${D}${base_libdir}
rmdir ${D}${libdir}
fi
+
+ # install somehow leaves the actual shared library 644 instead of 755
+ # this means it will be ignored for debug info extraction
+ #
+ chmod a+x ${D}${base_libdir}/*.so.*.*
}
FILES_${PN}-dev += "${base_libdir}/*.so"
--
1.7.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] acl attr libcap: mark shared libraries executable
2013-06-14 8:09 [PATCH] acl attr libcap: mark shared libraries executable jackie.huang
@ 2013-06-14 8:53 ` Burton, Ross
2013-06-14 14:55 ` Mark Hatle
0 siblings, 1 reply; 3+ messages in thread
From: Burton, Ross @ 2013-06-14 8:53 UTC (permalink / raw)
To: jackie.huang; +Cc: openembedded-core
On 14 June 2013 09:09, <jackie.huang@windriver.com> wrote:
> From: Jackie Huang <jackie.huang@windriver.com>
>
> While it is not necessary that shared libraries be executable,
> if they are not marked as such bitbake will not examine them
> for debug information. So, we make them executable at the end of
> installation.
Wouldn't it be preferable to change the class that does the debug
extraction so that it doesn't require executable bits on libraries?
Fix the cause not the symptoms and all that.
Ross
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] acl attr libcap: mark shared libraries executable
2013-06-14 8:53 ` Burton, Ross
@ 2013-06-14 14:55 ` Mark Hatle
0 siblings, 0 replies; 3+ messages in thread
From: Mark Hatle @ 2013-06-14 14:55 UTC (permalink / raw)
To: openembedded-core
On 6/14/13 3:53 AM, Burton, Ross wrote:
> On 14 June 2013 09:09, <jackie.huang@windriver.com> wrote:
>> From: Jackie Huang <jackie.huang@windriver.com>
>>
>> While it is not necessary that shared libraries be executable,
>> if they are not marked as such bitbake will not examine them
>> for debug information. So, we make them executable at the end of
>> installation.
>
> Wouldn't it be preferable to change the class that does the debug
> extraction so that it doesn't require executable bits on libraries?
> Fix the cause not the symptoms and all that.
I thought the class specifically looked for items in ${base_libdir} and
${libdir} as well as executables elsewhere in the system.
We don't want to blindly scan and filter everything that is ELF, so the
executable flag makes sense outside of the libdir.
from package.bbclass, split_and_strip_files:
libdir = os.path.abspath(dvar + os.sep + d.getVar("libdir", True))
baselibdir = os.path.abspath(dvar + os.sep + d.getVar("base_libdir", True))
for root, dirs, files in cpath.walk(dvar):
for f in files:
# Check its an excutable
if (s[stat.ST_MODE] & stat.S_IXUSR) or (s[stat.ST_MODE] &
stat.S_IXGRP) or (s[stat.ST_MODE] & stat.S_IXOTH) \
or ((file.startswith(libdir) or
file.startswith(baselibdir)) and ".so" in f):
if elf ...
add to list of files to split/strip
So the above iterates and checks if it is executable -or- lives in the libdir
and baselibdir directory -and- contains '.so' in the name.
If this is not working, we need to fix it.. If this is working, but something
later isn't, we need to fix that then.
It may be that the tool we're using (debugedit) requires the binaries to be
executable, if that is the case then we'll need to capture the original perms,
add executable, run debugedit and restore them. But this will need some further
investigation.
> Ross
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-06-14 14:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-14 8:09 [PATCH] acl attr libcap: mark shared libraries executable jackie.huang
2013-06-14 8:53 ` Burton, Ross
2013-06-14 14:55 ` Mark Hatle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox