New upstream version 0.9.8.

Package the new nbd_*(3) man pages.
This commit is contained in:
Richard W.M. Jones 2019-08-15 15:46:28 +01:00
parent b8b9bd910d
commit 192cc9282a
3 changed files with 8 additions and 77 deletions

View File

@ -1,70 +0,0 @@
From 7a98b786b179c626699969d41f2d4ff4550937a7 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Mon, 5 Aug 2019 16:16:58 +0100
Subject: [PATCH] ocaml/tests: Fix race when creating and deleting files in
tests.
Two of the OCaml tests used a test file in the local directory with a
fixed name. However because each test runs twice (once for bytecode
and once for native code), on a machine with many cores the file might
be deleted by one instance of the test while it is still in use by the
other instance, causing a test failure. (This was observed on a
machine with 48 cores.)
---
ocaml/tests/test_410_pwrite.ml | 9 +++++----
ocaml/tests/test_510_aio_pwrite.ml | 9 +++++----
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/ocaml/tests/test_410_pwrite.ml b/ocaml/tests/test_410_pwrite.ml
index 3b63da7..0b14e1b 100644
--- a/ocaml/tests/test_410_pwrite.ml
+++ b/ocaml/tests/test_410_pwrite.ml
@@ -24,10 +24,11 @@ let () =
Bytes.set buf1 510 '\x55';
Bytes.set buf1 511 '\xAA';
- let datafile = "410-pwrite.data" in
- let fd = openfile datafile [O_WRONLY;O_CREAT;O_TRUNC] 0o644 in
+ let datafile, chan =
+ Filename.open_temp_file ~mode:[Open_binary] "410" ".data" in
+ let fd = descr_of_out_channel chan in
ftruncate fd 512;
- close fd;
+ close_out chan;
let nbd = NBD.create () in
NBD.connect_command nbd ["nbdkit"; "-s"; "--exit-with-parent"; "-v";
@@ -44,4 +45,4 @@ let () =
close fd;
assert (buf1 = content);
- Unix.unlink datafile
+ unlink datafile
diff --git a/ocaml/tests/test_510_aio_pwrite.ml b/ocaml/tests/test_510_aio_pwrite.ml
index 4e3f630..0930dcd 100644
--- a/ocaml/tests/test_510_aio_pwrite.ml
+++ b/ocaml/tests/test_510_aio_pwrite.ml
@@ -24,10 +24,11 @@ let () =
Bytes.set buf 510 '\x55';
Bytes.set buf 511 '\xAA';
- let datafile = "510-pwrite.data" in
- let fd = openfile datafile [O_WRONLY;O_CREAT;O_TRUNC] 0o644 in
+ let datafile, chan =
+ Filename.open_temp_file ~mode:[Open_binary] "510" ".data" in
+ let fd = descr_of_out_channel chan in
ftruncate fd 512;
- close fd;
+ close_out chan;
let nbd = NBD.create () in
NBD.connect_command nbd ["nbdkit"; "-s"; "--exit-with-parent"; "-v";
@@ -53,4 +54,4 @@ let () =
close fd;
assert (buf = content);
- Unix.unlink datafile
+ unlink datafile
--
2.22.0

View File

@ -8,7 +8,7 @@
%global source_directory 0.x-unstable-api
Name: libnbd
Version: 0.9.7
Version: 0.9.8
Release: 1%{?dist}
Summary: NBD client library in userspace
@ -22,9 +22,6 @@ Source1: http://libguestfs.org/download/libnbd/%{source_directory}/%{name
# https://pgp.key-server.io/pks/lookup?search=rjones%40redhat.com&fingerprint=on&op=vindex
Source2: libguestfs.keyring
# Patches.
Patch1: 0001-ocaml-tests-Fix-race-when-creating-and-deleting-file.patch
%if 0%{patches_touch_autotools}
BuildRequires: autoconf, automake, libtool
%endif
@ -180,7 +177,7 @@ make %{?_smp_mflags} check || {
%{_libdir}/libnbd.so
%{_libdir}/pkgconfig/libnbd.pc
%{_mandir}/man3/libnbd.3*
%{_mandir}/man3/libnbd-api.3*
%{_mandir}/man3/nbd_*.3*
%files -n ocaml-%{name}
@ -213,6 +210,10 @@ make %{?_smp_mflags} check || {
%changelog
* Thu Aug 15 2019 Richard W.M. Jones <rjones@redhat.com> - 0.9.8-1
- New upstream version 0.9.8.
- Package the new nbd_*(3) man pages.
* Mon Aug 5 2019 Richard W.M. Jones <rjones@redhat.com> - 0.9.7-1
- New upstream version 0.9.7.
- Add libnbd-ocaml(3) man page.

View File

@ -1,2 +1,2 @@
SHA512 (libnbd-0.9.7.tar.gz) = 278c6bb73174e5d47865a31d3f15139acdf54a58d1d5f553192988cf630d60f21092c193f4151aa1e71819858775669bb487eca422a445b17054b653773e099f
SHA512 (libnbd-0.9.7.tar.gz.sig) = 16e44389589a4c45688434e651ca3dc0190d3b4eec9e7c9c6b71909df537cc1dfa9e9fd3ee222a5c11b0cd8d47140f5321ee2dc4755f166fb4c36b0a0181715c
SHA512 (libnbd-0.9.8.tar.gz) = 2e5a8681a32aa517234b079400857e59e174fefc537c95597a79178d25ca3113c6e03476b2140e813f5a7938b4d34e87ba7b2e07f14cf2cffc63d1a7dae00e47
SHA512 (libnbd-0.9.8.tar.gz.sig) = 15f6f8f63a94163f61ecb0425c50649ab8ae3a29927e9003b0a833c8d08f541daa32d4dc935d2a6a69b5972e223e7632cd2fa35f6d288085f3857256d7a3a95d