From e1ea5a3a0bcf5245ff2d7180a9fa1a29115bcb61 Mon Sep 17 00:00:00 2001 From: Vincent Legoll Date: Sun, 22 Mar 2026 11:48:40 +0100 Subject: [PATCH 1/4] nbd: update to 3.27.0 - new version - move from sourceforge to github - add gnutls library - fix compilation warning, by removing CFLAGS addition: ``` : warning: "PROG_NAME" redefined : note: this is the location of the previous definition ``` - fix compilation by adding libnl3 which is detected by configure script and defines macros modifying the code. Error was: ``` nbd-client.c: In function 'main': nbd-client.c:1723:32: error: implicit declaration of function 'persist_mode_main' [-Wimplicit-function-declaration] 1723 | return persist_mode_main(index, sockfds, flags); | ^~~~~~~~~~~~~~~~~ ``` NETLINK-related compilation problem reported upstream, with a proposed fix: https://github.com/NetworkBlockDevice/nbd/pull/183 --- srcpkgs/nbd/template | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/srcpkgs/nbd/template b/srcpkgs/nbd/template index a36cb448e89c1d..3fa5c9214829ba 100644 --- a/srcpkgs/nbd/template +++ b/srcpkgs/nbd/template @@ -1,24 +1,22 @@ # Template file for 'nbd' pkgname=nbd -version=3.24 +version=3.27.0 revision=1 build_style=gnu-configure configure_args="--enable-syslog" hostmakedepends="pkg-config bison" -makedepends="libglib-devel" +makedepends="libglib-devel libnl3-devel gnutls-devel" short_desc="Network Block Device utilities" maintainer="Orphaned " license="GPL-2.0-or-later" homepage="https://nbd.sourceforge.io/" -distfiles="${SOURCEFORGE_SITE}/nbd/nbd-${version}.tar.gz" -checksum=a771022599525fd4f5c17c7b1c88696a91927c227e770425a55f67a7384441b6 +distfiles="https://github.com/NetworkBlockDevice/nbd/releases/download/nbd-${version}/nbd-${version}.tar.xz" +checksum=422a02adcdbab01c622307c6babeda5c84ca6c6f2d4e0b29936e6ae9b6a7662f system_accounts="nbd" nbd_homedir="/var/chroot" conf_files="/etc/nbd-server/config" -CFLAGS+="-DPROG_NAME='\"nbd-client\"'" - post_configure() { # skip systemd unit vsed -e '/^SUBDIRS =/s/systemd//' -i Makefile From 7028094595a32b232616e07f25c7e61d72fc25fc Mon Sep 17 00:00:00 2001 From: Vincent Legoll Date: Sun, 22 Mar 2026 16:01:09 +0100 Subject: [PATCH 2/4] nbd: runit script tweaks - allow forking worker pool, parent process should still stay in the foreground - no need to re-redirect stderr a second time --- srcpkgs/nbd/files/nbd/run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/nbd/files/nbd/run b/srcpkgs/nbd/files/nbd/run index ba721e5ea19b7f..fd245522c16a35 100644 --- a/srcpkgs/nbd/files/nbd/run +++ b/srcpkgs/nbd/files/nbd/run @@ -1,3 +1,3 @@ #!/bin/sh exec 2>&1 -exec nbd-server -d 2>&1 +exec nbd-server -n From edac7b0d220b04fafd503bbb3f7212438357abdc Mon Sep 17 00:00:00 2001 From: Vincent Legoll Date: Thu, 2 Jul 2026 22:02:42 +0200 Subject: [PATCH 3/4] nbd: add check dependency: `which` --- srcpkgs/nbd/template | 1 + 1 file changed, 1 insertion(+) diff --git a/srcpkgs/nbd/template b/srcpkgs/nbd/template index 3fa5c9214829ba..a6b7e017fd2d71 100644 --- a/srcpkgs/nbd/template +++ b/srcpkgs/nbd/template @@ -6,6 +6,7 @@ build_style=gnu-configure configure_args="--enable-syslog" hostmakedepends="pkg-config bison" makedepends="libglib-devel libnl3-devel gnutls-devel" +checkdepends="which" short_desc="Network Block Device utilities" maintainer="Orphaned " license="GPL-2.0-or-later" From 0a528f407bc2311aa9800de19279d3aef6623969 Mon Sep 17 00:00:00 2001 From: Vincent Legoll Date: Thu, 2 Jul 2026 22:04:25 +0200 Subject: [PATCH 4/4] nbd: update to 3.27.1 - use the tagged archive - autoreconf - add required build dependencies - avoid the need for git at build time --- srcpkgs/nbd/template | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/srcpkgs/nbd/template b/srcpkgs/nbd/template index a6b7e017fd2d71..8bf9dd741ad1a4 100644 --- a/srcpkgs/nbd/template +++ b/srcpkgs/nbd/template @@ -1,23 +1,29 @@ # Template file for 'nbd' pkgname=nbd -version=3.27.0 +version=3.27.1 revision=1 build_style=gnu-configure configure_args="--enable-syslog" -hostmakedepends="pkg-config bison" +hostmakedepends="autoconf-archive automake flex libtool pkg-config bison" makedepends="libglib-devel libnl3-devel gnutls-devel" checkdepends="which" short_desc="Network Block Device utilities" maintainer="Orphaned " license="GPL-2.0-or-later" homepage="https://nbd.sourceforge.io/" -distfiles="https://github.com/NetworkBlockDevice/nbd/releases/download/nbd-${version}/nbd-${version}.tar.xz" -checksum=422a02adcdbab01c622307c6babeda5c84ca6c6f2d4e0b29936e6ae9b6a7662f +distfiles="https://github.com/NetworkBlockDevice/nbd/archive/refs/tags/nbd-${version}.tar.gz" +checksum=5e99e7556d713663b7926fa9fde53219be170123bff1c1a3835b78f21cc4befc system_accounts="nbd" nbd_homedir="/var/chroot" conf_files="/etc/nbd-server/config" +pre_configure() { + # Do not require git at build time + echo "echo '${version}'" > support/genver.sh + autoreconf -f -i +} + post_configure() { # skip systemd unit vsed -e '/^SUBDIRS =/s/systemd//' -i Makefile