SHA256
1
0
forked from pool/openvswitch

Accepting request 560283 from home:markoschandras:branches:network

- Python fixes and improvements
  * Build Python3 subpackages for Open vSwitch python bindings
  * Switch build architecture to 'noarch' for python bindings.
  * Fix license for python subpackages
  * Build and ship python bytecode files.
- Do not mark files in /usr/share/* as configuration files
- Replace version macro with actual version number of Obsoletes tags.
  The DPDK packages have been merged with the regular OvS ones in the
  2.7.0 release so make it more explicit which ones we are obsoleting.
- spec-cleaner fixes

OBS-URL: https://build.opensuse.org/request/show/560283
OBS-URL: https://build.opensuse.org/package/show/network/openvswitch?expand=0&rev=133
This commit is contained in:
Dirk Mueller 2018-01-09 13:37:23 +00:00 committed by Git OBS Bridge
parent 8283839e08
commit f850461846
2 changed files with 105 additions and 47 deletions

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Wed Dec 27 17:05:35 UTC 2017 - mchandras@suse.de
- Python fixes and improvements
* Build Python3 subpackages for Open vSwitch python bindings
* Switch build architecture to 'noarch' for python bindings.
* Fix license for python subpackages
* Build and ship python bytecode files.
- Do not mark files in /usr/share/* as configuration files
- Replace version macro with actual version number of Obsoletes tags.
The DPDK packages have been merged with the regular OvS ones in the
2.7.0 release so make it more explicit which ones we are obsoleting.
- spec-cleaner fixes
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Dec 6 14:00:55 UTC 2017 - mchandras@suse.de Wed Dec 6 14:00:55 UTC 2017 - mchandras@suse.de

View File

@ -17,11 +17,11 @@
# needssslcertforbuild # needssslcertforbuild
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
#Compat macro for new _fillupdir macro introduced in Nov 2017 #Compat macro for new _fillupdir macro introduced in Nov 2017
%if ! %{defined _fillupdir} %if ! %{defined _fillupdir}
%define _fillupdir /var/adm/fillup-templates %define _fillupdir %{_localstatedir}/adm/fillup-templates
%endif %endif
%define lname libopenvswitch-2_8-0 %define lname libopenvswitch-2_8-0
%ifarch aarch64 x86_64 %{ix86} %ifarch aarch64 x86_64 %{ix86}
# DPDK enabled by default # DPDK enabled by default
@ -49,6 +49,10 @@ Source0: http://openvswitch.org/releases/openvswitch-%{version}.tar.gz
Source1: preamble Source1: preamble
Source89: Module.supported.updates Source89: Module.supported.updates
Patch99: 0001-utilities-Add-script-to-support-DPDK-option-migratio.patch Patch99: 0001-utilities-Add-script-to-support-DPDK-option-migratio.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module six}
BuildRequires: %{python_module xml}
BuildRequires: %{pythons}
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
BuildRequires: fdupes BuildRequires: fdupes
@ -58,31 +62,27 @@ BuildRequires: libopenssl-devel
BuildRequires: libtool BuildRequires: libtool
BuildRequires: make BuildRequires: make
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: python-devel BuildRequires: python-rpm-macros
BuildRequires: python-six
BuildRequires: python-xml
BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(openssl)
Requires: logrotate Requires: logrotate
Requires: modutils Requires: modutils
Requires: python
# ovs-ctl / ovs-pki use /usr/bin/uuidgen: # ovs-ctl / ovs-pki use /usr/bin/uuidgen:
Requires: util-linux Requires: util-linux
Requires(post): %fillup_prereq Requires(post): %fillup_prereq
Suggests: logrotate Suggests: logrotate
Provides: openvswitch-common = %{version} Provides: openvswitch-common = %{version}
Obsoletes: openvswitch-common < %{version} Obsoletes: openvswitch-common < 2.7.0
Provides: openvswitch-controller = %{version} Provides: openvswitch-controller = %{version}
Obsoletes: openvswitch-controller < %{version} Obsoletes: openvswitch-controller < 2.7.0
# openvswitch-switch has been merged to the main package # openvswitch-switch has been merged to the main package
# so we need to provide a migration path # so we need to provide a migration path
Provides: %{name}-dpdk = %{version} Provides: %{name}-dpdk = %{version}
Provides: %{name}-dpdk-switch = %{version} Provides: %{name}-dpdk-switch = %{version}
Provides: %{name}-switch = %{version} Provides: %{name}-switch = %{version}
Obsoletes: %{name}-dpdk < %{version} Obsoletes: %{name}-dpdk < 2.7.0
Obsoletes: %{name}-dpdk-switch < %{version} Obsoletes: %{name}-dpdk-switch < 2.7.0
Obsoletes: %{name}-switch < %{version} Obsoletes: %{name}-switch < 2.7.0
%{?systemd_requires} %{?systemd_requires}
%py_requires
%if %{with dpdk} %if %{with dpdk}
Requires(post): shadow Requires(post): shadow
%endif %endif
@ -145,7 +145,7 @@ License: Apache-2.0
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Requires: %{lname} = %{version} Requires: %{lname} = %{version}
Provides: %{name}-dpdk-devel = %{version} Provides: %{name}-dpdk-devel = %{version}
Obsoletes: %{name}-dpdk-devel < %{version} Obsoletes: %{name}-dpdk-devel < 2.7.0
%description devel %description devel
Devel libraries and headers for Open vSwitch. Devel libraries and headers for Open vSwitch.
@ -200,8 +200,8 @@ Requires: %{name} = %{version}
# openvswitch-ovn has been split into openvswitch-ovn-{central,common,docker,host,vtep} # openvswitch-ovn has been split into openvswitch-ovn-{central,common,docker,host,vtep}
Provides: %{name}-dpdk-ovn = %{version} Provides: %{name}-dpdk-ovn = %{version}
Provides: %{name}-ovn = %{version} Provides: %{name}-ovn = %{version}
Obsoletes: %{name}-dpdk-ovn < %{version} Obsoletes: %{name}-dpdk-ovn < 2.7.0
Obsoletes: %{name}-ovn < %{version} Obsoletes: %{name}-ovn < 2.7.0
%description ovn-common %description ovn-common
Utilities that are used to diagnose and manage the OVN components. Utilities that are used to diagnose and manage the OVN components.
@ -226,7 +226,7 @@ License: Apache-2.0
Group: Productivity/Networking/System Group: Productivity/Networking/System
Requires: %{name} = %{version} Requires: %{name} = %{version}
Provides: %{name}-dpdk-pki = %{version} Provides: %{name}-dpdk-pki = %{version}
Obsoletes: %{name}-dpdk-pki < %{version} Obsoletes: %{name}-dpdk-pki < 2.7.0
%description pki %description pki
openvswitch-pki provides PKI (public key infrastructure) support for openvswitch-pki provides PKI (public key infrastructure) support for
@ -244,7 +244,7 @@ Requires: %{name}-switch = %{version}
# Since openvswitch/scripts/ovs-vtep requires various ovs python modules. # Since openvswitch/scripts/ovs-vtep requires various ovs python modules.
Requires: python-openvswitch = %{version} Requires: python-openvswitch = %{version}
Provides: %{name}-dpdk-vtep = %{version} Provides: %{name}-dpdk-vtep = %{version}
Obsoletes: %{name}-dpdk-vtep < %{version} Obsoletes: %{name}-dpdk-vtep < 2.7.0
%description vtep %description vtep
A VTEP (VXLAN Tunnel EndPoint) emulator that uses Open vSwitch for A VTEP (VXLAN Tunnel EndPoint) emulator that uses Open vSwitch for
@ -252,40 +252,68 @@ forwarding.
Open vSwitch is a full-featured software-based Ethernet switch. Open vSwitch is a full-featured software-based Ethernet switch.
%package -n python-openvswitch %package -n python2-openvswitch
Summary: Python bindings for Open vSwitch Summary: Python2 bindings for Open vSwitch
License: Python-2.0 License: Apache-2.0
Group: Productivity/Networking/System Group: Productivity/Networking/System
Requires: openvswitch-common = %{version} Requires: openvswitch-common = %{version}
Requires: python Requires: python3
Requires: python-six Requires: python3-six
Provides: python-openvswitch = %{version}
Obsoletes: python-openvswitch < 2.8.1
BuildArch: noarch
%description -n python-openvswitch %description -n python2-openvswitch
This package contains the Python bindings for Open vSwitch database. This package contains the Python2 bindings for Open vSwitch database.
%package -n python-openvswitch-test %package -n python2-openvswitch-test
Summary: Python bindings for Open vSwitch Summary: Python2 bindings for Open vSwitch
License: Python-2.0 License: Apache-2.0
Group: Productivity/Networking/System Group: Productivity/Networking/System
Requires: openvswitch-common = %{version} Requires: openvswitch-common = %{version}
Requires: python Requires: python2
Requires: python-openvswitch = %{version} Requires: python2-openvswitch = %{version}
Requires: python-twisted Requires: python2-twisted
Provides: python-openvswitch-test = %{version}
Obsoletes: python-openvswitch-test < 2.8.1
BuildArch: noarch
%description -n python-openvswitch-test %description -n python2-openvswitch-test
This package contains the Python bindings for Open vSwitch database. This package contains the Python bindings for Open vSwitch database.
%package -n python3-openvswitch
Summary: Python3 bindings for Open vSwitch
License: Apache-2.0
Group: Productivity/Networking/System
Requires: openvswitch-common = %{version}
Requires: python3
Requires: python3-six
BuildArch: noarch
%description -n python3-openvswitch
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-openvswitch = %{version}
Requires: python3-twisted
BuildArch: noarch
%description -n python3-openvswitch-test
This package contains the Python3 bindings for Open vSwitch database.
%package test %package test
Summary: Open vSwitch test package 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: python Requires: python3-openvswitch-test = %{version}
Requires: python-argparse
Requires: python-openvswitch-test = %{version}
Requires: python-twisted
Provides: %{name}-dpdk-test = %{version} Provides: %{name}-dpdk-test = %{version}
Obsoletes: %{name}-dpdk-test < %{version} Obsoletes: %{name}-dpdk-test < 2.7.0
%description test %description test
Open vSwitch is a software-based Ethernet switch. Open vSwitch is a software-based Ethernet switch.
@ -424,14 +452,24 @@ install -m 755 utilities/ovs-dpdk-migrate-2.6.sh %{buildroot}/%{_datadir}/openvs
popd popd
mkdir -p %{buildroot}%{py_sitedir} # python2
mv %{buildroot}%{_datadir}/openvswitch/python/* %{buildroot}%{py_sitedir} mkdir -p %{buildroot}%{python2_sitelib}
rmdir %{buildroot}%{_datadir}/openvswitch/python cp -a %{buildroot}%{_datadir}/openvswitch/python/* %{buildroot}%{python2_sitelib}
# Build the byte compiled files
%py_compile %{buildroot}%{python2_sitelib}
%fdupes %{buildroot}%{python2_sitelib}
# python3
mkdir -p %{buildroot}%{python3_sitelib}
cp -a %{buildroot}%{_datadir}/openvswitch/python/* %{buildroot}%{python3_sitelib}
# Build the byte compiled files
%py3_compile %{buildroot}%{python3_sitelib}
%fdupes %{buildroot}%{python3_sitelib}
rm -rf %{buildroot}%{_datadir}/openvswitch/python
find %{buildroot} -type f -name "*.la" -delete -print find %{buildroot} -type f -name "*.la" -delete -print
%fdupes %{buildroot}%{py_sitedir}
%post %post
/sbin/ldconfig /sbin/ldconfig
%{fillup_only -n openvswitch} %{fillup_only -n openvswitch}
@ -638,11 +676,17 @@ export DISABLE_RESTART_ON_UPDATE=yes
%{_datadir}/openvswitch/scripts/ovs-vtep %{_datadir}/openvswitch/scripts/ovs-vtep
%{_datadir}/openvswitch/vtep.ovsschema %{_datadir}/openvswitch/vtep.ovsschema
%files -n python-openvswitch %files -n python2-openvswitch
%{py_sitedir}/ovs/ %{python2_sitelib}/ovs/
%files -n python-openvswitch-test %files -n python2-openvswitch-test
%{py_sitedir}/ovstest/ %{python2_sitelib}/ovstest/
%files -n python3-openvswitch
%{python3_sitelib}/ovs/
%files -n python3-openvswitch-test
%{python3_sitelib}/ovstest/
%files ovn-docker %files ovn-docker
%{_bindir}/ovn-docker-overlay-driver %{_bindir}/ovn-docker-overlay-driver
@ -672,8 +716,8 @@ export DISABLE_RESTART_ON_UPDATE=yes
%dir %{_libexecdir}/firewalld/services %dir %{_libexecdir}/firewalld/services
%{_bindir}/ovn-northd %{_bindir}/ovn-northd
%{_mandir}/man8/ovn-northd.8%{ext_man} %{_mandir}/man8/ovn-northd.8%{ext_man}
%config %{_datadir}/openvswitch/ovn-nb.ovsschema %{_datadir}/openvswitch/ovn-nb.ovsschema
%config %{_datadir}/openvswitch/ovn-sb.ovsschema %{_datadir}/openvswitch/ovn-sb.ovsschema
%{_unitdir}/ovn-northd.service %{_unitdir}/ovn-northd.service
%{_sbindir}/rcovn-northd %{_sbindir}/rcovn-northd
%{_prefix}/lib/firewalld/services/ovn-central-firewall-service.xml %{_prefix}/lib/firewalld/services/ovn-central-firewall-service.xml