diff options
Diffstat (limited to 'meta-networking')
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 @@ | |||
1 | From 1ccbd8fdbd2e367a702e48c8703b2f010d067b23 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 22 May 2023 18:16:24 -0700 | ||
4 | Subject: [PATCH] plugins: Avoid absolute buildpaths in binaries | ||
5 | |||
6 | plugins seems to add CC to the plugins shared objects via compiler | ||
7 | cmdline which ends up in real code. Therefore scrub buildpaths from CC | ||
8 | and CFLAGS before passing them to plugin's build. | ||
9 | |||
10 | Upstream-Status: Submitted [https://gitlab.com/nbdkit/nbdkit/-/merge_requests/30] | ||
11 | |||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | plugins/cc/Makefile.am | 7 +++++-- | ||
15 | 1 file changed, 5 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/plugins/cc/Makefile.am b/plugins/cc/Makefile.am | ||
18 | index 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 | -- | ||
37 | 2.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 @@ | |||
1 | From 28f07715ab4d670ce81e12776bbece043305bd83 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 11 Apr 2020 15:08:39 -0700 | ||
4 | Subject: [PATCH] server: Fix build when printf is a macro | ||
5 | |||
6 | clang complains on x86 when building | ||
7 | |||
8 | main.c:116:2: error: embedding a #include directive within macro arguments is not supported | ||
9 | ^ | ||
10 | |||
11 | convert nesting include into a string assignment, to same effect but | ||
12 | making it compatible with clang as well | ||
13 | |||
14 | Upstream-Status: Submitted [https://github.com/libguestfs/nbdkit/pull/3] | ||
15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
16 | --- | ||
17 | server/main.c | 5 +++-- | ||
18 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
19 | |||
20 | diff --git a/server/main.c b/server/main.c | ||
21 | index 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 | -- | ||
38 | 2.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" | |||
10 | LIC_FILES_CHKSUM = "file://LICENSE;md5=26250adec854bc317493f6fb98efe049" | 10 | LIC_FILES_CHKSUM = "file://LICENSE;md5=26250adec854bc317493f6fb98efe049" |
11 | 11 | ||
12 | SRC_URI = "git://github.com/libguestfs/nbdkit.git;protocol=https;branch=master \ | 12 | SRC_URI = "git://github.com/libguestfs/nbdkit.git;protocol=https;branch=master \ |
13 | " | 13 | file://0001-plugins-Avoid-absolute-buildpaths-in-binaries.patch" |
14 | SRCREV = "6c02c6a469d62a047f230b0ccf03f72328312d2b" | 14 | SRCREV = "6c02c6a469d62a047f230b0ccf03f72328312d2b" |
15 | 15 | ||
16 | S = "${WORKDIR}/git" | 16 | S = "${WORKDIR}/git" |