All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Uprev openvswitch
@ 2015-01-30 17:35 Amy Fong
  2015-01-30 17:36 ` [PATCH 1/2] Package openvswitch git Amy Fong
  2015-01-30 17:36 ` [PATCH 2/2] openvswitch restructure recipes Amy Fong
  0 siblings, 2 replies; 4+ messages in thread
From: Amy Fong @ 2015-01-30 17:35 UTC (permalink / raw)
  To: meta-virtualization

The following two patches uprevs openvswitch to a version in git (2.3.90, 
1667bb34988358aaf1c92d0d21fad4b1c8698780). This version also enables configuring
with dpdk in PACKAGECONFIG, and it builds the kernel module included in ovs.

The second patch restructures the openvswitch recipes into a openvswitch.inc file
and the associated bb recipe files, removing the shared code from the bb files.

Amy



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] Package openvswitch git
  2015-01-30 17:35 [PATCH 0/2] Uprev openvswitch Amy Fong
@ 2015-01-30 17:36 ` Amy Fong
  2015-01-30 17:36 ` [PATCH 2/2] openvswitch restructure recipes Amy Fong
  1 sibling, 0 replies; 4+ messages in thread
From: Amy Fong @ 2015-01-30 17:36 UTC (permalink / raw)
  To: meta-virtualization

From 52c210a8d61f9aacb2630197e984efafd54d96f3 Mon Sep 17 00:00:00 2001
From: Amy Fong <amy.fong@windriver.com>
Date: Thu, 29 Jan 2015 09:56:03 -0500
Subject: [PATCH 1/2] Package openvswitch git

This revision corresponds to git rev 1667bb34988358aaf1c92d0d21fad4b1c8698780
(based on 2.3.90)

Signed-off-by: Amy Fong <amy.fong@windriver.com>
---
 .../openvswitch-git/disable_m4_check.patch         |  18 +++
 .../openvswitch-git/kernel_module.patch            |  20 +++
 .../non_reproducible_builds_cleanup.patch          |  18 +++
 ...-1667bb34988358aaf1c92d0d21fad4b1c8698780.patch |  69 ++++++++++
 recipes-networking/openvswitch/openvswitch_git.bb  | 143 +++++++++++++++++++++
 5 files changed, 268 insertions(+)
 create mode 100644 recipes-networking/openvswitch/openvswitch-git/disable_m4_check.patch
 create mode 100644 recipes-networking/openvswitch/openvswitch-git/kernel_module.patch
 create mode 100644 recipes-networking/openvswitch/openvswitch-git/non_reproducible_builds_cleanup.patch
 create mode 100644 recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-1667bb34988358aaf1c92d0d21fad4b1c8698780.patch
 create mode 100644 recipes-networking/openvswitch/openvswitch_git.bb

