summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/libcap
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2020-05-05 15:01:16 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-05-07 12:15:59 +0100
commit364d9bae27140ed8925f226324cf97c490ad75d3 (patch)
treed04cfdd967c2e1da316c269aa18f3d4074a87f37 /meta/recipes-support/libcap
parentde4552172315e0ab90b93b8b4b381d6eb57362d1 (diff)
downloadpoky-364d9bae27140ed8925f226324cf97c490ad75d3.tar.gz
libcap: update to 2.33
(From OE-Core rev: d5126e2e728319a8a72dec055477fd79e4218248) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 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-tests-do-not-statically-link-a-test.patch32
-rw-r--r--meta/recipes-support/libcap/files/0004-psx.c-replace-pthread_yield-with-standard-sched_yiel.patch24
-rw-r--r--meta/recipes-support/libcap/libcap_2.33.bb (renamed from meta/recipes-support/libcap/libcap_2.32.bb)5
3 files changed, 53 insertions, 8 deletions
diff --git a/meta/recipes-support/libcap/files/0001-tests-do-not-statically-link-a-test.patch b/meta/recipes-support/libcap/files/0001-tests-do-not-statically-link-a-test.patch
index e568cc47c5..912f33f165 100644
--- a/meta/recipes-support/libcap/files/0001-tests-do-not-statically-link-a-test.patch
+++ b/meta/recipes-support/libcap/files/0001-tests-do-not-statically-link-a-test.patch
@@ -1,4 +1,4 @@
1From 1179b423cce8d119b42cebfb3daa77c540fdca43 Mon Sep 17 00:00:00 2001 1From 24d59c99bcba065f1f40f49f870a5f6483b4b078 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Wed, 15 Jan 2020 17:16:28 +0100 3Date: Wed, 15 Jan 2020 17:16:28 +0100
4Subject: [PATCH] tests: do not statically link a test 4Subject: [PATCH] tests: do not statically link a test
@@ -7,20 +7,40 @@ This fails on e.g. centos 7
7 7
8Upstream-Status: Inappropriate [oe-core specific] 8Upstream-Status: Inappropriate [oe-core specific]
9Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 9Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
10
10--- 11---
11 tests/Makefile | 2 +- 12 tests/Makefile | 8 ++++----
12 1 file changed, 1 insertion(+), 1 deletion(-) 13 1 file changed, 4 insertions(+), 4 deletions(-)
13 14
14diff --git a/tests/Makefile b/tests/Makefile 15diff --git a/tests/Makefile b/tests/Makefile
15index 7162cf0..6af47af 100644 16index f9cec56..aa0d09b 100644
16--- a/tests/Makefile 17--- a/tests/Makefile
17+++ b/tests/Makefile 18+++ b/tests/Makefile
18@@ -29,7 +29,7 @@ psx_test_wrap: psx_test.c $(DEPS) 19@@ -29,23 +29,23 @@ psx_test_wrap: psx_test.c $(DEPS)
19 run_libcap_psx_test: libcap_psx_test 20 run_libcap_psx_test: libcap_psx_test
20 21
21 libcap_psx_test: libcap_psx_test.c $(DEPS) 22 libcap_psx_test: libcap_psx_test.c $(DEPS)
22- $(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LIBCAPLIB) $(LIBPSXLIB) -Wl,-wrap,pthread_create --static 23- $(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LIBCAPLIB) $(LIBPSXLIB) -Wl,-wrap,pthread_create --static
23+ $(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LIBCAPLIB) $(LIBPSXLIB) -Wl,-wrap,pthread_create 24+ $(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LIBCAPLIB) $(LIBPSXLIB) -Wl,-wrap,pthread_create
24 25
26 run_libcap_launch_test: libcap_launch_test libcap_psx_launch_test noop
27 sudo ./libcap_launch_test
28 sudo ./libcap_psx_launch_test
29
30 libcap_launch_test: libcap_launch_test.c $(DEPS)
31- $(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LIBCAPLIB) --static
32+ $(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LIBCAPLIB)
33
34 # this varies only slightly from the above insofar as it currently
35 # only links in the pthreads fork support. TODO() we need to change
36 # the source to do something interesting with pthreads.
37 libcap_psx_launch_test: libcap_launch_test.c $(DEPS)
38- $(CC) $(CFLAGS) $(IPATH) -DWITH_PTHREADS $< -o $@ $(LIBCAPLIB) $(LIBPSXLIB) -Wl,-wrap,pthread_create --static
39+ $(CC) $(CFLAGS) $(IPATH) -DWITH_PTHREADS $< -o $@ $(LIBCAPLIB) $(LIBPSXLIB) -Wl,-wrap,pthread_create
40
41 noop: noop.c
42- $(CC) $(CFLAGS) $< -o $@ --static
43+ $(CC) $(CFLAGS) $< -o $@
44
25 clean: 45 clean:
26 rm -f psx_test psx_test_wrap libcap_psx_test 46 rm -f psx_test psx_test_wrap libcap_psx_test libcap_launch_test *~
diff --git a/meta/recipes-support/libcap/files/0004-psx.c-replace-pthread_yield-with-standard-sched_yiel.patch b/meta/recipes-support/libcap/files/0004-psx.c-replace-pthread_yield-with-standard-sched_yiel.patch
new file mode 100644
index 0000000000..848ceb2c0c
--- /dev/null
+++ b/meta/recipes-support/libcap/files/0004-psx.c-replace-pthread_yield-with-standard-sched_yiel.patch
@@ -0,0 +1,24 @@
1From a2c4cdb05d0e382101b13944c09c4375e8d7de5f Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Tue, 31 Mar 2020 13:39:28 +0200
4Subject: [PATCH] psx.c: replace pthread_yield() with standard sched_yield()
5
6This was causing failures when building with musl C library in
7particular.
8
9Upstream-Status: Pending
10Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
11---
12diff --git a/libcap/psx.c b/libcap/psx.c
13index 04d250f..7e4ac10 100644
14--- a/libcap/psx.c
15+++ b/libcap/psx.c
16@@ -533,7 +533,7 @@ long int __psx_syscall(long int syscall_nr, ...) {
17 if (!waiting) {
18 break;
19 }
20- pthread_yield();
21+ sched_yield();
22 }
23
24 errno = restore_errno;
diff --git a/meta/recipes-support/libcap/libcap_2.32.bb b/meta/recipes-support/libcap/libcap_2.33.bb
index d78a58f7d2..bec492ca5f 100644
--- a/meta/recipes-support/libcap/libcap_2.32.bb
+++ b/meta/recipes-support/libcap/libcap_2.33.bb
@@ -11,9 +11,10 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${
11 file://0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch \ 11 file://0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch \
12 file://0002-tests-do-not-run-target-executables.patch \ 12 file://0002-tests-do-not-run-target-executables.patch \
13 file://0001-tests-do-not-statically-link-a-test.patch \ 13 file://0001-tests-do-not-statically-link-a-test.patch \
14 file://0004-psx.c-replace-pthread_yield-with-standard-sched_yiel.patch \
14 " 15 "
15SRC_URI[md5sum] = "7416119c9fdcfd0e8dd190a432c668e9" 16SRC_URI[md5sum] = "dcc6220b4a9bf260050b20c07edcddf4"
16SRC_URI[sha256sum] = "1005e3d227f2340ad1e3360ef8b69d15e3c72a29c09f4894d7aac038bd26e2be" 17SRC_URI[sha256sum] = "08edeaba2757021aeec45c4eeec52566675e0e0f5d4f057284d729e04f2643d6"
17 18
18UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/linux/libs/security/linux-privs/${BPN}2/" 19UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/linux/libs/security/linux-privs/${BPN}2/"
19 20