Re: [ovs-dev] [PATCH v4 ovn 1/4] Build OVN using external OVS directory

2019-08-28 Thread 0-day Robot
Bleep bloop.  Greetings Numan Siddique, I am a robot and I have tried out your 
patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


checkpatch:
WARNING: Line is 81 characters long (recommended limit is 79)
#143 FILE: .travis/osx-build.sh:31:
export DISTCHECK_CONFIGURE_FLAGS="$EXTRA_OPTS 
--with-ovs-source=$PWD/ovs_src"

WARNING: Line is 97 characters long (recommended limit is 79)
#159 FILE: Documentation/intro/install/general.rst:46:
Please see the Open vSwitch documentation 
(https://docs.openvswitch.org/en/latest/intro/install/)

WARNING: Line is 85 characters long (recommended limit is 79)
#204 FILE: Documentation/intro/install/general.rst:292:
$./configure --with-ovs-source=/home/foo/ovs/ 
--with-ovs-build=/home/foo/ovs/_gcc

WARNING: Line is 96 characters long (recommended limit is 79)
#1401 FILE: tutorial/ovs-sandbox:342:

PATH=$ovsbuilddir/ovsdb:$ovsbuilddir/vswitchd:$ovsbuilddir/utilities:$ovsbuilddir/vtep:$PATH

WARNING: Line is 98 characters long (recommended limit is 79)
#1402 FILE: tutorial/ovs-sandbox:343:

PATH=$builddir/controller:$builddir/controller-vtep:$builddir/northd:$builddir/utilities:$PATH

WARNING: Line is 87 characters long (recommended limit is 79)
#1591 FILE: tutorial/ovs-sandbox:476:
run ovsdb-tool create-cluster ${db}1.db "$schema" 
unix:${db}1.raft;

WARNING: Line is 102 characters long (recommended limit is 79)
#1593 FILE: tutorial/ovs-sandbox:478:
run ovsdb-tool join-cluster $db$i.db $schema_name 
unix:$db$i.raft unix:${db}1.raft

WARNING: Line is 106 characters long (recommended limit is 79)
#1653 FILE: tutorial/ovs-sandbox:525:
ovn-nbctl set-ssl $sandbox/ovnnb-privkey.pem  $sandbox/ovnnb-cert.pem 
$sandbox/pki/switchca/cacert.pem

WARNING: Line is 106 characters long (recommended limit is 79)
#1655 FILE: tutorial/ovs-sandbox:527:
ovn-sbctl set-ssl $sandbox/ovnsb-privkey.pem  $sandbox/ovnsb-cert.pem 
$sandbox/pki/switchca/cacert.pem

WARNING: Line is 120 characters long (recommended limit is 79)
#1682 FILE: tutorial/ovs-sandbox:534:
OVN_CTRLR_PKI="-p $sandbox/chassis-1-privkey.pem -c 
$sandbox/chassis-1-cert.pem -C $sandbox/pki/switchca/cacert.pem"

Lines checked: 1724, Warnings: 10, Errors: 0


Please check this out.  If you feel there has been an error, please email 
acon...@redhat.com

Thanks,
0-day Robot
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v4 ovn 1/4] Build OVN using external OVS directory

2019-08-28 Thread nusiddiq
From: Numan Siddique 

With this patch we have to configure OVN to refer to external OVS source/build
directory instead of the ovs subtree.

The new configuration options added are:
 * --with-ovs-source=/path/to/ovs/source/dir
 * --with-ovs-build=/path/to/ovs/build/dir

The path to these directories can also be a relative path.

Before configuring OVN, user should configure and compile OVS. If the user has
configured OVS on a different directory than the source dir, then 
'with-ovs-build'
should be specified.

If ovs-build dir is not defined, then ovs-source is used.

An upcoming patch will delete the ovs subtree.

Example usage:
  $ # Clone OVS repo
  $cd /home/foo/ovs
  $./boot.sh
  $mkdir _gcc
  $cd _gcc && ../configure && cd ..
  $make -C _gcc

  $ # Clone OVN repo
  $cd /home/foo/ovn
  $./boot.sh
  $./configure --with-ovs-source=/home/foo/ovs/ 
--with-ovs-build=/home/foo/ovs/_gcc
  $make

The test files ovn-controller-vtep.at, ovn-nbctl.at and ovn-sbctl.at needed to 
be modified
because of this commit [1] in the openvswitch repo.

This patch also updates the tutorial/ovs-sandbox to use OVS binaries from the 
OVS build
folder.

