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

View File

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