diff --git a/nbdkit.spec b/nbdkit.spec index 6c10314e2aab8a6d0ef280f2a6570c8cba629c84..f8f657ad0ccc30d6475ad66ba18027d4412e584a 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -4,7 +4,7 @@ Name: nbdkit Version: 1.6.2 -Release: 7 +Release: 8 Summary: NBD server License: BSD URL: https://github.com/libguestfs/nbdkit @@ -20,7 +20,7 @@ BuildRequires: autoconf, automake, libtool %endif BuildRequires: gnutls gnutls-devel libselinux-devel python3-devel gnupg2 lua-devel socat iproute BuildRequires: libguestfs-devel libvirt-devel xz-devel zlib-devel libcurl-devel e2fsprogs-devel -BuildRequires: bash-completion perl-devel perl(ExtUtils::Embed) python2-devel ocaml >= 4.02.2 +BuildRequires: bash-completion perl-devel perl(ExtUtils::Embed) ocaml >= 4.02.2 BuildRequires: ruby-devel tcl-devel perl-podlators qemu-img Requires: nbdkit-server nbdkit-basic-plugins nbdkit-basic-filters @@ -158,35 +158,14 @@ Obsoletes: nbdkit-plugin-perl <= %{version}-%{release} %description perl-plugin This package lets you write Perl plugins for nbdkit. -%package python-plugin-common -Summary: Python 2 and 3 plugin common files for nbdkit -License: BSD -Requires: nbdkit-server = %{version}-%{release} -Provides: nbdkit-plugin-python-common = %{version}-%{release} -Obsoletes: nbdkit-plugin-python-common <= %{version}-%{release} - -%description python-plugin-common -This package contains common files shared between Python 2 -and Python 3 nbdkit plugins. -You should not install this package directly. Instead install -either nbdkit-python2-plugin or nbdkit-python3-plugin. - -%package python2-plugin -Summary: Python 2 plugin for nbdkit -License: BSD -Requires: nbdkit-server = %{version}-%{release} nbdkit-python-plugin-common = %{version}-%{release} -Provides: nbdkit-plugin-python = %{version}-%{release} nbdkit-plugin-python2 = %{version}-%{release} -Obsoletes: nbdkit-plugin-python <= %{version}-%{release} nbdkit-plugin-python2 <= %{version}-%{release} - -%description python2-plugin -This package lets you write Python 2 plugins for nbdkit. - %package python3-plugin Summary: Python 3 plugin for nbdkit License: BSD -Requires: nbdkit-server = %{version}-%{release} nbdkit-python-plugin-common = %{version}-%{release} +Requires: nbdkit-server = %{version}-%{release} Provides: nbdkit-plugin-python3 = %{version}-%{release} Obsoletes: nbdkit-plugin-python3 <= %{version}-%{release} +Provides: nbdkit-python-plugin-common = %{version}-%{release} +Obsoletes: nbdkit-python-plugin-common <= %{version}-%{release} %description python3-plugin This package lets you write Python 3 plugins for nbdkit. @@ -284,10 +263,11 @@ mv "$copy" python3 %configure --disable-static --with-libguestfs --with-libvirt --with-tls-priority=@NBDKIT,SYSTEM %make_build + pushd python3 export PYTHON=%{_bindir}/python3 -%configure --disable-static --disable-lua --disable-perl --disable-ocaml --disable-ruby --disable-tcl \ - --without-curl --without-ext2 --without-libvirt --without-liblzma --without-zlib +%configure --disable-static --disable-lua --disable-tcl \ + --without-curl --without-liblzma --without-zlib grep '^PYTHON_VERSION = 3' Makefile %make_build unset PYTHON @@ -301,12 +281,6 @@ popd pushd $RPM_BUILD_ROOT%{_libdir}/nbdkit/plugins/ mv nbdkit-python-plugin.so nbdkit-python3-plugin.so popd -%make_install - -pushd $RPM_BUILD_ROOT%{_libdir}/nbdkit/plugins/ -mv nbdkit-python-plugin.so nbdkit-python2-plugin.so -ln -s nbdkit-python2-plugin.so nbdkit-python-plugin.so -popd find $RPM_BUILD_ROOT -name '*.la' -delete @@ -319,6 +293,7 @@ rm $RPM_BUILD_ROOT%{_mandir}/man1/nbdkit-vddk-plugin.1* mkdir -p $HOME/.cache/libvirt export LIBGUESTFS_DEBUG=1 export LIBGUESTFS_TRACE=1 +find -name *.log make check -j1 || { cat tests/test-suite.log exit 1 @@ -376,13 +351,8 @@ popd %doc README LICENSE %{_libdir}/nbdkit/plugins/nbdkit-perl-plugin.so -%files python-plugin-common -%doc README LICENSE - -%files python2-plugin -%{_libdir}/nbdkit/plugins/{nbdkit-python-plugin.so,nbdkit-python2-plugin.so} - %files python3-plugin +%doc README LICENSE %{_libdir}/nbdkit/plugins/nbdkit-python3-plugin.so %ifarch x86_64 @@ -422,6 +392,9 @@ popd %{_mandir}/man3/nbdkit-*.3* %changelog +* Wed Oct 21 2020 chengzihan - 1.6.2-7 +- Remove subpackage nbdkit-python2-plugin + * Wed Jun 24 2020 yaokai13 - 1.6.2-6 - Fix the test error