Rebase to libnbd 1.18.x

resolves: RHEL-14476
This commit is contained in:
Richard W.M. Jones 2023-10-24 09:14:42 +01:00
parent a46d8a2981
commit 036c9b27d0
3 changed files with 40 additions and 20 deletions

View File

@ -6,7 +6,7 @@ set -e
# directory. Use it like this:
# ./copy-patches.sh
rhel_version=9.3
rhel_version=9.4
# Check we're in the right directory.
if [ ! -f libnbd.spec ]; then

View File

@ -1,6 +1,3 @@
# Do this until the feature is fixed in Fedora.
%undefine _package_note_flags
# If we should verify tarball signature with GPGv2.
%global verify_tarball_signature 1
@ -8,14 +5,14 @@
%global patches_touch_autotools %{nil}
# The source directory.
%global source_directory 1.16-stable
%global source_directory 1.18-stable
Name: libnbd
Version: 1.16.0
Version: 1.18.1
Release: 1%{?dist}
Summary: NBD client library in userspace
License: LGPLv2+
License: LGPL-2.0-or-later AND BSD-3-Clause
URL: https://gitlab.com/nbdkit/libnbd
Source0: http://libguestfs.org/download/libnbd/%{source_directory}/%{name}-%{version}.tar.gz
@ -29,7 +26,7 @@ Source2: libguestfs.keyring
Source3: copy-patches.sh
# Patches are stored in the upstream repository:
# https://gitlab.com/nbdkit/libnbd/-/commits/rhel-9.3/
# https://gitlab.com/nbdkit/libnbd/-/commits/rhel-9.4/
# (no patches)
@ -60,10 +57,12 @@ BuildRequires: ubdsrv-devel >= 1.0-3.rc6
# For the Python 3 bindings.
BuildRequires: python3-devel
%ifnarch %{ix86}
# For the OCaml bindings.
BuildRequires: ocaml
BuildRequires: ocaml-findlib-devel
BuildRequires: ocaml-ocamldoc
%endif
# Only for building the examples.
BuildRequires: glib2-devel
@ -98,6 +97,11 @@ BuildRequires: nbdkit-sh-plugin
BuildRequires: nbdkit-sparse-random-plugin
%endif
%ifnarch %{ix86}
# The OCaml runtime system does not provide this symbol
%global __ocaml_requires_opts -x Stdlib__Callback
%endif
%description
NBD Network Block Device is a protocol for accessing Block Devices
@ -122,7 +126,6 @@ The key features are:
%package devel
Summary: Development headers for %{name}
License: LGPLv2+ and BSD
Requires: %{name}%{?_isa} = %{version}-%{release}
@ -130,6 +133,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
This package contains development headers for %{name}.
%ifnarch %{ix86}
%package -n ocaml-%{name}
Summary: OCaml language bindings for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
@ -148,6 +152,7 @@ Requires: ocaml-%{name}%{?_isa} = %{version}-%{release}
This package contains OCaml language development package for
%{name}. Install this if you want to compile OCaml software which
uses %{name}.
%endif
%package -n python3-%{name}
@ -166,7 +171,6 @@ python3-%{name} contains Python 3 bindings for %{name}.
%package -n nbdfuse
Summary: FUSE support for %{name}
License: LGPLv2+ and BSD
Requires: %{name}%{?_isa} = %{version}-%{release}
Recommends: fuse3
@ -178,7 +182,6 @@ This package contains FUSE support for %{name}.
%if !0%{?rhel}
%package -n nbdublk
Summary: Userspace NBD block device
License: LGPLv2+
Requires: %{name}%{?_isa} = %{version}-%{release}
Recommends: kernel >= 6.0.0
Recommends: %{_sbindir}/ublk
@ -220,9 +223,14 @@ autoreconf -i
--with-tls-priority=@LIBNBD,SYSTEM \
PYTHON=%{__python3} \
--enable-python \
%ifnarch %{ix86}
--enable-ocaml \
%else
--disable-ocaml \
%endif
--enable-fuse \
--disable-golang
--disable-golang \
--disable-rust
make %{?_smp_mflags}
@ -236,6 +244,11 @@ find $RPM_BUILD_ROOT -name '*.la' -delete
# Delete the golang man page since we're not distributing the bindings.
rm $RPM_BUILD_ROOT%{_mandir}/man3/libnbd-golang.3*
%ifarch %{ix86}
# Delete the OCaml man page on i686.
rm $RPM_BUILD_ROOT%{_mandir}/man3/libnbd-ocaml.3*
%endif
%if 0%{?rhel}
# Delete nbdublk on RHEL.
rm $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/nbdublk
@ -308,12 +321,12 @@ make %{?_smp_mflags} check || {
%{_mandir}/man3/nbd_*.3*
%ifnarch %{ix86}
%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
%dir %{_libdir}/ocaml/nbd
%{_libdir}/ocaml/nbd/META
%{_libdir}/ocaml/nbd/*.cma
%{_libdir}/ocaml/nbd/*.cmi
%{_libdir}/ocaml/stublibs/dllmlnbd.so
%{_libdir}/ocaml/stublibs/dllmlnbd.so.owner
@ -321,13 +334,16 @@ make %{?_smp_mflags} check || {
%files -n ocaml-%{name}-devel
%doc ocaml/examples/*.ml
%license ocaml/examples/LICENSE-FOR-EXAMPLES
%{_libdir}/ocaml/nbd/*.a
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/nbd/*.cmxa
%{_libdir}/ocaml/nbd/*.cmx
%endif
%{_libdir}/ocaml/nbd/*.a
%{_libdir}/ocaml/nbd/*.mli
%{_mandir}/man3/libnbd-ocaml.3*
%{_mandir}/man3/NBD.3*
%{_mandir}/man3/NBD.*.3*
%endif
%files -n python3-%{name}
@ -364,6 +380,10 @@ make %{?_smp_mflags} check || {
%changelog
* Tue Oct 24 2023 Richard W.M. Jones <rjones@redhat.com> - 1.18.1-1
- Rebase to 1.18.1
resolves: RHEL-14476
* Tue Apr 18 2023 Richard W.M. Jones <rjones@redhat.com> - 1.16.0-1
- Rebase to 1.16.0
resolves: rhbz#2168628

View File

@ -1,2 +1,2 @@
SHA512 (libnbd-1.16.0.tar.gz) = 4ca366c819adf1f775412dd53d9b76859e6ca49a479f0b3e8f5fddfc54f27bfa43f4eed3edc2d367f6a646cfd87824323a6aafb5c3627e18b97ed44efc417150
SHA512 (libnbd-1.16.0.tar.gz.sig) = fe5c0a6568130fd1cd5bb9481638767476858623cda86f905bb70608a4da38aab3ac2cb6243358df228dccd56abfedb68d2101885d3b140d97fc03ee702b03b2
SHA512 (libnbd-1.18.1.tar.gz) = f4262666be55d580550e053355f14f80d352bf869ae7241e9fa032a9b5cd9e027eb89a536871c1206422413fc7ed745da7d612b3e1413f76ec17168705fbf12c
SHA512 (libnbd-1.18.1.tar.gz.sig) = 57798aa8b8c0973c0e13f431a6735e13a5aa546190e5de9cb43f78d54c5438df70bdf6e875282a3c4221c222a1517c64bb311e769f7c1a3e61d5b1a4e7f75e2d