libnbd/libnbd.spec

198 lines
5.0 KiB
RPMSpec
Raw Permalink Normal View History

#
# spec file for package libnbd
#
Accepting request 1168942 from home:jfehlig:branches:Virtualization - Update to version 1.18.4: * Version 1.18.4. * tests/connect-uri: Remove -DPIDFILE, generate it implicitly * rust: Make the struct Cookie internal field fully public * interop/block-status-64.c: Fix skip path under valgrind * Revert "valgrind: Add suppression for liblzma bug" * ocaml: Add ocamlfind -package to ocamldoc invocation * info/can.c: Assert that 'can' variable is set * info: Fix error message * info: Add note that --can/--is/--has are synonyms * info: Handle failure of call to file * fuzzing: Add a comment that the libfuzzer test is unmaintained * Version 1.18.3. * tests/opt-info.c: Free string returned by nbd_get_export_name * valgrind: Add suppression for liblzma bug * info: Try harder to report contents from nbd-server * copy: Add test for server without meta context support * api: Fix nbd_can_meta_context for server that lacks meta contexts * copy, info: Treat can_meta_context failures as unsupported * configure: Copy bash-completions test from nbdkit * podwrapper: Ignore check on older versions of Perl * podwrapper: Allow = (POD directive) followed by bare URL * podwrapper: Check for bare URLs and suggest replacement with L<> links * podwrapper: Move long lines and cross-reference checks earlier * tests: Missed another C test which didn't use NBDKIT * tests: Use $NBDKIT instead of plain 'nbdkit' * tests: Use 'source ./function.sh' consistently in this directory * ocaml/tests: Add replacement for Bytes.set_int64_be * ocaml/tests: Add explicit dependency on ocaml_test_config.cm{o,x} * build: Define the minimum required version of OCaml as 4.05 OBS-URL: https://build.opensuse.org/request/show/1168942 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libnbd?expand=0&rev=33
2024-04-18 23:09:23 +02:00
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define sover 0
Name: libnbd
Accepting request 1168942 from home:jfehlig:branches:Virtualization - Update to version 1.18.4: * Version 1.18.4. * tests/connect-uri: Remove -DPIDFILE, generate it implicitly * rust: Make the struct Cookie internal field fully public * interop/block-status-64.c: Fix skip path under valgrind * Revert "valgrind: Add suppression for liblzma bug" * ocaml: Add ocamlfind -package to ocamldoc invocation * info/can.c: Assert that 'can' variable is set * info: Fix error message * info: Add note that --can/--is/--has are synonyms * info: Handle failure of call to file * fuzzing: Add a comment that the libfuzzer test is unmaintained * Version 1.18.3. * tests/opt-info.c: Free string returned by nbd_get_export_name * valgrind: Add suppression for liblzma bug * info: Try harder to report contents from nbd-server * copy: Add test for server without meta context support * api: Fix nbd_can_meta_context for server that lacks meta contexts * copy, info: Treat can_meta_context failures as unsupported * configure: Copy bash-completions test from nbdkit * podwrapper: Ignore check on older versions of Perl * podwrapper: Allow = (POD directive) followed by bare URL * podwrapper: Check for bare URLs and suggest replacement with L<> links * podwrapper: Move long lines and cross-reference checks earlier * tests: Missed another C test which didn't use NBDKIT * tests: Use $NBDKIT instead of plain 'nbdkit' * tests: Use 'source ./function.sh' consistently in this directory * ocaml/tests: Add replacement for Bytes.set_int64_be * ocaml/tests: Add explicit dependency on ocaml_test_config.cm{o,x} * build: Define the minimum required version of OCaml as 4.05 OBS-URL: https://build.opensuse.org/request/show/1168942 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libnbd?expand=0&rev=33
2024-04-18 23:09:23 +02:00
Version: 1.18.4
Release: 0
Summary: NBD client library in userspace
License: LGPL-2.1-or-later
URL: https://gitlab.com/nbdkit/libnbd
Source0: %{name}-%{version}.tar.bz2
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: fdupes
BuildRequires: libtool
BuildRequires: ocaml-findlib
BuildRequires: ocaml-rpm-macros
Accepting request 1168942 from home:jfehlig:branches:Virtualization - Update to version 1.18.4: * Version 1.18.4. * tests/connect-uri: Remove -DPIDFILE, generate it implicitly * rust: Make the struct Cookie internal field fully public * interop/block-status-64.c: Fix skip path under valgrind * Revert "valgrind: Add suppression for liblzma bug" * ocaml: Add ocamlfind -package to ocamldoc invocation * info/can.c: Assert that 'can' variable is set * info: Fix error message * info: Add note that --can/--is/--has are synonyms * info: Handle failure of call to file * fuzzing: Add a comment that the libfuzzer test is unmaintained * Version 1.18.3. * tests/opt-info.c: Free string returned by nbd_get_export_name * valgrind: Add suppression for liblzma bug * info: Try harder to report contents from nbd-server * copy: Add test for server without meta context support * api: Fix nbd_can_meta_context for server that lacks meta contexts * copy, info: Treat can_meta_context failures as unsupported * configure: Copy bash-completions test from nbdkit * podwrapper: Ignore check on older versions of Perl * podwrapper: Allow = (POD directive) followed by bare URL * podwrapper: Check for bare URLs and suggest replacement with L<> links * podwrapper: Move long lines and cross-reference checks earlier * tests: Missed another C test which didn't use NBDKIT * tests: Use $NBDKIT instead of plain 'nbdkit' * tests: Use 'source ./function.sh' consistently in this directory * ocaml/tests: Add replacement for Bytes.set_int64_be * ocaml/tests: Add explicit dependency on ocaml_test_config.cm{o,x} * build: Define the minimum required version of OCaml as 4.05 OBS-URL: https://build.opensuse.org/request/show/1168942 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libnbd?expand=0&rev=33
2024-04-18 23:09:23 +02:00
BuildRequires: pkg-config
BuildRequires: ocaml(compiler)
BuildRequires: perl(Pod::Man)
BuildRequires: perl(Pod::Simple)
BuildRequires: pkgconfig(bash-completion)
BuildRequires: pkgconfig(fuse3)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gnutls) >= 3.3.0
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(python3)
Requires: libnbd%{sover} = %{version}
# Only for running the test suite.
BuildRequires: gcc-c++
BuildRequires: jq
%if 0%{?suse_version} >= 1550
BuildRequires: nbd
%endif
BuildRequires: qemu-tools
%description
NBD Network Block Device is a protocol for accessing Block Devices
(hard disks and disk-like things) over a Network.
This is the NBD client library in userspace, a simple library for
writing NBD clients.
The key features are:
* Synchronous and asynchronous APIs, both for ease of use and for
writing non-blocking, multithreaded clients.
* High performance.
* Minimal dependencies for the basic library.
* Well-documented, stable API.
* Bindings in several programming languages.
%package -n libnbd%{sover}
Summary: Core library for nbd
%description -n libnbd%{sover}
This is the NBD client library in userspace, a simple library for
writing NBD clients.
%package devel
Summary: Development headers for %{name}
Requires: libnbd%{sover} = %{version}-%{release}
%description devel
This package contains development headers for %{name}.
%package -n python3-%{name}
Summary: Python 3 bindings for %{name}
Requires: libnbd%{sover} = %{version}-%{release}
%description -n python3-%{name}
python3-%{name} contains Python 3 bindings for %{name}.
%package -n nbdfuse
Summary: FUSE support for %{name}
Requires: libnbd%{sover} = %{version}-%{release}
%description -n nbdfuse
This package contains FUSE support for %{name}.
%package bash-completion
Summary: Bash tab-completion for %{name}
BuildArch: noarch
Requires: bash-completion >= 2.0
Requires: libnbd%{sover} = %{version}-%{release}
%description bash-completion
Install this package if you want intelligent bash tab-completion
for %{name}.
%prep
%autosetup -p1
%build
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
autoreconf -fiv
%configure \
--enable-fuse \
--disable-golang \
PYTHON=%{__python3} \
--enable-python \
Accepting request 1011044 from home:jfehlig:branches:Virtualization - Update to version 1.14.1: * Version 1.14.1. * copy/copy-file-to-qcow2-compressed.sh: Alternate test for compressed clusters * ci: Expire artifacts after 1 week * sh: Add workaround for macOS SIP DYLD_* environment sanitiser * info: Tone down the colours in nbdinfo normal output * tests/make-pki.sh: Use Subject Alternative Name for server certificate * info: Improve error message when the export may be unknown to the server * info: Add limited colourized output * dump: Move ANSI colours to separate library under common/include * Version 1.14.0. * docs: Finalize release notes for 1.14 * Version 1.13.9. * build: Document gmake instead of make on *BSD, macOS * build: Use GNUTLS_CFLAGS when checking for <gnutls/socket.h> * build: Remove use of $^ * copy: Skip compressed qcow2 test on older qemu-nbd * interop: Skip interop-qemu-nbd-tls-psk if qemu-nbd doesn't support PSK * tests: Check nbdkit supports --tls-verify-peer before using * docs: Document signal handling * generator: Set SO_NOSIGPIPE on sockets * lib/crypto: Use GNUTLS_NO_SIGNAL if available * docs: Add outline release notes for libnbd 1.14 * lib/crypto.c: Ignore TLS premature termination after write shutdown * lib/crypto.c: Check for <gnutls/socket.h> before including * Version 1.13.8. * generator: Add README.state-machine.md to EXTRA_DIST * generator: Fix reentry to REPLY.START when recv returns EAGAIN * generator: Move state machine documentation to a README file * tests: Avoid bash namerefs, for RHEL 7 OBS-URL: https://build.opensuse.org/request/show/1011044 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libnbd?expand=0&rev=20
2022-10-15 01:02:20 +02:00
--disable-static \
%{nil}
%make_build
%install
%make_install
%fdupes %{buildroot}
# Delete libtool crap.
find "%{buildroot}" -name '*.la' -delete
# Delete the golang man page since we're not distributing the bindings.
rm %{buildroot}/%{_mandir}/man3/libnbd-golang.3*
%ocaml_create_file_list
%check
# All fuse tests fail in Koji with:
# fusermount: entry for fuse/test-*.d not found in /etc/mtab
# for unknown reasons but probably related to the Koji environment.
for f in fuse/test-*.sh; do
rm $f
touch $f
chmod +x $f
done
%make_build check || {
for f in $(find . -name test-suite.log); do
echo
echo "==== $f ===="
cat $f
done
}
%post -n libnbd%{sover} -p /sbin/ldconfig
%postun -n libnbd%{sover} -p /sbin/ldconfig
%files
Accepting request 1011044 from home:jfehlig:branches:Virtualization - Update to version 1.14.1: * Version 1.14.1. * copy/copy-file-to-qcow2-compressed.sh: Alternate test for compressed clusters * ci: Expire artifacts after 1 week * sh: Add workaround for macOS SIP DYLD_* environment sanitiser * info: Tone down the colours in nbdinfo normal output * tests/make-pki.sh: Use Subject Alternative Name for server certificate * info: Improve error message when the export may be unknown to the server * info: Add limited colourized output * dump: Move ANSI colours to separate library under common/include * Version 1.14.0. * docs: Finalize release notes for 1.14 * Version 1.13.9. * build: Document gmake instead of make on *BSD, macOS * build: Use GNUTLS_CFLAGS when checking for <gnutls/socket.h> * build: Remove use of $^ * copy: Skip compressed qcow2 test on older qemu-nbd * interop: Skip interop-qemu-nbd-tls-psk if qemu-nbd doesn't support PSK * tests: Check nbdkit supports --tls-verify-peer before using * docs: Document signal handling * generator: Set SO_NOSIGPIPE on sockets * lib/crypto: Use GNUTLS_NO_SIGNAL if available * docs: Add outline release notes for libnbd 1.14 * lib/crypto.c: Ignore TLS premature termination after write shutdown * lib/crypto.c: Check for <gnutls/socket.h> before including * Version 1.13.8. * generator: Add README.state-machine.md to EXTRA_DIST * generator: Fix reentry to REPLY.START when recv returns EAGAIN * generator: Move state machine documentation to a README file * tests: Avoid bash namerefs, for RHEL 7 OBS-URL: https://build.opensuse.org/request/show/1011044 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libnbd?expand=0&rev=20
2022-10-15 01:02:20 +02:00
%doc README.md
%{_bindir}/nbdcopy
Accepting request 1011044 from home:jfehlig:branches:Virtualization - Update to version 1.14.1: * Version 1.14.1. * copy/copy-file-to-qcow2-compressed.sh: Alternate test for compressed clusters * ci: Expire artifacts after 1 week * sh: Add workaround for macOS SIP DYLD_* environment sanitiser * info: Tone down the colours in nbdinfo normal output * tests/make-pki.sh: Use Subject Alternative Name for server certificate * info: Improve error message when the export may be unknown to the server * info: Add limited colourized output * dump: Move ANSI colours to separate library under common/include * Version 1.14.0. * docs: Finalize release notes for 1.14 * Version 1.13.9. * build: Document gmake instead of make on *BSD, macOS * build: Use GNUTLS_CFLAGS when checking for <gnutls/socket.h> * build: Remove use of $^ * copy: Skip compressed qcow2 test on older qemu-nbd * interop: Skip interop-qemu-nbd-tls-psk if qemu-nbd doesn't support PSK * tests: Check nbdkit supports --tls-verify-peer before using * docs: Document signal handling * generator: Set SO_NOSIGPIPE on sockets * lib/crypto: Use GNUTLS_NO_SIGNAL if available * docs: Add outline release notes for libnbd 1.14 * lib/crypto.c: Ignore TLS premature termination after write shutdown * lib/crypto.c: Check for <gnutls/socket.h> before including * Version 1.13.8. * generator: Add README.state-machine.md to EXTRA_DIST * generator: Fix reentry to REPLY.START when recv returns EAGAIN * generator: Move state machine documentation to a README file * tests: Avoid bash namerefs, for RHEL 7 OBS-URL: https://build.opensuse.org/request/show/1011044 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libnbd?expand=0&rev=20
2022-10-15 01:02:20 +02:00
%{_bindir}/nbddump
%{_bindir}/nbdinfo
%{_mandir}/man1/nbdcopy.1*
Accepting request 1011044 from home:jfehlig:branches:Virtualization - Update to version 1.14.1: * Version 1.14.1. * copy/copy-file-to-qcow2-compressed.sh: Alternate test for compressed clusters * ci: Expire artifacts after 1 week * sh: Add workaround for macOS SIP DYLD_* environment sanitiser * info: Tone down the colours in nbdinfo normal output * tests/make-pki.sh: Use Subject Alternative Name for server certificate * info: Improve error message when the export may be unknown to the server * info: Add limited colourized output * dump: Move ANSI colours to separate library under common/include * Version 1.14.0. * docs: Finalize release notes for 1.14 * Version 1.13.9. * build: Document gmake instead of make on *BSD, macOS * build: Use GNUTLS_CFLAGS when checking for <gnutls/socket.h> * build: Remove use of $^ * copy: Skip compressed qcow2 test on older qemu-nbd * interop: Skip interop-qemu-nbd-tls-psk if qemu-nbd doesn't support PSK * tests: Check nbdkit supports --tls-verify-peer before using * docs: Document signal handling * generator: Set SO_NOSIGPIPE on sockets * lib/crypto: Use GNUTLS_NO_SIGNAL if available * docs: Add outline release notes for libnbd 1.14 * lib/crypto.c: Ignore TLS premature termination after write shutdown * lib/crypto.c: Check for <gnutls/socket.h> before including * Version 1.13.8. * generator: Add README.state-machine.md to EXTRA_DIST * generator: Fix reentry to REPLY.START when recv returns EAGAIN * generator: Move state machine documentation to a README file * tests: Avoid bash namerefs, for RHEL 7 OBS-URL: https://build.opensuse.org/request/show/1011044 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libnbd?expand=0&rev=20
2022-10-15 01:02:20 +02:00
%{_mandir}/man1/nbddump.1*
%{_mandir}/man1/nbdinfo.1*
%files -n libnbd%{sover} -f %name.files
%license COPYING.LIB
%{_libdir}/libnbd.so.%{sover}
%{_libdir}/libnbd.so.%{sover}.*
%files devel -f %name.files.devel
%{_includedir}/libnbd.h
%{_libdir}/libnbd.so
%{_libdir}/pkgconfig/libnbd.pc
%{_mandir}/man3/libnbd.3*
%{_mandir}/man3/libnbd-ocaml.3.gz
%{_mandir}/man1/libnbd-release-notes-1.*.1*
%{_mandir}/man3/libnbd-security.3*
%{_mandir}/man3/nbd_*.3*
%files -n python3-%{name}
%{python3_sitearch}/libnbdmod*.so
%{python3_sitearch}/nbd.py
%{python3_sitearch}/nbdsh.py
%{_bindir}/nbdsh
%{_mandir}/man1/nbdsh.1*
%files -n nbdfuse
%{_bindir}/nbdfuse
%{_mandir}/man1/nbdfuse.1*
%files bash-completion
%{_datadir}/bash-completion
%changelog