openembedded-devel.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
From: Armin Kuster <akuster808@gmail.com>
To: openembedded-devel@lists.openembedded.org
Cc: Khem Raj <raj.khem@gmail.com>
Subject: [meta-oe][mickledore][PATCH 19/36] nbdkit: Remove buildpaths from binaries
Date: Wed, 31 May 2023 07:12:52 -0400	[thread overview]
Message-ID: <20230531111309.2454603-19-akuster808@gmail.com> (raw)
In-Reply-To: <20230531111309.2454603-1-akuster808@gmail.com>

From: Khem Raj <raj.khem@gmail.com>

Drop unused patch 0001-server-Fix-build-when-printf-is-a-macro.patch

Fixes
WARNING: nbdkit-1.33.11-r0 do_package_qa: QA Issue: File /usr/lib/nbdkit/plugins/nbdkit-cc-plugin.so in package nbdkit contains reference to TMPDIR [buildpaths]

Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit da331ae8f1fccf3b542526f1caaa3834261434fa)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 ...void-absolute-buildpaths-in-binaries.patch | 38 ++++++++++++++++++
 ...ver-Fix-build-when-printf-is-a-macro.patch | 39 -------------------
 .../recipes-support/nbdkit/nbdkit_1.33.11.bb  |  2 +-
 3 files changed, 39 insertions(+), 40 deletions(-)
 create mode 100644 meta-networking/recipes-support/nbdkit/nbdkit/0001-plugins-Avoid-absolute-buildpaths-in-binaries.patch
 delete mode 100644 meta-networking/recipes-support/nbdkit/nbdkit/0001-server-Fix-build-when-printf-is-a-macro.patch

