From 0baf6799ae40461fbf3f18e098a3db448fec037b Mon Sep 17 00:00:00 2001 From: Yi Zhao Date: Wed, 9 Jan 2019 15:19:38 +0800 Subject: libcap: upgrade 2.25 -> 2.26 Drop 0001-Fix-build-with-gperf-3.1.patch as it had been fixed upstream. Signed-off-by: Yi Zhao Signed-off-by: Richard Purdie --- .../files/0001-Fix-build-with-gperf-3.1.patch | 41 ------------ meta/recipes-support/libcap/libcap_2.25.bb | 74 ---------------------- meta/recipes-support/libcap/libcap_2.26.bb | 73 +++++++++++++++++++++ 3 files changed, 73 insertions(+), 115 deletions(-) delete mode 100644 meta/recipes-support/libcap/files/0001-Fix-build-with-gperf-3.1.patch delete mode 100644 meta/recipes-support/libcap/libcap_2.25.bb create mode 100644 meta/recipes-support/libcap/libcap_2.26.bb (limited to 'meta/recipes-support/libcap') diff --git a/meta/recipes-support/libcap/files/0001-Fix-build-with-gperf-3.1.patch b/meta/recipes-support/libcap/files/0001-Fix-build-with-gperf-3.1.patch deleted file mode 100644 index 110ef902da..0000000000 --- a/meta/recipes-support/libcap/files/0001-Fix-build-with-gperf-3.1.patch +++ /dev/null @@ -1,41 +0,0 @@ -From a05eba68c42222f02465d7ba376015926433c531 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Wed, 26 Jul 2017 13:37:49 +0300 -Subject: [PATCH] Fix build with gperf 3.1 - -The generated gperf file refers to size_t which needs to be -provided by stddef.h include. Also, adjust the makefile -to match the declaration in the gperf file. - -Upstream-Status: Pending -Signed-off-by: Alexander Kanavin - ---- - libcap/Makefile | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libcap/Makefile b/libcap/Makefile -index d189777..1a57206 100644 ---- a/libcap/Makefile -+++ b/libcap/Makefile -@@ -22,7 +22,7 @@ all: $(MINLIBNAME) $(STALIBNAME) libcap.pc - - ifeq ($(BUILD_GPERF),yes) - USE_GPERF_OUTPUT = $(GPERF_OUTPUT) --INCLUDE_GPERF_OUTPUT = -include $(GPERF_OUTPUT) -+INCLUDE_GPERF_OUTPUT = -include stddef.h -include $(GPERF_OUTPUT) - endif - - libcap.pc: libcap.pc.in -@@ -41,7 +41,7 @@ cap_names.h: _makenames - ./_makenames > cap_names.h - - $(GPERF_OUTPUT): cap_names.list.h -- perl -e 'print "struct __cap_token_s { const char *name; int index; };\n%{\nconst struct __cap_token_s *__cap_lookup_name(const char *, unsigned int);\n%}\n%%\n"; while ($$l = <>) { $$l =~ s/[\{\"]//g; $$l =~ s/\}.*// ; print $$l; }' < $< | gperf --ignore-case --language=ANSI-C --readonly --null-strings --global-table --hash-function-name=__cap_hash_name --lookup-function-name="__cap_lookup_name" -c -t -m20 $(INDENT) > $@ -+ perl -e 'print "struct __cap_token_s { const char *name; int index; };\n%{\nconst struct __cap_token_s *__cap_lookup_name(const char *, register size_t);\n%}\n%%\n"; while ($$l = <>) { $$l =~ s/[\{\"]//g; $$l =~ s/\}.*// ; print $$l; }' < $< | gperf --ignore-case --language=ANSI-C --readonly --null-strings --global-table --hash-function-name=__cap_hash_name --lookup-function-name="__cap_lookup_name" -c -t -m20 $(INDENT) > $@ - - cap_names.list.h: Makefile $(KERNEL_HEADERS)/linux/capability.h - @echo "=> making $@ from $(KERNEL_HEADERS)/linux/capability.h" --- -2.13.2 - diff --git a/meta/recipes-support/libcap/libcap_2.25.bb b/meta/recipes-support/libcap/libcap_2.25.bb deleted file mode 100644 index 6df674547c..0000000000 --- a/meta/recipes-support/libcap/libcap_2.25.bb +++ /dev/null @@ -1,74 +0,0 @@ -SUMMARY = "Library for getting/setting POSIX.1e capabilities" -HOMEPAGE = "http://sites.google.com/site/fullycapable/" - -# no specific GPL version required -LICENSE = "BSD | GPLv2" -LIC_FILES_CHKSUM = "file://License;md5=3f84fd6f29d453a56514cb7e4ead25f1" - -DEPENDS = "hostperl-runtime-native gperf-native" - -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 \ - file://0001-Fix-build-with-gperf-3.1.patch \ - " -SRC_URI[md5sum] = "6666b839e5d46c2ad33fc8aa2ceb5f77" -SRC_URI[sha256sum] = "693c8ac51e983ee678205571ef272439d83afe62dd8e424ea14ad9790bc35162" - -inherit lib_package - -# do NOT pass target cflags to host compilations -# -do_configure() { - # libcap uses := for compilers, fortunately, it gives us a hint - # on what should be replaced with ?= - sed -e 's,:=,?=,g' -i Make.Rules - sed -e 's,^BUILD_CFLAGS ?= $(.*CFLAGS),BUILD_CFLAGS := $(BUILD_CFLAGS),' -i Make.Rules -} - -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" -PACKAGECONFIG_class-native ??= "" - -PACKAGECONFIG[pam] = "PAM_CAP=yes,PAM_CAP=no,libpam" - -EXTRA_OEMAKE = " \ - INDENT= \ - lib='${baselib}' \ - RAISE_SETFCAP=no \ - DYNAMIC=yes \ - BUILD_GPERF=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 ${PACKAGECONFIG_CONFARGS} -} - -do_install() { - oe_runmake install \ - ${PACKAGECONFIG_CONFARGS} \ - DESTDIR="${D}" \ - prefix="${prefix}" \ - SBINDIR="${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}/libcap* ${D}${base_libdir} - if [ -d ${D}${libdir}/security ]; then - mv ${D}${libdir}/security ${D}${base_libdir} - fi - fi -} - -FILES_${PN}-dev += "${base_libdir}/*.so" - -# pam files -FILES_${PN} += "${base_libdir}/security/*.so" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-support/libcap/libcap_2.26.bb b/meta/recipes-support/libcap/libcap_2.26.bb new file mode 100644 index 0000000000..14841de4a7 --- /dev/null +++ b/meta/recipes-support/libcap/libcap_2.26.bb @@ -0,0 +1,73 @@ +SUMMARY = "Library for getting/setting POSIX.1e capabilities" +HOMEPAGE = "http://sites.google.com/site/fullycapable/" + +# no specific GPL version required +LICENSE = "BSD | GPLv2" +LIC_FILES_CHKSUM = "file://License;md5=3f84fd6f29d453a56514cb7e4ead25f1" + +DEPENDS = "hostperl-runtime-native gperf-native" + +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] = "968ac4d42a1a71754313527be2ab5df3" +SRC_URI[sha256sum] = "b630b7c484271b3ba867680d6a14b10a86cfa67247a14631b14c06731d5a458b" + +inherit lib_package + +# do NOT pass target cflags to host compilations +# +do_configure() { + # libcap uses := for compilers, fortunately, it gives us a hint + # on what should be replaced with ?= + sed -e 's,:=,?=,g' -i Make.Rules + sed -e 's,^BUILD_CFLAGS ?= $(.*CFLAGS),BUILD_CFLAGS := $(BUILD_CFLAGS),' -i Make.Rules +} + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" +PACKAGECONFIG_class-native ??= "" + +PACKAGECONFIG[pam] = "PAM_CAP=yes,PAM_CAP=no,libpam" + +EXTRA_OEMAKE = " \ + INDENT= \ + lib='${baselib}' \ + RAISE_SETFCAP=no \ + DYNAMIC=yes \ + BUILD_GPERF=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 ${PACKAGECONFIG_CONFARGS} +} + +do_install() { + oe_runmake install \ + ${PACKAGECONFIG_CONFARGS} \ + DESTDIR="${D}" \ + prefix="${prefix}" \ + SBINDIR="${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}/libcap* ${D}${base_libdir} + if [ -d ${D}${libdir}/security ]; then + mv ${D}${libdir}/security ${D}${base_libdir} + fi + fi +} + +FILES_${PN}-dev += "${base_libdir}/*.so" + +# pam files +FILES_${PN} += "${base_libdir}/security/*.so" + +BBCLASSEXTEND = "native nativesdk" -- cgit 1.2.3-korg