Skip to contentSkip to conversation

libcap: minor tweaks and fixes

PATCH New Andre McCurdy 1 participant 4 messages Jul 16, 2015

lore
Share & tools
lore
#0 lore raw

cover libcap: minor tweaks and fixes

Andre McCurdy (3):
libcap: always link apps dynamically
libcap: avoid losing default Large File Support CFLAGS
libcap: control attr PACKAGECONFIG option via xattr DISTRO feature

 meta/recipes-support/libcap/libcap_2.24.bb | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/3 libcap: always link apps dynamically

Without the explicit over-ride, apps will be linked statically if a .git directory is found in the top level source directory.

---
 meta/recipes-support/libcap/libcap_2.24.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-support/libcap/libcap_2.24.bb +1 -0
index f50dc94..e8ae7ce 100644
@@ -36,6 +36,7 @@ EXTRA_OEMAKE = " \
   INDENT=  \
   lib=${@os.path.basename('${libdir}')} \
   RAISE_SETFCAP=no \
+  DYNAMIC=yes \
 "
 
 EXTRA_OEMAKE_append_class-target = " SYSTEM_HEADERS=${STAGING_INCDIR}"
Signature · 1 line
1.9.1
#2 lore raw

PATCH 2/3 libcap: avoid losing default Large File Support CFLAGS

In reply to Andre McCurdy

-D_LARGEFILE64_SOURCE and -D_FILE_OFFSET_BITS=64 are present in the default libcap CFLAGS. Add them to the OE CFLAGS too, so that they are still in effect when the OE CFLAGS over-ride the defaults.

---
 meta/recipes-support/libcap/libcap_2.24.bb | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-support/libcap/libcap_2.24.bb +3 -0
index e8ae7ce..161bb70 100644
@@ -41,6 +41,9 @@ EXTRA_OEMAKE = " \
 
 EXTRA_OEMAKE_append_class-target = " SYSTEM_HEADERS=${STAGING_INCDIR}"
 
+# these are present in the libcap defaults, so include in our CFLAGS too
+CFLAGS += "-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
+
 do_compile() {
 	oe_runmake ${EXTRA_OECONF}
 }
Signature · 1 line
1.9.1
#3 lore raw

PATCH 3/3 libcap: control attr PACKAGECONFIG via xattr DISTRO feature

In reply to Andre McCurdy
---
 meta/recipes-support/libcap/libcap_2.24.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-support/libcap/libcap_2.24.bb +2 -1
index 161bb70..36b94ee 100644
@@ -26,7 +26,8 @@ do_configure() {
 	sed -e '/shell gperf/cifeq (,yes)' -i libcap/Makefile
 }
 
-PACKAGECONFIG ??= "attr ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)}"
 PACKAGECONFIG_class-native ??= ""
 
 PACKAGECONFIG[attr] = "LIBATTR=yes,LIBATTR=no,attr"
Signature · 1 line
1.9.1