Disable python3 plugin on RHEL/EPEL <= 7.
Only ship on x86_64 in RHEL/EPEL <= 7.
This commit is contained in:
parent
3e2f88dacd
commit
f38f61c339
26
nbdkit.spec
26
nbdkit.spec
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
Name: nbdkit
|
Name: nbdkit
|
||||||
Version: 1.1.16
|
Version: 1.1.16
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: NBD server
|
Summary: NBD server
|
||||||
|
|
||||||
License: BSD
|
License: BSD
|
||||||
@ -14,6 +14,14 @@ URL: https://github.com/libguestfs/nbdkit
|
|||||||
|
|
||||||
Source0: http://libguestfs.org/download/nbdkit/%{name}-%{version}.tar.gz
|
Source0: http://libguestfs.org/download/nbdkit/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
|
%if 0%{?rhel} == 7
|
||||||
|
# On RHEL 7, nothing in the virt stack is shipped on aarch64 and
|
||||||
|
# libguestfs was not shipped on POWER (fixed in 7.5). We could in
|
||||||
|
# theory make all of this work by having lots more conditionals, but
|
||||||
|
# for now limit this package to x86_64 on RHEL.
|
||||||
|
ExclusiveArch: x86_64
|
||||||
|
%endif
|
||||||
|
|
||||||
BuildRequires: /usr/bin/pod2man
|
BuildRequires: /usr/bin/pod2man
|
||||||
BuildRequires: gnutls-devel
|
BuildRequires: gnutls-devel
|
||||||
%if 0%{?have_libguestfs}
|
%if 0%{?have_libguestfs}
|
||||||
@ -26,7 +34,9 @@ BuildRequires: libcurl-devel
|
|||||||
BuildRequires: perl-devel
|
BuildRequires: perl-devel
|
||||||
BuildRequires: perl(ExtUtils::Embed)
|
BuildRequires: perl(ExtUtils::Embed)
|
||||||
BuildRequires: python2-devel
|
BuildRequires: python2-devel
|
||||||
|
%if 0%{?rhel} >= 8
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
|
%endif
|
||||||
%ifarch %{ocaml_native_compiler}
|
%ifarch %{ocaml_native_compiler}
|
||||||
# Requires OCaml 4.02.2 which contains fix for
|
# Requires OCaml 4.02.2 which contains fix for
|
||||||
# http://caml.inria.fr/mantis/view.php?id=6693
|
# http://caml.inria.fr/mantis/view.php?id=6693
|
||||||
@ -196,6 +206,7 @@ Obsoletes: %{name}-plugin-python <= %{version}-%{release}
|
|||||||
This package lets you write Python 2 plugins for %{name}.
|
This package lets you write Python 2 plugins for %{name}.
|
||||||
|
|
||||||
|
|
||||||
|
%if 0%{?rhel} >= 8
|
||||||
%package plugin-python3
|
%package plugin-python3
|
||||||
Summary: Python 3 plugin for %{name}
|
Summary: Python 3 plugin for %{name}
|
||||||
License: BSD
|
License: BSD
|
||||||
@ -206,6 +217,7 @@ Requires: %{name}-plugin-python-common = %{version}-%{release}
|
|||||||
|
|
||||||
%description plugin-python3
|
%description plugin-python3
|
||||||
This package lets you write Python 3 plugins for %{name}.
|
This package lets you write Python 3 plugins for %{name}.
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%package plugin-ruby
|
%package plugin-ruby
|
||||||
@ -273,6 +285,7 @@ mv "$copy" python3
|
|||||||
%configure --disable-static --with-tls-priority=@NBDKIT,SYSTEM
|
%configure --disable-static --with-tls-priority=@NBDKIT,SYSTEM
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
|
%if 0%{?rhel} >= 8
|
||||||
pushd python3
|
pushd python3
|
||||||
export PYTHON=%{_bindir}/python3
|
export PYTHON=%{_bindir}/python3
|
||||||
%configure --disable-static --disable-perl --disable-ocaml --disable-ruby
|
%configure --disable-static --disable-perl --disable-ocaml --disable-ruby
|
||||||
@ -282,12 +295,14 @@ grep '^PYTHON_VERSION = 3' Makefile
|
|||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
unset PYTHON
|
unset PYTHON
|
||||||
popd
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
# Install for Python 2 and Python 3 separately.
|
# Install for Python 2 and Python 3 separately.
|
||||||
# We do the Python 3 install first since that build is
|
# We do the Python 3 install first since that build is
|
||||||
# incomplete.
|
# incomplete.
|
||||||
|
%if 0%{?rhel} >= 8
|
||||||
pushd python3
|
pushd python3
|
||||||
%make_install
|
%make_install
|
||||||
popd
|
popd
|
||||||
@ -295,6 +310,7 @@ popd
|
|||||||
pushd $RPM_BUILD_ROOT%{_libdir}/nbdkit/plugins/
|
pushd $RPM_BUILD_ROOT%{_libdir}/nbdkit/plugins/
|
||||||
mv nbdkit-python-plugin.so nbdkit-python3-plugin.so
|
mv nbdkit-python-plugin.so nbdkit-python3-plugin.so
|
||||||
popd
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
%make_install
|
%make_install
|
||||||
|
|
||||||
@ -330,12 +346,14 @@ make check || {
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
%if 0%{?rhel} >= 8
|
||||||
pushd python3
|
pushd python3
|
||||||
make check || {
|
make check || {
|
||||||
cat tests/test-suite.log
|
cat tests/test-suite.log
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
popd
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
@ -421,8 +439,10 @@ popd
|
|||||||
%{_libdir}/%{name}/plugins/nbdkit-python2-plugin.so
|
%{_libdir}/%{name}/plugins/nbdkit-python2-plugin.so
|
||||||
|
|
||||||
|
|
||||||
|
%if 0%{?rhel} >= 8
|
||||||
%files plugin-python3
|
%files plugin-python3
|
||||||
%{_libdir}/%{name}/plugins/nbdkit-python3-plugin.so
|
%{_libdir}/%{name}/plugins/nbdkit-python3-plugin.so
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%files plugin-ruby
|
%files plugin-ruby
|
||||||
@ -455,8 +475,10 @@ popd
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Fri Oct 20 2017 Richard W.M. Jones <rjones@redhat.com> - 1.1.16-1
|
* Fri Oct 20 2017 Richard W.M. Jones <rjones@redhat.com> - 1.1.16-2
|
||||||
- New upstream version 1.1.16.
|
- New upstream version 1.1.16.
|
||||||
|
- Disable python3 plugin on RHEL/EPEL <= 7.
|
||||||
|
- Only ship on x86_64 in RHEL/EPEL <= 7.
|
||||||
|
|
||||||
* Wed Sep 27 2017 Richard W.M. Jones <rjones@redhat.com> - 1.1.15-1
|
* Wed Sep 27 2017 Richard W.M. Jones <rjones@redhat.com> - 1.1.15-1
|
||||||
- New upstream version 1.1.15.
|
- New upstream version 1.1.15.
|
||||||
|
Loading…
Reference in New Issue
Block a user