new file mode 100644
@@ -0,0 +1,50 @@
+From f0418b0d8b54c21a1e5b0c6dce3277e938d07e7c Mon Sep 17 00:00:00 2001
+From: Dave Jones <dave.jones@canonical.com>
+Date: Thu, 14 Mar 2024 11:13:05 +0000
+Subject: [PATCH] Fix the check & no cases of enable_manpages
+
+Currently, running "configure --disable-manpages" while docbook2man *is*
+installed results in the error "don't know what to do here" when it
+should disable manpages.
+
+There also appears to be a missing conditional at the start of the line;
+there's closing un-matched ]) at the end of the line. Still, at this
+point the check can be done in pure shell; no need for AC macros. I've
+also removed the confusing m4_divert_text call on the check case. Not
+sure why that was there, but it appears unnecessary.
+
+Upstream-Status: Backport [https://github.com/NetworkBlockDevice/nbd/commit/f0418b0d8b54c21a1e5b0c6dce3277e938d07e7c]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -328,7 +328,7 @@ AC_MSG_CHECKING([whether man pages are r
+ AC_ARG_ENABLE([manpages],
+ AS_HELP_STRING([--disable-manpages], [Do not install man pages]),
+ [],
+- [: m4_divert_text([DEFAULTS], [enable_manpages=check])]
++ [enable_manpages=check]
+ )
+ AC_MSG_RESULT([$enable_manpages])
+
+@@ -337,9 +337,14 @@ AS_IF([test "x$enable_manpages" != "xno"
+ ])
+ AS_IF([test "x$enable_manpages" = "xyes" -a "x$DB2M" = "x"], [
+ AC_MSG_ERROR([docbook2man not found, but is required to build manpages])
+- ],
+- [test "x$DB2M" != "x"], [enable_manpages=yes],
+- [AC_MSG_ERROR([don't know what to do here])])
++ ])
++if test "x$enable_manpages" = "xcheck"; then
++ if test "x$DB2M" = "x"; then
++ enable_manpages=no
++ else
++ enable_manpages=yes
++ fi
++fi
+ AC_MSG_CHECKING([whether to build manpages])
+ AC_MSG_RESULT([$enable_manpages])
+
deleted file mode 100644
@@ -1,20 +0,0 @@
-DESCRIPTION = "Network Block Device"
-HOMEPAGE = "http://nbd.sourceforge.net"
-SECTION = "net"
-LICENSE = "GPL-2.0-only"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-
-DEPENDS = "autoconf-archive bison-native glib-2.0 libnl"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.xz"
-SRC_URI[md5sum] = "a6d9e7bbc311a2ed07ef84a58b82b5dd"
-SRC_URI[sha256sum] = "6877156d23a7b33f75eee89d2f5c2c91c542afc3cdcb636dea5a88539a58d10c"
-
-inherit autotools pkgconfig
-
-PACKAGES = "${PN}-client ${PN}-dbg ${PN}-doc ${PN}-server ${PN}-trdump ${PN}-trplay"
-
-FILES:${PN}-client = "${sbindir}/${BPN}-client"
-FILES:${PN}-server = "${bindir}/${BPN}-server"
-FILES:${PN}-trdump = "${bindir}/${BPN}-trdump"
-FILES:${PN}-trplay = "${bindir}/${BPN}-trplay"
new file mode 100644
@@ -0,0 +1,22 @@
+DESCRIPTION = "Network Block Device user-space tools (TCP version)"
+HOMEPAGE = "https://github.com/NetworkBlockDevice/nbd"
+SECTION = "net"
+LICENSE = "GPL-2.0-only"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+DEPENDS = "autoconf-archive bison-native glib-2.0 libnl zlib bison-native"
+
+SRC_URI = "https://github.com/NetworkBlockDevice/${BPN}/releases/download/${BP}/${BP}.tar.xz \
+ file://f0418b0d8b54c21a1e5b0c6dce3277e938d07e7c.patch"
+SRC_URI[sha256sum] = "f0cf509fa5b20b1a07f7904eb637e9b47d3e30b6ed6f00075af5d8b701c78fef"
+
+inherit autotools pkgconfig systemd
+
+EXTRA_OECONF += "--enable-syslog --enable-lfs --disable-manpages"
+
+PACKAGES = "${PN}-client ${PN}-dbg ${PN}-doc ${PN}-server ${PN}-trdump ${PN}-trplay"
+
+FILES:${PN}-client = "${sbindir}/${BPN}-client"
+FILES:${PN}-server = "${bindir}/${BPN}-server"
+FILES:${PN}-trdump = "${bindir}/${BPN}-trdump"
+FILES:${PN}-trplay = "${bindir}/${BPN}-trplay"
Backport a build fix when using --disable-manpages Signed-off-by: Khem Raj <raj.khem@gmail.com> --- ...8b0d8b54c21a1e5b0c6dce3277e938d07e7c.patch | 50 +++++++++++++++++++ .../recipes-support/nbd/nbd_3.24.bb | 20 -------- .../recipes-support/nbd/nbd_3.26.1.bb | 22 ++++++++ 3 files changed, 72 insertions(+), 20 deletions(-) create mode 100644 meta-networking/recipes-support/nbd/nbd/f0418b0d8b54c21a1e5b0c6dce3277e938d07e7c.patch delete mode 100644 meta-networking/recipes-support/nbd/nbd_3.24.bb create mode 100644 meta-networking/recipes-support/nbd/nbd_3.26.1.bb