public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: "Alexander Kanavin" <alex.kanavin@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Alexander Kanavin <alex.kanavin@gmail.com>
Subject: [PATCH 07/24] libcap: update to 2.33
Date: Tue,  5 May 2020 15:01:16 +0200	[thread overview]
Message-ID: <20200505130133.24930-7-alex.kanavin@gmail.com> (raw)
In-Reply-To: <20200505130133.24930-1-alex.kanavin@gmail.com>

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 ...-tests-do-not-statically-link-a-test.patch | 32 +++++++++++++++----
 ...hread_yield-with-standard-sched_yiel.patch | 24 ++++++++++++++
 .../libcap/{libcap_2.32.bb => libcap_2.33.bb} |  5 +--
 3 files changed, 53 insertions(+), 8 deletions(-)
 create mode 100644 meta/recipes-support/libcap/files/0004-psx.c-replace-pthread_yield-with-standard-sched_yiel.patch
 rename meta/recipes-support/libcap/{libcap_2.32.bb => libcap_2.33.bb} (90%)

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 @@
-From 1179b423cce8d119b42cebfb3daa77c540fdca43 Mon Sep 17 00:00:00 2001
+From 24d59c99bcba065f1f40f49f870a5f6483b4b078 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Wed, 15 Jan 2020 17:16:28 +0100
 Subject: [PATCH] tests: do not statically link a test
@@ -7,20 +7,40 @@ This fails on e.g. centos 7
 
 Upstream-Status: Inappropriate [oe-core specific]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
 ---
- tests/Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+ tests/Makefile | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
 
 diff --git a/tests/Makefile b/tests/Makefile
-index 7162cf0..6af47af 100644
+index f9cec56..aa0d09b 100644
 --- a/tests/Makefile
 +++ b/tests/Makefile
-@@ -29,7 +29,7 @@ psx_test_wrap: psx_test.c $(DEPS)
+@@ -29,23 +29,23 @@ psx_test_wrap: psx_test.c $(DEPS)
  run_libcap_psx_test: libcap_psx_test
  
  libcap_psx_test: libcap_psx_test.c $(DEPS)
 -	$(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LIBCAPLIB) $(LIBPSXLIB) -Wl,-wrap,pthread_create --static
 +	$(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LIBCAPLIB) $(LIBPSXLIB) -Wl,-wrap,pthread_create
  
+ run_libcap_launch_test: libcap_launch_test libcap_psx_launch_test noop
+ 	sudo ./libcap_launch_test
+ 	sudo ./libcap_psx_launch_test
+ 
+ libcap_launch_test: libcap_launch_test.c $(DEPS)
+-	$(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LIBCAPLIB) --static
++	$(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LIBCAPLIB)
+ 
+ # this varies only slightly from the above insofar as it currently
+ # only links in the pthreads fork support. TODO() we need to change
+ # the source to do something interesting with pthreads.
+ libcap_psx_launch_test: libcap_launch_test.c $(DEPS)
+-	$(CC) $(CFLAGS) $(IPATH) -DWITH_PTHREADS $< -o $@ $(LIBCAPLIB) $(LIBPSXLIB) -Wl,-wrap,pthread_create --static
++	$(CC) $(CFLAGS) $(IPATH) -DWITH_PTHREADS $< -o $@ $(LIBCAPLIB) $(LIBPSXLIB) -Wl,-wrap,pthread_create
+ 
+ noop: noop.c
+-	$(CC) $(CFLAGS) $< -o $@ --static
++	$(CC) $(CFLAGS) $< -o $@
+ 
  clean:
