From 4b95b33cb83427dbe57c6cdf3519717b54de8cbb Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 8 Sep 2019 10:50:09 +0100 Subject: [PATCH 01/26] New stable version 1.0.1. --- libnbd.spec | 7 +++++-- sources | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libnbd.spec b/libnbd.spec index a127cbc..3aa4bf9 100644 --- a/libnbd.spec +++ b/libnbd.spec @@ -5,10 +5,10 @@ %global patches_touch_autotools %{nil} # The source directory. -%global source_directory 0.x-unstable-api +%global source_directory 1.0-stable Name: libnbd -Version: 1.0.0 +Version: 1.0.1 Release: 1%{?dist} Summary: NBD client library in userspace @@ -219,6 +219,9 @@ make %{?_smp_mflags} check || { %changelog +* Sun Sep 08 2019 Richard W.M. Jones - 1.0.1-1 +- New stable version 1.0.1. + * Wed Aug 28 2019 Richard W.M. Jones - 1.0.0-1 - New upstream version 1.0.0. diff --git a/sources b/sources index 82ba189..311c0bc 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libnbd-1.0.0.tar.gz) = 9d9a60d172b9a0dff0d882db72be7243b6fccceb76d240bc385a55ea2358e317a6792288d443ee068d6c894dc0d80f1a900c8ac7f681babcde98c1b7caf9e61a -SHA512 (libnbd-1.0.0.tar.gz.sig) = 982f723233951bac6f24b0c3a9a2a60379ff1a35bb37058259164666a4e9511634653c2c8f5bed32fc8d4c23083144a9ed73cae159e948e66f52a43734246f8d +SHA512 (libnbd-1.0.1.tar.gz) = 76437cdd05ed0755ff4db055947565197a8e2626d139ee01153f4b370396cffce5233fb1ccc79072e074ba0a0f70768903fd29462dfe2655d34ae191271f7951 +SHA512 (libnbd-1.0.1.tar.gz.sig) = 424c865ace483b3d466882d5fbe069973be361786c6d5bafdc295fa98f39558c8d18abbd3f2a18380ba53482c5308d6da691f5bdceaaedc2cbfa89602342660d From cdfa595f382e8d6c55b2a46ec5cadfdefda78897 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 12 Sep 2019 08:39:04 +0100 Subject: [PATCH 02/26] Add upstream patch to fix nbdsh (for nbdkit tests). (cherry picked from commit 52e6bd7cc34862eca690b2a0332a623252d216ff) --- 0001-nbdsh-Fix-behaviour-of-globals.patch | 31 +++++++++++++++++++++++ libnbd.spec | 8 +++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 0001-nbdsh-Fix-behaviour-of-globals.patch diff --git a/0001-nbdsh-Fix-behaviour-of-globals.patch b/0001-nbdsh-Fix-behaviour-of-globals.patch new file mode 100644 index 0000000..e0467ab --- /dev/null +++ b/0001-nbdsh-Fix-behaviour-of-globals.patch @@ -0,0 +1,31 @@ +From efd232c089261d4b471ff3e140c28a91c0ae5bbe Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Wed, 11 Sep 2019 22:25:57 +0100 +Subject: [PATCH] nbdsh: Fix behaviour of globals. + +https://stackoverflow.com/a/11754346 +(cherry picked from commit d6cbd130101add28431bd6e67aa2ea0430a9234e) +--- + python/nbdsh.py | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/python/nbdsh.py b/python/nbdsh.py +index bb0db64..553e632 100644 +--- a/python/nbdsh.py ++++ b/python/nbdsh.py +@@ -57,8 +57,10 @@ help (nbd) # Display documentation + if not args.command: + code.interact (banner = banner, local = locals(), exitmsg = '') + else: ++ # https://stackoverflow.com/a/11754346 ++ d = dict (locals(), **globals()) + for c in args.command: + if c != '-': +- exec (c) ++ exec (c, d, d) + else: +- exec (sys.stdin.read ()) ++ exec (sys.stdin.read (), d, d) +-- +2.23.0 + diff --git a/libnbd.spec b/libnbd.spec index 3aa4bf9..66126e4 100644 --- a/libnbd.spec +++ b/libnbd.spec @@ -9,7 +9,7 @@ Name: libnbd Version: 1.0.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: NBD client library in userspace License: LGPLv2+ @@ -22,6 +22,9 @@ Source1: http://libguestfs.org/download/libnbd/%{source_directory}/%{name # https://pgp.key-server.io/pks/lookup?search=rjones%40redhat.com&fingerprint=on&op=vindex Source2: libguestfs.keyring +# Upstream patch to fix nbdsh. +Patch0001: 0001-nbdsh-Fix-behaviour-of-globals.patch + %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool %endif @@ -219,6 +222,9 @@ make %{?_smp_mflags} check || { %changelog +* Thu Sep 12 2019 Richard W.M. Jones - 1.1.1-2 +- Add upstream patch to fix nbdsh (for nbdkit tests). + * Sun Sep 08 2019 Richard W.M. Jones - 1.0.1-1 - New stable version 1.0.1. From 8651382d3edb35effa51bde7e72e2a1ced3b9b41 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 12 Sep 2019 11:04:11 +0100 Subject: [PATCH 03/26] Fix interop tests on slow machines. --- 0001-nbdsh-Fix-behaviour-of-globals.patch | 5 +- ...Try-to-return-errno-from-underlying-.patch | 83 +++++++++++++++++++ ...op-Retry-TCP-connections-to-qemu-nbd.patch | 71 ++++++++++++++++ libnbd.spec | 3 + 4 files changed, 159 insertions(+), 3 deletions(-) create mode 100644 0002-nbd_connect_tcp-Try-to-return-errno-from-underlying-.patch create mode 100644 0003-interop-Retry-TCP-connections-to-qemu-nbd.patch diff --git a/0001-nbdsh-Fix-behaviour-of-globals.patch b/0001-nbdsh-Fix-behaviour-of-globals.patch index e0467ab..738a607 100644 --- a/0001-nbdsh-Fix-behaviour-of-globals.patch +++ b/0001-nbdsh-Fix-behaviour-of-globals.patch @@ -1,10 +1,9 @@ -From efd232c089261d4b471ff3e140c28a91c0ae5bbe Mon Sep 17 00:00:00 2001 +From d6cbd130101add28431bd6e67aa2ea0430a9234e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 11 Sep 2019 22:25:57 +0100 -Subject: [PATCH] nbdsh: Fix behaviour of globals. +Subject: [PATCH 1/3] nbdsh: Fix behaviour of globals. https://stackoverflow.com/a/11754346 -(cherry picked from commit d6cbd130101add28431bd6e67aa2ea0430a9234e) --- python/nbdsh.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/0002-nbd_connect_tcp-Try-to-return-errno-from-underlying-.patch b/0002-nbd_connect_tcp-Try-to-return-errno-from-underlying-.patch new file mode 100644 index 0000000..f96314c --- /dev/null +++ b/0002-nbd_connect_tcp-Try-to-return-errno-from-underlying-.patch @@ -0,0 +1,83 @@ +From d2d3940a65dab60a2caeaf824eaff12fcc85e1f0 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Thu, 12 Sep 2019 10:28:19 +0100 +Subject: [PATCH 2/3] nbd_connect_tcp: Try to return errno from underlying + connect(2) call. + +When we make a TCP connection we have to make multiple underlying +connect(2) calls, once for each address returned by getaddrinfo. +Unfortunately this meant that we lost the errno from any of these +calls: + +$ nbdsh -c 'h.connect_tcp ("localhost", "nbd")' +nbd.Error: nbd_connect_tcp: connect: localhost:nbd: could not connect to remote host + +This commit saves the errno from the first failed connect(2): + +$ ./run nbdsh -c 'h.connect_tcp ("localhost", "nbd")' +nbd.Error: nbd_connect_tcp: connect: localhost:nbd: could not connect to remote host: Connection refused (ECONNREFUSED) +--- + generator/states-connect.c | 12 ++++++++++-- + lib/internal.h | 1 + + 2 files changed, 11 insertions(+), 2 deletions(-) + +diff --git a/generator/states-connect.c b/generator/states-connect.c +index 9e2e1d4..e9b3582 100644 +--- a/generator/states-connect.c ++++ b/generator/states-connect.c +@@ -128,6 +128,8 @@ disable_nagle (int sock) + h->result = NULL; + } + ++ h->connect_errno = 0; ++ + memset (&h->hints, 0, sizeof h->hints); + h->hints.ai_family = AF_UNSPEC; + h->hints.ai_socktype = SOCK_STREAM; +@@ -160,7 +162,8 @@ disable_nagle (int sock) + * Save errno from most recent connect(2) call. XXX + */ + SET_NEXT_STATE (%^START); +- set_error (0, "connect: %s:%s: could not connect to remote host", ++ set_error (h->connect_errno, ++ "connect: %s:%s: could not connect to remote host", + h->hostname, h->port); + return -1; + } +@@ -182,6 +185,8 @@ disable_nagle (int sock) + + if (connect (fd, h->rp->ai_addr, h->rp->ai_addrlen) == -1) { + if (errno != EINPROGRESS) { ++ if (h->connect_errno == 0) ++ h->connect_errno = errno; + SET_NEXT_STATE (%NEXT_ADDRESS); + return 0; + } +@@ -203,8 +208,11 @@ disable_nagle (int sock) + /* This checks the status of the original connect call. */ + if (status == 0) + SET_NEXT_STATE (%^MAGIC.START); +- else ++ else { ++ if (h->connect_errno == 0) ++ h->connect_errno = status; + SET_NEXT_STATE (%NEXT_ADDRESS); ++ } + return 0; + + CONNECT_TCP.NEXT_ADDRESS: +diff --git a/lib/internal.h b/lib/internal.h +index a48edff..ccaca32 100644 +--- a/lib/internal.h ++++ b/lib/internal.h +@@ -188,6 +188,7 @@ struct nbd_handle { + char *hostname, *port; + struct addrinfo hints; + struct addrinfo *result, *rp; ++ int connect_errno; + + /* When sending metadata contexts, this is used. */ + size_t querynum; +-- +2.23.0 + diff --git a/0003-interop-Retry-TCP-connections-to-qemu-nbd.patch b/0003-interop-Retry-TCP-connections-to-qemu-nbd.patch new file mode 100644 index 0000000..d141920 --- /dev/null +++ b/0003-interop-Retry-TCP-connections-to-qemu-nbd.patch @@ -0,0 +1,71 @@ +From b23b5b32250e5a03e4cc38ccf973e25e63ccc6d9 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Thu, 12 Sep 2019 10:38:48 +0100 +Subject: [PATCH 3/3] interop: Retry TCP connections to qemu-nbd. + +The test interop-qemu-nbd-tls-certs frequently fails on slow (32 bit) +machines in Fedora Koji. (Is crypto slow on these already overloaded +machines?) + +As we cannot wait for a signal when qemu-nbd is ready start serving, +we have to use a sleep. The current sleep is 5 seconds, which is not +long enough. Making the sleep longer would work but is inconsiderate +for people using faster machines. Therefore replace this with a retry +loop with exponential backoff. + +I tested this with a simple wrapper around qemu-nbd which did: + + sleep 5; exec /usr/bin/qemu-nbd "$@" +--- + interop/interop.c | 19 +++++++++++++------ + 1 file changed, 13 insertions(+), 6 deletions(-) + +diff --git a/interop/interop.c b/interop/interop.c +index 662d871..a3ab39b 100644 +--- a/interop/interop.c ++++ b/interop/interop.c +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + #include + + #include +@@ -44,6 +45,7 @@ main (int argc, char *argv[]) + int port; + char port_str[16]; + pid_t pid = -1; ++ int retry; + #endif + int64_t actual_size; + char buf[512]; +@@ -114,14 +116,19 @@ main (int argc, char *argv[]) + } + + /* Unfortunately there's no good way to wait for qemu-nbd to start +- * serving, so ... ++ * serving, so we need to retry here. + */ +- sleep (5); +- +- if (nbd_connect_tcp (nbd, "localhost", port_str) == -1) { +- fprintf (stderr, "%s\n", nbd_get_error ()); +- goto out; ++ for (retry = 0; retry < 5; ++retry) { ++ sleep (1 << retry); ++ if (nbd_connect_tcp (nbd, "localhost", port_str) == -1) { ++ fprintf (stderr, "%s\n", nbd_get_error ()); ++ if (nbd_get_errno () != ECONNREFUSED) ++ goto out; ++ } ++ else break; + } ++ if (retry == 5) ++ goto out; + + #else /* !SERVE_OVER_TCP */ + +-- +2.23.0 + diff --git a/libnbd.spec b/libnbd.spec index 66126e4..d5664b3 100644 --- a/libnbd.spec +++ b/libnbd.spec @@ -24,6 +24,8 @@ Source2: libguestfs.keyring # Upstream patch to fix nbdsh. Patch0001: 0001-nbdsh-Fix-behaviour-of-globals.patch +Patch0002: 0002-nbd_connect_tcp-Try-to-return-errno-from-underlying-.patch +Patch0003: 0003-interop-Retry-TCP-connections-to-qemu-nbd.patch %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool @@ -224,6 +226,7 @@ make %{?_smp_mflags} check || { %changelog * Thu Sep 12 2019 Richard W.M. Jones - 1.1.1-2 - Add upstream patch to fix nbdsh (for nbdkit tests). +- Fix interop tests on slow machines. * Sun Sep 08 2019 Richard W.M. Jones - 1.0.1-1 - New stable version 1.0.1. From 19fec5b94162002f7f53349459cece20adaf7fb1 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 17 Sep 2019 16:42:32 +0100 Subject: [PATCH 04/26] New upstream version 1.0.2. Remove patches which are upstream. Contains fix for NBD Protocol Downgrade Attack (CVE-2019-14842). (cherry picked from commit 46c80ed0b2c29dbada7ba671361d245dfd26488d) --- 0001-nbdsh-Fix-behaviour-of-globals.patch | 30 ----------------------- libnbd.spec | 16 ++++++++---- sources | 4 +-- 3 files changed, 13 insertions(+), 37 deletions(-) delete mode 100644 0001-nbdsh-Fix-behaviour-of-globals.patch diff --git a/0001-nbdsh-Fix-behaviour-of-globals.patch b/0001-nbdsh-Fix-behaviour-of-globals.patch deleted file mode 100644 index 738a607..0000000 --- a/0001-nbdsh-Fix-behaviour-of-globals.patch +++ /dev/null @@ -1,30 +0,0 @@ -From d6cbd130101add28431bd6e67aa2ea0430a9234e Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Wed, 11 Sep 2019 22:25:57 +0100 -Subject: [PATCH 1/3] nbdsh: Fix behaviour of globals. - -https://stackoverflow.com/a/11754346 ---- - python/nbdsh.py | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/python/nbdsh.py b/python/nbdsh.py -index bb0db64..553e632 100644 ---- a/python/nbdsh.py -+++ b/python/nbdsh.py -@@ -57,8 +57,10 @@ help (nbd) # Display documentation - if not args.command: - code.interact (banner = banner, local = locals(), exitmsg = '') - else: -+ # https://stackoverflow.com/a/11754346 -+ d = dict (locals(), **globals()) - for c in args.command: - if c != '-': -- exec (c) -+ exec (c, d, d) - else: -- exec (sys.stdin.read ()) -+ exec (sys.stdin.read (), d, d) --- -2.23.0 - diff --git a/libnbd.spec b/libnbd.spec index d5664b3..8f9e779 100644 --- a/libnbd.spec +++ b/libnbd.spec @@ -8,8 +8,8 @@ %global source_directory 1.0-stable Name: libnbd -Version: 1.0.1 -Release: 2%{?dist} +Version: 1.0.2 +Release: 1%{?dist} Summary: NBD client library in userspace License: LGPLv2+ @@ -22,8 +22,8 @@ Source1: http://libguestfs.org/download/libnbd/%{source_directory}/%{name # https://pgp.key-server.io/pks/lookup?search=rjones%40redhat.com&fingerprint=on&op=vindex Source2: libguestfs.keyring -# Upstream patch to fix nbdsh. -Patch0001: 0001-nbdsh-Fix-behaviour-of-globals.patch +# These patches are upstream in the master branch but not in the +# stable-1.0 branch. They make the tests more stable. Patch0002: 0002-nbd_connect_tcp-Try-to-return-errno-from-underlying-.patch Patch0003: 0003-interop-Retry-TCP-connections-to-qemu-nbd.patch @@ -224,7 +224,13 @@ make %{?_smp_mflags} check || { %changelog -* Thu Sep 12 2019 Richard W.M. Jones - 1.1.1-2 +* Tue Sep 17 2019 Richard W.M. Jones - 1.0.2-1 +- New upstream version 1.0.2. +- Remove patches which are upstream. +- Contains fix for NBD Protocol Downgrade Attack (CVE-2019-14842). +- Fix previous commit message. + +* Thu Sep 12 2019 Richard W.M. Jones - 1.0.1-2 - Add upstream patch to fix nbdsh (for nbdkit tests). - Fix interop tests on slow machines. diff --git a/sources b/sources index 311c0bc..662596e 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libnbd-1.0.1.tar.gz) = 76437cdd05ed0755ff4db055947565197a8e2626d139ee01153f4b370396cffce5233fb1ccc79072e074ba0a0f70768903fd29462dfe2655d34ae191271f7951 -SHA512 (libnbd-1.0.1.tar.gz.sig) = 424c865ace483b3d466882d5fbe069973be361786c6d5bafdc295fa98f39558c8d18abbd3f2a18380ba53482c5308d6da691f5bdceaaedc2cbfa89602342660d +SHA512 (libnbd-1.0.2.tar.gz) = 18a6a10ca28e1f5eb1b9e4e6d1ee8cff3fd62e76f374ef326937a97f614008c41f69ec9177240086b28313e1654ce5ebe4469c40464b76a5da298be92ac5fd7d +SHA512 (libnbd-1.0.2.tar.gz.sig) = a4a52160fa88f5b927d61c2ac538e2ed2ce12028d11314e67d56ec73b31376c277184e8920c996372c45f8fec5b69f946379159666ce1e3ae4cacaf9f3bf2e6a From ab35bd208f74913f563b22b49c2093181b2e5d6d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 9 Oct 2019 09:36:57 +0100 Subject: [PATCH 05/26] New upstream version 1.0.3. - Contains fix for remote code execution vulnerability. - Add new libnbd-security(3) man page. --- libnbd.spec | 8 +++++++- sources | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/libnbd.spec b/libnbd.spec index 8f9e779..e4e04f1 100644 --- a/libnbd.spec +++ b/libnbd.spec @@ -8,7 +8,7 @@ %global source_directory 1.0-stable Name: libnbd -Version: 1.0.2 +Version: 1.0.3 Release: 1%{?dist} Summary: NBD client library in userspace @@ -191,6 +191,7 @@ make %{?_smp_mflags} check || { %{_libdir}/libnbd.so %{_libdir}/pkgconfig/libnbd.pc %{_mandir}/man3/libnbd.3* +%{_mandir}/man3/libnbd-security.3* %{_mandir}/man3/nbd_*.3* @@ -224,6 +225,11 @@ make %{?_smp_mflags} check || { %changelog +* Wed Oct 9 2019 Richard W.M. Jones - 1.0.3-1 +- New upstream version 1.0.3. +- Contains fix for remote code execution vulnerability. +- Add new libnbd-security(3) man page. + * Tue Sep 17 2019 Richard W.M. Jones - 1.0.2-1 - New upstream version 1.0.2. - Remove patches which are upstream. diff --git a/sources b/sources index 662596e..a4390bd 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libnbd-1.0.2.tar.gz) = 18a6a10ca28e1f5eb1b9e4e6d1ee8cff3fd62e76f374ef326937a97f614008c41f69ec9177240086b28313e1654ce5ebe4469c40464b76a5da298be92ac5fd7d -SHA512 (libnbd-1.0.2.tar.gz.sig) = a4a52160fa88f5b927d61c2ac538e2ed2ce12028d11314e67d56ec73b31376c277184e8920c996372c45f8fec5b69f946379159666ce1e3ae4cacaf9f3bf2e6a +SHA512 (libnbd-1.0.3.tar.gz) = 47980c6b323046e983ee3c717b832e7cf29ba89e7c2f001a27ecb17ed55a2259ece78d71d661ddec3af45d316a198d80f253d13a265f60ae5a28c30ef84477a1 +SHA512 (libnbd-1.0.3.tar.gz.sig) = 07637d69abea513dfb03982776292a5e8cf5bc2962a3dd6ed36f9ed32e58d52795fa4eb3ba7ca7eee916a7271dba37bb3c2ee57f04a585070e0ba986da3f5cfc From 8854d3318a22b071a045c06c43ced14832cc7161 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 14 Nov 2019 10:57:58 +0000 Subject: [PATCH 06/26] Remove patches. --- ...Try-to-return-errno-from-underlying-.patch | 83 ------------------- ...op-Retry-TCP-connections-to-qemu-nbd.patch | 71 ---------------- libnbd.spec | 5 -- 3 files changed, 159 deletions(-) delete mode 100644 0002-nbd_connect_tcp-Try-to-return-errno-from-underlying-.patch delete mode 100644 0003-interop-Retry-TCP-connections-to-qemu-nbd.patch diff --git a/0002-nbd_connect_tcp-Try-to-return-errno-from-underlying-.patch b/0002-nbd_connect_tcp-Try-to-return-errno-from-underlying-.patch deleted file mode 100644 index f96314c..0000000 --- a/0002-nbd_connect_tcp-Try-to-return-errno-from-underlying-.patch +++ /dev/null @@ -1,83 +0,0 @@ -From d2d3940a65dab60a2caeaf824eaff12fcc85e1f0 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Thu, 12 Sep 2019 10:28:19 +0100 -Subject: [PATCH 2/3] nbd_connect_tcp: Try to return errno from underlying - connect(2) call. - -When we make a TCP connection we have to make multiple underlying -connect(2) calls, once for each address returned by getaddrinfo. -Unfortunately this meant that we lost the errno from any of these -calls: - -$ nbdsh -c 'h.connect_tcp ("localhost", "nbd")' -nbd.Error: nbd_connect_tcp: connect: localhost:nbd: could not connect to remote host - -This commit saves the errno from the first failed connect(2): - -$ ./run nbdsh -c 'h.connect_tcp ("localhost", "nbd")' -nbd.Error: nbd_connect_tcp: connect: localhost:nbd: could not connect to remote host: Connection refused (ECONNREFUSED) ---- - generator/states-connect.c | 12 ++++++++++-- - lib/internal.h | 1 + - 2 files changed, 11 insertions(+), 2 deletions(-) - -diff --git a/generator/states-connect.c b/generator/states-connect.c -index 9e2e1d4..e9b3582 100644 ---- a/generator/states-connect.c -+++ b/generator/states-connect.c -@@ -128,6 +128,8 @@ disable_nagle (int sock) - h->result = NULL; - } - -+ h->connect_errno = 0; -+ - memset (&h->hints, 0, sizeof h->hints); - h->hints.ai_family = AF_UNSPEC; - h->hints.ai_socktype = SOCK_STREAM; -@@ -160,7 +162,8 @@ disable_nagle (int sock) - * Save errno from most recent connect(2) call. XXX - */ - SET_NEXT_STATE (%^START); -- set_error (0, "connect: %s:%s: could not connect to remote host", -+ set_error (h->connect_errno, -+ "connect: %s:%s: could not connect to remote host", - h->hostname, h->port); - return -1; - } -@@ -182,6 +185,8 @@ disable_nagle (int sock) - - if (connect (fd, h->rp->ai_addr, h->rp->ai_addrlen) == -1) { - if (errno != EINPROGRESS) { -+ if (h->connect_errno == 0) -+ h->connect_errno = errno; - SET_NEXT_STATE (%NEXT_ADDRESS); - return 0; - } -@@ -203,8 +208,11 @@ disable_nagle (int sock) - /* This checks the status of the original connect call. */ - if (status == 0) - SET_NEXT_STATE (%^MAGIC.START); -- else -+ else { -+ if (h->connect_errno == 0) -+ h->connect_errno = status; - SET_NEXT_STATE (%NEXT_ADDRESS); -+ } - return 0; - - CONNECT_TCP.NEXT_ADDRESS: -diff --git a/lib/internal.h b/lib/internal.h -index a48edff..ccaca32 100644 ---- a/lib/internal.h -+++ b/lib/internal.h -@@ -188,6 +188,7 @@ struct nbd_handle { - char *hostname, *port; - struct addrinfo hints; - struct addrinfo *result, *rp; -+ int connect_errno; - - /* When sending metadata contexts, this is used. */ - size_t querynum; --- -2.23.0 - diff --git a/0003-interop-Retry-TCP-connections-to-qemu-nbd.patch b/0003-interop-Retry-TCP-connections-to-qemu-nbd.patch deleted file mode 100644 index d141920..0000000 --- a/0003-interop-Retry-TCP-connections-to-qemu-nbd.patch +++ /dev/null @@ -1,71 +0,0 @@ -From b23b5b32250e5a03e4cc38ccf973e25e63ccc6d9 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Thu, 12 Sep 2019 10:38:48 +0100 -Subject: [PATCH 3/3] interop: Retry TCP connections to qemu-nbd. - -The test interop-qemu-nbd-tls-certs frequently fails on slow (32 bit) -machines in Fedora Koji. (Is crypto slow on these already overloaded -machines?) - -As we cannot wait for a signal when qemu-nbd is ready start serving, -we have to use a sleep. The current sleep is 5 seconds, which is not -long enough. Making the sleep longer would work but is inconsiderate -for people using faster machines. Therefore replace this with a retry -loop with exponential backoff. - -I tested this with a simple wrapper around qemu-nbd which did: - - sleep 5; exec /usr/bin/qemu-nbd "$@" ---- - interop/interop.c | 19 +++++++++++++------ - 1 file changed, 13 insertions(+), 6 deletions(-) - -diff --git a/interop/interop.c b/interop/interop.c -index 662d871..a3ab39b 100644 ---- a/interop/interop.c -+++ b/interop/interop.c -@@ -28,6 +28,7 @@ - #include - #include - #include -+#include - #include - - #include -@@ -44,6 +45,7 @@ main (int argc, char *argv[]) - int port; - char port_str[16]; - pid_t pid = -1; -+ int retry; - #endif - int64_t actual_size; - char buf[512]; -@@ -114,14 +116,19 @@ main (int argc, char *argv[]) - } - - /* Unfortunately there's no good way to wait for qemu-nbd to start -- * serving, so ... -+ * serving, so we need to retry here. - */ -- sleep (5); -- -- if (nbd_connect_tcp (nbd, "localhost", port_str) == -1) { -- fprintf (stderr, "%s\n", nbd_get_error ()); -- goto out; -+ for (retry = 0; retry < 5; ++retry) { -+ sleep (1 << retry); -+ if (nbd_connect_tcp (nbd, "localhost", port_str) == -1) { -+ fprintf (stderr, "%s\n", nbd_get_error ()); -+ if (nbd_get_errno () != ECONNREFUSED) -+ goto out; -+ } -+ else break; - } -+ if (retry == 5) -+ goto out; - - #else /* !SERVE_OVER_TCP */ - --- -2.23.0 - diff --git a/libnbd.spec b/libnbd.spec index 433cc0c..9be9b99 100644 --- a/libnbd.spec +++ b/libnbd.spec @@ -22,11 +22,6 @@ Source1: http://libguestfs.org/download/libnbd/%{source_directory}/%{name # https://pgp.key-server.io/pks/lookup?search=rjones%40redhat.com&fingerprint=on&op=vindex Source2: libguestfs.keyring -# These patches are upstream in the master branch but not in the -# stable-1.0 branch. They make the tests more stable. -Patch0002: 0002-nbd_connect_tcp-Try-to-return-errno-from-underlying-.patch -Patch0003: 0003-interop-Retry-TCP-connections-to-qemu-nbd.patch - %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool %endif From 6c6a50d0d4469a9f618dcef500187b2462d1e87a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 3 Dec 2019 13:21:07 +0000 Subject: [PATCH 07/26] New stable release 1.2.1. Use gpgverify macro instead of explicit gpgv2 command. --- libnbd.spec | 11 +++++++---- sources | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/libnbd.spec b/libnbd.spec index 9be9b99..b1202e5 100644 --- a/libnbd.spec +++ b/libnbd.spec @@ -8,7 +8,7 @@ %global source_directory 1.2-stable Name: libnbd -Version: 1.2.0 +Version: 1.2.1 Release: 1%{?dist} Summary: NBD client library in userspace @@ -140,8 +140,7 @@ This package contains FUSE support for %{name}. %prep %if 0%{verify_tarball_signature} -tmphome="$(mktemp -d)" -gpgv2 --homedir "$tmphome" --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0} +%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' %endif %autosetup -p1 %if 0%{patches_touch_autotools} @@ -249,8 +248,12 @@ make %{?_smp_mflags} check || { %changelog +* Thu Nov 14 2019 Richard W.M. Jones - 1.2.1-1 +- New stable release 1.2.1. +- Use gpgverify macro instead of explicit gpgv2 command. + * Thu Nov 14 2019 Richard W.M. Jones - 1.2.0-1 -- New stable release 1.2.0 +- New stable release 1.2.0. * Wed Oct 9 2019 Richard W.M. Jones - 1.0.3-1 - New upstream version 1.0.3. diff --git a/sources b/sources index cab104f..dc7ffcd 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libnbd-1.2.0.tar.gz) = a823bd0d4b79eeeb28e64fc6a4132da8af1fd807ad04d48fddab8ee6af944d7e96cc2e4947ab959d7ccceb6aeda0f2ebe31adfbf51f1b8e757d8034734e96543 -SHA512 (libnbd-1.2.0.tar.gz.sig) = 285a2154c91b5316b5776121580291ba7ecea48f3c168929706bc353c8fdb1f9a08b71e1f3464ebd6c9c3265e29525e2f022b353999ca58fa41e9a6e6d6efdcd +SHA512 (libnbd-1.2.1.tar.gz) = 75abc062bdfa478d3a454f1644bdf97f4a37408259268305a709241e5c2267f07a4259c88f974527ba81e90bea1579a7b4e1981d7ec0cef5f1e48abc7d211178 +SHA512 (libnbd-1.2.1.tar.gz.sig) = 9f4d9a9e6001d712a55eafb1a5ea30cef3c603e96cbb0a78df85f3b82bee407bb36e58f39ea65096b327c8b5387781abb8e4277d042feb15f1097343ddd0733e From b802ca118afa0b6c16ab44b1dfcf26c378225dee Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 5 Feb 2020 14:01:02 +0000 Subject: [PATCH 08/26] New stable release 1.2.2. --- libnbd.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libnbd.spec b/libnbd.spec index b1202e5..a1222c5 100644 --- a/libnbd.spec +++ b/libnbd.spec @@ -8,7 +8,7 @@ %global source_directory 1.2-stable Name: libnbd -Version: 1.2.1 +Version: 1.2.2 Release: 1%{?dist} Summary: NBD client library in userspace @@ -248,6 +248,9 @@ make %{?_smp_mflags} check || { %changelog +* Wed Feb 05 2020 Richard W.M. Jones - 1.2.2-1 +- New stable release 1.2.2. + * Thu Nov 14 2019 Richard W.M. Jones - 1.2.1-1 - New stable release 1.2.1. - Use gpgverify macro instead of explicit gpgv2 command. diff --git a/sources b/sources index dc7ffcd..cba6d2d 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libnbd-1.2.1.tar.gz) = 75abc062bdfa478d3a454f1644bdf97f4a37408259268305a709241e5c2267f07a4259c88f974527ba81e90bea1579a7b4e1981d7ec0cef5f1e48abc7d211178 -SHA512 (libnbd-1.2.1.tar.gz.sig) = 9f4d9a9e6001d712a55eafb1a5ea30cef3c603e96cbb0a78df85f3b82bee407bb36e58f39ea65096b327c8b5387781abb8e4277d042feb15f1097343ddd0733e +SHA512 (libnbd-1.2.2.tar.gz) = ca8dd7f599dfe0d9a5352f11f14674eb2a40e8396f390533ce750a079633f5266be2bd2e4044dc2d75d59194a7f222a75f14e07130767ae744a1212e88a44a3c +SHA512 (libnbd-1.2.2.tar.gz.sig) = 386b1ea7a93e9274179314f682fbd83bf83fcbc11eb6c79491107d3573d43e94ff2631c3f664caa3164dfb2831d084b5ce4f1199cdfa01bd61846b326b5d4734 From e60619c01d6b16a092400541ff94331d839c6761 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 27 Feb 2020 15:02:42 +0000 Subject: [PATCH 09/26] OCaml 4.10.0 final (Fedora 32). --- libnbd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libnbd.spec b/libnbd.spec index 4c69e6a..dcd0459 100644 --- a/libnbd.spec +++ b/libnbd.spec @@ -9,7 +9,7 @@ Name: libnbd Version: 1.3.3 -Release: 2%{?dist} +Release: 2%{?dist}.1 Summary: NBD client library in userspace License: LGPLv2+ @@ -248,6 +248,9 @@ make %{?_smp_mflags} check || { %changelog +* Thu Feb 27 2020 Richard W.M. Jones - 1.3.3-2.1 +- OCaml 4.10.0 final (Fedora 32). + * Wed Feb 26 2020 Richard W.M. Jones - 1.3.3-2 - OCaml 4.10.0 final. From 536e109445642c0e55fa6ea5dae372d749ff44b8 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 27 Feb 2020 16:52:42 +0000 Subject: [PATCH 10/26] Bump release and rebuild. --- libnbd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libnbd.spec b/libnbd.spec index dcd0459..be74bc7 100644 --- a/libnbd.spec +++ b/libnbd.spec @@ -9,7 +9,7 @@ Name: libnbd Version: 1.3.3 -Release: 2%{?dist}.1 +Release: 2%{?dist}.2 Summary: NBD client library in userspace License: LGPLv2+ @@ -248,6 +248,9 @@ make %{?_smp_mflags} check || { %changelog +* Thu Feb 27 2020 Richard W.M. Jones - 1.3.3-2.2 +- Bump release and rebuild. + * Thu Feb 27 2020 Richard W.M. Jones - 1.3.3-2.1 - OCaml 4.10.0 final (Fedora 32). From c9a1c8c30de9c0859939e0aee1b408a3f5ca1b93 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 29 Feb 2020 15:26:38 +0000 Subject: [PATCH 11/26] New upstream development version 1.3.4. (cherry picked from commit e71e650b32f9cf4df28e24bab44527dc89b6842f) --- libnbd.spec | 7 +++++-- sources | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libnbd.spec b/libnbd.spec index be74bc7..28cb9ad 100644 --- a/libnbd.spec +++ b/libnbd.spec @@ -8,8 +8,8 @@ %global source_directory 1.3-development Name: libnbd -Version: 1.3.3 -Release: 2%{?dist}.2 +Version: 1.3.4 +Release: 1%{?dist} Summary: NBD client library in userspace License: LGPLv2+ @@ -248,6 +248,9 @@ make %{?_smp_mflags} check || { %changelog +* Sat Feb 29 2020 Richard W.M. Jones - 1.3.4-1 +- New upstream development version 1.3.4. + * Thu Feb 27 2020 Richard W.M. Jones - 1.3.3-2.2 - Bump release and rebuild. diff --git a/sources b/sources index 5a385ff..547085c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libnbd-1.3.3.tar.gz) = d6edf70fa754c604f3cd60bfbaf90a5dba1f7ce23eac87c538ed4dc06f126606c4e43d53d096139e30778a72cfe31f5fa5c867e395bc7ff698272e1d46a84e87 -SHA512 (libnbd-1.3.3.tar.gz.sig) = 41b30f77902bd98c2a6d6b0fcb07d5c8a0163423315d809979648a5f931d05886f0e6b8cf5125292c1460833f8388d3c60d1e1a653c6bdd55d0bf7daf8acec6c +SHA512 (libnbd-1.3.4.tar.gz) = 017096c0de34815a519fcd2026ee85c35fda75283c5638a33d48ff96ee8976baa531e32421ed01e5d250e5011f15faef09c7a52c36ec9b42fe1dfe78ef1ace0a +SHA512 (libnbd-1.3.4.tar.gz.sig) = f4022fd644287b2e6df9d5d2a9bbc50c0b8ac905a12ac825594d440ed4292ff0964e343002f042e02822649850335ae931b7515e71dce38c15199a51389c2535 From d9c8a67de77a36b8a8140c99afcb1c9ca46d1e65 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 10 Mar 2020 21:57:39 +0000 Subject: [PATCH 12/26] New upstream development version 1.3.5. Add new bash-completion subpackage. (cherry picked from commit 84455b03d57a6e84a5f26ce8442b1884b38ce513) --- libnbd.spec | 27 ++++++++++++++++++++++++++- sources | 4 ++-- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/libnbd.spec b/libnbd.spec index 28cb9ad..86b007b 100644 --- a/libnbd.spec +++ b/libnbd.spec @@ -8,7 +8,7 @@ %global source_directory 1.3-development Name: libnbd -Version: 1.3.4 +Version: 1.3.5 Release: 1%{?dist} Summary: NBD client library in userspace @@ -49,6 +49,9 @@ BuildRequires: ocaml-findlib-devel # Only for building the examples. BuildRequires: glib2-devel +# For bash-completion. +BuildRequires: bash-completion + # Only for running the test suite. BuildRequires: gnutls-utils %if 0%{?fedora} >= 31 @@ -138,6 +141,18 @@ Requires: %{name}%{?_isa} = %{version}-%{release} This package contains FUSE support for %{name}. +%package bash-completion +Summary: Bash tab-completion for %{name} +BuildArch: noarch +Requires: bash-completion >= 2.0 +Requires: %{name}-server = %{version}-%{release} + + +%description bash-completion +Install this package if you want intelligent bash tab-completion +for %{name}. + + %prep %if 0%{verify_tarball_signature} %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' @@ -247,7 +262,17 @@ make %{?_smp_mflags} check || { %{_mandir}/man1/nbdfuse.1* +%files bash-completion +%dir %{_datadir}/bash-completion/completions +%{_datadir}/bash-completion/completions/nbdfuse +%{_datadir}/bash-completion/completions/nbdsh + + %changelog +* Tue Mar 10 2020 Richard W.M. Jones - 1.3.5-1 +- New upstream development version 1.3.5. +- Add new bash-completion subpackage. + * Sat Feb 29 2020 Richard W.M. Jones - 1.3.4-1 - New upstream development version 1.3.4. diff --git a/sources b/sources index 547085c..0b9bc05 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libnbd-1.3.4.tar.gz) = 017096c0de34815a519fcd2026ee85c35fda75283c5638a33d48ff96ee8976baa531e32421ed01e5d250e5011f15faef09c7a52c36ec9b42fe1dfe78ef1ace0a -SHA512 (libnbd-1.3.4.tar.gz.sig) = f4022fd644287b2e6df9d5d2a9bbc50c0b8ac905a12ac825594d440ed4292ff0964e343002f042e02822649850335ae931b7515e71dce38c15199a51389c2535 +SHA512 (libnbd-1.3.5.tar.gz) = bd21e7673504a154beb44aab0d2e8b6bd325d5cb1a0f5575c5ee3e100f4539c0b32befab38514a0dfb304dc0245d885a145e8a89a9b3beffd362fee2a0bc77f2 +SHA512 (libnbd-1.3.5.tar.gz.sig) = 6718150401ea748c1575153a1c7e976cb726e5a8071f7b4553af81d42ef18ce37229005cde1c2ec04726a7b422b0cad6dc55b9fc87c85bc5284de2af7a3c9831 From f62121bd8a1ad27ba9d145f51bccb847bb30286b Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 11 Mar 2020 10:18:06 +0000 Subject: [PATCH 13/26] Fix bogus runtime Requires of new bash-completion package. (cherry picked from commit 6f99e818808fcca50132686fba8f2b1bf916420b) --- libnbd.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libnbd.spec b/libnbd.spec index 86b007b..b72edda 100644 --- a/libnbd.spec +++ b/libnbd.spec @@ -9,7 +9,7 @@ Name: libnbd Version: 1.3.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: NBD client library in userspace License: LGPLv2+ @@ -145,7 +145,7 @@ This package contains FUSE support for %{name}. Summary: Bash tab-completion for %{name} BuildArch: noarch Requires: bash-completion >= 2.0 -Requires: %{name}-server = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} %description bash-completion @@ -269,6 +269,9 @@ make %{?_smp_mflags} check || { %changelog +* Wed Mar 11 2020 Richard W.M. Jones - 1.3.5-2 +- Fix bogus runtime Requires of new bash-completion package. + * Tue Mar 10 2020 Richard W.M. Jones - 1.3.5-1 - New upstream development version 1.3.5. - Add new bash-completion subpackage. From 184c483dd94e702f35e9d43e00c107026950290a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 11 Mar 2020 10:28:11 +0000 Subject: [PATCH 14/26] Remove %{?_isa} from noarch package. (cherry picked from commit 452725e80a01b1e140aea31eae10cee5e52a77a9) --- libnbd.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libnbd.spec b/libnbd.spec index b72edda..4a7f9ba 100644 --- a/libnbd.spec +++ b/libnbd.spec @@ -145,7 +145,9 @@ This package contains FUSE support for %{name}. Summary: Bash tab-completion for %{name} BuildArch: noarch Requires: bash-completion >= 2.0 -Requires: %{name}%{?_isa} = %{version}-%{release} +# Don't use _isa here because it's a noarch package. This dependency +# is just to ensure that the subpackage is updated along with libnbd. +Requires: %{name} = %{version}-%{release} %description bash-completion From d4daf92cff7707f36ab4cfa469211b892dbe7ddd Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 31 Mar 2020 18:55:52 +0100 Subject: [PATCH 15/26] New upstream development version 1.3.6. Golang bindings are contained in this release but not distributed. (cherry picked from commit d80bb85d984fc5cd77feda794443b8576137422e) --- libnbd.spec | 14 +++++++++++--- sources | 4 ++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/libnbd.spec b/libnbd.spec index 4a7f9ba..a91829f 100644 --- a/libnbd.spec +++ b/libnbd.spec @@ -8,8 +8,8 @@ %global source_directory 1.3-development Name: libnbd -Version: 1.3.5 -Release: 2%{?dist} +Version: 1.3.6 +Release: 1%{?dist} Summary: NBD client library in userspace License: LGPLv2+ @@ -172,7 +172,8 @@ autoreconf -i PYTHON=%{__python3} \ --enable-python \ --enable-ocaml \ - --enable-fuse + --enable-fuse \ + --disable-golang make %{?_smp_mflags} @@ -183,6 +184,9 @@ make %{?_smp_mflags} # Delete libtool crap. find $RPM_BUILD_ROOT -name '*.la' -delete +# Delete the golang man page since we're not distributing the bindings. +rm $RPM_BUILD_ROOT%{_mandir}/man3/libnbd-golang.3* + %check # interop/structured-read.sh fails with the old qemu-nbd in Fedora 29, @@ -271,6 +275,10 @@ make %{?_smp_mflags} check || { %changelog +* Tue Mar 31 2020 Richard W.M. Jones - 1.3.6-1 +- New upstream development version 1.3.6. +- Golang bindings are contained in this release but not distributed. + * Wed Mar 11 2020 Richard W.M. Jones - 1.3.5-2 - Fix bogus runtime Requires of new bash-completion package. diff --git a/sources b/sources index 0b9bc05..4c27f4f 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libnbd-1.3.5.tar.gz) = bd21e7673504a154beb44aab0d2e8b6bd325d5cb1a0f5575c5ee3e100f4539c0b32befab38514a0dfb304dc0245d885a145e8a89a9b3beffd362fee2a0bc77f2 -SHA512 (libnbd-1.3.5.tar.gz.sig) = 6718150401ea748c1575153a1c7e976cb726e5a8071f7b4553af81d42ef18ce37229005cde1c2ec04726a7b422b0cad6dc55b9fc87c85bc5284de2af7a3c9831 +SHA512 (libnbd-1.3.6.tar.gz) = 2c39b820c95cdc61aceea188d1804f4551a776487543a487bd17357b039036ca15805daf8953e9701d003b2166de305167d7fa578fd3b0fa5e6764caebe9a516 +SHA512 (libnbd-1.3.6.tar.gz.sig) = 6d8eaab14e5853c6c2ffdfbef86ca1362246bc156ac035a12777c59afc827483a65957a0c4fa82b6bc5cc2653fb2a01fe6e21497db46800d935a181cb257044b From 13e7dba005e3e88c5ac8d60fc13871377ac6408e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 17 Apr 2020 22:29:33 +0100 Subject: [PATCH 16/26] OCaml 4.11.0 pre-release Add upstream patch to fix one of the tests that fails on slow machines. (cherry picked from commit 78c8600f66ac03e3b619c3f6c137307211bc2e1e) --- 0001-ocaml-Fix-bug-in-asynch-copy-test.patch | 52 ++++++++++++++++++++ libnbd.spec | 8 ++- 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 0001-ocaml-Fix-bug-in-asynch-copy-test.patch diff --git a/0001-ocaml-Fix-bug-in-asynch-copy-test.patch b/0001-ocaml-Fix-bug-in-asynch-copy-test.patch new file mode 100644 index 0000000..d59a39b --- /dev/null +++ b/0001-ocaml-Fix-bug-in-asynch-copy-test.patch @@ -0,0 +1,52 @@ +From 0475bfe04a527051c0a37af59a733c4c8554e427 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Fri, 17 Apr 2020 22:23:56 +0100 +Subject: [PATCH] ocaml: Fix bug in asynch copy test. + +This program had a subtle bug: If we've read everything from the +source, but there are still source commands in flight, AND it happens +that there are no destination commands in flight, then the loop +finishes prematurely. This is particularly evident when you run the +test on a slow machine (armv7 in Koji is illustrative). The fix is to +check that there are no commands in flight either from the source or +to the destination. + +(I actually discovered this when writing the golang bindings which +copied from the OCaml version, but forgot to make the correction to +the original.) +--- + ocaml/examples/asynch_copy.ml | 3 ++- + ocaml/tests/test_590_aio_copy.ml | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/ocaml/examples/asynch_copy.ml b/ocaml/examples/asynch_copy.ml +index d5dcc60..7132f57 100644 +--- a/ocaml/examples/asynch_copy.ml ++++ b/ocaml/examples/asynch_copy.ml +@@ -41,7 +41,8 @@ let asynch_copy src dst = + (* The main loop which runs until we have finished reading and + * there are no more commands in flight. + *) +- while !soff < size || NBD.aio_in_flight dst > 0 do ++ while !soff < size || NBD.aio_in_flight src > 0 || NBD.aio_in_flight dst > 0 ++ do + (* If we're able to submit more reads from the source then do so now. *) + if !soff < size && NBD.aio_in_flight src < max_reads_in_flight then ( + let bs = min bs (size -^ !soff) in +diff --git a/ocaml/tests/test_590_aio_copy.ml b/ocaml/tests/test_590_aio_copy.ml +index ac490ef..e3cd59d 100644 +--- a/ocaml/tests/test_590_aio_copy.ml ++++ b/ocaml/tests/test_590_aio_copy.ml +@@ -64,7 +64,8 @@ let asynch_copy src dst = + (* The main loop which runs until we have finished reading and + * there are no more commands in flight. + *) +- while !soff < size || NBD.aio_in_flight dst > 0 do ++ while !soff < size || NBD.aio_in_flight src > 0 || NBD.aio_in_flight dst > 0 ++ do + (* If we're able to submit more reads from the source then do so now. *) + if !soff < size && NBD.aio_in_flight src < max_reads_in_flight then ( + let bs = min bs (size -^ !soff) in +-- +2.25.0 + diff --git a/libnbd.spec b/libnbd.spec index a91829f..6a503f3 100644 --- a/libnbd.spec +++ b/libnbd.spec @@ -9,7 +9,7 @@ Name: libnbd Version: 1.3.6 -Release: 1%{?dist} +Release: 4%{?dist} Summary: NBD client library in userspace License: LGPLv2+ @@ -22,6 +22,9 @@ Source1: http://libguestfs.org/download/libnbd/%{source_directory}/%{name # https://pgp.key-server.io/pks/lookup?search=rjones%40redhat.com&fingerprint=on&op=vindex Source2: libguestfs.keyring +# Upstream patch to fix one of the tests that fails on slow machines. +Patch1: 0001-ocaml-Fix-bug-in-asynch-copy-test.patch + %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool %endif @@ -275,6 +278,9 @@ make %{?_smp_mflags} check || { %changelog +* Fri Apr 17 2020 Richard W.M. Jones - 1.3.6-4 +- Add upstream patch to fix one of the tests that fails on slow machines. + * Tue Mar 31 2020 Richard W.M. Jones - 1.3.6-1 - New upstream development version 1.3.6. - Golang bindings are contained in this release but not distributed. From f4bc154bafd8a313ec3375ef10e6d3882e2b8f93 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 23 Apr 2020 22:19:02 +0100 Subject: [PATCH 17/26] New stable release 1.2.3. --- libnbd.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libnbd.spec b/libnbd.spec index a1222c5..f6b211a 100644 --- a/libnbd.spec +++ b/libnbd.spec @@ -8,7 +8,7 @@ %global source_directory 1.2-stable Name: libnbd -Version: 1.2.2 +Version: 1.2.3 Release: 1%{?dist} Summary: NBD client library in userspace @@ -248,6 +248,9 @@ make %{?_smp_mflags} check || { %changelog +* Thu Apr 23 2020 Richard W.M. Jones - 1.2.3-1 +- New stable release 1.2.3. + * Wed Feb 05 2020 Richard W.M. Jones - 1.2.2-1 - New stable release 1.2.2. diff --git a/sources b/sources index cba6d2d..230bf10 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libnbd-1.2.2.tar.gz) = ca8dd7f599dfe0d9a5352f11f14674eb2a40e8396f390533ce750a079633f5266be2bd2e4044dc2d75d59194a7f222a75f14e07130767ae744a1212e88a44a3c -SHA512 (libnbd-1.2.2.tar.gz.sig) = 386b1ea7a93e9274179314f682fbd83bf83fcbc11eb6c79491107d3573d43e94ff2631c3f664caa3164dfb2831d084b5ce4f1199cdfa01bd61846b326b5d4734 +SHA512 (libnbd-1.2.3.tar.gz) = d75b35b214793fe8ef6bcf13fdb44b51ae792539ded2fd6b4777e87e7088a8ca7d014d9ba6e0cf85290e2c5139c657a581b1d5a84623a239aafc0cb8feb430d6 +SHA512 (libnbd-1.2.3.tar.gz.sig) = 993bd9d7e6fcf15656584637f8d1db92300dd1fa4aa0f6fbf4df6a3fb46dee486b2342461aaf557d0407d000a58fd2c3b905796fe42c8c22f9283426887abdca From 3f53b393082a00c9daa21e7d8aff0c4e8cd69685 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 23 Apr 2020 22:38:34 +0100 Subject: [PATCH 18/26] Fix previous incorrectly merged commit. Remove the patch. --- 0001-ocaml-Fix-bug-in-asynch-copy-test.patch | 52 -------------------- libnbd.spec | 3 -- 2 files changed, 55 deletions(-) delete mode 100644 0001-ocaml-Fix-bug-in-asynch-copy-test.patch diff --git a/0001-ocaml-Fix-bug-in-asynch-copy-test.patch b/0001-ocaml-Fix-bug-in-asynch-copy-test.patch deleted file mode 100644 index d59a39b..0000000 --- a/0001-ocaml-Fix-bug-in-asynch-copy-test.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 0475bfe04a527051c0a37af59a733c4c8554e427 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Fri, 17 Apr 2020 22:23:56 +0100 -Subject: [PATCH] ocaml: Fix bug in asynch copy test. - -This program had a subtle bug: If we've read everything from the -source, but there are still source commands in flight, AND it happens -that there are no destination commands in flight, then the loop -finishes prematurely. This is particularly evident when you run the -test on a slow machine (armv7 in Koji is illustrative). The fix is to -check that there are no commands in flight either from the source or -to the destination. - -(I actually discovered this when writing the golang bindings which -copied from the OCaml version, but forgot to make the correction to -the original.) ---- - ocaml/examples/asynch_copy.ml | 3 ++- - ocaml/tests/test_590_aio_copy.ml | 3 ++- - 2 files changed, 4 insertions(+), 2 deletions(-) - -diff --git a/ocaml/examples/asynch_copy.ml b/ocaml/examples/asynch_copy.ml -index d5dcc60..7132f57 100644 ---- a/ocaml/examples/asynch_copy.ml -+++ b/ocaml/examples/asynch_copy.ml -@@ -41,7 +41,8 @@ let asynch_copy src dst = - (* The main loop which runs until we have finished reading and - * there are no more commands in flight. - *) -- while !soff < size || NBD.aio_in_flight dst > 0 do -+ while !soff < size || NBD.aio_in_flight src > 0 || NBD.aio_in_flight dst > 0 -+ do - (* If we're able to submit more reads from the source then do so now. *) - if !soff < size && NBD.aio_in_flight src < max_reads_in_flight then ( - let bs = min bs (size -^ !soff) in -diff --git a/ocaml/tests/test_590_aio_copy.ml b/ocaml/tests/test_590_aio_copy.ml -index ac490ef..e3cd59d 100644 ---- a/ocaml/tests/test_590_aio_copy.ml -+++ b/ocaml/tests/test_590_aio_copy.ml -@@ -64,7 +64,8 @@ let asynch_copy src dst = - (* The main loop which runs until we have finished reading and - * there are no more commands in flight. - *) -- while !soff < size || NBD.aio_in_flight dst > 0 do -+ while !soff < size || NBD.aio_in_flight src > 0 || NBD.aio_in_flight dst > 0 -+ do - (* If we're able to submit more reads from the source then do so now. *) - if !soff < size && NBD.aio_in_flight src < max_reads_in_flight then ( - let bs = min bs (size -^ !soff) in --- -2.25.0 - diff --git a/libnbd.spec b/libnbd.spec index e04f259..7fb187e 100644 --- a/libnbd.spec +++ b/libnbd.spec @@ -22,9 +22,6 @@ Source1: http://libguestfs.org/download/libnbd/%{source_directory}/%{name # https://pgp.key-server.io/pks/lookup?search=rjones%40redhat.com&fingerprint=on&op=vindex Source2: libguestfs.keyring -# Upstream patch to fix one of the tests that fails on slow machines. -Patch1: 0001-ocaml-Fix-bug-in-asynch-copy-test.patch - %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool %endif From 70cf68113590d8f54c51827470520e1a1bd616fc Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 17 Jul 2020 11:22:33 +0100 Subject: [PATCH 19/26] New upstream version 1.3.8. New tool: nbdcopy --- libnbd.spec | 9 ++++++++- sources | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/libnbd.spec b/libnbd.spec index 7fb187e..6847358 100644 --- a/libnbd.spec +++ b/libnbd.spec @@ -8,7 +8,7 @@ %global source_directory 1.3-development Name: libnbd -Version: 1.3.7 +Version: 1.3.8 Release: 1%{?dist} Summary: NBD client library in userspace @@ -219,7 +219,9 @@ make %{?_smp_mflags} check || { %files %doc README %license COPYING.LIB +%{_bindir}/nbdcopy %{_libdir}/libnbd.so.* +%{_mandir}/man1/nbdcopy.1* %files devel @@ -270,11 +272,16 @@ make %{?_smp_mflags} check || { %files bash-completion %dir %{_datadir}/bash-completion/completions +%{_datadir}/bash-completion/completions/nbdcopy %{_datadir}/bash-completion/completions/nbdfuse %{_datadir}/bash-completion/completions/nbdsh %changelog +* Fri Jul 17 2020 Richard W.M. Jones - 1.3.8-1 +- New upstream version 1.3.8. +- New tool: nbdcopy + * Thu Apr 23 2020 Richard W.M. Jones - 1.3.7-1 - New upstream version 1.3.7. diff --git a/sources b/sources index add6f4a..c910683 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libnbd-1.3.7.tar.gz) = 28980a8b4200ec41a6e344ca34e3fcfb27fb7a896b93e0883709da1804b310b1dbc76e9313524934909fd1ce55f019d2fa72d7058ea8db00f44795fdaa8e33b2 -SHA512 (libnbd-1.3.7.tar.gz.sig) = fc7a13d957dbc2595301d14f45674ae700f98d50ef57577cd5ce2ce4a33df043423f9ee41e44c06637d29a0728a0a526887a33b3d3dfe8cd175a535e00836a11 +SHA512 (libnbd-1.3.8.tar.gz) = 01fb1c2a47e7db695e39de0331ca4db5e2a25a556d113e83ab5d393d6cbdfc4a1824e6add9f58a59807e92842c748c92ce37c3ea1b54468528d131139ce3d5c9 +SHA512 (libnbd-1.3.8.tar.gz.sig) = 488633083633c3e9c9ebdb91c0f69005f1ad508c9d175502bedfc3277d3f672477e62c4ed9058d5767083839739f7e6269628cb427d2ba8d6b1f551ceb559a1a From a18a0f1ce6395bc2dd151978dec9116829aacebe Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 21 Jul 2020 11:15:24 +0100 Subject: [PATCH 20/26] New upstream version 1.3.9. New tool: nbdinfo. (cherry picked from commit 4f792d0a40bec844b00294d1cb009fee449eb631) --- libnbd.spec | 9 ++++++++- sources | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/libnbd.spec b/libnbd.spec index 6847358..d20e58c 100644 --- a/libnbd.spec +++ b/libnbd.spec @@ -8,7 +8,7 @@ %global source_directory 1.3-development Name: libnbd -Version: 1.3.8 +Version: 1.3.9 Release: 1%{?dist} Summary: NBD client library in userspace @@ -220,8 +220,10 @@ make %{?_smp_mflags} check || { %doc README %license COPYING.LIB %{_bindir}/nbdcopy +%{_bindir}/nbdinfo %{_libdir}/libnbd.so.* %{_mandir}/man1/nbdcopy.1* +%{_mandir}/man1/nbdinfo.1* %files devel @@ -274,10 +276,15 @@ make %{?_smp_mflags} check || { %dir %{_datadir}/bash-completion/completions %{_datadir}/bash-completion/completions/nbdcopy %{_datadir}/bash-completion/completions/nbdfuse +%{_datadir}/bash-completion/completions/nbdinfo %{_datadir}/bash-completion/completions/nbdsh %changelog +* Tue Jul 21 2020 Richard W.M. Jones - 1.3.9-1 +- New upstream version 1.3.9. +- New tool: nbdinfo. + * Fri Jul 17 2020 Richard W.M. Jones - 1.3.8-1 - New upstream version 1.3.8. - New tool: nbdcopy diff --git a/sources b/sources index c910683..cd9ff07 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libnbd-1.3.8.tar.gz) = 01fb1c2a47e7db695e39de0331ca4db5e2a25a556d113e83ab5d393d6cbdfc4a1824e6add9f58a59807e92842c748c92ce37c3ea1b54468528d131139ce3d5c9 -SHA512 (libnbd-1.3.8.tar.gz.sig) = 488633083633c3e9c9ebdb91c0f69005f1ad508c9d175502bedfc3277d3f672477e62c4ed9058d5767083839739f7e6269628cb427d2ba8d6b1f551ceb559a1a +SHA512 (libnbd-1.3.9.tar.gz) = 4af441f7d1ca0b2b5f1afdbf06af7f2c68378e3168bb2b75901ebe09dfde009ca81c314cc7fbb03516f4ddc92309aa68cb5bc4d21fd8719c155c094e80a39ff2 +SHA512 (libnbd-1.3.9.tar.gz.sig) = cf453012ee2098a6eeb5844845f4d385cebc55d3d51a4f301f7be710f8eb1babd6a45cf2e5a17cb0eb02f39a911a44faee02f5a247d1e8cc8b6652798e930e28 From 6b5abd76b32cb21502a6e378de0d835deff6c5dd Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 4 Aug 2020 17:40:26 +0100 Subject: [PATCH 21/26] New upstream version 1.3.10. (cherry picked from commit 8b50ca5ec6d456361db5c60a61cfd355c1dd680c) --- libnbd.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libnbd.spec b/libnbd.spec index d20e58c..3845441 100644 --- a/libnbd.spec +++ b/libnbd.spec @@ -8,7 +8,7 @@ %global source_directory 1.3-development Name: libnbd -Version: 1.3.9 +Version: 1.3.10 Release: 1%{?dist} Summary: NBD client library in userspace @@ -281,6 +281,9 @@ make %{?_smp_mflags} check || { %changelog +* Tue Aug 4 2020 Richard W.M. Jones - 1.3.10-1 +- New upstream version 1.3.10. + * Tue Jul 21 2020 Richard W.M. Jones - 1.3.9-1 - New upstream version 1.3.9. - New tool: nbdinfo. diff --git a/sources b/sources index cd9ff07..3fe58d9 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libnbd-1.3.9.tar.gz) = 4af441f7d1ca0b2b5f1afdbf06af7f2c68378e3168bb2b75901ebe09dfde009ca81c314cc7fbb03516f4ddc92309aa68cb5bc4d21fd8719c155c094e80a39ff2 -SHA512 (libnbd-1.3.9.tar.gz.sig) = cf453012ee2098a6eeb5844845f4d385cebc55d3d51a4f301f7be710f8eb1babd6a45cf2e5a17cb0eb02f39a911a44faee02f5a247d1e8cc8b6652798e930e28 +SHA512 (libnbd-1.3.10.tar.gz) = 51703d0bc4ea862e7d38d61bbed95388d30c6fbe65cad4aee3bad0309ed5a6a12b51e6087de7bc4dbadc7cbaadf0092c97513e1d21f6477babcbae4c8fc4fe55 +SHA512 (libnbd-1.3.10.tar.gz.sig) = 32849b01cb63fd43367665184b82372315eb067fdf805f00a1bca5512211639f626d4b702a8bcef542b26627b5be44ce6235e5658843c929e77129616fc03d90 From fdd890b4dd808e8932207fe6c5e78536a6b32ab5 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 6 Aug 2020 16:29:27 +0100 Subject: [PATCH 22/26] New upstream version 1.3.11. (cherry picked from commit d0c412677dd2d0ad42377392e0a01708183b25cd) --- libnbd.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libnbd.spec b/libnbd.spec index 3845441..d13fa1a 100644 --- a/libnbd.spec +++ b/libnbd.spec @@ -8,7 +8,7 @@ %global source_directory 1.3-development Name: libnbd -Version: 1.3.10 +Version: 1.3.11 Release: 1%{?dist} Summary: NBD client library in userspace @@ -281,6 +281,9 @@ make %{?_smp_mflags} check || { %changelog +* Thu Aug 6 2020 Richard W.M. Jones - 1.3.11-1 +- New upstream version 1.3.11. + * Tue Aug 4 2020 Richard W.M. Jones - 1.3.10-1 - New upstream version 1.3.10. diff --git a/sources b/sources index 3fe58d9..af34e76 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libnbd-1.3.10.tar.gz) = 51703d0bc4ea862e7d38d61bbed95388d30c6fbe65cad4aee3bad0309ed5a6a12b51e6087de7bc4dbadc7cbaadf0092c97513e1d21f6477babcbae4c8fc4fe55 -SHA512 (libnbd-1.3.10.tar.gz.sig) = 32849b01cb63fd43367665184b82372315eb067fdf805f00a1bca5512211639f626d4b702a8bcef542b26627b5be44ce6235e5658843c929e77129616fc03d90 +SHA512 (libnbd-1.3.11.tar.gz) = e5ca8eb76697f4ae97ab0497f3f0c6496b1fa100a851b16ace798087bd2ac1cddcb96dd8b70029f4e4b0c0fb0bd5647026a38bff2a67ce277a076f4a6b97ee92 +SHA512 (libnbd-1.3.11.tar.gz.sig) = b8ee2cb470c57c7a1adecbbd9eb6095c80a08b62d1b3f6d4829018ee7d3188d2b48f9d04521de8152227f71dc1ca183eb6ffd809f99070126af7bda9fdba8d90 From dc9d3f7fdea97e14022f13e174cbaceb4297708f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 20 Aug 2020 16:34:40 +0100 Subject: [PATCH 23/26] New upstream version 1.3.12. (cherry picked from commit 2f5d7ec5751a6f55c701807c9ed1e30fcf7a6494) --- libnbd.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libnbd.spec b/libnbd.spec index d13fa1a..83f898d 100644 --- a/libnbd.spec +++ b/libnbd.spec @@ -8,7 +8,7 @@ %global source_directory 1.3-development Name: libnbd -Version: 1.3.11 +Version: 1.3.12 Release: 1%{?dist} Summary: NBD client library in userspace @@ -281,6 +281,9 @@ make %{?_smp_mflags} check || { %changelog +* Thu Aug 20 2020 Richard W.M. Jones - 1.3.12-1 +- New upstream version 1.3.12. + * Thu Aug 6 2020 Richard W.M. Jones - 1.3.11-1 - New upstream version 1.3.11. diff --git a/sources b/sources index af34e76..e4547ca 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libnbd-1.3.11.tar.gz) = e5ca8eb76697f4ae97ab0497f3f0c6496b1fa100a851b16ace798087bd2ac1cddcb96dd8b70029f4e4b0c0fb0bd5647026a38bff2a67ce277a076f4a6b97ee92 -SHA512 (libnbd-1.3.11.tar.gz.sig) = b8ee2cb470c57c7a1adecbbd9eb6095c80a08b62d1b3f6d4829018ee7d3188d2b48f9d04521de8152227f71dc1ca183eb6ffd809f99070126af7bda9fdba8d90 +SHA512 (libnbd-1.3.12.tar.gz) = 7b4a55b2bd31b3a851d73861e7caebd1764eb05547c953132cb94fb7898aba5c40d19d7f88b91013332ae24806f5273490f8ce2fcf885e8be29919fbaee63209 +SHA512 (libnbd-1.3.12.tar.gz.sig) = 34da1132a7a22516c2df152e77ed7d4e8cbca7383c5a77dd13173c1c5b4c5d6fb43c96fde29a125878d13cb667dc7a2caae2957dff13825f6a0e0891996f9966 From b698a0a93df90d70c41b309eb6177e8cdc597e58 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 25 Aug 2020 21:02:10 +0100 Subject: [PATCH 24/26] New stable release 1.4.0. (cherry picked from commit 97b5eb6936a1eea242cb28021794348a845576f2) --- libnbd.spec | 7 +++++-- sources | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libnbd.spec b/libnbd.spec index 83f898d..f447ad6 100644 --- a/libnbd.spec +++ b/libnbd.spec @@ -5,10 +5,10 @@ %global patches_touch_autotools %{nil} # The source directory. -%global source_directory 1.3-development +%global source_directory 1.4-stable Name: libnbd -Version: 1.3.12 +Version: 1.4.0 Release: 1%{?dist} Summary: NBD client library in userspace @@ -281,6 +281,9 @@ make %{?_smp_mflags} check || { %changelog +* Tue Aug 25 2020 Richard W.M. Jones - 1.4.0-1 +- New stable release 1.4.0. + * Thu Aug 20 2020 Richard W.M. Jones - 1.3.12-1 - New upstream version 1.3.12. diff --git a/sources b/sources index e4547ca..cdf8cae 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libnbd-1.3.12.tar.gz) = 7b4a55b2bd31b3a851d73861e7caebd1764eb05547c953132cb94fb7898aba5c40d19d7f88b91013332ae24806f5273490f8ce2fcf885e8be29919fbaee63209 -SHA512 (libnbd-1.3.12.tar.gz.sig) = 34da1132a7a22516c2df152e77ed7d4e8cbca7383c5a77dd13173c1c5b4c5d6fb43c96fde29a125878d13cb667dc7a2caae2957dff13825f6a0e0891996f9966 +SHA512 (libnbd-1.4.0.tar.gz) = 19f4b64cb76d4dfd813c04393030a2cba4015e2e9b05c8e9becf5baad8029ff38cf5327149a28266b6af78d26740d73ccbbe2adf57c47dc53592b4f28a683330 +SHA512 (libnbd-1.4.0.tar.gz.sig) = a0303a55a45af68b5409b5be4d7e4cee5b1c74157579a3307bfd201eaf222e150a7c16b8e3b58eae5a98b645be8d9eca40b54908d42a3bacad2ab05f4b61722c From 979de268dc4a067d7fd024e0713f93ae8a2494f9 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 25 Aug 2020 21:07:52 +0100 Subject: [PATCH 25/26] Fix changelog from previous merge commit. --- libnbd.spec | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/libnbd.spec b/libnbd.spec index b91fd67..f447ad6 100644 --- a/libnbd.spec +++ b/libnbd.spec @@ -364,33 +364,34 @@ make %{?_smp_mflags} check || { * Wed Nov 06 2019 Richard W.M. Jones - 1.1.8-1 - New upstream version 1.1.8. -* Wed Feb 05 2020 Richard W.M. Jones - 1.2.2-1 -- New stable release 1.2.2. +* Thu Oct 24 2019 Richard W.M. Jones - 1.1.7-1 +- New upstream version 1.1.7. -* Thu Nov 14 2019 Richard W.M. Jones - 1.2.1-1 -- New stable release 1.2.1. -- Use gpgverify macro instead of explicit gpgv2 command. +* Sat Oct 19 2019 Richard W.M. Jones - 1.1.6-1 +- New upstream version 1.1.6. -* Thu Nov 14 2019 Richard W.M. Jones - 1.2.0-1 -- New stable release 1.2.0. +* Sat Oct 12 2019 Richard W.M. Jones - 1.1.5-1 +- New upstream version 1.1.5. +- New tool and subpackage nbdfuse. -* Wed Oct 9 2019 Richard W.M. Jones - 1.0.3-1 -- New upstream version 1.0.3. +* Wed Oct 9 2019 Richard W.M. Jones - 1.1.4-1 +- New upstream version 1.1.4. - Contains fix for remote code execution vulnerability. - Add new libnbd-security(3) man page. -* Tue Sep 17 2019 Richard W.M. Jones - 1.0.2-1 -- New upstream version 1.0.2. +* Tue Oct 1 2019 Richard W.M. Jones - 1.1.3-1 +- New upstream version 1.1.3. + +* Tue Sep 17 2019 Richard W.M. Jones - 1.1.2-1 +- New upstream version 1.1.2. - Remove patches which are upstream. - Contains fix for NBD Protocol Downgrade Attack (CVE-2019-14842). -- Fix previous commit message. -* Thu Sep 12 2019 Richard W.M. Jones - 1.0.1-2 +* Thu Sep 12 2019 Richard W.M. Jones - 1.1.1-2 - Add upstream patch to fix nbdsh (for nbdkit tests). -- Fix interop tests on slow machines. -* Sun Sep 08 2019 Richard W.M. Jones - 1.0.1-1 -- New stable version 1.0.1. +* Sun Sep 08 2019 Richard W.M. Jones - 1.1.1-1 +- New development version 1.1.1. * Wed Aug 28 2019 Richard W.M. Jones - 1.0.0-1 - New upstream version 1.0.0. From 9a111523887646e7bd73d29861fd7ac547baf060 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 10 Sep 2020 10:28:40 +0100 Subject: [PATCH 26/26] New stable version 1.4.1. (cherry picked from commit b15097d621423eb63a43dbc66d797233f0d2835a) (cherry picked from commit 6ec77bd6442139d00c14d38e20d7580a7c72e04d) --- libnbd.spec | 5 ++++- sources | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libnbd.spec b/libnbd.spec index f447ad6..1d66529 100644 --- a/libnbd.spec +++ b/libnbd.spec @@ -8,7 +8,7 @@ %global source_directory 1.4-stable Name: libnbd -Version: 1.4.0 +Version: 1.4.1 Release: 1%{?dist} Summary: NBD client library in userspace @@ -281,6 +281,9 @@ make %{?_smp_mflags} check || { %changelog +* Thu Sep 10 2020 Richard W.M. Jones - 1.4.1-1 +- New stable version 1.4.1. + * Tue Aug 25 2020 Richard W.M. Jones - 1.4.0-1 - New stable release 1.4.0. diff --git a/sources b/sources index cdf8cae..c12b0d8 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libnbd-1.4.0.tar.gz) = 19f4b64cb76d4dfd813c04393030a2cba4015e2e9b05c8e9becf5baad8029ff38cf5327149a28266b6af78d26740d73ccbbe2adf57c47dc53592b4f28a683330 -SHA512 (libnbd-1.4.0.tar.gz.sig) = a0303a55a45af68b5409b5be4d7e4cee5b1c74157579a3307bfd201eaf222e150a7c16b8e3b58eae5a98b645be8d9eca40b54908d42a3bacad2ab05f4b61722c +SHA512 (libnbd-1.4.1.tar.gz) = 5787fdf97a16dc35dbd628adad7953dbff034dd44fd7acf99064eae512d27107665e5fc3f990c7be139f2657a30f961be6a399aaa19aa4b15c5ee9c0df74cef3 +SHA512 (libnbd-1.4.1.tar.gz.sig) = 85cf0ef0d5e56d8cfca627eeb1a8c48e102392d96facaf2d7c79fb045c095744cc99b0cd0544acd27a47b828dbe8a8a707ebf47a0238c221497591c54c2639ed