From cc648daf62202858af379b4484aaad948bf9390a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 18 Aug 2018 11:07:07 +0100 Subject: [PATCH] Disable libvirt on riscv64. Other simplifications to %configure line. --- nbdkit.spec | 44 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/nbdkit.spec b/nbdkit.spec index ee2d1e0..52b9c2a 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -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 - 1.5.6-2 +- Disable libvirt on riscv64. +- Other simplifications to %%configure line. + * Thu Aug 16 2018 Richard W.M. Jones - 1.5.6-1 - New upstream version 1.5.6.