[1] - 
https://github.com/openvswitch/ovs/commit/29004db273985088cdb60097bdfd4a6bc6a966d1

Acked-by: Lucas Alvares Gomes 
Signed-off-by: Numan Siddique 
Tested-by: Lorenzo Bianconi 
---
 .travis/linux-build.sh  |  17 +-
 .travis/osx-build.sh|  13 +-
 Documentation/intro/install/general.rst |  31 ++-
 Makefile.am |  24 +-
 acinclude.m4|  43 
 configure.ac|  29 +--
 controller-vtep/automake.mk |   2 +-
 include/ovn/version.h.in|  28 +++
 lib/ovsdb_automake.mk   |   7 +-
 tests/automake.mk   |   6 +-
 tests/ofproto-macros.at |   4 +-
 tests/ovn-controller-vtep.at|  12 +-
 tests/ovn-nbctl.at  |   6 +-
 tests/ovn-sbctl.at  |  20 +-
 tests/ovn.at| 158 ++--
 tests/ovsdb-macros.at   |   2 +-
 tutorial/automake.mk|   2 +-
 tutorial/ovs-sandbox| 308 
 18 files changed, 411 insertions(+), 301 deletions(-)
 create mode 100644 include/ovn/version.h.in

diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index a20474345..37a6844ab 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -10,7 +10,18 @@ TARGET="x86_64-native-linuxapp-gcc"
 
 function configure_ovs()
 {
+git clone https://github.com/openvswitch/ovs.git ovs_src
+pushd ovs_src
 ./boot.sh && ./configure $* || { cat config.log; exit 1; }
+make -j4
+popd
+}
+
+function configure_ovn()
+{
+configure_ovs $*
+./boot.sh && ./configure --with-ovs-source=$PWD/ovs_src $* || \
+{ cat config.log; exit 1; }
 }
 
 OPTS="$EXTRA_OPTS $*"
@@ -28,16 +39,16 @@ fi
 if [ "$TESTSUITE" ]; then
 # 'distcheck' will reconfigure with required options.
 # Now we only need to prepare the Makefile without sparse-wrapped CC.
-configure_ovs
+configure_ovn
 
-export DISTCHECK_CONFIGURE_FLAGS="$OPTS"
+export DISTCHECK_CONFIGURE_FLAGS="$OPTS --with-ovs-source=$PWD/ovs_src"
 if ! make distcheck -j4 TESTSUITEFLAGS="-j4 -k ovn" RECHECK=yes; then
 # testsuite.log is necessary for debugging.
 cat */_build/tests/testsuite.log
 exit 1
 fi
 else
-configure_ovs $OPTS
+configure_ovn $OPTS
 make selinux-policy
 
 make -j4
diff --git a/.travis/osx-build.sh b/.travis/osx-build.sh
index f11d7b9af..1d6ac54af 100755
--- a/.travis/osx-build.sh
+++ b/.travis/osx-build.sh
@@ -7,10 +7,20 @@ EXTRA_OPTS=""
 
 function configure_ovs()
 {
+git clone https://github.com/openvswitch/ovs.git ovs_src
+pushd ovs_src
 ./boot.sh && ./configure $*
+make -j4
+popd
 }
 
-configure_ovs $EXTRA_OPTS $*
+function configure_ovn()
+{
+configure_ovs $*
+./boot.sh && ./configure $* --with-ovs-source=$PWD/ovs_src
+}
+
+configure_ovn $EXTRA_OPTS $*
 
 if [ "$CC" = "clang" ]; then
 make CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument"
@@ -18,6 +28,7 @@ else
 make CFLAGS="$CFLAGS $BUILD_ENV"
 fi
 if [ "$TESTSUITE" ] && [ "$CC" != "clang" ]; then
+export DISTCHECK_CONFIGURE_FLAGS="$EXTRA_OPTS 
--with-ovs-source=$PWD/ovs_src"
 if ! make distcheck RECHECK=yes; then
 # testsuite.log is necessary for debugging.
 cat */_build/tests/testsuite.log
diff --git a/Documentation/intro/install/general.rst 
b/Documentation/intro/install/general.rst
index 1d5323f76..01d545da2 100644
--- a/Documentation/intro/install/general.rst
+++ b/Documentation/intro/install/general.rst
@@ -42,9 +42,9 @@ out.  This is the right branch for general development.
 
 As of now there are no official OVN releases.
 
-Although building OVN, also builds OVS, it is recommended to clone
-and