2019-05-29 20:23:40 +00:00
|
|
|
# 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.
|
2019-08-21 17:11:23 +00:00
|
|
|
%global patches_touch_autotools %{nil}
|
2019-05-29 20:23:40 +00:00
|
|
|
|
|
|
|
# The source directory.
|
2019-12-03 13:21:03 +00:00
|
|
|
%global source_directory 1.3-development
|
2019-05-29 20:23:40 +00:00
|
|
|
|
|
|
|
Name: libnbd
|
2019-12-03 13:21:03 +00:00
|
|
|
Version: 1.3.1
|
2020-01-19 11:51:06 +00:00
|
|
|
Release: 3%{?dist}
|
2019-05-29 20:23:40 +00:00
|
|
|
Summary: NBD client library in userspace
|
|
|
|
|
|
|
|
License: LGPLv2+
|
|
|
|
URL: https://github.com/libguestfs/libnbd
|
|
|
|
|
|
|
|
Source0: http://libguestfs.org/download/libnbd/%{source_directory}/%{name}-%{version}.tar.gz
|
|
|
|
Source1: http://libguestfs.org/download/libnbd/%{source_directory}/%{name}-%{version}.tar.gz.sig
|
|
|
|
# Keyring used to verify tarball signature. This contains the single
|
|
|
|
# key from here:
|
|
|
|
# https://pgp.key-server.io/pks/lookup?search=rjones%40redhat.com&fingerprint=on&op=vindex
|
|
|
|
Source2: libguestfs.keyring
|
|
|
|
|
|
|
|
%if 0%{patches_touch_autotools}
|
|
|
|
BuildRequires: autoconf, automake, libtool
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if 0%{verify_tarball_signature}
|
|
|
|
BuildRequires: gnupg2
|
|
|
|
%endif
|
|
|
|
|
2019-08-03 14:35:41 +00:00
|
|
|
# For the core library.
|
2019-05-29 20:23:40 +00:00
|
|
|
BuildRequires: gcc
|
|
|
|
BuildRequires: /usr/bin/pod2man
|
|
|
|
BuildRequires: gnutls-devel
|
2019-06-02 10:03:42 +00:00
|
|
|
BuildRequires: libxml2-devel
|
2019-05-29 20:23:40 +00:00
|
|
|
|
2019-10-12 20:39:25 +00:00
|
|
|
# For nbdfuse.
|
|
|
|
BuildRequires: fuse, fuse-devel
|
|
|
|
|
2019-08-03 14:35:41 +00:00
|
|
|
# For the Python 3 bindings.
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
|
|
|
# For the OCaml bindings.
|
|
|
|
BuildRequires: ocaml
|
|
|
|
BuildRequires: ocaml-findlib-devel
|
|
|
|
|
2019-08-21 08:42:28 +00:00
|
|
|
# Only for building the examples.
|
|
|
|
BuildRequires: glib2-devel
|
|
|
|
|
2019-05-29 20:23:40 +00:00
|
|
|
# Only for running the test suite.
|
|
|
|
BuildRequires: gnutls-utils
|
2019-08-28 18:26:25 +00:00
|
|
|
%if 0%{?fedora} >= 31
|
2019-05-29 20:23:40 +00:00
|
|
|
BuildRequires: nbdkit
|
2019-08-21 10:33:20 +00:00
|
|
|
BuildRequires: nbdkit-memory-plugin
|
|
|
|
BuildRequires: nbdkit-null-plugin
|
|
|
|
BuildRequires: nbdkit-pattern-plugin
|
2019-08-21 08:42:28 +00:00
|
|
|
BuildRequires: nbdkit-sh-plugin
|
2019-08-28 18:26:25 +00:00
|
|
|
%endif
|
2019-05-29 20:23:40 +00:00
|
|
|
BuildRequires: nbd
|
|
|
|
BuildRequires: qemu-img
|
2019-08-03 14:35:41 +00:00
|
|
|
BuildRequires: gcc-c++
|
2019-05-29 20:23:40 +00:00
|
|
|
|
|
|
|
|
|
|
|
%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 devel
|
|
|
|
Summary: Development headers for %{name}
|
|
|
|
License: LGPLv2+ and BSD
|
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
This package contains development headers for %{name}.
|
|
|
|
|
|
|
|
|
2019-08-03 14:35:41 +00:00
|
|
|
%package -n ocaml-%{name}
|
|
|
|
Summary: OCaml language bindings for %{name}
|
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
|
|
%description -n ocaml-%{name}
|
|
|
|
This package contains OCaml language bindings for %{name}.
|
|
|
|
|
|
|
|
|
|
|
|
%package -n ocaml-%{name}-devel
|
|
|
|
Summary: OCaml language development package for %{name}
|
|
|
|
Requires: ocaml-%{name}%{?_isa} = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
|
|
%description -n ocaml-%{name}-devel
|
|
|
|
This package contains OCaml language development package for
|
|
|
|
%{name}. Install this if you want to compile OCaml software which
|
|
|
|
uses %{name}.
|
|
|
|
|
|
|
|
|
2019-05-29 20:23:40 +00:00
|
|
|
%package -n python3-%{name}
|
|
|
|
Summary: Python 3 bindings for %{name}
|
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
%{?python_provide:%python_provide python3-%{name}}
|
|
|
|
|
|
|
|
# The Python module happens to be called lib*.so. Don't scan it and
|
|
|
|
# have a bogus "Provides: libnbdmod.*".
|
|
|
|
%global __provides_exclude_from ^%{python3_sitearch}/lib.*\\.so
|
|
|
|
|
|
|
|
|
|
|
|
%description -n python3-%{name}
|
|
|
|
python3-%{name} contains Python 3 bindings for %{name}.
|
|
|
|
|
|
|
|
|
2019-10-12 20:39:25 +00:00
|
|
|
%package -n nbdfuse
|
|
|
|
Summary: FUSE support for %{name}
|
|
|
|
License: LGPLv2+ and BSD
|
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
|
|
%description -n nbdfuse
|
|
|
|
This package contains FUSE support for %{name}.
|
|
|
|
|
|
|
|
|
2019-05-29 20:23:40 +00:00
|
|
|
%prep
|
|
|
|
%if 0%{verify_tarball_signature}
|
2019-11-27 11:05:44 +00:00
|
|
|
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
|
2019-05-29 20:23:40 +00:00
|
|
|
%endif
|
|
|
|
%autosetup -p1
|
|
|
|
%if 0%{patches_touch_autotools}
|
|
|
|
autoreconf -i
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
%configure \
|
|
|
|
--disable-static \
|
|
|
|
--with-tls-priority=@LIBNBD,SYSTEM \
|
|
|
|
PYTHON=%{__python3} \
|
2019-08-03 14:35:41 +00:00
|
|
|
--enable-python \
|
2019-10-12 20:39:25 +00:00
|
|
|
--enable-ocaml \
|
|
|
|
--enable-fuse
|
2019-05-29 20:23:40 +00:00
|
|
|
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
%make_install
|
|
|
|
|
|
|
|
# Delete libtool crap.
|
|
|
|
find $RPM_BUILD_ROOT -name '*.la' -delete
|
|
|
|
|
|
|
|
|
|
|
|
%check
|
2019-06-27 15:42:07 +00:00
|
|
|
# interop/structured-read.sh fails with the old qemu-nbd in Fedora 29,
|
|
|
|
# so disable it there.
|
|
|
|
%if 0%{?fedora} <= 29
|
|
|
|
rm interop/structured-read.sh
|
|
|
|
touch interop/structured-read.sh
|
|
|
|
chmod +x interop/structured-read.sh
|
|
|
|
%endif
|
|
|
|
|
2019-10-12 20:59:33 +00:00
|
|
|
# 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
|
|
|
|
|
2019-05-29 20:23:40 +00:00
|
|
|
make %{?_smp_mflags} check || {
|
2019-06-27 15:29:46 +00:00
|
|
|
for f in $(find -name test-suite.log); do
|
|
|
|
echo
|
|
|
|
echo "==== $f ===="
|
|
|
|
cat $f
|
|
|
|
done
|
2019-05-29 20:23:40 +00:00
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
%doc README
|
|
|
|
%license COPYING.LIB
|
|
|
|
%{_libdir}/libnbd.so.*
|
|
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%doc TODO examples/*.c
|
|
|
|
%license examples/LICENSE-FOR-EXAMPLES
|
|
|
|
%{_includedir}/libnbd.h
|
|
|
|
%{_libdir}/libnbd.so
|
|
|
|
%{_libdir}/pkgconfig/libnbd.pc
|
|
|
|
%{_mandir}/man3/libnbd.3*
|
2019-11-09 10:53:49 +00:00
|
|
|
%{_mandir}/man1/libnbd-release-notes-1.*.1*
|
2019-10-09 08:40:51 +00:00
|
|
|
%{_mandir}/man3/libnbd-security.3*
|
2019-08-15 14:46:28 +00:00
|
|
|
%{_mandir}/man3/nbd_*.3*
|
2019-05-29 20:23:40 +00:00
|
|
|
|
|
|
|
|
2019-08-03 14:35:41 +00:00
|
|
|
%files -n ocaml-%{name}
|
|
|
|
%{_libdir}/ocaml/nbd
|
|
|
|
%exclude %{_libdir}/ocaml/nbd/*.a
|
|
|
|
%exclude %{_libdir}/ocaml/nbd/*.cmxa
|
|
|
|
%exclude %{_libdir}/ocaml/nbd/*.cmx
|
|
|
|
%exclude %{_libdir}/ocaml/nbd/*.mli
|
|
|
|
%{_libdir}/ocaml/stublibs/dllmlnbd.so
|
|
|
|
%{_libdir}/ocaml/stublibs/dllmlnbd.so.owner
|
|
|
|
|
|
|
|
|
|
|
|
%files -n ocaml-%{name}-devel
|
|
|
|
%doc ocaml/examples/*.ml
|
|
|
|
%license ocaml/examples/LICENSE-FOR-EXAMPLES
|
|
|
|
%{_libdir}/ocaml/nbd/*.a
|
|
|
|
%{_libdir}/ocaml/nbd/*.cmxa
|
|
|
|
%{_libdir}/ocaml/nbd/*.cmx
|
|
|
|
%{_libdir}/ocaml/nbd/*.mli
|
2019-08-05 14:58:05 +00:00
|
|
|
%{_mandir}/man3/libnbd-ocaml.3*
|
2019-08-03 14:35:41 +00:00
|
|
|
|
|
|
|
|
2019-05-29 20:23:40 +00:00
|
|
|
%files -n python3-%{name}
|
|
|
|
%{python3_sitearch}/libnbdmod*.so
|
|
|
|
%{python3_sitearch}/nbd.py
|
2019-06-27 15:15:51 +00:00
|
|
|
%{python3_sitearch}/nbdsh.py
|
2019-05-29 20:23:40 +00:00
|
|
|
%{python3_sitearch}/__pycache__/nbd*.py*
|
|
|
|
%{_bindir}/nbdsh
|
|
|
|
%{_mandir}/man1/nbdsh.1*
|
|
|
|
|
|
|
|
|
2019-10-12 20:39:25 +00:00
|
|
|
%files -n nbdfuse
|
|
|
|
%{_bindir}/nbdfuse
|
|
|
|
%{_mandir}/man1/nbdfuse.1*
|
|
|
|
|
|
|
|
|
2019-05-29 20:23:40 +00:00
|
|
|
%changelog
|
2020-01-19 11:51:06 +00:00
|
|
|
* Sun Jan 19 2020 Richard W.M. Jones <rjones@redhat.com> - 1.3.1-3
|
|
|
|
- OCaml 4.10.0+beta1 rebuild.
|
|
|
|
|
2019-12-12 18:15:56 +00:00
|
|
|
* Thu Dec 12 2019 Richard W.M. Jones <rjones@redhat.com> - 1.3.1-2
|
|
|
|
- Rebuild for OCaml 4.09.0.
|
|
|
|
|
2019-12-03 13:21:03 +00:00
|
|
|
* Tue Dec 03 2019 Richard W.M. Jones <rjones@redhat.com> - 1.3.1-1
|
|
|
|
- New upstream development version 1.3.1.
|
|
|
|
|
2019-11-27 11:05:44 +00:00
|
|
|
* Wed Nov 27 2019 Richard W.M. Jones <rjones@redhat.com> - 1.2.0-2
|
|
|
|
- Use gpgverify macro instead of explicit gpgv2 command.
|
|
|
|
|
2019-11-14 10:34:02 +00:00
|
|
|
* Thu Nov 14 2019 Richard W.M. Jones <rjones@redhat.com> - 1.2.0-1
|
|
|
|
- New stable release 1.2.0
|
|
|
|
|
2019-11-09 10:53:49 +00:00
|
|
|
* Sat Nov 09 2019 Richard W.M. Jones <rjones@redhat.com> - 1.1.9-1
|
|
|
|
- New upstream version 1.1.9.
|
|
|
|
- Add new nbdkit-release-notes-1.2(1) man page.
|
|
|
|
|
2019-11-06 14:30:59 +00:00
|
|
|
* Wed Nov 06 2019 Richard W.M. Jones <rjones@redhat.com> - 1.1.8-1
|
|
|
|
- New upstream version 1.1.8.
|
|
|
|
|
2019-10-24 13:30:36 +00:00
|
|
|
* Thu Oct 24 2019 Richard W.M. Jones <rjones@redhat.com> - 1.1.7-1
|
|
|
|
- New upstream version 1.1.7.
|
|
|
|
|
2019-10-19 17:08:29 +00:00
|
|
|
* Sat Oct 19 2019 Richard W.M. Jones <rjones@redhat.com> - 1.1.6-1
|
|
|
|
- New upstream version 1.1.6.
|
|
|
|
|
2019-10-12 20:39:25 +00:00
|
|
|
* Sat Oct 12 2019 Richard W.M. Jones <rjones@redhat.com> - 1.1.5-1
|
|
|
|
- New upstream version 1.1.5.
|
|
|
|
- New tool and subpackage nbdfuse.
|
|
|
|
|
2019-10-09 08:40:51 +00:00
|
|
|
* Wed Oct 9 2019 Richard W.M. Jones <rjones@redhat.com> - 1.1.4-1
|
2019-10-12 20:39:25 +00:00
|
|
|
- New upstream version 1.1.4.
|
2019-10-09 08:40:51 +00:00
|
|
|
- Contains fix for remote code execution vulnerability.
|
|
|
|
- Add new libnbd-security(3) man page.
|
|
|
|
|
2019-10-01 14:50:04 +00:00
|
|
|
* Tue Oct 1 2019 Richard W.M. Jones <rjones@redhat.com> - 1.1.3-1
|
|
|
|
- New upstream version 1.1.3.
|
|
|
|
|
2019-09-17 15:42:32 +00:00
|
|
|
* Tue Sep 17 2019 Richard W.M. Jones <rjones@redhat.com> - 1.1.2-1
|
|
|
|
- New upstream version 1.1.2.
|
|
|
|
- Remove patches which are upstream.
|
|
|
|
- Contains fix for NBD Protocol Downgrade Attack (CVE-2019-14842).
|
|
|
|
|
2019-09-12 07:39:04 +00:00
|
|
|
* Thu Sep 12 2019 Richard W.M. Jones <rjones@redhat.com> - 1.1.1-2
|
|
|
|
- Add upstream patch to fix nbdsh (for nbdkit tests).
|
|
|
|
|
2019-09-08 09:50:07 +00:00
|
|
|
* Sun Sep 08 2019 Richard W.M. Jones <rjones@redhat.com> - 1.1.1-1
|
|
|
|
- New development version 1.1.1.
|
|
|
|
|
2019-08-28 17:59:44 +00:00
|
|
|
* Wed Aug 28 2019 Richard W.M. Jones <rjones@redhat.com> - 1.0.0-1
|
|
|
|
- New upstream version 1.0.0.
|
|
|
|
|
2019-08-21 17:15:51 +00:00
|
|
|
* Wed Aug 21 2019 Miro Hrončok <mhroncok@redhat.com> - 0.9.9-2
|
|
|
|
- Rebuilt for Python 3.8
|
|
|
|
|
2019-08-21 17:11:23 +00:00
|
|
|
* Wed Aug 21 2019 Richard W.M. Jones <rjones@redhat.com> - 0.9.9-1
|
|
|
|
- New upstream version 0.9.9.
|
|
|
|
|
2019-08-21 08:42:28 +00:00
|
|
|
* Wed Aug 21 2019 Richard W.M. Jones <rjones@redhat.com> - 0.9.8-4
|
|
|
|
- Fix nbdkit dependencies so we're actually running the tests.
|
|
|
|
- Add glib2-devel BR so we build the glib main loop example.
|
2019-08-21 09:00:58 +00:00
|
|
|
- Add upstream patch to fix test error:
|
|
|
|
nbd_connect_unix: getlogin: No such device or address
|
2019-08-21 10:33:20 +00:00
|
|
|
- Fix test failure on 32 bit.
|
2019-08-21 08:42:28 +00:00
|
|
|
|
2019-08-20 11:02:49 +00:00
|
|
|
* Tue Aug 20 2019 Richard W.M. Jones <rjones@redhat.com> - 0.9.8-3
|
|
|
|
- Bump and rebuild to fix releng brokenness.
|
|
|
|
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/2LIDI33G3IEIPYSCCIP6WWKNHY7XZJGQ/
|
|
|
|
|
2019-08-19 08:18:07 +00:00
|
|
|
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.9.8-2
|
|
|
|
- Rebuilt for Python 3.8
|
|
|
|
|
2019-08-15 14:46:28 +00:00
|
|
|
* 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.
|
|
|
|
|
2019-08-05 14:58:05 +00:00
|
|
|
* 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.
|
|
|
|
|
2019-08-03 14:35:41 +00:00
|
|
|
* Sat Aug 3 2019 Richard W.M. Jones <rjones@redhat.com> - 0.9.6-2
|
|
|
|
- Add all upstream patches since 0.9.6 was released.
|
|
|
|
- Package the ocaml bindings into a subpackage.
|
|
|
|
|
2019-07-30 17:01:54 +00:00
|
|
|
* Tue Jul 30 2019 Richard W.M. Jones <rjones@redhat.com> - 0.9.6-1
|
|
|
|
- New upstream verison 0.9.6.
|
|
|
|
|
2019-07-26 08:41:09 +00:00
|
|
|
* Fri Jul 26 2019 Richard W.M. Jones <rjones@redhat.com> - 0.1.9-1
|
|
|
|
- New upstream version 0.1.9.
|
|
|
|
|
2019-07-25 13:52:26 +00:00
|
|
|
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.8-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
2019-07-17 10:05:21 +00:00
|
|
|
* Wed Jul 17 2019 Richard W.M. Jones <rjones@redhat.com> - 0.1.8-1
|
|
|
|
- New upstream version 0.1.8.
|
|
|
|
|
2019-07-16 18:06:23 +00:00
|
|
|
* Tue Jul 16 2019 Richard W.M. Jones <rjones@redhat.com> - 0.1.7-1
|
|
|
|
- New upstream version 0.1.7.
|
|
|
|
|
2019-07-03 15:35:25 +00:00
|
|
|
* Wed Jul 3 2019 Richard W.M. Jones <rjones@redhat.com> - 0.1.6-1
|
|
|
|
- New upstream version 0.1.6.
|
|
|
|
|
2019-06-27 15:15:51 +00:00
|
|
|
* Thu Jun 27 2019 Richard W.M. Jones <rjones@redhat.com> - 0.1.5-1
|
|
|
|
- New upstream version 0.1.5.
|
|
|
|
|
2019-06-09 21:12:13 +00:00
|
|
|
* Sun Jun 09 2019 Richard W.M. Jones <rjones@redhat.com> - 0.1.4-1
|
|
|
|
- New upstream version 0.1.4.
|
|
|
|
|
2019-06-02 10:03:42 +00:00
|
|
|
* Sun Jun 2 2019 Richard W.M. Jones <rjones@redhat.com> - 0.1.2-2
|
|
|
|
- Enable libxml2 for NBD URI support.
|
|
|
|
|
2019-05-30 17:26:18 +00:00
|
|
|
* Thu May 30 2019 Richard W.M. Jones <rjones@redhat.com> - 0.1.2-1
|
|
|
|
- New upstream version 0.1.2.
|
|
|
|
|
2019-05-29 20:23:40 +00:00
|
|
|
* Tue May 28 2019 Richard W.M. Jones <rjones@redhat.com> - 0.1.1-1
|
|
|
|
- Fix license in man pages and examples.
|
|
|
|
- Add nbdsh(1) man page.
|
|
|
|
- Include the signature and keyring even if validation is disabled.
|
|
|
|
- Update devel subpackage license.
|
|
|
|
- Fix old FSF address in Python tests.
|
|
|
|
- Filter Python provides.
|
|
|
|
- Remove executable permission on the tar.gz.sig file.
|
|
|
|
- Initial release.
|