New upstream version 0.9.9.
This commit is contained in:
parent
86d1fe9529
commit
fec21e3486
@ -1,50 +0,0 @@
|
|||||||
From e0b30bceab1cf61d8129b874d0122bc2cccec0e9 Mon Sep 17 00:00:00 2001
|
|
||||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
||||||
Date: Wed, 21 Aug 2019 09:57:54 +0100
|
|
||||||
Subject: [PATCH 1/3] lib: Try $LOGNAME before using getlogin_r.
|
|
||||||
|
|
||||||
Fixes tests in Koji which failed with
|
|
||||||
nbd_connect_unix: getlogin: No such device or address
|
|
||||||
---
|
|
||||||
lib/crypto.c | 18 ++++++++++++++++--
|
|
||||||
1 file changed, 16 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/lib/crypto.c b/lib/crypto.c
|
|
||||||
index 703bc84..2a59943 100644
|
|
||||||
--- a/lib/crypto.c
|
|
||||||
+++ b/lib/crypto.c
|
|
||||||
@@ -102,7 +102,7 @@ nbd_unlocked_set_tls_username (struct nbd_handle *h, const char *username)
|
|
||||||
char *
|
|
||||||
nbd_unlocked_get_tls_username (struct nbd_handle *h)
|
|
||||||
{
|
|
||||||
- char *ret;
|
|
||||||
+ char *s, *ret;
|
|
||||||
|
|
||||||
if (h->tls_username) {
|
|
||||||
ret = strdup (h->tls_username);
|
|
||||||
@@ -113,7 +113,21 @@ nbd_unlocked_get_tls_username (struct nbd_handle *h)
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
- /* Otherwise we return the local login name. */
|
|
||||||
+ /* Otherwise we return the local login name. Try $LOGNAME first for
|
|
||||||
+ * two reasons: (1) So the user can override it. (2) Because
|
|
||||||
+ * getlogin fails with ENXIO if there is no controlling terminal
|
|
||||||
+ * (which is often the case in test and embedded environments).
|
|
||||||
+ */
|
|
||||||
+ s = getenv ("LOGNAME");
|
|
||||||
+ if (s) {
|
|
||||||
+ ret = strdup (s);
|
|
||||||
+ if (ret == NULL) {
|
|
||||||
+ set_error (errno, "strdup");
|
|
||||||
+ return NULL;
|
|
||||||
+ }
|
|
||||||
+ return ret;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
ret = malloc (L_cuserid);
|
|
||||||
if (ret == NULL) {
|
|
||||||
set_error (errno, "malloc");
|
|
||||||
--
|
|
||||||
2.22.0
|
|
||||||
|
|
@ -1,96 +0,0 @@
|
|||||||
From e3a1f354a45e5e266d6db528900f98b171f4835f Mon Sep 17 00:00:00 2001
|
|
||||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
||||||
Date: Wed, 21 Aug 2019 10:46:52 +0100
|
|
||||||
Subject: [PATCH 2/3] build: Don't really need nbdkit development headers,
|
|
||||||
NBDKIT_CFLAGS, etc.
|
|
||||||
|
|
||||||
We relied on these in order to test the minimum version of nbdkit, but
|
|
||||||
didn't use them in any other way. Use another method to check the
|
|
||||||
minimum version of nbdkit.
|
|
||||||
|
|
||||||
On the other hand we do use a lot more than just nbdkit-sh-plugin, so
|
|
||||||
test for these.
|
|
||||||
|
|
||||||
Partially reverts commit 8c94da442daa290cc2199b12f0672fed762e3fd5.
|
|
||||||
---
|
|
||||||
README | 4 ++--
|
|
||||||
configure.ac | 42 +++++++++++++++++++++++++++---------------
|
|
||||||
2 files changed, 29 insertions(+), 17 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/README b/README
|
|
||||||
index befbe07..b42ff45 100644
|
|
||||||
--- a/README
|
|
||||||
+++ b/README
|
|
||||||
@@ -64,8 +64,8 @@ Optional:
|
|
||||||
* libxml2 is recommended for NBD URI support. If not available then
|
|
||||||
a few APIs related to URIs will always return error.
|
|
||||||
|
|
||||||
- * The nbdkit command, nbdkit-sh-plugin and nbdkit development headers
|
|
||||||
- are recommended as they are needed to run the test suite.
|
|
||||||
+ * The nbdkit command, basic plugins and nbdkit-sh-plugin are
|
|
||||||
+ recommended as they are needed to run the test suite.
|
|
||||||
|
|
||||||
* nbd-server and qemu-nbd if you want to do interoperability testing
|
|
||||||
against these servers.
|
|
||||||
diff --git a/configure.ac b/configure.ac
|
|
||||||
index fcce1cd..727773e 100644
|
|
||||||
--- a/configure.ac
|
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -137,27 +137,39 @@ AS_IF([test "$with_libxml2" != "no"],[
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
-dnl nbdkit, nbdkit-sh-plugin and development headers are only needed
|
|
||||||
-dnl to run the test suite.
|
|
||||||
+dnl nbdkit, basic plugins and nbdkit-sh-plugin are only needed to run
|
|
||||||
+dnl the test suite.
|
|
||||||
+nbdkit_plugins="memory null pattern sh"
|
|
||||||
+nbdkit_min_minor="12" ;# 1.12
|
|
||||||
AC_CHECK_PROG([NBDKIT], [nbdkit], [nbdkit])
|
|
||||||
AS_IF([test "x$NBDKIT" != "x"], [
|
|
||||||
- PKG_CHECK_MODULES([NBDKIT], [nbdkit >= 1.12], [
|
|
||||||
- AC_SUBST([NBDKIT_CFLAGS])
|
|
||||||
- AC_SUBST([NBDKIT_LIBS])
|
|
||||||
- have_nbdkit_devel=yes
|
|
||||||
- ], [
|
|
||||||
- AC_MSG_WARN([nbdkit development package is not installed, tests will be disabled])
|
|
||||||
- ])
|
|
||||||
+ have_nbdkit_features=yes
|
|
||||||
|
|
||||||
- AC_MSG_CHECKING([for nbdkit-sh-plugin])
|
|
||||||
- AS_IF([$NBDKIT sh --version >&AS_MESSAGE_LOG_FD 2>&1], [
|
|
||||||
- AC_MSG_RESULT([yes])
|
|
||||||
- have_nbdkit_sh_plugin=yes
|
|
||||||
+ AC_MSG_CHECKING([for nbdkit >= 1.$nbdkit_min_minor])
|
|
||||||
+ nbdkit_minor="$(
|
|
||||||
+ $NBDKIT --version | $SED 's/^nbdkit 1\.\(@<:@0-9@:>@*\)\..*/\1/'
|
|
||||||
+ )"
|
|
||||||
+ AS_IF([test $nbdkit_minor -ge $nbdkit_min_minor],[
|
|
||||||
+ AC_MSG_RESULT([yes (1.$nbdkit_minor)])
|
|
||||||
],[
|
|
||||||
- AC_MSG_RESULT([no])
|
|
||||||
+ AC_MSG_RESULT([no (1.$nbdkit_minor)])
|
|
||||||
+ AC_MSG_WARN([nbdkit is too old, some tests will be disabled])
|
|
||||||
+ have_nbdkit_features=no
|
|
||||||
])
|
|
||||||
+
|
|
||||||
+ for p in $nbdkit_plugins; do
|
|
||||||
+ AC_MSG_CHECKING([for nbdkit $p plugin])
|
|
||||||
+ AS_IF([$NBDKIT $p --version >&AS_MESSAGE_LOG_FD 2>&1], [
|
|
||||||
+ AC_MSG_RESULT([yes])
|
|
||||||
+ ],[
|
|
||||||
+ AC_MSG_RESULT([no])
|
|
||||||
+ AC_MSG_WARN([nbdkit $p plugin is missing, some tests will be disabled])
|
|
||||||
+ have_nbdkit_features=no
|
|
||||||
+ ])
|
|
||||||
+ done
|
|
||||||
])
|
|
||||||
-AM_CONDITIONAL([HAVE_NBDKIT], [test "x$NBDKIT" != "x" && test "x$have_nbdkit_devel" = "xyes" && test "x$have_nbdkit_sh_plugin" = "xyes"])
|
|
||||||
+AM_CONDITIONAL([HAVE_NBDKIT],
|
|
||||||
+ [test "x$NBDKIT" != "x" && test "x$have_nbdkit_features" = "xyes"])
|
|
||||||
|
|
||||||
dnl nbd-server and qemu-nbd for interop testing.
|
|
||||||
AC_CHECK_PROG([NBD_SERVER], [nbd-server], [nbd-server])
|
|
||||||
--
|
|
||||||
2.22.0
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
|||||||
From 4040499468abb7b04dfed4250ed050916ce4019a Mon Sep 17 00:00:00 2001
|
|
||||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
||||||
Date: Wed, 21 Aug 2019 11:25:20 +0100
|
|
||||||
Subject: [PATCH 3/3] tests: Fix overflow in calculation on 32 bit platforms.
|
|
||||||
|
|
||||||
---
|
|
||||||
tests/aio-parallel.c | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/tests/aio-parallel.c b/tests/aio-parallel.c
|
|
||||||
index ad01da6..d5477c9 100644
|
|
||||||
--- a/tests/aio-parallel.c
|
|
||||||
+++ b/tests/aio-parallel.c
|
|
||||||
@@ -81,7 +81,7 @@ main (int argc, char *argv[])
|
|
||||||
{
|
|
||||||
pthread_t threads[NR_MULTI_CONN];
|
|
||||||
struct thread_status status[NR_MULTI_CONN];
|
|
||||||
- size_t i, j;
|
|
||||||
+ uint64_t i, j;
|
|
||||||
time_t t;
|
|
||||||
int err;
|
|
||||||
unsigned requests, most_in_flight, errors;
|
|
||||||
@@ -146,7 +146,7 @@ main (int argc, char *argv[])
|
|
||||||
exit (EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
if (status[i].status != 0) {
|
|
||||||
- fprintf (stderr, "thread %zu failed with status %d\n",
|
|
||||||
+ fprintf (stderr, "thread %" PRIu64 " failed with status %d\n",
|
|
||||||
i, status[i].status);
|
|
||||||
errors++;
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.22.0
|
|
||||||
|
|
13
libnbd.spec
13
libnbd.spec
@ -2,14 +2,14 @@
|
|||||||
%global verify_tarball_signature 1
|
%global verify_tarball_signature 1
|
||||||
|
|
||||||
# If there are patches which touch autotools files, set this to 1.
|
# If there are patches which touch autotools files, set this to 1.
|
||||||
%global patches_touch_autotools 1
|
%global patches_touch_autotools %{nil}
|
||||||
|
|
||||||
# The source directory.
|
# The source directory.
|
||||||
%global source_directory 0.x-unstable-api
|
%global source_directory 0.x-unstable-api
|
||||||
|
|
||||||
Name: libnbd
|
Name: libnbd
|
||||||
Version: 0.9.8
|
Version: 0.9.9
|
||||||
Release: 4%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: NBD client library in userspace
|
Summary: NBD client library in userspace
|
||||||
|
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
@ -22,10 +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
|
# https://pgp.key-server.io/pks/lookup?search=rjones%40redhat.com&fingerprint=on&op=vindex
|
||||||
Source2: libguestfs.keyring
|
Source2: libguestfs.keyring
|
||||||
|
|
||||||
Patch0001: 0001-lib-Try-LOGNAME-before-using-getlogin_r.patch
|
|
||||||
Patch0002: 0002-build-Don-t-really-need-nbdkit-development-headers-N.patch
|
|
||||||
Patch0003: 0003-tests-Fix-overflow-in-calculation-on-32-bit-platform.patch
|
|
||||||
|
|
||||||
%if 0%{patches_touch_autotools}
|
%if 0%{patches_touch_autotools}
|
||||||
BuildRequires: autoconf, automake, libtool
|
BuildRequires: autoconf, automake, libtool
|
||||||
%endif
|
%endif
|
||||||
@ -221,6 +217,9 @@ make %{?_smp_mflags} check || {
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Aug 21 2019 Richard W.M. Jones <rjones@redhat.com> - 0.9.9-1
|
||||||
|
- New upstream version 0.9.9.
|
||||||
|
|
||||||
* Wed Aug 21 2019 Richard W.M. Jones <rjones@redhat.com> - 0.9.8-4
|
* Wed Aug 21 2019 Richard W.M. Jones <rjones@redhat.com> - 0.9.8-4
|
||||||
- Fix nbdkit dependencies so we're actually running the tests.
|
- Fix nbdkit dependencies so we're actually running the tests.
|
||||||
- Add glib2-devel BR so we build the glib main loop example.
|
- Add glib2-devel BR so we build the glib main loop example.
|
||||||
|
4
sources
4
sources
@ -1,2 +1,2 @@
|
|||||||
SHA512 (libnbd-0.9.8.tar.gz) = 2e5a8681a32aa517234b079400857e59e174fefc537c95597a79178d25ca3113c6e03476b2140e813f5a7938b4d34e87ba7b2e07f14cf2cffc63d1a7dae00e47
|
SHA512 (libnbd-0.9.9.tar.gz) = a925f3ca9fdb6c8324ad88e3a05ac9e59e017b15a33404925a67dfd6dcbc622f08636f436c10ba1f19d48b8538cd9f2d0bb9cc8fce116076c81ed2089a12f72c
|
||||||
SHA512 (libnbd-0.9.8.tar.gz.sig) = 15f6f8f63a94163f61ecb0425c50649ab8ae3a29927e9003b0a833c8d08f541daa32d4dc935d2a6a69b5972e223e7632cd2fa35f6d288085f3857256d7a3a95d
|
SHA512 (libnbd-0.9.9.tar.gz.sig) = 4f5e63875b48d8516de67f61e2155f0c006b8493aae438f292045a8fa8e4d1eccce36c95c02b4000cc9c6e73589151b47a5d14f1a9b8521ca4bd6999605b009d
|
||||||
|
Loading…
Reference in New Issue
Block a user