Message ID | 20250317151216.3484052-1-ross.burton@arm.com |
---|---|
State | New |
Headers | show |
Series | [1/2] libcap: recipe cleanup | expand |
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/1-2-libcap-recipe-cleanup.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!
Hi Ross, On 3/17/25 4:12 PM, Ross Burton via lists.openembedded.org wrote: > 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]. > Could be its own patch. > There's no need to set PACKAGECONFIG:class-native as we disable PAM in > the native DISTRO_FEATURES. > Could be its own patch. > The recipe LICENSE needs to reflect the _source_ license, so it can't > be controlled by PACKAGECONFIG. Also update the license to reflect the > actual licensing. > Could be its own patch. Also, would probably be better to have a package license too, to properly report the license based on the presence of the pam module or not, e.g. LICENSE:${PN} = "(BSD-3-Clause | GPL-2.0-only)${@bb.utils.contains('PACKAGECONFIG', 'pam', ' & (BSD-3-Clause | LGPL-2.0-or-later)', '', d)}" or something like that? (Not tested) > No need to set COPTS, since "Canonicalize build system"[3] the exported > CFLAGS/CPPFLAGS/LDFLAGS are respected. > Could be its own patch. > Merge multiple make arguments into EXTRA_OEMAKE to remove duplication. > Could be its own patch. > SYSTEM_HEADERS is not used upstream, remove. > Could be its own patch. > Remove redundant FILES:PN-dev, this is part of the default. > Could be its own patch. Missing License-Update: trailer like patchtest bot said. Cheers, Quentin
diff --git a/meta/recipes-support/libcap/files/0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch b/meta/recipes-support/libcap/files/0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch deleted file mode 100644 index c576351e819..00000000000 --- a/meta/recipes-support/libcap/files/0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch +++ /dev/null @@ -1,35 +0,0 @@ -From bda8da622bd3f4d8b0e577387e988ce364b917c4 Mon Sep 17 00:00:00 2001 -From: Roy Li <rongqing.li@windriver.com> -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 <rongqing.li@windriver.com> ---- - 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 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 deleted file mode 100644 index 8cabed6342a..00000000000 --- a/meta/recipes-support/libcap/files/0002-tests-do-not-run-target-executables.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 5846ba594bedd66c8fd216cad6518f7be11b7a92 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -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 <alex.kanavin@gmail.com> ---- - 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) diff --git a/meta/recipes-support/libcap/libcap_2.74.bb b/meta/recipes-support/libcap/libcap_2.74.bb index 75019fd35fd..9240763e9a5 100644 --- a/meta/recipes-support/libcap/libcap_2.74.bb +++ b/meta/recipes-support/libcap/libcap_2.74.bb @@ -3,19 +3,16 @@ 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" -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 \ " @@ -26,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 \ @@ -38,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}" @@ -71,8 +60,6 @@ do_install:append() { fi } -FILES:${PN}-dev += "${base_libdir}/*.so" - # pam files FILES:${PN} += "${base_libdir}/security/*.so"
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]. There's no need to set PACKAGECONFIG:class-native as we disable PAM in the native DISTRO_FEATURES. The recipe LICENSE needs to reflect the _source_ license, so it can't be controlled by PACKAGECONFIG. Also update the license to reflect the actual licensing. No need to set COPTS, since "Canonicalize build system"[3] the exported CFLAGS/CPPFLAGS/LDFLAGS are respected. Merge multiple make arguments into EXTRA_OEMAKE to remove duplication. SYSTEM_HEADERS is not used upstream, remove. Remove redundant FILES:PN-dev, this is part of the default. [1] f1c3ac995d02d4f17b9d15656ab6d58f4c87435a [2] 99799844ad9272d43892881d1090369e6032aec2 [3] 2762c2c1a8c98d9012fcd40f20d133493a0b3219 Signed-off-by: Ross Burton <ross.burton@arm.com> --- ..._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 | 27 ++++---------- 3 files changed, 7 insertions(+), 84 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