[gnome-continuous-yocto/gnomeostree-3.14-dizzy] meta: Update libcap to 2.25
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.14-dizzy] meta: Update libcap to 2.25
- Date: Mon, 22 Aug 2016 09:10:51 +0000 (UTC)
commit 7c9cb5986cdfee8577653ccda9c434f4ed28ebe9
Author: Emmanuele Bassi <ebassi gnome org>
Date: Mon Aug 22 10:09:37 2016 +0100
meta: Update libcap to 2.25
The 2.22 version (released in 2012) is missing the libcap.pc file
(adding in 2013).
I've re-sync'ed the libcap recipe from Yocto's current version, in the
hope nothing breaks too badly.
...XATTR_NAME_CAPS-is-defined-when-it-is-use.patch | 32 ++++++++++++++
.../libcap/libcap/fix-CAP_LAST_CAP.patch | 39 -----------------
meta/recipes-support/libcap/libcap_2.22.bb | 6 ---
.../libcap/{libcap.inc => libcap_2.25.bb} | 45 ++++++--------------
4 files changed, 45 insertions(+), 77 deletions(-)
---
diff --git
a/meta/recipes-support/libcap/libcap/0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch
b/meta/recipes-support/libcap/libcap/0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch
new file mode 100644
index 0000000..05c771a
--- /dev/null
+++ b/meta/recipes-support/libcap/libcap/0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch
@@ -0,0 +1,32 @@
+Ensure the XATTR_NAME_CAPS is defined when it is used
+
+Upstream-Status: Pending
+
+VFS_CAP_U32 can not ensure that XATTR_NAME_CAPS is defined, and failed to build
+libcap-native in old release, like CentOS release 6.7 (Final), with the blow
+error:
+ cap_file.c: In function ‘cap_get_fd’:
+ cap_file.c:199: error: ‘XATTR_NAME_CAPS’ undeclared (first use in this function)
+ cap_file.c:199: error: (Each undeclared identifier is reported only once
+
+Signed-off-by: Roy Li <rongqing li windriver com>
+---
+ libcap/cap_file.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libcap/cap_file.c b/libcap/cap_file.c
+index 40756ea..e27ca80 100644
+--- a/libcap/cap_file.c
++++ b/libcap/cap_file.c
+@@ -25,7 +25,7 @@ extern int fremovexattr(int, const char *);
+
+ #include "libcap.h"
+
+-#ifdef VFS_CAP_U32
++#if defined (VFS_CAP_U32) && defined (XATTR_NAME_CAPS)
+
+ #if VFS_CAP_U32 != __CAP_BLKS
+ # error VFS representation of capabilities is not the same size as kernel
+--
+2.8.1
+
diff --git a/meta/recipes-support/libcap/libcap.inc b/meta/recipes-support/libcap/libcap_2.25.bb
similarity index 55%
rename from meta/recipes-support/libcap/libcap.inc
rename to meta/recipes-support/libcap/libcap_2.25.bb
index 0e28ea0..139dba5 100644
--- a/meta/recipes-support/libcap/libcap.inc
+++ b/meta/recipes-support/libcap/libcap_2.25.bb
@@ -5,12 +5,13 @@ HOMEPAGE = "http://sites.google.com/site/fullycapable/"
LICENSE = "BSD | GPLv2"
LIC_FILES_CHKSUM = "file://License;md5=3f84fd6f29d453a56514cb7e4ead25f1"
-DEPENDS = "perl-native-runtime"
+DEPENDS = "hostperl-runtime-native"
-SRC_URI = "${DEBIAN_MIRROR}/main/libc/libcap2/${BPN}2_${PV}.orig.tar.gz \
- file://fix-CAP_LAST_CAP.patch"
-
-PR = "r1"
+SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${PV}.tar.xz \
+ file://0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch \
+"
+SRC_URI[md5sum] = "6666b839e5d46c2ad33fc8aa2ceb5f77"
+SRC_URI[sha256sum] = "693c8ac51e983ee678205571ef272439d83afe62dd8e424ea14ad9790bc35162"
inherit lib_package
@@ -26,45 +27,25 @@ 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"
PACKAGECONFIG[pam] = "PAM_CAP=yes,PAM_CAP=no,libpam"
-EXTRA_OEMAKE += " \
+EXTRA_OEMAKE = " \
INDENT= \
lib=${@os.path.basename('${libdir}')} \
RAISE_SETFCAP=no \
+ DYNAMIC=yes \
"
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}
}
-
-do_install() {
- oe_runmake install \
- ${EXTRA_OECONF} \
- DESTDIR="${D}" \
- prefix="${prefix}" \
- SBINDIR="${D}${sbindir}"
-}
-
-do_install_append() {
- # Move the library to base_libdir
- install -d ${D}${base_libdir}
- if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
- mv ${D}${libdir}/* ${D}${base_libdir}
- rmdir ${D}${libdir}
- fi
-}
-
-FILES_${PN}-dev += "${base_libdir}/*.so"
-
-# pam files
-FILES_${PN} += "${base_libdir}/security/*.so"
-FILES_${PN}-dbg += "${base_libdir}/security/.debug/*.so"
-
-BBCLASSEXTEND = "native nativesdk"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]