summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/libcap
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2025-11-07 13:31:53 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-11-07 13:31:53 +0000
commit8c22ff0d8b70d9b12f0487ef696a7e915b9e3173 (patch)
treeefdc32587159d0050a69009bdf2330a531727d95 /meta/recipes-support/libcap
parentd412d2747595c1cc4a5e3ca975e3adc31b2f7891 (diff)
downloadpoky-8c22ff0d8b70d9b12f0487ef696a7e915b9e3173.tar.gz
The poky repository master branch is no longer being updated.
You can either: a) switch to individual clones of bitbake, openembedded-core, meta-yocto and yocto-docs b) use the new bitbake-setup You can find information about either approach in our documentation: https://docs.yoctoproject.org/ Note that "poky" the distro setting is still available in meta-yocto as before and we continue to use and maintain that. Long live Poky! Some further information on the background of this change can be found in: https://lists.openembedded.org/g/openembedded-architecture/message/2179 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/libcap')
-rw-r--r--meta/recipes-support/libcap/files/0001-libcap-Add-build-ldflags-to-_makenames-rule.patch29
-rw-r--r--meta/recipes-support/libcap/files/0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch33
-rw-r--r--meta/recipes-support/libcap/libcap_2.76.bb74
3 files changed, 0 insertions, 136 deletions
diff --git a/meta/recipes-support/libcap/files/0001-libcap-Add-build-ldflags-to-_makenames-rule.patch b/meta/recipes-support/libcap/files/0001-libcap-Add-build-ldflags-to-_makenames-rule.patch
deleted file mode 100644
index 10ddf64935..0000000000
--- a/meta/recipes-support/libcap/files/0001-libcap-Add-build-ldflags-to-_makenames-rule.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1From e52d3232882c263f5bd4b1980195ac633d706a53 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 21 Oct 2025 18:27:51 -0700
4Subject: [PATCH] libcap: Add build ldflags to _makenames rule
5
6its calling compiler and linker in single step
7ensure that build ldflags are respected as it
8might have important information like which runtime
9to use.
10
11Upstream-Status: Backport [https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=c3ddf45d9afaab85d3b7db0dc7bfd1aafb8fde50]
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 libcap/Makefile | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/libcap/Makefile b/libcap/Makefile
18index e90a950..f0eb87e 100644
19--- a/libcap/Makefile
20+++ b/libcap/Makefile
21@@ -80,7 +80,7 @@ $(PSXTITLE).pc: $(PSXTITLE).pc.in
22 $< >$@
23
24 _makenames: _makenames.c cap_names.list.h
25- $(BUILD_CC) $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@
26+ $(BUILD_CC) $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@ $(BUILD_LDFLAGS)
27
28 cap_names.h: _makenames
29 ./_makenames > cap_names.h
diff --git a/meta/recipes-support/libcap/files/0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch b/meta/recipes-support/libcap/files/0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch
deleted file mode 100644
index 2cec20b4b1..0000000000
--- a/meta/recipes-support/libcap/files/0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1From 969d21aa2bf474d9c5c80a64de1a9fe0e17e31b2 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Thu, 14 Oct 2021 15:57:36 +0800
4Subject: [PATCH] nativesdk-libcap: Raise the size of arrays containing dl
5 paths
6
7This patch puts the dynamic loader path in the binaries, SYSTEM_DIRS strings
8and lengths as well as ld.so.cache path in the dynamic loader to specific
9sections in memory. The sections that contain paths have been allocated a 4096
10byte section, which is the maximum path length in linux. This will allow the
11relocating script to parse the ELF binary, detect the section and easily replace
12the strings in a certain path.
13
14Upstream-Status: Inappropriate [SDK specific]
15
16Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
17---
18 libcap/execable.h | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21diff --git a/libcap/execable.h b/libcap/execable.h
22index a68ea24..60d3853 100644
23--- a/libcap/execable.h
24+++ b/libcap/execable.h
25@@ -34,7 +34,7 @@ extern const int _IO_stdin_used;
26 const int _IO_stdin_used __attribute__((weak)) = 131073;
27 #endif /* def __GLIBC__ */
28
29-const char __execable_dl_loader[] __attribute((section(".interp"))) =
30+const char __execable_dl_loader[4096] __attribute((section(".interp"))) =
31 SHARED_LOADER ;
32
33 static void __execable_parse_args(int *argc_p, char ***argv_p)
diff --git a/meta/recipes-support/libcap/libcap_2.76.bb b/meta/recipes-support/libcap/libcap_2.76.bb
deleted file mode 100644
index 27093ff3e7..0000000000
--- a/meta/recipes-support/libcap/libcap_2.76.bb
+++ /dev/null
@@ -1,74 +0,0 @@
1SUMMARY = "Library for getting/setting POSIX.1e capabilities"
2DESCRIPTION = "A library providing the API to access POSIX capabilities. \
3These allow giving various kinds of specific privileges to individual \
4users, without giving them full root permissions."
5HOMEPAGE = "http://sites.google.com/site/fullycapable/"
6
7# The library is BSD | GPLv2, the PAM module is BSD | LGPLv2+
8LICENSE = "(BSD-3-Clause | GPL-2.0-only) & (BSD-3-Clause | LGPL-2.0-or-later)"
9LIC_FILES_CHKSUM = "file://License;md5=2965a646645b72ecee859b43c592dcaa \
10 file://pam_cap/License;md5=905326f41d3d1f8df21943f9a4ed6b50 \
11 "
12
13DEPENDS = "hostperl-runtime-native gperf-native"
14
15SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${PV}.tar.xz \
16 file://0001-libcap-Add-build-ldflags-to-_makenames-rule.patch \
17 "
18SRC_URI:append:class-nativesdk = " \
19 file://0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch \
20 "
21SRC_URI[sha256sum] = "629da4ab29900d0f7fcc36227073743119925fd711c99a1689bbf5c9b40c8e6f"
22
23UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/linux/libs/security/linux-privs/${BPN}2/"
24
25inherit lib_package
26
27PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
28PACKAGECONFIG[pam] = "PAM_CAP=yes,PAM_CAP=no,libpam"
29
30EXTRA_OEMAKE = " \
31 ${PACKAGECONFIG_CONFARGS} \
32 INDENT= \
33 lib='${baselib}' \
34 RAISE_SETFCAP=no \
35 DYNAMIC=yes \
36 USE_GPERF=yes \
37"
38
39do_compile() {
40 oe_runmake \
41 AR="${AR}" \
42 BUILD_CC="${BUILD_CC}" \
43 BUILD_LDFLAGS="${BUILD_LDFLAGS}" \
44 CC="${CC}" \
45 RANLIB="${RANLIB}" \
46 OBJCOPY="${OBJCOPY}"
47}
48
49do_install() {
50 oe_runmake install \
51 DESTDIR="${D}" \
52 prefix="${prefix}" \
53 SBINDIR="${sbindir}"
54}
55
56do_install:append() {
57 # Move the library to base_libdir
58 install -d ${D}${base_libdir}
59 if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
60 mv ${D}${libdir}/libcap* ${D}${base_libdir}
61 if [ -d ${D}${libdir}/security ]; then
62 mv ${D}${libdir}/security ${D}${base_libdir}
63 fi
64 fi
65}
66
67# pam files
68FILES:${PN} += "${base_libdir}/security/*.so"
69
70# The license of the main package depends on whether PAM is enabled or not
71LICENSE:${PN} = "(BSD-3-Clause | GPL-2.0-only)${@bb.utils.contains('PACKAGECONFIG', 'pam', ' & (BSD-3-Clause | LGPL-2.0-or-later)', '', d)}"
72LICENSE:${PN}-dev = "(BSD-3-Clause | GPL-2.0-only)"
73
74BBCLASSEXTEND = "native nativesdk"