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 54/55] rng-tools: upgrade 6.13 -> 6.14
Date: Sun, 22 Aug 2021 14:51:02 +0200	[thread overview]
Message-ID: <20210822125103.310416-54-alex.kanavin@gmail.com> (raw)
In-Reply-To: <20210822125103.310416-1-alex.kanavin@gmail.com>

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 ...o-detect-non-posix-extensions-for-pt.patch | 41 ++++++++++++++++
 ...-either-pthread-affinity-set-methods.patch | 47 +++++++++++++++++++
 .../{rng-tools_6.13.bb => rng-tools_6.14.bb}  | 15 +++---
 3 files changed, 96 insertions(+), 7 deletions(-)
 create mode 100644 meta/recipes-support/rng-tools/rng-tools/0001-Adding-ability-to-detect-non-posix-extensions-for-pt.patch
 create mode 100644 meta/recipes-support/rng-tools/rng-tools/0002-Allow-for-use-of-either-pthread-affinity-set-methods.patch
 rename meta/recipes-support/rng-tools/{rng-tools_6.13.bb => rng-tools_6.14.bb} (84%)

diff --git a/meta/recipes-support/rng-tools/rng-tools/0001-Adding-ability-to-detect-non-posix-extensions-for-pt.patch b/meta/recipes-support/rng-tools/rng-tools/0001-Adding-ability-to-detect-non-posix-extensions-for-pt.patch
new file mode 100644
index 0000000000..89edc4c403
--- /dev/null
+++ b/meta/recipes-support/rng-tools/rng-tools/0001-Adding-ability-to-detect-non-posix-extensions-for-pt.patch
@@ -0,0 +1,41 @@
+From 66e6adc138eef1367d7492fb79ae4da84ed62934 Mon Sep 17 00:00:00 2001
+From: Neil Horman <nhorman@gmail.com>
+Date: Thu, 15 Jul 2021 08:43:01 -0400
+Subject: [PATCH] Adding ability to detect non-posix extensions for pthreads
+
+Theres a desire to build rngd with musl, which doesn't have all the gnu
+extensions (but it has some).  So test for those.  Note, this requires
+the addition of the USE_EXTENSIONS macro to enable -d_GNU_SOURCE
+
+Upstream-Status: Backport
+Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ configure.ac | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 9df633d..d0c2179 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -25,6 +25,7 @@ AC_CANONICAL_TARGET dnl required for broken AX_PTHREAD
+ AM_INIT_AUTOMAKE([foreign])
+ AC_CONFIG_HEADERS([rng-tools-config.h])
+ AC_CONFIG_MACRO_DIRS([m4])
++AC_USE_SYSTEM_EXTENSIONS
+ 
+ dnl Parse options
+ 
+@@ -100,6 +101,12 @@ AS_IF(
+ 	], [AC_MSG_NOTICE([Disabling JITTER entropy source])]
+ )
+ 
++AC_CHECK_DECL(pthread_attr_setaffinity_np,
++		[AC_DEFINE([HAVE_PTHREAD_ATTR_SETAFFINITY], 1,[Set ATTR_SETAFFINITY])],
++		[ AC_CHECK_DECL(pthread_setaffinity_np,
++		   [AC_DEFINE([HAVE_PTHREAD_SETAFFINITY],1, [Set PTHREAD_SETAFFINITY])], [ AC_MSG_ERROR([Neither pthread_setaffinity_np nor pthread_attr_setaffinity_np found])],[[#include <pthread.h>]])
++		], [[#include <pthread.h>]])
++
+ AS_IF(
+ 	[ test "x$with_nistbeacon" != "xno"],
+ 	[
diff --git a/meta/recipes-support/rng-tools/rng-tools/0002-Allow-for-use-of-either-pthread-affinity-set-methods.patch b/meta/recipes-support/rng-tools/rng-tools/0002-Allow-for-use-of-either-pthread-affinity-set-methods.patch
new file mode 100644
index 0000000000..f7470d04bf
--- /dev/null
+++ b/meta/recipes-support/rng-tools/rng-tools/0002-Allow-for-use-of-either-pthread-affinity-set-methods.patch
@@ -0,0 +1,47 @@
+From e4909f329245db52415102e96fc7c99ca1445d05 Mon Sep 17 00:00:00 2001
+From: Neil Horman <nhorman@gmail.com>
+Date: Thu, 15 Jul 2021 08:48:10 -0400
+Subject: [PATCH] Allow for use of either pthread affinity set methods
+
+musl has support for pthread_setaffinity_np, but not
+pthread_attr_setaffinity_np.  so check for hte existence of either
+function in configure, and use the appropriate one.
+
+Upstream-Status: Backport
+Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ rngd_jitter.c | 15 ++++++++++++++-
+ 1 file changed, 14 insertions(+), 1 deletion(-)
+
+diff --git a/rngd_jitter.c b/rngd_jitter.c
+index ea29436..5c7e09e 100644
+--- a/rngd_jitter.c
++++ b/rngd_jitter.c
+@@ -67,12 +67,25 @@ static int rngd_notime_start(void *ctx,
+ 	for(i=i-1;i>=0;i--) {
+ 		CPU_SET(i,cpus);
+ 	}
+-	pthread_attr_setaffinity_np(&thread_ctx->notime_pthread_attr, cpusize, cpus);
+ 
++        /*
++	 * Note that only one of:
++	 * HAVE_PTHREAD_ATTR_SETAFFINITY
++	 * and
++	 * HAVE_PTHREAD_SETAFFINITY
++	 * Will ever be set, as per the configure.ac logic
++	 */
++#ifdef HAVE_PTHREAD_ATTR_SETAFFINITY
++	pthread_attr_setaffinity_np(&thread_ctx->notime_pthread_attr, cpusize, cpus);
++#endif
+ 	ret = -pthread_create(&thread_ctx->notime_thread_id,
+ 				&thread_ctx->notime_pthread_attr,
+ 				start_routine, arg);
+ 
++#ifdef HAVE_PTHREAD_SETAFFINITY
++	pthread_setaffinity_np(&thread_ctx->notime_thread_id, cpusize, cpus);
++#endif
++
+ 	CPU_FREE(cpus);
+ 	return ret;
+ }
diff --git a/meta/recipes-support/rng-tools/rng-tools_6.13.bb b/meta/recipes-support/rng-tools/rng-tools_6.14.bb
similarity index 84%
rename from meta/recipes-support/rng-tools/rng-tools_6.13.bb
rename to meta/recipes-support/rng-tools/rng-tools_6.14.bb
index 84dbc76855..6b79a3b040 100644
--- a/meta/recipes-support/rng-tools/rng-tools_6.13.bb
+++ b/meta/recipes-support/rng-tools/rng-tools_6.14.bb
@@ -8,13 +8,14 @@ LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 DEPENDS = "sysfsutils openssl"
 
-SRC_URI = "\
-    git://github.com/nhorman/rng-tools.git \
-    file://init \
-    file://default \
-    file://rngd.service \
-"
-SRCREV = "d8dac0e8bede73e42b3d59f3b48c662ad0032e8c"
+SRC_URI = "git://github.com/nhorman/rng-tools.git \
+           file://init \
+           file://default \
+           file://rngd.service \
+           file://0001-Adding-ability-to-detect-non-posix-extensions-for-pt.patch \
+           file://0002-Allow-for-use-of-either-pthread-affinity-set-methods.patch \
+           "
+SRCREV = "c16176d3800b91f4d016b66733b384493b06f294"
 
 S = "${WORKDIR}/git"
 
-- 
2.31.1


  parent reply	other threads:[~2021-08-22 12:51 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-22 12:50 [PATCH 01/55] tcf-agent: fetching over git:// no longer works Alexander Kanavin
2021-08-22 12:50 ` [PATCH 02/55] binutils: do not build-depend on target flex/bison/zlib Alexander Kanavin
2021-08-22 13:06   ` [OE-core] " Richard Purdie
2021-08-22 13:51     ` Alexander Kanavin
2021-08-22 12:50 ` [PATCH 03/55] lighttpd: convert from autotools to meson Alexander Kanavin
2021-08-22 12:50 ` [PATCH 04/55] libxcrypt: upgrade 4.4.23 -> 4.4.25 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 05/55] systemd: upgrade 249.1 -> 249.3 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 06/55] python3-cython: upgrade 0.29.23 -> 0.29.24 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 07/55] python3-numpy: upgrade 1.21.0 -> 1.21.2 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 08/55] xeyes: upgrade 1.1.2 -> 1.2.0 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 09/55] btrfs-tools: update 5.13 -> 5.13.1 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 10/55] diffutils: update 3.7 -> 3.8 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 11/55] mc: update 4.8.26 - > 4.8.27 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 12/55] libsdl2: update 2.0.14 -> 2.0.16 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 13/55] vulkan-samples: update to latest revision Alexander Kanavin
2021-08-22 12:50 ` [PATCH 14/55] pulseaudio: update 14.2 -> 15.0 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 15/55] libjitterentropy: update 3.0.2 -> 3.1.0 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 16/55] usbutils: upgrade 013 -> 014 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 17/55] inetutils: upgrade 2.0 -> 2.1 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 18/55] mobile-broadband-provider-info: upgrade 20201225 -> 20210805 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 19/55] glib-networking: upgrade 2.68.1 -> 2.68.2 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 20/55] e2fsprogs: upgrade 1.46.2 -> 1.46.4 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 21/55] help2man: upgrade 1.48.3 -> 1.48.4 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 22/55] libedit: upgrade 20210522-3.1 -> 20210714-3.1 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 23/55] log4cplus: upgrade 2.0.6 -> 2.0.7 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 24/55] mtools: upgrade 4.0.34 -> 4.0.35 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 25/55] patchelf: upgrade 0.12 -> 0.13 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 26/55] pkgconf: upgrade 1.7.4 -> 1.8.0 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 27/55] python3-git: upgrade 3.1.18 -> 3.1.20 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 28/55] python3-pip: upgrade 21.2.1 -> 21.2.4 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 29/55] python3-pygments: upgrade 2.9.0 -> 2.10.0 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 30/55] python3-setuptools: upgrade 57.1.0 -> 57.4.0 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 31/55] squashfs-tools: upgrade 4.4 -> 4.5 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 32/55] acpica: upgrade 20210331 -> 20210730 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 33/55] libidn2: upgrade 2.3.1 -> 2.3.2 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 34/55] stress-ng: upgrade 0.12.12 -> 0.13.00 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 35/55] sudo: upgrade 1.9.7p1 -> 1.9.7p2 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 36/55] epiphany: upgrade 40.2 -> 40.3 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 37/55] libgudev: upgrade 236 -> 237 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 38/55] libjpeg-turbo: upgrade 2.1.0 -> 2.1.1 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 39/55] libepoxy: upgrade 1.5.8 -> 1.5.9 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 40/55] mesa: upgrade 21.1.5 -> 21.2.1 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 41/55] pango: upgrade 1.48.7 -> 1.48.9 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 42/55] libinput: upgrade 1.18.0 -> 1.18.1 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 43/55] libxfont2: upgrade 2.0.4 -> 2.0.5 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 44/55] libxft: upgrade 2.3.3 -> 2.3.4 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 45/55] xserver-xorg: upgrade 1.20.12 -> 1.20.13 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 46/55] linux-firmware: upgrade 20210511 -> 20210818 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 47/55] wireless-regdb: upgrade 2021.04.21 -> 2021.07.14 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 48/55] libwebp: upgrade 1.2.0 -> 1.2.1 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 49/55] webkitgtk: upgrade 2.32.2 -> 2.32.3 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 50/55] boost: upgrade 1.76.0 -> 1.77.0 Alexander Kanavin
2021-08-22 12:50 ` [PATCH 51/55] diffoscope: upgrade 179 -> 181 Alexander Kanavin
2021-08-22 12:51 ` [PATCH 52/55] enchant2: upgrade 2.3.0 -> 2.3.1 Alexander Kanavin
2021-08-22 12:51 ` [PATCH 53/55] re2c: upgrade 2.1.1 -> 2.2 Alexander Kanavin
2021-08-22 12:51 ` Alexander Kanavin [this message]
2021-08-22 12:51 ` [PATCH 55/55] kea: backport a patch to fix build errors exposed by latest update batch 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=20210822125103.310416-54-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