~alpine/devel

/testing/openvswitch - kernel module bump & improved init scripts v1 PROPOSED

Stuart Cardall: 1
 /testing/openvswitch - kernel module bump & improved init scripts

 7 files changed, 38 insertions(+), 78 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.alpinelinux.org/~alpine/devel/patches/793/mbox | git am -3
Learn more about email & git

[alpine-devel] [PATCH] /testing/openvswitch - kernel module bump & improved init scripts Export this patch

Version bump for the 3.10.32 kernel on Main

Init scripts improved to start ovsdb-server & ovs-vswitchd before
networking comes up. LXC Guests now autostart correctly on reboots.
MACVLAN interfaces work out of the box with LXC. To use VETH interfaces
openvswitch "fake bridges" are needed (as there is no longer a br-compat
module).

The kernel module is from the latest commit on the 2.1 branch.

The userland is from the 2.0.1 release (using the latest git pulls
in dependencies for pkgconfig / gcc & a few other packages).

ovs-controller removed as it's no longer part of a default installation.

ovs-monitor will be removed in version 2.1 as it's rarely used &
unmaintained.
---
 testing/openvswitch-grsec/APKBUILD                 | 21 +++++-----
 .../openvswitch-grsec/openvswitch-modules.initd    |  2 +-
 testing/openvswitch/APKBUILD                       | 49 +++++++++-------------
 testing/openvswitch/ovs-controller.confd           |  6 ---
 testing/openvswitch/ovs-controller.initd           | 28 -------------
 testing/openvswitch/ovs-vswitchd.initd             |  6 ++-
 testing/openvswitch/ovsdb-server.initd             |  4 +-
 7 files changed, 38 insertions(+), 78 deletions(-)
 delete mode 100644 testing/openvswitch/ovs-controller.confd
 delete mode 100644 testing/openvswitch/ovs-controller.initd

diff --git a/testing/openvswitch-grsec/APKBUILD b/testing/openvswitch-grsec/APKBUILD
index fc4c580..c346bb7 100644
--- a/testing/openvswitch-grsec/APKBUILD
+++ b/testing/openvswitch-grsec/APKBUILD
@@ -4,11 +4,12 @@
_flavor=grsec
_kpkg=linux-$_flavor
_realname=openvswitch
_kver=3.10.28
_kver=3.10.32
_kpkgrel=0

_realver=2.0.1
_gitversion=09350a3de320e83517c943858acc397db784d583
_gitversion=96d878178dc42839415b210c5631dc54d8eaed79
_gitdate=040314
_ver=${_gitversion:0:7}
_mypkgrel=0

@@ -41,10 +42,10 @@ subpackages=""
depends="linux-${_flavor}=${_kernelver}"
depends_dev="openssl-dev linux-${_flavor}-dev=${_kernelver}"
makedepends="$depends_dev"
source="saveas-http://git.openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=snapshot;h=$_gitversion;sf=tgz/$pkgname-$_realver+git$gitdate.tar.gz
source="saveas-http://git.openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=snapshot;h=$_gitversion;sf=tgz/$pkgname-$_realver+git$_gitdate+$_ver.tar.gz
	openvswitch-modules.initd
	"
install_if="linux-${_flavor}-openvswitch=${_kernelver} openvswitch2"
install_if="linux-${_flavor}-openvswitch=${_kernelver} openvswitch"

_builddir="$srcdir"/$_realname-$_ver

@@ -87,9 +88,9 @@ package() {
	done
}

