[gnome-continuous-yocto/gnomeostree-3.14-dizzy] Revert "meta: Update libcap to 2.25"



commit 0a7a430f788e4f193461b69278463c4aca85bf0b
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Mon Aug 22 10:22:31 2016 +0100

    Revert "meta: Update libcap to 2.25"
    
    This reverts commit 7c9cb5986cdfee8577653ccda9c434f4ed28ebe9.
    
    Breaks the build because of:
    
    ERROR: Nothing PROVIDES 'hostperl-runtime-native' (but
    
/srv/ostree/ostbuild/work/builds/2016/08/22/18/build/build-yocto-x86_64/yocto/meta/recipes-support/libcap/libcap_2.25.bb
    DEPENDS on or otherwise requires it)

 .../libcap/{libcap_2.25.bb => libcap.inc}          |   45 ++++++++++++++------
 ...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 +++
 4 files changed, 77 insertions(+), 45 deletions(-)
---
diff --git a/meta/recipes-support/libcap/libcap_2.25.bb b/meta/recipes-support/libcap/libcap.inc
similarity index 55%
rename from meta/recipes-support/libcap/libcap_2.25.bb
rename to meta/recipes-support/libcap/libcap.inc
index 139dba5..0e28ea0 100644
--- a/meta/recipes-support/libcap/libcap_2.25.bb
+++ b/meta/recipes-support/libcap/libcap.inc
@@ -5,13 +5,12 @@ HOMEPAGE = "http://sites.google.com/site/fullycapable/";
 LICENSE = "BSD | GPLv2"
 LIC_FILES_CHKSUM = "file://License;md5=3f84fd6f29d453a56514cb7e4ead25f1"
 
-DEPENDS = "hostperl-runtime-native"
+DEPENDS = "perl-native-runtime"
 
-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"
+SRC_URI = "${DEBIAN_MIRROR}/main/libc/libcap2/${BPN}2_${PV}.orig.tar.gz \
+           file://fix-CAP_LAST_CAP.patch"
+
+PR = "r1"
 
 inherit lib_package
 
@@ -27,25 +26,45 @@ do_configure() {
        sed -e '/shell gperf/cifeq (,yes)' -i libcap/Makefile
 }
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
-                   ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)}"
+PACKAGECONFIG ??= "attr ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', 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"
diff --git a/meta/recipes-support/libcap/libcap/fix-CAP_LAST_CAP.patch 
b/meta/recipes-support/libcap/libcap/fix-CAP_LAST_CAP.patch
new file mode 100644
index 0000000..a557188
--- /dev/null
+++ b/meta/recipes-support/libcap/libcap/fix-CAP_LAST_CAP.patch
@@ -0,0 +1,39 @@
+fix CAP_LAST_CAP
+
+Upstream-Status: pending
+
+Two new capability CAP_BLOCK_SUSPEND and CAP_WAKE_ALARM have been added into
+kernel, but libcap did not update them.
+Once libcap uses its capability.h (the default value of KERNEL_HEADERS), and
+application always use capability.h from kernel, that will make cap_get_flag
+return wrong value.
+
+Signed-off-by: Roy Li <rongqing li windriver com>
+---
+ libcap/include/linux/capability.h |   10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/libcap/include/linux/capability.h b/libcap/include/linux/capability.h
+index 4924f2a..57026be 100644
+--- a/libcap/include/linux/capability.h
++++ b/libcap/include/linux/capability.h
+@@ -360,7 +360,15 @@ struct cpu_vfs_cap_data {
+    CAP_SYS_ADMIN is not acceptable anymore. */
+ #define CAP_SYSLOG           34
+ 
+-#define CAP_LAST_CAP         CAP_SYSLOG
++/* Allow triggering something that will wake the system */
++
++#define CAP_WAKE_ALARM            35
++
++/* Allow preventing system suspends */
++
++#define CAP_BLOCK_SUSPEND    36
++
++#define CAP_LAST_CAP         CAP_BLOCK_SUSPEND
+ 
+ #define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP)
+ 
+-- 
+1.7.10.4
+
diff --git a/meta/recipes-support/libcap/libcap_2.22.bb b/meta/recipes-support/libcap/libcap_2.22.bb
new file mode 100644
index 0000000..a989bb6
--- /dev/null
+++ b/meta/recipes-support/libcap/libcap_2.22.bb
@@ -0,0 +1,6 @@
+require libcap.inc
+
+PR = "r6"
+
+SRC_URI[md5sum] = "b4896816b626bea445f0b3849bdd4077"
+SRC_URI[sha256sum] = "e1cae65d8febf2579be37c255d2e058715785ead481a4e6a4357a06aff84721f"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]