2021-01-28 19:12:48 +01:00
|
|
|
#
|
|
|
|
# spec file for package libnbd
|
|
|
|
#
|
2024-04-18 23:09:23 +02:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2021-01-28 19:12:48 +01:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
2021-04-14 18:36:25 +02:00
|
|
|
|
2021-01-28 19:12:48 +01:00
|
|
|
%define sover 0
|
|
|
|
|
|
|
|
Name: libnbd
|
2024-04-18 23:09:23 +02:00
|
|
|
Version: 1.18.4
|
2021-01-28 19:12:48 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: NBD client library in userspace
|
2021-02-26 00:50:55 +01:00
|
|
|
License: LGPL-2.1-or-later
|
2021-04-14 18:36:25 +02:00
|
|
|
URL: https://gitlab.com/nbdkit/libnbd
|
2022-07-11 03:08:07 +02:00
|
|
|
Source0: %{name}-%{version}.tar.bz2
|
2021-01-28 19:12:48 +01:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: libtool
|
2022-05-13 17:22:33 +02:00
|
|
|
BuildRequires: ocaml-findlib
|
2023-12-15 01:10:14 +01:00
|
|
|
BuildRequires: ocaml-rpm-macros
|
2024-04-18 23:09:23 +02:00
|
|
|
BuildRequires: pkg-config
|
2021-04-14 18:36:25 +02:00
|
|
|
BuildRequires: ocaml(compiler)
|
2021-01-28 19:12:48 +01:00
|
|
|
BuildRequires: perl(Pod::Man)
|
|
|
|
BuildRequires: perl(Pod::Simple)
|
|
|
|
BuildRequires: pkgconfig(bash-completion)
|
2021-06-10 00:25:00 +02:00
|
|
|
BuildRequires: pkgconfig(fuse3)
|
2021-01-28 19:12:48 +01:00
|
|
|
BuildRequires: pkgconfig(glib-2.0)
|
|
|
|
BuildRequires: pkgconfig(gnutls) >= 3.3.0
|
|
|
|
BuildRequires: pkgconfig(libxml-2.0)
|
2022-07-11 03:08:07 +02:00
|
|
|
BuildRequires: pkgconfig(python3)
|
2021-04-14 18:36:25 +02:00
|
|
|
Requires: libnbd%{sover} = %{version}
|
2021-01-28 19:12:48 +01:00
|
|
|
# Only for running the test suite.
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: jq
|
2021-02-26 00:50:55 +01:00
|
|
|
%if 0%{?suse_version} >= 1550
|
2021-01-28 19:12:48 +01:00
|
|
|
BuildRequires: nbd
|
2021-02-26 00:50:55 +01:00
|
|
|
%endif
|
2021-01-28 19:12:48 +01:00
|
|
|
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
|
2021-04-14 18:36:25 +02:00
|
|
|
|
2021-01-28 19:12:48 +01:00
|
|
|
%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}
|
2021-04-14 18:36:25 +02:00
|
|
|
|
2021-01-28 19:12:48 +01:00
|
|
|
%description devel
|
|
|
|
This package contains development headers for %{name}.
|
|
|
|
|
2022-07-11 03:08:07 +02:00
|
|
|
%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}.
|
|
|
|
|
2021-01-28 19:12:48 +01:00
|
|
|
%package -n nbdfuse
|
|
|
|
Summary: FUSE support for %{name}
|
|
|
|
Requires: libnbd%{sover} = %{version}-%{release}
|
2021-04-14 18:36:25 +02:00
|
|
|
|
2021-01-28 19:12:48 +01:00
|
|
|
%description -n nbdfuse
|
|
|
|
This package contains FUSE support for %{name}.
|
|
|
|
|
|
|
|
%package bash-completion
|
2021-04-14 18:36:25 +02:00
|
|
|
Summary: Bash tab-completion for %{name}
|
|
|
|
BuildArch: noarch
|
|
|
|
Requires: bash-completion >= 2.0
|
|
|
|
Requires: libnbd%{sover} = %{version}-%{release}
|
|
|
|
|
2021-01-28 19:12:48 +01:00
|
|
|
%description bash-completion
|
|
|
|
Install this package if you want intelligent bash tab-completion
|
|
|
|
for %{name}.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%autosetup -p1
|
|
|
|
|
|
|
|
%build
|
2023-03-23 23:01:58 +01:00
|
|
|
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
|
2021-01-28 19:12:48 +01:00
|
|
|
autoreconf -fiv
|
|
|
|
%configure \
|
|
|
|
--enable-fuse \
|
|
|
|
--disable-golang \
|
2022-07-11 03:08:07 +02:00
|
|
|
PYTHON=%{__python3} \
|
|
|
|
--enable-python \
|
2022-10-15 01:02:20 +02:00
|
|
|
--disable-static \
|
|
|
|
%{nil}
|
2021-01-28 19:12:48 +01:00
|
|
|
|
|
|
|
%make_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%make_install
|
|
|
|
%fdupes %{buildroot}
|
|
|
|
# Delete libtool crap.
|
2021-03-15 02:31:59 +01:00
|
|
|
find "%{buildroot}" -name '*.la' -delete
|
2021-01-28 19:12:48 +01:00
|
|
|
|
|
|
|
# Delete the golang man page since we're not distributing the bindings.
|
2021-03-15 02:31:59 +01:00
|
|
|
rm %{buildroot}/%{_mandir}/man3/libnbd-golang.3*
|
2021-01-28 19:12:48 +01:00
|
|
|
|
2023-12-15 01:10:14 +01:00
|
|
|
%ocaml_create_file_list
|
|
|
|
|
2021-01-28 19:12:48 +01:00
|
|
|
%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
|
|
|
|
|
2021-03-15 02:31:59 +01:00
|
|
|
%make_build check || {
|
|
|
|
for f in $(find . -name test-suite.log); do
|
2021-01-28 19:12:48 +01:00
|
|
|
echo
|
|
|
|
echo "==== $f ===="
|
|
|
|
cat $f
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
%post -n libnbd%{sover} -p /sbin/ldconfig
|
|
|
|
%postun -n libnbd%{sover} -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%files
|
2022-10-15 01:02:20 +02:00
|
|
|
%doc README.md
|
2021-01-28 19:12:48 +01:00
|
|
|
%{_bindir}/nbdcopy
|
2022-10-15 01:02:20 +02:00
|
|
|
%{_bindir}/nbddump
|
2021-01-28 19:12:48 +01:00
|
|
|
%{_bindir}/nbdinfo
|
|
|
|
%{_mandir}/man1/nbdcopy.1*
|
2022-10-15 01:02:20 +02:00
|
|
|
%{_mandir}/man1/nbddump.1*
|
2021-01-28 19:12:48 +01:00
|
|
|
%{_mandir}/man1/nbdinfo.1*
|
|
|
|
|
2023-12-15 01:10:14 +01:00
|
|
|
%files -n libnbd%{sover} -f %name.files
|
2021-01-28 19:12:48 +01:00
|
|
|
%license COPYING.LIB
|
|
|
|
%{_libdir}/libnbd.so.%{sover}
|
|
|
|
%{_libdir}/libnbd.so.%{sover}.*
|
2023-12-15 01:10:14 +01:00
|
|
|
|
|
|
|
%files devel -f %name.files.devel
|
2021-01-28 19:12:48 +01:00
|
|
|
%{_includedir}/libnbd.h
|
|
|
|
%{_libdir}/libnbd.so
|
|
|
|
%{_libdir}/pkgconfig/libnbd.pc
|
|
|
|
%{_mandir}/man3/libnbd.3*
|
2022-05-13 17:22:33 +02:00
|
|
|
%{_mandir}/man3/libnbd-ocaml.3.gz
|
2021-01-28 19:12:48 +01:00
|
|
|
%{_mandir}/man1/libnbd-release-notes-1.*.1*
|
|
|
|
%{_mandir}/man3/libnbd-security.3*
|
|
|
|
%{_mandir}/man3/nbd_*.3*
|
|
|
|
|
2022-07-11 03:08:07 +02:00
|
|
|
%files -n python3-%{name}
|
|
|
|
%{python3_sitearch}/libnbdmod*.so
|
|
|
|
%{python3_sitearch}/nbd.py
|
|
|
|
%{python3_sitearch}/nbdsh.py
|
|
|
|
%{_bindir}/nbdsh
|
|
|
|
%{_mandir}/man1/nbdsh.1*
|
|
|
|
|
2021-01-28 19:12:48 +01:00
|
|
|
%files -n nbdfuse
|
|
|
|
%{_bindir}/nbdfuse
|
|
|
|
%{_mandir}/man1/nbdfuse.1*
|
|
|
|
|
|
|
|
%files bash-completion
|
|
|
|
%{_datadir}/bash-completion
|
2021-04-14 18:36:25 +02:00
|
|
|
|
|
|
|
%changelog
|