libcap: drop obsolete patches
PATCH v2 1/5 libcap: drop obsolete patches
Drop 0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch, fixed upstream in "libcap: Fix for older kernels"[1].
Drop 0002-tests-do-not-run-target-executables.patch, doesn't appear to be needed anymore and most likely resolved by "Don't build the tests/binaries until we want to run them"[2].
[1] f1c3ac995d02d4f17b9d15656ab6d58f4c87435a
[2] 99799844ad9272d43892881d1090369e6032aec2
--- ..._NAME_CAPS-is-defined-when-it-is-use.patch | 35 ------------------- ...-tests-do-not-run-target-executables.patch | 29 --------------- meta/recipes-support/libcap/libcap_2.74.bb | 5 +-- 3 files changed, 1 insertion(+), 68 deletions(-) delete mode 100644 meta/recipes-support/libcap/files/0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch delete mode 100644 meta/recipes-support/libcap/files/0002-tests-do-not-run-target-executables.patch
meta/recipes-support/libcap/files/0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch deleted +0 -35
@@ -1,35 +0,0 @@ -From bda8da622bd3f4d8b0e577387e988ce364b917c4 Mon Sep 17 00:00:00 2001 -From: Roy Li <[email protected]> -Date: Thu, 23 Jun 2016 16:26:43 +0800 -Subject: [PATCH] Ensure the XATTR_NAME_CAPS is defined when it is used -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Upstream-Status: Pending - -VFS_CAP_U32 can not ensure that XATTR_NAME_CAPS is defined, and failed to build -libcap-native in old release, like CentOS release 6.7 (Final), with the blow -error: - cap_file.c: In function ‘cap_get_fd’: - cap_file.c:199: error: ‘XATTR_NAME_CAPS’ undeclared (first use in this function) - cap_file.c:199: error: (Each undeclared identifier is reported only once - -Signed-off-by: Roy Li <[email protected]> ---- - libcap/cap_file.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libcap/cap_file.c b/libcap/cap_file.c -index 0bc07f7..37bc34e 100644 ---- a/libcap/cap_file.c -+++ b/libcap/cap_file.c -@@ -44,7 +44,7 @@ extern int fremovexattr(int, const char *); - - #include "libcap.h" - --#ifdef VFS_CAP_U32 -+#if defined (VFS_CAP_U32) && defined (XATTR_NAME_CAPS) - - #if VFS_CAP_U32 != __CAP_BLKS - # error VFS representation of capabilities is not the same size as kernel
meta/recipes-support/libcap/files/0002-tests-do-not-run-target-executables.patch deleted +0 -29
@@ -1,29 +0,0 @@ -From 5846ba594bedd66c8fd216cad6518f7be11b7a92 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -Date: Fri, 20 Dec 2019 16:54:05 +0100 -Subject: [PATCH] tests: do not run target executables - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin <[email protected]> ---- - tests/Makefile | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/tests/Makefile b/tests/Makefile -index 3d03721..fbb1d78 100644 ---- a/tests/Makefile -+++ b/tests/Makefile -@@ -69,13 +69,11 @@ endif - - # unprivileged - run_psx_test: psx_test -- ./psx_test - - psx_test: psx_test.c $(DEPS) - $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $< -o $@ $(LINKEXTRA) $(LIBPSXLIB) - - run_libcap_psx_test: libcap_psx_test -- ./libcap_psx_test - - libcap_psx_test: libcap_psx_test.c $(DEPS) - $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $< -o $@ $(LINKEXTRA) $(LIBCAPLIB) $(LIBPSXLIB)
meta/recipes-support/libcap/libcap_2.74.bb +1 -4
@@ -12,10 +12,7 @@ LIC_FILES_CHKSUM = "file://License;md5=2965a646645b72ecee859b43c592dcaa \ 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 = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${PV}.tar.xz" SRC_URI:append:class-nativesdk = " \ file://0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch \ "
Signature · 1 line
2.43.0
PATCH v2 2/5 libcap: remove redundant FILES:PN-dev
base_libdir/*.so is part of the default assignment.
--- meta/recipes-support/libcap/libcap_2.74.bb | 2 -- 1 file changed, 2 deletions(-)
meta/recipes-support/libcap/libcap_2.74.bb +0 -2
@@ -68,8 +68,6 @@ do_install:append() { fi } -FILES:${PN}-dev += "${base_libdir}/*.so" - # pam files FILES:${PN} += "${base_libdir}/security/*.so"
Signature · 1 line
2.43.0
Re: [OE-core] [PATCH v2 2/5] libcap: remove redundant FILES:PN-dev
Hi Ross,
Quoted 2 lines · Ross Burton via lists.openembedded.org
base_libdir/*.so is part of the default assignment.
I don't think that's true, base_libdir/lib*.so is, not base_libdir/*.so?
I assume there are only shlibs that start with lib prefix hence why that is an appropriate change? If that is the case, can you say that in the commit log?
Cheers,
Quentin
PATCH v2 3/5 libcap: clean up configuration variables
In reply to Ross BurtonThere's no need to set PACKAGECONFIG:class-native as we disable PAM in the native DISTRO_FEATURES.
No need to set COPTS, since "Canonicalize build system"[1] the exported CFLAGS/CPPFLAGS/LDFLAGS are respected.
Merge multiple make arguments into EXTRA_OEMAKE to remove duplication.
SYSTEM_HEADERS is not used upstream, remove.
[1] 2762c2c1a8c98d9012fcd40f20d133493a0b3219
--- meta/recipes-support/libcap/libcap_2.74.bb | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)
meta/recipes-support/libcap/libcap_2.74.bb +2 -10
@@ -23,11 +23,10 @@ UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/linux/libs/security/linux-privs 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 = " \ + ${PACKAGECONFIG_CONFARGS} \ INDENT= \ lib='${baselib}' \ RAISE_SETFCAP=no \
@@ -35,23 +34,16 @@ EXTRA_OEMAKE = " \ USE_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}" + OBJCOPY="${OBJCOPY}" } do_install() { oe_runmake install \ - ${PACKAGECONFIG_CONFARGS} \ DESTDIR="${D}" \ prefix="${prefix}" \ SBINDIR="${sbindir}"
Signature · 1 line
2.43.0
PATCH v2 4/5 libcap: fix licensing fields
In reply to Ross BurtonThe recipe LICENSE field should reflect the license of all of the sources, so include the PAM module licenses too.
Don't use conditionals in LIC_FILES_CHKSUM so that the configuration does not cause differing checksums to be used.
Explicitly set the license on libcap and libcap-dev to reflect the contents:
- libcap is BSD|GPLv2, and also BSD|LGPLv2+ if PAM is enabled.
- libcap-dev is just the library, so BSD|GPLv2.
--- meta/recipes-support/libcap/libcap_2.74.bb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
meta/recipes-support/libcap/libcap_2.74.bb +8 -4
@@ -3,11 +3,11 @@ 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 | GPL-2.0-only" -LIC_FILES_CHKSUM_PAM = "file://pam_cap/License;md5=905326f41d3d1f8df21943f9a4ed6b50" + +# The library is BSD | GPLv2, the PAM module is BSD | LGPLv2+ +LICENSE = "(BSD-3-Clause | GPL-2.0-only) & (BSD-3-Clause | LGPL-2.0-or-later)" LIC_FILES_CHKSUM = "file://License;md5=2965a646645b72ecee859b43c592dcaa \ - ${@bb.utils.contains('PACKAGECONFIG', 'pam', '${LIC_FILES_CHKSUM_PAM}', '', d)} \ + file://pam_cap/License;md5=905326f41d3d1f8df21943f9a4ed6b50 \ " DEPENDS = "hostperl-runtime-native gperf-native"
@@ -63,4 +63,8 @@ do_install:append() { # pam files FILES:${PN} += "${base_libdir}/security/*.so" +# The license of the main package depends on whether PAM is enabled or not +LICENSE:${PN} = "(BSD-3-Clause | GPL-2.0-only)${@bb.utils.contains('PACKAGECONFIG', 'pam', ' & (BSD-3-Clause | LGPL-2.0-or-later)', '', d)}" +LICENSE:${PN}-dev = "(BSD-3-Clause | GPL-2.0-only)" + BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.43.0
Patchtest results for [PATCH v2 4/5] libcap: fix licensing fields
Thank you for your submission. Patchtest identified one or more issues with the patch. Please see the log below for more information:
---
Testing patch /home/patchtest/share/mboxes/v2-4-5-libcap-fix-licensing-fields.patch
FAIL: test lic files chksum modified not mentioned: LIC_FILES_CHKSUM changed without "License-Update:" tag and description in commit message (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)
PASS: pretest src uri left files (test_metadata.TestMetadata.pretest_src_uri_left_files)
PASS: test CVE check ignore (test_metadata.TestMetadata.test_cve_check_ignore)
PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message presence (test_mbox.TestMbox.test_commit_message_presence)
PASS: test commit message user tags (test_mbox.TestMbox.test_commit_message_user_tags)
PASS: test max line length (test_metadata.TestMetadata.test_max_line_length)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)
PASS: test src uri left files (test_metadata.TestMetadata.test_src_uri_left_files)
PASS: test target mailing list (test_mbox.TestMbox.test_target_mailing_list)
SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint)
SKIP: test CVE tag format: No new CVE patches introduced (test_patch.TestPatch.test_cve_tag_format)
SKIP: test Signed-off-by presence: No new CVE patches introduced (test_patch.TestPatch.test_signed_off_by_presence)
SKIP: test Upstream-Status presence: No new CVE patches introduced (test_patch.TestPatch.test_upstream_status_presence_format)
SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test lic files chksum presence: No added recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_presence)
SKIP: test license presence: No added recipes, skipping test (test_metadata.TestMetadata.test_license_presence)
SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint)
SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test summary presence: No added recipes, skipping test (test_metadata.TestMetadata.test_summary_presence)
---
Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this email with an explanation of why the patch should be accepted. If you believe these results are due to an error in patchtest, please submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category under 'Yocto Project Subprojects'). For more information on specific failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank you!
PATCH v2 5/5 libcap: upgrade to 2.75
In reply to Ross BurtonJust one change, to fix the Go psx module build.
---
meta/recipes-support/libcap/{libcap_2.74.bb => libcap_2.75.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-support/libcap/{libcap_2.74.bb => libcap_2.75.bb} (96%)meta/recipes-support/libcap/libcap_2.75.bb renamed from meta/recipes-support/libcap/libcap_2.74.bb +1 -1
@@ -16,7 +16,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${ SRC_URI:append:class-nativesdk = " \ file://0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch \ " -SRC_URI[sha256sum] = "eb85271f2893188644b6451cec8ce99f4541498f16ff9f84877c2fc872717714" +SRC_URI[sha256sum] = "de4e7e064c9ba451d5234dd46e897d7c71c96a9ebf9a0c445bc04f4742d83632" UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/linux/libs/security/linux-privs/${BPN}2/"
Signature · 1 line
2.43.0