From: Ross Burton <ross.burton@arm.com>
To: meta-arm@lists.yoctoproject.org
Cc: nd@arm.com
Subject: [PATCH 2/2] CI: temporarily backport the procps fix
Date: Fri, 26 Apr 2024 13:45:06 +0000 [thread overview]
Message-ID: <20240426134506.3084899-2-ross.burton@arm.com> (raw)
In-Reply-To: <20240426134506.3084899-1-ross.burton@arm.com>
This patch will be merged upstream soon, apply it locally to unblock CI.
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
...-with-new-glibc-but-old-kernel-heade.patch | 62 +++++++++++++++++++
ci/base.yml | 4 ++
2 files changed, 66 insertions(+)
create mode 100644 0001-procps-fix-build-with-new-glibc-but-old-kernel-heade.patch
diff --git a/0001-procps-fix-build-with-new-glibc-but-old-kernel-heade.patch b/0001-procps-fix-build-with-new-glibc-but-old-kernel-heade.patch
new file mode 100644
index 00000000..dc6cc063
--- /dev/null
+++ b/0001-procps-fix-build-with-new-glibc-but-old-kernel-heade.patch
@@ -0,0 +1,62 @@
+From ac2b9eac4a0e7c3097627939d91ce7970fadcd1a Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@arm.com>
+Date: Fri, 26 Apr 2024 10:38:28 +0000
+Subject: [PATCH] procps: fix build with new glibc but old kernel headers
+
+If you're building procps with a newer glibc (with pidfd_open()) but
+older kernel headers (say 4.x, before __NR_pidfd_open) then procps will
+fail to build because of a typo in configure.ac.
+
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+---
+ .../procps/procps/pidfd.patch | 25 +++++++++++++++++++
+ meta/recipes-extended/procps/procps_4.0.4.bb | 1 +
+ 2 files changed, 26 insertions(+)
+ create mode 100644 meta/recipes-extended/procps/procps/pidfd.patch
+
+diff --git a/meta/recipes-extended/procps/procps/pidfd.patch b/meta/recipes-extended/procps/procps/pidfd.patch
+new file mode 100644
+index 00000000000..4c19043496b
+--- /dev/null
++++ b/meta/recipes-extended/procps/procps/pidfd.patch
+@@ -0,0 +1,25 @@
++From c8f625e085b8249cc009e8b19c3a19100217eb35 Mon Sep 17 00:00:00 2001
++From: Ross Burton <ross.burton@arm.com>
++Date: Thu, 25 Apr 2024 13:33:15 +0000
++Subject: [PATCH] Fix pidfd_open detection
++
++This check for pidfd_open uses AC_CHECK_FUNC which just runs the specified code, but
++src/pgrep.c checks HAVE_PIDFD_OPEN which will only be defined by AC_CHECK_FUNCS.
++
++Upstream-Status: Pending
++Signed-off-by: Ross Burton <ross.burton@arm.com>
++---
++
++diff --git a/configure.ac b/configure.ac
++index fec27e3f..024731c7 100644
++--- a/configure.ac
+++++ b/configure.ac
++@@ -170,7 +170,7 @@ AC_TRY_COMPILE([#include <errno.h>],
++ AC_MSG_RESULT(yes),
++ AC_MSG_RESULT(no))
++
++-AC_CHECK_FUNC([pidfd_open], [enable_pidwait=yes], [
+++AC_CHECK_FUNCS([pidfd_open], [enable_pidwait=yes], [
++ AC_MSG_CHECKING([for __NR_pidfd_open])
++ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
++ #include <sys/syscall.h>
+diff --git a/meta/recipes-extended/procps/procps_4.0.4.bb b/meta/recipes-extended/procps/procps_4.0.4.bb
+index 800384f22f7..ec8c4b0261b 100644
+--- a/meta/recipes-extended/procps/procps_4.0.4.bb
++++ b/meta/recipes-extended/procps/procps_4.0.4.bb
+@@ -14,6 +14,7 @@ inherit autotools gettext pkgconfig update-alternatives
+
+ SRC_URI = "git://gitlab.com/procps-ng/procps.git;protocol=https;branch=master \
+ file://sysctl.conf \
++ file://pidfd.patch \
+ "
+ SRCREV = "4ddcef2fd843170c8e2d59a83042978f41037a2b"
+
+--
+2.34.1
+
diff --git a/ci/base.yml b/ci/base.yml
index a3e2c68b..863159e1 100644
--- a/ci/base.yml
+++ b/ci/base.yml
@@ -21,6 +21,10 @@ repos:
layers:
meta:
meta-poky:
+ patches:
+ procps:
+ path: 0001-procps-fix-build-with-new-glibc-but-old-kernel-heade.patch
+ repo: meta-arm
env:
BB_LOGCONFIG: ""
--
2.34.1
prev parent reply other threads:[~2024-04-26 13:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-26 13:45 [PATCH 1/2] CI: add Kas schema comments Ross Burton
2024-04-26 13:45 ` Ross Burton [this message]
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=20240426134506.3084899-2-ross.burton@arm.com \
--to=ross.burton@arm.com \
--cc=meta-arm@lists.yoctoproject.org \
--cc=nd@arm.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).