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