- 	rm -f psx_test psx_test_wrap libcap_psx_test
+ 	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 @@
+From a2c4cdb05d0e382101b13944c09c4375e8d7de5f Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 31 Mar 2020 13:39:28 +0200
+Subject: [PATCH] psx.c: replace pthread_yield() with standard sched_yield()
+
+This was causing failures when building with musl C library in
+particular.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+diff --git a/libcap/psx.c b/libcap/psx.c
+index 04d250f..7e4ac10 100644
+--- a/libcap/psx.c
++++ b/libcap/psx.c
+@@ -533,7 +533,7 @@ long int __psx_syscall(long int syscall_nr, ...) {
+ 	if (!waiting) {
+ 	    break;
+ 	}
+-	pthread_yield();
++	sched_yield();
+     }
+ 
+     errno = restore_errno;
diff --git a/meta/recipes-support/libcap/libcap_2.32.bb b/meta/recipes-support/libcap/libcap_2.33.bb
similarity index 90%
rename from meta/recipes-support/libcap/libcap_2.32.bb
rename to 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}-${
            file://0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch \
            file://0002-tests-do-not-run-target-executables.patch \
            file://0001-tests-do-not-statically-link-a-test.patch \
+           file://0004-psx.c-replace-pthread_yield-with-standard-sched_yiel.patch \
            "
-SRC_URI[md5sum] = "7416119c9fdcfd0e8dd190a432c668e9"
-SRC_URI[sha256sum] = "1005e3d227f2340ad1e3360ef8b69d15e3c72a29c09f4894d7aac038bd26e2be"
+SRC_URI[md5sum] = "dcc6220b4a9bf260050b20c07edcddf4"
+SRC_URI[sha256sum] = "08edeaba2757021aeec45c4eeec52566675e0e0f5d4f057284d729e04f2643d6"
 
 UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/linux/libs/security/linux-privs/${BPN}2/"
 
-- 
2.26.1


  parent reply	other threads:[~2020-05-05 13:02 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-05 13:01 [PATCH 01/24] libinput: add ptest Alexander Kanavin
2020-05-05 13:01 ` [PATCH 02/24] libinput: update 1.15.2 -> 1.15.5 Alexander Kanavin
2020-05-05 13:01 ` [PATCH 03/24] avahi: merge avahi-ui into the main recipe Alexander Kanavin
2020-05-05 13:01 ` [PATCH 04/24] avahi: update to 0.8 Alexander Kanavin
2020-05-05 13:01 ` [PATCH 05/24] testsdkext/devtool: initialize the test component's git repo Alexander Kanavin
2020-05-08 17:20   ` [OE-core] " Steve Sakoman
2020-05-08 17:22     ` Steve Sakoman
2020-05-08 19:14   ` Joshua Watt
2020-05-08 20:11     ` Alexander Kanavin
2020-05-05 13:01 ` [PATCH 06/24] git: update to 2.26.2 Alexander Kanavin
2020-05-05 13:01 ` Alexander Kanavin [this message]
2020-05-05 13:01 ` [PATCH 08/24] libhandy: add a recipe from meta-oe Alexander Kanavin
2020-05-05 13:01 ` [PATCH 09/24] libdazzle: update to 3.36.0 Alexander Kanavin
2020-05-05 13:01 ` [PATCH 10/24] epiphany: update to 3.36.1 Alexander Kanavin
2020-05-05 13:01 ` [PATCH 11/24] patchelf: switch to git Alexander Kanavin
2020-05-05 13:01 ` [PATCH 12/24] powertop: switch to Arjan's git Alexander Kanavin
2020-05-05 13:01 ` [PATCH 13/24] meson: fix upstream version check Alexander Kanavin
2020-05-05 13:01 ` [PATCH 14/24] rpcsvc-proto: update to 1.4.1 Alexander Kanavin
2020-05-05 13:01 ` [PATCH 15/24] vulkan-headers: upgrade 1.1.126.0 -> 1.2.135.0 Alexander Kanavin
2020-05-05 13:01 ` [PATCH 16/24] vulkan-loader: " Alexander Kanavin
2020-05-05 13:01 ` [PATCH 17/24] vulkan-tools: " Alexander Kanavin
2020-05-05 13:01 ` [PATCH 18/24] vulkan-demos: upgrade to latest revision Alexander Kanavin
2020-05-05 13:01 ` [PATCH 19/24] e2fsprogs: update to 1.45.6 Alexander Kanavin
2020-05-05 13:01 ` [PATCH 20/24] build-compare: update to latest revision Alexander Kanavin
2020-05-05 13:01 ` [PATCH 21/24] ovmf: update to 202002 Alexander Kanavin
2020-05-05 13:01 ` [PATCH 22/24] cdrtools-native: fix upstream version check Alexander Kanavin
2020-05-05 13:01 ` [PATCH 23/24] testresults.json: add duration of the tests as well Alexander Kanavin
2020-05-05 13:01 ` [PATCH 24/24] re2c: correct upstream location Alexander Kanavin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200505130133.24930-7-alex.kanavin@gmail.com \
    --to=alex.kanavin@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox