diff options
Diffstat (limited to 'meta-networking/recipes-support/nbdkit')
3 files changed, 67 insertions, 1 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..524ea0602d --- /dev/null +++ b/meta-networking/recipes-support/nbdkit/nbdkit/0002-plugins-Avoid-absolute-buildpaths-in-binaries.patch | |||
@@ -0,0 +1,34 @@ | |||
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 | --- a/plugins/cc/Makefile.am | ||
18 | +++ b/plugins/cc/Makefile.am | ||
19 | @@ -44,9 +44,13 @@ nbdkit_cc_plugin_la_SOURCES = \ | ||
20 | $(top_srcdir)/include/nbdkit-plugin.h \ | ||
21 | $(NULL) | ||
22 | |||
23 | +workdir1 := $(shell dirname $(abs_top_builddir)) | ||
24 | +workdir := $(shell dirname $(workdir1)) | ||
25 | +cc_no_sysroot := $(shell echo \"$(CC)\"|sed -e 's#$(workdir)#<WORKDIR>#g') | ||
26 | +cflags_no_sysroot := $(shell echo \"$(CFLAGS)\"|sed -e 's#$(workdir)#<WORKDIR>#g') | ||
27 | nbdkit_cc_plugin_la_CPPFLAGS = \ | ||
28 | - -DCC="\"$(CC_PLUGIN_CC)\"" \ | ||
29 | - -DCFLAGS="\"$(CC_PLUGIN_CFLAGS)\"" \ | ||
30 | + -DCC=\"$(cc_no_sysroot)\" \ | ||
31 | + -DCFLAGS=\"$(cflags_no_sysroot)\" \ | ||
32 | -I$(top_srcdir)/include \ | ||
33 | -I$(top_builddir)/include \ | ||
34 | -I$(top_srcdir)/common/include \ | ||
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 cdf2677f13..1c9db1e956 100644 --- a/meta-networking/recipes-support/nbdkit/nbdkit_1.33.11.bb +++ b/meta-networking/recipes-support/nbdkit/nbdkit_1.33.11.bb | |||
@@ -13,7 +13,6 @@ SRC_URI = "git://github.com/libguestfs/nbdkit.git;protocol=https;branch=master \ | |||
13 | file://0001-plugins-Avoid-absolute-buildpaths-in-binaries.patch" | 13 | file://0001-plugins-Avoid-absolute-buildpaths-in-binaries.patch" |
14 | SRCREV = "6c02c6a469d62a047f230b0ccf03f72328312d2b" | 14 | SRCREV = "6c02c6a469d62a047f230b0ccf03f72328312d2b" |
15 | 15 | ||
16 | S = "${WORKDIR}/git" | ||
17 | 16 | ||
18 | DEPENDS = "curl xz e2fsprogs zlib" | 17 | DEPENDS = "curl xz e2fsprogs zlib" |
19 | 18 | ||
diff --git a/meta-networking/recipes-support/nbdkit/nbdkit_1.43.11.bb b/meta-networking/recipes-support/nbdkit/nbdkit_1.43.11.bb new file mode 100644 index 0000000000..9e7bdc9966 --- /dev/null +++ b/meta-networking/recipes-support/nbdkit/nbdkit_1.43.11.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=master;tag=v${PV} \ | ||
13 | file://0002-plugins-Avoid-absolute-buildpaths-in-binaries.patch \ | ||
14 | " | ||
15 | SRCREV = "2d0f232b590f4001881dd0819f55af72b88c4b2f" | ||
16 | |||
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" | ||