Disable libvirt on riscv64.

Other simplifications to %configure line.
This commit is contained in:
Richard W.M. Jones 2018-08-18 11:07:07 +01:00
parent 70d469e620
commit cc648daf62
1 changed files with 41 additions and 3 deletions

View File

@ -16,6 +16,11 @@
%global have_python3 1
%endif
# Disable libvirt on riscv64 for now.
%ifnarch riscv64
%global have_libvirt 1
%endif
# If we should verify tarball signature with GPGv2.
%global verify_tarball_signature 1
@ -27,7 +32,7 @@
Name: nbdkit
Version: 1.5.6
Release: 1%{?dist}
Release: 2%{?dist}
Summary: NBD server
License: BSD
@ -61,7 +66,9 @@ BuildRequires: libselinux-devel
%if 0%{?have_libguestfs}
BuildRequires: libguestfs-devel
%endif
%if 0%{?have_libvirt}
BuildRequires: libvirt-devel
%endif
BuildRequires: xz-devel
BuildRequires: zlib-devel
BuildRequires: libcurl-devel
@ -279,6 +286,7 @@ Obsoletes: %{name}-plugin-gzip <= %{version}-%{release}
This package is a gzip file serving plugin for %{name}.
%if 0%{?have_libvirt}
%package libvirt-plugin
Summary: Libvirt plugin for %{name}
License: BSD
@ -294,6 +302,7 @@ Obsoletes: %{name}-plugin-libvirt <= %{version}-%{release}
This package is a libvirt plugin for %{name}. It lets you access
libvirt guest disks readonly. It is implemented using the libvirt
virDomainBlockPeek API.
%endif
%package lua-plugin
@ -610,13 +619,36 @@ copy="$(mktemp -d)"
cp -a . "$copy"
mv "$copy" python3
%configure --disable-static --with-tls-priority=@NBDKIT,SYSTEM
%configure \
--disable-static \
%if 0%{?have_libguestfs}
--with-libguestfs \
%else
--without-libguestfs \
%endif
%if 0%{?have_libvirt}
--with-libvirt \
%else
--without-libvirt \
%endif
--with-tls-priority=@NBDKIT,SYSTEM
make %{?_smp_mflags}
%if 0%{?have_python3}
pushd python3
export PYTHON=%{_bindir}/python3
%configure --disable-static --disable-lua --disable-perl --disable-ocaml --disable-ruby --disable-tcl
%configure \
--disable-static \
--disable-lua \
--disable-perl \
--disable-ocaml \
--disable-ruby \
--disable-tcl \
--without-curl \
--without-ext2 \
--without-libvirt \
--without-liblzma \
--without-zlib
# Verify that it picked the correct version of Python
# to avoid RHBZ#1404631 happening again silently.
grep '^PYTHON_VERSION = 3' Makefile
@ -774,11 +806,13 @@ popd
%{_mandir}/man1/nbdkit-gzip-plugin.1*
%if 0%{?have_libvirt}
%files libvirt-plugin
%doc README
%license LICENSE
%{_libdir}/%{name}/plugins/nbdkit-libvirt-plugin.so
%{_mandir}/man1/nbdkit-libvirt-plugin.1*
%endif
%files lua-plugin
@ -915,6 +949,10 @@ popd
%changelog
* Sat Aug 18 2018 Richard W.M. Jones <rjones@redhat.com> - 1.5.6-2
- Disable libvirt on riscv64.
- Other simplifications to %%configure line.
* Thu Aug 16 2018 Richard W.M. Jones <rjones@redhat.com> - 1.5.6-1
- New upstream version 1.5.6.