diff --git a/recipes-networking/openvswitch/openvswitch-git/disable_m4_check.patch b/recipes-networking/openvswitch/openvswitch-git/disable_m4_check.patch
new file mode 100644
index 0000000..1ad5d6f
--- /dev/null
+++ b/recipes-networking/openvswitch/openvswitch-git/disable_m4_check.patch
@@ -0,0 +1,18 @@
+Disable m4 file test where sources are built from git.
+
+Signed-off-by: Amy Fong <amy.fong@windriver.com>
+---
+ Makefile.am |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -185,7 +185,7 @@
+ # Makefile in datapath/linux, needed to get the list of files to
+ # distribute, requires GNU make extensions.
+ if GNU_MAKE
+-ALL_LOCAL += dist-hook-git
++# ALL_LOCAL += dist-hook-git
+ dist-hook-git: distfiles
+ 	@if test -e $(srcdir)/.git && (git --version) >/dev/null 2>&1; then \
+ 	  (cd datapath && $(MAKE) distfiles);				    \
diff --git a/recipes-networking/openvswitch/openvswitch-git/kernel_module.patch b/recipes-networking/openvswitch/openvswitch-git/kernel_module.patch
new file mode 100644
index 0000000..033cfb8
--- /dev/null
+++ b/recipes-networking/openvswitch/openvswitch-git/kernel_module.patch
@@ -0,0 +1,20 @@
+Specify install path for kernel module
+
+Signed-off-by: Amy Fong <amy.fong@windriver.com>
+---
+ datapath/linux/Makefile.main.in |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/datapath/linux/Makefile.main.in
++++ b/datapath/linux/Makefile.main.in
+@@ -71,8 +71,8 @@
+ 	$(MAKE) -C $(KSRC) M=$(builddir) modules
+ 
+ modules_install:
+-	$(MAKE) -C $(KSRC) M=$(builddir) modules_install
+-	depmod `sed -n 's/#define UTS_RELEASE "\([^"]*\)"/\1/p' $(KSRC)/include/generated/utsrelease.h`
++	$(MAKE) -C $(KSRC) M=$(builddir) modules_install INSTALL_MOD_PATH=${INSTALL_MOD_PATH}
++	# depmod `sed -n 's/#define UTS_RELEASE "\([^"]*\)"/\1/p' $(KSRC)/include/generated/utsrelease.h`
+ endif
+ 
+ # Much of the kernel build system in this file is derived from Intel's
diff --git a/recipes-networking/openvswitch/openvswitch-git/non_reproducible_builds_cleanup.patch b/recipes-networking/openvswitch/openvswitch-git/non_reproducible_builds_cleanup.patch
new file mode 100644
index 0000000..999f2ea
--- /dev/null
+++ b/recipes-networking/openvswitch/openvswitch-git/non_reproducible_builds_cleanup.patch
@@ -0,0 +1,18 @@
+Remove __DATE__, __TIME__ - error messages on non-reproducible builds
+
+Signed-off-by: Amy Fong <amy.fong@windriver.com>
+---
+ datapath/datapath.c             |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+--- a/datapath/datapath.c
++++ b/datapath/datapath.c
+@@ -2142,7 +2142,7 @@
+ 
+ 	BUILD_BUG_ON(sizeof(struct ovs_skb_cb) > FIELD_SIZEOF(struct sk_buff, cb));
+ 
+-	pr_info("Open vSwitch switching datapath %s, built "__DATE__" "__TIME__"\n",
++	pr_info("Open vSwitch switching datapath %s\n",
+ 		VERSION);
+ 
+ 	err = action_fifos_init();
diff --git a/recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-1667bb34988358aaf1c92d0d21fad4b1c8698780.patch b/recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-1667bb34988358aaf1c92d0d21fad4b1c8698780.patch
new file mode 100644
index 0000000..76e312c
--- /dev/null
+++ b/recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-1667bb34988358aaf1c92d0d21fad4b1c8698780.patch
@@ -0,0 +1,69 @@
+Add test-install rule to support ptest execution
+
+Signed-off-by: Radu Patriu <radu.patriu@enea.com>
+
+---
+ Makefile.am |    2 ++
+ test.mk     |   49 +++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 51 insertions(+)
+
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -369,3 +369,5 @@
+ include vtep/automake.mk
+ include datapath-windows/automake.mk
+ include datapath-windows/include/automake.mk
++include test.mk
++
+--- /dev/null
++++ b/test.mk
+@@ -0,0 +1,49 @@
++TEST_DEST ?= ${prefix}/lib/openvswitch
++TEST_ROOT ?= ${prefix}/lib/openvswitch
++TEST_DEPEND =
++
++if HAVE_OPENSSL
++TEST_DEPEND += $(TESTPKI_FILES)
++endif
++
++test-install: $(TEST_DEPEND)
++	@list='$(noinst_PROGRAMS) $(EXTRA_DIST) $(dist_check_SCRIPTS) $(TEST_DEPEND) tests/atlocal tests/atconfig' ;\
++	install -d $(TEST_DEST)/tests ;\
++	install -d $(TEST_DEST)/python ;\
++	install -d $(TEST_DEST)/python/ovs ;\
++	install -d $(TEST_DEST)/python/ovs/db ;\
++	install -d $(TEST_DEST)/python/ovs/unixctl ;\
++	install -d $(TEST_DEST)/vswitchd ;\
++	install vswitchd/vswitch.ovsschema $(TEST_DEST)/vswitchd ;\
++	install -d $(TEST_DEST)/debian ;\
++	install debian/ovs-monitor-ipsec $(TEST_DEST)/debian ;\
++	install -d $(TEST_DEST)/build-aux ;\
++	install build-aux/check-structs $(TEST_DEST)/build-aux ;\
++	install -d $(TEST_DEST)/xenserver ;\
++	install xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync $(TEST_DEST)/xenserver ;\
++	install xenserver/opt_xensource_libexec_interface-reconfigure $(TEST_DEST)/xenserver ;\
++	install xenserver/opt_xensource_libexec_InterfaceReconfigure.py $(TEST_DEST)/xenserver ;\
++	install xenserver/opt_xensource_libexec_InterfaceReconfigureBridge.py $(TEST_DEST)/xenserver ;\
++	install xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py $(TEST_DEST)/xenserver ;\
++	install -d $(TEST_DEST)/vtep ;\
++	install vtep/vtep.ovsschema $(TEST_DEST)/vtep ;\
++	for p in $$list ; do \
++	  echo $$p ;\
++	  p=$${p#./} ;\
++	  pre=$${p#tests\/} ;\
++	  if test $$pre != $$p ; then \
++	    echo installing $$p to $(TEST_DEST)/tests/$$pre ;\
++	    install $$p $(TEST_DEST)/tests/$$pre ;\
++	    continue ;\
++	  fi ;\
++	  pre=$${p#python\/ovs\/} ;\
++	  if test $$pre != $$p ; then \
++	    echo installing $$p to $(TEST_DEST)/python/ovs/$$pre ;\
++	    install $$p $(TEST_DEST)/python/ovs/$$pre ;\
++	    continue ;\
++	  fi; \
++	done ;\
++	sed -i 's|abs_builddir=.*|abs_builddir='"'"'$(TEST_ROOT)/tests'"'"'|g' $(TEST_DEST)/tests/atconfig
++	sed -i 's|abs_srcdir=.*|abs_srcdir='"'"'$(TEST_ROOT)/tests'"'"'|g' $(TEST_DEST)/tests/atconfig
++	sed -i 's|abs_top_srcdir=.*|abs_top_srcdir='"'"'$(TEST_ROOT)'"'"'|g' $(TEST_DEST)/tests/atconfig
++	sed -i 's|abs_top_builddir=.*|abs_top_builddir='"'"'$(TEST_ROOT)'"'"'|g' $(TEST_DEST)/tests/atconfig
diff --git a/recipes-networking/openvswitch/openvswitch_git.bb b/recipes-networking/openvswitch/openvswitch_git.bb
new file mode 100644
index 0000000..17bebae
--- /dev/null
+++ b/recipes-networking/openvswitch/openvswitch_git.bb
@@ -0,0 +1,143 @@
+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 & GPLv2 & PSF"
+
+DEPENDS += "bridge-utils openssl python perl virtual/kernel"
+
+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"
+
+S = "${WORKDIR}/git"
+PV = "2.3.90+${SRCREV}"
+
+FILESEXTRAPATHS_append := "${THISDIR}/${PN}-git:"
+
+SRCREV = "1667bb34988358aaf1c92d0d21fad4b1c8698780"
+SRC_URI = "git://github.com/openvswitch/ovs.git;protocol=git \
+	file://openvswitch-switch \
+	file://openvswitch-switch-setup \
+	file://openvswitch-controller \
+	file://openvswitch-controller-setup \
+	file://openvswitch-add-target-python-handling.patch \
+	file://openvswitch-add-more-target-python-substitutions.patch \
+	file://openvswitch-add-ptest-${SRCREV}.patch \
+	file://run-ptest \
+	file://disable_m4_check.patch \
+	file://kernel_module.patch \
+	file://non_reproducible_builds_cleanup.patch \
+	"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=5973c953e3c8a767cf0808ff8a0bac1b"
+
+PACKAGECONFIG ?= "dpdk"
+PACKAGECONFIG[dpdk] = "--with-dpdk=${STAGING_DIR_TARGET}/opt/dpdk/${TARGET_ARCH}-native-linuxapp-gcc,,dpdk,"
+
+# 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"
+FILES_${PN} += "/lib/modules"
+
+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
+
+	install -d ${D}/${sysconfdir}/init.d/
+
+	oe_runmake modules_install INSTALL_MOD_PATH=${D}
+}
+
+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
+}
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] openvswitch restructure recipes
  2015-01-30 17:35 [PATCH 0/2] Uprev openvswitch Amy Fong
  2015-01-30 17:36 ` [PATCH 1/2] Package openvswitch git Amy Fong
@ 2015-01-30 17:36 ` Amy Fong
  2015-02-03 18:47   ` Bruce Ashfield
  1 sibling, 1 reply; 4+ messages in thread
From: Amy Fong @ 2015-01-30 17:36 UTC (permalink / raw)
  To: meta-virtualization

From fba310bc395a45747d5f40daf6784ea52820ffe0 Mon Sep 17 00:00:00 2001
From: Amy Fong <amy.fong@windriver.com>
Date: Thu, 29 Jan 2015 13:28:08 -0500
Subject: [PATCH 2/2] openvswitch restructure recipes

Add openvswitch.inc, removing common parts out of openvswitch*.bb

Signed-off-by: Amy Fong <amy.fong@windriver.com>

cleanup

Signed-off-by: Amy Fong <amy.fong@windriver.com>
---
 recipes-networking/openvswitch/openvswitch.inc     | 127 +++++++++++++++++++++
 .../openvswitch/openvswitch_1.10.0.bb              | 110 +-----------------
 .../openvswitch/openvswitch_2.1.3.bb               | 119 ++-----------------
 recipes-networking/openvswitch/openvswitch_git.bb  | 115 ++-----------------
 4 files changed, 151 insertions(+), 320 deletions(-)
 create mode 100644 recipes-networking/openvswitch/openvswitch.inc

diff --git a/recipes-networking/openvswitch/openvswitch.inc b/recipes-networking/openvswitch/openvswitch.inc
new file mode 100644
index 0000000..ed97920
--- /dev/null
+++ b/recipes-networking/openvswitch/openvswitch.inc
@@ -0,0 +1,127 @@
+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"
+
+# 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 = "\
+	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 \
+	"
+
+EXTRA_OECONF += "\
+	TARGET_PYTHON=${bindir}/python \
+	TARGET_PERL=${bindir}/perl \
+	"
+
+# 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}"
+
+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
+
+	install -d ${D}/${sysconfdir}/init.d/
+
+	oe_runmake modules_install INSTALL_MOD_PATH=${D}
+}
+
+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_1.10.0.bb b/recipes-networking/openvswitch/openvswitch_1.10.0.bb
index 42d4bc4..85b2709 100644
--- a/recipes-networking/openvswitch/openvswitch_1.10.0.bb
+++ b/recipes-networking/openvswitch/openvswitch_1.10.0.bb
@@ -1,32 +1,11 @@
-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"
+require openvswitch.inc
 
-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"
 PR = "r4"
 
-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 += "\
+	http://openvswitch.org/releases/openvswitch-${PV}.tar.gz \
 	file://configure-Only-link-against-libpcap-on-FreeBSD.patch \
 	"
 
@@ -34,85 +13,4 @@ SRC_URI[md5sum] = "fe8b49efe9f86b57abab00166b971106"
 SRC_URI[sha256sum] = "803966c89d6a5de6d710a2cb4ed73ac8d8111a2c44b12b846dcef8e91ffab167"
 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 pkgconfig
-
-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
-}
+inherit pkgconfig
diff --git a/recipes-networking/openvswitch/openvswitch_2.1.3.bb b/recipes-networking/openvswitch/openvswitch_2.1.3.bb
index c3a29aa..dc6c7e3 100644
--- a/recipes-networking/openvswitch/openvswitch_2.1.3.bb
+++ b/recipes-networking/openvswitch/openvswitch_2.1.3.bb
@@ -1,35 +1,15 @@
-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"
+require openvswitch.inc
 
-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"
+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 \
+	"
 
-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 += "\
+	http://openvswitch.org/releases/openvswitch-${PV}.tar.gz \
 	file://openvswitch-add-more-target-python-substitutions.patch \
 	file://openvswitch-add-ptest.patch \
 	file://run-ptest \
@@ -40,91 +20,10 @@ SRC_URI[sha256sum] = "43a2562fe5e8e48e997bfdb04691ffaaaefe73069b5699654538bf2f16
 
 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
+inherit 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_git.bb b/recipes-networking/openvswitch/openvswitch_git.bb
index 17bebae..5580915 100644
--- a/recipes-networking/openvswitch/openvswitch_git.bb
+++ b/recipes-networking/openvswitch/openvswitch_git.bb
@@ -1,27 +1,12 @@
-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 & GPLv2 & PSF"
+require openvswitch.inc
 
-DEPENDS += "bridge-utils openssl python perl virtual/kernel"
+DEPENDS += "virtual/kernel"
 
-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"
+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 \
+	"
 
 S = "${WORKDIR}/git"
 PV = "2.3.90+${SRCREV}"
@@ -29,12 +14,8 @@ PV = "2.3.90+${SRCREV}"
 FILESEXTRAPATHS_append := "${THISDIR}/${PN}-git:"
 
 SRCREV = "1667bb34988358aaf1c92d0d21fad4b1c8698780"
-SRC_URI = "git://github.com/openvswitch/ovs.git;protocol=git \
-	file://openvswitch-switch \
-	file://openvswitch-switch-setup \
-	file://openvswitch-controller \
-	file://openvswitch-controller-setup \
-	file://openvswitch-add-target-python-handling.patch \
+SRC_URI += "\
+	git://github.com/openvswitch/ovs.git;protocol=git \
 	file://openvswitch-add-more-target-python-substitutions.patch \
 	file://openvswitch-add-ptest-${SRCREV}.patch \
 	file://run-ptest \
@@ -51,31 +32,12 @@ PACKAGECONFIG[dpdk] = "--with-dpdk=${STAGING_DIR_TARGET}/opt/dpdk/${TARGET_ARCH}
 # 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"
+EXTRA_OECONF += "--with-linux=${STAGING_KERNEL_DIR} KARCH=${TARGET_ARCH}"
 
-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"
 FILES_${PN} += "/lib/modules"
 
-inherit autotools update-rc.d ptest
+inherit ptest
 
 EXTRA_OEMAKE += "TEST_DEST=${D}${PTEST_PATH} TEST_ROOT=${PTEST_PATH}"
 
@@ -83,61 +45,6 @@ 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
-
-	install -d ${D}/${sysconfdir}/init.d/
-
 	oe_runmake modules_install INSTALL_MOD_PATH=${D}
 }
-
-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
-}
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] openvswitch restructure recipes
  2015-01-30 17:36 ` [PATCH 2/2] openvswitch restructure recipes Amy Fong
@ 2015-02-03 18:47   ` Bruce Ashfield
  0 siblings, 0 replies; 4+ messages in thread
From: Bruce Ashfield @ 2015-02-03 18:47 UTC (permalink / raw)
  To: Amy Fong; +Cc: meta-virtualization@yoctoproject.org

On Fri, Jan 30, 2015 at 12:36 PM, Amy Fong <amy.fong@windriver.com> wrote:
> From fba310bc395a45747d5f40daf6784ea52820ffe0 Mon Sep 17 00:00:00 2001
> From: Amy Fong <amy.fong@windriver.com>
> Date: Thu, 29 Jan 2015 13:28:08 -0500
> Subject: [PATCH 2/2] openvswitch restructure recipes
>
> Add openvswitch.inc, removing common parts out of openvswitch*.bb
>
> Signed-off-by: Amy Fong <amy.fong@windriver.com>
>
> cleanup
>
> Signed-off-by: Amy Fong <amy.fong@windriver.com>

I fixed up the commit message, looks like your squash didn't quite get
the properly
consolidated commit.

Other than that, no one has complained, so I've gone ahead and merged
the changes.

Cheers,

Bruce

> ---
>  recipes-networking/openvswitch/openvswitch.inc     | 127 +++++++++++++++++++++
>  .../openvswitch/openvswitch_1.10.0.bb              | 110 +-----------------
>  .../openvswitch/openvswitch_2.1.3.bb               | 119 ++-----------------
>  recipes-networking/openvswitch/openvswitch_git.bb  | 115 ++-----------------
>  4 files changed, 151 insertions(+), 320 deletions(-)
>  create mode 100644 recipes-networking/openvswitch/openvswitch.inc
>
> diff --git a/recipes-networking/openvswitch/openvswitch.inc b/recipes-networking/openvswitch/openvswitch.inc
> new file mode 100644
> index 0000000..ed97920
> --- /dev/null
> +++ b/recipes-networking/openvswitch/openvswitch.inc
> @@ -0,0 +1,127 @@
> +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"
> +
> +# 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 = "\
> +       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 \
> +       "
> +
> +EXTRA_OECONF += "\
> +       TARGET_PYTHON=${bindir}/python \
> +       TARGET_PERL=${bindir}/perl \
> +       "
> +
> +# 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}"
> +
> +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
> +
> +       install -d ${D}/${sysconfdir}/init.d/
> +
> +       oe_runmake modules_install INSTALL_MOD_PATH=${D}
> +}
> +
> +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_1.10.0.bb b/recipes-networking/openvswitch/openvswitch_1.10.0.bb
> index 42d4bc4..85b2709 100644
> --- a/recipes-networking/openvswitch/openvswitch_1.10.0.bb
> +++ b/recipes-networking/openvswitch/openvswitch_1.10.0.bb
> @@ -1,32 +1,11 @@
> -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"
> +require openvswitch.inc
>
> -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"
>  PR = "r4"
>
> -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 += "\
> +       http://openvswitch.org/releases/openvswitch-${PV}.tar.gz \
>         file://configure-Only-link-against-libpcap-on-FreeBSD.patch \
>         "
>
> @@ -34,85 +13,4 @@ SRC_URI[md5sum] = "fe8b49efe9f86b57abab00166b971106"
>  SRC_URI[sha256sum] = "803966c89d6a5de6d710a2cb4ed73ac8d8111a2c44b12b846dcef8e91ffab167"
>  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 pkgconfig
> -
> -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
> -}
> +inherit pkgconfig
> diff --git a/recipes-networking/openvswitch/openvswitch_2.1.3.bb b/recipes-networking/openvswitch/openvswitch_2.1.3.bb
> index c3a29aa..dc6c7e3 100644
> --- a/recipes-networking/openvswitch/openvswitch_2.1.3.bb
> +++ b/recipes-networking/openvswitch/openvswitch_2.1.3.bb
> @@ -1,35 +1,15 @@
> -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"
> +require openvswitch.inc
>
> -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"
> +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 \
> +       "
>
> -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 += "\
> +       http://openvswitch.org/releases/openvswitch-${PV}.tar.gz \
>         file://openvswitch-add-more-target-python-substitutions.patch \
>         file://openvswitch-add-ptest.patch \
>         file://run-ptest \
> @@ -40,91 +20,10 @@ SRC_URI[sha256sum] = "43a2562fe5e8e48e997bfdb04691ffaaaefe73069b5699654538bf2f16
>
>  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
> +inherit 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_git.bb b/recipes-networking/openvswitch/openvswitch_git.bb
> index 17bebae..5580915 100644
> --- a/recipes-networking/openvswitch/openvswitch_git.bb
> +++ b/recipes-networking/openvswitch/openvswitch_git.bb
> @@ -1,27 +1,12 @@
> -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 & GPLv2 & PSF"
> +require openvswitch.inc
>
> -DEPENDS += "bridge-utils openssl python perl virtual/kernel"
> +DEPENDS += "virtual/kernel"
>
> -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"
> +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 \
> +       "
>
>  S = "${WORKDIR}/git"
>  PV = "2.3.90+${SRCREV}"
> @@ -29,12 +14,8 @@ PV = "2.3.90+${SRCREV}"
>  FILESEXTRAPATHS_append := "${THISDIR}/${PN}-git:"
>
>  SRCREV = "1667bb34988358aaf1c92d0d21fad4b1c8698780"
> -SRC_URI = "git://github.com/openvswitch/ovs.git;protocol=git \
> -       file://openvswitch-switch \
> -       file://openvswitch-switch-setup \
> -       file://openvswitch-controller \
> -       file://openvswitch-controller-setup \
> -       file://openvswitch-add-target-python-handling.patch \
> +SRC_URI += "\
> +       git://github.com/openvswitch/ovs.git;protocol=git \
>         file://openvswitch-add-more-target-python-substitutions.patch \
>         file://openvswitch-add-ptest-${SRCREV}.patch \
>         file://run-ptest \
> @@ -51,31 +32,12 @@ PACKAGECONFIG[dpdk] = "--with-dpdk=${STAGING_DIR_TARGET}/opt/dpdk/${TARGET_ARCH}
>  # 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"
> +EXTRA_OECONF += "--with-linux=${STAGING_KERNEL_DIR} KARCH=${TARGET_ARCH}"
>
> -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"
>  FILES_${PN} += "/lib/modules"
>
> -inherit autotools update-rc.d ptest
> +inherit ptest
>
>  EXTRA_OEMAKE += "TEST_DEST=${D}${PTEST_PATH} TEST_ROOT=${PTEST_PATH}"
>
> @@ -83,61 +45,6 @@ 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
> -
> -       install -d ${D}/${sysconfdir}/init.d/
> -
>         oe_runmake modules_install INSTALL_MOD_PATH=${D}
>  }
> -
> -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
> -}
> --
> 2.1.4
>
> --
> _______________________________________________
> meta-virtualization mailing list
> meta-virtualization@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-virtualization



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-02-03 18:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-30 17:35 [PATCH 0/2] Uprev openvswitch Amy Fong
2015-01-30 17:36 ` [PATCH 1/2] Package openvswitch git Amy Fong
2015-01-30 17:36 ` [PATCH 2/2] openvswitch restructure recipes Amy Fong
2015-02-03 18:47   ` Bruce Ashfield

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.