ovs: uprev to 2.0.0

We update to the latest 2.0 OVS, but we'll keep the existed (better tested)
version around until this proves to be stable.

As part of this update the openvswitch-add-target-perl-handling.patch has
been refreshed, since one of the scripts it patched is no longer part
of the package.

Finally, we drop PR from the recipe as part of the larger move to PRSERVER
based revision numbers.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
This commit is contained in:
Bruce Ashfield 2013-11-13 13:52:42 -05:00
parent 8e7d3cc8ae
commit 0623683135
2 changed files with 127 additions and 23 deletions

View File

@ -16,11 +16,11 @@ Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
utilities/ovs-parse-leaks.in | 2 +-
3 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index c4f8341..45488f2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -111,6 +111,7 @@ SUFFIXES += .in
Index: openvswitch-2.0.0/Makefile.am
===================================================================
--- openvswitch-2.0.0.orig/Makefile.am
+++ openvswitch-2.0.0/Makefile.am
@@ -114,6 +114,7 @@
-e 's,[@]LOGDIR[@],$(LOGDIR),g' \
-e 's,[@]DBDIR[@],$(DBDIR),g' \
-e 's,[@]PERL[@],$(PERL),g' \
@ -28,11 +28,11 @@ index c4f8341..45488f2 100644
-e 's,[@]PYTHON[@],$(PYTHON),g' \
-e 's,[@]TARGET_PYTHON[@],$(TARGET_PYTHON),g' \
-e 's,[@]RUNDIR[@],$(RUNDIR),g' \
diff --git a/configure.ac b/configure.ac
index 74cb691..5e39893 100644
--- a/configure.ac
+++ b/configure.ac
@@ -101,6 +101,13 @@ AC_ARG_VAR(KARCH, [Kernel Architecture String])
Index: openvswitch-2.0.0/configure.ac
===================================================================
--- openvswitch-2.0.0.orig/configure.ac
+++ openvswitch-2.0.0/configure.ac
@@ -115,6 +115,13 @@
AC_SUBST(KARCH)
OVS_CHECK_LINUX
@ -46,16 +46,3 @@ index 74cb691..5e39893 100644
if test "$TARGET_PYTHON"; then
TARGET_PYTHON=$TARGET_PYTHON
else
diff --git a/utilities/ovs-parse-leaks.in b/utilities/ovs-parse-leaks.in
index 72417e5..7c9436c 100755
--- a/utilities/ovs-parse-leaks.in
+++ b/utilities/ovs-parse-leaks.in
@@ -1,4 +1,4 @@
-#! @PERL@
+#! @TARGET_PERL@
# Copyright (c) 2009, 2010 Nicira, Inc.
#
--
1.8.1.2

View File

@ -0,0 +1,117 @@
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"
# 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 \
"
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
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
}