From a82acb5d0ce339eb928a4810cbfe4c8804f42354 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Wed, 14 May 2014 18:25:59 -0400 Subject: openvswitch: uprev to v2.1.2 Updating to the latest OVS 2.x. Only minor patch refreshes required, and no regressions were found during sanity testing. Signed-off-by: Bruce Ashfield --- .../openvswitch/files/openvswitch-add-ptest.patch | 17 +-- .../openvswitch-add-target-python-handling.patch | 103 +++++++--------- .../openvswitch/openvswitch_2.0.0.bb | 130 --------------------- .../openvswitch/openvswitch_2.1.2.bb | 130 +++++++++++++++++++++ 4 files changed, 184 insertions(+), 196 deletions(-) delete mode 100644 recipes-networking/openvswitch/openvswitch_2.0.0.bb create mode 100644 recipes-networking/openvswitch/openvswitch_2.1.2.bb (limited to 'recipes-networking') diff --git a/recipes-networking/openvswitch/files/openvswitch-add-ptest.patch b/recipes-networking/openvswitch/files/openvswitch-add-ptest.patch index aebb1823..cb708dea 100644 --- a/recipes-networking/openvswitch/files/openvswitch-add-ptest.patch +++ b/recipes-networking/openvswitch/files/openvswitch-add-ptest.patch @@ -2,19 +2,20 @@ Add test-install rule to support ptest execution Signed-off-by: Radu Patriu -Index: ovs/Makefile.am +Index: openvswitch-2.1.2/Makefile.am =================================================================== ---- ovs.orig/Makefile.am 2014-03-10 16:19:46.000000000 +0200 -+++ ovs/Makefile.am 2014-03-10 16:23:10.481075341 +0200 -@@ -276,3 +276,4 @@ - include python/automake.mk +--- openvswitch-2.1.2.orig/Makefile.am ++++ openvswitch-2.1.2/Makefile.am +@@ -300,3 +300,5 @@ include python/compat/automake.mk include tutorial/automake.mk + include vtep/automake.mk +include test.mk -Index: ovs/test.mk ++ +Index: openvswitch-2.1.2/test.mk =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ ovs/test.mk 2014-03-10 16:42:41.000000000 +0200 +--- /dev/null ++++ openvswitch-2.1.2/test.mk @@ -0,0 +1,49 @@ +TEST_DEST ?= ${prefix}/lib/openvswitch +TEST_ROOT ?= ${prefix}/lib/openvswitch diff --git a/recipes-networking/openvswitch/files/openvswitch-add-target-python-handling.patch b/recipes-networking/openvswitch/files/openvswitch-add-target-python-handling.patch index 59607dad..97b352cb 100644 --- a/recipes-networking/openvswitch/files/openvswitch-add-target-python-handling.patch +++ b/recipes-networking/openvswitch/files/openvswitch-add-target-python-handling.patch @@ -24,11 +24,11 @@ Signed-off-by: Mark Asselstine utilities/ovs-vlan-test.in | 2 +- 11 files changed, 17 insertions(+), 9 deletions(-) -diff --git a/Makefile.am b/Makefile.am -index b71ca1f..c4f8341 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -112,6 +112,7 @@ SUFFIXES += .in +Index: openvswitch-2.1.2/Makefile.am +=================================================================== +--- openvswitch-2.1.2.orig/Makefile.am ++++ openvswitch-2.1.2/Makefile.am +@@ -125,6 +125,7 @@ -e 's,[@]DBDIR[@],$(DBDIR),g' \ -e 's,[@]PERL[@],$(PERL),g' \ -e 's,[@]PYTHON[@],$(PYTHON),g' \ @@ -36,11 +36,11 @@ index b71ca1f..c4f8341 100644 -e 's,[@]RUNDIR[@],$(RUNDIR),g' \ -e 's,[@]VERSION[@],$(VERSION),g' \ -e 's,[@]localstatedir[@],$(localstatedir),g' \ -diff --git a/configure.ac b/configure.ac -index 060b53f..74cb691 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -101,6 +101,13 @@ AC_ARG_VAR(KARCH, [Kernel Architecture String]) +Index: openvswitch-2.1.2/configure.ac +=================================================================== +--- openvswitch-2.1.2.orig/configure.ac ++++ openvswitch-2.1.2/configure.ac +@@ -118,6 +118,13 @@ AC_SUBST(KARCH) OVS_CHECK_LINUX @@ -51,99 +51,86 @@ index 060b53f..74cb691 100644 +fi +AC_SUBST(TARGET_PYTHON) + - AC_CONFIG_FILES([Makefile - datapath/Makefile - datapath/linux/Kbuild -diff --git a/ovsdb/ovsdbmonitor/ovsdbmonitor.in b/ovsdb/ovsdbmonitor/ovsdbmonitor.in -index e26130a..aaf1aff 100755 ---- a/ovsdb/ovsdbmonitor/ovsdbmonitor.in -+++ b/ovsdb/ovsdbmonitor/ovsdbmonitor.in -@@ -1,4 +1,4 @@ --#! @PYTHON@ -+#! @TARGET_PYTHON@ - # Copyright (c) 2010 Citrix Systems, Inc. - # - # Licensed under the Apache License, Version 2.0 (the "License"); -diff --git a/utilities/bugtool/ovs-bugtool.in b/utilities/bugtool/ovs-bugtool.in -index 2074e23..525939e 100755 ---- a/utilities/bugtool/ovs-bugtool.in -+++ b/utilities/bugtool/ovs-bugtool.in + AC_CONFIG_FILES(Makefile) + AC_CONFIG_FILES(datapath/Makefile) + AC_CONFIG_FILES(datapath/linux/Kbuild) +Index: openvswitch-2.1.2/utilities/bugtool/ovs-bugtool.in +=================================================================== +--- openvswitch-2.1.2.orig/utilities/bugtool/ovs-bugtool.in ++++ openvswitch-2.1.2/utilities/bugtool/ovs-bugtool.in @@ -1,4 +1,4 @@ -#! @PYTHON@ +#! @TARGET_PYTHON@ # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public -diff --git a/utilities/ovs-check-dead-ifs.in b/utilities/ovs-check-dead-ifs.in -index 9b806ed..b6f6fcb 100755 ---- a/utilities/ovs-check-dead-ifs.in -+++ b/utilities/ovs-check-dead-ifs.in +Index: openvswitch-2.1.2/utilities/ovs-check-dead-ifs.in +=================================================================== +--- openvswitch-2.1.2.orig/utilities/ovs-check-dead-ifs.in ++++ openvswitch-2.1.2/utilities/ovs-check-dead-ifs.in @@ -1,4 +1,4 @@ -#! @PYTHON@ +#! @TARGET_PYTHON@ import os import re -diff --git a/utilities/ovs-l3ping.in b/utilities/ovs-l3ping.in -index 1b07972..4fedb6f 100644 ---- a/utilities/ovs-l3ping.in -+++ b/utilities/ovs-l3ping.in +Index: openvswitch-2.1.2/utilities/ovs-l3ping.in +=================================================================== +--- openvswitch-2.1.2.orig/utilities/ovs-l3ping.in ++++ openvswitch-2.1.2/utilities/ovs-l3ping.in @@ -1,4 +1,4 @@ -#! @PYTHON@ +#! @TARGET_PYTHON@ # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -diff --git a/utilities/ovs-parse-backtrace.in b/utilities/ovs-parse-backtrace.in -index 4f793be..4a07f47 100755 ---- a/utilities/ovs-parse-backtrace.in -+++ b/utilities/ovs-parse-backtrace.in +Index: openvswitch-2.1.2/utilities/ovs-parse-backtrace.in +=================================================================== +--- openvswitch-2.1.2.orig/utilities/ovs-parse-backtrace.in ++++ openvswitch-2.1.2/utilities/ovs-parse-backtrace.in @@ -1,4 +1,4 @@ -#! @PYTHON@ +#! @TARGET_PYTHON@ # # Copyright (c) 2012 Nicira, Inc. # -diff --git a/utilities/ovs-pcap.in b/utilities/ovs-pcap.in -index 5306480..3221c7c 100755 ---- a/utilities/ovs-pcap.in -+++ b/utilities/ovs-pcap.in +Index: openvswitch-2.1.2/utilities/ovs-pcap.in +=================================================================== +--- openvswitch-2.1.2.orig/utilities/ovs-pcap.in ++++ openvswitch-2.1.2/utilities/ovs-pcap.in @@ -1,4 +1,4 @@ -#! @PYTHON@ +#! @TARGET_PYTHON@ # # Copyright (c) 2010 Nicira, Inc. # -diff --git a/utilities/ovs-tcpundump.in b/utilities/ovs-tcpundump.in -index 0268c50..dad0bb5 100755 ---- a/utilities/ovs-tcpundump.in -+++ b/utilities/ovs-tcpundump.in +Index: openvswitch-2.1.2/utilities/ovs-tcpundump.in +=================================================================== +--- openvswitch-2.1.2.orig/utilities/ovs-tcpundump.in ++++ openvswitch-2.1.2/utilities/ovs-tcpundump.in @@ -1,4 +1,4 @@ -#! @PYTHON@ +#! @TARGET_PYTHON@ # # Copyright (c) 2010 Nicira, Inc. # -diff --git a/utilities/ovs-test.in b/utilities/ovs-test.in -index fb1f9ad..bddd327 100644 ---- a/utilities/ovs-test.in -+++ b/utilities/ovs-test.in +Index: openvswitch-2.1.2/utilities/ovs-test.in +=================================================================== +--- openvswitch-2.1.2.orig/utilities/ovs-test.in ++++ openvswitch-2.1.2/utilities/ovs-test.in @@ -1,4 +1,4 @@ -#! @PYTHON@ +#! @TARGET_PYTHON@ # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. -diff --git a/utilities/ovs-vlan-test.in b/utilities/ovs-vlan-test.in -index e229498..da64040 100755 ---- a/utilities/ovs-vlan-test.in -+++ b/utilities/ovs-vlan-test.in +Index: openvswitch-2.1.2/utilities/ovs-vlan-test.in +=================================================================== +--- openvswitch-2.1.2.orig/utilities/ovs-vlan-test.in ++++ openvswitch-2.1.2/utilities/ovs-vlan-test.in @@ -1,4 +1,4 @@ -#! @PYTHON@ +#! @TARGET_PYTHON@ # # Copyright (c) 2010 Nicira, Inc. # --- -1.8.1.2 - diff --git a/recipes-networking/openvswitch/openvswitch_2.0.0.bb b/recipes-networking/openvswitch/openvswitch_2.0.0.bb deleted file mode 100644 index 01003082..00000000 --- a/recipes-networking/openvswitch/openvswitch_2.0.0.bb +++ /dev/null @@ -1,130 +0,0 @@ -SUMMARY = "OpenvSwitch" -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, SPAN, RSPAN, CLI, LACP, 802.1ag)" -HOMEPAGE = "http://openvswitch.org/" -SECTION = "networking" -LICENSE = "Apache-2" - -DEPENDS += "bridge-utils openssl python perl" - -RDEPENDS_${PN} += "util-linux-uuidgen util-linux-libuuid coreutils \ - python perl perl-module-strict ${PN}-switch ${PN}-controller" -RDEPENDS_${PN}-controller = "${PN} lsb ${PN}-pki" -RDEPENDS_${PN}-switch = "${PN} openssl procps util-linux-uuidgen" -RDEPENDS_${PN}-pki = "${PN}" -RDEPENDS_${PN}-brcompat = "${PN} ${PN}-switch" -RRECOMMENDS_${PN} += "kernel-module-openvswitch" - -RDEPENDS_${PN}-ptest += "python-logging python-syslog python-argparse python-io \ - python-fcntl python-shell python-lang python-xml python-math \ - python-datetime python-netclient python sed" - -# Some installers will fail because of an install order based on -# rdeps. E.g. ovs-pki calls sed in the postinstall. sed may be -# queued for install later. -RDEPENDS_${PN} += "sed gawk grep" - -SRC_URI = "http://openvswitch.org/releases/openvswitch-${PV}.tar.gz \ - file://openvswitch-switch \ - file://openvswitch-switch-setup \ - file://openvswitch-controller \ - file://openvswitch-controller-setup \ - file://openvswitch-add-target-python-handling.patch \ - file://openvswitch-add-target-perl-handling.patch \ - file://openvswitch-add-more-target-python-substitutions.patch \ - file://openvswitch-add-ptest.patch \ - file://run-ptest \ - " - -SRC_URI[md5sum] = "7d7a58350e634e515e0fe43c64d64f44" -SRC_URI[sha256sum] = "5060e2be69cce01c15f67b481482cb1a0eaa6ef5cbdbed592bac3c3ab2a390f8" - -LIC_FILES_CHKSUM = "file://COPYING;md5=49eeb5acb1f5e510f12c44f176c42253" - -# Don't compile kernel modules by default since it heavily depends on -# kernel version. Use the in-kernel module for now. -# distro layers can enable with EXTRA_OECONF_pn_openvswitch += "" -# EXTRA_OECONF = "--with-linux=${STAGING_KERNEL_DIR} KARCH=${TARGET_ARCH}" - -EXTRA_OECONF += "TARGET_PYTHON=${bindir}/python \ - TARGET_PERL=${bindir}/perl \ - " - -ALLOW_EMPTY_${PN}-pki = "1" -PACKAGES =+ "${PN}-controller ${PN}-switch ${PN}-brcompat ${PN}-pki" - -FILES_${PN}-controller = "${sysconfdir}/init.d/openvswitch-controller \ - ${sysconfdir}/default/openvswitch-controller \ - ${sysconfdir}/openvswitch-controller \ - ${bindir}/ovs-controller" - -FILES_${PN}-brcompat = "${sbindir}/ovs-brcompatd" - -FILES_${PN}-switch = "${sysconfdir}/init.d/openvswitch-switch \ - ${sysconfdir}/default/openvswitch-switch \ - " -# silence a warning -FILES_${PN} += "${datadir}/ovsdbmonitor" -FILES_${PN} += "/run" - -inherit autotools update-rc.d ptest - -EXTRA_OEMAKE += "TEST_DEST=${D}${PTEST_PATH} TEST_ROOT=${PTEST_PATH}" - -do_install_ptest() { - oe_runmake test-install -} - -INITSCRIPT_PACKAGES = "${PN}-switch ${PN}-controller" -INITSCRIPT_NAME_${PN}-switch = "openvswitch-switch" -INITSCRIPT_PARAMS_${PN}-switch = "defaults 71" - -INITSCRIPT_NAME_${PN}-controller = "openvswitch-controller" -INITSCRIPT_PARAMS_${PN}-controller = "defaults 72" - -do_install_append() { - install -d ${D}/${sysconfdir}/default/ - install -m 660 ${WORKDIR}/openvswitch-switch-setup ${D}/${sysconfdir}/default/openvswitch-switch - install -d ${D}/${sysconfdir}/openvswitch-controller - install -m 660 ${WORKDIR}/openvswitch-controller-setup ${D}/${sysconfdir}/default/openvswitch-controller - - install -d ${D}/${sysconfdir}/init.d/ - install -m 755 ${WORKDIR}/openvswitch-controller ${D}/${sysconfdir}/init.d/openvswitch-controller - install -m 755 ${WORKDIR}/openvswitch-switch ${D}/${sysconfdir}/init.d/openvswitch-switch - true || rm -fr ${D}/${datadir}/${PN}/pki -} - -pkg_postinst_${PN}-pki () { - # can't do this offline - if [ "x$D" != "x" ]; then - exit 1 - fi - if test ! -d $D/${datadir}/${PN}/pki; then - ovs-pki init --dir=$D/${datadir}/${PN}/pki - fi -} - -pkg_postinst_${PN}-controller () { - # can't do this offline - if [ "x$D" != "x" ]; then - exit 1 - fi - - if test ! -d $D/${datadir}/${PN}/pki; then - ovs-pki init --dir=$D/${datadir}/${PN}/pki - fi - - cd $D/${sysconfdir}/openvswitch-controller - if ! test -e cacert.pem; then - ln -s $D/${datadir}/${PN}/pki/switchca/cacert.pem cacert.pem - fi - if ! test -e privkey.pem || ! test -e cert.pem; then - oldumask=$(umask) - umask 077 - ovs-pki req+sign --dir=$D/${datadir}/${PN}/pki tmp controller >/dev/null - mv tmp-privkey.pem privkey.pem - mv tmp-cert.pem cert.pem - mv tmp-req.pem req.pem - chmod go+r cert.pem req.pem - umask $oldumask - fi -} diff --git a/recipes-networking/openvswitch/openvswitch_2.1.2.bb b/recipes-networking/openvswitch/openvswitch_2.1.2.bb new file mode 100644 index 00000000..3f092afb --- /dev/null +++ b/recipes-networking/openvswitch/openvswitch_2.1.2.bb @@ -0,0 +1,130 @@ +SUMMARY = "OpenvSwitch" +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, SPAN, RSPAN, CLI, LACP, 802.1ag)" +HOMEPAGE = "http://openvswitch.org/" +SECTION = "networking" +LICENSE = "Apache-2" + +DEPENDS += "bridge-utils openssl python perl" + +RDEPENDS_${PN} += "util-linux-uuidgen util-linux-libuuid coreutils \ + python perl perl-module-strict ${PN}-switch ${PN}-controller" +RDEPENDS_${PN}-controller = "${PN} lsb ${PN}-pki" +RDEPENDS_${PN}-switch = "${PN} openssl procps util-linux-uuidgen" +RDEPENDS_${PN}-pki = "${PN}" +RDEPENDS_${PN}-brcompat = "${PN} ${PN}-switch" +RRECOMMENDS_${PN} += "kernel-module-openvswitch" + +RDEPENDS_${PN}-ptest += "python-logging python-syslog python-argparse python-io \ + python-fcntl python-shell python-lang python-xml python-math \ + python-datetime python-netclient python sed" + +# Some installers will fail because of an install order based on +# rdeps. E.g. ovs-pki calls sed in the postinstall. sed may be +# queued for install later. +RDEPENDS_${PN} += "sed gawk grep" + +SRC_URI = "http://openvswitch.org/releases/openvswitch-${PV}.tar.gz \ + file://openvswitch-switch \ + file://openvswitch-switch-setup \ + file://openvswitch-controller \ + file://openvswitch-controller-setup \ + file://openvswitch-add-target-python-handling.patch \ + file://openvswitch-add-target-perl-handling.patch \ + file://openvswitch-add-more-target-python-substitutions.patch \ + file://openvswitch-add-ptest.patch \ + file://run-ptest \ + " + +SRC_URI[md5sum] = "430ff6d1e1fc81e9c5ebc2e641cfc953" +SRC_URI[sha256sum] = "875429b052c4001815b6cb38616c7a6cb212df4bba74602164ee0a99b172079b" + +LIC_FILES_CHKSUM = "file://COPYING;md5=e03b0d9c4115c44518594e5618e653f8" + +# Don't compile kernel modules by default since it heavily depends on +# kernel version. Use the in-kernel module for now. +# distro layers can enable with EXTRA_OECONF_pn_openvswitch += "" +# EXTRA_OECONF = "--with-linux=${STAGING_KERNEL_DIR} KARCH=${TARGET_ARCH}" + +EXTRA_OECONF += "TARGET_PYTHON=${bindir}/python \ + TARGET_PERL=${bindir}/perl \ + " + +ALLOW_EMPTY_${PN}-pki = "1" +PACKAGES =+ "${PN}-controller ${PN}-switch ${PN}-brcompat ${PN}-pki" + +FILES_${PN}-controller = "${sysconfdir}/init.d/openvswitch-controller \ + ${sysconfdir}/default/openvswitch-controller \ + ${sysconfdir}/openvswitch-controller \ + ${bindir}/ovs-controller" + +FILES_${PN}-brcompat = "${sbindir}/ovs-brcompatd" + +FILES_${PN}-switch = "${sysconfdir}/init.d/openvswitch-switch \ + ${sysconfdir}/default/openvswitch-switch \ + " +# silence a warning +FILES_${PN} += "${datadir}/ovsdbmonitor" +FILES_${PN} += "/run" + +inherit autotools update-rc.d ptest + +EXTRA_OEMAKE += "TEST_DEST=${D}${PTEST_PATH} TEST_ROOT=${PTEST_PATH}" + +do_install_ptest() { + oe_runmake test-install +} + +INITSCRIPT_PACKAGES = "${PN}-switch ${PN}-controller" +INITSCRIPT_NAME_${PN}-switch = "openvswitch-switch" +INITSCRIPT_PARAMS_${PN}-switch = "defaults 71" + +INITSCRIPT_NAME_${PN}-controller = "openvswitch-controller" +INITSCRIPT_PARAMS_${PN}-controller = "defaults 72" + +do_install_append() { + install -d ${D}/${sysconfdir}/default/ + install -m 660 ${WORKDIR}/openvswitch-switch-setup ${D}/${sysconfdir}/default/openvswitch-switch + install -d ${D}/${sysconfdir}/openvswitch-controller + install -m 660 ${WORKDIR}/openvswitch-controller-setup ${D}/${sysconfdir}/default/openvswitch-controller + + install -d ${D}/${sysconfdir}/init.d/ + install -m 755 ${WORKDIR}/openvswitch-controller ${D}/${sysconfdir}/init.d/openvswitch-controller + install -m 755 ${WORKDIR}/openvswitch-switch ${D}/${sysconfdir}/init.d/openvswitch-switch + true || rm -fr ${D}/${datadir}/${PN}/pki +} + +pkg_postinst_${PN}-pki () { + # can't do this offline + if [ "x$D" != "x" ]; then + exit 1 + fi + if test ! -d $D/${datadir}/${PN}/pki; then + ovs-pki init --dir=$D/${datadir}/${PN}/pki + fi +} + +pkg_postinst_${PN}-controller () { + # can't do this offline + if [ "x$D" != "x" ]; then + exit 1 + fi + + if test ! -d $D/${datadir}/${PN}/pki; then + ovs-pki init --dir=$D/${datadir}/${PN}/pki + fi + + cd $D/${sysconfdir}/openvswitch-controller + if ! test -e cacert.pem; then + ln -s $D/${datadir}/${PN}/pki/switchca/cacert.pem cacert.pem + fi + if ! test -e privkey.pem || ! test -e cert.pem; then + oldumask=$(umask) + umask 077 + ovs-pki req+sign --dir=$D/${datadir}/${PN}/pki tmp controller >/dev/null + mv tmp-privkey.pem privkey.pem + mv tmp-cert.pem cert.pem + mv tmp-req.pem req.pem + chmod go+r cert.pem req.pem + umask $oldumask + fi +} -- cgit v1.2.3-54-g00ecf