From 86d657364bb2ed859ed7151d56cca431104d8279 Mon Sep 17 00:00:00 2001 From: Yi Zhao Date: Wed, 23 Dec 2020 10:23:25 +0800 Subject: libcap: update 2.45 -> 2.46 Rebase 0001-tests-do-not-statically-link-a-test.patch Signed-off-by: Yi Zhao Signed-off-by: Richard Purdie --- .../0001-tests-do-not-statically-link-a-test.patch | 10 +-- meta/recipes-support/libcap/libcap_2.45.bb | 76 ---------------------- meta/recipes-support/libcap/libcap_2.46.bb | 76 ++++++++++++++++++++++ 3 files changed, 82 insertions(+), 80 deletions(-) delete mode 100644 meta/recipes-support/libcap/libcap_2.45.bb create mode 100644 meta/recipes-support/libcap/libcap_2.46.bb (limited to 'meta/recipes-support/libcap') 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 3c737b884e..d2653afb75 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 c22c6c16362c7dbc8d6faea06edee5e07759c5fa Mon Sep 17 00:00:00 2001 +From 6aa15fe548e5b1d6ca3b373779beb7521ea95ba9 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 @@ -7,7 +7,6 @@ This fails on e.g. centos 7 Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin - --- progs/Makefile | 2 +- tests/Makefile | 4 ++-- @@ -27,7 +26,7 @@ index 1d7fc7a..37db8f7 100644 sudotest: test tcapsh-static sudo $(LDPATH) ./quicktest.sh diff --git a/tests/Makefile b/tests/Makefile -index 3431df9..727fb86 100644 +index 01f7589..094ec57 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -22,7 +22,7 @@ ifeq ($(PTHREADS),yes) @@ -36,7 +35,7 @@ index 3431df9..727fb86 100644 else -LDFLAGS += --static +LDFLAGS += - DEPS=../libcap/libcap.a ../progs/tcapsh-static + DEPS=../libcap/libcap.a ifeq ($(PTHREADS),yes) DEPS += ../libcap/libpsx.a @@ -106,7 +106,7 @@ noexploit: exploit.o $(DEPS) @@ -48,3 +47,6 @@ index 3431df9..727fb86 100644 clean: rm -f psx_test libcap_psx_test libcap_launch_test *~ +-- +2.17.1 + diff --git a/meta/recipes-support/libcap/libcap_2.45.bb b/meta/recipes-support/libcap/libcap_2.45.bb deleted file mode 100644 index 067ba32d99..0000000000 --- a/meta/recipes-support/libcap/libcap_2.45.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] = "d66639f765c0e10557666b00f519caf0bd07a95f867dddaee131cd284fac3286" - -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.46.bb b/meta/recipes-support/libcap/libcap_2.46.bb new file mode 100644 index 0000000000..605a738127 --- /dev/null +++ b/meta/recipes-support/libcap/libcap_2.46.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] = "4ed3d11413fa6c9667e49f819808fbb581cd8864b839f87d7c2a02c70f21d8b4" + +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 1.2.3-korg