diff --git a/meta-networking/recipes-support/nbdkit/nbdkit/0001-plugins-Avoid-absolute-buildpaths-in-binaries.patch b/meta-networking/recipes-support/nbdkit/nbdkit/0001-plugins-Avoid-absolute-buildpaths-in-binaries.patch
new file mode 100644
index 0000000000..75377dfb80
--- /dev/null
+++ b/meta-networking/recipes-support/nbdkit/nbdkit/0001-plugins-Avoid-absolute-buildpaths-in-binaries.patch
@@ -0,0 +1,38 @@
+From 1ccbd8fdbd2e367a702e48c8703b2f010d067b23 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 22 May 2023 18:16:24 -0700
+Subject: [PATCH] plugins: Avoid absolute buildpaths in binaries
+
+plugins seems to add CC to the plugins shared objects via compiler
+cmdline which ends up in real code. Therefore scrub buildpaths from CC
+and CFLAGS before passing them to plugin's build.
+
+Upstream-Status: Submitted [https://gitlab.com/nbdkit/nbdkit/-/merge_requests/30]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ plugins/cc/Makefile.am | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/plugins/cc/Makefile.am b/plugins/cc/Makefile.am
+index df8b5d15..80586a17 100644
+--- a/plugins/cc/Makefile.am
++++ b/plugins/cc/Makefile.am
+@@ -44,9 +44,12 @@ nbdkit_cc_plugin_la_SOURCES = \
+ 	$(top_srcdir)/include/nbdkit-plugin.h \
+ 	$(NULL)
+ 
++workdir := $(shell dirname $(abs_top_builddir))
++cc_no_sysroot := $(shell echo \"$(CC)\"|sed -e 's#$(workdir)#<WORKDIR>#g')
++cflags_no_sysroot := $(shell echo \"$(CFLAGS)\"|sed -e 's#$(workdir)#<WORKDIR>#g')
+ nbdkit_cc_plugin_la_CPPFLAGS = \
+-	-DCC="\"$(CC)\"" \
+-	-DCFLAGS="\"$(CFLAGS)\"" \
++	-DCC=\"$(cc_no_sysroot)\" \
++	-DCFLAGS=\"$(cflags_no_sysroot)\" \
+ 	-I$(top_srcdir)/include \
+ 	-I$(top_builddir)/include \
+ 	-I$(top_srcdir)/common/include \
+-- 
+2.40.1
+
diff --git a/meta-networking/recipes-support/nbdkit/nbdkit/0001-server-Fix-build-when-printf-is-a-macro.patch b/meta-networking/recipes-support/nbdkit/nbdkit/0001-server-Fix-build-when-printf-is-a-macro.patch
deleted file mode 100644
index c7ec41eb9a..0000000000
--- a/meta-networking/recipes-support/nbdkit/nbdkit/0001-server-Fix-build-when-printf-is-a-macro.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 28f07715ab4d670ce81e12776bbece043305bd83 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 11 Apr 2020 15:08:39 -0700
-Subject: [PATCH] server: Fix build when printf is a macro
-
-clang complains on x86 when building
-
-main.c:116:2: error: embedding a #include directive within macro arguments is not supported
- ^
-
-convert nesting include into a string assignment, to same effect but
-making it compatible with clang as well
-
-Upstream-Status: Submitted [https://github.com/libguestfs/nbdkit/pull/3]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- server/main.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/server/main.c b/server/main.c
-index 748122f..c0ac874 100644
---- a/server/main.c
-+++ b/server/main.c
-@@ -112,9 +112,10 @@ static void
- usage (void)
- {
-   /* --{short,long}-options remain undocumented */
--  printf (
-+  char const *opt_list =
- #include "synopsis.c"
--  );
-+	  ;
-+  printf ("%s\n", opt_list);
-   printf ("\n"
-           "Please read the nbdkit(1) manual page for full usage.\n");
- }
--- 
-2.26.0
-
diff --git a/meta-networking/recipes-support/nbdkit/nbdkit_1.33.11.bb b/meta-networking/recipes-support/nbdkit/nbdkit_1.33.11.bb
index 32d4270d18..cdf2677f13 100644
--- a/meta-networking/recipes-support/nbdkit/nbdkit_1.33.11.bb
+++ b/meta-networking/recipes-support/nbdkit/nbdkit_1.33.11.bb
@@ -10,7 +10,7 @@ LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=26250adec854bc317493f6fb98efe049"
 
 SRC_URI = "git://github.com/libguestfs/nbdkit.git;protocol=https;branch=master \
-"
+           file://0001-plugins-Avoid-absolute-buildpaths-in-binaries.patch"
 SRCREV = "6c02c6a469d62a047f230b0ccf03f72328312d2b"
 
 S = "${WORKDIR}/git"
-- 
2.25.1



  parent reply	other threads:[~2023-05-31 11:13 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-31 11:12 [meta-oe][mickledore][PATCH 01/36] libencode-perl: Remove buildpaths from generated .exh files Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 02/36] frr: add CVE_PRODUCT Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 03/36] enca: Remove buildpaths from target scripts Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 04/36] libirecovery: Add missing build dependency on readline Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 05/36] fftw: Remove hardcoded sysroot into binaries Armin Kuster
2023-06-07  7:53   ` [oe] " Böszörményi Zoltán
2023-06-07  8:09     ` Khem Raj
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 06/36] lmdb: Pass CFLAGS to Makefile Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 07/36] postgresql: upgrade 15.2 -> 15.3 Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 08/36] ipmitool: Update links Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 09/36] minicoredumper: correct the sysvinit service file attribute Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 10/36] php: upgrade 8.2.5 -> 8.2.6 Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 11/36] php: Remove buildpaths from scripts and generated headers Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 12/36] libusbgx: drop hard-coded /usr/bin,/etc Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 13/36] libusbgx: check scripts in /etc/usbgx.d Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 14/36] uw-imap: Pass CFLAGS from environment Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 15/36] libmad: Add a patch to pass cflags to build Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 16/36] libpeas: Fix reference to TMPDIR in tests Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 17/36] lirc: Define SH_PATH=/bin/sh Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 18/36] mce-inject: Pass CFLAGS to make Armin Kuster
2023-05-31 11:12 ` Armin Kuster [this message]
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 20/36] mpv: Remove references to builddir from mpv binary Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 21/36] libnice: Remove buildpaths from binaries Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 22/36] curlpp: Remove references to buildpaths e.g. TMPDIR Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 23/36] unbound: Remove references to buildpaths Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 24/36] uml-utilities: Fix references to TMPDIR Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 25/36] openct: Fix buildpaths being emitted into generated types.h Armin Kuster
2023-05-31 11:12 ` [meta-oe][mickledore][PATCH 26/36] minifi-cpp: Remove references to buildpaths in generated files Armin Kuster
2023-05-31 11:13 ` [meta-oe][mickledore][PATCH 27/36] freerdp: Fix reference to TMPDIR in libfreerdp2.so Armin Kuster
2023-05-31 11:13 ` [meta-oe][mickledore][PATCH 28/36] nautilus: upgrade 44.0 -> 44.1 Armin Kuster
2023-05-31 11:13 ` [meta-oe][mickledore][PATCH 29/36] nautilus: Fix buildpath QA errors Armin Kuster
2023-05-31 11:13 ` [meta-oe][mickledore][PATCH 30/36] cgdb: Fix buildpaths emitted into cgdb binary Armin Kuster
2023-05-31 11:13 ` [meta-oe][mickledore][PATCH 31/36] ibus: Point python interpreter to target location Armin Kuster
2023-05-31 11:13 ` [meta-oe][mickledore][PATCH 32/36] gimp: Fix buildpaths in binaries and scripts Armin Kuster
2023-05-31 11:13 ` [meta-oe][mickledore][PATCH 33/36] libgphoto2: Edit out sysroot from CC variable in configure Armin Kuster
2023-05-31 11:13 ` [meta-oe][mickledore][PATCH 34/36] vlan: Pass CFLAGS via CCFLAGS Armin Kuster
2023-05-31 11:13 ` [meta-oe][mickledore][PATCH 35/36] sgpio: Pass CFLAGS to make Armin Kuster
2023-05-31 11:13 ` [meta-oe][mickledore][PATCH 36/36] x265: Pass --debug-prefix-map to nasm Armin Kuster

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=20230531111309.2454603-19-akuster808@gmail.com \
    --to=akuster808@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    --cc=raj.khem@gmail.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 NNTP newsgroup(s).