Accepting request 403989 from home:markoschandras:network

- Multiple fixes for the openvswitch-dpdk package (bsc#985878)
  * Rename main package name to openvswitch-dpdk
  * Do not build the python and kmp packages since they do not
    depend on the DPDK capabilities
  * Remove the open_virtual_switch capability. The
    openvswitch-common will be used by reverse dependencies to
    require either of the OvS packages.
  * Provide virtual capabilities for all DPDK subpackages.
  * Fix the dependencies in the python package to require either
    of the OvS packages.
  * Suggest the kmp package only if it's actually provided.
  * Small cleanups.

OBS-URL: https://build.opensuse.org/request/show/403989
OBS-URL: https://build.opensuse.org/package/show/network/openvswitch?expand=0&rev=92
This commit is contained in:
Dirk Mueller 2016-06-22 09:27:41 +00:00 committed by Git OBS Bridge
parent 67f6e49df3
commit ab792e6395
5 changed files with 96 additions and 30 deletions

View File

@ -1,3 +1,19 @@
-------------------------------------------------------------------
Tue Jun 21 14:10:15 UTC 2016 - mchandras@suse.de
- Multiple fixes for the openvswitch-dpdk package (bsc#985878)
* Rename main package name to openvswitch-dpdk
* Do not build the python and kmp packages since they do not
depend on the DPDK capabilities
* Remove the open_virtual_switch capability. The
openvswitch-common will be used by reverse dependencies to
require either of the OvS packages.
* Provide virtual capabilities for all DPDK subpackages.
* Fix the dependencies in the python package to require either
of the OvS packages.
* Suggest the kmp package only if it's actually provided.
* Small cleanups.
-------------------------------------------------------------------
Fri May 27 13:49:15 UTC 2016 - mchandras@suse.de

View File

@ -1,5 +1,5 @@
#
# spec file for package openvswitch_dpdk
# spec file for package openvswitch-dpdk
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
@ -21,7 +21,7 @@
# Disable building the external kernel datapath by default
%bcond_with kmp
# DPDK build disabled by default. It's enabled in the
# openvswitch_dpdk.spec file (generated by pre_checkin.sh)
# openvswitch-dpdk.spec file (generated by pre_checkin.sh)
%bcond_without dpdk
# The testsuite is somewhat fragile for continuous testing in OBS
# but keep it here as an option
@ -29,7 +29,7 @@
# Do NOT edit this auto generated file! Edit openvswitch.spec instead
# and run 'pre_checkin.sh' before committing
Name: openvswitch_dpdk
Name: openvswitch-dpdk
Version: 2.5.0
Release: 0
Summary: An open source, production quality, multilayer virtual switch (DPDK)
@ -73,11 +73,8 @@ Requires: logrotate
Requires: openssl
Requires: python
Provides: openvswitch-common = %{version}
# Add new capability since openvswitch and openvswitch_dpdk
# provide virtual switch capabilities
Provides: open_virtual_switch
# We can't have openvswitch and openvswitch-dpdk in parallel
%if %{with dpdk}
# We can't have openvswitch and openvswitch_dpdk in parallel
Conflicts: openvswitch
%endif
Obsoletes: openvswitch-common < %{version}
@ -95,6 +92,7 @@ and protocols (e.g. NetFlow, sFlow, RSPAN, ERSPAN, CLI, LACP, 802.1ag). In addit
it is designed to support distribution across multiple physical servers similar to
VMwares vNetwork distributed vswitch or Ciscos Nexus 1000V.
%if ! %{with dpdk}
%if %{with kmp}
%package kmp
Summary: Open vSwitch kernel modules (DPDK)
@ -106,12 +104,14 @@ BuildRequires: %{kernel_module_package_buildreqs}
%description kmp
Kernel modules supporting the openvswitch datapath.
%endif
%endif
%package devel
Summary: Open vSwitch Devel Libraries (DPDK)
License: Apache-2.0
Group: Productivity/Networking/System
Requires: %{name} = %{version}
Provides: openvswitch-any-devel = %{version}
%description devel
Devel libraries and headers for Open vSwitch.
@ -127,8 +127,11 @@ Requires: python
# ovs-ctl / ovs-pki use /usr/bin/uuidgen:
Requires: util-linux
Requires(post): %fillup_prereq
Provides: openvswitch-any-switch = %{version}
Suggests: logrotate
Suggests: %{name}-kmp
%if %{with kmp}
Suggests: openvswitch-kmp
%endif
%{?systemd_requires}
%description switch
@ -144,6 +147,7 @@ Group: Productivity/Networking/System
Requires: %{name} = %{version}
Requires: %{name}-switch = %{version}
Requires: %{name}-vtep = %{version}
Provides: openvswitch-any-ovn = %{version}
%description ovn
OVN, the Open Virtual Network, is a system to support virtual network
@ -156,6 +160,7 @@ Summary: Open vSwitch public key infrastructure dependency package (DPDK)
License: Apache-2.0
Group: Productivity/Networking/System
Requires: %{name} = %{version}
Provides: openvswitch-any-pki = %{version}
%description pki
openvswitch-pki provides PKI (public key infrastructure) support for
@ -172,17 +177,19 @@ Requires: %{name} = %{version}
Requires: %{name}-switch = %{version}
# Since openvswitch/scripts/ovs-vtep requires various ovs python modules.
Requires: python-%{name} = %{version}
Provides: openvswitch-any-vtep = %{version}
%description vtep
A VTEP emulator that uses Open vSwitch for forwarding.
Open vSwitch is a full-featured software-based Ethernet switch.
%if ! %{with dpdk}
%package -n python-%{name}
Summary: Python bindings for Open vSwitch (DPDK)
License: Python-2.0
Group: Productivity/Networking/System
Requires: %{name} = %{version}
Requires: openvswitch-common = %{version}
Requires: python
%description -n python-%{name}
@ -192,13 +199,14 @@ This package contains the full Python bindings for Open vSwitch database.
Summary: Python bindings for Open vSwitch (DPDK)
License: Python-2.0
Group: Productivity/Networking/System
Requires: %{name} = %{version}
Requires: openvswitch-common = %{version}
Requires: python
Requires: python-%{name} = %{version}
Requires: python-twisted
%description -n python-%{name}-test
This package contains the full Python bindings for Open vSwitch database.
%endif
%package test
Summary: Open vSwitch test package (DPDK)
@ -209,6 +217,7 @@ Requires: python
Requires: python-%{name}-test = %{version}
Requires: python-argparse
Requires: python-twisted
Provides: openvswitch-any-test = %{version}
%description test
This package contains utilities that are useful to diagnose
@ -232,6 +241,7 @@ perl -i -pe 's{__(DATE|TIME)__}{""}g' include/openvswitch/util.h
# only call boot.sh for distros with autoconf >= 2.64
bash -x boot.sh
popd
%if ! %{with dpdk}
%if %{with kmp}
export EXTRA_CFLAGS='-DVERSION=\"%{version}\"'
for flavor in %{flavors_to_build}; do
@ -248,16 +258,14 @@ for flavor in %{flavors_to_build}; do
popd
done
%endif
%endif
pushd source
%if %{with dpdk}
dpdk_opt="--with-dpdk"
%endif
%configure \
--disable-static \
--enable-shared \
${dpdk_opt} \
%{?_with_dpdk} \
--with-logdir=%{_localstatedir}/log/openvswitch
make %{?_smp_mflags}
popd
@ -278,6 +286,7 @@ popd
%endif
%install
%if ! %{with dpdk}
%if %{with kmp}
export NO_BRP_STALE_LINK_ERROR=yes
export INSTALL_MOD_PATH=%{buildroot}
@ -289,6 +298,7 @@ for flavor in %{flavors_to_build}; do
popd
done
%endif
%endif
pushd source
@ -325,7 +335,12 @@ rmdir %{buildroot}%{_datadir}/openvswitch/python
rm -f %buildroot/%_libdir/*.la
# Remove unpackaged files for the dpdk case
%if %{with dpdk}
rm -rf %{buildroot}%{py_sitedir}
%else
%fdupes %{buildroot}%{py_sitedir}
%endif
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
@ -422,6 +437,7 @@ rm -f %buildroot/%_libdir/*.la
%{_datadir}/openvswitch/vtep.ovsschema
%{_libdir}/libvtep.so.*
%if ! %{with dpdk}
%files -n python-%{name}
%defattr(-,root,root)
%{py_sitedir}/ovs/
@ -429,6 +445,7 @@ rm -f %buildroot/%_libdir/*.la
%files -n python-%{name}-test
%defattr(-,root,root)
%{py_sitedir}/ovstest/
%endif
%files switch
%defattr(-,root,root)

View File

@ -1,3 +1,19 @@
-------------------------------------------------------------------
Tue Jun 21 14:10:15 UTC 2016 - mchandras@suse.de
- Multiple fixes for the openvswitch-dpdk package (bsc#985878)
* Rename main package name to openvswitch-dpdk
* Do not build the python and kmp packages since they do not
depend on the DPDK capabilities
* Remove the open_virtual_switch capability. The
openvswitch-common will be used by reverse dependencies to
require either of the OvS packages.
* Provide virtual capabilities for all DPDK subpackages.
* Fix the dependencies in the python package to require either
of the OvS packages.
* Suggest the kmp package only if it's actually provided.
* Small cleanups.
-------------------------------------------------------------------
Fri May 27 13:49:15 UTC 2016 - mchandras@suse.de

View File

@ -21,7 +21,7 @@
# Disable building the external kernel datapath by default
%bcond_with kmp
# DPDK build disabled by default. It's enabled in the
# openvswitch_dpdk.spec file (generated by pre_checkin.sh)
# openvswitch-dpdk.spec file (generated by pre_checkin.sh)
%bcond_with dpdk
# The testsuite is somewhat fragile for continuous testing in OBS
# but keep it here as an option
@ -71,11 +71,8 @@ Requires: logrotate
Requires: openssl
Requires: python
Provides: openvswitch-common = %{version}
# Add new capability since openvswitch and openvswitch_dpdk
# provide virtual switch capabilities
Provides: open_virtual_switch
# We can't have openvswitch and openvswitch-dpdk in parallel
%if %{with dpdk}
# We can't have openvswitch and openvswitch_dpdk in parallel
Conflicts: openvswitch
%endif
Obsoletes: openvswitch-common < %{version}
@ -93,6 +90,7 @@ and protocols (e.g. NetFlow, sFlow, RSPAN, ERSPAN, CLI, LACP, 802.1ag). In addit
it is designed to support distribution across multiple physical servers similar to
VMwares vNetwork distributed vswitch or Ciscos Nexus 1000V.
%if ! %{with dpdk}
%if %{with kmp}
%package kmp
Summary: Open vSwitch kernel modules
@ -104,12 +102,14 @@ BuildRequires: %{kernel_module_package_buildreqs}
%description kmp
Kernel modules supporting the openvswitch datapath.
%endif
%endif
%package devel
Summary: Open vSwitch Devel Libraries
License: Apache-2.0
Group: Productivity/Networking/System
Requires: %{name} = %{version}
Provides: openvswitch-any-devel = %{version}
%description devel
Devel libraries and headers for Open vSwitch.
@ -125,8 +125,11 @@ Requires: python
# ovs-ctl / ovs-pki use /usr/bin/uuidgen:
Requires: util-linux
Requires(post): %fillup_prereq
Provides: openvswitch-any-switch = %{version}
Suggests: logrotate
Suggests: %{name}-kmp
%if %{with kmp}
Suggests: openvswitch-kmp
%endif
%{?systemd_requires}
%description switch
@ -142,6 +145,7 @@ Group: Productivity/Networking/System
Requires: %{name} = %{version}
Requires: %{name}-switch = %{version}
Requires: %{name}-vtep = %{version}
Provides: openvswitch-any-ovn = %{version}
%description ovn
OVN, the Open Virtual Network, is a system to support virtual network
@ -154,6 +158,7 @@ Summary: Open vSwitch public key infrastructure dependency package
License: Apache-2.0
Group: Productivity/Networking/System
Requires: %{name} = %{version}
Provides: openvswitch-any-pki = %{version}
%description pki
openvswitch-pki provides PKI (public key infrastructure) support for
@ -170,17 +175,19 @@ Requires: %{name} = %{version}
Requires: %{name}-switch = %{version}
# Since openvswitch/scripts/ovs-vtep requires various ovs python modules.
Requires: python-%{name} = %{version}
Provides: openvswitch-any-vtep = %{version}
%description vtep
A VTEP emulator that uses Open vSwitch for forwarding.
Open vSwitch is a full-featured software-based Ethernet switch.
%if ! %{with dpdk}
%package -n python-%{name}
Summary: Python bindings for Open vSwitch
License: Python-2.0
Group: Productivity/Networking/System
Requires: %{name} = %{version}
Requires: openvswitch-common = %{version}
Requires: python
%description -n python-%{name}
@ -190,13 +197,14 @@ This package contains the full Python bindings for Open vSwitch database.
Summary: Python bindings for Open vSwitch
License: Python-2.0
Group: Productivity/Networking/System
Requires: %{name} = %{version}
Requires: openvswitch-common = %{version}
Requires: python
Requires: python-%{name} = %{version}
Requires: python-twisted
%description -n python-%{name}-test
This package contains the full Python bindings for Open vSwitch database.
%endif
%package test
Summary: Open vSwitch test package
@ -207,6 +215,7 @@ Requires: python
Requires: python-%{name}-test = %{version}
Requires: python-argparse
Requires: python-twisted
Provides: openvswitch-any-test = %{version}
%description test
This package contains utilities that are useful to diagnose
@ -230,6 +239,7 @@ perl -i -pe 's{__(DATE|TIME)__}{""}g' include/openvswitch/util.h
# only call boot.sh for distros with autoconf >= 2.64
bash -x boot.sh
popd
%if ! %{with dpdk}
%if %{with kmp}
export EXTRA_CFLAGS='-DVERSION=\"%{version}\"'
for flavor in %{flavors_to_build}; do
@ -246,16 +256,14 @@ for flavor in %{flavors_to_build}; do
popd
done
%endif
%endif
pushd source
%if %{with dpdk}
dpdk_opt="--with-dpdk"
%endif
%configure \
--disable-static \
--enable-shared \
${dpdk_opt} \
%{?_with_dpdk} \
--with-logdir=%{_localstatedir}/log/openvswitch
make %{?_smp_mflags}
popd
@ -276,6 +284,7 @@ popd
%endif
%install
%if ! %{with dpdk}
%if %{with kmp}
export NO_BRP_STALE_LINK_ERROR=yes
export INSTALL_MOD_PATH=%{buildroot}
@ -287,6 +296,7 @@ for flavor in %{flavors_to_build}; do
popd
done
%endif
%endif
pushd source
@ -323,7 +333,12 @@ rmdir %{buildroot}%{_datadir}/openvswitch/python
rm -f %buildroot/%_libdir/*.la
# Remove unpackaged files for the dpdk case
%if %{with dpdk}
rm -rf %{buildroot}%{py_sitedir}
%else
%fdupes %{buildroot}%{py_sitedir}
%endif
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
@ -420,6 +435,7 @@ rm -f %buildroot/%_libdir/*.la
%{_datadir}/openvswitch/vtep.ovsschema
%{_libdir}/libvtep.so.*
%if ! %{with dpdk}
%files -n python-%{name}
%defattr(-,root,root)
%{py_sitedir}/ovs/
@ -427,6 +443,7 @@ rm -f %buildroot/%_libdir/*.la
%files -n python-%{name}-test
%defattr(-,root,root)
%{py_sitedir}/ovstest/
%endif
%files switch
%defattr(-,root,root)

View File

@ -2,7 +2,7 @@
# Start fresh
for f in spec changes; do
cp openvswitch.$f openvswitch_dpdk.$f || exit 1
cp openvswitch.$f openvswitch-dpdk.$f || exit 1
done
#
@ -12,8 +12,8 @@ done
sed -i -e "/^Name:.*openvswitch$/i \
# Do NOT edit this auto generated file! Edit openvswitch.spec instead\n\
# and run 'pre_checkin.sh' before committing" \
-e "/^#\s*spec file/s/openvswitch$/&_dpdk/" \
-e "/^Name:/s/openvswitch/&_dpdk/g" \
-e "/^#\s*spec file/s/openvswitch$/&-dpdk/" \
-e "/^Name:/s/openvswitch/&-dpdk/g" \
-e "/^Summary:/s/^.*$/&\ \(DPDK\)/g" \
-e "/^%bcond_with\s*dpdk/s/with/&out/" \
openvswitch_dpdk.spec || exit 1
openvswitch-dpdk.spec || exit 1