md5sums="4e9384ddbd8dbb40ad899fd089f335d7  openvswitch-grsec-2.0.1+git.tar.gz
f358118b571348c781fa9d24dc14e876  openvswitch-modules.initd"
sha256sums="015d801240c0eae44cc8507e36abf76dbf8919925352eedab0d2d0db8cdc140b  openvswitch-grsec-2.0.1+git.tar.gz
6e999b2e0a93a4fa5268361f98f59a6c527266c6d5ae9dc593a5cad488a300a3  openvswitch-modules.initd"
sha512sums="bc9b964db5e25572b0034330f34b65bd40d3f294d35e1b7522f1339c3e0b4200581fbd1b5cf13f2632c9b19315ce669387833d6f24e139c6ad61e17b8fe4afb7  openvswitch-grsec-2.0.1+git.tar.gz
d69cc29e7c4e8278b77fd8f03d635f109a14ee0c4fbfc25635f3ca2fd2f59d4664188743cb5f7273891b25a61d43192c5f448e41f7c606d6a5b9050314f14151  openvswitch-modules.initd"
md5sums="25a77cfbbdaa8569e28ec80f688a449c  openvswitch-grsec-2.0.1+git020314+96d8781.tar.gz
ae128e5c349710c0fb3849b2d3b3aa40  openvswitch-modules.initd"
sha256sums="0058af11fe8fe86d5f3d2bb04161283c24e39f7dcfa9cc82fd278b90d27789fc  openvswitch-grsec-2.0.1+git020314+96d8781.tar.gz
94f4dba5e2ddedb9c91911b02dbfc41a5114e8a5066a8db3ef4444ebb5400173  openvswitch-modules.initd"
sha512sums="c094636061e6d36eb806375c6314d2bfd00e0a7f915064c11f0df4383251482986748deda85187b84b1dbc2aa9388e2af977c3820052a2eb5799cbbf519e07ef  openvswitch-grsec-2.0.1+git020314+96d8781.tar.gz
e1f88ff11cd1d5a4025626acad49411e8a2d5d7caa20d0a63ef0422a9b1bb55b070843327d8bb209e1e915d2a3f1c3bcae911acf40e0a419bc6cce6250239232  openvswitch-modules.initd"
diff --git a/testing/openvswitch-grsec/openvswitch-modules.initd b/testing/openvswitch-grsec/openvswitch-modules.initd
index 8e48d1e..204348d 100644
--- a/testing/openvswitch-grsec/openvswitch-modules.initd
+++ b/testing/openvswitch-grsec/openvswitch-modules.initd
@@ -3,7 +3,7 @@
MODULES="openvswitch"

depend() {
        before openvswitch
        before ovsdb-server
}


diff --git a/testing/openvswitch/APKBUILD b/testing/openvswitch/APKBUILD
index 3011da7..6a01800 100644
--- a/testing/openvswitch/APKBUILD
+++ b/testing/openvswitch/APKBUILD
@@ -2,11 +2,10 @@
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=openvswitch
pkgver=2.0.1
gitdate=141213
gitversion=f9b9c7a68dc4c5eefb100b8b4d0e024b5ce87f2a
f9b9c7a68dc4c5eefb100b8b4d0e024b5ce87f2a
pkgrel=1
_kver=3.10.28
gitdate=040314
gitversion=96d878178dc42839415b210c5631dc54d8eaed79
pkgrel=2
_kver=3.10.32
_kpkgrel=0
_flavor=grsec
pkgdesc="A production quality, multilayer virtual switch - includes Kernel Modules for best performance."
@@ -19,22 +18,22 @@ depends_monitor="py-twisted py-twisted-web2 py-qt"
makedepends="linux-grsec-dev perl $depends_dev $depends_monitor"
install="openvswitch.post-install openvswitch.post-upgrade"
subpackages="$pkgname-doc $pkgname-monitor"
source="saveas-http://git.openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=snapshot;h=$gitversion;sf=tgz/$pkgname-$pkgver+git$gitdate.tar.gz
#source="saveas-http://git.openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=snapshot;h=$gitversion;sf=tgz/$pkgname-$pkgver+git$gitdate.tar.gz
source="http://openvswitch.org/releases/$pkgname-$pkgver.tar.gz
	ovsdb-server.initd
	ovsdb-server.confd
	ovs-controller.initd
	ovs-controller.confd
	ovs-vswitchd.initd
	ovs-vswitchd.confd"

_builddir="$srcdir"/$pkgname-${gitversion:0:7}
#_builddir="$srcdir"/$pkgname-${gitversion:0:7}
_builddir="$srcdir"/$pkgname-$pkgver
_abi_release=${_kver}-${_kpkgrel}-${_flavor}
_kernelver="$_kver-r$_kpkgrel"

