summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Weißschuh2023-01-14 13:18:13 +0000
committerThomas Weißschuh2023-01-14 13:18:48 +0000
commit9d3ba79a473b461c932074be7d5e5c82d0a37ac9 (patch)
tree3e4d3a2d5e571d2b23927c2c4a007a433bfb32ce
parent48f867af65383292a8ba1c2f352c4c69ca52fa4c (diff)
downloadaur-9d3ba79a473b461c932074be7d5e5c82d0a37ac9.tar.gz
1.32.5
-rw-r--r--.SRCINFO17
-rw-r--r--0001-data-don-t-ignore-SIGPIPE.patch46
-rw-r--r--PKGBUILD17
-rw-r--r--clippy.patch92
4 files changed, 157 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3703c9381d5d..33543aef9cd0 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,8 @@
pkgbase = nbdkit
pkgdesc = NBD server toolkit
- pkgver = 1.32.3
- pkgrel = 2
+ pkgver = 1.32.5
+ pkgrel = 1
url = https://gitlab.com/nbdkit/nbdkit/
- arch = i686
arch = x86_64
license = custom: BSD
checkdepends = qemu
@@ -22,13 +21,15 @@ pkgbase = nbdkit
optdepends = libtorrent-rasterbar
optdepends = boost
optdepends = libselinux
- source = http://download.libguestfs.org/nbdkit/1.32-stable/nbdkit-1.32.3.tar.gz
- source = http://download.libguestfs.org/nbdkit/1.32-stable/nbdkit-1.32.3.tar.gz.sig
- source = 0001-rust-prevent-dead_code-warning.patch
+ source = http://download.libguestfs.org/nbdkit/1.32-stable/nbdkit-1.32.5.tar.gz
+ source = http://download.libguestfs.org/nbdkit/1.32-stable/nbdkit-1.32.5.tar.gz.sig
+ source = clippy.patch
+ source = 0001-data-don-t-ignore-SIGPIPE.patch
validpgpkeys = F7774FB1AD074A7E8C8767EA91738F73E1B768A0
validpgpkeys = 71C2CC22B1C4602927D2F3AAA7A16B4A2527436A
- sha256sums = 5ef9627be6831977fc30d6808e12e01a3bb22a2805f0a250a4320f0360b9d01d
+ sha256sums = 07921293f22bfaa121cff1ba3f13d75243f5cd4864abbb20aa9686ed5649dbf4
sha256sums = SKIP
- sha256sums = e65e11e122e8ae2b7f93f33f42cdbd3e619f02a36038dbab4dc42c5c3e403008
+ sha256sums = 3d26e9fab4bb240dcb5e19da9f9f7c74027de9ae486001a7d927fcf7be681be5
+ sha256sums = cafec77dd3e32567dd6aed27733a4fe84787751d805d27471eba66b438fa2396
pkgname = nbdkit
diff --git a/0001-data-don-t-ignore-SIGPIPE.patch b/0001-data-don-t-ignore-SIGPIPE.patch
new file mode 100644
index 000000000000..dc17a5347b3a
--- /dev/null
+++ b/0001-data-don-t-ignore-SIGPIPE.patch
@@ -0,0 +1,46 @@
+From e8f93ba5745823d82008941f524faaf97d2f438c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <thomas@t-8ch.de>
+Date: Fri, 13 Jan 2023 05:46:26 +0000
+Subject: [nbdkit PATCH] data: don't ignore SIGPIPE
+To: libguestfs@redhat.com, "Richard W.M. Jones" <rjones@redhat.com>
+
+If all of the requested data has been read, the call to popen_close will
+close the scripts output pipe and on the next write a SIGPIPE is
+delivered.
+When the scripts inherited signalhandler is ignoring the singal, it
+won't be aborted by default.
+
+This happens in the test suite, as make 4.4 seems to ignore this signal.
+Therefore the executed scripts never stop and the testsuite never
+finishes.
+---
+ plugins/data/format.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/plugins/data/format.c b/plugins/data/format.c
+index 3667ead6790f..2319ea09475c 100644
+--- a/plugins/data/format.c
++++ b/plugins/data/format.c
+@@ -40,6 +40,7 @@
+ #include <stdarg.h>
+ #include <string.h>
+ #include <assert.h>
++#include <signal.h>
+
+ #define NBDKIT_API_VERSION 2
+ #include <nbdkit-plugin.h>
+@@ -1951,6 +1952,9 @@ store_script_len (struct allocator *a,
+ char buf[BUFSIZ];
+ size_t n;
+
++ /* Restore SIGPIPE back to SIG_DFL, since shell can't undo SIG_IGN */
++ signal (SIGPIPE, SIG_DFL);
++
+ pp = popen (script, "r");
+ if (pp == NULL) {
+ nbdkit_error ("popen: %m");
+
+base-commit: 09a61a0a00d3036ebfbc2fbadb0ba3e10a778ff3
+--
+2.39.0
+
diff --git a/PKGBUILD b/PKGBUILD
index cb8632362c7f..97d110f8c68f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,10 +1,10 @@
# Maintainer: Thomas Weißschuh <thomas t-8ch de>
pkgname=nbdkit
-pkgver=1.32.3
-pkgrel=2
+pkgver=1.32.5
+pkgrel=1
pkgdesc="NBD server toolkit"
-arch=('i686' 'x86_64')
+arch=('x86_64')
url="https://gitlab.com/nbdkit/nbdkit/"
license=('custom: BSD')
depends=()
@@ -31,12 +31,14 @@ _dldir="${pkgver%.*}"
source=(
"http://download.libguestfs.org/nbdkit/${_dldir}-stable/nbdkit-${pkgver}.tar.gz"
"http://download.libguestfs.org/nbdkit/${_dldir}-stable/nbdkit-${pkgver}.tar.gz.sig"
- 0001-rust-prevent-dead_code-warning.patch
+ clippy.patch
+ 0001-data-don-t-ignore-SIGPIPE.patch
)
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
- patch -p1 < "${srcdir}"/0001-rust-prevent-dead_code-warning.patch
+ patch -p1 < "${srcdir}"/clippy.patch
+ patch -p1 < "${srcdir}"/0001-data-don-t-ignore-SIGPIPE.patch
}
build() {
@@ -59,6 +61,7 @@ check() {
make check
}
-sha256sums=('5ef9627be6831977fc30d6808e12e01a3bb22a2805f0a250a4320f0360b9d01d'
+sha256sums=('07921293f22bfaa121cff1ba3f13d75243f5cd4864abbb20aa9686ed5649dbf4'
'SKIP'
- 'e65e11e122e8ae2b7f93f33f42cdbd3e619f02a36038dbab4dc42c5c3e403008')
+ '3d26e9fab4bb240dcb5e19da9f9f7c74027de9ae486001a7d927fcf7be681be5'
+ 'cafec77dd3e32567dd6aed27733a4fe84787751d805d27471eba66b438fa2396')
diff --git a/clippy.patch b/clippy.patch
new file mode 100644
index 000000000000..4ef79a01d9d1
--- /dev/null
+++ b/clippy.patch
@@ -0,0 +1,92 @@
+From 0bea254145636014e6c9defae1ed65ae07de65df Mon Sep 17 00:00:00 2001
+From: Alan Somers <asomers@gmail.com>
+Date: Tue, 1 Nov 2022 10:22:57 -0600
+Subject: [PATCH] Rust plugin: Clippy cleanup
+
+Fix lints in the latest clippy
+* box-default
+* explicit-auto-deref
+---
+ plugins/rust/examples/ramdisk.rs | 2 +-
+ plugins/rust/tests/bare_bones.rs | 6 +++---
+ plugins/rust/tests/full_featured.rs | 6 +++---
+ 3 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/plugins/rust/examples/ramdisk.rs b/plugins/rust/examples/ramdisk.rs
+index f7d998ca..552d36c6 100644
+--- a/plugins/rust/examples/ramdisk.rs
++++ b/plugins/rust/examples/ramdisk.rs
+@@ -52,7 +52,7 @@ impl Server for RamDisk {
+ }
+
+ fn open(_readonly: bool) -> Box<dyn Server> {
+- Box::new(RamDisk::default())
++ Box::<RamDisk>::default()
+ }
+
+ fn read_at(&self, buf: &mut [u8], offset: u64) -> Result<()> {
+diff --git a/plugins/rust/tests/bare_bones.rs b/plugins/rust/tests/bare_bones.rs
+index ac3c5251..8a09cb57 100644
+--- a/plugins/rust/tests/bare_bones.rs
++++ b/plugins/rust/tests/bare_bones.rs
+@@ -73,7 +73,7 @@ fn with_fixture<F: FnMut(&mut Fixture)>(mut f: F) {
+ initialize();
+ let _m = MOCK_SERVER_MTX.lock().unwrap();
+
+- let mut mock = Box::new(MockServer::default());
++ let mut mock = Box::<MockServer>::default();
+ mock.expect_get_size()
+ .returning(|| Ok(0x4200));
+ let mockp = (&mut mock) as *mut Box<MockServer>;
+@@ -83,7 +83,7 @@ fn with_fixture<F: FnMut(&mut Fixture)>(mut f: F) {
+
+ let pluginp = unsafe { PLUGIN.unwrap()};
+ let plugin = unsafe {&*pluginp};
+- let handle = ((*plugin).open)(0);
++ let handle = (plugin.open)(0);
+ let mut fixture = Fixture {
+ mockp,
+ plugin,
+@@ -92,7 +92,7 @@ fn with_fixture<F: FnMut(&mut Fixture)>(mut f: F) {
+
+ f(&mut fixture);
+
+- ((*plugin).close)(handle);
++ (plugin.close)(handle);
+ }
+
+
+diff --git a/plugins/rust/tests/full_featured.rs b/plugins/rust/tests/full_featured.rs
+index 46aad9a4..d5f02e06 100644
+--- a/plugins/rust/tests/full_featured.rs
++++ b/plugins/rust/tests/full_featured.rs
+@@ -105,7 +105,7 @@ fn with_fixture<F: FnMut(&mut Fixture)>(mut f: F) {
+ initialize();
+ let _m = MOCK_SERVER_MTX.lock().unwrap();
+
+- let mut mock = Box::new(MockServer::default());
++ let mut mock = Box::<MockServer>::default();
+ mock.expect_get_size()
+ .returning(|| Ok(0x4200));
+ let mockp = (&mut mock) as *mut Box<MockServer>;
+@@ -115,7 +115,7 @@ fn with_fixture<F: FnMut(&mut Fixture)>(mut f: F) {
+
+ let pluginp = unsafe { PLUGIN.unwrap()};
+ let plugin = unsafe {&*pluginp};
+- let handle = ((*plugin).open)(0);
++ let handle = (plugin.open)(0);
+ open_ctx.checkpoint(); // clear expectations for MockServer::open
+ let mut fixture = Fixture {
+ mockp,
+@@ -125,7 +125,7 @@ fn with_fixture<F: FnMut(&mut Fixture)>(mut f: F) {
+
+ f(&mut fixture);
+
+- ((*plugin).close)(handle);
++ (plugin.close)(handle);
+ }
+
+ /// Helper for testing methods that take a handle and return a boolean
+--
+GitLab
+