]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
libcap: fix licensing fields
authorRoss Burton <ross.burton@arm.com>
Mon, 17 Mar 2025 17:08:46 +0000 (17:08 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 18 Mar 2025 10:26:10 +0000 (10:26 +0000)
The 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.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-support/libcap/libcap_2.74.bb

index a1da8311b27be1ae8bc6cbc0f430669562a89b3f..ca6eccd9d86208b37d80fa7386efadceebddc972 100644 (file)
@@ -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"