diff mbox series

[meta-networking,meta-oe,10/22] nbd: Upgrade to 3.26.1

Message ID 20240521181024.426176-10-raj.khem@gmail.com
State New
Headers show
Series [meta-oe,01/22] libsdl: Fix build with musl | expand

Commit Message

Khem Raj May 21, 2024, 6:10 p.m. UTC
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
diff mbox series

Patch

diff --git a/meta-networking/recipes-support/nbd/nbd/f0418b0d8b54c21a1e5b0c6dce3277e938d07e7c.patch b/meta-networking/recipes-support/nbd/nbd/f0418b0d8b54c21a1e5b0c6dce3277e938d07e7c.patch
new file mode 100644
index 0000000000..716ded55be
--- /dev/null
+++ b/meta-networking/recipes-support/nbd/nbd/f0418b0d8b54c21a1e5b0c6dce3277e938d07e7c.patch
@@ -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])
+ 
diff --git a/meta-networking/recipes-support/nbd/nbd_3.24.bb b/meta-networking/recipes-support/nbd/nbd_3.24.bb
deleted file mode 100644
index da9f829523..0000000000
--- a/meta-networking/recipes-support/nbd/nbd_3.24.bb
+++ /dev/null
@@ -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"
diff --git a/meta-networking/recipes-support/nbd/nbd_3.26.1.bb b/meta-networking/recipes-support/nbd/nbd_3.26.1.bb
new file mode 100644
index 0000000000..15d5f8b36b
--- /dev/null
+++ b/meta-networking/recipes-support/nbd/nbd_3.26.1.bb
@@ -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"