summaryrefslogtreecommitdiffstats
path: root/recipes-networking/openvswitch
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2013-11-13 13:52:42 -0500
committerBruce Ashfield <bruce.ashfield@windriver.com>2013-11-13 13:52:42 -0500
commit0623683135ae782c206b6fae3782e7c229e78b48 (patch)
tree944d0ac7b5408d7f57cf2b080ff2202d39ca86d1 /recipes-networking/openvswitch
parent8e7d3cc8ae829ee275d0a7209d1cedbeb7d1d5d0 (diff)
downloadmeta-virtualization-0623683135ae782c206b6fae3782e7c229e78b48.tar.gz
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>
Diffstat (limited to 'recipes-networking/openvswitch')
-rw-r--r--recipes-networking/openvswitch/files/openvswitch-add-target-perl-handling.patch33
-rw-r--r--recipes-networking/openvswitch/openvswitch_2.0.0.bb117
2 files changed, 127 insertions, 23 deletions
diff --git a/recipes-networking/openvswitch/files/openvswitch-add-target-perl-handling.patch b/recipes-networking/openvswitch/files/openvswitch-add-target-perl-handling.patch
index 35a3d5b3..98224b42 100644
--- a/recipes-networking/openvswitch/files/openvswitch-add-target-perl-handling.patch
+++ b/recipes-networking/openvswitch/files/openvswitch-add-target-perl-handling.patch
@@ -16,11 +16,11 @@ Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
16 utilities/ovs-parse-leaks.in | 2 +- 16 utilities/ovs-parse-leaks.in | 2 +-
17 3 files changed, 9 insertions(+), 1 deletion(-) 17 3 files changed, 9 insertions(+), 1 deletion(-)
18 18
19diff --git a/Makefile.am b/Makefile.am 19Index: openvswitch-2.0.0/Makefile.am
20index c4f8341..45488f2 100644 20===================================================================
21--- a/Makefile.am 21--- openvswitch-2.0.0.orig/Makefile.am
22+++ b/Makefile.am 22+++ openvswitch-2.0.0/Makefile.am
23@@ -111,6 +111,7 @@ SUFFIXES += .in 23@@ -114,6 +114,7 @@
24 -e 's,[@]LOGDIR[@],$(LOGDIR),g' \ 24 -e 's,[@]LOGDIR[@],$(LOGDIR),g' \
25 -e 's,[@]DBDIR[@],$(DBDIR),g' \ 25 -e 's,[@]DBDIR[@],$(DBDIR),g' \
26 -e 's,[@]PERL[@],$(PERL),g' \ 26 -e 's,[@]PERL[@],$(PERL),g' \
@@ -28,11 +28,11 @@ index c4f8341..45488f2 100644
28 -e 's,[@]PYTHON[@],$(PYTHON),g' \ 28 -e 's,[@]PYTHON[@],$(PYTHON),g' \
29 -e 's,[@]TARGET_PYTHON[@],$(TARGET_PYTHON),g' \ 29 -e 's,[@]TARGET_PYTHON[@],$(TARGET_PYTHON),g' \
30 -e 's,[@]RUNDIR[@],$(RUNDIR),g' \ 30 -e 's,[@]RUNDIR[@],$(RUNDIR),g' \
31diff --git a/configure.ac b/configure.ac 31Index: openvswitch-2.0.0/configure.ac
32index 74cb691..5e39893 100644 32===================================================================
33--- a/configure.ac 33--- openvswitch-2.0.0.orig/configure.ac
34+++ b/configure.ac 34+++ openvswitch-2.0.0/configure.ac
35@@ -101,6 +101,13 @@ AC_ARG_VAR(KARCH, [Kernel Architecture String]) 35@@ -115,6 +115,13 @@
36 AC_SUBST(KARCH) 36 AC_SUBST(KARCH)
37 OVS_CHECK_LINUX 37 OVS_CHECK_LINUX
38 38
@@ -46,16 +46,3 @@ index 74cb691..5e39893 100644
46 if test "$TARGET_PYTHON"; then 46 if test "$TARGET_PYTHON"; then
47 TARGET_PYTHON=$TARGET_PYTHON 47 TARGET_PYTHON=$TARGET_PYTHON
48 else 48 else
49diff --git a/utilities/ovs-parse-leaks.in b/utilities/ovs-parse-leaks.in
50index 72417e5..7c9436c 100755
51--- a/utilities/ovs-parse-leaks.in
52+++ b/utilities/ovs-parse-leaks.in
53@@ -1,4 +1,4 @@
54-#! @PERL@
55+#! @TARGET_PERL@
56
57 # Copyright (c) 2009, 2010 Nicira, Inc.
58 #
59--
601.8.1.2
61
diff --git a/recipes-networking/openvswitch/openvswitch_2.0.0.bb b/recipes-networking/openvswitch/openvswitch_2.0.0.bb
new file mode 100644
index 00000000..cc34cfdb
--- /dev/null
+++ b/recipes-networking/openvswitch/openvswitch_2.0.0.bb
@@ -0,0 +1,117 @@
1SUMMARY = "OpenvSwitch"
2DESCRIPTION = "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)"
3HOMEPAGE = "http://openvswitch.org/"
4SECTION = "networking"
5LICENSE = "Apache-2"
6
7DEPENDS += "bridge-utils openssl python perl"
8
9RDEPENDS_${PN} += "util-linux-uuidgen util-linux-libuuid coreutils \
10 python perl perl-module-strict ${PN}-switch ${PN}-controller"
11RDEPENDS_${PN}-controller = "${PN} lsb ${PN}-pki"
12RDEPENDS_${PN}-switch = "${PN} openssl procps util-linux-uuidgen"
13RDEPENDS_${PN}-pki = "${PN}"
14RDEPENDS_${PN}-brcompat = "${PN} ${PN}-switch"
15RRECOMMENDS_${PN} += "kernel-module-openvswitch"
16
17# Some installers will fail because of an install order based on
18# rdeps. E.g. ovs-pki calls sed in the postinstall. sed may be
19# queued for install later.
20RDEPENDS_${PN} += "sed gawk grep"
21
22SRC_URI = "http://openvswitch.org/releases/openvswitch-${PV}.tar.gz \
23 file://openvswitch-switch \
24 file://openvswitch-switch-setup \
25 file://openvswitch-controller \
26 file://openvswitch-controller-setup \
27 file://openvswitch-add-target-python-handling.patch \
28 file://openvswitch-add-target-perl-handling.patch \
29 "
30
31SRC_URI[md5sum] = "7d7a58350e634e515e0fe43c64d64f44"
32SRC_URI[sha256sum] = "5060e2be69cce01c15f67b481482cb1a0eaa6ef5cbdbed592bac3c3ab2a390f8"
33
34LIC_FILES_CHKSUM = "file://COPYING;md5=49eeb5acb1f5e510f12c44f176c42253"
35
36# Don't compile kernel modules by default since it heavily depends on
37# kernel version. Use the in-kernel module for now.
38# distro layers can enable with EXTRA_OECONF_pn_openvswitch += ""
39# EXTRA_OECONF = "--with-linux=${STAGING_KERNEL_DIR} KARCH=${TARGET_ARCH}"
40
41EXTRA_OECONF += "TARGET_PYTHON=${bindir}/python \
42 TARGET_PERL=${bindir}/perl \
43 "
44
45ALLOW_EMPTY_${PN}-pki = "1"
46PACKAGES =+ "${PN}-controller ${PN}-switch ${PN}-brcompat ${PN}-pki"
47
48FILES_${PN}-controller = "${sysconfdir}/init.d/openvswitch-controller \
49 ${sysconfdir}/default/openvswitch-controller \
50 ${sysconfdir}/openvswitch-controller \
51 ${bindir}/ovs-controller"
52
53FILES_${PN}-brcompat = "${sbindir}/ovs-brcompatd"
54
55FILES_${PN}-switch = "${sysconfdir}/init.d/openvswitch-switch \
56 ${sysconfdir}/default/openvswitch-switch \
57 "
58# silence a warning
59FILES_${PN} += "${datadir}/ovsdbmonitor"
60FILES_${PN} += "/run"
61
62inherit autotools update-rc.d
63
64INITSCRIPT_PACKAGES = "${PN}-switch ${PN}-controller"
65INITSCRIPT_NAME_${PN}-switch = "openvswitch-switch"
66INITSCRIPT_PARAMS_${PN}-switch = "defaults 71"
67
68INITSCRIPT_NAME_${PN}-controller = "openvswitch-controller"
69INITSCRIPT_PARAMS_${PN}-controller = "defaults 72"
70
71do_install_append() {
72 install -d ${D}/${sysconfdir}/default/
73 install -m 660 ${WORKDIR}/openvswitch-switch-setup ${D}/${sysconfdir}/default/openvswitch-switch
74 install -d ${D}/${sysconfdir}/openvswitch-controller
75 install -m 660 ${WORKDIR}/openvswitch-controller-setup ${D}/${sysconfdir}/default/openvswitch-controller
76
77 install -d ${D}/${sysconfdir}/init.d/
78 install -m 755 ${WORKDIR}/openvswitch-controller ${D}/${sysconfdir}/init.d/openvswitch-controller
79 install -m 755 ${WORKDIR}/openvswitch-switch ${D}/${sysconfdir}/init.d/openvswitch-switch
80 true || rm -fr ${D}/${datadir}/${PN}/pki
81}
82
83pkg_postinst_${PN}-pki () {
84 # can't do this offline
85 if [ "x$D" != "x" ]; then
86 exit 1
87 fi
88 if test ! -d $D/${datadir}/${PN}/pki; then
89 ovs-pki init --dir=$D/${datadir}/${PN}/pki
90 fi
91}
92
93pkg_postinst_${PN}-controller () {
94 # can't do this offline
95 if [ "x$D" != "x" ]; then
96 exit 1
97 fi
98
99 if test ! -d $D/${datadir}/${PN}/pki; then
100 ovs-pki init --dir=$D/${datadir}/${PN}/pki
101 fi
102
103 cd $D/${sysconfdir}/openvswitch-controller
104 if ! test -e cacert.pem; then
105 ln -s $D/${datadir}/${PN}/pki/switchca/cacert.pem cacert.pem
106 fi
107 if ! test -e privkey.pem || ! test -e cert.pem; then
108 oldumask=$(umask)
109 umask 077
110 ovs-pki req+sign --dir=$D/${datadir}/${PN}/pki tmp controller >/dev/null
111 mv tmp-privkey.pem privkey.pem
112 mv tmp-cert.pem cert.pem
113 mv tmp-req.pem req.pem
114 chmod go+r cert.pem req.pem
115 umask $oldumask
116 fi
117}