prepare() {
	local i
        cd "$_builddir"
	#patch not needed after git-180214 https://www.mail-archive.com/dev@openvswitch.org/msg25840.html
	#patch not needed after 2.0.1 https://www.mail-archive.com/dev@openvswitch.org/msg25840.html
	patch -p1 -i ../../remove-test-atomic-8byte.patch || return 1

        for i in $source; do
@@ -44,7 +43,7 @@ prepare() {
        done

	if [ ! -d /usr/src/linux-headers-$_abi_release ]; then
		echo "linux-grsec-dev-$_kernelver not found"; return 1
		echo "linux-grsec-dev-$_kernelver not found - update build env"; return 1
	fi
}

@@ -58,8 +57,6 @@ build() {
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--enable-ndebug \
		--with-linux=/lib/modules/$_abi_release/build \
		--with-linux-source=/usr/src/linux-headers-$_abi_release \
		|| return 1
	make CONFIG_DEBUG_SECTION_MISMATCH=y || return 1
}
@@ -77,32 +74,24 @@ package() {
	rm -f "$pkgdir"/usr/lib/*.a

	install -Dm755 "$srcdir"/ovsdb-server.initd "$pkgdir"/etc/init.d/ovsdb-server
	install -Dm755 "$srcdir"/ovs-controller.initd "$pkgdir"/etc/init.d/ovs-controller
	install -Dm755 "$srcdir"/ovs-vswitchd.initd "$pkgdir"/etc/init.d/ovs-vswitchd

	install -Dm644 "$srcdir"/ovsdb-server.confd "$pkgdir"/etc/conf.d/ovsdb-server
	install -Dm644 "$srcdir"/ovs-controller.confd "$pkgdir"/etc/conf.d/ovs-controller
	install -Dm644 "$srcdir"/ovs-vswitchd.confd "$pkgdir"/etc/conf.d/ovs-vswitchd
}

md5sums="f29b6c789a14cf7b9f2aa4b34bd6a5f5  openvswitch-2.0.1+git141213.tar.gz
b9b6b23d349d5563d70a1c6d0a5b677c  ovsdb-server.initd
md5sums="a2122b1c293c8d05dc0c673d42a9da08  openvswitch-2.0.1.tar.gz
ce4b0bc302e2b02d1d37d8f225d8af2f  ovsdb-server.initd
f10a8ac784654bec359bda52779f16fe  ovsdb-server.confd
488dffc27afbc48cebf140019ae05818  ovs-controller.initd
0f5ce60dda512b29d4e20cb832e062d4  ovs-controller.confd
737a852ef4590c42f4548313a3fc97f2  ovs-vswitchd.initd
bee124d87b5937fff8e680ab3e21f6d8  ovs-vswitchd.initd
2d1e0111ea62779f49e14d62678294b2  ovs-vswitchd.confd"
sha256sums="4514672b669afa2f2ec0f95280224109e98d8a4b4b1654b34e6cf5c519b0eb27  openvswitch-2.0.1+git141213.tar.gz
2a9a3bd0277362fcdab62b7ea86ae2e488e099d9ed724dc27648136e5f5ed93c  ovsdb-server.initd
sha256sums="014907bcf2f98228dfa4472ea1547871d24b8fb8192dcfff3ead1af93c433a67  openvswitch-2.0.1.tar.gz
b7a109870c16aa199cc0d246982c40570ca653a486c509a100c08cdc18b612ce  ovsdb-server.initd
d0d8a6a7256f4cc47ab1b9f9f7657202388133bcfff3668e7c1d4adbcc572261  ovsdb-server.confd
f1a89f8cb42e18bb8ba7a184a6cdecaa30164ecb1aaa3115b729cc338b6316ca  ovs-controller.initd
950996914d7991550ead5fcfb5b262c60b5f53df6796c111105baa2a89a39431  ovs-controller.confd
467ee6110748046e29e4e92e0b7bf11b9c083c252dfb0d901ce2879a1726a734  ovs-vswitchd.initd
9736c14fef6f183b6b566b7bca022d38c05bcd791051a57c08a8c56d13fc0f14  ovs-vswitchd.initd
cc189d5ca24708ff775a4de312df3f611c65714724b8901ec6527c9e3f22e14a  ovs-vswitchd.confd"
sha512sums="e851c6e923ae92b0f265e14fabb98b034c9221f9953fbdb90081531f8790ef7c2b7d4f52a5144f68489e360206ba3283f1400a09533c52d4320f5b7e73fc5377  openvswitch-2.0.1+git141213.tar.gz
4d031347b146cf82812cb0fc1ead944d6e29a9a8bd2afe603c4003b6f8c9d2f9d0c5f7e2ebdad456e7f5af4b01c756203cd96cc44db7be266bf94ac9bba188ff  ovsdb-server.initd
sha512sums="4207cac887c9e2dad234d1e2b70d5309e51b8d10dbe994f125ff9e967935f3674574651c9fb297cf59dbc355830f2947cd98e4f5d28aaf495b9b950a9f603eeb  openvswitch-2.0.1.tar.gz
b308e4c687d28b8afeb1f364cbb2f4a719f1731e69aa474412bfdf85193433b52517403db06ec080aaa9b4adde7208ff94c095e4ab04b35667a8133bf40f62b8  ovsdb-server.initd
b1588d076bbfc7ef2dd46fce8e46186f40cbbc4667697f7ac13ddc68e34568fdab315fde47838de7f6d32916853190336cfe3735f672ad7cb624ae14dbff55a5  ovsdb-server.confd
feab263b4a4305d6b21dc29c5c29dc43813b37adccaefc4fd74412a8a03f0c00dfa6dff7f88934e5e7c05d44ad36647c212d3ba46736b27116df22f4d9e9925e  ovs-controller.initd
e8f28b01a080d4ba11db7f17e61d4352241194e723fc198cc1c7ce60717be297025b892633599be3e1dc86dec525c1be41b9f22a5c06b8a4c267555195c92dc9  ovs-controller.confd
543f82887e374e25d703d968cca90bf36603ea23dd9a8b4e5bc6181d95402e6b47b28c0e079f516639542b87a43458b929f0db9104faaa68016c9410d152636b  ovs-vswitchd.initd
368f82ede5dbf88f777a83dfaded9a65e51dd2f39d74dbdf27d662363cc83b6b9997bb26804919b872a054cfae5e5b0caa3762310c11821496d2456d1c8e3810  ovs-vswitchd.initd
346aea099f51707d2b4fc9fdc8c1502582723fb4e00c4d5d1624b0378c94dfb76674fa95e2af894f36169df52109dbe441ee6a45aa744584d9e4c74d15a46c1d  ovs-vswitchd.confd"
diff --git a/testing/openvswitch/ovs-controller.confd b/testing/openvswitch/ovs-controller.confd
deleted file mode 100644
index 86e6c1d..0000000
--- a/testing/openvswitch/ovs-controller.confd
@@ -1,6 +0,0 @@
# Space separated list of methods to listen for OpenFlow connections from switches
# The default is "ptcp:" which starts ovs-controller listening on port 6633 on all interfaces.
METHODS="ptcp:"

# Additional options
# OPTIONS=""
diff --git a/testing/openvswitch/ovs-controller.initd b/testing/openvswitch/ovs-controller.initd
deleted file mode 100644
index 5f07636..0000000
--- a/testing/openvswitch/ovs-controller.initd
@@ -1,28 +0,0 @@
#!/sbin/runscript
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/openvswitch/files/ovs-controller-r1,v 1.1 2013/04/08 19:37:58 dev-zero Exp $

description="Open vSwitch OpenFlow controller"

# in the 2.1 release ovs-controller has been renamed test-controller.  It is no longer
# packaged or installed by default, because too many users assumed incorrectly that
# ovs-controller was a necessary or desirable part of an Open vSwitch deployment.
# (!!!! SO YOU PROBABLY DO NOT WANT TO USE THIS !!!!)

command="/usr/bin/ovs-controller"
command_args="
    --pidfile
    --detach
    --monitor
    ${OPTIONS} ${METHODS}"
pidfile="/var/run/openvswitch/ovs-controller.pid"

depend() {
    need net
    use logger
}

start_pre() {
	checkpath -d "/var/run/openvswitch" -m 0750
}
diff --git a/testing/openvswitch/ovs-vswitchd.initd b/testing/openvswitch/ovs-vswitchd.initd
index 3f14cc9..c9c2ef5 100644
--- a/testing/openvswitch/ovs-vswitchd.initd
+++ b/testing/openvswitch/ovs-vswitchd.initd
@@ -14,8 +14,10 @@ command_args="
pidfile="/var/run/openvswitch/ovs-vswitchd.pid"

depend() {
	use logger
	need ovsdb-server
        need localmount 
        after bootmisc hwdrivers modules
        before net
    use logger
}

start_pre() {
diff --git a/testing/openvswitch/ovsdb-server.initd b/testing/openvswitch/ovsdb-server.initd
index a7d7c02..3d6fcbb 100644
--- a/testing/openvswitch/ovsdb-server.initd
+++ b/testing/openvswitch/ovsdb-server.initd
@@ -26,7 +26,9 @@ command_args="
pidfile="/var/run/openvswitch/ovsdb-server.pid"

depend() {
	need localmount
        need localmount 
        after bootmisc hwdrivers modules
        before net
    use logger
}

-- 
1.8.5.4



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---