diff --git a/.gitignore b/.gitignore index e138377..362c594 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -SOURCES/libguestfs.keyring -SOURCES/nbdkit-1.24.0.tar.gz +libguestfs.keyring +nbdkit-1.40.0.tar.gz diff --git a/.nbdkit.metadata b/.nbdkit.metadata deleted file mode 100644 index 2f1c571..0000000 --- a/.nbdkit.metadata +++ /dev/null @@ -1,2 +0,0 @@ -1bbc40f501a7fef9eef2a39b701a71aee2fea7c4 SOURCES/libguestfs.keyring -069720cc0d1502b007652101d293a57d7b4d7c41 SOURCES/nbdkit-1.24.0.tar.gz diff --git a/0001-server-crypto.c-Fix-fallback-functions-used-when-gnu.patch b/0001-server-crypto.c-Fix-fallback-functions-used-when-gnu.patch new file mode 100644 index 0000000..1ff262b --- /dev/null +++ b/0001-server-crypto.c-Fix-fallback-functions-used-when-gnu.patch @@ -0,0 +1,51 @@ +From 7563596fdb7587dfb8708b5eeeb4b97d738ba79d Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Wed, 24 Jul 2024 11:22:28 +0100 +Subject: [PATCH] server/crypto.c: Fix fallback functions used when gnutls is + unavailable +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The return value was wrong resulting in these errors: + +crypto.c: In function ‘nbdkit_peer_tls_dn’: +crypto.c:945:3: error: return makes pointer from integer without a cast [-Werror] + return -1; + ^ +crypto.c: In function ‘nbdkit_peer_tls_issuer_dn’: +crypto.c:953:3: error: return makes pointer from integer without a cast [-Werror] + return -1; + ^ + +Fixes: commit a3759199c93300cf9de24a129c4141609dacb047 +Fixes: commit bf77f76112e3ffbc9149a54fbeb0a505310f28a2 +--- + server/crypto.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/server/crypto.c b/server/crypto.c +index abdc4801..fa408c75 100644 +--- a/server/crypto.c ++++ b/server/crypto.c +@@ -942,7 +942,7 @@ nbdkit_peer_tls_dn (void) + { + nbdkit_error ("%s is not supported on this platform", + "nbdkit_peer_tls_dn"); +- return -1; ++ return NULL; + } + + NBDKIT_DLL_PUBLIC char * +@@ -950,7 +950,7 @@ nbdkit_peer_tls_issuer_dn (void) + { + nbdkit_error ("%s is not supported on this platform", + "nbdkit_peer_tls_issuer_dn"); +- return -1; ++ return NULL; + } + + #endif /* !HAVE_GNUTLS */ +-- +2.43.0 + diff --git a/0002-server-log-Move-preserve-errno-to-log_verror-functio.patch b/0002-server-log-Move-preserve-errno-to-log_verror-functio.patch new file mode 100644 index 0000000..0986656 --- /dev/null +++ b/0002-server-log-Move-preserve-errno-to-log_verror-functio.patch @@ -0,0 +1,149 @@ +From f2c644d4495d5e75883ff729936102c90489e8d8 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 23 Jul 2024 14:46:41 +0100 +Subject: [PATCH] server: log: Move preserve errno to log_verror function + +This neutral code refactoring just moves the place where we preserve +errno out one layer, but should have no other effect. +--- + server/internal.h | 8 ++++---- + server/log-stderr.c | 9 ++------- + server/log-syslog.c | 13 ++++--------- + server/log.c | 12 ++++++++---- + 4 files changed, 18 insertions(+), 24 deletions(-) + +diff --git a/server/internal.h b/server/internal.h +index 0b0507e4..1a783e3f 100644 +--- a/server/internal.h ++++ b/server/internal.h +@@ -340,10 +340,10 @@ extern void free_debug_flags (void); + extern void log_verror (const char *fs, va_list args); + + /* log-*.c */ +-extern void log_stderr_verror (const char *fs, va_list args) +- ATTRIBUTE_FORMAT_PRINTF (1, 0); +-extern void log_syslog_verror (const char *fs, va_list args) +- ATTRIBUTE_FORMAT_PRINTF (1, 0); ++extern void log_stderr_verror (int orig_errno, const char *fs, va_list args) ++ ATTRIBUTE_FORMAT_PRINTF (2, 0); ++extern void log_syslog_verror (int orig_errno, const char *fs, va_list args) ++ ATTRIBUTE_FORMAT_PRINTF (2, 0); + + /* vfprintf.c */ + #if !HAVE_VFPRINTF_PERCENT_M +diff --git a/server/log-stderr.c b/server/log-stderr.c +index 8a55f5df..4d8b09da 100644 +--- a/server/log-stderr.c ++++ b/server/log-stderr.c +@@ -43,12 +43,9 @@ + + #include "internal.h" + +-/* Note: preserves the previous value of errno. */ + void +-log_stderr_verror (const char *fs, va_list args) ++log_stderr_verror (int orig_errno, const char *fs, va_list args) + { +- int err = errno; /* must be first line of function */ +- + const char *name = threadlocal_get_name (); + size_t instance_num = threadlocal_get_instance_num (); + int tty; +@@ -69,7 +66,7 @@ log_stderr_verror (const char *fs, va_list args) + } + + fprintf (stderr, "error: "); +- errno = err; /* must restore in case fs contains %m */ ++ errno = orig_errno; /* must restore in case fs contains %m */ + vfprintf (stderr, fs, args); + fprintf (stderr, "\n"); + +@@ -78,6 +75,4 @@ log_stderr_verror (const char *fs, va_list args) + #ifdef HAVE_FUNLOCKFILE + funlockfile (stderr); + #endif +- +- errno = err; /* must be last line of function */ + } +diff --git a/server/log-syslog.c b/server/log-syslog.c +index 76c5035b..29a7a825 100644 +--- a/server/log-syslog.c ++++ b/server/log-syslog.c +@@ -45,11 +45,9 @@ + /* Tempted to use LOG_FTP instead of LOG_DAEMON! */ + static const int PRIORITY = LOG_DAEMON|LOG_ERR; + +-/* Note: preserves the previous value of errno. */ + void +-log_syslog_verror (const char *fs, va_list args) ++log_syslog_verror (int orig_errno, const char *fs, va_list args) + { +- int err = errno; + const char *name = threadlocal_get_name (); + size_t instance_num = threadlocal_get_instance_num (); + CLEANUP_FREE char *msg = NULL; +@@ -59,9 +57,9 @@ log_syslog_verror (const char *fs, va_list args) + fp = open_memstream (&msg, &len); + if (fp == NULL) { + /* Fallback to logging using fs, args directly. */ +- errno = err; /* Must restore in case fs contains %m */ ++ errno = orig_errno; /* must restore in case fs contains %m */ + vsyslog (PRIORITY, fs, args); +- goto out; ++ return; + } + + if (name) { +@@ -71,12 +69,9 @@ log_syslog_verror (const char *fs, va_list args) + fprintf (fp, ": "); + } + +- errno = err; /* Must restore in case fs contains %m */ ++ errno = orig_errno; /* must restore in case fs contains %m */ + vfprintf (fp, fs, args); + close_memstream (fp); + + syslog (PRIORITY, "%s", msg); +- +- out: +- errno = err; + } +diff --git a/server/log.c b/server/log.c +index 464e4f9a..9c1f667a 100644 +--- a/server/log.c ++++ b/server/log.c +@@ -46,23 +46,27 @@ + void + log_verror (const char *fs, va_list args) + { ++ int orig_errno = errno; ++ + switch (log_to) { + case LOG_TO_DEFAULT: + if (forked_into_background) +- log_syslog_verror (fs, args); ++ log_syslog_verror (orig_errno, fs, args); + else +- log_stderr_verror (fs, args); ++ log_stderr_verror (orig_errno, fs, args); + break; + case LOG_TO_SYSLOG: +- log_syslog_verror (fs, args); ++ log_syslog_verror (orig_errno, fs, args); + break; + case LOG_TO_STDERR: +- log_stderr_verror (fs, args); ++ log_stderr_verror (orig_errno, fs, args); + break; + case LOG_TO_NULL: + /* nothing */ + break; + } ++ ++ errno = orig_errno; /* Restore errno before leaving the function. */ + } + + /* Note: preserves the previous value of errno. */ +-- +2.43.0 + diff --git a/0003-server-Rename-threadlocal_-set-get-_error-to-._errno.patch b/0003-server-Rename-threadlocal_-set-get-_error-to-._errno.patch new file mode 100644 index 0000000..3e8468f --- /dev/null +++ b/0003-server-Rename-threadlocal_-set-get-_error-to-._errno.patch @@ -0,0 +1,175 @@ +From 1d7f655726ad3483d0e8086741182aada7ae8595 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Wed, 24 Jul 2024 10:29:13 +0100 +Subject: [PATCH] server: Rename threadlocal_{set,get}_error to .._errno + +A simple mechanical change, to avoid confusion with +threadlocal_{set,get}_last_error introduced in the following commit. +--- + server/internal.h | 4 ++-- + server/plugins.c | 27 +++++++++++++-------------- + server/protocol.c | 5 +++-- + server/threadlocal.c | 4 ++-- + 4 files changed, 20 insertions(+), 20 deletions(-) + +diff --git a/server/internal.h b/server/internal.h +index 1a783e3f..8102ccde 100644 +--- a/server/internal.h ++++ b/server/internal.h +@@ -569,8 +569,8 @@ extern void threadlocal_set_name (const char *name) + extern const char *threadlocal_get_name (void); + extern void threadlocal_set_instance_num (size_t instance_num); + extern size_t threadlocal_get_instance_num (void); +-extern void threadlocal_set_error (int err); +-extern int threadlocal_get_error (void); ++extern void threadlocal_set_errno (int err); ++extern int threadlocal_get_errno (void); + extern void *threadlocal_buffer (size_t size); + extern void threadlocal_set_conn (struct connection *conn); + extern struct connection *threadlocal_get_conn (void); +diff --git a/server/plugins.c b/server/plugins.c +index ca89ac7a..3c7df0d2 100644 +--- a/server/plugins.c ++++ b/server/plugins.c +@@ -633,15 +633,14 @@ plugin_can_cache (struct context *c) + NBDKIT_DLL_PUBLIC void + nbdkit_set_error (int err) + { +- threadlocal_set_error (err); ++ threadlocal_set_errno (err); + } + +-/* Grab the appropriate error value. +- */ ++/* Grab the appropriate error value. */ + static int +-get_error (struct backend_plugin *p) ++get_errno (struct backend_plugin *p) + { +- int ret = threadlocal_get_error (); ++ int ret = threadlocal_get_errno (); + + if (!ret && p->plugin.errno_is_preserved != 0) + ret = errno; +@@ -664,7 +663,7 @@ plugin_pread (struct context *c, + else + r = p->plugin._pread_v1 (c->handle, buf, count, offset); + if (r == -1) +- *err = get_error (p); ++ *err = get_errno (p); + return r; + } + +@@ -685,7 +684,7 @@ plugin_flush (struct context *c, + return -1; + } + if (r == -1) +- *err = get_error (p); ++ *err = get_errno (p); + return r; + } + +@@ -715,7 +714,7 @@ plugin_pwrite (struct context *c, + if (r != -1 && need_flush) + r = plugin_flush (c, 0, err); + if (r == -1 && !*err) +- *err = get_error (p); ++ *err = get_errno (p); + return r; + } + +@@ -744,7 +743,7 @@ plugin_trim (struct context *c, + if (r != -1 && need_flush) + r = plugin_flush (c, 0, err); + if (r == -1 && !*err) +- *err = get_error (p); ++ *err = get_errno (p); + return r; + } + +@@ -782,7 +781,7 @@ plugin_zero (struct context *c, + else + emulate = true; + if (r == -1) +- *err = emulate ? EOPNOTSUPP : get_error (p); ++ *err = emulate ? EOPNOTSUPP : get_errno (p); + if (r == 0 || (*err != EOPNOTSUPP && *err != ENOTSUP)) + goto done; + } +@@ -794,7 +793,7 @@ plugin_zero (struct context *c, + } + + flags &= ~NBDKIT_FLAG_MAY_TRIM; +- threadlocal_set_error (0); ++ threadlocal_set_errno (0); + *err = 0; + + while (count) { +@@ -814,7 +813,7 @@ plugin_zero (struct context *c, + if (r != -1 && need_flush) + r = plugin_flush (c, 0, err); + if (r == -1 && !*err) +- *err = get_error (p); ++ *err = get_errno (p); + return r; + } + +@@ -839,7 +838,7 @@ plugin_extents (struct context *c, + r = -1; + } + if (r == -1) +- *err = get_error (p); ++ *err = get_errno (p); + return r; + } + +@@ -859,7 +858,7 @@ plugin_cache (struct context *c, + + r = p->plugin.cache (c->handle, count, offset, flags); + if (r == -1) +- *err = get_error (p); ++ *err = get_errno (p); + return r; + } + +diff --git a/server/protocol.c b/server/protocol.c +index 9b63f789..677da05c 100644 +--- a/server/protocol.c ++++ b/server/protocol.c +@@ -235,8 +235,9 @@ handle_request (uint16_t cmd, uint16_t flags, uint64_t offset, uint32_t count, + int err = 0; + + /* Clear the error, so that we know if the plugin calls +- * nbdkit_set_error() or relied on errno. */ +- threadlocal_set_error (0); ++ * nbdkit_set_error() or relied on errno. ++ */ ++ threadlocal_set_errno (0); + + switch (cmd) { + case NBD_CMD_READ: +diff --git a/server/threadlocal.c b/server/threadlocal.c +index 088fe55a..9bb656bc 100644 +--- a/server/threadlocal.c ++++ b/server/threadlocal.c +@@ -154,7 +154,7 @@ threadlocal_get_instance_num (void) + } + + void +-threadlocal_set_error (int err) ++threadlocal_set_errno (int err) + { + struct threadlocal *threadlocal = pthread_getspecific (threadlocal_key); + +@@ -167,7 +167,7 @@ threadlocal_set_error (int err) + /* This preserves errno, for convenience. + */ + int +-threadlocal_get_error (void) ++threadlocal_get_errno (void) + { + int err = errno; + struct threadlocal *threadlocal = pthread_getspecific (threadlocal_key); +-- +2.43.0 + diff --git a/0004-server-Introduce-threadlocal_-set-get-_last_error.patch b/0004-server-Introduce-threadlocal_-set-get-_last_error.patch new file mode 100644 index 0000000..2443cc7 --- /dev/null +++ b/0004-server-Introduce-threadlocal_-set-get-_last_error.patch @@ -0,0 +1,93 @@ +From fa5055ae2b9f96af941d697de39198c96ee2580a Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Wed, 24 Jul 2024 10:37:58 +0100 +Subject: [PATCH] server: Introduce threadlocal_{set,get}_last_error + +Plus a function to clear the last_error field. +--- + server/internal.h | 3 +++ + server/threadlocal.c | 40 ++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 43 insertions(+) + +diff --git a/server/internal.h b/server/internal.h +index 8102ccde..c45384a6 100644 +--- a/server/internal.h ++++ b/server/internal.h +@@ -571,6 +571,9 @@ extern void threadlocal_set_instance_num (size_t instance_num); + extern size_t threadlocal_get_instance_num (void); + extern void threadlocal_set_errno (int err); + extern int threadlocal_get_errno (void); ++extern void threadlocal_set_last_error (char *msg); ++extern void threadlocal_clear_last_error (void); ++extern const char *threadlocal_get_last_error (void); + extern void *threadlocal_buffer (size_t size); + extern void threadlocal_set_conn (struct connection *conn); + extern struct connection *threadlocal_get_conn (void); +diff --git a/server/threadlocal.c b/server/threadlocal.c +index 9bb656bc..74a3c4e5 100644 +--- a/server/threadlocal.c ++++ b/server/threadlocal.c +@@ -56,6 +56,7 @@ struct threadlocal { + char *name; /* Can be NULL. */ + size_t instance_num; /* Can be 0. */ + int err; ++ char *last_error; /* Can be NULL. */ + void *buffer; /* Can be NULL. */ + size_t buffer_size; + struct connection *conn; /* Can be NULL. */ +@@ -70,6 +71,7 @@ free_threadlocal (void *threadlocalv) + struct threadlocal *threadlocal = threadlocalv; + + free (threadlocal->name); ++ free (threadlocal->last_error); + free (threadlocal->buffer); + free (threadlocal); + } +@@ -176,6 +178,44 @@ threadlocal_get_errno (void) + return threadlocal ? threadlocal->err : 0; + } + ++/* Set the last_error field. The ownership of the 'msg' string is ++ * passed to the threadlocal and will be freed here. ++ */ ++void ++threadlocal_set_last_error (char *msg) ++{ ++ struct threadlocal *threadlocal = pthread_getspecific (threadlocal_key); ++ ++ if (threadlocal) { ++ free (threadlocal->last_error); ++ threadlocal->last_error = msg; ++ } ++ else { ++ /* ... otherwise throw it away, it's informational. */ ++ free (msg); ++ } ++} ++ ++void ++threadlocal_clear_last_error (void) ++{ ++ threadlocal_set_last_error (NULL); ++} ++ ++/* Get the last_error field. If successful, this returns a non-NULL ++ * string. This is valid until something calls nbdkit_error() in the ++ * same thread, so it should be used quickly. Returning NULL is not ++ * necessarily an error. The last_error is informational and may not ++ * be available. ++ */ ++const char * ++threadlocal_get_last_error (void) ++{ ++ struct threadlocal *threadlocal = pthread_getspecific (threadlocal_key); ++ ++ return threadlocal ? threadlocal->last_error : NULL; ++} ++ + /* Return the single pread/pwrite buffer for this thread. The buffer + * size is increased to ‘size’ bytes if required. + * +-- +2.43.0 + diff --git a/0005-server-Take-a-thread-local-copy-of-the-last-call-to-.patch b/0005-server-Take-a-thread-local-copy-of-the-last-call-to-.patch new file mode 100644 index 0000000..485a520 --- /dev/null +++ b/0005-server-Take-a-thread-local-copy-of-the-last-call-to-.patch @@ -0,0 +1,93 @@ +From bfa6d4064cb74f429149d14ab4025b258fc95ec4 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 23 Jul 2024 15:28:06 +0100 +Subject: [PATCH] server: Take a thread-local copy of the last call to + nbdkit_error + +nbdkit_error has traditionally been a "fancy wrapper around fprintf" +(kind of, don't take that literally). It is encouraged that plugins +and filters do something like: + + if (error) { + nbdkit_error ("oops, a bad thing happened"); + return -1; + } + +but we don't enforce this. Plugins might call nbdkit_error more than +once or not at all. + +The point where we get to sending an error back over the wire to the +NBD client is long after the plugin returned above, and after +nbdkit_error was called. + +Therefore in order to send errors back to the NBD client, we must keep +the last error message around. + +This change simply modifies nbdkit_error to make a best-effort attempt +to save the last error message in thread-local storage. + +We also clear the last error when a new request starts, to ensure that +we don't leak errors across different callbacks or connections. +--- + server/log.c | 21 +++++++++++++++++++++ + server/protocol.c | 5 +++++ + 2 files changed, 26 insertions(+) + +diff --git a/server/log.c b/server/log.c +index 9c1f667a..acf14d57 100644 +--- a/server/log.c ++++ b/server/log.c +@@ -40,6 +40,25 @@ + + #include "internal.h" + ++/* Copy the error message to threadlocal. This is sent to callers ++ * which are using structured replies, but is for extra information ++ * only so don't fail if we are unable to copy it. ++ */ ++static void ++copy_error_to_threadlocal (int orig_errno, const char *fs, va_list args) ++{ ++ va_list args_copy; ++ char *msg; ++ int r; ++ ++ va_copy (args_copy, args); ++ errno = orig_errno; /* must restore in case fs contains %m */ ++ r = vasprintf (&msg, fs, args_copy); ++ va_end (args_copy); ++ if (r != -1 && msg) ++ threadlocal_set_last_error (msg); /* ownership passed to threadlocal */ ++} ++ + /* Call the right log_*_verror function depending on log_sink. + * Note: preserves the previous value of errno. + */ +@@ -48,6 +67,8 @@ log_verror (const char *fs, va_list args) + { + int orig_errno = errno; + ++ copy_error_to_threadlocal (orig_errno, fs, args); ++ + switch (log_to) { + case LOG_TO_DEFAULT: + if (forked_into_background) +diff --git a/server/protocol.c b/server/protocol.c +index 677da05c..d428bfc8 100644 +--- a/server/protocol.c ++++ b/server/protocol.c +@@ -239,6 +239,11 @@ handle_request (uint16_t cmd, uint16_t flags, uint64_t offset, uint32_t count, + */ + threadlocal_set_errno (0); + ++ /* Also clear the last error in this thread so we will only save ++ * nbdkit_error() from this request. ++ */ ++ threadlocal_clear_last_error (); ++ + switch (cmd) { + case NBD_CMD_READ: + if (backend_pread (c, buf, count, offset, 0, &err) == -1) +-- +2.43.0 + diff --git a/0006-server-Send-the-last-error-to-the-NBD-client.patch b/0006-server-Send-the-last-error-to-the-NBD-client.patch new file mode 100644 index 0000000..18b221d --- /dev/null +++ b/0006-server-Send-the-last-error-to-the-NBD-client.patch @@ -0,0 +1,175 @@ +From 46484ca8e6a35c45fe96b6c972ceba8984d401e8 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 23 Jul 2024 15:45:04 +0100 +Subject: [PATCH] server: Send the last error to the NBD client + +This sends the last error saved in the connection handle back to the +NBD client. This is informational and best effort. + +qemu reports the error already, for example: + + $ nbdkit --log=null \ + eval open=' echo EPERM Go Away >&2; exit 1 ' get_size=' echo 100 ' \ + --run 'qemu-img info "$uri"' + qemu-img: Could not open 'nbd+unix://?socket=/tmp/nbdkitIDl6iy/socket': Requested export not available + server reported: /tmp/nbdkitRDAfXH/open: Go Away + +This goes back to at least qemu 2.12.0 (RHEL 7) and possibly earlier, +so we can just assume that qemu does this for the test. + +libnbd requires a patch to display this information. +--- + server/protocol-handshake-newstyle.c | 43 ++++++++++++++++------ + tests/Makefile.am | 2 + + tests/test-last-error.sh | 55 ++++++++++++++++++++++++++++ + 3 files changed, 88 insertions(+), 12 deletions(-) + create mode 100755 tests/test-last-error.sh + +diff --git a/server/protocol-handshake-newstyle.c b/server/protocol-handshake-newstyle.c +index 6b3bc76f..c18d32e5 100644 +--- a/server/protocol-handshake-newstyle.c ++++ b/server/protocol-handshake-newstyle.c +@@ -57,28 +57,47 @@ send_newstyle_option_reply (uint32_t option, uint32_t reply) + { + GET_CONN; + struct nbd_fixed_new_option_reply fixed_new_option_reply; ++ const char *last_error = NULL; ++ uint32_t replylen = 0; ++ ++ if (NBD_REP_IS_ERR (reply)) { ++ last_error = threadlocal_get_last_error (); ++ /* Note that calling nbdkit_error will invalidate last_error, so ++ * be careful below. ++ */ ++ if (last_error) { ++ size_t len = strlen (last_error); ++ if (len <= NBD_MAX_STRING) ++ replylen = len; ++ } ++ } + + fixed_new_option_reply.magic = htobe64 (NBD_REP_MAGIC); + fixed_new_option_reply.option = htobe32 (option); + fixed_new_option_reply.reply = htobe32 (reply); +- fixed_new_option_reply.replylen = htobe32 (0); ++ fixed_new_option_reply.replylen = htobe32 (replylen); + + debug ("replying to %s with %s", name_of_nbd_opt (option), + name_of_nbd_rep (reply)); + if (conn->send (&fixed_new_option_reply, +- sizeof fixed_new_option_reply, 0) == -1) { +- /* The protocol document says that the client is allowed to simply +- * drop the connection after sending NBD_OPT_ABORT, or may read +- * the reply. +- */ +- if (option == NBD_OPT_ABORT) +- debug ("write: %s: %m", name_of_nbd_opt (option)); +- else +- nbdkit_error ("write: %s: %m", name_of_nbd_opt (option)); +- return -1; +- } ++ sizeof fixed_new_option_reply, ++ replylen > 0 ? SEND_MORE : 0) == -1) ++ goto err; ++ if (replylen > 0 && conn->send (last_error, replylen, 0) == -1) ++ goto err; + + return 0; ++ ++err: ++ /* The protocol document says that the client is allowed to simply ++ * drop the connection after sending NBD_OPT_ABORT, or may read ++ * the reply. ++ */ ++ if (option == NBD_OPT_ABORT) ++ debug ("write: %s: %m", name_of_nbd_opt (option)); ++ else ++ nbdkit_error ("write: %s: %m", name_of_nbd_opt (option)); ++ return -1; + } + + /* Reply to NBD_OPT_LIST with the plugin's list of export names. +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 8c7d6b8c..89c5fa9d 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -292,6 +292,7 @@ TESTS += \ + test-read-password-interactive.sh \ + test-nbd-client.sh \ + test-nbd-client-tls.sh \ ++ test-last-error.sh \ + $(NULL) + if !IS_WINDOWS + TESTS += \ +@@ -324,6 +325,7 @@ EXTRA_DIST += \ + test-help-plugin.sh \ + test-ipv4-lo.sh \ + test-ipv6-lo.sh \ ++ test-last-error.sh \ + test-long-name.sh \ + test-nbd-client-tls.sh \ + test-nbd-client.sh \ +diff --git a/tests/test-last-error.sh b/tests/test-last-error.sh +new file mode 100755 +index 00000000..fc720606 +--- /dev/null ++++ b/tests/test-last-error.sh +@@ -0,0 +1,55 @@ ++#!/usr/bin/env bash ++# nbdkit ++# Copyright Red Hat ++# ++# Redistribution and use in source and binary forms, with or without ++# modification, are permitted provided that the following conditions are ++# met: ++# ++# * Redistributions of source code must retain the above copyright ++# notice, this list of conditions and the following disclaimer. ++# ++# * Redistributions in binary form must reproduce the above copyright ++# notice, this list of conditions and the following disclaimer in the ++# documentation and/or other materials provided with the distribution. ++# ++# * Neither the name of Red Hat nor the names of its contributors may be ++# used to endorse or promote products derived from this software without ++# specific prior written permission. ++# ++# THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND ++# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, ++# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ++# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR ++# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ++# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ++# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ++# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ++# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ++# SUCH DAMAGE. ++ ++source ./functions.sh ++set -e ++set -x ++ ++# Test informational error messages sent to the NBD client. ++# qemu-img supports this since at least 2.12.0. ++ ++requires_run ++requires_plugin eval ++requires qemu-img --version ++ ++out=last-error.out ++rm -f $out ++cleanup_fn rm -f $out ++ ++export out ++ ++nbdkit eval \ ++ open=' echo EPERM Go Away >&2; exit 1 ' get_size=' echo 0 ' \ ++ --run ' qemu-img info "$uri" > $out 2>&1 ||: ' ++cat $out ++ ++grep "Go Away" $out +-- +2.43.0 + diff --git a/SOURCES/0001-cache-cow-Fix-data-corruption-in-zero-and-trim-on-un.patch b/SOURCES/0001-cache-cow-Fix-data-corruption-in-zero-and-trim-on-un.patch deleted file mode 100644 index 151fc17..0000000 --- a/SOURCES/0001-cache-cow-Fix-data-corruption-in-zero-and-trim-on-un.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 99788909d9ec36e3210cf85976fe5b18da690ddd Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Wed, 4 Aug 2021 20:24:59 +0100 -Subject: [PATCH] cache, cow: Fix data corruption in zero and trim on unaligned - tail - -Commit eb6009b092 ("cache, cow: Reduce use of bounce-buffer") first -introduced in nbdkit 1.14 added an optimization of the -read-modify-write mechanism used for unaligned heads and tails when -zeroing in the cache layer. - -Unfortunately the part applied to the tail contained a mistake: It -zeroes the end of the buffer rather than the beginning. This causes -data corruption when you use the zero or trim function with an offset -and count which is not aligned to the block size. - -Although the bug has been around for years, a recent change made it -more likely to happen. Commit c1905b0a28 ("cache, cow: Use a 64K -block size by default") increased the default block size from 4K to -64K. Most filesystems use a 4K block size so operations like fstrim -will make 4K-aligned requests, and with a 4K block size also in the -cache or cow filter the unaligned case would never have been hit -before. - -We can demonstrate the bug simply by filling a buffer with data -(100000 bytes in the example), and then trimming that data, which -ought to zero it out. - -Before this commit there is data visible after the trim: - -$ nbdkit --filter=cow data "0x21 * 100000" --run 'nbdsh -u $uri -c "h.trim(100000, 0)" ; nbdcopy $uri - | hexdump -C' -00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -00018000 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 |!!!!!!!!!!!!!!!!| -* -000186a0 - -After this commit the trim completely clears the data: - -$ nbdkit --filter=cow data "0x21 * 100000" --run 'nbdsh -u $uri -c "h.trim(100000, 0)" ; nbdcopy $uri - | hexdump -C' -00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| -* -000186a0 - -Thanks: Ming Xie for finding the bug -Fixes: commit eb6009b092ae642ed25f133d487dd40ef7bf70f8 -(cherry picked from commit a0ae7b2158598ce48ac31706319007f716d01c87) -(cherry picked from commit c0b15574647672cb5c48178333acdd07424692ef) ---- - filters/cache/cache.c | 2 +- - filters/cow/cow.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/filters/cache/cache.c b/filters/cache/cache.c -index 91dcc43d..0616cc7b 100644 ---- a/filters/cache/cache.c -+++ b/filters/cache/cache.c -@@ -493,7 +493,7 @@ cache_zero (struct nbdkit_next_ops *next_ops, void *nxdata, - ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&lock); - r = blk_read (next_ops, nxdata, blknum, block, err); - if (r != -1) { -- memset (&block[count], 0, blksize - count); -+ memset (block, 0, count); - r = blk_write (next_ops, nxdata, blknum, block, flags, err); - } - if (r == -1) -diff --git a/filters/cow/cow.c b/filters/cow/cow.c -index 51ca64a4..1cfcc4e7 100644 ---- a/filters/cow/cow.c -+++ b/filters/cow/cow.c -@@ -419,7 +419,7 @@ cow_zero (struct nbdkit_next_ops *next_ops, void *nxdata, - ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&lock); - r = blk_read (next_ops, nxdata, blknum, block, err); - if (r != -1) { -- memset (&block[count], 0, BLKSIZE - count); -+ memset (block, 0, count); - r = blk_write (blknum, block, err); - } - if (r == -1) --- -2.31.1 - diff --git a/SOURCES/0002-server-CVE-2021-3716-reset-structured-replies-on-sta.patch b/SOURCES/0002-server-CVE-2021-3716-reset-structured-replies-on-sta.patch deleted file mode 100644 index ce6938e..0000000 --- a/SOURCES/0002-server-CVE-2021-3716-reset-structured-replies-on-sta.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 6b9d4380df9bd0be91f49aad8c4f47b4e672adde Mon Sep 17 00:00:00 2001 -From: Eric Blake -Date: Mon, 16 Aug 2021 13:43:29 -0500 -Subject: [PATCH] server: CVE-2021-3716 reset structured replies on starttls - -https://nostarttls.secvuln.info/ pointed out a series of CVEs in -common implementation flaw in various SMTP and IMAP clients and -servers, all with a common thread of improperly caching plaintext -state across the STARTTLS encryption boundary; and recommended that -other protocols with a STARTTLS operation perform a similar audit. - -It turns out that nbdkit has the same vulnerability in regards to the -NBD protocol: when nbdkit is run in opportunistic TLS mode, an -attacker is able to inject a plaintext NBD_OPT_STRUCTURED_REPLY before -proxying everything else a client sends to the server; if the server -then acts on that plaintext request (as nbdkit did before this patch), -then the server ends up sending structured replies to at least -NBD_CMD_READ, even though the client was assuming that the transition -to TLS has ruled out a MitM attack. - -On the bright side, nbdkit's behavior on a second -NBD_OPT_STRUCTURED_REPLY was to still reply with success, so a client -that always requests structured replies after starting TLS sees no -difference in behavior (that is, qemu 2.12 and later are immune) (had -nbdkit given an error to the second request, that may have caused -confusion to more clients). And there is always the mitigation of -using --tls=require, which lets nbdkit reject the MitM message -pre-encryption. However, nbd-client 3.15 to the present do not -understand structured replies, and I have confirmed that a MitM -attacker can thus cause a denial-of-service attack that does not -trigger until the client does its first encrypted NBD_CMD_READ. - -The NBD spec has been recently tightened to declare the nbdkit -behavior to be a security hole: -https://github.com/NetworkBlockDevice/nbd/commit/77e55378096aa -Fixes: eaa4c6e9a2c4bd (server: Minimal implementation of NBD Structured Replies.) - -(cherry picked from commit 09a13dafb7bb3a38ab52eb5501cba786365ba7fd) -(cherry picked from commit 6185b15a81e6915734d678f0781e31d45a7941a1) ---- - docs/nbdkit-security.pod | 11 +++++++++-- - server/protocol-handshake-newstyle.c | 3 ++- - 2 files changed, 11 insertions(+), 3 deletions(-) - -diff --git a/docs/nbdkit-security.pod b/docs/nbdkit-security.pod -index 3a28e54d..5a4e6da8 100644 ---- a/docs/nbdkit-security.pod -+++ b/docs/nbdkit-security.pod -@@ -10,7 +10,7 @@ For how to report new security issues, see the C file in the - top level source directory, also available online here: - L - --=head2 CVE-2019-14850 -+=head2 CVE-2019-14850 - denial of service due to premature opening of back-end connection - - See the full announcement and links to mitigation, tests and fixes -@@ -26,6 +26,13 @@ See the full announcement and links to mitigation, tests and fixes - here: - https://www.redhat.com/archives/libguestfs/2019-September/msg00272.html - -+=head2 CVE-2021-3716 -+structured read denial of service attack against starttls -+ -+See the full announcement and links to mitigation, tests and fixes -+here: -+https://www.redhat.com/archives/libguestfs/2021-August/msg00083.html -+ - =head1 SEE ALSO - - L. -@@ -38,4 +45,4 @@ Richard W.M. Jones - - =head1 COPYRIGHT - --Copyright (C) 2013-2020 Red Hat Inc. -+Copyright (C) 2013-2021 Red Hat Inc. -diff --git a/server/protocol-handshake-newstyle.c b/server/protocol-handshake-newstyle.c -index 0a76a814..b94950e2 100644 ---- a/server/protocol-handshake-newstyle.c -+++ b/server/protocol-handshake-newstyle.c -@@ -495,7 +495,8 @@ negotiate_handshake_newstyle_options (void) - return -1; - conn->using_tls = true; - debug ("using TLS on this connection"); -- /* Wipe out any cached default export name. */ -+ /* Wipe out any cached state. */ -+ conn->structured_replies = false; - for_each_backend (b) { - struct handle *h = get_handle (conn, b->i); - free (h->default_exportname); --- -2.31.1 - diff --git a/SOURCES/0003-server-reset-meta-context-replies-on-starttls.patch b/SOURCES/0003-server-reset-meta-context-replies-on-starttls.patch deleted file mode 100644 index 4ab0de0..0000000 --- a/SOURCES/0003-server-reset-meta-context-replies-on-starttls.patch +++ /dev/null @@ -1,40 +0,0 @@ -From add9b794b9dc697a1b52115c997fcfb6e06bf64c Mon Sep 17 00:00:00 2001 -From: Eric Blake -Date: Mon, 16 Aug 2021 13:43:29 -0500 -Subject: [PATCH] server: reset meta context replies on starttls - -Related to CVE-2021-3716, but not as severe. No compliant client will -send NBD_CMD_BLOCK_STATUS unless it first negotiates -NBD_OPT_SET_META_CONTEXT. If an attacker injects a premature -SET_META_CONTEXT, either the client will never notice (because it -never uses BLOCK_STATUS), or the client will overwrite the attacker's -attempt with the client's own SET_META_CONTEXT request after -encryption is enabled. So I don't class this as having the potential -to trigger denial-of-service due to any protocol mismatch between -compliant client and server (I don't care what happens with -non-compliant clients). - -Fixes: 26455d45 (server: protocol: Implement Block Status "base:allocation".) -(cherry picked from commit 6c5faac6a37077cf2366388a80862bb00616d0d8) -(cherry picked from commit 814d8103fb4b581dc01dfd25d2cd81596576f211) ---- - server/protocol-handshake-newstyle.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/server/protocol-handshake-newstyle.c b/server/protocol-handshake-newstyle.c -index b94950e2..eb0f3961 100644 ---- a/server/protocol-handshake-newstyle.c -+++ b/server/protocol-handshake-newstyle.c -@@ -497,6 +497,9 @@ negotiate_handshake_newstyle_options (void) - debug ("using TLS on this connection"); - /* Wipe out any cached state. */ - conn->structured_replies = false; -+ free (conn->exportname_from_set_meta_context); -+ conn->exportname_from_set_meta_context = NULL; -+ conn->meta_context_base_allocation = false; - for_each_backend (b) { - struct handle *h = get_handle (conn, b->i); - free (h->default_exportname); --- -2.31.1 - diff --git a/SOURCES/0004-cow-Fix-for-qemu-6.1-which-requires-backing-format.patch b/SOURCES/0004-cow-Fix-for-qemu-6.1-which-requires-backing-format.patch deleted file mode 100644 index eb7e88e..0000000 --- a/SOURCES/0004-cow-Fix-for-qemu-6.1-which-requires-backing-format.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 3c2879a38c299b725091cea45329879e3f46fc99 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Tue, 31 Aug 2021 11:23:27 +0100 -Subject: [PATCH] cow: Fix for qemu 6.1 which requires backing format - -The diffing example in the manual created a qcow2 file with a backing -file but did not specify the backing format. However qemu 6.1 now -requires this and fails with: - - qemu-img: cow-diff.qcow2: Backing file specified without backing format - -or: - - qemu-img: Could not change the backing file to 'cow-base.img': backing format must be specified - -Fix the example by adding the -F option to the command line. - -Also there was a test of this rebasing sequence which failed, so this -commit updates the test too. - -(cherry picked from commit 618290ef33ce13b75c1a79fea1f1ffb327b5ba07) ---- - filters/cow/nbdkit-cow-filter.pod | 4 ++-- - tests/test-cow.sh | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/filters/cow/nbdkit-cow-filter.pod b/filters/cow/nbdkit-cow-filter.pod -index 4d5ae856..510bdd40 100644 ---- a/filters/cow/nbdkit-cow-filter.pod -+++ b/filters/cow/nbdkit-cow-filter.pod -@@ -101,8 +101,8 @@ At the end, disconnect the client. - Run these C commands to construct a qcow2 file containing - the differences: - -- qemu-img create -f qcow2 -b nbd:localhost diff.qcow2 -- qemu-img rebase -b disk.img diff.qcow2 -+ qemu-img create -F raw -b nbd:localhost -f qcow2 diff.qcow2 -+ qemu-img rebase -F raw -b disk.img -f qcow2 diff.qcow2 - - F now contains the differences between the base - (F) and the changes stored in nbdkit-cow-filter. C -diff --git a/tests/test-cow.sh b/tests/test-cow.sh -index 8772afd7..edc4c223 100755 ---- a/tests/test-cow.sh -+++ b/tests/test-cow.sh -@@ -72,8 +72,8 @@ fi - # If we have qemu-img, try the hairy rebase operation documented - # in the nbdkit-cow-filter manual. - if qemu-img --version >/dev/null 2>&1; then -- qemu-img create -f qcow2 -b nbd:unix:$sock cow-diff.qcow2 -- time qemu-img rebase -b cow-base.img cow-diff.qcow2 -+ qemu-img create -F raw -b nbd:unix:$sock -f qcow2 cow-diff.qcow2 -+ time qemu-img rebase -F raw -b cow-base.img -f qcow2 cow-diff.qcow2 - qemu-img info cow-diff.qcow2 - - # This checks the file we created exists. --- -2.31.1 - diff --git a/SOURCES/0005-vddk-Include-VDDK-major-library-version-in-dump-plug.patch b/SOURCES/0005-vddk-Include-VDDK-major-library-version-in-dump-plug.patch deleted file mode 100644 index baa47a0..0000000 --- a/SOURCES/0005-vddk-Include-VDDK-major-library-version-in-dump-plug.patch +++ /dev/null @@ -1,141 +0,0 @@ -From 9e20e2696fdb68008c9b4f1c36298f813320e381 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Sat, 23 Oct 2021 16:16:39 +0100 -Subject: [PATCH] vddk: Include VDDK major library version in --dump-plugin - output - -Although it doesn't seem to be possible to get the precise VDDK -version, With a relatively simple change we can at least return the -VDDK major version. Currently this can be 5, 6 or 7. - -(cherry picked from commit 8700649d147948897f3b97810a1dff37924bdd6e) ---- - plugins/vddk/nbdkit-vddk-plugin.pod | 4 ++++ - plugins/vddk/vddk.c | 29 +++++++++++++++++++---------- - tests/test-vddk-real-dump-plugin.sh | 2 ++ - 3 files changed, 25 insertions(+), 10 deletions(-) - -diff --git a/plugins/vddk/nbdkit-vddk-plugin.pod b/plugins/vddk/nbdkit-vddk-plugin.pod -index 8b14eda0..822b96be 100644 ---- a/plugins/vddk/nbdkit-vddk-plugin.pod -+++ b/plugins/vddk/nbdkit-vddk-plugin.pod -@@ -417,6 +417,10 @@ at runtime. - If this is printed then the C parameter is supported - by this build. - -+=item C -+ -+The VDDK major library version: 5, 6, 7, ... -+ - =item C - - Prints the full path to the VDDK shared library. Since this requires -diff --git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c -index 69193504..291283f4 100644 ---- a/plugins/vddk/vddk.c -+++ b/plugins/vddk/vddk.c -@@ -77,6 +77,7 @@ int vddk_debug_datapath = 1; - static void *dl; /* dlopen handle */ - static bool init_called; /* was InitEx called */ - static __thread int error_suppression; /* threadlocal error suppression */ -+static int library_version; /* VDDK major: 5, 6, 7, ... */ - - static enum { NONE = 0, ZLIB, FASTLZ, SKIPZ } compression; /* compression */ - static char *config; /* config */ -@@ -297,7 +298,10 @@ vddk_config (const char *key, const char *value) - static void - load_library (bool load_error_is_fatal) - { -- static const char *sonames[] = { -+ static struct { -+ const char *soname; -+ int library_version; -+ } libs[] = { - /* Prefer the newest library in case multiple exist. Check two - * possible directories: the usual VDDK installation puts .so - * files in an arch-specific subdirectory of $libdir (our minimum -@@ -305,12 +309,13 @@ load_library (bool load_error_is_fatal) - * but our testsuite is easier to write if we point libdir - * directly to a stub .so. - */ -- "lib64/libvixDiskLib.so.7", -- "libvixDiskLib.so.7", -- "lib64/libvixDiskLib.so.6", -- "libvixDiskLib.so.6", -- "lib64/libvixDiskLib.so.5", -- "libvixDiskLib.so.5", -+ { "lib64/libvixDiskLib.so.7", 7 }, -+ { "libvixDiskLib.so.7", 7 }, -+ { "lib64/libvixDiskLib.so.6", 6 }, -+ { "libvixDiskLib.so.6", 6 }, -+ { "lib64/libvixDiskLib.so.5", 5 }, -+ { "libvixDiskLib.so.5", 5 }, -+ { NULL } - }; - size_t i; - CLEANUP_FREE char *orig_error = NULL; -@@ -323,19 +328,20 @@ load_library (bool load_error_is_fatal) - } - } - -- for (i = 0; i < sizeof sonames / sizeof sonames[0]; ++i) { -+ for (i = 0; libs[i].soname != NULL; ++i) { - CLEANUP_FREE char *path; - - /* Set the full path so that dlopen will preferentially load the - * system libraries from the same directory. - */ -- if (asprintf (&path, "%s/%s", libdir, sonames[i]) == -1) { -+ if (asprintf (&path, "%s/%s", libdir, libs[i].soname) == -1) { - nbdkit_error ("asprintf: %m"); - exit (EXIT_FAILURE); - } - - dl = dlopen (path, RTLD_NOW); - if (dl != NULL) { -+ library_version = libs[i].library_version; - /* Now that we found the library, ensure that LD_LIBRARY_PATH - * includes its directory for all future loads. This may modify - * path in-place and/or re-exec nbdkit, but that's okay. -@@ -356,10 +362,12 @@ load_library (bool load_error_is_fatal) - "If '%s' is located on a non-standard path you may need to\n" - "set libdir=/path/to/vmware-vix-disklib-distrib.\n\n" - "See nbdkit-vddk-plugin(1) man page section \"LIBRARY LOCATION\" for details.", -- orig_error ? : "(unknown error)", sonames[0]); -+ orig_error ? : "(unknown error)", libs[0].soname); - exit (EXIT_FAILURE); - } - -+ assert (library_version >= 5); -+ - /* Load symbols. */ - #define STUB(fn,ret,args) \ - do { \ -@@ -474,6 +482,7 @@ vddk_dump_plugin (void) - - printf ("vddk_default_libdir=%s\n", VDDK_LIBDIR); - printf ("vddk_has_nfchostport=1\n"); -+ printf ("vddk_library_version=%d\n", library_version); - - #if defined(HAVE_DLADDR) - /* It would be nice to print the version of VDDK from the shared -diff --git a/tests/test-vddk-real-dump-plugin.sh b/tests/test-vddk-real-dump-plugin.sh -index 1479e416..59c79693 100755 ---- a/tests/test-vddk-real-dump-plugin.sh -+++ b/tests/test-vddk-real-dump-plugin.sh -@@ -51,10 +51,12 @@ rm -f $files - cleanup_fn rm -f $files - - nbdkit -f -v vddk libdir="$vddkdir" --dump-plugin > $out -+cat $out - - # Check the vddk_* entries are set. - grep ^vddk_default_libdir= $out - grep ^vddk_has_nfchostport= $out -+grep ^vddk_library_version= $out - grep ^vddk_dll= $out - - dll="$(grep ^vddk_dll $out | cut -d= -f2)" --- -2.31.1 - diff --git a/SOURCES/0006-vddk-Only-print-vddk_library_version-when-we-managed.patch b/SOURCES/0006-vddk-Only-print-vddk_library_version-when-we-managed.patch deleted file mode 100644 index 9f14c8d..0000000 --- a/SOURCES/0006-vddk-Only-print-vddk_library_version-when-we-managed.patch +++ /dev/null @@ -1,55 +0,0 @@ -From b8b376cf39d97c9f523a9867612126088b43c523 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Sat, 23 Oct 2021 19:50:52 +0100 -Subject: [PATCH] vddk: Only print vddk_library_version when we managed to load - the library - -Because --dump-plugin calls load_library (false) it won't fail if we -didn't manage to load the library. This results in library_version -being 0, which we printed incorrectly. - -Resolve this problem by not printing the vddk_library_version entry in -this case. - -Fixes: commit 8700649d147948897f3b97810a1dff37924bdd6e -(cherry picked from commit a3fba12c3e9c2113009f556360ae0bd04c45f6bb) ---- - plugins/vddk/nbdkit-vddk-plugin.pod | 1 + - plugins/vddk/vddk.c | 9 ++++++++- - 2 files changed, 9 insertions(+), 1 deletion(-) - -diff --git a/plugins/vddk/nbdkit-vddk-plugin.pod b/plugins/vddk/nbdkit-vddk-plugin.pod -index 822b96be..c56faddc 100644 ---- a/plugins/vddk/nbdkit-vddk-plugin.pod -+++ b/plugins/vddk/nbdkit-vddk-plugin.pod -@@ -420,6 +420,7 @@ by this build. - =item C - - The VDDK major library version: 5, 6, 7, ... -+If this is omitted it means the library could not be loaded. - - =item C - -diff --git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c -index 291283f4..96615749 100644 ---- a/plugins/vddk/vddk.c -+++ b/plugins/vddk/vddk.c -@@ -482,7 +482,14 @@ vddk_dump_plugin (void) - - printf ("vddk_default_libdir=%s\n", VDDK_LIBDIR); - printf ("vddk_has_nfchostport=1\n"); -- printf ("vddk_library_version=%d\n", library_version); -+ -+ /* Because load_library (false) we might not have loaded VDDK, in -+ * which case we didn't set library_version. Note this cannot -+ * happen in the normal (non-debug-plugin) path because there we use -+ * load_library (true). -+ */ -+ if (library_version > 0) -+ printf ("vddk_library_version=%d\n", library_version); - - #if defined(HAVE_DLADDR) - /* It would be nice to print the version of VDDK from the shared --- -2.31.1 - diff --git a/SOURCES/0007-vddk-Add-support-for-VDDK-8.0.0.patch b/SOURCES/0007-vddk-Add-support-for-VDDK-8.0.0.patch deleted file mode 100644 index 12150c2..0000000 --- a/SOURCES/0007-vddk-Add-support-for-VDDK-8.0.0.patch +++ /dev/null @@ -1,53 +0,0 @@ -From e850f65053d89ad54c27280f48506da5eb631a68 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Fri, 18 Nov 2022 09:43:19 +0000 -Subject: [PATCH] vddk: Add support for VDDK 8.0.0 - -There are no changes in any of the structures or enums that we rely on. - -Reported-by: Ming Xie -Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2143889 -(cherry picked from commit dbe12ed499baeea94d603db55cad9e971e0ebcf0) ---- - plugins/vddk/nbdkit-vddk-plugin.pod | 2 +- - plugins/vddk/vddk.c | 4 +++- - 2 files changed, 4 insertions(+), 2 deletions(-) - -diff --git a/plugins/vddk/nbdkit-vddk-plugin.pod b/plugins/vddk/nbdkit-vddk-plugin.pod -index c56faddc..c94c41eb 100644 ---- a/plugins/vddk/nbdkit-vddk-plugin.pod -+++ b/plugins/vddk/nbdkit-vddk-plugin.pod -@@ -419,7 +419,7 @@ by this build. - - =item C - --The VDDK major library version: 5, 6, 7, ... -+The VDDK major library version: 5, 6, 7, 8, ... - If this is omitted it means the library could not be loaded. - - =item C -diff --git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c -index 96615749..2140789a 100644 ---- a/plugins/vddk/vddk.c -+++ b/plugins/vddk/vddk.c -@@ -77,7 +77,7 @@ int vddk_debug_datapath = 1; - static void *dl; /* dlopen handle */ - static bool init_called; /* was InitEx called */ - static __thread int error_suppression; /* threadlocal error suppression */ --static int library_version; /* VDDK major: 5, 6, 7, ... */ -+static int library_version; /* VDDK major: 5, 6, 7, 8, ... */ - - static enum { NONE = 0, ZLIB, FASTLZ, SKIPZ } compression; /* compression */ - static char *config; /* config */ -@@ -309,6 +309,8 @@ load_library (bool load_error_is_fatal) - * but our testsuite is easier to write if we point libdir - * directly to a stub .so. - */ -+ { "lib64/libvixDiskLib.so.8", 8 }, -+ { "libvixDiskLib.so.8", 8 }, - { "lib64/libvixDiskLib.so.7", 7 }, - { "libvixDiskLib.so.7", 7 }, - { "lib64/libvixDiskLib.so.6", 6 }, --- -2.31.1 - diff --git a/SOURCES/nbdkit-1.24.0.tar.gz.sig b/SOURCES/nbdkit-1.24.0.tar.gz.sig deleted file mode 100644 index 14ff4e8..0000000 --- a/SOURCES/nbdkit-1.24.0.tar.gz.sig +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQJFBAABCAAvFiEE93dPsa0HSn6Mh2fqkXOPc+G3aKAFAl/3RBgRHHJpY2hAYW5u -ZXhpYS5vcmcACgkQkXOPc+G3aKBIIRAAmgoGrmJ8aYO7z+kKgNFjd/p0QxRTZhS/ -ol59ojG6jIzN2x/C2PFbRmPB6HJTEg4anrDX04WrP6R+lID1RrH9pTFQabv0YDQC -z49oeXAqINYHvAqgFUJCwlymd7BHEYUudLlK3yu7gQKxMM+J/2v0glpxrtLM7KlD -vvSZkVfbvHlCWIbMWLWIaRHeoWZIXNOjsAp3uEWN2YgikDoxbXVKoh07JoQx5tJ5 -2U+a/zo4BQuRspjnhmWc252ZF/8d954/L8J+2mKvbRRf2iAmsqPgS+MNi7WKWO4K -w7/urKn0osuOaArs5xYHJnApmJ9U88CzZpoHQkYhcGgnDOipW9ByJRzT41vVQPW5 -IluQODpZUuawWtRIwV/Eoi+LaV2gINAL48Afr02UFYj4gmYQ5TeayLP7NKRQO0VL -jwL4Z3a0cDyUX4i1OArn2ll8THfiog38HfLb70AG1l3P1BVoVVBYWCYbs4xgC9IK -LWkjPKuGXvkGVfZi0nCGdPTOoB1CqCXUvKHXm52FCHg12uJMrBQEivodBoCTbtl0 -fSjULQcfrovUEb4d/rDAX7EgJbFS+1jDnodaFHsmNToo3CqfkMBdhLkxG3XExwjy -OOR34wZssjTLsLlWH/RPucWD25RDy1vdPBska9QvvO7W0p+aOtFbnttkTh5cqs45 -rHg/sDEiaLA= -=OrsS ------END PGP SIGNATURE----- diff --git a/SPECS/nbdkit.spec b/SPECS/nbdkit.spec deleted file mode 100644 index 9a4ac4e..0000000 --- a/SPECS/nbdkit.spec +++ /dev/null @@ -1,1576 +0,0 @@ -%global _hardened_build 1 - -%ifarch aarch64 %{arm} x86_64 ppc %{power64} -%global have_libguestfs 1 -%endif - -# We can only compile the OCaml plugin on platforms which have native -# OCaml support (not bytecode). -%ifarch %{ocaml_native_compiler} -%global have_ocaml 1 -%endif - -# Architectures where the complete test suite must pass. -# -# On all other architectures, a simpler test suite must pass. This -# omits any tests that run full qemu, since running qemu under TCG is -# often broken on non-x86_64 arches. -%global complete_test_arches x86_64 - -# If the test suite is broken on a particular architecture, document -# it as a bug and add it to this list. -%global broken_test_arches NONE - -%if 0%{?rhel} == 7 -# On RHEL 7, nothing in the virt stack is shipped on aarch64 and -# libguestfs was not shipped on POWER (fixed in 7.5). We could in -# theory make all of this work by having lots more conditionals, but -# for now limit this package to x86_64 on RHEL. -ExclusiveArch: x86_64 -%endif - -# If we should verify tarball signature with GPGv2. -%global verify_tarball_signature 1 - -# If there are patches which touch autotools files, set this to 1. -%global patches_touch_autotools %{nil} - -# The source directory. -%global source_directory 1.24-stable - -Name: nbdkit -Version: 1.24.0 -Release: 5%{?dist} -Summary: NBD server - -License: BSD -URL: https://github.com/libguestfs/nbdkit - -%if 0%{?rhel} >= 8 -# On RHEL 8+, we cannot build the package on i686 (no virt stack). -ExcludeArch: i686 -%endif - -Source0: http://libguestfs.org/download/nbdkit/%{source_directory}/%{name}-%{version}.tar.gz -%if 0%{verify_tarball_signature} -Source1: http://libguestfs.org/download/nbdkit/%{source_directory}/%{name}-%{version}.tar.gz.sig -# Keyring used to verify tarball signature. -Source2: libguestfs.keyring -%endif - -# Maintainer script which helps with handling patches. -Source3: copy-patches.sh - -# Patches come from this upstream branch: -# https://github.com/libguestfs/nbdkit/tree/rhel-8.6 - -# Patches. -Patch0001: 0001-cache-cow-Fix-data-corruption-in-zero-and-trim-on-un.patch -Patch0002: 0002-server-CVE-2021-3716-reset-structured-replies-on-sta.patch -Patch0003: 0003-server-reset-meta-context-replies-on-starttls.patch -Patch0004: 0004-cow-Fix-for-qemu-6.1-which-requires-backing-format.patch -Patch0005: 0005-vddk-Include-VDDK-major-library-version-in-dump-plug.patch -Patch0006: 0006-vddk-Only-print-vddk_library_version-when-we-managed.patch -Patch0007: 0007-vddk-Add-support-for-VDDK-8.0.0.patch - -%if 0%{patches_touch_autotools} -BuildRequires: autoconf, automake, libtool -%endif - -%ifnarch %{complete_test_arches} -BuildRequires: autoconf, automake, libtool -%endif -BuildRequires: gcc, gcc-c++ -BuildRequires: /usr/bin/pod2man -BuildRequires: gnutls-devel -BuildRequires: libselinux-devel -%if !0%{?rhel} && 0%{?have_libguestfs} -BuildRequires: libguestfs-devel -%endif -BuildRequires: libvirt-devel -BuildRequires: xz-devel -BuildRequires: zlib-devel -BuildRequires: libzstd-devel -BuildRequires: libcurl-devel -BuildRequires: libnbd-devel >= 1.3.11 -BuildRequires: libssh-devel -BuildRequires: e2fsprogs, e2fsprogs-devel -%if !0%{?rhel} -BuildRequires: genisoimage -BuildRequires: rb_libtorrent-devel -%endif -BuildRequires: bash-completion -BuildRequires: perl-devel -BuildRequires: perl(ExtUtils::Embed) -%if !0%{?rhel} -BuildRequires: python3-devel -%else -BuildRequires: platform-python-devel -%endif -%if !0%{?rhel} -%if 0%{?have_ocaml} -# Requires OCaml 4.02.2 which contains fix for -# http://caml.inria.fr/mantis/view.php?id=6693 -BuildRequires: ocaml >= 4.02.2 -BuildRequires: ocaml-ocamldoc -%endif -BuildRequires: ruby-devel -BuildRequires: tcl-devel -BuildRequires: lua-devel -%endif -%if 0%{verify_tarball_signature} -BuildRequires: gnupg2 -%endif - -# Only for running the test suite: -BuildRequires: %{_bindir}/bc -BuildRequires: %{_bindir}/certtool -BuildRequires: %{_bindir}/cut -BuildRequires: expect -BuildRequires: %{_bindir}/hexdump -BuildRequires: %{_sbindir}/ip -BuildRequires: jq -BuildRequires: %{_bindir}/nbdcopy -BuildRequires: %{_bindir}/nbdinfo -BuildRequires: %{_bindir}/nbdsh -BuildRequires: %{_bindir}/qemu-img -BuildRequires: %{_bindir}/qemu-io -BuildRequires: %{_bindir}/qemu-nbd -BuildRequires: %{_sbindir}/sfdisk -BuildRequires: %{_bindir}/socat -BuildRequires: %{_sbindir}/ss -BuildRequires: %{_bindir}/stat -BuildRequires: %{_bindir}/ssh-keygen - -# nbdkit is a metapackage pulling the server and a useful subset -# of the plugins and filters. -Requires: nbdkit-server%{?_isa} = %{version}-%{release} -Requires: nbdkit-basic-plugins%{?_isa} = %{version}-%{release} -Requires: nbdkit-basic-filters%{?_isa} = %{version}-%{release} - - -%description -NBD is a protocol for accessing block devices (hard disks and -disk-like things) over the network. - -nbdkit is a toolkit for creating NBD servers. - -The key features are: - -* Multithreaded NBD server written in C with good performance. - -* Minimal dependencies for the basic server. - -* Liberal license (BSD) allows nbdkit to be linked to proprietary - libraries or included in proprietary code. - -* Well-documented, simple plugin API with a stable ABI guarantee. - Lets you to export "unconventional" block devices easily. - -* You can write plugins in C or many other languages. - -* Filters can be stacked in front of plugins to transform the output. - -'%{name}' is a meta-package which pulls in the core server and a -useful subset of plugins and filters with minimal dependencies. - -If you want just the server, install '%{name}-server'. - -To develop plugins, install the '%{name}-devel' package and start by -reading the nbdkit(1) and nbdkit-plugin(3) manual pages. - - -%package server -Summary: The %{name} server -License: BSD - - -%description server -This package contains the %{name} server with no plugins or filters. - - -%package basic-plugins -Summary: Basic plugins for %{name} -License: BSD - -Requires: %{name}-server%{?_isa} = %{version}-%{release} -Provides: %{name}-data-plugin = %{version}-%{release} -Provides: %{name}-eval-plugin = %{version}-%{release} -Provides: %{name}-file-plugin = %{version}-%{release} -Provides: %{name}-floppy-plugin = %{version}-%{release} -Provides: %{name}-full-plugin = %{version}-%{release} -Provides: %{name}-info-plugin = %{version}-%{release} -Provides: %{name}-memory-plugin = %{version}-%{release} -Provides: %{name}-null-plugin = %{version}-%{release} -Provides: %{name}-ondemand-plugin = %{version}-%{release} -Provides: %{name}-pattern-plugin = %{version}-%{release} -Provides: %{name}-partitioning-plugin = %{version}-%{release} -Provides: %{name}-random-plugin = %{version}-%{release} -Provides: %{name}-sh-plugin = %{version}-%{release} -Provides: %{name}-sparse-random-plugin = %{version}-%{release} -Provides: %{name}-split-plugin = %{version}-%{release} -Provides: %{name}-streaming-plugin = %{version}-%{release} -Provides: %{name}-zero-plugin = %{version}-%{release} - - -%description basic-plugins -This package contains plugins for %{name} which only depend on simple -C libraries: glibc, gnutls, libzstd. Other plugins for nbdkit with -more complex dependencies are packaged separately. - -nbdkit-data-plugin Serve small amounts of data from the command line. - -nbdkit-eval-plugin Write a shell script plugin on the command line. - -nbdkit-file-plugin The normal file plugin for serving files. - -nbdkit-floppy-plugin Create a virtual floppy disk from a directory. - -nbdkit-full-plugin A virtual disk that returns ENOSPC errors. - -nbdkit-info-plugin Serve client and server information. - -nbdkit-memory-plugin A virtual memory plugin. - -nbdkit-null-plugin A null (bitbucket) plugin. - -nbdkit-ondemand-plugin Create filesystems on demand. - -nbdkit-pattern-plugin Fixed test pattern. - -nbdkit-partitioning-plugin Create virtual disks from partitions. - -nbdkit-random-plugin Random content plugin for testing. - -nbdkit-sh-plugin Write plugins as shell scripts or executables. - -nbdkit-sparse-random-plugin Make sparse random disks. - -nbdkit-split-plugin Concatenate one or more files. - -nbdkit-streaming-plugin A streaming file serving plugin. - -nbdkit-zero-plugin Zero-length plugin for testing. - - -%package example-plugins -Summary: Example plugins for %{name} -License: BSD - -Requires: %{name}-server%{?_isa} = %{version}-%{release} -%if !0%{?rhel} -# example4 is written in Perl. -Requires: %{name}-perl-plugin -%endif - - -%description example-plugins -This package contains example plugins for %{name}. - - -# The plugins below have non-trivial dependencies are so are -# packaged separately. - -%if !0%{?rhel} -%package cc-plugin -Summary: Write small inline C plugins and scripts for %{name} -License: BSD - -Requires: %{name}-server%{?_isa} = %{version}-%{release} -Requires: gcc -Requires: %{_bindir}/cat - - -%description cc-plugin -This package contains support for writing inline C plugins and scripts -for %{name}. NOTE this is NOT the right package for writing plugins -in C, install %{name}-devel for that. -%endif - - -%if !0%{?rhel} -%package cdi-plugin -Summary: Containerized Data Import plugin for %{name} -License: BSD - -Requires: %{name}-server%{?_isa} = %{version}-%{release} -Requires: jq -Requires: podman - - -%description cdi-plugin -This package contains Containerized Data Import support for %{name}. -%endif - - -%package curl-plugin -Summary: HTTP/FTP (cURL) plugin for %{name} -License: BSD - -Requires: %{name}-server%{?_isa} = %{version}-%{release} - - -%description curl-plugin -This package contains cURL (HTTP/FTP) support for %{name}. - - -%if !0%{?rhel} && 0%{?have_libguestfs} -%package guestfs-plugin -Summary: libguestfs plugin for %{name} -License: BSD - -Requires: %{name}-server%{?_isa} = %{version}-%{release} - - -%description guestfs-plugin -This package is a libguestfs plugin for %{name}. -%endif - - -%if 0%{?rhel} == 8 -%package gzip-plugin -Summary: GZip plugin for %{name} -License: BSD - -Requires: %{name}-server%{?_isa} = %{version}-%{release} - - -%description gzip-plugin -This package is a gzip plugin for %{name}. -%endif - - -%if !0%{?rhel} -%package iso-plugin -Summary: Virtual ISO 9660 plugin for %{name} -License: BSD - -Requires: %{name}-server%{?_isa} = %{version}-%{release} -Requires: genisoimage - - -%description iso-plugin -This package is a virtual ISO 9660 (CD-ROM) plugin for %{name}. -%endif - - -%if !0%{?rhel} -%package libvirt-plugin -Summary: Libvirt plugin for %{name} -License: BSD - -Requires: %{name}-server%{?_isa} = %{version}-%{release} - - -%description libvirt-plugin -This package is a libvirt plugin for %{name}. It lets you access -libvirt guest disks readonly. It is implemented using the libvirt -virDomainBlockPeek API. -%endif - - -%package linuxdisk-plugin -Summary: Virtual Linux disk plugin for %{name} -License: BSD - -Requires: %{name}-server%{?_isa} = %{version}-%{release} -# for mke2fs -Requires: e2fsprogs - - -%description linuxdisk-plugin -This package is a virtual Linux disk plugin for %{name}. - - -%if !0%{?rhel} -%package lua-plugin -Summary: Lua plugin for %{name} -License: BSD - -Requires: %{name}-server%{?_isa} = %{version}-%{release} - - -%description lua-plugin -This package lets you write Lua plugins for %{name}. -%endif - - -%package nbd-plugin -Summary: NBD proxy / forward plugin for %{name} -License: BSD - -Requires: %{name}-server%{?_isa} = %{version}-%{release} - - -%description nbd-plugin -This package lets you forward NBD connections from %{name} -to another NBD server. - - -%if !0%{?rhel} && 0%{?have_ocaml} -%package ocaml-plugin -Summary: OCaml plugin for %{name} -License: BSD - -Requires: %{name}-server%{?_isa} = %{version}-%{release} - - -%description ocaml-plugin -This package lets you run OCaml plugins for %{name}. - -To compile OCaml plugins you will also need to install -%{name}-ocaml-plugin-devel. - - -%package ocaml-plugin-devel -Summary: OCaml development environment for %{name} -License: BSD - -Requires: %{name}-server%{?_isa} = %{version}-%{release} -Requires: %{name}-ocaml-plugin%{?_isa} = %{version}-%{release} - - -%description ocaml-plugin-devel -This package lets you write OCaml plugins for %{name}. -%endif - - -%if !0%{?rhel} -%package perl-plugin -Summary: Perl plugin for %{name} -License: BSD - -Requires: %{name}-server%{?_isa} = %{version}-%{release} - - -%description perl-plugin -This package lets you write Perl plugins for %{name}. -%endif - - -%package python-plugin -Summary: Python 3 plugin for %{name} -License: BSD - -Requires: %{name}-server%{?_isa} = %{version}-%{release} - - -%description python-plugin -This package lets you write Python 3 plugins for %{name}. - - -%if !0%{?rhel} -%package ruby-plugin -Summary: Ruby plugin for %{name} -License: BSD - -Requires: %{name}-server%{?_isa} = %{version}-%{release} - - -%description ruby-plugin -This package lets you write Ruby plugins for %{name}. -%endif - - -%package ssh-plugin -Summary: SSH plugin for %{name} -License: BSD - -Requires: %{name}-server%{?_isa} = %{version}-%{release} - - -%description ssh-plugin -This package contains SSH support for %{name}. - - -%package tar-plugin -Summary: Tar archive plugin for %{name} -License: BSD - -Requires: %{name}-server%{?_isa} = %{version}-%{release} -Requires: tar - - -%description tar-plugin -This package is a tar archive plugin for %{name}. - - -%if !0%{?rhel} -%package tcl-plugin -Summary: Tcl plugin for %{name} -License: BSD - -Requires: %{name}-server%{?_isa} = %{version}-%{release} - - -%description tcl-plugin -This package lets you write Tcl plugins for %{name}. -%endif - - -%package tmpdisk-plugin -Summary: Remote temporary filesystem disk plugin for %{name} -License: BSD - -Requires: %{name}-server%{?_isa} = %{version}-%{release} -# For mkfs and mke2fs (defaults). -Requires: util-linux, e2fsprogs -# For other filesystems. -Suggests: xfsprogs -%if !0%{?rhel} -Suggests: ntfsprogs, dosfstools -%endif - - -%description tmpdisk-plugin -This package is a remote temporary filesystem disk plugin for %{name}. - - -%if !0%{?rhel} -%package torrent-plugin -Summary: BitTorrent plugin for %{name} -License: BSD - -Requires: %{name}-server%{?_isa} = %{version}-%{release} - - -%description torrent-plugin -This package is a BitTorrent plugin for %{name}. -%endif - - -%ifarch x86_64 -%package vddk-plugin -Summary: VMware VDDK plugin for %{name} -License: BSD - -Requires: %{name}-server%{?_isa} = %{version}-%{release} - - -%description vddk-plugin -This package is a plugin for %{name} which connects to -VMware VDDK for accessing VMware disks and servers. -%endif - - -%package basic-filters -Summary: Basic filters for %{name} -License: BSD - -Requires: %{name}-server%{?_isa} = %{version}-%{release} -Provides: %{name}-blocksize-filter = %{version}-%{release} -Provides: %{name}-cache-filter = %{version}-%{release} -Provides: %{name}-cacheextents-filter = %{version}-%{release} -Provides: %{name}-checkwrite-filter = %{version}-%{release} -Provides: %{name}-cow-filter = %{version}-%{release} -Provides: %{name}-ddrescue-filter = %{version}-%{release} -Provides: %{name}-delay-filter = %{version}-%{release} -Provides: %{name}-error-filter = %{version}-%{release} -Provides: %{name}-exitlast-filter = %{version}-%{release} -Provides: %{name}-exitwhen-filter = %{version}-%{release} -Provides: %{name}-exportname-filter = %{version}-%{release} -Provides: %{name}-extentlist-filter = %{version}-%{release} -Provides: %{name}-fua-filter = %{version}-%{release} -Provides: %{name}-ip-filter = %{version}-%{release} -Provides: %{name}-limit-filter = %{version}-%{release} -Provides: %{name}-log-filter = %{version}-%{release} -Provides: %{name}-nocache-filter = %{version}-%{release} -Provides: %{name}-noextents-filter = %{version}-%{release} -Provides: %{name}-nofilter-filter = %{version}-%{release} -Provides: %{name}-noparallel-filter = %{version}-%{release} -Provides: %{name}-nozero-filter = %{version}-%{release} -Provides: %{name}-offset-filter = %{version}-%{release} -Provides: %{name}-partition-filter = %{version}-%{release} -Provides: %{name}-pause-filter = %{version}-%{release} -Provides: %{name}-rate-filter = %{version}-%{release} -Provides: %{name}-readahead-filter = %{version}-%{release} -Provides: %{name}-retry-filter = %{version}-%{release} -Provides: %{name}-stats-filter = %{version}-%{release} -Provides: %{name}-swab-filter = %{version}-%{release} -Provides: %{name}-tls-fallback-filter = %{version}-%{release} -Provides: %{name}-truncate-filter = %{version}-%{release} - - -%description basic-filters -This package contains filters for %{name} which only depend on simple -C libraries: glibc, gnutls. Other filters for nbdkit with more -complex dependencies are packaged separately. - -nbdkit-blocksize-filter Adjust block size of requests sent to plugins. - -nbdkit-cache-filter Server-side cache. - -nbdkit-cacheextents-filter Cache extents. - -nbdkit-checkwrite-filter Check writes match contents of plugin. - -nbdkit-cow-filter Copy-on-write overlay for read-only plugins. - -nbdkit-ddrescue-filter Filter for serving from ddrescue dump. - -nbdkit-delay-filter Inject read and write delays. - -nbdkit-error-filter Inject errors. - -nbdkit-exitlast-filter Exit on last client connection. - -nbdkit-exitwhen-filter Exit gracefully when an event occurs. - -nbdkit-exportname-filter Adjust export names between client and plugin. - -nbdkit-extentlist-filter Place extent list over a plugin. - -nbdkit-fua-filter Modify flush behaviour in plugins. - -nbdkit-ip-filter Filter clients by IP address. - -nbdkit-limit-filter Limit nr clients that can connect concurrently. - -nbdkit-log-filter Log all transactions to a file. - -nbdkit-nocache-filter Disable cache requests in the underlying plugin. - -nbdkit-noextents-filter Disable extents in the underlying plugin. - -nbdkit-nofilter-filter Passthrough filter. - -nbdkit-noparallel-filter Serialize requests to the underlying plugin. - -nbdkit-nozero-filter Adjust handling of zero requests by plugins. - -nbdkit-offset-filter Serve an offset and range. - -nbdkit-partition-filter Serve a single partition. - -nbdkit-pause-filter Pause NBD requests. - -nbdkit-rate-filter Limit bandwidth by connection or server. - -nbdkit-readahead-filter Prefetch data when reading sequentially. - -nbdkit-retry-filter Reopen connection on error. - -nbdkit-stats-filter Display statistics about operations. - -nbdkit-swab-filter Filter for swapping byte order. - -nbdkit-tls-fallback-filter TLS protection filter. - -nbdkit-truncate-filter Truncate, expand, round up or round down size. - - -%if !0%{?rhel} -%package ext2-filter -Summary: ext2, ext3 and ext4 filesystem support for %{name} -License: BSD - -Requires: %{name}-server%{?_isa} = %{version}-%{release} - -# Remove in Fedora 34: -Provides: %{name}-ext2-plugin = %{version}-%{release} -Obsoletes: %{name}-ext2-plugin <= %{version}-%{release} - - -%description ext2-filter -This package contains ext2, ext3 and ext4 filesystem support for -%{name}. -%endif - - -%package gzip-filter -Summary: GZip filter for %{name} -License: BSD - -Requires: %{name}-server%{?_isa} = %{version}-%{release} - - -%description gzip-filter -This package is a gzip filter for %{name}. - - -%package tar-filter -Summary: Tar archive filter for %{name} -License: BSD - -Requires: %{name}-server%{?_isa} = %{version}-%{release} -Requires: tar - - -%description tar-filter -This package is a tar archive filter for %{name}. - - -%package xz-filter -Summary: XZ filter for %{name} -License: BSD - -Requires: %{name}-server%{?_isa} = %{version}-%{release} - - -%description xz-filter -This package is the xz filter for %{name}. - - -%package devel -Summary: Development files and documentation for %{name} -License: BSD - -Requires: %{name}-server%{?_isa} = %{version}-%{release} -Requires: pkgconfig - - -%description devel -This package contains development files and documentation -for %{name}. Install this package if you want to develop -plugins 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} -tmphome="$(mktemp -d)" -gpgv2 --homedir "$tmphome" --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0} -%endif -%autosetup -p1 -%if 0%{patches_touch_autotools} -autoreconf -i -%endif - -%ifnarch %{complete_test_arches} -# Simplify the test suite so it doesn't require qemu. -sed -i -e 's/^LIBGUESTFS_TESTS/xLIBGUESTFS_TESTS/' tests/Makefile.am -sed -i -e '/^if HAVE_GUESTFISH/,/^endif HAVE_GUESTFISH/d' tests/Makefile.am -autoreconf -i -%endif - - -%build -# Golang bindings are not enabled in the build since they don't -# need to be. Most people would use them by copying the upstream -# package into their vendor/ directory. -# -# %%{__python3} expands to platform-python, so we don't depend on -# the python module (see RHBZ#1659159, RHBZ#1867964). -export PYTHON=%{__python3} -%configure \ - --with-extra='%{name}-%{version}-%{release}' \ - --disable-static \ - --disable-golang \ - --disable-rust \ -%if !0%{?rhel} && 0%{?have_ocaml} - --enable-ocaml \ -%else - --disable-ocaml \ -%endif -%if 0%{?rhel} - --disable-lua \ - --disable-perl \ - --disable-ruby \ - --disable-tcl \ - --without-ext2 \ - --without-iso \ - --without-libvirt \ -%endif -%if !0%{?rhel} && 0%{?have_libguestfs} - --with-libguestfs \ -%else - --without-libguestfs \ -%endif - --with-tls-priority=@NBDKIT,SYSTEM - -# Verify that it picked the correct version of Python -# to avoid RHBZ#1404631 happening again silently. -grep '^PYTHON_VERSION = 3' Makefile - -%make_build - - -%install -%make_install - -# Delete libtool crap. -find $RPM_BUILD_ROOT -name '*.la' -delete - -# If cargo happens to be installed on the machine then the -# rust plugin is built. Delete it if this happens. -rm -f $RPM_BUILD_ROOT%{_mandir}/man3/nbdkit-rust-plugin.3* - -%if 0%{?rhel} != 8 -# Remove the deprecated gzip plugin (use gzip filter instead). -rm $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/nbdkit-gzip-plugin.so -rm $RPM_BUILD_ROOT%{_mandir}/man1/nbdkit-gzip-plugin.1* -%endif - -%if 0%{?rhel} -# In RHEL, remove some plugins we cannot --disable. -for f in cc cdi torrent; do - rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/nbdkit-$f-plugin.so - rm -f $RPM_BUILD_ROOT%{_mandir}/man?/nbdkit-$f-plugin.* -done -rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/nbdkit-S3-plugin -rm -f $RPM_BUILD_ROOT%{_mandir}/man1/nbdkit-S3-plugin.1* -%endif - - -%check -%ifnarch %{broken_test_arches} -# Workaround for broken libvirt (RHBZ#1138604). -mkdir -p $HOME/.cache/libvirt - -# tests/test-captive.sh is racy especially on s390x. We need to -# rethink this test upstream. -truncate -s 0 tests/test-captive.sh - -%ifarch s390x -# Temporarily kill tests/test-cache-max-size.sh since it fails -# sometimes on s390x for unclear reasons. -truncate -s 0 tests/test-cache-max-size.sh -%endif - -# Temporarily kill test-nbd-tls.sh and test-nbd-tls-psk.sh -# https://www.redhat.com/archives/libguestfs/2020-March/msg00191.html -truncate -s 0 tests/test-nbd-tls.sh tests/test-nbd-tls-psk.sh - -# Kill tests/test-cc-ocaml.sh. Requires upstream fix (commit bce54e7df25). -truncate -s 0 tests/test-cc-ocaml.sh - -# Make sure we can see the debug messages (RHBZ#1230160). -export LIBGUESTFS_DEBUG=1 -export LIBGUESTFS_TRACE=1 - -%make_build check || { - cat tests/test-suite.log - exit 1 - } -%endif - - -%if 0%{?have_ocaml} -%ldconfig_scriptlets plugin-ocaml -%endif - - -%files -# metapackage so empty - - -%files server -%doc README -%license LICENSE -%{_sbindir}/nbdkit -%dir %{_libdir}/%{name} -%dir %{_libdir}/%{name}/plugins -%dir %{_libdir}/%{name}/filters -%{_mandir}/man1/nbdkit.1* -%{_mandir}/man1/nbdkit-captive.1* -%{_mandir}/man1/nbdkit-client.1* -%{_mandir}/man1/nbdkit-loop.1* -%{_mandir}/man1/nbdkit-probing.1* -%{_mandir}/man1/nbdkit-protocol.1* -%{_mandir}/man1/nbdkit-service.1* -%{_mandir}/man1/nbdkit-security.1* -%{_mandir}/man1/nbdkit-tls.1* - - -%files basic-plugins -%doc README -%license LICENSE -%{_libdir}/%{name}/plugins/nbdkit-data-plugin.so -%{_libdir}/%{name}/plugins/nbdkit-eval-plugin.so -%{_libdir}/%{name}/plugins/nbdkit-file-plugin.so -%{_libdir}/%{name}/plugins/nbdkit-floppy-plugin.so -%{_libdir}/%{name}/plugins/nbdkit-full-plugin.so -%{_libdir}/%{name}/plugins/nbdkit-info-plugin.so -%{_libdir}/%{name}/plugins/nbdkit-memory-plugin.so -%{_libdir}/%{name}/plugins/nbdkit-null-plugin.so -%{_libdir}/%{name}/plugins/nbdkit-ondemand-plugin.so -%{_libdir}/%{name}/plugins/nbdkit-partitioning-plugin.so -%{_libdir}/%{name}/plugins/nbdkit-pattern-plugin.so -%{_libdir}/%{name}/plugins/nbdkit-random-plugin.so -%{_libdir}/%{name}/plugins/nbdkit-sh-plugin.so -%{_libdir}/%{name}/plugins/nbdkit-sparse-random-plugin.so -%{_libdir}/%{name}/plugins/nbdkit-split-plugin.so -%{_libdir}/%{name}/plugins/nbdkit-streaming-plugin.so -%{_libdir}/%{name}/plugins/nbdkit-zero-plugin.so -%{_mandir}/man1/nbdkit-data-plugin.1* -%{_mandir}/man1/nbdkit-eval-plugin.1* -%{_mandir}/man1/nbdkit-file-plugin.1* -%{_mandir}/man1/nbdkit-floppy-plugin.1* -%{_mandir}/man1/nbdkit-full-plugin.1* -%{_mandir}/man1/nbdkit-info-plugin.1* -%{_mandir}/man1/nbdkit-memory-plugin.1* -%{_mandir}/man1/nbdkit-null-plugin.1* -%{_mandir}/man1/nbdkit-ondemand-plugin.1* -%{_mandir}/man1/nbdkit-partitioning-plugin.1* -%{_mandir}/man1/nbdkit-pattern-plugin.1* -%{_mandir}/man1/nbdkit-random-plugin.1* -%{_mandir}/man3/nbdkit-sh-plugin.3* -%{_mandir}/man1/nbdkit-sparse-random-plugin.1* -%{_mandir}/man1/nbdkit-split-plugin.1* -%{_mandir}/man1/nbdkit-streaming-plugin.1* -%{_mandir}/man1/nbdkit-zero-plugin.1* - - -%files example-plugins -%doc README -%license LICENSE -%{_libdir}/%{name}/plugins/nbdkit-example*-plugin.so -%if !0%{?rhel} -%{_libdir}/%{name}/plugins/nbdkit-example4-plugin -%endif -%{_mandir}/man1/nbdkit-example*-plugin.1* - - -%if !0%{?rhel} -%files cc-plugin -%doc README -%license LICENSE -%{_libdir}/%{name}/plugins/nbdkit-cc-plugin.so -%{_mandir}/man3/nbdkit-cc-plugin.3* -%endif - - -%if !0%{?rhel} -%files cdi-plugin -%doc README -%license LICENSE -%{_libdir}/%{name}/plugins/nbdkit-cdi-plugin.so -%{_mandir}/man1/nbdkit-cdi-plugin.1* -%endif - - -%files curl-plugin -%doc README -%license LICENSE -%{_libdir}/%{name}/plugins/nbdkit-curl-plugin.so -%{_mandir}/man1/nbdkit-curl-plugin.1* - - -%if !0%{?rhel} && 0%{?have_libguestfs} -%files guestfs-plugin -%doc README -%license LICENSE -%{_libdir}/%{name}/plugins/nbdkit-guestfs-plugin.so -%{_mandir}/man1/nbdkit-guestfs-plugin.1* -%endif - - -%if 0%{?rhel} == 8 -%files gzip-plugin -%doc README -%license LICENSE -%{_libdir}/%{name}/plugins/nbdkit-gzip-plugin.so -%{_mandir}/man1/nbdkit-gzip-plugin.1* -%endif - - -%if !0%{?rhel} -%files iso-plugin -%doc README -%license LICENSE -%{_libdir}/%{name}/plugins/nbdkit-iso-plugin.so -%{_mandir}/man1/nbdkit-iso-plugin.1* -%endif - - -%if !0%{?rhel} -%files libvirt-plugin -%doc README -%license LICENSE -%{_libdir}/%{name}/plugins/nbdkit-libvirt-plugin.so -%{_mandir}/man1/nbdkit-libvirt-plugin.1* -%endif - - -%files linuxdisk-plugin -%doc README -%license LICENSE -%{_libdir}/%{name}/plugins/nbdkit-linuxdisk-plugin.so -%{_mandir}/man1/nbdkit-linuxdisk-plugin.1* - - -%if !0%{?rhel} -%files lua-plugin -%doc README -%license LICENSE -%{_libdir}/%{name}/plugins/nbdkit-lua-plugin.so -%{_mandir}/man3/nbdkit-lua-plugin.3* -%endif - - -%files nbd-plugin -%doc README -%license LICENSE -%{_libdir}/%{name}/plugins/nbdkit-nbd-plugin.so -%{_mandir}/man1/nbdkit-nbd-plugin.1* - - -%if !0%{?rhel} && 0%{?have_ocaml} -%files ocaml-plugin -%doc README -%license LICENSE -%{_libdir}/libnbdkitocaml.so.* - -%files ocaml-plugin-devel -%{_libdir}/libnbdkitocaml.so -%{_libdir}/ocaml/NBDKit.* -%{_mandir}/man3/nbdkit-ocaml-plugin.3* -%{_mandir}/man3/NBDKit.3* -%endif - - -%if !0%{?rhel} -%files perl-plugin -%doc README -%license LICENSE -%{_libdir}/%{name}/plugins/nbdkit-perl-plugin.so -%{_mandir}/man3/nbdkit-perl-plugin.3* -%endif - - -%files python-plugin -%doc README -%license LICENSE -%{_libdir}/%{name}/plugins/nbdkit-python-plugin.so -%{_mandir}/man3/nbdkit-python-plugin.3* - - -%if !0%{?rhel} -%files ruby-plugin -%doc README -%license LICENSE -%{_libdir}/%{name}/plugins/nbdkit-ruby-plugin.so -%{_mandir}/man3/nbdkit-ruby-plugin.3* -%endif - - -%files ssh-plugin -%doc README -%license LICENSE -%{_libdir}/%{name}/plugins/nbdkit-ssh-plugin.so -%{_mandir}/man1/nbdkit-ssh-plugin.1* - - -%files tar-plugin -%doc README -%license LICENSE -%{_libdir}/%{name}/plugins/nbdkit-tar-plugin.so -%{_mandir}/man1/nbdkit-tar-plugin.1* - - -%if !0%{?rhel} -%files tcl-plugin -%doc README -%license LICENSE -%{_libdir}/%{name}/plugins/nbdkit-tcl-plugin.so -%{_mandir}/man3/nbdkit-tcl-plugin.3* -%endif - - -%files tmpdisk-plugin -%doc README -%license LICENSE -%{_libdir}/%{name}/plugins/nbdkit-tmpdisk-plugin.so -%{_mandir}/man1/nbdkit-tmpdisk-plugin.1* - - -%if !0%{?rhel} -%files torrent-plugin -%doc README -%license LICENSE -%{_libdir}/%{name}/plugins/nbdkit-torrent-plugin.so -%{_mandir}/man1/nbdkit-torrent-plugin.1* -%endif - - -%ifarch x86_64 -%files vddk-plugin -%doc README -%license LICENSE -%{_libdir}/%{name}/plugins/nbdkit-vddk-plugin.so -%{_mandir}/man1/nbdkit-vddk-plugin.1* -%endif - - -%files basic-filters -%doc README -%license LICENSE -%{_libdir}/%{name}/filters/nbdkit-blocksize-filter.so -%{_libdir}/%{name}/filters/nbdkit-cache-filter.so -%{_libdir}/%{name}/filters/nbdkit-cacheextents-filter.so -%{_libdir}/%{name}/filters/nbdkit-checkwrite-filter.so -%{_libdir}/%{name}/filters/nbdkit-cow-filter.so -%{_libdir}/%{name}/filters/nbdkit-ddrescue-filter.so -%{_libdir}/%{name}/filters/nbdkit-delay-filter.so -%{_libdir}/%{name}/filters/nbdkit-error-filter.so -%{_libdir}/%{name}/filters/nbdkit-exitlast-filter.so -%{_libdir}/%{name}/filters/nbdkit-exitwhen-filter.so -%{_libdir}/%{name}/filters/nbdkit-exportname-filter.so -%{_libdir}/%{name}/filters/nbdkit-extentlist-filter.so -%{_libdir}/%{name}/filters/nbdkit-fua-filter.so -%{_libdir}/%{name}/filters/nbdkit-ip-filter.so -%{_libdir}/%{name}/filters/nbdkit-limit-filter.so -%{_libdir}/%{name}/filters/nbdkit-log-filter.so -%{_libdir}/%{name}/filters/nbdkit-nocache-filter.so -%{_libdir}/%{name}/filters/nbdkit-noextents-filter.so -%{_libdir}/%{name}/filters/nbdkit-nofilter-filter.so -%{_libdir}/%{name}/filters/nbdkit-noparallel-filter.so -%{_libdir}/%{name}/filters/nbdkit-nozero-filter.so -%{_libdir}/%{name}/filters/nbdkit-offset-filter.so -%{_libdir}/%{name}/filters/nbdkit-partition-filter.so -%{_libdir}/%{name}/filters/nbdkit-pause-filter.so -%{_libdir}/%{name}/filters/nbdkit-rate-filter.so -%{_libdir}/%{name}/filters/nbdkit-readahead-filter.so -%{_libdir}/%{name}/filters/nbdkit-retry-filter.so -%{_libdir}/%{name}/filters/nbdkit-stats-filter.so -%{_libdir}/%{name}/filters/nbdkit-swab-filter.so -%{_libdir}/%{name}/filters/nbdkit-tls-fallback-filter.so -%{_libdir}/%{name}/filters/nbdkit-truncate-filter.so -%{_mandir}/man1/nbdkit-blocksize-filter.1* -%{_mandir}/man1/nbdkit-cache-filter.1* -%{_mandir}/man1/nbdkit-cacheextents-filter.1* -%{_mandir}/man1/nbdkit-checkwrite-filter.1* -%{_mandir}/man1/nbdkit-cow-filter.1* -%{_mandir}/man1/nbdkit-ddrescue-filter.1* -%{_mandir}/man1/nbdkit-delay-filter.1* -%{_mandir}/man1/nbdkit-error-filter.1* -%{_mandir}/man1/nbdkit-exitlast-filter.1* -%{_mandir}/man1/nbdkit-exitwhen-filter.1* -%{_mandir}/man1/nbdkit-exportname-filter.1* -%{_mandir}/man1/nbdkit-extentlist-filter.1* -%{_mandir}/man1/nbdkit-fua-filter.1* -%{_mandir}/man1/nbdkit-ip-filter.1* -%{_mandir}/man1/nbdkit-limit-filter.1* -%{_mandir}/man1/nbdkit-log-filter.1* -%{_mandir}/man1/nbdkit-nocache-filter.1* -%{_mandir}/man1/nbdkit-noextents-filter.1* -%{_mandir}/man1/nbdkit-nofilter-filter.1* -%{_mandir}/man1/nbdkit-noparallel-filter.1* -%{_mandir}/man1/nbdkit-nozero-filter.1* -%{_mandir}/man1/nbdkit-offset-filter.1* -%{_mandir}/man1/nbdkit-partition-filter.1* -%{_mandir}/man1/nbdkit-pause-filter.1* -%{_mandir}/man1/nbdkit-rate-filter.1* -%{_mandir}/man1/nbdkit-readahead-filter.1* -%{_mandir}/man1/nbdkit-retry-filter.1* -%{_mandir}/man1/nbdkit-stats-filter.1* -%{_mandir}/man1/nbdkit-swab-filter.1* -%{_mandir}/man1/nbdkit-tls-fallback-filter.1* -%{_mandir}/man1/nbdkit-truncate-filter.1* - - -%if !0%{?rhel} -%files ext2-filter -%doc README -%license LICENSE -%{_libdir}/%{name}/filters/nbdkit-ext2-filter.so -%{_mandir}/man1/nbdkit-ext2-filter.1* -%endif - - -%files gzip-filter -%doc README -%license LICENSE -%{_libdir}/%{name}/filters/nbdkit-gzip-filter.so -%{_mandir}/man1/nbdkit-gzip-filter.1* - - -%files tar-filter -%doc README -%license LICENSE -%{_libdir}/%{name}/filters/nbdkit-tar-filter.so -%{_mandir}/man1/nbdkit-tar-filter.1* - - -%files xz-filter -%doc README -%license LICENSE -%{_libdir}/%{name}/filters/nbdkit-xz-filter.so -%{_mandir}/man1/nbdkit-xz-filter.1* - - -%files devel -%doc BENCHMARKING OTHER_PLUGINS README SECURITY TODO -%license LICENSE -# Include the source of the example plugins in the documentation. -%doc plugins/example*/*.c -%if !0%{?rhel} -%doc plugins/example4/nbdkit-example4-plugin -%doc plugins/lua/example.lua -%endif -%if !0%{?rhel} && 0%{?have_ocaml} -%doc plugins/ocaml/example.ml -%endif -%if !0%{?rhel} -%doc plugins/perl/example.pl -%endif -%doc plugins/python/examples/*.py -%if !0%{?rhel} -%doc plugins/ruby/example.rb -%endif -%doc plugins/sh/example.sh -%if !0%{?rhel} -%doc plugins/tcl/example.tcl -%endif -%{_includedir}/nbdkit-common.h -%{_includedir}/nbdkit-filter.h -%{_includedir}/nbdkit-plugin.h -%{_includedir}/nbdkit-version.h -%{_includedir}/nbd-protocol.h -%{_mandir}/man3/nbdkit-filter.3* -%{_mandir}/man3/nbdkit-plugin.3* -%{_mandir}/man1/nbdkit-release-notes-1.*.1* -%{_libdir}/pkgconfig/nbdkit.pc - - -%files bash-completion -%license LICENSE -%dir %{_datadir}/bash-completion/completions -%{_datadir}/bash-completion/completions/nbdkit - - -%changelog -* Fri Nov 18 2022 Richard W.M. Jones - 1.24.0-5 -- vddk: Add support for VDDK 8.0.0 - resolves: rhbz#2143907 - -* Wed Jan 26 2022 Richard W.M. Jones - 1.24.0-4 -- Fix build on RHEL 8.6 with qemu >= 6.1 - resolves: rhbz#2045945 - -* Mon Sep 06 2021 Richard W.M. Jones - 1.24.0-3 -- Fix CVE-2021-3716 NBD_OPT_STRUCTURED_REPLY injection on STARTTLS - resolves: rhbz#1994915 - -* Mon Sep 06 2021 Richard W.M. Jones - 1.24.0-2 -- Fix data corruption in zero and trim on unaligned tail - resolves: rhbz#1990135 - -* Thu Sep 2 2021 Danilo C. L. de Paula - 1.24.0-1.el8 -- Resolves: bz#2000225 - (Rebase virt:rhel module:stream based on AV-8.6) - -* Thu Jun 04 2020 Danilo C. L. de Paula - 1.16.2 -- Resolves: bz#1810193 - (Upgrade components in virt:rhel module:stream for RHEL-8.3 release) - -* Mon Apr 27 2020 Danilo C. L. de Paula - 1.16.2 -- Resolves: bz#1810193 - (Upgrade components in virt:rhel module:stream for RHEL-8.3 release) - -* Fri Jun 28 2019 Danilo de Paula - 1.4.2-5 -- Rebuild all virt packages to fix RHEL's upgrade path -- Resolves: rhbz#1695587 - (Ensure modular RPM upgrade path) - -* Mon Dec 17 2018 Richard W.M. Jones - 1.4.2-4 -- Remove misguided LDFLAGS hack which removed server hardening. - https://bugzilla.redhat.com/show_bug.cgi?id=1624149#c6 - resolves: rhbz#1624149 - -* Fri Dec 14 2018 Richard W.M. Jones - 1.4.2-3 -- Use platform-python - resolves: rhbz#1659159 - -* Fri Aug 10 2018 Richard W.M. Jones - 1.4.2-2 -- Add Enhanced Python error reporting - resolves: rhbz#1614750. -- Use copy-patches.sh script. - -* Wed Aug 1 2018 Richard W.M. Jones - 1.4.2-1 -- New stable version 1.4.2. - -* Wed Jul 25 2018 Richard W.M. Jones - 1.4.1-3 -- Enable VDDK plugin on x86-64 only. - -* Fri Jul 20 2018 Richard W.M. Jones - 1.4.1-1 -- New upstream version 1.4.1. -- Small refactorings in the spec file. - -* Fri Jul 6 2018 Richard W.M. Jones - 1.4.0-1 -- New upstream version 1.4.0. -- New plugins: random, zero. -- New bash tab completion subpackage. -- Remove unused build dependencies. - -* Sun Jul 1 2018 Richard W.M. Jones - 1.2.4-3 -- Add all upstream patches since 1.2.4 was released. - -* Tue Jun 12 2018 Richard W.M. Jones - 1.2.4-2 -- Add all upstream patches since 1.2.4 was released. - -* Mon Jun 11 2018 Richard W.M. Jones - 1.2.4-2 -- Disable plugins and filters that we do not want to ship in RHEL 8. - -* Sat Jun 9 2018 Richard W.M. Jones - 1.2.4-1 -- New stable version 1.2.4. -- Remove upstream patches. -- Enable tarball signatures. -- Add upstream patch to fix tests when guestfish not available. - -* Wed Jun 6 2018 Richard W.M. Jones - 1.2.3-1 -- New stable version 1.2.3. -- Add patch to work around libvirt problem with relative socket paths. -- Add patch to fix the xz plugin test with recent guestfish. - -* Sat Apr 21 2018 Richard W.M. Jones - 1.2.2-1 -- New stable version 1.2.2. - -* Mon Apr 9 2018 Richard W.M. Jones - 1.2.1-1 -- New stable version 1.2.1. - -* Fri Apr 6 2018 Richard W.M. Jones - 1.2.0-1 -- Move to stable branch version 1.2.0. - -* Fri Feb 09 2018 Igor Gnatenko - 1.1.28-5 -- Escape macros in %%changelog - -* Thu Feb 08 2018 Fedora Release Engineering - 1.1.28-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Wed Jan 31 2018 Igor Gnatenko - 1.1.28-3 -- Switch to %%ldconfig_scriptlets - -* Fri Jan 26 2018 Richard W.M. Jones - 1.1.28-2 -- Run a simplified test suite on all arches. - -* Mon Jan 22 2018 Richard W.M. Jones - 1.1.28-1 -- New upstream version 1.1.28. -- Add two new filters to nbdkit-basic-filters. - -* Sat Jan 20 2018 Björn Esser - 1.1.27-2 -- Rebuilt for switch to libxcrypt - -* Sat Jan 20 2018 Richard W.M. Jones - 1.1.27-1 -- New upstream version 1.1.27. -- Add new subpackage nbdkit-basic-filters containing new filters. - -* Thu Jan 11 2018 Richard W.M. Jones - 1.1.26-2 -- Rebuild against updated Ruby. - -* Sat Dec 23 2017 Richard W.M. Jones - 1.1.26-1 -- New upstream version 1.1.26. -- Add new pkg-config file and dependency. - -* Wed Dec 06 2017 Richard W.M. Jones - 1.1.25-1 -- New upstream version 1.1.25. - -* Tue Dec 05 2017 Richard W.M. Jones - 1.1.24-1 -- New upstream version 1.1.24. -- Add tar plugin (new subpackage nbdkit-plugin-tar). - -* Tue Dec 05 2017 Richard W.M. Jones - 1.1.23-1 -- New upstream version 1.1.23. -- Add example4 plugin. -- Python3 tests require libguestfs so disable on s390x. - -* Sun Dec 03 2017 Richard W.M. Jones - 1.1.22-1 -- New upstream version 1.1.22. -- Enable tests on Fedora. - -* Sat Dec 02 2017 Richard W.M. Jones - 1.1.20-1 -- New upstream version 1.1.20. -- Add nbdkit-split-plugin to basic plugins. - -* Sat Dec 02 2017 Richard W.M. Jones - 1.1.19-2 -- OCaml 4.06.0 rebuild. - -* Thu Nov 30 2017 Richard W.M. Jones - 1.1.19-1 -- New upstream version 1.1.19. -- Combine all the simple plugins in %%{name}-basic-plugins. -- Add memory and null plugins. -- Rename the example plugins subpackage. -- Use %%license instead of %%doc for license file. -- Remove patches now upstream. - -* Wed Nov 29 2017 Richard W.M. Jones - 1.1.18-4 -- Fix Python 3 builds / RHEL macros (RHBZ#1404631). - -* Tue Nov 21 2017 Richard W.M. Jones - 1.1.18-3 -- New upstream version 1.1.18. -- Add NBD forwarding plugin. -- Add libselinux-devel so that SELinux support is enabled in the daemon. -- Apply all patches from upstream since 1.1.18. - -* Fri Oct 20 2017 Richard W.M. Jones - 1.1.16-2 -- New upstream version 1.1.16. -- Disable python3 plugin on RHEL/EPEL <= 7. -- Only ship on x86_64 in RHEL/EPEL <= 7. - -* Wed Sep 27 2017 Richard W.M. Jones - 1.1.15-1 -- New upstream version 1.1.15. -- Enable TLS support. - -* Fri Sep 01 2017 Richard W.M. Jones - 1.1.14-1 -- New upstream version 1.1.14. - -* Fri Aug 25 2017 Richard W.M. Jones - 1.1.13-1 -- New upstream version 1.1.13. -- Remove patches which are all upstream. -- Remove grubby hack, should not be needed with modern supermin. - -* Sat Aug 19 2017 Richard W.M. Jones - 1.1.12-13 -- Rebuild for OCaml 4.05.0. - -* Thu Aug 03 2017 Fedora Release Engineering - 1.1.12-12 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 1.1.12-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Tue Jun 27 2017 Richard W.M. Jones - 1.1.12-10 -- Rebuild for OCaml 4.04.2. - -* Sun Jun 04 2017 Jitka Plesnikova - 1.1.12-9 -- Perl 5.26 rebuild - -* Mon May 15 2017 Richard W.M. Jones - 1.1.12-8 -- Rebuild for OCaml 4.04.1. - -* Fri Feb 10 2017 Fedora Release Engineering - 1.1.12-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Thu Jan 12 2017 Vít Ondruch - 1.1.12-6 -- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.4 - -* Fri Dec 23 2016 Richard W.M. Jones - 1.1.12-5 -- Rebuild for Python 3.6 update. - -* Wed Dec 14 2016 Richard W.M. Jones - 1.1.12-4 -- Fix python3 subpackage so it really uses python3 (RHBZ#1404631). - -* Sat Nov 05 2016 Richard W.M. Jones - 1.1.12-3 -- Rebuild for OCaml 4.04.0. - -* Mon Oct 03 2016 Richard W.M. Jones - 1.1.12-2 -- Compile Python 2 and Python 3 versions of the plugin. - -* Wed Jun 08 2016 Richard W.M. Jones - 1.1.12-1 -- New upstream version 1.1.12 -- Enable Ruby plugin. -- Disable tests on Rawhide because libvirt is broken again (RHBZ#1344016). - -* Wed May 25 2016 Richard W.M. Jones - 1.1.11-10 -- Add another upstream patch since 1.1.11. - -* Mon May 23 2016 Richard W.M. Jones - 1.1.11-9 -- Add all patches upstream since 1.1.11 (fixes RHBZ#1336758). - -* Tue May 17 2016 Jitka Plesnikova - 1.1.11-7 -- Perl 5.24 rebuild - -* Wed Mar 09 2016 Richard W.M. Jones - 1.1.11-6 -- When tests fail, dump out test-suite.log so we can debug it. - -* Fri Feb 05 2016 Richard W.M. Jones - 1.1.11-5 -- Don't run tests on x86, because kernel is broken there - (https://bugzilla.redhat.com/show_bug.cgi?id=1302071) - -* Thu Feb 04 2016 Fedora Release Engineering - 1.1.11-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Mon Jan 11 2016 Richard W.M. Jones - 1.1.11-3 -- Add support for newstyle NBD protocol (RHBZ#1297100). - -* Sat Oct 31 2015 Richard W.M. Jones - 1.1.11-1 -- New upstream version 1.1.11. - -* Thu Jul 30 2015 Richard W.M. Jones - 1.1.10-3 -- OCaml 4.02.3 rebuild. - -* Sat Jun 20 2015 Richard W.M. Jones - 1.1.10-2 -- Enable libguestfs plugin on aarch64. - -* Fri Jun 19 2015 Richard W.M. Jones - 1.1.10-1 -- New upstream version. -- Enable now working OCaml plugin (requires OCaml >= 4.02.2). - -* Wed Jun 17 2015 Fedora Release Engineering - 1.1.9-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Thu Jun 11 2015 Jitka Plesnikova - 1.1.9-5 -- Perl 5.22 rebuild - -* Wed Jun 10 2015 Richard W.M. Jones - 1.1.9-4 -- Enable debugging messages when running make check. - -* Sat Jun 06 2015 Jitka Plesnikova - 1.1.9-3 -- Perl 5.22 rebuild - -* Tue Oct 14 2014 Richard W.M. Jones - 1.1.9-2 -- New upstream version 1.1.9. -- Add the streaming plugin. -- Include fix for streaming plugin in 1.1.9. - -* Wed Sep 10 2014 Richard W.M. Jones - 1.1.8-4 -- Rebuild for updated Perl in Rawhide. -- Workaround for broken libvirt (RHBZ#1138604). - -* Sun Aug 17 2014 Fedora Release Engineering - 1.1.8-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Sat Jun 21 2014 Richard W.M. Jones - 1.1.8-1 -- New upstream version 1.1.8. -- Add support for cURL, and new nbdkit-plugin-curl package. - -* Fri Jun 20 2014 Richard W.M. Jones - 1.1.7-1 -- New upstream version 1.1.7. -- Remove patches which are now all upstream. - -* Sat Jun 07 2014 Fedora Release Engineering - 1.1.6-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Thu Mar 06 2014 Dan Horák - 1.1.6-4 -- libguestfs is available only on selected arches - -* Fri Feb 21 2014 Richard W.M. Jones - 1.1.6-3 -- Backport some upstream patches, fixing a minor bug and adding more tests. -- Enable the tests since kernel bug is fixed. - -* Sun Feb 16 2014 Richard W.M. Jones - 1.1.6-1 -- New upstream version 1.1.6. - -* Sat Feb 15 2014 Richard W.M. Jones - 1.1.5-2 -- New upstream version 1.1.5. -- Enable the new Python plugin. -- Perl plugin man page moved to section 3. -- Perl now requires ExtUtils::Embed. - -* Mon Feb 10 2014 Richard W.M. Jones - 1.1.4-1 -- New upstream version 1.1.4. -- Enable the new Perl plugin. - -* Sun Aug 4 2013 Richard W.M. Jones - 1.1.3-1 -- New upstream version 1.1.3 which fixes some test problems. -- Disable tests because Rawhide kernel is broken (RHBZ#991808). -- Remove a single quote from description which confused emacs. -- Remove patch, now upstream. - -* Sat Aug 03 2013 Fedora Release Engineering - 1.1.2-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Sun Jul 21 2013 Richard W.M. Jones - 1.1.2-3 -- Fix segfault when IPv6 client is used (RHBZ#986601). - -* Tue Jul 16 2013 Richard W.M. Jones - 1.1.2-2 -- New development version 1.1.2. -- Disable the tests on Fedora <= 18. - -* Tue Jun 25 2013 Richard W.M. Jones - 1.1.1-1 -- New development version 1.1.1. -- Add libguestfs plugin. -- Run the test suite. - -* Mon Jun 24 2013 Richard W.M. Jones - 1.0.0-4 -- Initial release. diff --git a/SOURCES/copy-patches.sh b/copy-patches.sh similarity index 98% rename from SOURCES/copy-patches.sh rename to copy-patches.sh index 19768af..cfa8a5b 100755 --- a/SOURCES/copy-patches.sh +++ b/copy-patches.sh @@ -6,7 +6,7 @@ set -e # directory. Use it like this: # ./copy-patches.sh -rhel_version=8.8 +rhel_version=10.0 # Check we're in the right directory. if [ ! -f nbdkit.spec ]; then diff --git a/nbdkit-1.40.0.tar.gz.sig b/nbdkit-1.40.0.tar.gz.sig new file mode 100644 index 0000000..d383530 --- /dev/null +++ b/nbdkit-1.40.0.tar.gz.sig @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- + +iQJFBAABCAAvFiEE93dPsa0HSn6Mh2fqkXOPc+G3aKAFAmaddOcRHHJpY2hAYW5u +ZXhpYS5vcmcACgkQkXOPc+G3aKCyHQ//QSHYXixx8DJLlpRHhUYzcKOLSez+rvkN +TjwTfzIKxQXYbke8pqt3izwEIDTmMCeIVDUAjXj3bpnlVAx8I0hE+DHQe1AlbIXx +VjgmdTVcT/v5nL39DVqMXxVmXQwCtgcOlwQuZw6YSsdyPnH/UeplyrOjGN5W/XE7 +KPmfU1slBx//ybLp4L4qQCmTfDLqBLzVRTGyR7UJDrle/J5jinqmNzLcAvKI0WM0 +Incv4CvNj85mYtE2nWiBofwCK1OyiNvsWhsEuRxu/8OIGtPVrho4WuAemlVDbabL +JsHgZPwGECDewPEdFnfZJhrvhvgzYkDjsXjqLC0aXX61efDbnTPkkLduJlPMqhMa +obgS5xX5gIdwJFnVOX5yO2OVd5ghGDG+pi+yqt6fL0QPqzDBW6leupri4sBI/C3J +dE7o//i2MUDYeFWGEpIMsY0X/JIDILU76DKDsM0C9WsMfKe5sOJ968iFFjVR7EEP +cxwSqhSJrMV3kUEBNoTb6g6md2Gld/0iQ85hhCw8BeBnADU+tiRmasLvYT2+uCUz +fiwld0QRfgWq/UkjmDCvbfYypb5p/F/Wu6Z6tqPFOl3+eJ0adp7C41fqSGjar7ZH +9yelDZ1UpHr85em+cZ+FGt1UvTtlYVM2+EcWLVLZ8NpcxziZBmwBw3upIKC3CYTu +6K4aw/YrmE0= +=oWs8 +-----END PGP SIGNATURE----- diff --git a/nbdkit-find-provides b/nbdkit-find-provides new file mode 100755 index 0000000..7013ccd --- /dev/null +++ b/nbdkit-find-provides @@ -0,0 +1,23 @@ +#!/bin/bash - + +# Generate RPM provides automatically for nbdkit packages and filters. +# Copyright (C) 2009-2022 Red Hat Inc. + +# To test: +# find /usr/lib64/nbdkit/plugins | ./nbdkit-find-provides VER REL +# find /usr/lib64/nbdkit/filters | ./nbdkit-find-provides VER REL + +ver="$1" +rel="$2" + +function process_file +{ + if [[ $1 =~ /plugins/nbdkit-.*-plugin ]] || + [[ $1 =~ /filters/nbdkit-.*-filter ]]; then + echo "Provides:" "$(basename $1 .so)" "=" "$ver-$rel" + fi +} + +while read line; do + process_file "$line" +done diff --git a/nbdkit.attr b/nbdkit.attr new file mode 100644 index 0000000..2757679 --- /dev/null +++ b/nbdkit.attr @@ -0,0 +1,3 @@ +%__nbdkit_provides %{_rpmconfigdir}/nbdkit-find-provides %{version} %{release} +%__nbdkit_path %{_libdir}/nbdkit/(plugins|filters)/nbdkit-.*-(plugin|filter)(\.so)?$ +%__nbdkit_flags exeonly diff --git a/nbdkit.fc b/nbdkit.fc new file mode 100644 index 0000000..4877736 --- /dev/null +++ b/nbdkit.fc @@ -0,0 +1,3 @@ +/usr/sbin/nbdkit -- gen_context(system_u:object_r:nbdkit_exec_t,s0) + +/usr/lib/systemd/system/nbdkit.* gen_context(system_u:object_r:nbdkit_unit_file_t,s0) diff --git a/nbdkit.if b/nbdkit.if new file mode 100644 index 0000000..315fead --- /dev/null +++ b/nbdkit.if @@ -0,0 +1,207 @@ +## policy for nbdkit + +######################################## +## +## Execute nbdkit_exec_t in the nbdkit domain. +## +## +## +## Domain allowed to transition. +## +## +# +interface(`nbdkit_domtrans',` + gen_require(` + type nbdkit_t, nbdkit_exec_t; + ') + + corecmd_search_bin($1) + domtrans_pattern($1, nbdkit_exec_t, nbdkit_t) +') + +###################################### +## +## Execute nbdkit in the caller domain. +## +## +## +## Domain allowed access. +## +## +# +interface(`nbdkit_exec',` + gen_require(` + type nbdkit_exec_t; + ') + + corecmd_search_bin($1) + can_exec($1, nbdkit_exec_t) +') + +######################################## +## +## Execute nbdkit in the nbdkit domain, and +## allow the specified role the nbdkit domain. +## +## +## +## Domain allowed to transition +## +## +## +## +## The role to be allowed the nbdkit domain. +## +## +# +interface(`nbdkit_run',` + gen_require(` + type nbdkit_t; + attribute_role nbdkit_roles; + ') + + nbdkit_domtrans($1) + roleattribute $2 nbdkit_roles; +') + +######################################## +## +## Role access for nbdkit +## +## +## +## Role allowed access +## +## +## +## +## User domain for the role +## +## +# +interface(`nbdkit_role',` + gen_require(` + type nbdkit_t; + attribute_role nbdkit_roles; + ') + + roleattribute $1 nbdkit_roles; + + nbdkit_domtrans($2) + + ps_process_pattern($2, nbdkit_t) + allow $2 nbdkit_t:process { signull signal sigkill }; +') + +######################################## +## +## Allow attempts to connect to nbdkit +## with a unix stream socket. +## +## +## +## Domain to not audit. +## +## +# +interface(`nbdkit_stream_connect',` + gen_require(` + type nbdkit_t; + ') + + allow $1 nbdkit_t:unix_stream_socket connectto; +') + +######################################## +## +## Allow nbdkit_exec_t to be an entrypoint +## of the specified domain +## +## +## +## Domain allowed access. +## +## +## +# +interface(`nbdkit_entrypoint',` + gen_require(` + type nbdkit_exec_t; + ') + allow $1 nbdkit_exec_t:file entrypoint; +') + +# ---------------------------------------------------------------------- +# RWMJ: See: +# https://issues.redhat.com/browse/RHEL-5174?focusedId=23387259&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-23387259 +# Remove this when virt.if gets updated. + +######################################## +# +# Interface compatibility blocks +# +# The following definitions ensure compatibility with distribution policy +# versions that do not contain given interfaces (epel, or older Fedora +# releases). +# Each block tests for existence of given interface and defines it if needed. +# + +######################################## +## +## Read and write to svirt_image dirs. +## +## +## +## Domain allowed access. +## +## +# +ifndef(`virt_rw_svirt_image_dirs',` + interface(`virt_rw_svirt_image_dirs',` + gen_require(` + type svirt_image_t; + ') + + allow $1 svirt_image_t:dir rw_dir_perms; + ') +') + +######################################## +## +## Create svirt_image sock_files. +## +## +## +## Domain allowed access. +## +## +# +ifndef(`virt_create_svirt_image_sock_files',` + interface(`virt_create_svirt_image_sock_files',` + gen_require(` + type svirt_image_t; + ') + + allow $1 svirt_image_t:sock_file create_sock_file_perms; + ') +') + +######################################## +## +## Read and write virtlogd pipes. +## +## +## +## Domain allowed access. +## +## +# +ifndef(`virtlogd_rw_pipes',` + interface(`virtlogd_rw_pipes',` + gen_require(` + type virtlogd_t; + ') + + allow $1 virtlogd_t:fifo_file rw_fifo_file_perms; + ') +') diff --git a/nbdkit.spec b/nbdkit.spec new file mode 100644 index 0000000..78ed7f3 --- /dev/null +++ b/nbdkit.spec @@ -0,0 +1,2917 @@ +%global _hardened_build 1 + +%ifarch %{kernel_arches} +# ppc64le broken in rawhide: +# https://bugzilla.redhat.com/show_bug.cgi?id=2006709 +# riscv64 tests fail with +# qemu-system-riscv64: invalid accelerator kvm +# qemu-system-riscv64: falling back to tcg +# qemu-system-riscv64: unable to find CPU model 'host' +# This seems to require changes in libguestfs and/or qemu to support +# -cpu max or -cpu virt. +# s390x builders can't run libguestfs +%ifnarch %{power64} riscv64 s390 s390x +%global have_libguestfs 1 +%endif +%endif + +# We can only compile the OCaml plugin on platforms which have native +# OCaml support (not bytecode). +%ifarch %{ocaml_native_compiler} +%global have_ocaml 1 +%endif + +# libblkio was broken on i686: https://bugzilla.redhat.com/2229372 +# but somehow "fixed itself", keep an eye on it. +%global have_blkio 1 + +# Enable mingw subpackage on Fedora only. +%if 0%{?fedora} +%global have_mingw 1 +%endif + +# Enable nbdkit-selinux package. +%global with_selinux 1 +%global modulename nbdkit +%global selinuxtype targeted + +# Architectures where we run the complete test suite including +# the libguestfs tests. +# +# On all other architectures, a simpler test suite must pass. This +# omits any tests that run full qemu, since running qemu under TCG is +# often broken on non-x86_64 arches. +%global complete_test_arches x86_64 + +# If the test suite is broken on a particular architecture, document +# it as a bug and add it to this list. +%global broken_test_arches NONE + +# If we should verify tarball signature with GPGv2. +%global verify_tarball_signature 1 + +# The source directory. +%global source_directory 1.40-stable + +Name: nbdkit +Version: 1.40.0 +Release: 2%{?dist} +Summary: NBD server + +License: BSD-3-Clause +URL: https://gitlab.com/nbdkit/nbdkit + +%if 0%{?rhel} >= 8 +# On RHEL 8+, we cannot build the package on i686 (no virt stack). +ExcludeArch: i686 +%endif + +Source0: http://libguestfs.org/download/nbdkit/%{source_directory}/%{name}-%{version}.tar.gz +%if 0%{verify_tarball_signature} +Source1: http://libguestfs.org/download/nbdkit/%{source_directory}/%{name}-%{version}.tar.gz.sig +# Keyring used to verify tarball signature. +Source2: libguestfs.keyring +%endif + +# Maintainer script which helps with handling patches. +Source3: copy-patches.sh + +# Patches come from the upstream repository: +# https://gitlab.com/nbdkit/nbdkit/-/commits/rhel-10.0/ + +# Patches. +Patch0001: 0001-server-crypto.c-Fix-fallback-functions-used-when-gnu.patch +Patch0002: 0002-server-log-Move-preserve-errno-to-log_verror-functio.patch +Patch0003: 0003-server-Rename-threadlocal_-set-get-_error-to-._errno.patch +Patch0004: 0004-server-Introduce-threadlocal_-set-get-_last_error.patch +Patch0005: 0005-server-Take-a-thread-local-copy-of-the-last-call-to-.patch +Patch0006: 0006-server-Send-the-last-error-to-the-NBD-client.patch + +# For automatic RPM Provides generation. +# See: https://rpm-software-management.github.io/rpm/manual/dependency_generators.html +Source4: nbdkit.attr +Source5: nbdkit-find-provides + +# For nbdkit-selinux package: +Source6: %{modulename}.te +Source7: %{modulename}.if +Source8: %{modulename}.fc + +# For applying the patches: +BuildRequires: git + +# For rebuilding autoconf cruft: +BuildRequires: autoconf, automake, libtool + +BuildRequires: make +BuildRequires: gcc, gcc-c++ +BuildRequires: %{_bindir}/pod2man +BuildRequires: pkgconfig(gnutls) +BuildRequires: pkgconfig(libselinux) +%if !0%{?rhel} && 0%{?have_libguestfs} +BuildRequires: pkgconfig(libguestfs) +%endif +BuildRequires: pkgconfig(libvirt) +BuildRequires: pkgconfig(liblzma) +BuildRequires: pkgconfig(zlib) +%if !0%{?rhel} +BuildRequires: pkgconfig(zlib-ng) +%endif +BuildRequires: pkgconfig(bzip2) +BuildRequires: pkgconfig(libzstd) +BuildRequires: pkgconfig(libcurl) +BuildRequires: pkgconfig(libnbd) +BuildRequires: pkgconfig(libssh) +BuildRequires: e2fsprogs +BuildRequires: pkgconfig(ext2fs) +BuildRequires: pkgconfig(com_err) +%if !0%{?rhel} +BuildRequires: xorriso +BuildRequires: pkgconfig(libtorrent-rasterbar) +%endif +%if 0%{?have_blkio} +BuildRequires: pkgconfig(blkio) +%endif +BuildRequires: bash-completion +BuildRequires: perl-devel +BuildRequires: perl(ExtUtils::Embed) +%if 0%{?rhel} == 8 +BuildRequires: platform-python-devel +%else +BuildRequires: python3-devel +%endif +%if !0%{?rhel} +BuildRequires: python3-boto3 +%endif +%if !0%{?rhel} +%if 0%{?have_ocaml} +BuildRequires: ocaml >= 4.03 +BuildRequires: ocaml-ocamldoc +%endif +BuildRequires: pkgconfig(tcl) +BuildRequires: pkgconfig(lua) +%endif +# Only needed until the following bug gets fixed in boost: +# https://bugzilla.redhat.com/show_bug.cgi?id=2297642 +%if 0%{?fedora} >= 41 +BuildRequires: openssl-devel-engine +%endif +%if 0%{verify_tarball_signature} +BuildRequires: gnupg2 +%endif + +# Only for running the test suite: +BuildRequires: /usr/bin/bc +BuildRequires: /usr/bin/certtool +BuildRequires: /usr/bin/cut +BuildRequires: expect +BuildRequires: glibc-utils +BuildRequires: /usr/bin/hexdump +BuildRequires: /usr/sbin/ip +BuildRequires: jq +BuildRequires: /usr/bin/nbdcopy +BuildRequires: /usr/bin/nbdinfo +BuildRequires: /usr/bin/nbdsh +BuildRequires: /usr/bin/qemu-img +BuildRequires: /usr/bin/qemu-io +BuildRequires: /usr/bin/qemu-nbd +BuildRequires: /usr/sbin/sfdisk +%if !0%{?rhel} +BuildRequires: /usr/bin/socat +%endif +BuildRequires: /usr/sbin/ss +BuildRequires: /usr/bin/stat + +# This package has RPM rules that create the automatic Provides: for +# nbdkit plugins and filters. This means nbdkit build depends on +# itself, but it's a simple noarch package so easy to install. +BuildRequires: nbdkit-srpm-macros >= 1.30.0 + +%if 0%{?have_mingw} +BuildRequires: mingw32-filesystem +BuildRequires: mingw64-filesystem +BuildRequires: mingw32-gcc +BuildRequires: mingw64-gcc +BuildRequires: mingw32-gcc-c++ +BuildRequires: mingw64-gcc-c++ +BuildRequires: mingw32-dlfcn +BuildRequires: mingw64-dlfcn +BuildRequires: mingw32-gnutls +BuildRequires: mingw64-gnutls +BuildRequires: mingw32-winpthreads +BuildRequires: mingw64-winpthreads +BuildRequires: mingw32-xz +BuildRequires: mingw64-xz +BuildRequires: mingw32-zlib +BuildRequires: mingw64-zlib +%endif + +# nbdkit is a metapackage pulling the server and a useful subset +# of the plugins and filters. +Requires: nbdkit-server%{?_isa} = %{version}-%{release} +Requires: nbdkit-basic-plugins%{?_isa} = %{version}-%{release} +Requires: nbdkit-basic-filters%{?_isa} = %{version}-%{release} + +%if 0%{?with_selinux} +# This ensures that the nbdkit-selinux package and all its +# dependencies are not pulled into containers and other systems that +# do not use SELinux. +Requires: (%{name}-selinux if selinux-policy-%{selinuxtype}) +%endif + + +%description +NBD is a protocol for accessing block devices (hard disks and +disk-like things) over the network. + +nbdkit is a toolkit for creating NBD servers. + +The key features are: + +* Multithreaded NBD server written in C with good performance. + +* Minimal dependencies for the basic server. + +* Liberal license (BSD) allows nbdkit to be linked to proprietary + libraries or included in proprietary code. + +* Well-documented, simple plugin API with a stable ABI guarantee. + Lets you to export "unconventional" block devices easily. + +* You can write plugins in C or many other languages. + +* Filters can be stacked in front of plugins to transform the output. + +* Server can run standalone or can be invoked from other programs. + +'%{name}' is a meta-package which pulls in the core server and a +useful subset of plugins and filters with minimal dependencies. + +If you want just the server, install '%{name}-server'. + +To develop plugins, install the '%{name}-devel' package and start by +reading the nbdkit(1) and nbdkit-plugin(3) manual pages. + + +%package server +Summary: The %{name} server + +%description server +This package contains the %{name} server with only the null plugin +and no filters. To install a basic set of plugins and filters you +need to install "nbdkit-basic-plugins", "nbdkit-basic-filters" or +the metapackage "nbdkit". + + +%package basic-plugins +Summary: Basic plugins for %{name} +Requires: %{name}-server%{?_isa} = %{version}-%{release} + + +%description basic-plugins +This package contains plugins for %{name} which only depend on simple +C libraries: glibc, gnutls, zlib and zstd. Other plugins for nbdkit +with more complex dependencies are packaged separately. + +nbdkit-data-plugin Serve small amounts of data from the command line. + +nbdkit-eval-plugin Write a shell script plugin on the command line. + +nbdkit-file-plugin The normal file plugin for serving files. + +nbdkit-floppy-plugin Create a virtual floppy disk from a directory. + +nbdkit-full-plugin A virtual disk that returns ENOSPC errors. + +nbdkit-info-plugin Serve client and server information. + +nbdkit-memory-plugin A virtual memory plugin. + +nbdkit-ondemand-plugin Create filesystems on demand. + +nbdkit-ones-plugin Fill disk with repeated 0xff or other bytes. + +nbdkit-pattern-plugin Fixed test pattern. + +nbdkit-partitioning-plugin Create virtual disks from partitions. + +nbdkit-random-plugin Random content plugin for testing. + +nbdkit-sh-plugin Write plugins as shell scripts or executables. + +nbdkit-sparse-random-plugin Make sparse random disks. + +nbdkit-split-plugin Concatenate one or more files. + +nbdkit-zero-plugin Zero-length plugin for testing. + + +%package example-plugins +Summary: Example plugins for %{name} +Requires: %{name}-server%{?_isa} = %{version}-%{release} +%if !0%{?rhel} +# example4 is written in Perl. +Requires: %{name}-perl-plugin +%endif + +%description example-plugins +This package contains example plugins for %{name}. + + +# The plugins below have non-trivial dependencies are so are +# packaged separately. + +%if 0%{?have_blkio} +%package blkio-plugin +Summary: libblkio NVMe, vhost-user, vDPA, VFIO plugin for %{name} +Requires: %{name}-server%{?_isa} = %{version}-%{release} + +%description blkio-plugin +This package contains libblkio (NVMe, vhost-user, vDPA, VFIO) support +for %{name}. +%endif + + +%if !0%{?rhel} +%package cc-plugin +Summary: Write small inline C plugins and scripts for %{name} +Requires: %{name}-server%{?_isa} = %{version}-%{release} +Requires: gcc +Requires: /usr/bin/cat + +%description cc-plugin +This package contains support for writing inline C plugins and scripts +for %{name}. NOTE this is NOT the right package for writing plugins +in C, install %{name}-devel for that. +%endif + + +%if !0%{?rhel} +%package cdi-plugin +Summary: Containerized Data Import plugin for %{name} +Requires: %{name}-server%{?_isa} = %{version}-%{release} +Requires: jq +Requires: podman + +%description cdi-plugin +This package contains Containerized Data Import support for %{name}. +%endif + + +%package curl-plugin +Summary: HTTP/FTP (cURL) plugin for %{name} +Requires: %{name}-server%{?_isa} = %{version}-%{release} + +%description curl-plugin +This package contains cURL (HTTP/FTP) support for %{name}. + + +%if !0%{?rhel} +# In theory this is noarch, but because plugins are placed in _libdir +# which varies across architectures, RPM does not allow this. +%package gcs-plugin +Summary: Gooogle Cloud Storage plugin %{name} +Requires: %{name}-python-plugin%{?_isa} = %{version}-%{release} +Requires: %{name}-server%{?_isa} = %{version}-%{release} +# XXX Should not need to add this. +Requires: python3-google-cloud-storage + +%description gcs-plugin +This package lets you open disk images stored in Google +Cloud Storage using %{name}. +%endif + + +%if !0%{?rhel} && 0%{?have_libguestfs} +%package guestfs-plugin +Summary: libguestfs plugin for %{name} +Requires: %{name}-server%{?_isa} = %{version}-%{release} + +%description guestfs-plugin +This package is a libguestfs plugin for %{name}. +%endif + + +%if !0%{?rhel} +%package iso-plugin +Summary: Virtual ISO 9660 plugin for %{name} +Requires: %{name}-server%{?_isa} = %{version}-%{release} +Requires: xorriso + +%description iso-plugin +This package is a virtual ISO 9660 (CD-ROM) plugin for %{name}. +%endif + + +%if !0%{?rhel} +%package libvirt-plugin +Summary: Libvirt plugin for %{name} +Requires: %{name}-server%{?_isa} = %{version}-%{release} + +%description libvirt-plugin +This package is a libvirt plugin for %{name}. It lets you access +libvirt guest disks readonly. It is implemented using the libvirt +virDomainBlockPeek API. +%endif + + +%package linuxdisk-plugin +Summary: Virtual Linux disk plugin for %{name} +Requires: %{name}-server%{?_isa} = %{version}-%{release} +# for mke2fs +Requires: e2fsprogs + +%description linuxdisk-plugin +This package is a virtual Linux disk plugin for %{name}. + + +%if !0%{?rhel} +%package lua-plugin +Summary: Lua plugin for %{name} +Requires: %{name}-server%{?_isa} = %{version}-%{release} + +%description lua-plugin +This package lets you write Lua plugins for %{name}. +%endif + + +%package nbd-plugin +Summary: NBD proxy / forward plugin for %{name} +Requires: %{name}-server%{?_isa} = %{version}-%{release} + +%description nbd-plugin +This package lets you forward NBD connections from %{name} +to another NBD server. + + +%if !0%{?rhel} && 0%{?have_ocaml} +%package ocaml-plugin +Summary: OCaml plugin for %{name} +Requires: %{name}-server%{?_isa} = %{version}-%{release} + +%description ocaml-plugin +This package lets you run OCaml plugins for %{name}. + +To compile OCaml plugins you will also need to install +%{name}-ocaml-plugin-devel. + + +%package ocaml-plugin-devel +Summary: OCaml development environment for %{name} +Requires: %{name}-server%{?_isa} = %{version}-%{release} +Requires: %{name}-ocaml-plugin%{?_isa} = %{version}-%{release} + +%description ocaml-plugin-devel +This package lets you write OCaml plugins for %{name}. +%endif + + +%if !0%{?rhel} +%package perl-plugin +Summary: Perl plugin for %{name} +Requires: %{name}-server%{?_isa} = %{version}-%{release} + +%description perl-plugin +This package lets you write Perl plugins for %{name}. +%endif + + +%package python-plugin +Summary: Python 3 plugin for %{name} +Requires: %{name}-server%{?_isa} = %{version}-%{release} + +%description python-plugin +This package lets you write Python 3 plugins for %{name}. + + +%if !0%{?rhel} +# In theory this is noarch, but because plugins are placed in _libdir +# which varies across architectures, RPM does not allow this. +%package S3-plugin +Summary: Amazon S3 and Ceph plugin for %{name} +Requires: %{name}-python-plugin%{?_isa} = %{version}-%{release} +Requires: %{name}-server%{?_isa} = %{version}-%{release} +# XXX Should not need to add this. +Requires: python3-boto3 + +%description S3-plugin +This package lets you open disk images stored in Amazon S3 +or Ceph using %{name}. +%endif + + +%package ssh-plugin +Summary: SSH plugin for %{name} +Requires: %{name}-server%{?_isa} = %{version}-%{release} + +%description ssh-plugin +This package contains SSH support for %{name}. + + +%if !0%{?rhel} +%package tcl-plugin +Summary: Tcl plugin for %{name} +Requires: %{name}-server%{?_isa} = %{version}-%{release} + +%description tcl-plugin +This package lets you write Tcl plugins for %{name}. +%endif + + +%package tmpdisk-plugin +Summary: Remote temporary filesystem disk plugin for %{name} +Requires: %{name}-server%{?_isa} = %{version}-%{release} +# For mkfs and mke2fs (defaults). +Requires: util-linux, e2fsprogs +# For other filesystems. +Suggests: xfsprogs +%if !0%{?rhel} +Suggests: ntfsprogs, dosfstools +%endif + +%description tmpdisk-plugin +This package is a remote temporary filesystem disk plugin for %{name}. + + +%if !0%{?rhel} +%package torrent-plugin +Summary: BitTorrent plugin for %{name} +Requires: %{name}-server%{?_isa} = %{version}-%{release} + +%description torrent-plugin +This package is a BitTorrent plugin for %{name}. +%endif + + +%ifarch x86_64 +%package vddk-plugin +Summary: VMware VDDK plugin for %{name} +Requires: %{name}-server%{?_isa} = %{version}-%{release} +# https://bugzilla.redhat.com/show_bug.cgi?id=1931818 +Requires: libxcrypt-compat + +%description vddk-plugin +This package is a plugin for %{name} which connects to +VMware VDDK for accessing VMware disks and servers. +%endif + + +%package basic-filters +Summary: Basic filters for %{name} +Requires: %{name}-server%{?_isa} = %{version}-%{release} +# Remove this in Fedora 43: +Obsoletes: nbdkit-gzip-filter < %{version}-%{release} + +%description basic-filters +This package contains filters for %{name} which only depend on simple +C libraries: glibc, gnutls, zlib and zstd. Other filters for nbdkit +with more complex dependencies are packaged separately. + +nbdkit-blocksize-filter Adjust block size of requests sent to plugins. + +nbdkit-blocksize-policy-filter Set block size constraints and policy. + +nbdkit-cache-filter Server-side cache. + +nbdkit-cacheextents-filter Cache extents. + +nbdkit-checkwrite-filter Check writes match contents of plugin. + +nbdkit-cow-filter Copy-on-write overlay for read-only plugins. + +nbdkit-ddrescue-filter Filter for serving from ddrescue dump. + +nbdkit-delay-filter Inject read and write delays. + +nbdkit-error-filter Inject errors. + +nbdkit-evil-filter Add random data corruption to reads. + +nbdkit-exitlast-filter Exit on last client connection. + +nbdkit-exitwhen-filter Exit gracefully when an event occurs. + +nbdkit-exportname-filter Adjust export names between client and plugin. + +nbdkit-extentlist-filter Place extent list over a plugin. + +nbdkit-fua-filter Modify flush behaviour in plugins. + +nbdkit-gzip-filter Decompress a .gz file + +nbdkit-ip-filter Filter clients by IP address. + +nbdkit-limit-filter Limit nr clients that can connect concurrently. + +nbdkit-log-filter Log all transactions to a file. + +nbdkit-luks-filter Read and write LUKS-encrypted disks. + +nbdkit-multi-conn-filter Enable, emulate or disable multi-conn. + +nbdkit-nocache-filter Disable cache requests in the underlying plugin. + +nbdkit-noextents-filter Disable extents in the underlying plugin. + +nbdkit-nofilter-filter Passthrough filter. + +nbdkit-noparallel-filter Serialize requests to the underlying plugin. + +nbdkit-nozero-filter Adjust handling of zero requests by plugins. + +nbdkit-offset-filter Serve an offset and range. + +nbdkit-partition-filter Serve a single partition. + +nbdkit-pause-filter Pause NBD requests. + +nbdkit-protect-filter Write-protect parts of a plugin. + +%if !0%{?rhel} +nbdkit-qcow2dec-filter Decode qcow2 files. + +%endif +nbdkit-rate-filter Limit bandwidth by connection or server. + +nbdkit-readahead-filter Prefetch data when reading sequentially. + +nbdkit-readonly-filter Switch a plugin between read-only and writable. + +nbdkit-retry-filter Reopen connection on error. + +nbdkit-retry-request-filter Retry single requests on error. + +nbdkit-rotational-filter Set if a plugin is rotational or not. + +nbdkit-scan-filter Prefetch data ahead of sequential reads. + +nbdkit-spinning-filter Add seek delays to simulate a spinning hard disk. + +nbdkit-swab-filter Filter for swapping byte order. + +nbdkit-tls-fallback-filter TLS protection filter. + +nbdkit-truncate-filter Truncate, expand, round up or round down size. + + +%package bzip2-filter +Summary: BZip2 filter for %{name} +Requires: %{name}-server%{?_isa} = %{version}-%{release} + +%description bzip2-filter +This package is a bzip2 filter for %{name}. + + +%if !0%{?rhel} +%package ext2-filter +Summary: ext2, ext3 and ext4 filesystem support for %{name} +Requires: %{name}-server%{?_isa} = %{version}-%{release} + +%description ext2-filter +This package contains ext2, ext3 and ext4 filesystem support for +%{name}. +%endif + + +%package stats-filter +Summary: Statistics filter for %{name} +Requires: %{name}-server%{?_isa} = %{version}-%{release} + +%description stats-filter +Display statistics about operations. + + +%package tar-filter +Summary: Tar archive filter for %{name} +Requires: %{name}-server%{?_isa} = %{version}-%{release} +Requires: tar + +%description tar-filter +This package is a tar archive filter for %{name}. + + +%package xz-filter +Summary: XZ filter for %{name} +Requires: %{name}-server%{?_isa} = %{version}-%{release} + +%description xz-filter +This package is the xz filter for %{name}. + + +%package devel +Summary: Development files and documentation for %{name} +Requires: %{name}-server%{?_isa} = %{version}-%{release} +Requires: pkgconfig + +%description devel +This package contains development files and documentation +for %{name}. Install this package if you want to develop +plugins for %{name}. + + +%package srpm-macros +Summary: RPM Provides rules for %{name} plugins and filters +BuildArch: noarch + +%description srpm-macros +This package contains RPM rules that create the automatic Provides: +for %{name} plugins and filters found in the plugins directory. + + +%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}. + + +%if 0%{?with_selinux} +%package selinux +Summary: %{name} SELinux policy +BuildArch: noarch +Requires: selinux-policy-%{selinuxtype} +Requires(post):selinux-policy-%{selinuxtype} +BuildRequires: selinux-policy-devel +%{?selinux_requires} + +%description selinux +%{nbdkit} SELinux policy module. +%endif + + +%if 0%{?have_mingw} +%package -n mingw32-%{name} +Summary: nbdkit binary, plugins, filters, development files for Windows +BuildArch: noarch +Requires: mingw32-filesystem +Requires: pkgconfig + +%description -n mingw32-%{name} +NBD is a protocol for accessing block devices (hard disks and +disk-like things) over the network. + +nbdkit is a toolkit for creating NBD servers. + +This package contains the nbdkit binary, plugins, filters and +development kit for 32 bit versions of Windows. + + +%package -n mingw64-%{name} +Summary: nbdkit binary, plugins, filters, development files for Windows +BuildArch: noarch +Requires: mingw64-filesystem +Requires: pkgconfig + +%description -n mingw64-%{name} +NBD is a protocol for accessing block devices (hard disks and +disk-like things) over the network. + +nbdkit is a toolkit for creating NBD servers. + +This package contains the nbdkit binary, plugins, filters and +development kit for 64 bit versions of Windows. + + +%{?mingw_debug_package} +%endif + + +%prep +%if 0%{verify_tarball_signature} +%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' +%endif +%autosetup -p1 -S git +autoreconf -i + + +%build +mkdir build_native +pushd build_native +%global _configure ../configure + +# Golang bindings are not enabled in the build since they don't +# need to be. Most people would use them by copying the upstream +# package into their vendor/ directory. +export PYTHON=%{__python3} +%configure \ + --disable-static \ + --with-extra='%{name}-%{version}-%{release}' \ + --with-tls-priority=@NBDKIT,SYSTEM \ + --with-bash-completions \ + --with-curl \ + --with-gnutls \ + --with-liblzma \ + --with-libnbd \ + --with-manpages \ + --with-selinux \ + --with-ssh \ + --with-zlib \ +%if !0%{?rhel} + --with-zlib-ng \ +%else + --without-zlib-ng \ +%endif + --enable-linuxdisk \ + --enable-python \ + --disable-golang \ + --disable-rust \ + --disable-valgrind \ +%if !0%{?rhel} && 0%{?have_ocaml} + --enable-ocaml \ +%else + --disable-ocaml \ +%endif +%if !0%{?rhel} + --enable-lua \ + --enable-perl \ + --enable-tcl \ + --enable-torrent \ + --with-ext2 \ + --with-iso \ + --with-libvirt \ +%else + --disable-lua \ + --disable-perl \ + --disable-tcl \ + --disable-torrent \ + --without-ext2 \ + --without-iso \ + --without-libvirt \ +%endif +%if 0%{?have_blkio} + --with-libblkio \ +%else + --without-libblkio \ +%endif +%ifarch x86_64 + --enable-vddk \ +%else + --disable-vddk \ +%endif +%if !0%{?rhel} && 0%{?have_libguestfs} + --with-libguestfs \ +%else + --without-libguestfs \ +%endif +%ifarch !0%{?rhel} && 0%{?have_libguestfs} && %{complete_test_arches} + --enable-libguestfs-tests \ +%else + --disable-libguestfs-tests \ +%endif + %{nil} + +# Verify that it picked the correct version of Python +# to avoid RHBZ#1404631 happening again silently. +grep '^PYTHON_VERSION = 3' Makefile + +%make_build + +%if 0%{?with_selinux} +# SELinux policy (originally from selinux-policy-contrib) +# this policy module will override the production module +mkdir selinux +cp -p %{SOURCE6} selinux/ +cp -p %{SOURCE7} selinux/ +cp -p %{SOURCE8} selinux/ + +make -f %{_datadir}/selinux/devel/Makefile %{modulename}.pp +bzip2 -9 %{modulename}.pp +%endif + +popd + +%if 0%{?have_mingw} +# MC=no is a temporary hack until this bug is fixed in binutils: +# https://sourceware.org/bugzilla/show_bug.cgi?id=31283 +%mingw_configure \ + MC=no \ + --disable-static \ + --enable-shared \ + --with-extra='%{name}-%{version}-%{release}' \ + --with-tls-priority=@NBDKIT,SYSTEM \ + --disable-golang \ + --disable-libguestfs-tests \ + --disable-linuxdisk \ + --disable-lua \ + --disable-ocaml \ + --disable-perl \ + --disable-python \ + --disable-rust \ + --disable-tcl \ + --disable-torrent \ + --disable-valgrind \ + --disable-vddk \ + --without-bash-completions \ + --without-curl \ + --without-ext2 \ + --with-gnutls \ + --without-iso \ + --without-libblkio \ + --without-libguestfs \ + --without-libnbd \ + --without-libvirt \ + --with-liblzma \ + --without-manpages \ + --without-selinux \ + --without-ssh \ + --with-zlib \ + %{nil} + +%mingw_make %{?_smp_mflags} +%endif + + +%install +pushd build_native +%make_install + +# Delete libtool crap. +find $RPM_BUILD_ROOT -name '*.la' -delete + +# If cargo happens to be installed on the machine then the +# rust plugin is built. Delete it if this happens. +rm -f $RPM_BUILD_ROOT%{_mandir}/man3/nbdkit-rust-plugin.3* + +%if 0%{?rhel} +# In RHEL, remove some plugins and filters we cannot --disable. +for f in cc cdi ; do + rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/nbdkit-$f-plugin.so + rm -f $RPM_BUILD_ROOT%{_mandir}/man?/nbdkit-$f-plugin.* +done +for f in gcs S3 ; do + rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/nbdkit-$f-plugin + rm -f $RPM_BUILD_ROOT%{_mandir}/man1/nbdkit-$f-plugin.1* +done +rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/filters/nbdkit-qcow2dec-filter.so +rm -f $RPM_BUILD_ROOT%{_mandir}/man1/nbdkit-qcow2dec-filter.1* +%endif + +# Install RPM dependency generator. +mkdir -p $RPM_BUILD_ROOT%{_rpmconfigdir}/fileattrs/ +install -m 0644 %{SOURCE4} $RPM_BUILD_ROOT%{_rpmconfigdir}/fileattrs/ +install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_rpmconfigdir}/ + +%if 0%{?with_selinux} +install -D -m 0644 %{modulename}.pp.bz2 $RPM_BUILD_ROOT%{_datadir}/selinux/packages/%{selinuxtype}/%{modulename}.pp.bz2 +install -D -p -m 0644 selinux/%{modulename}.if $RPM_BUILD_ROOT%{_datadir}/selinux/devel/include/distributed/%{modulename}.if +%endif +popd + +%if 0%{?have_mingw} +%mingw_make_install + +# Remove .la files +rm -f $RPM_BUILD_ROOT%{mingw32_libdir}/*.la +rm -f $RPM_BUILD_ROOT%{mingw64_libdir}/*.la + +# The .def files aren't interesting for other binaries +rm -f $RPM_BUILD_ROOT%{mingw32_bindir}/*.def +rm -f $RPM_BUILD_ROOT%{mingw64_bindir}/*.def + +# Remove man pages which duplicate stuff in Fedora already. +rm -rf $RPM_BUILD_ROOT%{mingw32_mandir} +rm -rf $RPM_BUILD_ROOT%{mingw64_mandir} + +%mingw_debug_install_post +%endif + + +%check +%ifnarch %{broken_test_arches} +pushd build_native +function skip_test () +{ + for f in "$@"; do + rm -f "$f" + echo 'exit 77' > "$f" + chmod +x "$f" + done +} + +# Workaround for broken libvirt (RHBZ#1138604). +mkdir -p $HOME/.cache/libvirt + +# tests/test-captive.sh is racy especially on s390x. We need to +# rethink this test upstream. +skip_test tests/test-captive.sh + +%ifarch s390x +# Temporarily kill tests/test-cache-max-size.sh since it fails +# sometimes on s390x for unclear reasons. +skip_test tests/test-cache-max-size.sh +%endif + +# Temporarily kill test-nbd-tls.sh and test-nbd-tls-psk.sh +# https://www.redhat.com/archives/libguestfs/2020-March/msg00191.html +skip_test tests/test-nbd-tls.sh tests/test-nbd-tls-psk.sh + +# This test fails on RHEL 9 aarch64 & ppc64le with the error: +# nbdkit: error: allocator=malloc: mlock: Cannot allocate memory +# It could be the mlock limit on the builder is too low. +# https://bugzilla.redhat.com/show_bug.cgi?id=2044432 +%if 0%{?rhel} +%ifarch aarch64 %{power64} +skip_test tests/test-memory-allocator-malloc-mlock.sh +%endif +%endif + +# Make sure we can see the debug messages (RHBZ#1230160). +export LIBGUESTFS_DEBUG=1 +export LIBGUESTFS_TRACE=1 + +%make_build check || { + cat tests/test-suite.log + exit 1 + } +popd +%endif + + +%if 0%{?have_ocaml} +%ldconfig_scriptlets plugin-ocaml +%endif + + +%if 0%{?with_selinux} +# SELinux contexts are saved so that only affected files can be +# relabeled after the policy module installation +%pre selinux +%selinux_relabel_pre -s %{selinuxtype} + +%post selinux +%selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/%{selinuxtype}/%{modulename}.pp.bz2 + +%postun selinux +if [ $1 -eq 0 ]; then + %selinux_modules_uninstall -s %{selinuxtype} %{modulename} +fi + +%posttrans selinux +%selinux_relabel_post -s %{selinuxtype} +# if with_selinux +%endif + + +%files +# metapackage so empty + + +%files server +%doc README.md +%license LICENSE +%{_sbindir}/nbdkit +%dir %{_libdir}/%{name} +%dir %{_libdir}/%{name}/plugins +%{_libdir}/%{name}/plugins/nbdkit-null-plugin.so +%dir %{_libdir}/%{name}/filters +%{_mandir}/man1/nbdkit.1* +%{_mandir}/man1/nbdkit-captive.1* +%{_mandir}/man1/nbdkit-client.1* +%{_mandir}/man1/nbdkit-loop.1* +%{_mandir}/man1/nbdkit-null-plugin.1* +%{_mandir}/man1/nbdkit-probing.1* +%{_mandir}/man1/nbdkit-protocol.1* +%{_mandir}/man1/nbdkit-service.1* +%{_mandir}/man1/nbdkit-security.1* +%{_mandir}/man1/nbdkit-tls.1* + + +%files basic-plugins +%doc README.md +%license LICENSE +%{_libdir}/%{name}/plugins/nbdkit-data-plugin.so +%{_libdir}/%{name}/plugins/nbdkit-eval-plugin.so +%{_libdir}/%{name}/plugins/nbdkit-file-plugin.so +%{_libdir}/%{name}/plugins/nbdkit-floppy-plugin.so +%{_libdir}/%{name}/plugins/nbdkit-full-plugin.so +%{_libdir}/%{name}/plugins/nbdkit-info-plugin.so +%{_libdir}/%{name}/plugins/nbdkit-memory-plugin.so +%{_libdir}/%{name}/plugins/nbdkit-ondemand-plugin.so +%{_libdir}/%{name}/plugins/nbdkit-ones-plugin.so +%{_libdir}/%{name}/plugins/nbdkit-partitioning-plugin.so +%{_libdir}/%{name}/plugins/nbdkit-pattern-plugin.so +%{_libdir}/%{name}/plugins/nbdkit-random-plugin.so +%{_libdir}/%{name}/plugins/nbdkit-sh-plugin.so +%{_libdir}/%{name}/plugins/nbdkit-sparse-random-plugin.so +%{_libdir}/%{name}/plugins/nbdkit-split-plugin.so +%{_libdir}/%{name}/plugins/nbdkit-zero-plugin.so +%{_mandir}/man1/nbdkit-data-plugin.1* +%{_mandir}/man1/nbdkit-eval-plugin.1* +%{_mandir}/man1/nbdkit-file-plugin.1* +%{_mandir}/man1/nbdkit-floppy-plugin.1* +%{_mandir}/man1/nbdkit-full-plugin.1* +%{_mandir}/man1/nbdkit-info-plugin.1* +%{_mandir}/man1/nbdkit-memory-plugin.1* +%{_mandir}/man1/nbdkit-ondemand-plugin.1* +%{_mandir}/man1/nbdkit-ones-plugin.1* +%{_mandir}/man1/nbdkit-partitioning-plugin.1* +%{_mandir}/man1/nbdkit-pattern-plugin.1* +%{_mandir}/man1/nbdkit-random-plugin.1* +%{_mandir}/man3/nbdkit-sh-plugin.3* +%{_mandir}/man1/nbdkit-sparse-random-plugin.1* +%{_mandir}/man1/nbdkit-split-plugin.1* +%{_mandir}/man1/nbdkit-zero-plugin.1* + + +%files example-plugins +%doc README.md +%license LICENSE +%{_libdir}/%{name}/plugins/nbdkit-example*-plugin.so +%if !0%{?rhel} +%{_libdir}/%{name}/plugins/nbdkit-example4-plugin +%endif +%{_mandir}/man1/nbdkit-example*-plugin.1* + + +%if 0%{?have_blkio} +%files blkio-plugin +%doc README.md +%license LICENSE +%{_libdir}/%{name}/plugins/nbdkit-blkio-plugin.so +%{_mandir}/man1/nbdkit-blkio-plugin.1* +%endif + + +%if !0%{?rhel} +%files cc-plugin +%doc README.md +%license LICENSE +%{_libdir}/%{name}/plugins/nbdkit-cc-plugin.so +%{_mandir}/man3/nbdkit-cc-plugin.3* +%endif + + +%if !0%{?rhel} +%files cdi-plugin +%doc README.md +%license LICENSE +%{_libdir}/%{name}/plugins/nbdkit-cdi-plugin.so +%{_mandir}/man1/nbdkit-cdi-plugin.1* +%endif + + +%files curl-plugin +%doc README.md +%license LICENSE +%{_libdir}/%{name}/plugins/nbdkit-curl-plugin.so +%{_mandir}/man1/nbdkit-curl-plugin.1* + + +%if !0%{?rhel} +%files gcs-plugin +%doc README.md +%license LICENSE +%{_libdir}/%{name}/plugins/nbdkit-gcs-plugin +%{_mandir}/man1/nbdkit-gcs-plugin.1* +%endif + + +%if !0%{?rhel} && 0%{?have_libguestfs} +%files guestfs-plugin +%doc README.md +%license LICENSE +%{_libdir}/%{name}/plugins/nbdkit-guestfs-plugin.so +%{_mandir}/man1/nbdkit-guestfs-plugin.1* +%endif + + +%if !0%{?rhel} +%files iso-plugin +%doc README.md +%license LICENSE +%{_libdir}/%{name}/plugins/nbdkit-iso-plugin.so +%{_mandir}/man1/nbdkit-iso-plugin.1* +%endif + + +%if !0%{?rhel} +%files libvirt-plugin +%doc README.md +%license LICENSE +%{_libdir}/%{name}/plugins/nbdkit-libvirt-plugin.so +%{_mandir}/man1/nbdkit-libvirt-plugin.1* +%endif + + +%files linuxdisk-plugin +%doc README.md +%license LICENSE +%{_libdir}/%{name}/plugins/nbdkit-linuxdisk-plugin.so +%{_mandir}/man1/nbdkit-linuxdisk-plugin.1* + + +%if !0%{?rhel} +%files lua-plugin +%doc README.md +%license LICENSE +%{_libdir}/%{name}/plugins/nbdkit-lua-plugin.so +%{_mandir}/man3/nbdkit-lua-plugin.3* +%endif + + +%files nbd-plugin +%doc README.md +%license LICENSE +%{_libdir}/%{name}/plugins/nbdkit-nbd-plugin.so +%{_mandir}/man1/nbdkit-nbd-plugin.1* + + +%if !0%{?rhel} && 0%{?have_ocaml} +%files ocaml-plugin +%doc README.md +%license LICENSE +%{_libdir}/libnbdkitocaml.so.* + +%files ocaml-plugin-devel +%{_libdir}/libnbdkitocaml.so +%{_libdir}/ocaml/NBDKit.* +%{_mandir}/man3/nbdkit-ocaml-plugin.3* +%{_mandir}/man3/NBDKit.3* +%endif + + +%if !0%{?rhel} +%files perl-plugin +%doc README.md +%license LICENSE +%{_libdir}/%{name}/plugins/nbdkit-perl-plugin.so +%{_mandir}/man3/nbdkit-perl-plugin.3* +%endif + + +%files python-plugin +%doc README.md +%license LICENSE +%{_libdir}/%{name}/plugins/nbdkit-python-plugin.so +%{_mandir}/man3/nbdkit-python-plugin.3* + + +%if !0%{?rhel} +%files S3-plugin +%doc README.md +%license LICENSE +%{_libdir}/%{name}/plugins/nbdkit-S3-plugin +%{_mandir}/man1/nbdkit-S3-plugin.1* +%endif + + +%files ssh-plugin +%doc README.md +%license LICENSE +%{_libdir}/%{name}/plugins/nbdkit-ssh-plugin.so +%{_mandir}/man1/nbdkit-ssh-plugin.1* + + +%if !0%{?rhel} +%files tcl-plugin +%doc README.md +%license LICENSE +%{_libdir}/%{name}/plugins/nbdkit-tcl-plugin.so +%{_mandir}/man3/nbdkit-tcl-plugin.3* +%endif + + +%files tmpdisk-plugin +%doc README.md +%license LICENSE +%{_libdir}/%{name}/plugins/nbdkit-tmpdisk-plugin.so +%{_mandir}/man1/nbdkit-tmpdisk-plugin.1* + + +%if !0%{?rhel} +%files torrent-plugin +%doc README.md +%license LICENSE +%{_libdir}/%{name}/plugins/nbdkit-torrent-plugin.so +%{_mandir}/man1/nbdkit-torrent-plugin.1* +%endif + + +%ifarch x86_64 +%files vddk-plugin +%doc README.md plugins/vddk/README.VDDK +%license LICENSE +%{_libdir}/%{name}/plugins/nbdkit-vddk-plugin.so +%{_mandir}/man1/nbdkit-vddk-plugin.1* +%endif + + +%files basic-filters +%doc README.md +%license LICENSE +%{_libdir}/%{name}/filters/nbdkit-blocksize-filter.so +%{_libdir}/%{name}/filters/nbdkit-blocksize-policy-filter.so +%{_libdir}/%{name}/filters/nbdkit-cache-filter.so +%{_libdir}/%{name}/filters/nbdkit-cacheextents-filter.so +%{_libdir}/%{name}/filters/nbdkit-checkwrite-filter.so +%{_libdir}/%{name}/filters/nbdkit-cow-filter.so +%{_libdir}/%{name}/filters/nbdkit-ddrescue-filter.so +%{_libdir}/%{name}/filters/nbdkit-delay-filter.so +%{_libdir}/%{name}/filters/nbdkit-error-filter.so +%{_libdir}/%{name}/filters/nbdkit-evil-filter.so +%{_libdir}/%{name}/filters/nbdkit-exitlast-filter.so +%{_libdir}/%{name}/filters/nbdkit-exitwhen-filter.so +%{_libdir}/%{name}/filters/nbdkit-exportname-filter.so +%{_libdir}/%{name}/filters/nbdkit-extentlist-filter.so +%{_libdir}/%{name}/filters/nbdkit-fua-filter.so +%{_libdir}/%{name}/filters/nbdkit-gzip-filter.so +%{_libdir}/%{name}/filters/nbdkit-ip-filter.so +%{_libdir}/%{name}/filters/nbdkit-limit-filter.so +%{_libdir}/%{name}/filters/nbdkit-log-filter.so +%{_libdir}/%{name}/filters/nbdkit-luks-filter.so +%{_libdir}/%{name}/filters/nbdkit-multi-conn-filter.so +%{_libdir}/%{name}/filters/nbdkit-nocache-filter.so +%{_libdir}/%{name}/filters/nbdkit-noextents-filter.so +%{_libdir}/%{name}/filters/nbdkit-nofilter-filter.so +%{_libdir}/%{name}/filters/nbdkit-noparallel-filter.so +%{_libdir}/%{name}/filters/nbdkit-nozero-filter.so +%{_libdir}/%{name}/filters/nbdkit-offset-filter.so +%{_libdir}/%{name}/filters/nbdkit-partition-filter.so +%{_libdir}/%{name}/filters/nbdkit-pause-filter.so +%{_libdir}/%{name}/filters/nbdkit-protect-filter.so +%if !0%{?rhel} +%{_libdir}/%{name}/filters/nbdkit-qcow2dec-filter.so +%endif +%{_libdir}/%{name}/filters/nbdkit-rate-filter.so +%{_libdir}/%{name}/filters/nbdkit-readahead-filter.so +%{_libdir}/%{name}/filters/nbdkit-readonly-filter.so +%{_libdir}/%{name}/filters/nbdkit-retry-filter.so +%{_libdir}/%{name}/filters/nbdkit-retry-request-filter.so +%{_libdir}/%{name}/filters/nbdkit-rotational-filter.so +%{_libdir}/%{name}/filters/nbdkit-scan-filter.so +%{_libdir}/%{name}/filters/nbdkit-spinning-filter.so +%{_libdir}/%{name}/filters/nbdkit-swab-filter.so +%{_libdir}/%{name}/filters/nbdkit-tls-fallback-filter.so +%{_libdir}/%{name}/filters/nbdkit-truncate-filter.so +%{_mandir}/man1/nbdkit-blocksize-filter.1* +%{_mandir}/man1/nbdkit-blocksize-policy-filter.1* +%{_mandir}/man1/nbdkit-cache-filter.1* +%{_mandir}/man1/nbdkit-cacheextents-filter.1* +%{_mandir}/man1/nbdkit-checkwrite-filter.1* +%{_mandir}/man1/nbdkit-cow-filter.1* +%{_mandir}/man1/nbdkit-ddrescue-filter.1* +%{_mandir}/man1/nbdkit-delay-filter.1* +%{_mandir}/man1/nbdkit-error-filter.1* +%{_mandir}/man1/nbdkit-evil-filter.1* +%{_mandir}/man1/nbdkit-exitlast-filter.1* +%{_mandir}/man1/nbdkit-exitwhen-filter.1* +%{_mandir}/man1/nbdkit-exportname-filter.1* +%{_mandir}/man1/nbdkit-extentlist-filter.1* +%{_mandir}/man1/nbdkit-fua-filter.1* +%{_mandir}/man1/nbdkit-gzip-filter.1* +%{_mandir}/man1/nbdkit-ip-filter.1* +%{_mandir}/man1/nbdkit-limit-filter.1* +%{_mandir}/man1/nbdkit-log-filter.1* +%{_mandir}/man1/nbdkit-luks-filter.1* +%{_mandir}/man1/nbdkit-multi-conn-filter.1* +%{_mandir}/man1/nbdkit-nocache-filter.1* +%{_mandir}/man1/nbdkit-noextents-filter.1* +%{_mandir}/man1/nbdkit-nofilter-filter.1* +%{_mandir}/man1/nbdkit-noparallel-filter.1* +%{_mandir}/man1/nbdkit-nozero-filter.1* +%{_mandir}/man1/nbdkit-offset-filter.1* +%{_mandir}/man1/nbdkit-partition-filter.1* +%{_mandir}/man1/nbdkit-pause-filter.1* +%{_mandir}/man1/nbdkit-protect-filter.1* +%if !0%{?rhel} +%{_mandir}/man1/nbdkit-qcow2dec-filter.1* +%endif +%{_mandir}/man1/nbdkit-rate-filter.1* +%{_mandir}/man1/nbdkit-readahead-filter.1* +%{_mandir}/man1/nbdkit-readonly-filter.1* +%{_mandir}/man1/nbdkit-retry-filter.1* +%{_mandir}/man1/nbdkit-retry-request-filter.1* +%{_mandir}/man1/nbdkit-rotational-filter.1* +%{_mandir}/man1/nbdkit-scan-filter.1* +%{_mandir}/man1/nbdkit-spinning-filter.1* +%{_mandir}/man1/nbdkit-swab-filter.1* +%{_mandir}/man1/nbdkit-tls-fallback-filter.1* +%{_mandir}/man1/nbdkit-truncate-filter.1* + + +%files bzip2-filter +%doc README.md +%license LICENSE +%{_libdir}/%{name}/filters/nbdkit-bzip2-filter.so +%{_mandir}/man1/nbdkit-bzip2-filter.1* + + +%if !0%{?rhel} +%files ext2-filter +%doc README.md +%license LICENSE +%{_libdir}/%{name}/filters/nbdkit-ext2-filter.so +%{_mandir}/man1/nbdkit-ext2-filter.1* +%endif + + +%files stats-filter +%doc README.md +%license LICENSE +%{_libdir}/%{name}/filters/nbdkit-stats-filter.so +%{_mandir}/man1/nbdkit-stats-filter.1* + + +%files tar-filter +%doc README.md +%license LICENSE +%{_libdir}/%{name}/filters/nbdkit-tar-filter.so +%{_mandir}/man1/nbdkit-tar-filter.1* + + +%files xz-filter +%doc README.md +%license LICENSE +%{_libdir}/%{name}/filters/nbdkit-xz-filter.so +%{_mandir}/man1/nbdkit-xz-filter.1* + + +%files devel +%doc BENCHMARKING OTHER_PLUGINS README.md SECURITY TODO +%license LICENSE +# Include the source of the example plugins in the documentation. +%doc plugins/example*/*.c +%if !0%{?rhel} +%doc build_native/plugins/example4/nbdkit-example4-plugin +%doc plugins/lua/example.lua +%endif +%if !0%{?rhel} && 0%{?have_ocaml} +%doc plugins/ocaml/example.ml +%endif +%if !0%{?rhel} +%doc plugins/perl/example.pl +%endif +%doc plugins/python/examples/*.py +%doc plugins/sh/examples/*.sh +%if !0%{?rhel} +%doc plugins/tcl/example.tcl +%endif +%{_includedir}/nbdkit-common.h +%{_includedir}/nbdkit-filter.h +%{_includedir}/nbdkit-plugin.h +%{_includedir}/nbdkit-version.h +%{_includedir}/nbd-protocol.h +%{_mandir}/man3/nbdkit-filter.3* +%{_mandir}/man3/nbdkit-plugin.3* +%{_mandir}/man3/nbdkit_*.3* +%{_mandir}/man1/nbdkit-release-notes-1.*.1* +%{_libdir}/pkgconfig/nbdkit.pc + + +%files srpm-macros +%license LICENSE +%{_rpmconfigdir}/fileattrs/nbdkit.attr +%{_rpmconfigdir}/nbdkit-find-provides + + +%files bash-completion +%license LICENSE +%dir %{_datadir}/bash-completion/completions +%{_datadir}/bash-completion/completions/nbdkit + + +%if 0%{?with_selinux} +%files selinux +%{_datadir}/selinux/packages/%{selinuxtype}/%{modulename}.pp.* +%{_datadir}/selinux/devel/include/distributed/%{modulename}.if +%ghost %verify(not md5 size mode mtime) %{_sharedstatedir}/selinux/%{selinuxtype}/active/modules/200/%{modulename} +%endif + + +%if 0%{?have_mingw} +%files -n mingw32-%{name} +%license LICENSE +%{mingw32_sbindir}/nbdkit.exe +%{mingw32_libdir}/%{name}/ +%{mingw32_libdir}/libnbdkit.a +%{mingw32_libdir}/pkgconfig/%{name}.pc +%{mingw32_includedir}/*.h + + +%files -n mingw64-%{name} +%license LICENSE +%{mingw64_sbindir}/nbdkit.exe +%{mingw64_libdir}/%{name}/ +%{mingw64_libdir}/libnbdkit.a +%{mingw64_libdir}/pkgconfig/%{name}.pc +%{mingw64_includedir}/*.h +%endif + + +%changelog +* Fri Jul 26 2024 Richard W.M. Jones - 1.40.0-2 +- Rebase to nbdkit 1.40.0 + related: RHEL-49594 +- Send the last error to the NBD client + resolves: RHEL-50666 + +* Fri Jul 12 2024 Richard W.M. Jones - 1.38.0-6 +- Re-add libxcrypt dependency + resolves: RHEL-47272 + +* Mon Jun 24 2024 Troy Dawson - 1.38.0-5 +- Bump release for June 2024 mass rebuild + +* Wed Jun 19 2024 Richard W.M. Jones - 1.38.0-4 +- OCaml 5.2.0 ppc64le fix + +* Fri May 31 2024 Richard W.M. Jones - 1.38.0-3 +- Rebuild for OCaml 5.2 + +* Thu Apr 25 2024 Miroslav Rezanina - 1.38.0-2 +- Removing dependency on libxcrypt-compat +- Resolves: RHEL-33759 + +* Mon Apr 15 2024 Miroslav Rezanina - 1.38.0-1 +- Update to 1.38.0 upstream release +- Resolves: RHEL-32748 + +* Sun Feb 11 2024 Richard W.M. Jones - 1.37.7-1 +- New upstream development version 1.37.7 +- New nbdkit-gcs-plugin for Google Cloud Storage + +* Thu Feb 01 2024 Richard W.M. Jones - 1.37.6-1 +- New upstream development version 1.37.6 + +* Tue Jan 23 2024 Richard W.M. Jones - 1.37.5-3 +- Add mingw{32,64}-nbdkit subpackages + +* Sun Jan 21 2024 Fedora Release Engineering - 1.37.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Tue Jan 16 2024 Richard W.M. Jones - 1.37.5-1 +- New upstream development version 1.37.5 + +* Wed Jan 03 2024 Mamoru TASAKA - 1.37.4-2 +- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.3 + +* Tue Dec 19 2023 Richard W.M. Jones - 1.37.4-1 +- New upstream development version 1.37.4 + +* Mon Dec 18 2023 Richard W.M. Jones - 1.37.3-4 +- OCaml 5.1.1 + s390x code gen fix for Fedora 40 + +* Thu Dec 14 2023 Richard W.M. Jones - 1.37.3-3 +- OCaml 5.1.1 rebuild for Fedora 40 + +* Mon Dec 04 2023 Richard W.M. Jones - 1.37.3-2 +- Add upstream fix for GCC 14 + +* Sun Nov 26 2023 Richard W.M. Jones - 1.37.3-1 +- New upstream development version 1.37.3 + +* Tue Nov 07 2023 Richard W.M. Jones - 1.37.2-1 +- New upstream development version 1.37.2 +- New nbdkit-readonly-filter. + +* Wed Nov 01 2023 Richard W.M. Jones - 1.37.1-2 +- Add experimental SELinux support (RHEL-5174) + +* Mon Oct 23 2023 Richard W.M. Jones - 1.37.1-1 +- New upstream development version 1.37.1 + +* Fri Oct 06 2023 Richard W.M. Jones - 1.36.0-3 +- OCaml 5.1 rebuild for Fedora 40 + +* Wed Sep 27 2023 Richard W.M. Jones - 1.36.0-2 +- New upstream stable version 1.36.0 +- Enable blkio support again on Fedora i686. + +* Mon Sep 11 2023 Richard W.M. Jones - 1.35.13-1 +- New upstream development version 1.35.13 + +* Fri Sep 08 2023 Richard W.M. Jones - 1.35.12-1 +- New upstream development version 1.35.12 + +* Wed Aug 30 2023 Richard W.M. Jones - 1.35.11-2 +- New upstream development version 1.35.11 + +* Sat Aug 12 2023 Richard W.M. Jones - 1.35.10-1 +- New upstream development version 1.35.10 +- Use zlib-ng on Fedora but not RHEL. + +* Sat Aug 05 2023 Richard W.M. Jones - 1.35.9-1 +- New upstream development version 1.35.9 +- Disable libblkio on i686 (RHBZ#2229372) + +* Tue Aug 01 2023 Richard W.M. Jones - 1.35.8-1 +- New upstream development version 1.35.8 + +* Sun Jul 23 2023 Richard W.M. Jones - 1.35.7-2 +- New upstream development version 1.35.7 +- New nbdkit-qcow2dec-filter. + +* Thu Jul 20 2023 Fedora Release Engineering - 1.35.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Fri Jul 14 2023 Richard W.M. Jones - 1.35.6-1 +- New upstream development version 1.35.6 + +* Thu Jul 13 2023 Jitka Plesnikova - 1.35.5-6 +- Perl 5.38 re-rebuild updated packages + +* Wed Jul 12 2023 Richard W.M. Jones - 1.35.5-5 +- OCaml 5.0 rebuild for Fedora 39 + +* Tue Jul 11 2023 Jitka Plesnikova - 1.35.5-4 +- Perl 5.38 rebuild + +* Mon Jul 10 2023 Jerry James - 1.35.5-3 +- OCaml 5.0.0 rebuild + +* Tue Jul 04 2023 Python Maint - 1.35.5-2 +- Rebuilt for Python 3.12 + +* Mon Jun 12 2023 Richard W.M. Jones - 1.35.5-1 +- New upstream development version 1.35.5 + +* Mon Jun 05 2023 Richard W.M. Jones - 1.35.4-2 +- Migrated to SPDX license + +* Sun May 28 2023 Richard W.M. Jones - 1.35.4-1 +- New upstream development version 1.35.4 + +* Thu May 18 2023 Richard W.M. Jones - 1.35.3-1 +- New upstream development version 1.35.3 +- New plugin: ones +- New filter: evil + +* Wed May 10 2023 Richard W.M. Jones - 1.35.2-1 +- New upstream development version 1.35.2 + +* Sat Apr 29 2023 Richard W.M. Jones - 1.35.1-1 +- New upstream development version 1.35.1 + +* Tue Apr 18 2023 Richard W.M. Jones - 1.34.1-1 +- New upstream stable version 1.34.1 + +* Fri Apr 14 2023 Richard W.M. Jones - 1.34.0-1 +- New upstream stable version 1.34.0 + +* Thu Apr 13 2023 Richard W.M. Jones - 1.33.12-1 +- New upstream development version 1.33.12 + +* Thu Mar 09 2023 Richard W.M. Jones - 1.33.11-1 +- New upstream development version 1.33.11 + +* Tue Feb 28 2023 Richard W.M. Jones - 1.33.10-1 +- New upstream development version 1.33.10 + +* Sat Feb 25 2023 Richard W.M. Jones - 1.33.9-1 +- New upstream development version 1.33.9 + +* Tue Feb 07 2023 Richard W.M. Jones - 1.33.8-1 +- New upstream development version 1.33.8 + +* Tue Jan 24 2023 Richard W.M. Jones - 1.33.7-3 +- Rebuild OCaml packages for F38 + +* Thu Jan 19 2023 Fedora Release Engineering - 1.33.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Sat Jan 14 2023 Richard W.M. Jones - 1.33.7-1 +- New upstream development version 1.33.7 + +* Wed Jan 11 2023 Richard W.M. Jones - 1.33.6-1 +- New upstream development version 1.33.6 +- New plugin: nbdkit-blkio-plugin + +* Wed Jan 04 2023 Mamoru TASAKA - 1.33.5-2 +- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.2 + +* Tue Jan 03 2023 Richard W.M. Jones - 1.33.5-1 +- New upstream development version 1.33.5 + +* Sat Dec 03 2022 Richard W.M. Jones - 1.33.4-1 +- New upstream development version 1.33.4 + +* Fri Nov 18 2022 Richard W.M. Jones - 1.33.3-1 +- New upstream development version 1.33.3 + +* Tue Oct 11 2022 Richard W.M. Jones - 1.33.2-1 +- New upstream development version 1.33.2 + +* Thu Aug 18 2022 Richard W.M. Jones - 1.33.1-1 +- New upstream development version 1.33.1 + +* Thu Aug 11 2022 Richard W.M. Jones - 1.32.1-1 +- New upstream stable version 1.32.1 + +* Mon Aug 01 2022 Richard W.M. Jones - 1.32.0-1 +- New upstream stable version 1.32.0 + +* Fri Jul 29 2022 Richard W.M. Jones - 1.31.15-1 +- New upstream development version 1.31.15 + +* Sun Jul 24 2022 Richard W.M. Jones - 1.31.14-1 +- New upstream development version 1.31.14 + +* Fri Jul 22 2022 Fedora Release Engineering - 1.31.13-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Tue Jul 19 2022 Richard W.M. Jones - 1.31.13-1 +- New upstream development version 1.31.13 + +* Sun Jul 17 2022 Richard W.M. Jones - 1.31.12-1 +- New upstream development version 1.31.12 + +* Sun Jul 10 2022 Richard W.M. Jones - 1.31.11-1 +- New upstream development version 1.31.11 + +* Mon Jun 27 2022 Richard W.M. Jones - 1.31.10-1 +- New upstream development version 1.31.10 + +* Mon Jun 20 2022 Richard W.M. Jones - 1.31.9-3 +- OCaml 4.14.0 rebuild + +* Mon Jun 13 2022 Python Maint - 1.31.9-2 +- Rebuilt for Python 3.11 + +* Mon Jun 13 2022 Richard W.M. Jones - 1.31.9-1 +- New upstream development version 1.31.9 + +* Thu Jun 09 2022 Richard W.M. Jones - 1.31.8-1 +- New upstream development version 1.31.8 +- Rename README file. + +* Wed Jun 01 2022 Jitka Plesnikova - 1.31.7-2 +- Perl 5.36 rebuild + +* Thu May 19 2022 Richard W.M. Jones - 1.31.7-1 +- New upstream development version 1.31.7 + +* Sat May 14 2022 Richard W.M. Jones - 1.31.6-1 +- New upstream development version 1.31.6 +- New filter: scan + +* Mon May 09 2022 Richard W.M. Jones - 1.31.5-1 +- New upstream development version 1.31.5 + +* Mon May 09 2022 Richard W.M. Jones - 1.31.4-1 +- New upstream development version 1.31.4 +- Add new luks filter. + +* Sat May 07 2022 Richard W.M. Jones - 1.31.3-1 +- New upstream development version 1.31.3 +- Stats filter is now written in C++, move to a new subpackage. + +* Tue Apr 26 2022 Richard W.M. Jones - 1.31.2-1 +- New upstream development version 1.31.2 + +* Wed Apr 20 2022 Richard W.M. Jones - 1.31.1-1 +- New upstream development version 1.31.1 + +* Sat Apr 16 2022 Richard W.M. Jones - 1.30.3-1 +- New stable version 1.30.3 +- Remove dependency on ssh-keygen which was never really used. + +* Sat Apr 02 2022 Richard W.M. Jones - 1.30.2-1 +- New stable version 1.30.2 + +* Tue Mar 15 2022 Richard W.M. Jones - 1.30.1-1 +- New stable version 1.30.1 + +* Mon Feb 28 2022 Richard W.M. Jones - 1.30.0-3 +- Add nbdkit-srpm-macros + +* Thu Feb 24 2022 Richard W.M. Jones - 1.30.0-1 +- New stable version 1.30.0 + +* Sat Feb 19 2022 Richard W.M. Jones - 1.29.16-1 +- New upstream development version 1.29.16 +- New nbdkit-blocksize-policy-filter. + +* Tue Feb 15 2022 Richard W.M. Jones - 1.29.15-1 +- New upstream development version 1.29.15 + +* Thu Jan 27 2022 Mamoru TASAKA - 1.29.14-2 +- F-36: rebuild against ruby31 + +* Thu Jan 20 2022 Richard W.M. Jones - 1.29.14-1 +- New upstream development version 1.29.14 + +* Thu Jan 20 2022 Fedora Release Engineering - 1.29.13-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Sat Jan 15 2022 Richard W.M. Jones - 1.29.13-1 +- New upstream development version 1.29.13 + +* Tue Jan 04 2022 Richard W.M. Jones - 1.29.12-1 +- New upstream development version 1.29.12 + +* Sat Dec 18 2021 Richard W.M. Jones - 1.29.11-1 +- New upstream development version 1.29.11 +- Use new --disable-libguestfs-tests on non-guestfs arches. + +* Tue Dec 07 2021 Richard W.M. Jones - 1.29.9-1 +- New upstream development version 1.29.9 + +* Sat Dec 04 2021 Richard W.M. Jones - 1.29.8-1 +- New upstream development version 1.29.8 +- Add nbdkit-protect-filter. + +* Thu Nov 25 2021 Richard W.M. Jones - 1.29.7-2 +- Bump release and rebuild + +* Tue Nov 23 2021 Richard W.M. Jones - 1.29.7-1 +- New upstream development version 1.29.7 + +* Fri Nov 19 2021 Richard W.M. Jones - 1.29.6-1 +- New upstream development version 1.29.6 + +* Tue Nov 09 2021 Richard W.M. Jones - 1.29.5-1 +- New upstream development version 1.29.5 +- New minimum OCaml is 4.03 + +* Thu Nov 04 2021 Richard W.M. Jones - 1.29.4-1 +- New upstream development version 1.29.4 +- Remove references to nbdkit-streaming-plugin (now removed upstream) +- Move nbdkit-null-plugin to the nbdkit-server package + +* Tue Nov 02 2021 Richard W.M. Jones - 1.29.3-2 +- Switch to xorriso (instead of genisoimage) + +* Thu Oct 28 2021 Richard W.M. Jones - 1.29.3-1 +- New upstream development version 1.29.3 + +* Mon Oct 25 2021 Richard W.M. Jones - 1.29.2-1 +- New upstream development version 1.29.2 + +* Tue Oct 19 2021 Richard W.M. Jones - 1.29.1-1 +- New upstream development version 1.29.1 +- New filter: nbdkit-retry-request-filter + +* Mon Oct 04 2021 Richard W.M. Jones - 1.28.0-2 +- OCaml 4.13.1 build + +* Thu Sep 23 2021 Richard W.M. Jones - 1.28.0-1 +- New upstream stable branch version 1.28.0 + +* Tue Sep 21 2021 Richard W.M. Jones - 1.27.10-1 +- New upstream development version 1.27.10. + +* Tue Sep 14 2021 Sahana Prasad - 1.27.9-2 +- Rebuilt with OpenSSL 3.0.0 + +* Sat Sep 4 2021 Richard W.M. Jones - 1.27.9-1 +- New upstream development version 1.27.9. +- Remove patches which are upstream. + +* Wed Sep 1 2021 Richard W.M. Jones - 1.27.8-3 +- Re-enable tests on armv7. + +* Tue Aug 31 2021 Richard W.M. Jones - 1.27.8-2 +- Fix for qemu 6.1. + +* Mon Aug 23 2021 Richard W.M. Jones - 1.27.8-1 +- New upstream development version 1.27.8. +- Remove patch which is included upstream. + +* Thu Aug 19 2021 Eric Blake - 1.27.7-2 +- Include followup patch related to CVE-2021-3716. + +* Thu Aug 19 2021 Eric Blake - 1.27.7-1 +- New upstream development version 1.27.7; addresses CVE-2021-3716. + +* Fri Aug 13 2021 Eric Blake - 1.27.5-1 +- New upstream development version 1.27.5. + +* Thu Aug 05 2021 Richard W.M. Jones - 1.27.4-1 +- New upstream development version 1.27.4. + +* Fri Jul 23 2021 Richard W.M. Jones - 1.27.3-1 +- New upstream development version 1.27.3. + +* Thu Jul 22 2021 Fedora Release Engineering - 1.27.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Mon Jul 05 2021 Richard W.M. Jones - 1.27.2-1 +- New upstream development version 1.27.2. + +* Fri Jun 11 2021 Richard W.M. Jones - 1.27.1-1 +- New upstream development version 1.27.1. + +* Mon Jun 07 2021 Richard W.M. Jones - 1.26.0-1 +- New upstream version 1.26.0. + +* Fri Jun 04 2021 Python Maint - 1.25.9-2 +- Rebuilt for Python 3.10 + +* Thu Jun 03 2021 Richard W.M. Jones - 1.25.9-1 +- New upstream version 1.25.9. + +* Tue May 25 2021 Jitka Plesnikova - 1.25.8-2 +- Perl 5.34 re-rebuild of updated packages + +* Tue May 25 2021 Richard W.M. Jones - 1.25.8-1 +- New upstream version 1.25.8. + +* Tue May 25 2021 Jitka Plesnikova - 1.25.7-4 +- Perl 5.34 re-rebuild updated packages + +* Tue May 25 2021 Leigh Scott - 1.25.7-3 +- Rebuild for new libtorrent + +* Fri May 21 2021 Jitka Plesnikova - 1.25.7-2 +- Perl 5.34 rebuild + +* Wed May 05 2021 Richard W.M. Jones - 1.25.7-1 +- New upstream version 1.25.7. +- Disable libguestfs tests on riscv64. + +* Sat Apr 10 2021 Richard W.M. Jones - 1.25.6-1 +- New upstream version 1.25.6. + +* Sat Apr 03 2021 Richard W.M. Jones - 1.25.5-1 +- New upstream version 1.25.5. + +* Mon Mar 15 2021 Richard W.M. Jones - 1.25.4-2 +- Fix upstream URL. +- Enable non-guestfs tests on all arches. + +* Wed Mar 10 2021 Richard W.M. Jones - 1.25.4-1 +- New upstream development version 1.25.4. +- New filter: multi-conn + +* Tue Mar 9 2021 Richard W.M. Jones - 1.25.3-3 +- Make nbdkit-vddk-plugin depend on libxcrypt-compat (RHBZ#1931818). + +* Thu Mar 4 2021 Richard W.M. Jones - 1.25.3-2 +- Remove socat dependency in RHEL 9. + +* Tue Mar 2 2021 Richard W.M. Jones - 1.25.3-1 +- New upstream development version 1.25.3. + +* Tue Mar 2 2021 Richard W.M. Jones - 1.25.2-2 +- OCaml 4.12.0 build (RHBZ#1934138). + +* Wed Feb 03 2021 Richard W.M. Jones - 1.25.2-1 +- New upstream development version 1.25.2. +- Remove all remaining traces of nbdkit-gzip-plugin and nbdkit-tar-plugin. +- Remove nbdkit-streaming-plugin (deprecated upstream). +- Remove obsoletes of old nbdkit-ext2-plugin. + +* Tue Jan 26 2021 Fedora Release Engineering - 1.25.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jan 20 2021 Richard W.M. Jones - 1.25.1-1 +- New upstream development version 1.25.1. + +* Tue Jan 19 2021 Richard W.M. Jones - 1.24.0-3 +- Obsolete nbdkit-tar-plugin to provide smooth upgrades to F33+. + +* Fri Jan 08 2021 Mamoru TASAKA - 1.24.0-2 +- F-34: rebuild against ruby 3.0 + +* Thu Jan 07 2021 Richard W.M. Jones - 1.24.0-1 +- New upstream version 1.24.0. + +* Thu Jan 07 2021 Mamoru TASAKA - 1.23.13-2 +- F-34: rebuild against ruby 3.0 + +* Tue Dec 29 2020 Richard W.M. Jones - 1.23.13-1 +- New upstream development version 1.23.13. +- Add configure --with-extra. + +* Tue Dec 22 2020 Richard W.M. Jones - 1.23.11-1 +- New upstream development version 1.23.11. +- New nbdkit-checkwrite-filter. + +* Thu Dec 10 2020 Richard W.M. Jones - 1.23.10-2 +- Avoid boto3 dependency on RHEL. + +* Tue Dec 08 2020 Richard W.M. Jones - 1.23.10-1 +- New upstream development version 1.23.10. +- New nbdkit-sparse-random-plugin. + +* Thu Dec 03 2020 Richard W.M. Jones - 1.23.9-2 +- Move gzip and tar filters with other filters. +- Remove nbdkit-tar-plugin (replaced with nbdkit-tar-filter), except RHEL 8. +- Do not ship nbdkit-S3-plugin on RHEL. + +* Thu Nov 19 2020 Richard W.M. Jones - 1.23.9-1 +- New upstream development version 1.23.9. +- Add nbdkit-S3-plugin. + +* Mon Nov 02 2020 Richard W.M. Jones - 1.23.8-1 +- New upstream development version 1.23.8. +- Add nbdkit-exitwhen-filter. + +* Mon Oct 05 2020 Richard W.M. Jones - 1.23.7-1 +- New upstream development version 1.23.7. +- Add new NBDKit(3) man page for the OCaml plugin. + +* Tue Sep 22 2020 Richard W.M. Jones - 1.23.6-1 +- New upstream development version 1.23.6. +- New exportname filter. +- Add patch to fix tests. + +* Wed Sep 16 2020 Richard W.M. Jones - 1.23.5-1 +- New upstream development version 1.23.5. + +* Tue Sep 08 2020 Richard W.M. Jones - 1.23.4-1 +- New upstream development version 1.23.4. + +* Sat Sep 05 2020 Richard W.M. Jones - 1.23.3-1 +- New upstream development version 1.23.3. + +* Tue Sep 01 2020 Richard W.M. Jones - 1.23.2-2 +- OCaml 4.11.1 rebuild + +* Tue Sep 01 2020 Richard W.M. Jones - 1.23.2-1 +- New upstream development version 1.23.2. + +* Tue Sep 01 2020 Richard W.M. Jones - 1.22.0-2 +- Reenable sfdisk test because util-linux contains fix. + +* Thu Aug 27 2020 Richard W.M. Jones - 1.22.0-1 +- New stable version 1.22.0. + +* Mon Aug 24 2020 Richard W.M. Jones - 1.21.26-2 +- OCaml 4.11.0 rebuild + +* Thu Aug 20 2020 Richard W.M. Jones - 1.21.26-1 +- New upstream version 1.21.26. + +* Sun Aug 16 2020 Richard W.M. Jones - 1.21.25-1 +- New upstream version 1.21.25. +- New nbdkit-ondemand-plugin. +- New nbdkit-client(1) man page. + +* Tue Aug 11 2020 Richard W.M. Jones - 1.21.24-1 +- New upstream version 1.21.24. +- Add nbdkit-tls-fallback-filter. + +* Mon Aug 10 2020 Merlin Mathesius - 1.21.23-1 +- Enable libguestfs tests only on %%{kernel_arches} + +* Sat Aug 8 2020 Richard W.M. Jones - 1.21.23-1 +- New upstream version 1.21.23. + +* Thu Aug 6 2020 Richard W.M. Jones - 1.21.22-1 +- New upstream version 1.21.22. +- Note this requires updated libnbd 1.3.11 because of bugs in 1.3.10. + +* Tue Aug 4 2020 Richard W.M. Jones - 1.21.21-1 +- New upstream version 1.21.21. +- Remove patches, all upstream. + +* Sat Aug 1 2020 Richard W.M. Jones - 1.21.20-6 +- Add upstream patches to try to track down test failure in Koji. + +* Tue Jul 28 2020 Fedora Release Engineering - 1.21.20-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Jul 24 2020 Richard W.M. Jones - 1.21.20-1 +- New upstream development version 1.21.20. +- Disable test-partition1.sh because of sfdisk bug. + +* Tue Jul 21 2020 Tom Stellard - 1.21.19-2 +- Use make macros +- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro + +* Sat Jul 18 2020 Richard W.M. Jones - 1.21.19-1 +- New upstream development version 1.21.19. +- New nbdkit-cdi-plugin. + +* Mon Jul 13 2020 Richard W.M. Jones - 1.21.18-1 +- New upstream development version 1.21.18. +- Fixes nbdkit-gzip-filter. + +* Sat Jul 11 2020 Richard W.M. Jones - 1.21.17-1 +- New upstream development version 1.21.17. +- New nbdkit-gzip-filter. +- Remove deprecated nbdkit-gzip-plugin. + +* Thu Jul 9 2020 Richard W.M. Jones - 1.21.16-1 +- New upstream development version 1.21.16. +- New nbdkit-tar-filter. +- nbdkit-ext2-plugin has been removed, no need to delete it. + +* Mon Jul 6 2020 Richard W.M. Jones - 1.21.15-1 +- New upstream development version 1.21.15. +- New nbdkit-swab-filter. + +* Fri Jul 3 2020 Richard W.M. Jones - 1.21.14-1 +- New upstream development version 1.21.14. +- New nbdkit-pause-filter. + +* Mon Jun 29 2020 Richard W.M. Jones - 1.21.13-1 +- New upstream development version 1.21.13. +- Tar plugin rewritten again in C. +- New nbdkit-torrent-plugin. +- Remove various upgrade paths which are no longer needed in F33. + +* Sat Jun 27 2020 Jitka Plesnikova - 1.21.12-3 +- Perl 5.32 re-rebuild updated packages + +* Thu Jun 25 2020 Richard W.M. Jones - 1.21.12-2 +- Fix dependencies of nbdkit-tar-plugin since rewritten in Python. + +* Tue Jun 23 2020 Richard W.M. Jones - 1.21.12-1 +- New upstream development version 1.21.12. +- Use new --disable-rust configure option. + +* Mon Jun 22 2020 Jitka Plesnikova - 1.21.11-2 +- Perl 5.32 rebuild + +* Fri Jun 19 2020 Richard W.M. Jones - 1.21.11-1 +- New upstream development version 1.21.11. + +* Mon Jun 15 2020 Richard W.M. Jones - 1.21.10-1 +- New upstream development version 1.21.10. +- This makes nbdkit-basic-plugins depend on zstd. + +* Sun Jun 14 2020 Richard W.M. Jones - 1.21.9-1 +- New upstream development version 1.21.9. + +* Tue Jun 9 2020 Richard W.M. Jones - 1.21.8-1 +- New upstream development version 1.21.8. +- Remove upstream patches. + +* Thu Jun 4 2020 Richard W.M. Jones - 1.21.7-1 +- New upstream development version 1.21.7. +- New nbdkit-cc-plugin subpackage. + +* Tue Jun 2 2020 Richard W.M. Jones - 1.21.6-1 +- New upstream development version 1.21.6. + +* Sat May 30 2020 Richard W.M. Jones - 1.21.5-1 +- New upstream development version 1.21.5. +- New ddrescue filter. + +* Tue May 26 2020 Miro Hrončok - 1.21.4-3 +- Rebuilt for Python 3.9 + +* Wed May 20 2020 Richard W.M. Jones - 1.21.4-2 +- Add upstream patch to make tests/test-truncate4.sh more stable on s390x. + +* Tue May 19 2020 Richard W.M. Jones - 1.21.4-1 +- New upstream development version 1.21.4. + +* Sun May 10 2020 Richard W.M. Jones - 1.21.3-1 +- New upstream development version 1.21.3. + +* Thu May 07 2020 Richard W.M. Jones - 1.21.2-1 +- New upstream development version 1.21.2. + +* Tue May 05 2020 Richard W.M. Jones - 1.20.1-2 +- Bump and rebuild for OCaml 4.11.0+dev2-2020-04-22 rebuild. + +* Mon May 4 2020 Richard W.M. Jones - 1.20.1-2 +- New upstream version 1.20.1. + +* Sat May 2 2020 Richard W.M. Jones - 1.20.0-2 +- New upstream version 1.20.0. + +* Thu Apr 30 2020 Richard W.M. Jones - 1.19.12-1 +- New upstream version 1.19.12. + +* Tue Apr 28 2020 Richard W.M. Jones - 1.19.11-1 +- New upstream version 1.19.11. + +* Fri Apr 24 2020 Richard W.M. Jones - 1.19.10-1 +- New upstream version 1.19.10. + +* Thu Apr 23 2020 Richard W.M. Jones - 1.19.9-1 +- New upstream version 1.19.9. + +* Thu Apr 16 2020 Richard W.M. Jones - 1.19.8-1 +- New upstream version 1.19.8. + +* Wed Apr 8 2020 Richard W.M. Jones - 1.19.7-1 +- New upstream version 1.19.7. +- Disable VDDK on i386, support for VDDK 5.1.1 was removed upstream. + +* Tue Mar 31 2020 Richard W.M. Jones - 1.19.6-1 +- New upstream version 1.19.6. + +* Sat Mar 28 2020 Richard W.M. Jones - 1.19.5-1 +- New upstream version 1.19.5. + +* Fri Mar 20 2020 Richard W.M. Jones - 1.19.4-1 +- New upstream version 1.19.4. + +* Thu Mar 19 2020 Richard W.M. Jones - 1.19.3-2 +- Kill some upstream tests which are problematic. +- Restore test-shutdown.sh (it was renamed to test-delay-shutdown.sh) + +* Tue Mar 17 2020 Richard W.M. Jones - 1.19.3-1 +- New upstream version 1.19.3. +- New plugin and subpackage: tmpdisk. + +* Sat Mar 07 2020 Richard W.M. Jones - 1.19.2-1 +- New upstream version 1.19.2. +- New filters: exitlast, limit. + +* Fri Mar 06 2020 Richard W.M. Jones - 1.19.1-1 +- New upstream version 1.19.1. + +* Thu Feb 27 2020 Richard W.M. Jones - 1.18.0-1 +- New upstream stable branch version 1.18.0. + +* Wed Feb 26 2020 Richard W.M. Jones - 1.17.11-2 +- OCaml 4.10.0 final. + +* Tue Feb 25 2020 Richard W.M. Jones - 1.17.11-1 +- New upstream development version 1.17.11. + +* Wed Feb 19 2020 Richard W.M. Jones - 1.17.10-1 +- New upstream development version 1.17.10. + +* Tue Feb 18 2020 Richard W.M. Jones - 1.17.9-1 +- New upstream development version 1.17.9. + +* Wed Feb 12 2020 Richard W.M. Jones - 1.17.8-1 +- New upstream development version 1.17.8. +- New filter: ext2. +- Deprecate and remove ext2 plugin. + +* Wed Jan 29 2020 Fedora Release Engineering - 1.17.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Sat Jan 25 2020 Richard W.M. Jones - 1.17.7-1 +- New upstream development version 1.17.7. +- New filter: extentlist. + +* Tue Jan 21 2020 Richard W.M. Jones - 1.17.6-1 +- New upstream development version 1.17.6. + +* Sun Dec 15 2019 Richard W.M. Jones - 1.17.5-1 +- New upstream development version 1.17.5. +- Remove upstream patches. + +* Sat Dec 14 2019 Richard W.M. Jones - 1.17.4-2 +- Improve test times. + +* Fri Dec 13 2019 Richard W.M. Jones - 1.17.4-1 +- New upstream development version 1.17.4. +- New filter: nofilter. +- Remove upstream patches. + +* Tue Dec 10 2019 Richard W.M. Jones - 1.17.3-2 +- New upstream development version 1.17.3. +- Add upstream patch to fix IPv6 support in tests. + +* Sat Dec 7 2019 Richard W.M. Jones - 1.17.2-2 +- Reenable OCaml plugin on riscv64 again, should now work with 4.09. + +* Tue Dec 3 2019 Richard W.M. Jones - 1.17.2-1 +- New upstream development version 1.17.2. +- Enable armv7 again. + +* Sun Dec 1 2019 Richard W.M. Jones - 1.17.1-1 +- New upstream development version 1.17.1. +- Add nbdkit-eval-plugin. +- Add nbdkit-ip-filter. + +* Wed Nov 27 2019 Richard W.M. Jones - 1.16.0-6 +- Use gpgverify macro instead of explicit gpgv2 command. + +* Fri Nov 15 2019 Richard W.M. Jones - 1.16.0-5 +- Enable libvirt plugin on all architectures. +- Disable OCaml plugin on riscv64 temporarily. + +* Thu Nov 14 2019 Richard W.M. Jones - 1.16.0-1 +- New stable release 1.16.0. + +* Sat Nov 09 2019 Richard W.M. Jones - 1.15.8-1 +- New upstream version 1.15.8. +- Add new nbdkit-release-notes-* man pages. + +* Wed Nov 06 2019 Richard W.M. Jones - 1.15.7-1 +- New upstream version 1.15.7. + +* Fri Oct 25 2019 Richard W.M. Jones - 1.15.6-1 +- New upstream version 1.15.6. + +* Sat Oct 19 2019 Richard W.M. Jones - 1.15.5-1 +- New upstream release 1.15.5. + +* Tue Oct 1 2019 Richard W.M. Jones - 1.15.4-1 +- New upstream release 1.15.4. +- New nbdkit-security(1) man page. +- Rename nbdkit-reflection-plugin to nbdkit-info-plugin. + +* Wed Sep 25 2019 Richard W.M. Jones - 1.15.3-1 +- New upstream release 1.15.3. +- Add new header file nbd-protocol.h to devel subpackage. + +* Fri Sep 20 2019 Richard W.M. Jones - 1.15.2-1 +- New upstream version 1.15.2. +- Fixes second Denial of Service attack: + https://www.redhat.com/archives/libguestfs/2019-September/msg00272.html +- Add new nbdkit-reflection-plugin. +- Add new nbdkit-retry-filter. + +* Thu Sep 12 2019 Richard W.M. Jones - 1.15.1-1 +- New upstream version 1.15.1. +- Fixes Denial of Service / Amplication Attack: + https://www.redhat.com/archives/libguestfs/2019-September/msg00084.html +- Add nbdsh BR for tests. +- Package . + +* Thu Aug 29 2019 Richard W.M. Jones - 1.14.0-2 +- Split out nbdkit-nbd-plugin subpackage. + +* Wed Aug 28 2019 Richard W.M. Jones - 1.14.0-1 +- New upstream version 1.14.0. + +* Wed Aug 21 2019 Richard W.M. Jones - 1.13.9-3 +- Temporarily kill tests/test-shutdown.sh + +* Wed Aug 21 2019 Miro Hrončok - 1.13.9-2 +- Rebuilt for Python 3.8 + +* Wed Aug 21 2019 Richard W.M. Jones - 1.13.9-1 +- New upstream version 1.13.9. + +* Wed Aug 21 2019 Richard W.M. Jones - 1.13.8-7 +- Add provides for all basic plugins and filters. + +* Tue Aug 20 2019 Richard W.M. Jones - 1.13.8-5 +- BR libnbd 0.9.8. + +* Mon Aug 19 2019 Miro Hrončok - 1.13.8-4 +- Rebuilt for Python 3.8 + +* Mon Aug 19 2019 Richard W.M. Jones - 1.13.8-3 +- Fix for libnbd 0.9.8. + +* Mon Aug 19 2019 Miro Hrončok - 1.13.8-2 +- Rebuilt for Python 3.8 + +* Fri Aug 2 2019 Richard W.M. Jones - 1.13.8-1 +- New upstream version 1.13.8. + +* Wed Jul 31 2019 Richard W.M. Jones - 1.13.7-2 +- Add upstream patch to deal with qemu-img 4.1 output change. + +* Tue Jul 30 2019 Richard W.M. Jones - 1.13.7-1 +- New upstream version 1.13.7. + +* Fri Jul 26 2019 Richard W.M. Jones - 1.13.6-1 +- New upstream version 1.13.6. +- Add BR libnbd-devel. +- New filter: cacheextents. +- Disable guestfs plugin on i686. + +* Thu Jul 25 2019 Fedora Release Engineering - 1.13.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Mon Jun 10 2019 Richard W.M. Jones - 1.13.5-2 +- Further fix for Python 3.8 embed brokenness. + +* Sun Jun 09 2019 Richard W.M. Jones - 1.13.5-1 +- New upstream version 1.13.5. + +* Thu May 30 2019 Jitka Plesnikova - 1.13.4-2 +- Perl 5.30 rebuild + +* Tue May 21 2019 Richard W.M. Jones - 1.13.4-1 +- New upstream version 1.13.4. +- Add new filters: nocache, noparallel. + +* Sat Apr 27 2019 Richard W.M. Jones - 1.13.3-1 +- New upstream version 1.13.3. +- Add OCaml example to devel subpackage. + +* Wed Apr 24 2019 Richard W.M. Jones - 1.13.2-1 +- New upstream version 1.13.2. + +* Tue Apr 23 2019 Richard W.M. Jones - 1.13.1-1 +- New upstream version 1.13.1. +- Distribute BENCHMARKING and SECURITY files. +- Includes a fix for possible remote memory heap leak with user plugins. + +* Sat Apr 13 2019 Richard W.M. Jones - 1.13.0-1 +- New upstream version 1.13.0. +- Add stats filter. + +* Wed Apr 10 2019 Richard W.M. Jones - 1.12.0-1 +- New upstream version 1.12.0. +- Add noextents filter. + +* Mon Apr 08 2019 Richard W.M. Jones - 1.11.15-1 +- New upstream version 1.11.15. + +* Sat Apr 06 2019 Richard W.M. Jones - 1.11.14-1 +- New upstream version 1.11.14. +- Remove deprecated nbdkit-xz-plugin (replaced by nbdkit-xz-filter). + +* Tue Apr 02 2019 Richard W.M. Jones - 1.11.13-1 +- New upstream version 1.11.13. + +* Tue Apr 02 2019 Richard W.M. Jones - 1.11.12-1 +- New upstream version 1.11.12. +- New nbdkit-readahead-filter. + +* Fri Mar 29 2019 Richard W.M. Jones - 1.11.11-1 +- New upstream version 1.11.11. + +* Thu Mar 28 2019 Richard W.M. Jones - 1.11.10-1 +- New upstream version 1.11.10. + +* Sat Mar 23 2019 Richard W.M. Jones - 1.11.9-1 +- New upstream version 1.11.9. + +* Tue Mar 12 2019 Richard W.M. Jones - 1.11.8-1 +- New upstream version 1.11.8. + +* Thu Mar 07 2019 Richard W.M. Jones - 1.11.7-3 +- Remove Python 2 plugin completely. + https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal + +* Thu Mar 07 2019 Richard W.M. Jones - 1.11.7-2 +- Remove Provides/Obsoletes in Fedora 31. +- Remove workaround for QEMU bug which is fixed in Fedora 30+. +- Make the tests run in parallel, otherwise they are too slow. + +* Thu Mar 07 2019 Richard W.M. Jones - 1.11.7-1 +- New upstream version 1.11.7. +- Add nbdkit ssh plugin. +- Remove patches already upstream. + +* Tue Mar 05 2019 Richard W.M. Jones - 1.11.6-2 +- Add nbdkit rate filter. + +* Fri Mar 01 2019 Richard W.M. Jones - 1.11.6-1 +- New upstream version 1.11.6. +- Add linuxdisk plugin. +- Remove rust plugin if compiled. + +* Tue Feb 05 2019 Richard W.M. Jones - 1.11.5-1 +- New upstream version 1.11.5. + +* Fri Feb 01 2019 Fedora Release Engineering - 1.11.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Wed Jan 30 2019 Richard W.M. Jones - 1.11.4-1 +- New upstream version 1.11.4. + +* Mon Jan 28 2019 Richard W.M. Jones - 1.11.3-1 +- New upstream version 1.11.3. + +* Thu Jan 24 2019 Mamoru TASAKA - 1.11.2-2 +- F-30: rebuild against ruby26 + +* Thu Jan 24 2019 Richard W.M. Jones - 1.11.2-1 +- New upstream version 1.11.2. +- Drop patches included in upstream tarball. + +* Thu Jan 24 2019 Mamoru TASAKA - 1.11.1-2 +- F-30: rebuild again against ruby26 + +* Tue Jan 22 2019 Richard W.M. Jones - 1.11.1-1 +- New upstream version 1.11.1. + +* Mon Jan 21 2019 Mamoru TASAKA - 1.10.0-2 +- F-30: rebuild against ruby26 + +* Fri Jan 18 2019 Richard W.M. Jones - 1.10.0-1 +- New upstream version 1.10.0. + +* Tue Jan 15 2019 Richard W.M. Jones - 1.9.10-1 +- New upstream version 1.9.10. + +* Mon Jan 14 2019 Björn Esser - 1.9.9-2 +- Rebuilt for libcrypt.so.2 (#1666033) + +* Mon Jan 7 2019 Richard W.M. Jones - 1.9.9-1 +- New upstream version 1.9.9. + +* Tue Jan 1 2019 Richard W.M. Jones - 1.9.8-1 +- New upstream version 1.9.8. + +* Mon Dec 17 2018 Richard W.M. Jones - 1.9.7-2 +- Remove misguided LDFLAGS hack which removed server hardening. + https://bugzilla.redhat.com/show_bug.cgi?id=1624149#c6 + +* Sat Dec 15 2018 Richard W.M. Jones - 1.9.7-1 +- New upstream version 1.9.7. + +* Thu Dec 13 2018 Richard W.M. Jones - 1.9.6-1 +- New upstream version 1.9.6. +- Add nbdkit-full-plugin. + +* Mon Dec 10 2018 Richard W.M. Jones - 1.9.5-1 +- New upstream version 1.9.5. + +* Tue Dec 04 2018 Richard W.M. Jones - 1.9.4-1 +- New upstream version 1.9.4. +- Fix low priority security issue with TLS: + https://www.redhat.com/archives/libguestfs/2018-December/msg00047.html +- New man page nbdkit-loop(1). + +* Thu Nov 29 2018 Richard W.M. Jones - 1.9.3-1 +- New upstream version 1.9.3. + +* Thu Nov 22 2018 Richard W.M. Jones - 1.9.2-1 +- New upstream version 1.9.2. +- Add new filter subpackage: nbdkit-xz-filter. +- Deprecate (but do not remove) nbdkit-xz-plugin. + +* Sun Nov 18 2018 Richard W.M. Jones - 1.9.1-1 +- New upstream version 1.9.1. + +* Wed Nov 14 2018 Richard W.M. Jones - 1.9.0-1 +- New upstream version 1.9.0. +- New development branch. + +* Mon Nov 12 2018 Richard W.M. Jones - 1.8.0-1 +- New stable branch version 1.8.0. + +* Fri Nov 09 2018 Richard W.M. Jones - 1.7.10-1 +- New upstream version 1.7.10, possibly final before 1.8. + +* Tue Nov 06 2018 Richard W.M. Jones - 1.7.9-2 +- nbdkit metapackage should depend on versioned -server subpackage etc. + +* Tue Nov 06 2018 Richard W.M. Jones - 1.7.9-1 +- New upstream version 1.7.9. + +* Tue Oct 30 2018 Richard W.M. Jones - 1.7.8-1 +- New upstream version 1.7.8. + +* Mon Oct 29 2018 Richard W.M. Jones - 1.7.7-1 +- New upstream version 1.7.7. +- New nbdkit-floppy-plugin subpackage. + +* Wed Oct 17 2018 Richard W.M. Jones - 1.7.6-1 +- New upstream version 1.7.6. +- New nbdkit-iso-plugin subpackage. + +* Tue Oct 16 2018 Richard W.M. Jones - 1.7.5-1 +- New upstream version 1.7.5. + +* Tue Oct 2 2018 Richard W.M. Jones - 1.7.4-1 +- New upstream version 1.7.4. + +* Tue Sep 18 2018 Richard W.M. Jones - 1.7.3-1 +- New upstream version 1.7.3. +- Add partitioning plugin. + +* Thu Sep 13 2018 Richard W.M. Jones - 1.7.2-1 +- New upstream version 1.7.2. + +* Mon Sep 10 2018 Richard W.M. Jones - 1.7.1-1 +- New upstream version 1.7.1. + +* Sat Sep 08 2018 Richard W.M. Jones - 1.7.0-1 +- New upstream version 1.7.0, development branch. +- Add nbdkit-sh-plugin. + +* Tue Aug 28 2018 Richard W.M. Jones - 1.6.0-1 +- New upstream version 1.6.0, stable branch. + +* Mon Aug 27 2018 Richard W.M. Jones - 1.5.10-3 +- New upstream version 1.5.10. +- Add upstream patches after 1.5.10. + +* Sun Aug 26 2018 Richard W.M. Jones - 1.5.9-2 +- New upstream version 1.5.9. +- Add upstream patches since 1.5.9 was released. + +* Tue Aug 21 2018 Richard W.M. Jones - 1.5.8-1 +- New upstream version 1.5.8. + +* Sat Aug 18 2018 Richard W.M. Jones - 1.5.7-1 +- New upstream version 1.5.7. + +* Sat Aug 18 2018 Richard W.M. Jones - 1.5.6-2 +- Disable libvirt on riscv64. +- Other simplifications to %%configure line. + +* Thu Aug 16 2018 Richard W.M. Jones - 1.5.6-1 +- New upstream version 1.5.6. + +* Tue Aug 14 2018 Richard W.M. Jones - 1.5.5-2 +- Make nbdkit a metapackage. +- Package server in nbdkit-server subpackage. +- Rename all nbdkit-plugin-FOO to nbdkit-FOO-plugin to match upstream. + +* Mon Aug 13 2018 Richard W.M. Jones - 1.5.5-1 +- New upstream version 1.5.5. +- New plugin: data. + +* Mon Aug 6 2018 Richard W.M. Jones - 1.5.4-1 +- New upstream version 1.5.4. +- Add topic man pages. + +* Mon Aug 6 2018 Richard W.M. Jones - 1.5.3-1 +- New upstream version 1.5.3. +- New filter: error. + +* Wed Aug 1 2018 Richard W.M. Jones - 1.5.2-1 +- New upstream version 1.5.2. +- Remove patches which are all upstream. +- New filter: truncate. + +* Tue Jul 24 2018 Richard W.M. Jones - 1.5.1-2 +- Enable VDDK plugin on x86-64 only. + +* Fri Jul 20 2018 Richard W.M. Jones - 1.5.1-1 +- New upstream version 1.5.1. +- Remove patches, all upstream in this version. +- Small refactorings in the spec file. + +* Sun Jul 15 2018 Richard W.M. Jones - 1.5.0-3 +- Add all upstream patches since 1.5.0. +- New pattern plugin. +- Add fixes for 32 bit platforms i686 and armv7. + +* Fri Jul 13 2018 Fedora Release Engineering - 1.5.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Sat Jul 7 2018 Richard W.M. Jones - 1.5.0-1 +- New upstream version 1.5.0. +- Add Lua plugin and nbdkit-plugin-lua subpackage. +- Make python-unversioned-command dependent on Fedora >= 29. + +* Fri Jul 6 2018 Richard W.M. Jones - 1.4.0-1 +- New upstream version 1.4.0. +- Add nbdkit-plugin-tcl subpackage. +- +BR python-unversioned-command + +* Tue Jul 03 2018 Petr Pisar - 1.3.4-4 +- Perl 5.28 rebuild + +* Mon Jul 02 2018 Miro Hrončok - 1.3.4-3 +- Rebuilt for Python 3.7 + +* Wed Jun 27 2018 Jitka Plesnikova - 1.3.4-2 +- Perl 5.28 rebuild + +* Sat Jun 23 2018 Richard W.M. Jones - 1.3.4-1 +- New upstream version 1.3.4. + +* Tue Jun 19 2018 Miro Hrončok - 1.3.3-2 +- Rebuilt for Python 3.7 + +* Mon Jun 11 2018 Richard W.M. Jones - 1.3.3-1 +- New upstream version 1.3.3. +- New plugins: nbdkit-zero-plugin, nbdkit-random-plugin. +- Remove upstream patches. + +* Sat Jun 9 2018 Richard W.M. Jones - 1.3.2-2 +- New upstream version 1.3.2. +- Remove patches now upstream. +- New ext2 plugin and subpackage, requires e2fsprogs-devel to build. +- Enable tarball signatures. +- Add upstream patch to fix tests when guestfish not available. +- Enable bash tab completion. + +* Wed Jun 6 2018 Richard W.M. Jones - 1.3.1-1 +- New upstream version 1.3.1. +- Add patch to work around libvirt problem with relative socket paths. +- Add patch to fix the xz plugin test with recent guestfish. + +* Fri Apr 6 2018 Richard W.M. Jones - 1.3.0-1 +- Move to development branch version 1.3.0. +- New filters: blocksize, fua, log, nozero. + +* Fri Feb 09 2018 Igor Gnatenko - 1.1.28-5 +- Escape macros in %%changelog + +* Thu Feb 08 2018 Fedora Release Engineering - 1.1.28-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Jan 31 2018 Igor Gnatenko - 1.1.28-3 +- Switch to %%ldconfig_scriptlets + +* Fri Jan 26 2018 Richard W.M. Jones - 1.1.28-2 +- Run a simplified test suite on all arches. + +* Mon Jan 22 2018 Richard W.M. Jones - 1.1.28-1 +- New upstream version 1.1.28. +- Add two new filters to nbdkit-basic-filters. + +* Sat Jan 20 2018 Björn Esser - 1.1.27-2 +- Rebuilt for switch to libxcrypt + +* Sat Jan 20 2018 Richard W.M. Jones - 1.1.27-1 +- New upstream version 1.1.27. +- Add new subpackage nbdkit-basic-filters containing new filters. + +* Thu Jan 11 2018 Richard W.M. Jones - 1.1.26-2 +- Rebuild against updated Ruby. + +* Sat Dec 23 2017 Richard W.M. Jones - 1.1.26-1 +- New upstream version 1.1.26. +- Add new pkg-config file and dependency. + +* Wed Dec 06 2017 Richard W.M. Jones - 1.1.25-1 +- New upstream version 1.1.25. + +* Tue Dec 05 2017 Richard W.M. Jones - 1.1.24-1 +- New upstream version 1.1.24. +- Add tar plugin (new subpackage nbdkit-plugin-tar). + +* Tue Dec 05 2017 Richard W.M. Jones - 1.1.23-1 +- New upstream version 1.1.23. +- Add example4 plugin. +- Python3 tests require libguestfs so disable on s390x. + +* Sun Dec 03 2017 Richard W.M. Jones - 1.1.22-1 +- New upstream version 1.1.22. +- Enable tests on Fedora. + +* Sat Dec 02 2017 Richard W.M. Jones - 1.1.20-1 +- New upstream version 1.1.20. +- Add nbdkit-split-plugin to basic plugins. + +* Sat Dec 02 2017 Richard W.M. Jones - 1.1.19-2 +- OCaml 4.06.0 rebuild. + +* Thu Nov 30 2017 Richard W.M. Jones - 1.1.19-1 +- New upstream version 1.1.19. +- Combine all the simple plugins in %%{name}-basic-plugins. +- Add memory and null plugins. +- Rename the example plugins subpackage. +- Use %%license instead of %%doc for license file. +- Remove patches now upstream. + +* Wed Nov 29 2017 Richard W.M. Jones - 1.1.18-4 +- Fix Python 3 builds / RHEL macros (RHBZ#1404631). + +* Tue Nov 21 2017 Richard W.M. Jones - 1.1.18-3 +- New upstream version 1.1.18. +- Add NBD forwarding plugin. +- Add libselinux-devel so that SELinux support is enabled in the daemon. +- Apply all patches from upstream since 1.1.18. + +* Fri Oct 20 2017 Richard W.M. Jones - 1.1.16-2 +- New upstream version 1.1.16. +- Disable python3 plugin on RHEL/EPEL <= 7. +- Only ship on x86_64 in RHEL/EPEL <= 7. + +* Wed Sep 27 2017 Richard W.M. Jones - 1.1.15-1 +- New upstream version 1.1.15. +- Enable TLS support. + +* Fri Sep 01 2017 Richard W.M. Jones - 1.1.14-1 +- New upstream version 1.1.14. + +* Fri Aug 25 2017 Richard W.M. Jones - 1.1.13-1 +- New upstream version 1.1.13. +- Remove patches which are all upstream. +- Remove grubby hack, should not be needed with modern supermin. + +* Sat Aug 19 2017 Richard W.M. Jones - 1.1.12-13 +- Rebuild for OCaml 4.05.0. + +* Thu Aug 03 2017 Fedora Release Engineering - 1.1.12-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 1.1.12-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Tue Jun 27 2017 Richard W.M. Jones - 1.1.12-10 +- Rebuild for OCaml 4.04.2. + +* Sun Jun 04 2017 Jitka Plesnikova - 1.1.12-9 +- Perl 5.26 rebuild + +* Mon May 15 2017 Richard W.M. Jones - 1.1.12-8 +- Rebuild for OCaml 4.04.1. + +* Fri Feb 10 2017 Fedora Release Engineering - 1.1.12-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Jan 12 2017 Vít Ondruch - 1.1.12-6 +- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.4 + +* Fri Dec 23 2016 Richard W.M. Jones - 1.1.12-5 +- Rebuild for Python 3.6 update. + +* Wed Dec 14 2016 Richard W.M. Jones - 1.1.12-4 +- Fix python3 subpackage so it really uses python3 (RHBZ#1404631). + +* Sat Nov 05 2016 Richard W.M. Jones - 1.1.12-3 +- Rebuild for OCaml 4.04.0. + +* Mon Oct 03 2016 Richard W.M. Jones - 1.1.12-2 +- Compile Python 2 and Python 3 versions of the plugin. + +* Wed Jun 08 2016 Richard W.M. Jones - 1.1.12-1 +- New upstream version 1.1.12 +- Enable Ruby plugin. +- Disable tests on Rawhide because libvirt is broken again (RHBZ#1344016). + +* Wed May 25 2016 Richard W.M. Jones - 1.1.11-10 +- Add another upstream patch since 1.1.11. + +* Mon May 23 2016 Richard W.M. Jones - 1.1.11-9 +- Add all patches upstream since 1.1.11 (fixes RHBZ#1336758). + +* Tue May 17 2016 Jitka Plesnikova - 1.1.11-7 +- Perl 5.24 rebuild + +* Wed Mar 09 2016 Richard W.M. Jones - 1.1.11-6 +- When tests fail, dump out test-suite.log so we can debug it. + +* Fri Feb 05 2016 Richard W.M. Jones - 1.1.11-5 +- Don't run tests on x86, because kernel is broken there + (https://bugzilla.redhat.com/show_bug.cgi?id=1302071) + +* Thu Feb 04 2016 Fedora Release Engineering - 1.1.11-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Mon Jan 11 2016 Richard W.M. Jones - 1.1.11-3 +- Add support for newstyle NBD protocol (RHBZ#1297100). + +* Sat Oct 31 2015 Richard W.M. Jones - 1.1.11-1 +- New upstream version 1.1.11. + +* Thu Jul 30 2015 Richard W.M. Jones - 1.1.10-3 +- OCaml 4.02.3 rebuild. + +* Sat Jun 20 2015 Richard W.M. Jones - 1.1.10-2 +- Enable libguestfs plugin on aarch64. + +* Fri Jun 19 2015 Richard W.M. Jones - 1.1.10-1 +- New upstream version. +- Enable now working OCaml plugin (requires OCaml >= 4.02.2). + +* Wed Jun 17 2015 Fedora Release Engineering - 1.1.9-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Thu Jun 11 2015 Jitka Plesnikova - 1.1.9-5 +- Perl 5.22 rebuild + +* Wed Jun 10 2015 Richard W.M. Jones - 1.1.9-4 +- Enable debugging messages when running make check. + +* Sat Jun 06 2015 Jitka Plesnikova - 1.1.9-3 +- Perl 5.22 rebuild + +* Tue Oct 14 2014 Richard W.M. Jones - 1.1.9-2 +- New upstream version 1.1.9. +- Add the streaming plugin. +- Include fix for streaming plugin in 1.1.9. + +* Wed Sep 10 2014 Richard W.M. Jones - 1.1.8-4 +- Rebuild for updated Perl in Rawhide. +- Workaround for broken libvirt (RHBZ#1138604). + +* Sun Aug 17 2014 Fedora Release Engineering - 1.1.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 21 2014 Richard W.M. Jones - 1.1.8-1 +- New upstream version 1.1.8. +- Add support for cURL, and new nbdkit-plugin-curl package. + +* Fri Jun 20 2014 Richard W.M. Jones - 1.1.7-1 +- New upstream version 1.1.7. +- Remove patches which are now all upstream. + +* Sat Jun 07 2014 Fedora Release Engineering - 1.1.6-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Thu Mar 06 2014 Dan Horák - 1.1.6-4 +- libguestfs is available only on selected arches + +* Fri Feb 21 2014 Richard W.M. Jones - 1.1.6-3 +- Backport some upstream patches, fixing a minor bug and adding more tests. +- Enable the tests since kernel bug is fixed. + +* Sun Feb 16 2014 Richard W.M. Jones - 1.1.6-1 +- New upstream version 1.1.6. + +* Sat Feb 15 2014 Richard W.M. Jones - 1.1.5-2 +- New upstream version 1.1.5. +- Enable the new Python plugin. +- Perl plugin man page moved to section 3. +- Perl now requires ExtUtils::Embed. + +* Mon Feb 10 2014 Richard W.M. Jones - 1.1.4-1 +- New upstream version 1.1.4. +- Enable the new Perl plugin. + +* Sun Aug 4 2013 Richard W.M. Jones - 1.1.3-1 +- New upstream version 1.1.3 which fixes some test problems. +- Disable tests because Rawhide kernel is broken (RHBZ#991808). +- Remove a single quote from description which confused emacs. +- Remove patch, now upstream. + +* Sat Aug 03 2013 Fedora Release Engineering - 1.1.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Sun Jul 21 2013 Richard W.M. Jones - 1.1.2-3 +- Fix segfault when IPv6 client is used (RHBZ#986601). + +* Tue Jul 16 2013 Richard W.M. Jones - 1.1.2-2 +- New development version 1.1.2. +- Disable the tests on Fedora <= 18. + +* Tue Jun 25 2013 Richard W.M. Jones - 1.1.1-1 +- New development version 1.1.1. +- Add libguestfs plugin. +- Run the test suite. + +* Mon Jun 24 2013 Richard W.M. Jones - 1.0.0-4 +- Initial release. diff --git a/nbdkit.te b/nbdkit.te new file mode 100644 index 0000000..dbc518e --- /dev/null +++ b/nbdkit.te @@ -0,0 +1,100 @@ +policy_module(nbdkit, 1.0.0) + +######################################## +# +# Declarations +# + +gen_require(` + type unconfined_t; +') + +type nbdkit_t; +type nbdkit_exec_t; +application_domain(nbdkit_t, nbdkit_exec_t) +mcs_constrained(nbdkit_t) +role system_r types nbdkit_t; + +type nbdkit_home_t; +userdom_user_home_content(nbdkit_home_t) + +type nbdkit_tmp_t; +files_tmp_file(nbdkit_tmp_t) + +type nbdkit_unit_file_t; +systemd_unit_file(nbdkit_unit_file_t) + +permissive nbdkit_t; + +######################################## +# +# nbdkit local policy +# +allow nbdkit_t self:capability { setgid setuid }; +allow nbdkit_t self:fifo_file rw_fifo_file_perms; +allow nbdkit_t self:netlink_route_socket rw_netlink_socket_perms; +allow nbdkit_t self:process { fork setsockcreate signal_perms }; +allow nbdkit_t self:tcp_socket create_stream_socket_perms; +allow nbdkit_t self:udp_socket create_socket_perms; + +manage_dirs_pattern(nbdkit_t, nbdkit_tmp_t, nbdkit_tmp_t) +manage_files_pattern(nbdkit_t, nbdkit_tmp_t, nbdkit_tmp_t) +userdom_user_tmp_filetrans(nbdkit_t, nbdkit_tmp_t, { dir file }) + +manage_dirs_pattern(nbdkit_t, nbdkit_home_t, nbdkit_home_t) +manage_files_pattern(nbdkit_t, nbdkit_home_t, nbdkit_home_t) +userdom_user_home_dir_filetrans(nbdkit_t, nbdkit_home_t, { dir file }) + +corenet_tcp_connect_http_port(nbdkit_t) +corenet_tcp_connect_ssh_port(nbdkit_t) +corenet_tcp_connect_tftp_port(nbdkit_t) +corenet_tcp_bind_generic_port(nbdkit_t) +corenet_tcp_bind_generic_node(nbdkit_t) + +domain_use_interactive_fds(nbdkit_t) + +files_read_etc_files(nbdkit_t) + +init_abstract_socket_activation(nbdkit_t) +init_ioctl_stream_sockets(nbdkit_t) +init_rw_stream_sockets(nbdkit_t) + +optional_policy(` + auth_use_nsswitch(nbdkit_t) +') + +optional_policy(` + logging_send_syslog_msg(nbdkit_t) +') + +optional_policy(` + miscfiles_read_localization(nbdkit_t) + miscfiles_read_generic_certs(nbdkit_t) +') + +optional_policy(` + sysnet_dns_name_resolve(nbdkit_t) + sysnet_read_config(nbdkit_t) +') + +optional_policy(` + userdom_read_user_home_content_files(nbdkit_t) + userdom_use_inherited_user_ptys(nbdkit_t) +') + +optional_policy(` + virt_create_svirt_image_sock_files(nbdkit_t) + virt_read_qemu_pid_files(nbdkit_t) + virtlogd_rw_pipes(nbdkit_t) + virt_rw_svirt_image(nbdkit_t) + virt_rw_svirt_image_dirs(nbdkit_t) + virt_search_lib(nbdkit_t) + virt_stream_connect_svirt(nbdkit_t) +') + + +# FIXME: It would be nice to allow libvirt to transition nbdkit_exec_t to +# nbdkit_t when libvirtd was started manually from the commandline (i.e. in +# unconfined_t), but we don't want this transition to happen automatically +# when starting directly from the shell. I'm not sure how to achieve this... +#nbdkit_domtrans(unconfined_t, nbdkit_exec_t, nbdkit_t) diff --git a/sources b/sources new file mode 100644 index 0000000..009ae3f --- /dev/null +++ b/sources @@ -0,0 +1,2 @@ +SHA512 (libguestfs.keyring) = 69663d5dd3edb47af6f18119c0748211c1cecf230c2dd8baaf349f44df1f893730ca6bb8b1f60a55ea42f8ff04fd48c3e5954501bb57952950032012a42c9f19 +SHA512 (nbdkit-1.40.0.tar.gz) = 2ebf416359e61d4a7945ada095363fabfd300a3a9721a07ea39b0682c9d9e4dc0b8a9b1145e7992eca8605727d9c7a20c396295e3412e5e1bd246b903616a68d