diff options
-rw-r--r-- | meta-networking/recipes-support/nbdkit/nbdkit/0002-plugins-Avoid-absolute-buildpaths-in-binaries.patch | 38 | ||||
-rw-r--r-- | meta-networking/recipes-support/nbdkit/nbdkit_1.40.4.bb | 33 |
2 files changed, 71 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/nbdkit/nbdkit/0002-plugins-Avoid-absolute-buildpaths-in-binaries.patch b/meta-networking/recipes-support/nbdkit/nbdkit/0002-plugins-Avoid-absolute-buildpaths-in-binaries.patch new file mode 100644 index 0000000000..2f7ffd3d20 --- /dev/null +++ b/meta-networking/recipes-support/nbdkit/nbdkit/0002-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_PLUGIN_CC)\"" \ | ||
30 | - -DCFLAGS="\"$(CC_PLUGIN_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_1.40.4.bb b/meta-networking/recipes-support/nbdkit/nbdkit_1.40.4.bb new file mode 100644 index 0000000000..0d24e96a5d --- /dev/null +++ b/meta-networking/recipes-support/nbdkit/nbdkit_1.40.4.bb | |||
@@ -0,0 +1,33 @@ | |||
1 | SUMMARY = "nbdkit is a toolkit for creating NBD servers." | ||
2 | DESCRIPTION = "NBD — Network Block Device — is a protocol \ | ||
3 | for accessing Block Devices (hard disks and disk-like things) \ | ||
4 | over a Network. \ | ||
5 | \ | ||
6 | nbdkit is a toolkit for creating NBD servers." | ||
7 | |||
8 | HOMEPAGE = "https://gitlab.com/nbdkit/nbdkit" | ||
9 | LICENSE = "BSD-3-Clause" | ||
10 | LIC_FILES_CHKSUM = "file://LICENSE;md5=26250adec854bc317493f6fb98efe049" | ||
11 | |||
12 | SRC_URI = "git://gitlab.com/nbdkit/nbdkit.git;protocol=https;branch=stable-1.40 \ | ||
13 | file://0002-plugins-Avoid-absolute-buildpaths-in-binaries.patch" | ||
14 | SRCREV = "0d111a31d9dbc473b9eb901fefe07f0ad392c75a" | ||
15 | |||
16 | S = "${WORKDIR}/git" | ||
17 | |||
18 | DEPENDS = "curl xz e2fsprogs zlib" | ||
19 | |||
20 | # autotools-brokensep is needed as nbdkit does not support build in external directory | ||
21 | inherit pkgconfig python3native perlnative bash-completion autotools-brokensep | ||
22 | |||
23 | # Those are required to build standalone | ||
24 | EXTRA_OECONF = " --without-libvirt --without-libguestfs --disable-perl" | ||
25 | |||
26 | # Disable some extended support (not desired for small embedded systems) | ||
27 | #EXTRA_OECONF += " --disable-python" | ||
28 | #EXTRA_OECONF += " --disable-ocaml" | ||
29 | #EXTRA_OECONF += " --disable-rust" | ||
30 | #EXTRA_OECONF += " --disable-ruby" | ||
31 | #EXTRA_OECONF += " --disable-tcl" | ||
32 | #EXTRA_OECONF += " --disable-lua" | ||
33 | #EXTRA_OECONF += " --disable-vddk" | ||