Description: Autogenerated patch header for a single-debian-patch file.
 The delta against upstream is either kept as a single patch, or maintained
 in some VCS, and exported as a single patch instead of more manageable
 atomic patches.
Forwarded: not-needed

---
--- /dev/null
+++ nbd-3.26.1/.dir-locals.el
@@ -0,0 +1,2 @@
+((c-mode . ((c-file-style . "linux")
+	    (indent-tabs-mode . t))))
--- /dev/null
+++ nbd-3.26.1/.github/workflows/build.yml
@@ -0,0 +1,13 @@
+name: Build NBD
+on: [push]
+jobs:
+  Build-NBD:
+    runs-on: ubuntu-latest
+    steps:
+      - name: install dependencies
+        run: sudo apt-get update && sudo apt-get -y install docbook-utils libglib2.0-dev libgnutls28-dev libnl-genl-3-dev autoconf-archive
+      - name: Check out repository
+        uses: actions/checkout@v4
+      - run: ./autogen.sh
+      - run: ./configure --enable-syslog
+      - run: make distcheck
--- /dev/null
+++ nbd-3.26.1/.gitlab-ci.yml
@@ -0,0 +1,14 @@
+before_script:
+  - apt-get update
+  - apt-get install -y devscripts fakeroot build-essential git autoconf automake docbook-utils pkg-config
+  - mk-build-deps -t "apt-get -y -o Debug::pkgProblemResolver=yes --no-install-recommends" -i -r
+  - rm -f nbd-build-deps*
+  - ./autogen.sh
+build_unstable:
+  image: debian:sid
+  script:
+  - dpkg-buildpackage -rfakeroot -b
+build_testing:
+  image: debian:testing
+  script:
+  - dpkg-buildpackage -rfakeroot -b
--- nbd-3.26.1.orig/configure.ac
+++ nbd-3.26.1/configure.ac
@@ -2,7 +2,7 @@ dnl Configure script for NBD system
 dnl (c) 1998 Martin Mares <mj@ucw.cz>, (c) 2000 Pavel Machek <pavel@ucw.cz>,
 dnl (c) 2003-2024 Wouter Verhelst <wouter@debian.org>
 AC_INIT([nbd],
-  m4_esyscmd(support/genver.sh | tr -d '\n'),
+  [3.26.1],
   [nbd@other.debian.org],,
   [http://nbd.sourceforge.net/])
 m4_define([serial_tests], [
--- /dev/null
+++ nbd-3.26.1/coverity_model.c
@@ -0,0 +1,7 @@
+
+typedef struct _GArray GArray;
+#define g_array_append_val(a, v) g_array_append_vals(a, &(v), 1)
+
+GArray* g_array_append_vals(GArray*, void*, unsigned int) {
+	__coverity_escape__;
+}
--- /dev/null
+++ nbd-3.26.1/man/sh.tmpl
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+sysconfdir=@sysconfdir@
+
+cat <<EOF
--- nbd-3.26.1.orig/nbd-server.c
+++ nbd-3.26.1/nbd-server.c
@@ -773,14 +773,6 @@ GArray* do_cfile_dir(gchar* dir, struct
 }
 
 /**
- * To be called by GArray clearing function.
- * @param server pointer to server element
- */
-static void serve_clear_element(SERVER **server) {
-	serve_dec_ref(*server);
-}
-
-/**
  * Parse the config file.
  *
  * @param f the name of the config file
--- nbd-3.26.1.orig/nbdsrv.h
+++ nbd-3.26.1/nbdsrv.h
@@ -238,6 +238,13 @@ SERVER* serve_inc_ref(SERVER *s);
 SERVER* serve_dec_ref(SERVER *s);
 
 /**
+ * call serve_dec_ref on *s
+ *
+ * @param s a pointer to a pointer to a SERVER to decrement
+ **/
+void serve_clear_element(SERVER **s);
+
+/**
  * Punch a hole in the backend file (if supported by the current system).
  *
  * @param req the request for which this is being processed
--- nbd-3.26.1.orig/systemd/nbd@.service.sh.in
+++ nbd-3.26.1/systemd/nbd@.service.sh.in
@@ -10,6 +10,7 @@ Description=NBD client connection for %i
 Documentation=man:nbd-client
 PartOf=nbd.service
 Before=dev-%i.device
+Before=remote-fs-pre.target
 After=network-online.target
 Conflicts=shutdown.target
 DefaultDependencies=no
--- nbd-3.26.1.orig/systemd/nbd@.service.tmpl
+++ nbd-3.26.1/systemd/nbd@.service.tmpl
@@ -8,8 +8,10 @@ After=network-online.target
 Conflicts=shutdown.target
 DefaultDependencies=no
 [Service]
-Type=forking
+Type=oneshot
+RemainAfterExit=yes
 ExecStart=@sbindir@/nbd-client %i
+ExecStop=@sbindir@/nbd-client -d /dev/%i
 [Install]
 RequiredBy=dev-%i.device
 RequiredBy=dev-%ip1.device
--- nbd-3.26.1.orig/tests/parse/ipv6
+++ nbd-3.26.1/tests/parse/ipv6
@@ -1,5 +1,3 @@
-
-
 # This config file contains a few empty lines.
 
 # It also contains an IPv6 address
