diff options
Diffstat (limited to 'meta/recipes-support/libcap')
-rw-r--r-- | meta/recipes-support/libcap/files/0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch | 32 | ||||
-rw-r--r-- | meta/recipes-support/libcap/files/0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch | 11 | ||||
-rw-r--r-- | meta/recipes-support/libcap/files/0002-tests-do-not-run-target-executables.patch | 30 | ||||
-rw-r--r-- | meta/recipes-support/libcap/libcap_2.76.bb (renamed from meta/recipes-support/libcap/libcap_2.69.bb) | 33 |
4 files changed, 17 insertions, 89 deletions
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 05c771ac10..0000000000 --- a/meta/recipes-support/libcap/files/0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | Ensure the XATTR_NAME_CAPS is defined when it is used | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | VFS_CAP_U32 can not ensure that XATTR_NAME_CAPS is defined, and failed to build | ||
6 | libcap-native in old release, like CentOS release 6.7 (Final), with the blow | ||
7 | error: | ||
8 | cap_file.c: In function ‘cap_get_fd’: | ||
9 | cap_file.c:199: error: ‘XATTR_NAME_CAPS’ undeclared (first use in this function) | ||
10 | cap_file.c:199: error: (Each undeclared identifier is reported only once | ||
11 | |||
12 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
13 | --- | ||
14 | libcap/cap_file.c | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/libcap/cap_file.c b/libcap/cap_file.c | ||
18 | index 40756ea..e27ca80 100644 | ||
19 | --- a/libcap/cap_file.c | ||
20 | +++ b/libcap/cap_file.c | ||
21 | @@ -25,7 +25,7 @@ extern int fremovexattr(int, const char *); | ||
22 | |||
23 | #include "libcap.h" | ||
24 | |||
25 | -#ifdef VFS_CAP_U32 | ||
26 | +#if defined (VFS_CAP_U32) && defined (XATTR_NAME_CAPS) | ||
27 | |||
28 | #if VFS_CAP_U32 != __CAP_BLKS | ||
29 | # error VFS representation of capabilities is not the same size as kernel | ||
30 | -- | ||
31 | 2.8.1 | ||
32 | |||
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 index 2ac1e6e560..2cec20b4b1 100644 --- 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 | |||
@@ -1,4 +1,4 @@ | |||
1 | From 709aa8e156415215b0bb034d05b2aa2f44be044e Mon Sep 17 00:00:00 2001 | 1 | From 969d21aa2bf474d9c5c80a64de1a9fe0e17e31b2 Mon Sep 17 00:00:00 2001 |
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | 2 | From: Hongxu Jia <hongxu.jia@windriver.com> |
3 | Date: Thu, 14 Oct 2021 15:57:36 +0800 | 3 | Date: Thu, 14 Oct 2021 15:57:36 +0800 |
4 | Subject: [PATCH] nativesdk-libcap: Raise the size of arrays containing dl | 4 | Subject: [PATCH] nativesdk-libcap: Raise the size of arrays containing dl |
@@ -14,18 +14,17 @@ the strings in a certain path. | |||
14 | Upstream-Status: Inappropriate [SDK specific] | 14 | Upstream-Status: Inappropriate [SDK specific] |
15 | 15 | ||
16 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | 16 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> |
17 | |||
18 | --- | 17 | --- |
19 | libcap/execable.h | 2 +- | 18 | libcap/execable.h | 2 +- |
20 | 1 file changed, 1 insertion(+), 1 deletion(-) | 19 | 1 file changed, 1 insertion(+), 1 deletion(-) |
21 | 20 | ||
22 | diff --git a/libcap/execable.h b/libcap/execable.h | 21 | diff --git a/libcap/execable.h b/libcap/execable.h |
23 | index fee17b4..5bb0c55 100644 | 22 | index a68ea24..60d3853 100644 |
24 | --- a/libcap/execable.h | 23 | --- a/libcap/execable.h |
25 | +++ b/libcap/execable.h | 24 | +++ b/libcap/execable.h |
26 | @@ -23,7 +23,7 @@ | 25 | @@ -34,7 +34,7 @@ extern const int _IO_stdin_used; |
27 | #endif | 26 | const int _IO_stdin_used __attribute__((weak)) = 131073; |
28 | #define __EXECABLE_H | 27 | #endif /* def __GLIBC__ */ |
29 | 28 | ||
30 | -const char __execable_dl_loader[] __attribute((section(".interp"))) = | 29 | -const char __execable_dl_loader[] __attribute((section(".interp"))) = |
31 | +const char __execable_dl_loader[4096] __attribute((section(".interp"))) = | 30 | +const char __execable_dl_loader[4096] __attribute((section(".interp"))) = |
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 20346cf2fb..0000000000 --- a/meta/recipes-support/libcap/files/0002-tests-do-not-run-target-executables.patch +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | From 10212b6d4e8843feffbeab5336342d97f3a46bb2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Fri, 20 Dec 2019 16:54:05 +0100 | ||
4 | Subject: [PATCH] tests: do not run target executables | ||
5 | |||
6 | Upstream-Status: Inappropriate [oe-core specific] | ||
7 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
8 | |||
9 | --- | ||
10 | tests/Makefile | 2 -- | ||
11 | 1 file changed, 2 deletions(-) | ||
12 | |||
13 | diff --git a/tests/Makefile b/tests/Makefile | ||
14 | index ecb7d1b..8950c73 100644 | ||
15 | --- a/tests/Makefile | ||
16 | +++ b/tests/Makefile | ||
17 | @@ -61,13 +61,11 @@ endif | ||
18 | |||
19 | # unprivileged | ||
20 | run_psx_test: psx_test | ||
21 | - ./psx_test | ||
22 | |||
23 | psx_test: psx_test.c $(DEPS) | ||
24 | $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $< -o $@ $(LINKEXTRA) $(LIBPSXLIB) | ||
25 | |||
26 | run_libcap_psx_test: libcap_psx_test | ||
27 | - ./libcap_psx_test | ||
28 | |||
29 | libcap_psx_test: libcap_psx_test.c $(DEPS) | ||
30 | $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $< -o $@ $(LINKEXTRA) $(LIBCAPLIB) $(LIBPSXLIB) | ||
diff --git a/meta/recipes-support/libcap/libcap_2.69.bb b/meta/recipes-support/libcap/libcap_2.76.bb index 92fa766d37..c842246fc0 100644 --- a/meta/recipes-support/libcap/libcap_2.69.bb +++ b/meta/recipes-support/libcap/libcap_2.76.bb | |||
@@ -3,34 +3,30 @@ DESCRIPTION = "A library providing the API to access POSIX capabilities. \ | |||
3 | These allow giving various kinds of specific privileges to individual \ | 3 | These allow giving various kinds of specific privileges to individual \ |
4 | users, without giving them full root permissions." | 4 | users, without giving them full root permissions." |
5 | HOMEPAGE = "http://sites.google.com/site/fullycapable/" | 5 | HOMEPAGE = "http://sites.google.com/site/fullycapable/" |
6 | # no specific GPL version required | 6 | |
7 | LICENSE = "BSD-3-Clause | GPL-2.0-only" | 7 | # The library is BSD | GPLv2, the PAM module is BSD | LGPLv2+ |
8 | LIC_FILES_CHKSUM_PAM = "file://pam_cap/License;md5=905326f41d3d1f8df21943f9a4ed6b50" | 8 | LICENSE = "(BSD-3-Clause | GPL-2.0-only) & (BSD-3-Clause | LGPL-2.0-or-later)" |
9 | LIC_FILES_CHKSUM = "file://License;md5=2965a646645b72ecee859b43c592dcaa \ | 9 | LIC_FILES_CHKSUM = "file://License;md5=2965a646645b72ecee859b43c592dcaa \ |
10 | ${@bb.utils.contains('PACKAGECONFIG', 'pam', '${LIC_FILES_CHKSUM_PAM}', '', d)} \ | 10 | file://pam_cap/License;md5=905326f41d3d1f8df21943f9a4ed6b50 \ |
11 | " | 11 | " |
12 | 12 | ||
13 | DEPENDS = "hostperl-runtime-native gperf-native" | 13 | DEPENDS = "hostperl-runtime-native gperf-native" |
14 | 14 | ||
15 | SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${PV}.tar.xz \ | 15 | SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${PV}.tar.xz" |
16 | file://0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch \ | ||
17 | file://0002-tests-do-not-run-target-executables.patch \ | ||
18 | " | ||
19 | SRC_URI:append:class-nativesdk = " \ | 16 | SRC_URI:append:class-nativesdk = " \ |
20 | file://0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch \ | 17 | file://0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch \ |
21 | " | 18 | " |
22 | SRC_URI[sha256sum] = "f311f8f3dad84699d0566d1d6f7ec943a9298b28f714cae3c931dfd57492d7eb" | 19 | SRC_URI[sha256sum] = "629da4ab29900d0f7fcc36227073743119925fd711c99a1689bbf5c9b40c8e6f" |
23 | 20 | ||
24 | UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/linux/libs/security/linux-privs/${BPN}2/" | 21 | UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/linux/libs/security/linux-privs/${BPN}2/" |
25 | 22 | ||
26 | inherit lib_package | 23 | inherit lib_package |
27 | 24 | ||
28 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" | 25 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" |
29 | PACKAGECONFIG:class-native ??= "" | ||
30 | |||
31 | PACKAGECONFIG[pam] = "PAM_CAP=yes,PAM_CAP=no,libpam" | 26 | PACKAGECONFIG[pam] = "PAM_CAP=yes,PAM_CAP=no,libpam" |
32 | 27 | ||
33 | EXTRA_OEMAKE = " \ | 28 | EXTRA_OEMAKE = " \ |
29 | ${PACKAGECONFIG_CONFARGS} \ | ||
34 | INDENT= \ | 30 | INDENT= \ |
35 | lib='${baselib}' \ | 31 | lib='${baselib}' \ |
36 | RAISE_SETFCAP=no \ | 32 | RAISE_SETFCAP=no \ |
@@ -38,23 +34,16 @@ EXTRA_OEMAKE = " \ | |||
38 | USE_GPERF=yes \ | 34 | USE_GPERF=yes \ |
39 | " | 35 | " |
40 | 36 | ||
41 | EXTRA_OEMAKE:append:class-target = " SYSTEM_HEADERS=${STAGING_INCDIR}" | ||
42 | |||
43 | do_compile() { | 37 | do_compile() { |
44 | unset CFLAGS BUILD_CFLAGS | ||
45 | oe_runmake \ | 38 | oe_runmake \ |
46 | ${PACKAGECONFIG_CONFARGS} \ | ||
47 | AR="${AR}" \ | 39 | AR="${AR}" \ |
48 | CC="${CC}" \ | 40 | CC="${CC}" \ |
49 | RANLIB="${RANLIB}" \ | 41 | RANLIB="${RANLIB}" \ |
50 | OBJCOPY="${OBJCOPY}" \ | 42 | OBJCOPY="${OBJCOPY}" |
51 | COPTS="${CFLAGS}" \ | ||
52 | BUILD_COPTS="${BUILD_CFLAGS}" | ||
53 | } | 43 | } |
54 | 44 | ||
55 | do_install() { | 45 | do_install() { |
56 | oe_runmake install \ | 46 | oe_runmake install \ |
57 | ${PACKAGECONFIG_CONFARGS} \ | ||
58 | DESTDIR="${D}" \ | 47 | DESTDIR="${D}" \ |
59 | prefix="${prefix}" \ | 48 | prefix="${prefix}" \ |
60 | SBINDIR="${sbindir}" | 49 | SBINDIR="${sbindir}" |
@@ -71,9 +60,11 @@ do_install:append() { | |||
71 | fi | 60 | fi |
72 | } | 61 | } |
73 | 62 | ||
74 | FILES:${PN}-dev += "${base_libdir}/*.so" | ||
75 | |||
76 | # pam files | 63 | # pam files |
77 | FILES:${PN} += "${base_libdir}/security/*.so" | 64 | FILES:${PN} += "${base_libdir}/security/*.so" |
78 | 65 | ||
66 | # The license of the main package depends on whether PAM is enabled or not | ||
67 | LICENSE:${PN} = "(BSD-3-Clause | GPL-2.0-only)${@bb.utils.contains('PACKAGECONFIG', 'pam', ' & (BSD-3-Clause | LGPL-2.0-or-later)', '', d)}" | ||
68 | LICENSE:${PN}-dev = "(BSD-3-Clause | GPL-2.0-only)" | ||
69 | |||
79 | BBCLASSEXTEND = "native nativesdk" | 70 | BBCLASSEXTEND = "native nativesdk" |