From 499c092ff59200bcce94c4af4f032d0831597916 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Sat, 1 Aug 2020 23:23:34 +0200 Subject: libcap: update 2.36 -> 2.41 (From OE-Core rev: a29045d750b0c75878b6b6237bc657a1ff0b86ac) Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- .../0001-tests-do-not-statically-link-a-test.patch | 8 +-- .../0002-tests-do-not-run-target-executables.patch | 15 ++--- meta/recipes-support/libcap/libcap_2.36.bb | 76 ---------------------- meta/recipes-support/libcap/libcap_2.41.bb | 76 ++++++++++++++++++++++ 4 files changed, 86 insertions(+), 89 deletions(-) delete mode 100644 meta/recipes-support/libcap/libcap_2.36.bb create mode 100644 meta/recipes-support/libcap/libcap_2.41.bb diff --git a/meta/recipes-support/libcap/files/0001-tests-do-not-statically-link-a-test.patch b/meta/recipes-support/libcap/files/0001-tests-do-not-statically-link-a-test.patch index 912f33f165..81fdd2a15c 100644 --- a/meta/recipes-support/libcap/files/0001-tests-do-not-statically-link-a-test.patch +++ b/meta/recipes-support/libcap/files/0001-tests-do-not-statically-link-a-test.patch @@ -1,4 +1,4 @@ -From 24d59c99bcba065f1f40f49f870a5f6483b4b078 Mon Sep 17 00:00:00 2001 +From e4fe6890e07821d60f01f000a95f7944f3d68139 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Wed, 15 Jan 2020 17:16:28 +0100 Subject: [PATCH] tests: do not statically link a test @@ -13,10 +13,10 @@ Signed-off-by: Alexander Kanavin 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/Makefile b/tests/Makefile -index f9cec56..aa0d09b 100644 +index 876a8b9..93a0e3a 100644 --- a/tests/Makefile +++ b/tests/Makefile -@@ -29,23 +29,23 @@ psx_test_wrap: psx_test.c $(DEPS) +@@ -26,23 +26,23 @@ psx_test: psx_test.c $(DEPS) run_libcap_psx_test: libcap_psx_test libcap_psx_test: libcap_psx_test.c $(DEPS) @@ -43,4 +43,4 @@ index f9cec56..aa0d09b 100644 + $(CC) $(CFLAGS) $< -o $@ clean: - rm -f psx_test psx_test_wrap libcap_psx_test libcap_launch_test *~ + rm -f psx_test libcap_psx_test libcap_launch_test *~ diff --git a/meta/recipes-support/libcap/files/0002-tests-do-not-run-target-executables.patch b/meta/recipes-support/libcap/files/0002-tests-do-not-run-target-executables.patch index 26d108c209..e8f1df98c1 100644 --- a/meta/recipes-support/libcap/files/0002-tests-do-not-run-target-executables.patch +++ b/meta/recipes-support/libcap/files/0002-tests-do-not-run-target-executables.patch @@ -1,4 +1,4 @@ -From 6309554225e05e76167eda4e0df383fb3d1a62c3 Mon Sep 17 00:00:00 2001 +From 5583b48c04d5bf50b56473d88d990c3f0bc45c14 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Fri, 20 Dec 2019 16:54:05 +0100 Subject: [PATCH] tests: do not run target executables @@ -7,23 +7,20 @@ Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin --- - tests/Makefile | 3 --- - 1 file changed, 3 deletions(-) + tests/Makefile | 2 -- + 1 file changed, 2 deletions(-) diff --git a/tests/Makefile b/tests/Makefile -index 95e4ca6..7162cf0 100644 +index bfedbc2..876a8b9 100644 --- a/tests/Makefile +++ b/tests/Makefile -@@ -19,8 +19,6 @@ sudotest: test +@@ -19,13 +19,11 @@ sudotest: test run_libcap_launch_test run_libcap_launch_test install: all - run_psx_test: psx_test psx_test_wrap + run_psx_test: psx_test - ./psx_test -- ./psx_test_wrap psx_test: psx_test.c $(DEPS) - $(CC) $(CFLAGS) $(IPATH) -DNOWRAP $< -o $@ $(LIBPSXLIB) -@@ -29,7 +27,6 @@ psx_test_wrap: psx_test.c $(DEPS) $(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LIBPSXLIB) -Wl,-wrap,pthread_create run_libcap_psx_test: libcap_psx_test diff --git a/meta/recipes-support/libcap/libcap_2.36.bb b/meta/recipes-support/libcap/libcap_2.36.bb deleted file mode 100644 index 2c98db6eeb..0000000000 --- a/meta/recipes-support/libcap/libcap_2.36.bb +++ /dev/null @@ -1,76 +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://0002-tests-do-not-run-target-executables.patch \ - file://0001-tests-do-not-statically-link-a-test.patch \ - " -SRC_URI[sha256sum] = "5048c849bdbbe24d2ca59463142cb279abec5edf3ab6731ab35a596bcf538a49" - -UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/linux/libs/security/linux-privs/${BPN}2/" - -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 ?= ,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.41.bb b/meta/recipes-support/libcap/libcap_2.41.bb new file mode 100644 index 0000000000..52d2f13e16 --- /dev/null +++ b/meta/recipes-support/libcap/libcap_2.41.bb @@ -0,0 +1,76 @@ +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://0002-tests-do-not-run-target-executables.patch \ + file://0001-tests-do-not-statically-link-a-test.patch \ + " +SRC_URI[sha256sum] = "880dac4f97795bf5bd0d77ae6476d8c6a854601eb0c461d5a5b91f07d8e60834" + +UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/linux/libs/security/linux-privs/${BPN}2/" + +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 ?= ,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 v1.2.3-54-g00ecf