forked from pool/openvswitch
Accepting request 648463 from network
OBS-URL: https://build.opensuse.org/request/show/648463 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/openvswitch?expand=0&rev=33
This commit is contained in:
commit
4268ac8100
@ -1,3 +1,18 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Nov 8 11:17:38 UTC 2018 - Markos Chandras <mchandras@suse.de>
|
||||||
|
|
||||||
|
- Improve python packaging (bsc#1115085)
|
||||||
|
* Rename python*-openvswitch subpackages to python*-ovs to follow
|
||||||
|
the openSUSE policy that packages should be named after the modules
|
||||||
|
they install.
|
||||||
|
* Build the JSON C bindings and as a result the 'noarch' BuildArch
|
||||||
|
needs to be removed.
|
||||||
|
* Drop the python*-openvswitch-test packages and merge them with the
|
||||||
|
test subpackage
|
||||||
|
* Build the python bindings using setuptools
|
||||||
|
* Include the egg-info package.
|
||||||
|
* Use libopenvswitch as dependency to python bindings
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Oct 22 09:38:00 UTC 2018 - Markos Chandras <mchandras@suse.de>
|
Mon Oct 22 09:38:00 UTC 2018 - Markos Chandras <mchandras@suse.de>
|
||||||
|
|
||||||
|
117
openvswitch.spec
117
openvswitch.spec
@ -78,6 +78,7 @@ Obsoletes: %{name}-dpdk-switch < 2.7.0
|
|||||||
Obsoletes: %{name}-switch < 2.7.0
|
Obsoletes: %{name}-switch < 2.7.0
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
BuildRequires: %{python_module devel}
|
BuildRequires: %{python_module devel}
|
||||||
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module six}
|
BuildRequires: %{python_module six}
|
||||||
BuildRequires: %{python_module xml}
|
BuildRequires: %{python_module xml}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
@ -93,6 +94,7 @@ BuildRequires: openssl-devel
|
|||||||
BuildRequires: python-devel
|
BuildRequires: python-devel
|
||||||
BuildRequires: python-six
|
BuildRequires: python-six
|
||||||
BuildRequires: python2-rpm-macros
|
BuildRequires: python2-rpm-macros
|
||||||
|
BuildRequires: python2-setuptools
|
||||||
BuildRequires: python3-rpm-macros
|
BuildRequires: python3-rpm-macros
|
||||||
BuildRequires: systemd-units
|
BuildRequires: systemd-units
|
||||||
Requires(post): systemd-units
|
Requires(post): systemd-units
|
||||||
@ -268,58 +270,32 @@ forwarding.
|
|||||||
|
|
||||||
Open vSwitch is a full-featured software-based Ethernet switch.
|
Open vSwitch is a full-featured software-based Ethernet switch.
|
||||||
|
|
||||||
%package -n python2-openvswitch
|
%package -n python2-ovs
|
||||||
Summary: Python2 bindings for Open vSwitch
|
Summary: Python2 bindings for Open vSwitch
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
Group: Productivity/Networking/System
|
Group: Productivity/Networking/System
|
||||||
Requires: openvswitch-common = %{version}
|
Requires: %{lname} = %{version}
|
||||||
Requires: python2
|
Requires: python2
|
||||||
Requires: python2-six
|
Requires: python2-six
|
||||||
Provides: python-openvswitch = %{version}
|
Provides: python-%{name} = %{version}
|
||||||
Obsoletes: python-openvswitch < 2.8.1
|
Provides: python2-%{name} = %{version}
|
||||||
BuildArch: noarch
|
Obsoletes: python-%{name} < 2.8.1
|
||||||
|
Obsoletes: python2-%{name} < 2.10.1
|
||||||
|
|
||||||
%description -n python2-openvswitch
|
%description -n python2-ovs
|
||||||
This package contains the Python2 bindings for Open vSwitch database.
|
This package contains the Python2 bindings for Open vSwitch database.
|
||||||
|
|
||||||
%package -n python2-openvswitch-test
|
%package -n python3-ovs
|
||||||
Summary: Python2 bindings for Open vSwitch
|
|
||||||
License: Apache-2.0
|
|
||||||
Group: Productivity/Networking/System
|
|
||||||
Requires: openvswitch-common = %{version}
|
|
||||||
Requires: python2
|
|
||||||
Requires: python2-Twisted
|
|
||||||
Requires: python2-openvswitch = %{version}
|
|
||||||
Provides: python-openvswitch-test = %{version}
|
|
||||||
Obsoletes: python-openvswitch-test < 2.8.1
|
|
||||||
BuildArch: noarch
|
|
||||||
|
|
||||||
%description -n python2-openvswitch-test
|
|
||||||
This package contains the Python bindings for Open vSwitch database.
|
|
||||||
|
|
||||||
%package -n python3-openvswitch
|
|
||||||
Summary: Python3 bindings for Open vSwitch
|
Summary: Python3 bindings for Open vSwitch
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
Group: Productivity/Networking/System
|
Group: Productivity/Networking/System
|
||||||
Requires: openvswitch-common = %{version}
|
Requires: %{lname} = %{version}
|
||||||
Requires: python3
|
Requires: python3
|
||||||
Requires: python3-six
|
Requires: python3-six
|
||||||
BuildArch: noarch
|
Provides: python3-%{name} = %{version}
|
||||||
|
Obsoletes: python3-%{name} < 2.10.1
|
||||||
|
|
||||||
%description -n python3-openvswitch
|
%description -n python3-ovs
|
||||||
This package contains the Python3 bindings for Open vSwitch database.
|
|
||||||
|
|
||||||
%package -n python3-openvswitch-test
|
|
||||||
Summary: Python3 bindings for Open vSwitch
|
|
||||||
License: Apache-2.0
|
|
||||||
Group: Productivity/Networking/System
|
|
||||||
Requires: openvswitch-common = %{version}
|
|
||||||
Requires: python3
|
|
||||||
Requires: python3-Twisted
|
|
||||||
Requires: python3-openvswitch = %{version}
|
|
||||||
BuildArch: noarch
|
|
||||||
|
|
||||||
%description -n python3-openvswitch-test
|
|
||||||
This package contains the Python3 bindings for Open vSwitch database.
|
This package contains the Python3 bindings for Open vSwitch database.
|
||||||
|
|
||||||
%package test
|
%package test
|
||||||
@ -327,7 +303,9 @@ Summary: Open vSwitch test package
|
|||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
Group: Productivity/Networking/System
|
Group: Productivity/Networking/System
|
||||||
Requires: %{name} = %{version}
|
Requires: %{name} = %{version}
|
||||||
Requires: python3-openvswitch-test = %{version}
|
Requires: python2
|
||||||
|
Requires: python2-Twisted
|
||||||
|
Requires: python2-ovs = %{version}
|
||||||
Provides: %{name}-dpdk-test = %{version}
|
Provides: %{name}-dpdk-test = %{version}
|
||||||
Obsoletes: %{name}-dpdk-test < 2.7.0
|
Obsoletes: %{name}-dpdk-test < 2.7.0
|
||||||
|
|
||||||
@ -383,9 +361,9 @@ pushd source
|
|||||||
< rhel/usr_lib_systemd_system_ovs-vswitchd.service.in \
|
< rhel/usr_lib_systemd_system_ovs-vswitchd.service.in \
|
||||||
> rhel/usr_lib_systemd_system_ovs-vswitchd.service
|
> rhel/usr_lib_systemd_system_ovs-vswitchd.service
|
||||||
|
|
||||||
%if 0%{?suse_version}
|
# This is only used for building the ovstest module
|
||||||
export PYTHON='%{_bindir}/python3'
|
export PYTHON='%{_bindir}/python2'
|
||||||
%endif
|
|
||||||
%configure \
|
%configure \
|
||||||
--disable-static \
|
--disable-static \
|
||||||
--enable-libcapng \
|
--enable-libcapng \
|
||||||
@ -485,27 +463,33 @@ find %{buildroot}%{_docdir}/%{name}/ -type f ! -name '*.rst' -delete
|
|||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# Python subpackages
|
# Tests
|
||||||
# SLES
|
|
||||||
%if 0%{?suse_version}
|
|
||||||
mkdir -p %{buildroot}%{python2_sitelib}
|
mkdir -p %{buildroot}%{python2_sitelib}
|
||||||
cp -a %{buildroot}%{_datadir}/openvswitch/python/* %{buildroot}%{python2_sitelib}
|
cp -a %{buildroot}%{_datadir}/openvswitch/python/ovstest \
|
||||||
# Build the byte compiled files
|
%{buildroot}%{python2_sitelib}
|
||||||
%py_compile %{buildroot}%{python2_sitelib}
|
|
||||||
%fdupes %{buildroot}%{python2_sitelib}
|
# Python subpackages
|
||||||
mkdir -p %{buildroot}%{python3_sitelib}
|
pushd source/python
|
||||||
cp -a %{buildroot}%{_datadir}/openvswitch/python/* %{buildroot}%{python3_sitelib}
|
|
||||||
# Build the byte compiled files
|
export LDFLAGS="${LDFLAGS} -L %{buildroot}%{_libdir}"
|
||||||
%py3_compile %{buildroot}%{python3_sitelib}
|
export CPPFLAGS="-I ../include"
|
||||||
%fdupes %{buildroot}%{python3_sitelib}
|
|
||||||
|
%if 0%{?suse_version}
|
||||||
|
# SLES
|
||||||
|
%{python_build}
|
||||||
|
%{python_install}
|
||||||
|
%fdupes %{buildroot}%{python2_sitearch}
|
||||||
|
%fdupes %{buildroot}%{python3_sitearch}
|
||||||
|
|
||||||
%else
|
%else
|
||||||
# RHEL
|
# RHEL
|
||||||
install -d -m 0755 %{buildroot}%{python2_sitelib}
|
%py2_build
|
||||||
cp -a %{buildroot}%{_datadir}/openvswitch/python/* \
|
%py2_install
|
||||||
%{buildroot}%{python2_sitelib}
|
|
||||||
# No python3 for RHEL. We are missing python3-* packages from EPEL
|
# No python3 for RHEL. We are missing python3-* packages from EPEL
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
popd
|
||||||
|
|
||||||
rm -rf %{buildroot}%{_datadir}/openvswitch/python
|
rm -rf %{buildroot}%{_datadir}/openvswitch/python
|
||||||
|
|
||||||
find %{buildroot} -type f -name "*.la" -delete -print
|
find %{buildroot} -type f -name "*.la" -delete -print
|
||||||
@ -880,9 +864,7 @@ export DISABLE_STOP_ON_REMOVAL=yes
|
|||||||
%files doc
|
%files doc
|
||||||
%exclude %{_docdir}/%{name}/AUTHORS.rst
|
%exclude %{_docdir}/%{name}/AUTHORS.rst
|
||||||
%exclude %{_docdir}/%{name}/CONTRIBUTING.rst
|
%exclude %{_docdir}/%{name}/CONTRIBUTING.rst
|
||||||
%exclude %{_docdir}/%{name}/LICENSE
|
|
||||||
%exclude %{_docdir}/%{name}/NEWS
|
%exclude %{_docdir}/%{name}/NEWS
|
||||||
%exclude %{_docdir}/%{name}/NOTICE
|
|
||||||
%exclude %{_docdir}/%{name}/README.rst
|
%exclude %{_docdir}/%{name}/README.rst
|
||||||
%{_docdir}/%{name}/
|
%{_docdir}/%{name}/
|
||||||
|
|
||||||
@ -905,18 +887,14 @@ export DISABLE_STOP_ON_REMOVAL=yes
|
|||||||
%{_datadir}/openvswitch/scripts/ovs-vtep
|
%{_datadir}/openvswitch/scripts/ovs-vtep
|
||||||
%{_datadir}/openvswitch/vtep.ovsschema
|
%{_datadir}/openvswitch/vtep.ovsschema
|
||||||
|
|
||||||
%files -n python2-openvswitch
|
%files -n python2-ovs
|
||||||
%{python2_sitelib}/ovs/
|
%{python2_sitearch}/ovs/
|
||||||
|
%{python2_sitearch}/ovs-*.egg-info
|
||||||
%files -n python2-openvswitch-test
|
|
||||||
%{python2_sitelib}/ovstest/
|
|
||||||
|
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
%files -n python3-openvswitch
|
%files -n python3-ovs
|
||||||
%{python3_sitelib}/ovs/
|
%{python3_sitearch}/ovs/
|
||||||
|
%{python3_sitearch}/ovs-*.egg-info
|
||||||
%files -n python3-openvswitch-test
|
|
||||||
%{python3_sitelib}/ovstest/
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files ovn-docker
|
%files ovn-docker
|
||||||
@ -985,6 +963,7 @@ export DISABLE_STOP_ON_REMOVAL=yes
|
|||||||
%{_mandir}/man8/ovs-l3ping.8%{?ext_man}
|
%{_mandir}/man8/ovs-l3ping.8%{?ext_man}
|
||||||
%{_mandir}/man8/ovs-tcpdump.8%{?ext_man}
|
%{_mandir}/man8/ovs-tcpdump.8%{?ext_man}
|
||||||
%{_mandir}/man8/ovs-testcontroller.8%{?ext_man}
|
%{_mandir}/man8/ovs-testcontroller.8%{?ext_man}
|
||||||
|
%{python2_sitelib}/ovstest/
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%{_libdir}/libofproto.so
|
%{_libdir}/libofproto.so
|
||||||
|
Loading…
Reference in New Issue
Block a user