From 801a17bfbe6b2296c2bbf303d864b091602efbe3 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Wed, 8 Sep 2021 20:01:01 +0200 Subject: libcap: update 2.51 -> 2.54 Rebase patches. Delete 0001-tests-do-not-statically-link-a-test.patch as centos builds are now using their own buildtools. (From OE-Core rev: ecadaa08956f53dfedee908a0344f512673b770b) Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- .../0001-tests-do-not-statically-link-a-test.patch | 52 --------------- .../0002-tests-do-not-run-target-executables.patch | 10 +-- meta/recipes-support/libcap/libcap_2.51.bb | 73 ---------------------- meta/recipes-support/libcap/libcap_2.54.bb | 73 ++++++++++++++++++++++ 4 files changed, 78 insertions(+), 130 deletions(-) delete mode 100644 meta/recipes-support/libcap/files/0001-tests-do-not-statically-link-a-test.patch delete mode 100644 meta/recipes-support/libcap/libcap_2.51.bb create mode 100644 meta/recipes-support/libcap/libcap_2.54.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 deleted file mode 100644 index 55872aa8fa..0000000000 --- a/meta/recipes-support/libcap/files/0001-tests-do-not-statically-link-a-test.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 897900f3f9084c5542097851323bba3f2691df20 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 - -This fails on e.g. centos 7 - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin ---- - progs/Makefile | 2 +- - tests/Makefile | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/progs/Makefile b/progs/Makefile -index 3e82862..48533f3 100644 ---- a/progs/Makefile -+++ b/progs/Makefile -@@ -49,7 +49,7 @@ capsh: capsh.c capshdoc.h.cf $(DEPS) - $(CC) $(IPATH) $(CAPSH_SHELL) $(CFLAGS) -o $@ $< $(LIBCAPLIB) $(LDFLAGS) - - tcapsh-static: capsh.c capshdoc.h.cf $(DEPS) -- $(CC) $(IPATH) $(CAPSH_SHELL) $(CFLAGS) -o $@ $< $(LIBCAPLIB) $(LDFLAGS) --static -+ $(CC) $(IPATH) $(CAPSH_SHELL) $(CFLAGS) -o $@ $< $(LIBCAPLIB) $(LDFLAGS) - - uns_test: ../tests/uns_test.c - $(MAKE) -C ../tests uns_test -diff --git a/tests/Makefile b/tests/Makefile -index 4a5f2f9..4266d86 100644 ---- a/tests/Makefile -+++ b/tests/Makefile -@@ -22,7 +22,7 @@ ifeq ($(PTHREADS),yes) - DEPS += ../libcap/libpsx.so - endif - else --LDFLAGS += --static -+LDFLAGS += - DEPS=../libcap/libcap.a - ifeq ($(PTHREADS),yes) - DEPS += ../libcap/libpsx.a -@@ -113,7 +113,7 @@ noexploit: exploit.o $(DEPS) - - # This one runs in a chroot with no shared library files. - noop: noop.c -- $(CC) $(CFLAGS) $< -o $@ --static -+ $(CC) $(CFLAGS) $< -o $@ - - clean: - rm -f psx_test libcap_psx_test libcap_launch_test uns_test *~ --- -2.25.1 - 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 69287152eb..0fe7295a5f 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 652071e430d5eea758965176b7648e79ad404daa Mon Sep 17 00:00:00 2001 +From cc97f84469ee7b266977a20d9cfa63c52f821384 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 @@ -11,20 +11,20 @@ Signed-off-by: Alexander Kanavin 1 file changed, 2 deletions(-) diff --git a/tests/Makefile b/tests/Makefile -index fc39fee..3431df9 100644 +index d9ed248..2864f77 100644 --- a/tests/Makefile +++ b/tests/Makefile -@@ -59,13 +59,11 @@ endif +@@ -63,13 +63,11 @@ endif # unprivileged run_psx_test: psx_test - ./psx_test psx_test: psx_test.c $(DEPS) - $(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LINKEXTRA) $(LIBPSXLIB) $(LDFLAGS) + $(CC) $(CFLAGS) $(CPPFLAGS) $< -o $@ $(LINKEXTRA) $(LIBPSXLIB) $(LDFLAGS) run_libcap_psx_test: libcap_psx_test - ./libcap_psx_test libcap_psx_test: libcap_psx_test.c $(DEPS) - $(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LINKEXTRA) $(LIBCAPLIB) $(LIBPSXLIB) $(LDFLAGS) + $(CC) $(CFLAGS) $(CPPFLAGS) $< -o $@ $(LINKEXTRA) $(LIBCAPLIB) $(LIBPSXLIB) $(LDFLAGS) diff --git a/meta/recipes-support/libcap/libcap_2.51.bb b/meta/recipes-support/libcap/libcap_2.51.bb deleted file mode 100644 index c9c30fb05f..0000000000 --- a/meta/recipes-support/libcap/libcap_2.51.bb +++ /dev/null @@ -1,73 +0,0 @@ -SUMMARY = "Library for getting/setting POSIX.1e capabilities" -DESCRIPTION = "A library providing the API to access POSIX capabilities. \ -These allow giving various kinds of specific privileges to individual \ -users, without giving them full root permissions." -HOMEPAGE = "http://sites.google.com/site/fullycapable/" -# no specific GPL version required -LICENSE = "BSD-3-Clause | GPLv2" -LIC_FILES_CHKSUM = "file://License;md5=e2370ba375efe9e1a095c26d37e483b8" - -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] = "6609f3ab7aebcc8f9277f53a577c657d9f3056d1352ea623da7fd7c0f00890f9" - -UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/linux/libs/security/linux-privs/${BPN}2/" - -inherit lib_package - -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}" - -do_compile() { - unset CFLAGS BUILD_CFLAGS - oe_runmake \ - ${PACKAGECONFIG_CONFARGS} \ - AR="${AR}" \ - CC="${CC}" \ - RANLIB="${RANLIB}" \ - COPTS="${CFLAGS}" \ - BUILD_COPTS="${BUILD_CFLAGS}" -} - -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.54.bb b/meta/recipes-support/libcap/libcap_2.54.bb new file mode 100644 index 0000000000..04362e7032 --- /dev/null +++ b/meta/recipes-support/libcap/libcap_2.54.bb @@ -0,0 +1,73 @@ +SUMMARY = "Library for getting/setting POSIX.1e capabilities" +DESCRIPTION = "A library providing the API to access POSIX capabilities. \ +These allow giving various kinds of specific privileges to individual \ +users, without giving them full root permissions." +HOMEPAGE = "http://sites.google.com/site/fullycapable/" +# no specific GPL version required +LICENSE = "BSD-3-Clause | GPLv2" +LIC_FILES_CHKSUM = "file://License;md5=e2370ba375efe9e1a095c26d37e483b8" + +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 \ + " +SRC_URI[sha256sum] = "5091b24247999fd7a5e62bd9ac8bc761cda29f9baa0d1a2ca6a46f13891b4f0f" + +UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/linux/libs/security/linux-privs/${BPN}2/" + +inherit lib_package + +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}" + +do_compile() { + unset CFLAGS BUILD_CFLAGS + oe_runmake \ + ${PACKAGECONFIG_CONFARGS} \ + AR="${AR}" \ + CC="${CC}" \ + RANLIB="${RANLIB}" \ + OBJCOPY="${OBJCOPY}" \ + COPTS="${CFLAGS}" \ + BUILD_COPTS="${BUILD_CFLAGS}" +} + +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