Hello community,

here is the log from the commit of package openvswitch for openSUSE:Factory 
checked in at 2016-07-12 23:51:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/openvswitch (Old)
 and      /work/SRC/openSUSE:Factory/.openvswitch.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "openvswitch"

Changes:
--------
New Changes file:

--- /dev/null   2016-07-07 10:01:34.856033756 +0200
+++ /work/SRC/openSUSE:Factory/.openvswitch.new/openvswitch-dpdk.changes        
2016-07-12 23:51:24.000000000 +0200
@@ -0,0 +1,887 @@
+-------------------------------------------------------------------
+Mon Jul  4 12:08:06 UTC 2016 - mchand...@suse.de
+
+- Allow the OvS daemon to run as non-root (bsc#987545)
+- Add missing 'Conflicts' statements to all the subpackages as
+  required by the Factory review tools.
+
+-------------------------------------------------------------------
+Wed Jun 29 15:17:07 UTC 2016 - mchand...@suse.de
+
+- Remove the ?_with_dpdk macro usage since this is not being set
+  without explicitly passing --with/--without during an OBS build.
+  This reverts back to using the %{with dpdk} style which is set
+  automatically based on %bcond_with* macros.
+
+-------------------------------------------------------------------
+Tue Jun 28 13:21:12 UTC 2016 - mchand...@suse.de
+
+- Fix subpackage dependencies to not require the non-existent python
+  DPDK subpackages (bsc#986835). We do not provide DPDK versions of
+  the python bindings so nothing should depend on these subpackages.
+
+-------------------------------------------------------------------
+Wed Jun 22 15:07:01 UTC 2016 - jeng...@inai.de
+
+- Update rpm groups, acronym forms.
+
+-------------------------------------------------------------------
+Tue Jun 21 14:10:15 UTC 2016 - mchand...@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 - mchand...@suse.de
+
+- Add %check directive to run the openvswitch testsuite on demand.
+  The openvswitch contains hundreds of tests covering simple and
+  complex openvswitch configuration so it's beneficial to run them
+  during package builds. However, running the testsuite is not enabled
+  by default. Also add the following upstream patch:
+  * 0001-Remove-broken-pipe-warning-logs-from-ovsdb-server.lo.patch
+
+-------------------------------------------------------------------
+Thu May 26 15:40:04 UTC 2016 - mchand...@suse.de
+
+- Build a DPDK-enabled Open vSwitch (fate#319170)
+  * Apply the following changes to the openvswitch.spec file
+    - Add support for building with DPDK capabilities
+    - Add conflicts between the two packages.
+    - Add new 'open_virtual_switch-*' capabilities for openvswitch,
+      openvswitch-switch, openvswitch-test packages which can be used
+      by reverse dependencies to select between the two openvswitch
+      implementations.
+  * Add pre_checkin.sh to generate the openvswitch_dpdk.spec file
+    based on the openvswitch.spec one.
+  * Add upstream openvswitch-2.5.0-detect-dpdk-installation.patch
+    patch to detect and link against a DPDK installation.
+
+-------------------------------------------------------------------
+Mon May 23 18:33:13 UTC 2016 - jeng...@inai.de
+
+- Keep %prep small for speedier `quilt setup`. Kill __DATE__ from
+  source. Drop all .la files that are in %_libdir.
+
+-------------------------------------------------------------------
+Fri May 20 09:54:16 UTC 2016 - mchand...@suse.de
+
+- Add missing %dir directive for /var/log/openvswitch
+
+-------------------------------------------------------------------
+Thu May 19 10:13:41 UTC 2016 - dmuel...@suse.com
+
+- remove aarch64 conditional, no longer needed
+
+-------------------------------------------------------------------
+Thu May  5 09:00:26 UTC 2016 - mchand...@suse.de
+
+- Multiple spec file and package fixes.
+  * Drop obsolete log-check-module-loop.patch patch.
+  * Drop conditional code for older openSUSE releases. This also removes
+    all of the sysvinit files which were pulled in when the package was
+    originally developed.
+  * Drop support for building the GUI. The GUI code has been removed in
+    7868fbc6c97c2 ("ovsdbmonitor: Remove.") upstream commit and it does
+    not exist since v2.2.0 so drop the code in the spec file.
+  * Use the upstream systemd service files for the OVN components instead
+    of maintaining our own downstream.
+  * Drop the unofficial ipsec support. It hasn't been enabled in years.
+  * Drop support for building the upstream kernel module since it's being
+    shipped with the kernel package in latest releases. Restore the
+    %bcond_with kmp to make it easier to build the external kernel module
+    if needed.
+  * Fix some suse-missing-rclink rpmlint warnings for the ovn subpackage
+  * Base our service unit to the upstream one.
+  * Stop silently enabling the GRE protocol in iptables by default.
+  * Install the upstream sysconfig file to pass more information to the
+    openvswitch service unit.
+  * Use make install instead of %makeinstall
+  * Drop brcompat leftovers.
+  * spec-cleaner fixes
+
+-------------------------------------------------------------------
+Fri Apr  1 10:39:26 UTC 2016 - dmuel...@suse.com
+
+- address dimstars concerns
+
+-------------------------------------------------------------------
+Tue Mar 22 18:06:40 UTC 2016 - mchand...@suse.de
+
+- Prevent systemd from autogenerating a service file for
+  openvswitch-switch which conflicts with the opevswitch
+  one. (bsc#966762)
+
+-------------------------------------------------------------------
+Fri Mar 18 10:20:02 UTC 2016 - km...@suse.com
+
+- Add missing %defattr to ovn files section.
+
+-------------------------------------------------------------------
+Tue Mar  8 13:16:03 UTC 2016 - km...@suse.com
+
+- Add additional install requirements for python-openvswitch-test
+  package.
+
+-------------------------------------------------------------------
+Fri Mar  4 14:38:16 UTC 2016 - km...@suse.com
+
+- Add support for building both 2.4.0 and 2.5.0 from the same spec
+  file. Needed to fix SLE11 builds as OVS-2.5.0 no longer supports
+  python < 2.7. SLE11 SP3 and SP4 use python 2.6.
+- Added: openvswitch-2.4.0.tar.gz
+
+-------------------------------------------------------------------
+Thu Mar  3 13:47:04 UTC 2016 - km...@suse.com
+
+- New upstream version 2.5.0 (LTS)
+  - Dropped support for Python older than version 2.7.  As a consequence,
+    using Open vSwitch 2.5 or later on XenServer 6.5 or earlier (which
+    have Python 2.4) requires first installing Python 2.7.
+  - OpenFlow:
+    * Group chaining (where one OpenFlow group triggers another) is
+      now supported.
+    * OpenFlow 1.4+ "importance" is now considered for flow eviction.
+    * OpenFlow 1.4+ OFPTC_EVICTION is now implemented.
+    * OpenFlow 1.4+ OFPTC_VACANCY_EVENTS is now implemented.
+    * OpenFlow 1.4+ OFPMP_TABLE_DESC is now implemented.
+    * Allow modifying the ICMPv4/ICMPv6 type and code fields.
+    * OpenFlow 1.4+ OFPT_SET_ASYNC_CONFIG and OFPT_GET_ASYNC_CONFIG are
+      now implemented.
+  - ovs-ofctl:
+    * New "out_group" keyword for OpenFlow 1.1+ matching on output group.
+  - Tunnels:
+    * Geneve tunnels can now match and set options and the OAM bit.
+    * The nonstandard GRE64 tunnel extension has been dropped.
+  - Support Multicast Listener Discovery (MLDv1 and MLDv2).
+  - Add 'symmetric_l3l4' and 'symmetric_l3l4+udp' hash functions.
+  - sFlow agent now reports tunnel and MPLS structures.
+  - New 'check-system-userspace', 'check-kmod' and 'check-kernel' Makefile
+    targets to run a new system testsuite.  These tests can be run inside
+    a Vagrant box.  See INSTALL.md for details
+  - Mark --syslog-target argument as deprecated.  It will be removed in
+    the next OVS release.
+  - Added --user option to all daemons
+  - Add support for connection tracking through the new "ct" action
+    and "ct_state"/"ct_zone"/"ct_mark"/"ct_label" match fields.  Only
+    available on Linux kernels with the connection tracking module loaded.
+  - Add experimental version of OVN.  OVN, the Open Virtual Network, is a
+    system to support virtual network abstraction.  OVN complements the
+    existing capabilities of OVS to add native support for virtual network
+    abstractions, such as virtual L2 and L3 overlays and security groups.
+  - RHEL packaging:
+    * DPDK ports may now be created via network scripts (see README.RHEL).
+  - DPDK:
+    * Requires DPDK 2.2
+    * Added multiqueue support to vhost-user
+    * Note: QEMU 2.5+ required for multiqueue support
+  - SELinux:
+    * Introduced SELinux policy package.
+
+- New package: openvswitch-ovn
+- Removed: openvswitch-2.4.0.tar.gg
+- Added: openvswitch-2.5.0.tar.gg
+- Added: openvswitch-testcontroller.init
+- Added: ovn-controller-vtep.service
+- Added: ovn-controller.service
+- Added: ovn-northd.service
++++ 690 more lines (skipped)
++++ between /dev/null
++++ and /work/SRC/openSUSE:Factory/.openvswitch.new/openvswitch-dpdk.changes
--- /work/SRC/openSUSE:Factory/openvswitch/openvswitch.changes  2016-05-25 
21:28:28.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.openvswitch.new/openvswitch.changes     
2016-07-12 23:51:24.000000000 +0200
@@ -1,0 +2,69 @@
+Mon Jul  4 12:08:06 UTC 2016 - mchand...@suse.de
+
+- Allow the OvS daemon to run as non-root (bsc#987545)
+- Add missing 'Conflicts' statements to all the subpackages as
+  required by the Factory review tools.
+
+-------------------------------------------------------------------
+Wed Jun 29 15:17:07 UTC 2016 - mchand...@suse.de
+
+- Remove the ?_with_dpdk macro usage since this is not being set
+  without explicitly passing --with/--without during an OBS build.
+  This reverts back to using the %{with dpdk} style which is set
+  automatically based on %bcond_with* macros.
+
+-------------------------------------------------------------------
+Tue Jun 28 13:21:12 UTC 2016 - mchand...@suse.de
+
+- Fix subpackage dependencies to not require the non-existent python
+  DPDK subpackages (bsc#986835). We do not provide DPDK versions of
+  the python bindings so nothing should depend on these subpackages.
+
+-------------------------------------------------------------------
+Wed Jun 22 15:07:01 UTC 2016 - jeng...@inai.de
+
+- Update rpm groups, acronym forms.
+
+-------------------------------------------------------------------
+Tue Jun 21 14:10:15 UTC 2016 - mchand...@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 - mchand...@suse.de
+
+- Add %check directive to run the openvswitch testsuite on demand.
+  The openvswitch contains hundreds of tests covering simple and
+  complex openvswitch configuration so it's beneficial to run them
+  during package builds. However, running the testsuite is not enabled
+  by default. Also add the following upstream patch:
+  * 0001-Remove-broken-pipe-warning-logs-from-ovsdb-server.lo.patch
+
+-------------------------------------------------------------------
+Thu May 26 15:40:04 UTC 2016 - mchand...@suse.de
+
+- Build a DPDK-enabled Open vSwitch (fate#319170)
+  * Apply the following changes to the openvswitch.spec file
+    - Add support for building with DPDK capabilities
+    - Add conflicts between the two packages.
+    - Add new 'open_virtual_switch-*' capabilities for openvswitch,
+      openvswitch-switch, openvswitch-test packages which can be used
+      by reverse dependencies to select between the two openvswitch
+      implementations.
+  * Add pre_checkin.sh to generate the openvswitch_dpdk.spec file
+    based on the openvswitch.spec one.
+  * Add upstream openvswitch-2.5.0-detect-dpdk-installation.patch
+    patch to detect and link against a DPDK installation.
+
+-------------------------------------------------------------------

New:
----
  0001-Remove-broken-pipe-warning-logs-from-ovsdb-server.lo.patch
  openvswitch-2.5.0-detect-dpdk-installation.patch
  openvswitch-dpdk.changes
  openvswitch-dpdk.spec
  pre_checkin.sh

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ openvswitch-dpdk.spec ++++++
#
# spec file for package openvswitch-dpdk
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


# needssslcertforbuild

# 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)
%bcond_without dpdk
# The testsuite is somewhat fragile for continuous testing in OBS
# but keep it here as an option
%bcond_with check

# Do NOT edit this auto generated file! Edit openvswitch.spec instead
# and run 'pre_checkin.sh' before committing
Name:           openvswitch-dpdk
Version:        2.5.0
Release:        0
Summary:        An open source, production quality, multilayer virtual switch 
(DPDK)
License:        Apache-2.0
Group:          Productivity/Networking/System
Url:            http://openvswitch.org/
Source0:        http://openvswitch.org/releases/openvswitch-%{version}.tar.gz
Source1:        preamble
Source2:        openvswitch-switch.logrotate
Source3:        openvswitch.service
Source89:       Module.supported.updates
# PATCH-FIX-UPSTREAM openvswitch-2.5.0-detect-dpdk-installation.patch
Patch0:         openvswitch-%{version}-detect-dpdk-installation.patch
Patch1:         0001-Remove-broken-pipe-warning-logs-from-ovsdb-server.lo.patch 
BuildRequires:  autoconf
BuildRequires:  automake
%if %{with dpdk}
# We need to be a bit strict with the dpdk version since
# it's very possible for DPDK to change it's API between
# releases. OVS currently requires 2.2.0. We may have to
# provide multiple versions of dpdk if OVS and DPDK get
# out of sync too often.
BuildRequires:  dpdk-devel = 2.2.0
ExclusiveArch:  x86_64 %ix86
%endif
BuildRequires:  fdupes
BuildRequires:  gcc
BuildRequires:  glibc-devel
BuildRequires:  graphviz
BuildRequires:  libcap-ng-devel
BuildRequires:  libopenssl-devel
BuildRequires:  libtool
BuildRequires:  make
BuildRequires:  openssl
BuildRequires:  perl
BuildRequires:  pkg-config
# Needed by the testsuite
BuildRequires:  procps
BuildRequires:  python-devel
BuildRequires:  python-xml
Requires:       logrotate
Requires:       openssl
Requires:       python
Provides:       openvswitch-common = %{version}
Obsoletes:      openvswitch-common < %{version}
Provides:       openvswitch-controller = %{version}
Obsoletes:      openvswitch-controller < %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%py_requires
BuildRequires:  valgrind-devel
# We can't have openvswitch and openvswitch-dpdk in parallel
%if %{with dpdk}
Conflicts:      openvswitch
%endif

%description
Open vSwitch is a production quality, multilayer virtual switch licensed under
the open source Apache 2.0 license. It is designed to enable massive network 
automation
through programmatic extension, while still supporting standard management 
interfaces
and protocols (e.g. NetFlow, sFlow, RSPAN, ERSPAN, CLI, LACP, 802.1ag). In 
addition,
it is designed to support distribution across multiple physical servers similar 
to
VMware’s vNetwork distributed vswitch or Cisco’s Nexus 1000V.

%if ! %{with dpdk}
%if %{with kmp}
%package kmp
Summary:        Open vSwitch kernel modules (DPDK)
License:        GPL-2.0+
Group:          System/Kernel
BuildRequires:  %{kernel_module_package_buildreqs}
%suse_kernel_module_package -p %{_sourcedir}/preamble ec2 xenpae vmi um

%description kmp
Kernel modules supporting the openvswitch datapath.
%endif
%endif

%package devel
Summary:        Open vSwitch Devel Libraries (DPDK)
License:        Apache-2.0
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}
Provides:       openvswitch-any-devel = %{version}
%if %{with dpdk}
Conflicts:      openvswitch-devel
%endif

%description devel
Devel libraries and headers for Open vSwitch.

%package switch
Summary:        Open vSwitch switch implementations (DPDK)
License:        Apache-2.0
Group:          Productivity/Networking/System
Requires:       %{name} = %{version}
Requires:       modutils
Requires:       procps
Requires:       python
# ovs-ctl / ovs-pki use /usr/bin/uuidgen:
Requires:       util-linux
Requires(post): %fillup_prereq
Provides:       openvswitch-any-switch = %{version}
%if %{with dpdk}
Conflicts:      openvswitch-switch
%endif
Suggests:       logrotate
%if %{with kmp}
Suggests:       openvswitch-kmp
%endif
%{?systemd_requires}

%description switch
openvswitch-switch provides the userspace components and utilities for
the Open vSwitch kernel-based switch.

Open vSwitch is a full-featured software-based Ethernet switch.

%package ovn
Summary:        Open vSwitch - Open Virtual Network support (DPDK)
License:        Apache-2.0
Group:          Productivity/Networking/System
Requires:       %{name} = %{version}
Requires:       %{name}-switch = %{version}
Requires:       %{name}-vtep = %{version}
Provides:       openvswitch-any-ovn = %{version}
%if %{with dpdk}
Conflicts:      openvswitch-ovn
%endif

%description ovn
OVN, the Open Virtual Network, is a system to support virtual network
abstraction.  OVN complements the existing capabilities of OVS to add
native support for virtual network abstractions, such as virtual L2 and L3
overlays and security groups.

%package pki
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}
%if %{with dpdk}
Conflicts:      openvswitch-pki
%endif

%description pki
openvswitch-pki provides PKI (public key infrastructure) support for
Open vSwitch switches and controllers, reducing the risk of
man-in-the-middle attacks on the Open vSwitch network infrastructure.

Open vSwitch is a full-featured software-based Ethernet switch.

%package vtep
Summary:        Open vSwitch VTEP emulator (DPDK)
License:        Apache-2.0
Group:          Productivity/Networking/System
Requires:       %{name} = %{version}
Requires:       %{name}-switch = %{version}
# Since openvswitch/scripts/ovs-vtep requires various ovs python modules.
Requires:       python-openvswitch = %{version}
Provides:       openvswitch-any-vtep = %{version}
%if %{with dpdk}
Conflicts:      openvswitch-vtep
%endif

%description vtep
A VTEP (VXLAN Tunnel EndPoint) emulator that uses Open vSwitch for
forwarding.

Open vSwitch is a full-featured software-based Ethernet switch.

%if ! %{with dpdk}
%package -n python-openvswitch
Summary:        Python bindings for Open vSwitch (DPDK)
License:        Python-2.0
Group:          Productivity/Networking/System
Requires:       openvswitch-common = %{version}
Requires:       python

%description -n python-openvswitch
This package contains the full Python bindings for Open vSwitch database.

%package -n python-openvswitch-test
Summary:        Python bindings for Open vSwitch (DPDK)
License:        Python-2.0
Group:          Productivity/Networking/System
Requires:       openvswitch-common = %{version}
Requires:       python
Requires:       python-openvswitch = %{version}
Requires:       python-twisted

%description -n python-openvswitch-test
This package contains the full Python bindings for Open vSwitch database.
%endif

%package test
Summary:        Open vSwitch test package (DPDK)
License:        Apache-2.0
Group:          Productivity/Networking/System
Requires:       %{name} = %{version}
Requires:       python
Requires:       python-argparse
Requires:       python-openvswitch-test = %{version}
Requires:       python-twisted
Provides:       openvswitch-any-test = %{version}
%if %{with dpdk}
Conflicts:      openvswitch-test
%endif

%description test
This package contains utilities that are useful to diagnose
performance and connectivity issues in Open vSwitch setup.

Open vSwitch is a full-featured software-based Ethernet switch.

%prep
%setup -n openvswitch-%{version} -q
%patch0 -p1
%patch1 -p1

%build
set -- * .travis*
mkdir source
mv "$@" source/
mkdir obj

pushd source
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
    rm -rf obj/$flavor
    cp -r source obj/$flavor
    cp -a %{SOURCE89} obj/$flavor/datapath/linux/Module.supported
    pushd obj/$flavor
    %configure \
        --with-logdir=%{_localstatedir}/log/openvswitch \
        --with-linux=%{_prefix}/src/linux-obj/%{_target_cpu}/$flavor \
        --with-linux-source=%{_prefix}/src/linux
    cd datapath/linux
    make %{?_smp_mflags}
    popd
done
%endif
%endif

pushd source

%if %{with dpdk}
dpdk_opt="--with-dpdk"
%endif

%configure \
        --disable-static \
        --enable-libcapng \
        --enable-shared \
        ${dpdk_opt} \
        --with-logdir=%{_localstatedir}/log/openvswitch
make %{?_smp_mflags}
popd

%check
%if %{with check}
pushd source
# Recheck tests before we declare them broken. If that fails, dump
# the log and exit. >2.5.0 uses the RECHECK env variable so this
# needs to be taken into consideration for future releases.
if make check TESTSUITEFLAGS="%{_smp_mflags}" ||
   make check TESTSUITEFLAGS='--recheck'; then :;
else
    cat tests/testsuite.log
    exit 1
fi
popd
%endif

%install
%if ! %{with dpdk}
%if %{with kmp}
export NO_BRP_STALE_LINK_ERROR=yes
export INSTALL_MOD_PATH=%{buildroot}
export INSTALL_MOD_DIR=updates
export BRP_PESIGN_FILES="*.ko /lib/firmware"
for flavor in %{flavors_to_build}; do
    pushd obj/$flavor/datapath/linux
    make -C %{_prefix}/src/linux-obj/%{_target_cpu}/$flavor modules_install 
M=$PWD
    popd
done
%endif
%endif

pushd source

make %{?_smp_mflags} DESTDIR=%{buildroot} install
for service in ovn-controller ovn-controller-vtep ovn-northd; do
        install -D -m 644 rhel/usr_lib_systemd_system_${service}.service \
        %{buildroot}%{_unitdir}/${service}.service
done
# We use our own openvswitch.service
install -D -m 644 %{SOURCE3} %{buildroot}%{_unitdir}/openvswitch.service

ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcopenvswitch
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcovn-controller
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcovn-controller-vtep
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcovn-northd

install -D -m 644 rhel/usr_share_openvswitch_scripts_systemd_sysconfig.template 
\
        
%{buildroot}/%{_localstatedir}/adm/fillup-templates/sysconfig.openvswitch

install -d -m 755 %{buildroot}/%{_sysconfdir}/logrotate.d
install -d -m 755 %{buildroot}/%{_localstatedir}/log/openvswitch

install -m 644 %{SOURCE2} \
         %{buildroot}/%{_sysconfdir}/logrotate.d/openvswitch-switch
install -d -m 755 %{buildroot}/%{_sysconfdir}/profile.d

install -m 644 vswitchd/vswitch.ovsschema \
         %{buildroot}/%{_datadir}/openvswitch/vswitch.ovsschema
popd

mkdir -p %{buildroot}%{py_sitedir}
mv %{buildroot}%{_datadir}/openvswitch/python/* %{buildroot}%{py_sitedir}
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
%pre switch
%service_add_pre openvswitch.service

%post switch
%service_add_post openvswitch.service
%{fillup_only -n openvswitch}

%preun switch
%service_del_preun openvswitch.service

%postun switch
%service_del_postun openvswitch.service

%pre ovn
%service_add_pre ovn-controller.service ovn-controller-vtep.service 
ovn-northd.service

%post ovn
/sbin/ldconfig
%service_add_post ovn-controller.service ovn-controller-vtep.service 
ovn-northd.service

%preun ovn
%service_del_preun ovn-controller.service ovn-controller-vtep.service 
ovn-northd.service

%postun ovn
%service_del_postun ovn-controller.service ovn-controller-vtep.service 
ovn-northd.service
/sbin/ldconfig

%preun test
%stop_on_removal openvswitch-testcontroller

%postun test
%restart_on_update openvswitch-testcontroller

%post vtep -p /sbin/ldconfig
%postun vtep -p /sbin/ldconfig

%files
%defattr(-,root,root)
%dir %{_datadir}/openvswitch
%doc source/AUTHORS
%doc source/CONTRIBUTING.md
%doc source/COPYING
%doc source/CodingStyle.md
%doc source/DESIGN.md
%doc source/FAQ.md
%doc source/IntegrationGuide.md
%doc source/NEWS
%doc source/NOTICE
%doc source/OPENFLOW-1.1+.md
%doc source/PORTING.md
%doc source/README*
%doc source/SECURITY.md
%doc source/TODO.md
%doc source/WHY-OVS.md
%{_bindir}/ovs-appctl
%{_bindir}/ovs-benchmark
%{_bindir}/ovs-ofctl
%{_bindir}/ovsdb-client
%{_bindir}/ovs-parse-backtrace
%{_bindir}/ovs-dpctl-top
%{_sbindir}/ovs-bugtool
%{_sbindir}/ovs-vlan-bug-workaround
%dir %{_datadir}/openvswitch/scripts
%{_datadir}/openvswitch/bugtool-plugins
%{_datadir}/openvswitch/scripts/ovs-bugtool-*
%{_libdir}/libofproto.so.*
%{_libdir}/libopenvswitch.so.*
%{_libdir}/libovsdb.so.*
%{_libdir}/libsflow.so.*
%{_mandir}/man1/ovs-benchmark.1.gz
%{_mandir}/man1/ovsdb-client.1.gz
%{_mandir}/man8/ovs-appctl.8.gz
%{_mandir}/man8/ovs-bugtool.8.gz
%{_mandir}/man8/ovs-ofctl.8.gz
%{_mandir}/man8/ovs-vlan-bug-workaround.8.gz
%{_mandir}/man8/ovs-parse-backtrace.8.gz
%{_mandir}/man8/ovs-dpctl-top.8.gz
%{_sysconfdir}/bash_completion.d/ovs-appctl-bashcomp.bash

%files pki
%defattr(-,root,root)
%{_mandir}/man8/ovs-pki.8.gz
%{_bindir}/ovs-pki

%files vtep
%defattr(-,root,root)
%{_bindir}/vtep-ctl
%{_mandir}/man5/vtep.5.gz
%{_mandir}/man8/vtep-ctl.8.gz
%{_datadir}/openvswitch/scripts/ovs-vtep
%{_datadir}/openvswitch/vtep.ovsschema
%{_libdir}/libvtep.so.*

%if ! %{with dpdk}
%files -n python-openvswitch
%defattr(-,root,root)
%{py_sitedir}/ovs/

%files -n python-openvswitch-test
%defattr(-,root,root)
%{py_sitedir}/ovstest/
%endif

%files switch
%defattr(-,root,root)
%{_bindir}/ovs-docker
%{_bindir}/ovs-dpctl
%{_bindir}/ovs-tcpundump
%{_bindir}/ovs-pcap
%{_bindir}/ovs-vsctl
%{_bindir}/ovsdb-tool
%{_sbindir}/ovs-vswitchd
%{_sbindir}/ovsdb-server
%{_datadir}/openvswitch/scripts/ovs-check-dead-ifs
%{_datadir}/openvswitch/scripts/ovs-ctl
%{_datadir}/openvswitch/scripts/ovs-lib
%{_datadir}/openvswitch/scripts/ovs-save
%{_datadir}/openvswitch/vswitch.ovsschema
%{_sysconfdir}/bash_completion.d/ovs-vsctl-bashcomp.bash
%config(noreplace) %{_sysconfdir}/logrotate.d/openvswitch-switch
%{_mandir}/man8/ovs-dpctl.8.gz
%{_mandir}/man1/ovs-tcpundump.1.gz
%{_mandir}/man1/ovs-pcap.1.gz
%{_mandir}/man8/ovs-vsctl.8.gz
%{_mandir}/man1/ovsdb-tool.1.gz
%{_mandir}/man8/ovs-vswitchd.8.gz
%{_mandir}/man1/ovsdb-server.1.gz
%{_mandir}/man5/ovs-vswitchd.conf.db.5.gz
%{_mandir}/man8/ovs-ctl.8.gz
%{_sbindir}/rcopenvswitch
%{_unitdir}/openvswitch.service
%{_localstatedir}/adm/fillup-templates/sysconfig.openvswitch
%dir %{_localstatedir}/log/openvswitch

%files ovn
%defattr(-,root,root)
%{_bindir}/ovn-controller
%{_bindir}/ovn-controller-vtep
%{_bindir}/ovn-docker-overlay-driver
%{_bindir}/ovn-docker-underlay-driver
%{_bindir}/ovn-nbctl
%{_bindir}/ovn-northd
%{_bindir}/ovn-sbctl
%{_datadir}/openvswitch/scripts/ovn-ctl
%{_libdir}/libovn.so.*
%{_mandir}/man5/ovn-nb.5*
%{_mandir}/man5/ovn-sb.5*
%{_mandir}/man7/ovn-architecture.7*
%{_mandir}/man8/ovn-controller.8*
%{_mandir}/man8/ovn-controller-vtep.8*
%{_mandir}/man8/ovn-ctl.8*
%{_mandir}/man8/ovn-nbctl.8*
%{_mandir}/man8/ovn-northd.8*
%{_mandir}/man8/ovn-sbctl.8*
%config %{_datadir}/openvswitch/ovn-nb.ovsschema
%config %{_datadir}/openvswitch/ovn-sb.ovsschema
%{_sbindir}/rcovn-controller
%{_sbindir}/rcovn-controller-vtep
%{_sbindir}/rcovn-northd
%{_unitdir}/ovn-controller.service
%{_unitdir}/ovn-controller-vtep.service
%{_unitdir}/ovn-northd.service

%files test
%defattr(-,root,root)
%{_bindir}/ovs-test
%{_bindir}/ovs-l3ping
%{_bindir}/ovs-vlan-test
%{_bindir}/ovs-testcontroller
%{_mandir}/man8/ovs-test.8.gz
%{_mandir}/man8/ovs-l3ping.8.gz
%{_mandir}/man8/ovs-vlan-test.8.gz
%{_mandir}/man8/ovs-testcontroller.8.gz

%files devel
%defattr(-,root,root)
%{_libdir}/libofproto.so
%{_libdir}/libopenvswitch.so
%{_libdir}/libovn.so
%{_libdir}/libovsdb.so
%{_libdir}/libsflow.so
%{_libdir}/libvtep.so
%{_includedir}/openflow/
%{_includedir}/openvswitch/
%{_libdir}/pkgconfig/*.pc

%changelog
++++++ openvswitch.spec ++++++
--- /var/tmp/diff_new_pack.ArRqxi/_old  2016-07-12 23:51:25.000000000 +0200
+++ /var/tmp/diff_new_pack.ArRqxi/_new  2016-07-12 23:51:25.000000000 +0200
@@ -20,6 +20,12 @@
 
 # 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)
+%bcond_with dpdk
+# The testsuite is somewhat fragile for continuous testing in OBS
+# but keep it here as an option
+%bcond_with check
 
 Name:           openvswitch
 Version:        2.5.0
@@ -28,23 +34,38 @@
 License:        Apache-2.0
 Group:          Productivity/Networking/System
 Url:            http://openvswitch.org/
-Source0:        http://openvswitch.org/releases/%{name}-%{version}.tar.gz
+Source0:        http://openvswitch.org/releases/openvswitch-%{version}.tar.gz
 Source1:        preamble
 Source2:        openvswitch-switch.logrotate
 Source3:        openvswitch.service
 Source89:       Module.supported.updates
+# PATCH-FIX-UPSTREAM openvswitch-2.5.0-detect-dpdk-installation.patch
+Patch0:         openvswitch-%{version}-detect-dpdk-installation.patch
+Patch1:         
0001-Remove-broken-pipe-warning-logs-from-ovsdb-server.lo.patch 
 BuildRequires:  autoconf
 BuildRequires:  automake
+%if %{with dpdk}
+# We need to be a bit strict with the dpdk version since
+# it's very possible for DPDK to change it's API between
+# releases. OVS currently requires 2.2.0. We may have to
+# provide multiple versions of dpdk if OVS and DPDK get
+# out of sync too often.
+BuildRequires:  dpdk-devel = 2.2.0
+ExclusiveArch:  x86_64 %ix86
+%endif
 BuildRequires:  fdupes
 BuildRequires:  gcc
 BuildRequires:  glibc-devel
 BuildRequires:  graphviz
+BuildRequires:  libcap-ng-devel
 BuildRequires:  libopenssl-devel
 BuildRequires:  libtool
 BuildRequires:  make
 BuildRequires:  openssl
 BuildRequires:  perl
 BuildRequires:  pkg-config
+# Needed by the testsuite
+BuildRequires:  procps
 BuildRequires:  python-devel
 BuildRequires:  python-xml
 Requires:       logrotate
@@ -57,6 +78,10 @@
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 %py_requires
 BuildRequires:  valgrind-devel
+# We can't have openvswitch and openvswitch-dpdk in parallel
+%if %{with dpdk}
+Conflicts:      openvswitch
+%endif
 
 %description
 Open vSwitch is a production quality, multilayer virtual switch licensed under
@@ -66,6 +91,7 @@
 it is designed to support distribution across multiple physical servers 
similar to
 VMware’s vNetwork distributed vswitch or Cisco’s Nexus 1000V.
 
+%if ! %{with dpdk}
 %if %{with kmp}
 %package kmp
 Summary:        Open vSwitch kernel modules
@@ -74,15 +100,20 @@
 BuildRequires:  %{kernel_module_package_buildreqs}
 %suse_kernel_module_package -p %{_sourcedir}/preamble ec2 xenpae vmi um
 
-%description -n %{name}-kmp
+%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
+Group:          Development/Libraries/C and C++
 Requires:       %{name} = %{version}
+Provides:       openvswitch-any-devel = %{version}
+%if %{with dpdk}
+Conflicts:      openvswitch-devel
+%endif
 
 %description devel
 Devel libraries and headers for Open vSwitch.
@@ -91,15 +122,21 @@
 Summary:        Open vSwitch switch implementations
 License:        Apache-2.0
 Group:          Productivity/Networking/System
+Requires:       %{name} = %{version}
 Requires:       modutils
-Requires:       openvswitch = %{version}
 Requires:       procps
 Requires:       python
 # ovs-ctl / ovs-pki use /usr/bin/uuidgen:
 Requires:       util-linux
 Requires(post): %fillup_prereq
+Provides:       openvswitch-any-switch = %{version}
+%if %{with dpdk}
+Conflicts:      openvswitch-switch
+%endif
 Suggests:       logrotate
+%if %{with kmp}
 Suggests:       openvswitch-kmp
+%endif
 %{?systemd_requires}
 
 %description switch
@@ -112,9 +149,13 @@
 Summary:        Open vSwitch - Open Virtual Network support
 License:        Apache-2.0
 Group:          Productivity/Networking/System
-Requires:       openvswitch = %{version}
-Requires:       openvswitch-switch = %{version}
-Requires:       openvswitch-vtep = %{version}
+Requires:       %{name} = %{version}
+Requires:       %{name}-switch = %{version}
+Requires:       %{name}-vtep = %{version}
+Provides:       openvswitch-any-ovn = %{version}
+%if %{with dpdk}
+Conflicts:      openvswitch-ovn
+%endif
 
 %description ovn
 OVN, the Open Virtual Network, is a system to support virtual network
@@ -126,7 +167,11 @@
 Summary:        Open vSwitch public key infrastructure dependency package
 License:        Apache-2.0
 Group:          Productivity/Networking/System
-Requires:       openvswitch = %{version}
+Requires:       %{name} = %{version}
+Provides:       openvswitch-any-pki = %{version}
+%if %{with dpdk}
+Conflicts:      openvswitch-pki
+%endif
 
 %description pki
 openvswitch-pki provides PKI (public key infrastructure) support for
@@ -139,21 +184,27 @@
 Summary:        Open vSwitch VTEP emulator
 License:        Apache-2.0
 Group:          Productivity/Networking/System
-Requires:       openvswitch = %{version}
-Requires:       openvswitch-switch = %{version}
+Requires:       %{name} = %{version}
+Requires:       %{name}-switch = %{version}
 # Since openvswitch/scripts/ovs-vtep requires various ovs python modules.
 Requires:       python-openvswitch = %{version}
+Provides:       openvswitch-any-vtep = %{version}
+%if %{with dpdk}
+Conflicts:      openvswitch-vtep
+%endif
 
 %description vtep
-A VTEP emulator that uses Open vSwitch for forwarding.
+A VTEP (VXLAN Tunnel EndPoint) emulator that uses Open vSwitch for
+forwarding.
 
 Open vSwitch is a full-featured software-based Ethernet switch.
 
+%if ! %{with dpdk}
 %package -n python-openvswitch
 Summary:        Python bindings for Open vSwitch
 License:        Python-2.0
 Group:          Productivity/Networking/System
-Requires:       openvswitch = %{version}
+Requires:       openvswitch-common = %{version}
 Requires:       python
 
 %description -n python-openvswitch
@@ -163,23 +214,28 @@
 Summary:        Python bindings for Open vSwitch
 License:        Python-2.0
 Group:          Productivity/Networking/System
-Requires:       openvswitch = %{version}
+Requires:       openvswitch-common = %{version}
 Requires:       python
 Requires:       python-openvswitch = %{version}
 Requires:       python-twisted
 
 %description -n python-openvswitch-test
 This package contains the full Python bindings for Open vSwitch database.
+%endif
 
 %package test
 Summary:        Open vSwitch test package
 License:        Apache-2.0
 Group:          Productivity/Networking/System
-Requires:       openvswitch = %{version}
+Requires:       %{name} = %{version}
 Requires:       python
 Requires:       python-argparse
 Requires:       python-openvswitch-test = %{version}
 Requires:       python-twisted
+Provides:       openvswitch-any-test = %{version}
+%if %{with dpdk}
+Conflicts:      openvswitch-test
+%endif
 
 %description test
 This package contains utilities that are useful to diagnose
@@ -188,7 +244,9 @@
 Open vSwitch is a full-featured software-based Ethernet switch.
 
 %prep
-%setup -q
+%setup -n openvswitch-%{version} -q
+%patch0 -p1
+%patch1 -p1
 
 %build
 set -- * .travis*
@@ -201,6 +259,7 @@
 # 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
@@ -217,16 +276,40 @@
     popd
 done
 %endif
+%endif
 
 pushd source
+
+%if %{with dpdk}
+dpdk_opt="--with-dpdk"
+%endif
+
 %configure \
         --disable-static \
+        --enable-libcapng \
         --enable-shared \
+        ${dpdk_opt} \
         --with-logdir=%{_localstatedir}/log/openvswitch
 make %{?_smp_mflags}
 popd
 
+%check
+%if %{with check}
+pushd source
+# Recheck tests before we declare them broken. If that fails, dump
+# the log and exit. >2.5.0 uses the RECHECK env variable so this
+# needs to be taken into consideration for future releases.
+if make check TESTSUITEFLAGS="%{_smp_mflags}" ||
+   make check TESTSUITEFLAGS='--recheck'; then :;
+else
+    cat tests/testsuite.log
+    exit 1
+fi
+popd
+%endif
+
 %install
+%if ! %{with dpdk}
 %if %{with kmp}
 export NO_BRP_STALE_LINK_ERROR=yes
 export INSTALL_MOD_PATH=%{buildroot}
@@ -238,6 +321,7 @@
     popd
 done
 %endif
+%endif
 
 pushd source
 
@@ -247,9 +331,9 @@
         %{buildroot}%{_unitdir}/${service}.service
 done
 # We use our own openvswitch.service
-install -D -m 644 %{SOURCE3} %{buildroot}%{_unitdir}/%{name}.service
+install -D -m 644 %{SOURCE3} %{buildroot}%{_unitdir}/openvswitch.service
 
-ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
+ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcopenvswitch
 ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcovn-controller
 ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcovn-controller-vtep
 ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcovn-northd
@@ -261,20 +345,25 @@
 install -d -m 755 %{buildroot}/%{_localstatedir}/log/openvswitch
 
 install -m 644 %{SOURCE2} \
-         %{buildroot}/%{_sysconfdir}/logrotate.d/%{name}-switch
+         %{buildroot}/%{_sysconfdir}/logrotate.d/openvswitch-switch
 install -d -m 755 %{buildroot}/%{_sysconfdir}/profile.d
 
 install -m 644 vswitchd/vswitch.ovsschema \
-         %{buildroot}/%{_datadir}/%{name}/vswitch.ovsschema
+         %{buildroot}/%{_datadir}/openvswitch/vswitch.ovsschema
 popd
 
 mkdir -p %{buildroot}%{py_sitedir}
-mv %{buildroot}%{_datadir}/%{name}/python/* %{buildroot}%{py_sitedir}
-rmdir %{buildroot}%{_datadir}/%{name}/python
+mv %{buildroot}%{_datadir}/openvswitch/python/* %{buildroot}%{py_sitedir}
+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
@@ -371,6 +460,7 @@
 %{_datadir}/openvswitch/vtep.ovsschema
 %{_libdir}/libvtep.so.*
 
+%if ! %{with dpdk}
 %files -n python-openvswitch
 %defattr(-,root,root)
 %{py_sitedir}/ovs/
@@ -378,6 +468,7 @@
 %files -n python-openvswitch-test
 %defattr(-,root,root)
 %{py_sitedir}/ovstest/
+%endif
 
 %files switch
 %defattr(-,root,root)
@@ -405,7 +496,7 @@
 %{_mandir}/man1/ovsdb-server.1.gz
 %{_mandir}/man5/ovs-vswitchd.conf.db.5.gz
 %{_mandir}/man8/ovs-ctl.8.gz
-%{_sbindir}/rc%{name}
+%{_sbindir}/rcopenvswitch
 %{_unitdir}/openvswitch.service
 %{_localstatedir}/adm/fillup-templates/sysconfig.openvswitch
 %dir %{_localstatedir}/log/openvswitch

++++++ 0001-Remove-broken-pipe-warning-logs-from-ovsdb-server.lo.patch ++++++
>From fb496f92ca1eeead8760b5cdfd857165f64deadf Mon Sep 17 00:00:00 2001
From: Numan Siddique <nusid...@redhat.com>
Date: Mon, 21 Dec 2015 12:31:14 +0530
Subject: [PATCH] Remove broken pipe warning logs from ovsdb-server.log for ovn
 tests

Taken the fix from the commit d3292dd... (in ovn-controller-vtep.at)

Signed-off-by: Numan Siddique <nusid...@redhat.com>
Signed-off-by: Russell Bryant <rbry...@redhat.com>
---
 tests/ovn-nbctl.at | 10 +++++++++-
 tests/ovn-sbctl.at | 10 +++++++++-
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/tests/ovn-nbctl.at b/tests/ovn-nbctl.at
index 5358f1e..efad8a2 100644
--- a/tests/ovn-nbctl.at
+++ b/tests/ovn-nbctl.at
@@ -16,7 +16,15 @@ m4_define([OVN_NBCTL_TEST_START],
 
 # OVN_NBCTL_TEST_STOP
 m4_define([OVN_NBCTL_TEST_STOP],
-  [AT_CHECK([check_logs $1])
+  [# removes all 'Broken pipe' warning logs from ovsdb-server.log.  this is in
+   # that *ctl command (e.g. ovn-nbctl) exits right after committing the change
+   # to database.  however, in reaction, some daemon (e.g. ovn-controller-vtep)
+   # may immediately update the database.  this later update may cause database
+   # sending update back to *ctl command if *ctl has not proceeded to exit yet.
+   # and if *ctl command exits before database calling send, the send from
+   # database will fail with 'Broken pipe' error.
+   AT_CHECK([check_logs "$1
+/Broken pipe/d"])
    AT_CHECK([ovs-appctl -t ovsdb-server exit])])
 
 
diff --git a/tests/ovn-sbctl.at b/tests/ovn-sbctl.at
index 9986d9a..4c7cf87 100644
--- a/tests/ovn-sbctl.at
+++ b/tests/ovn-sbctl.at
@@ -25,7 +25,15 @@ m4_define([OVN_SBCTL_TEST_START],
 
 # OVN_SBCTL_TEST_STOP
 m4_define([OVN_SBCTL_TEST_STOP],
-  [AT_CHECK([check_logs $1])
+  [# removes all 'Broken pipe' warning logs from ovsdb-server.log.  this is in
+   # that *ctl command (e.g. ovn-nbctl) exits right after committing the change
+   # to database.  however, in reaction, some daemon (e.g. ovn-controller-vtep)
+   # may immediately update the database.  this later update may cause database
+   # sending update back to *ctl command if *ctl has not proceeded to exit yet.
+   # and if *ctl command exits before database calling send, the send from
+   # database will fail with 'Broken pipe' error.
+   AT_CHECK([check_logs "$1
+/Broken pipe/d"])
    AT_CHECK([ovs-appctl -t ovn-northd exit])
    AT_CHECK([ovs-appctl -t ovsdb-server exit])])
 
-- 
2.8.3

++++++ openvswitch-2.5.0-detect-dpdk-installation.patch ++++++
>From 40b5ea86319f803cc4f5df6754b2cd1556f6bd94 Mon Sep 17 00:00:00 2001
From: Bhanuprakash Bodireddy <bhanuprakash.bodire...@intel.com>
Date: Tue, 12 Apr 2016 11:44:15 +0100
Subject: [PATCH] acinclude: Autodetect DPDK location when configuring OVS

When using DPDK datapath, the OVS configure script requires the DPDK
build directory passed on --with-dpdk. This can be avoided if DPDK
library, headers are in standard compiler search paths.

This patch fixes the problem by searching for DPDK libraries in standard
locations and configure OVS sources for dpdk datapath.

If the install location is manually specified in "--with-dpdk"
autodiscovery shall be skipped.

Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodire...@intel.com>
Signed-off-by: Daniele Di Proietto <diproiet...@vmware.com>
---
 AUTHORS      |  1 +
 acinclude.m4 | 76 +++++++++++++++++++++++++++++++++++++++++-------------------
 2 files changed, 53 insertions(+), 24 deletions(-)

diff --git a/acinclude.m4 b/acinclude.m4
index f345c31..acd7ce7 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -163,27 +163,50 @@ AC_DEFUN([OVS_CHECK_DPDK], [
               [AC_HELP_STRING([--with-dpdk=/path/to/dpdk],
                               [Specify the DPDK build directory])])
 
-  if test X"$with_dpdk" != X; then
-    RTE_SDK=$with_dpdk
+  AC_MSG_CHECKING([whether dpdk datapath is enabled])
+  if test -z "$with_dpdk" || test "$with_dpdk" = no; then
+    AC_MSG_RESULT([no])
+    DPDKLIB_FOUND=false
+  else
+    AC_MSG_RESULT([yes])
+    case "$with_dpdk" in
+      yes)
+        DPDK_AUTO_DISCOVER="true"
+        DPDK_INCLUDE="/usr/local/include/dpdk -I/usr/include/dpdk"
+        ;;
+      *)
+        DPDK_AUTO_DISCOVER="false"
+        DPDK_INCLUDE="$with_dpdk/include"
+        # If 'with_dpdk' is passed install directory, point to headers
+        # installed in $DESTDIR/$prefix/include/dpdk
+        AC_CHECK_FILE([$DPDK_INCLUDE/rte_config.h], [],
+                      [AC_CHECK_FILE([$DPDK_INCLUDE/dpdk/rte_config.h],
+                                     [DPDK_INCLUDE=$DPDK_INCLUDE/dpdk], [])])
+        DPDK_LIB_DIR="$with_dpdk/lib"
+        ;;
+    esac
 
-    DPDK_INCLUDE=$RTE_SDK/include
-    DPDK_LIB_DIR=$RTE_SDK/lib
     DPDK_LIB="-ldpdk"
     DPDK_EXTRA_LIB=""
-    RTE_SDK_FULL=`readlink -f $RTE_SDK`
-
-    AC_COMPILE_IFELSE(
-      [AC_LANG_PROGRAM([#include <$RTE_SDK_FULL/include/rte_config.h>
-#if !RTE_LIBRTE_VHOST_USER
-#error
-#endif], [])],
-                    [], [AC_DEFINE([VHOST_CUSE], [1], [DPDK vhost-cuse support 
enabled, vhost-user disabled.])
-                         DPDK_EXTRA_LIB="-lfuse"])
 
     ovs_save_CFLAGS="$CFLAGS"
     ovs_save_LDFLAGS="$LDFLAGS"
-    LDFLAGS="$LDFLAGS -L$DPDK_LIB_DIR"
     CFLAGS="$CFLAGS -I$DPDK_INCLUDE"
+    if test "$DPDK_AUTO_DISCOVER" = "false"; then
+      LDFLAGS="$LDFLAGS -L${DPDK_LIB_DIR}"
+    fi
+
+    AC_COMPILE_IFELSE([
+      AC_LANG_PROGRAM(
+        [
+          #include <rte_config.h>
+#if !RTE_LIBRTE_VHOST_USER
+#error
+#endif
+        ], [])
+      ], [],
+      [AC_DEFINE([VHOST_CUSE], [1], [DPDK vhost-cuse support enabled, 
vhost-user disabled.])
+       DPDK_EXTRA_LIB="-lfuse"])
 
     # On some systems we have to add -ldl to link with dpdk
     #
@@ -192,7 +215,7 @@ AC_DEFUN([OVS_CHECK_DPDK], [
     # Before each attempt the search cache must be unset,
     # otherwise autoconf will stick with the old result
 
-    found=false
+    DPDKLIB_FOUND=false
     save_LIBS=$LIBS
     for extras in "" "-ldl"; do
         LIBS="$DPDK_LIB $extras $save_LIBS $DPDK_EXTRA_LIB"
@@ -201,17 +224,25 @@ AC_DEFUN([OVS_CHECK_DPDK], [
                              #include <rte_eal.h>],
                             [int rte_argc; char ** rte_argv;
                              rte_eal_init(rte_argc, rte_argv);])],
-           [found=true])
-        if $found; then
+           [DPDKLIB_FOUND=true])
+        if $DPDKLIB_FOUND; then
             break
         fi
     done
-    if $found; then :; else
-        AC_MSG_ERROR([cannot link with dpdk])
+
+    # If linking unsuccessful
+    if test "$DPDKLIB_FOUND" = "false" ; then
+      if $DPDK_AUTO_DISCOVER; then
+        AC_MSG_ERROR([Could not find DPDK library in default search path, Use 
--with-dpdk to specify the DPDK library installed in non-standard location])
+      else
+        AC_MSG_ERROR([Could not find DPDK libraries in $DPDK_LIB_DIR])
+      fi
     fi
     CFLAGS="$ovs_save_CFLAGS"
     LDFLAGS="$ovs_save_LDFLAGS"
-    OVS_LDFLAGS="$OVS_LDFLAGS -L$DPDK_LIB_DIR"
+    if test "$DPDK_AUTO_DISCOVER" = "false"; then
+      OVS_LDFLAGS="$OVS_LDFLAGS -L$DPDK_LIB_DIR"
+    fi
     OVS_CFLAGS="$OVS_CFLAGS -I$DPDK_INCLUDE"
     OVS_ENABLE_OPTION([-mssse3])
 
@@ -226,12 +257,9 @@ AC_DEFUN([OVS_CHECK_DPDK], [
     DPDK_vswitchd_LDFLAGS=-Wl,--whole-archive,$DPDK_LIB,--no-whole-archive
     AC_SUBST([DPDK_vswitchd_LDFLAGS])
     AC_DEFINE([DPDK_NETDEV], [1], [System uses the DPDK module.])
-
-  else
-    RTE_SDK=
   fi
 
-  AM_CONDITIONAL([DPDK_NETDEV], test -n "$RTE_SDK")
+  AM_CONDITIONAL([DPDK_NETDEV], test "$DPDKLIB_FOUND" = true)
 ])
 
 dnl OVS_GREP_IFELSE(FILE, REGEX, [IF-MATCH], [IF-NO-MATCH])
-- 
2.8.2

++++++ pre_checkin.sh ++++++
#!/bin/sh

# Start fresh
for f in spec changes; do
    cp openvswitch.$f openvswitch-dpdk.$f || exit 1
done

#
#- Add comment about generated file
#- Fix {,sub-}package name, description, summary
#- Enable the dpdk conditional build
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 "/^Summary:/s/^.*$/&\ \(DPDK\)/g" \
-e "/^%bcond_with\s*dpdk/s/with/&out/" \
openvswitch-dpdk.spec || exit 1

Reply via email to