summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiziano Müller <dev-zero@gentoo.org>2012-06-27 08:49:35 +0000
committerTiziano Müller <dev-zero@gentoo.org>2012-06-27 08:49:35 +0000
commit60cd52b79bf0c3956e7e0256f456b3c252974751 (patch)
tree53aac07e3622b9f8f04541ba5a5c8aa368429c1e /net-misc/openvswitch
parentVersion bump, drop unused dependency on libkcompactdisc. Remove old. (diff)
downloadhistorical-60cd52b79bf0c3956e7e0256f456b3c252974751.tar.gz
historical-60cd52b79bf0c3956e7e0256f456b3c252974751.tar.bz2
historical-60cd52b79bf0c3956e7e0256f456b3c252974751.zip
Initial commit (bug #324589). Thanks to all the people on the bug and especially Oliver Roeschke and Florian Manschwetus for testing and comments.
Package-Manager: portage-2.1.11/cvs/Linux x86_64
Diffstat (limited to 'net-misc/openvswitch')
-rw-r--r--net-misc/openvswitch/ChangeLog11
-rw-r--r--net-misc/openvswitch/Manifest18
-rw-r--r--net-misc/openvswitch/files/ovs-vswitchd24
-rw-r--r--net-misc/openvswitch/files/ovs-vswitchd_conf6
-rw-r--r--net-misc/openvswitch/files/ovsdb-server31
-rw-r--r--net-misc/openvswitch/files/ovsdb-server_conf16
-rw-r--r--net-misc/openvswitch/metadata.xml12
-rw-r--r--net-misc/openvswitch/openvswitch-1.6.1.ebuild104
8 files changed, 222 insertions, 0 deletions
diff --git a/net-misc/openvswitch/ChangeLog b/net-misc/openvswitch/ChangeLog
new file mode 100644
index 000000000000..10b2276f2cb4
--- /dev/null
+++ b/net-misc/openvswitch/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for net-misc/openvswitch
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openvswitch/ChangeLog,v 1.1 2012/06/27 08:49:35 dev-zero Exp $
+
+*openvswitch-1.6.1 (27 Jun 2012)
+
+ 27 Jun 2012; Tiziano Müller <dev-zero@gentoo.org> +files/ovs-vswitchd,
+ +files/ovs-vswitchd_conf, +files/ovsdb-server, +files/ovsdb-server_conf,
+ +metadata.xml, +openvswitch-1.6.1.ebuild:
+ Initial commit (bug #324589). Thanks to all the people on the bug and
+ especially Oliver Roeschke and Florian Manschwetus for testing and comments.
diff --git a/net-misc/openvswitch/Manifest b/net-misc/openvswitch/Manifest
new file mode 100644
index 000000000000..b0c67274c930
--- /dev/null
+++ b/net-misc/openvswitch/Manifest
@@ -0,0 +1,18 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+AUX ovs-vswitchd 703 RMD160 becab15d0b8b2e3fd5604d752c6df62765fedc23 SHA1 eebfe7c84496afd2d78e23091844b9c9a265d09d SHA256 70d2a4283e091ff965f12e4ea33bce65c5987c2a0513fa30b6f0d80b2bd99684
+AUX ovs-vswitchd_conf 164 RMD160 3e854e45a679bfe3faed515e6ab5e9fedc7a2e15 SHA1 28d76be71e36e415bae1be2a0469d41efba129e8 SHA256 438c58741562af201c816f0a72101b5abb0e75788369bb04ed57be28425e5f81
+AUX ovsdb-server 1134 RMD160 d1b00a5130de4287c52435ff4b74b3a3faa5c1bb SHA1 fd669a965319f159d8f1e100c3738d3d8ae3f3b4 SHA256 432a74a748c18eeb0f78102bc6812673e852c4335d42815629b91fb4407ce3d8
+AUX ovsdb-server_conf 492 RMD160 de34c485414566e75877a1ff1fd723745f8dc319 SHA1 03bafac208afad5a490667b79436536dbb500a48 SHA256 15c508d134fed8cda13e2d394fc7c20b9868294a30e73a952ebffd31df129251
+DIST openvswitch-1.6.1.tar.gz 2088054 RMD160 1bf54bdb566a8ae94ad3c5635becb3030fb0f96f SHA1 99cf3b22a18a93bbd5cc344ecafd7a619dc54af3 SHA256 b2451cc8ae5d800e474f2a7d627ef9ea7cebf7f632c7ea09b2976529a9f5b507
+EBUILD openvswitch-1.6.1.ebuild 2933 RMD160 f5c41a8c3a873ed7132c42d3415085ebd89bd1c3 SHA1 bd7a6cf1ab8d63fbb9128b9f0ff27af3678de54c SHA256 a240c4a1283f648ff2af96e87601abf2e05849fbea2ca12a375b0f413c1df13f
+MISC ChangeLog 593 RMD160 a6bb22be9b8e20286de3747f9389e25219ccb9c7 SHA1 90e8a80adb540a93a8ab9c38f987cbebfe4b6641 SHA256 1cd4a9e66ff61f825bea3349bf7af25599391af2983368b379f39e371ffa3d20
+MISC metadata.xml 482 RMD160 dddb644e674d99af4f642f37b002e96c68c4145e SHA1 1a6bc149abd11266a64a35dd7bf01a80a5cb778b SHA256 e5f849ca599bb7ceada5ea0a66160b0bb9ff5ade3a8b00ea73db17b18675417a
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.19 (GNU/Linux)
+
+iEYEARECAAYFAk/qyScACgkQGwVqY66cHjAkuACcDZZ1oaFRg2gEzENoDwTRxlkF
+DWAAnA9k5AEdXCzVAEHeUvtK7ld06Z+w
+=VH0b
+-----END PGP SIGNATURE-----
diff --git a/net-misc/openvswitch/files/ovs-vswitchd b/net-misc/openvswitch/files/ovs-vswitchd
new file mode 100644
index 000000000000..4fd1758a8f26
--- /dev/null
+++ b/net-misc/openvswitch/files/ovs-vswitchd
@@ -0,0 +1,24 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openvswitch/files/ovs-vswitchd,v 1.1 2012/06/27 08:49:34 dev-zero Exp $
+
+depend() {
+ use ovsdb-server
+}
+
+start() {
+ checkpath -d "/var/run/openvswitch" -m 0750
+
+ ebegin "Starting Open vSwitch daemon"
+ start-stop-daemon \
+ --start --quiet --pidfile "/var/run/openvswitch/ovs-vswitchd.pid" \
+ --exec /usr/sbin/ovs-vswitchd -- --pidfile --detach --monitor ${OPTIONS} ${DB_SOCKET}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Open vSwitch daemon"
+ start-stop-daemon --stop --quiet --pidfile "/var/run/openvswitch/ovs-vswitchd.pid"
+ eend $?
+}
diff --git a/net-misc/openvswitch/files/ovs-vswitchd_conf b/net-misc/openvswitch/files/ovs-vswitchd_conf
new file mode 100644
index 000000000000..c9eadb41862b
--- /dev/null
+++ b/net-misc/openvswitch/files/ovs-vswitchd_conf
@@ -0,0 +1,6 @@
+
+# Connection string for the configuration database (usually a unix socket)
+DATABASE="unix:/var/run/openvswitch/db.sock"
+
+# Additional options
+OPTIONS="--mlockall"
diff --git a/net-misc/openvswitch/files/ovsdb-server b/net-misc/openvswitch/files/ovsdb-server
new file mode 100644
index 000000000000..dbc112f6857a
--- /dev/null
+++ b/net-misc/openvswitch/files/ovsdb-server
@@ -0,0 +1,31 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openvswitch/files/ovsdb-server,v 1.1 2012/06/27 08:49:34 dev-zero Exp $
+
+depend() {
+ need localmount
+}
+
+start() {
+ checkpath -d "/var/run/openvswitch" -m 0750
+
+ local remote_punix=${DB_SOCKET:+"--remote=punix:${DB_SOCKET}"}
+ local remote_db=${REMOTE_DB:+"--remote=${REMOTE_DB}"}
+ local private_key=${PRIVATE_KEY:+"--private-key=${PRIVATE_KEY}"}
+ local certificate=${CERTIFICATE:+"--certificate=${CERTIFICATE}"}
+ local bootstrap_ca_cert=${BOOTSTRAP_CA_CERT:+"--bootstrap-ca-cert=${BOOTSTRAP_CA_CERT}"}
+
+ ebegin "Starting Open vSwitch DB server"
+ start-stop-daemon \
+ --start --quiet \
+ --pidfile "/var/run/openvswitch/ovsdb-server.pid" \
+ --exec /usr/sbin/ovsdb-server -- --pidfile --detach --monitor ${remote_punix} ${remote_db} ${private_key} ${certificate} ${bootstrap_ca_cert} ${DATABASE} ${OPTIONS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Open vSwitch DB server"
+ start-stop-daemon --stop --quiet --pidfile "/var/run/openvswitch/ovsdb-server.pid"
+ eend $?
+}
diff --git a/net-misc/openvswitch/files/ovsdb-server_conf b/net-misc/openvswitch/files/ovsdb-server_conf
new file mode 100644
index 000000000000..1299b820640c
--- /dev/null
+++ b/net-misc/openvswitch/files/ovsdb-server_conf
@@ -0,0 +1,16 @@
+# Socket for bringing the server up
+DB_SOCKET="/var/run/openvswitch/db.sock"
+
+# Remote sockets are defined in the database by default
+REMOTE_DB="db:Open_vSwitch,manager_options"
+
+# All certificates and keys are stored in the database (if any)
+PRIVATE_KEY="db:SSL,private_key"
+CERTIFICATE="db:SSL,certificate"
+BOOTSTRAP_CA_CERT="db:SSL,ca_cert"
+
+# Alternative path for the database (default is /etc/openvswitch/conf.db)
+# DATABASE="/etc/openvswitch/conf.db"
+
+# Additional options
+# OPTIONS=""
diff --git a/net-misc/openvswitch/metadata.xml b/net-misc/openvswitch/metadata.xml
new file mode 100644
index 000000000000..58ed9eb0f936
--- /dev/null
+++ b/net-misc/openvswitch/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>dev-zero@gentoo.org</email>
+</maintainer>
+<herd>virtualization</herd>
+<use>
+ <flag name='monitor'>Build the Python and GUI dependent monitor applications</flag>
+ <flag name='pyside'>Use <pkg>dev-python/pyside</pkg> instead of <pkg>dev-python/PyQt4</pkg> for Python/Qt-bindings when building with USE=monitor.</flag>
+</use>
+</pkgmetadata>
diff --git a/net-misc/openvswitch/openvswitch-1.6.1.ebuild b/net-misc/openvswitch/openvswitch-1.6.1.ebuild
new file mode 100644
index 000000000000..41fdd1aa18ae
--- /dev/null
+++ b/net-misc/openvswitch/openvswitch-1.6.1.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openvswitch/openvswitch-1.6.1.ebuild,v 1.1 2012/06/27 08:49:35 dev-zero Exp $
+
+EAPI=4
+
+PYTHON_DEPEND="monitor? 2"
+
+inherit eutils linux-info python
+
+DESCRIPTION="Production quality, multilayer virtual switch."
+HOMEPAGE="http://openvswitch.org"
+SRC_URI="http://openvswitch.org/releases/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="debug monitor +pyside +ssl"
+
+RDEPEND="ssl? ( dev-libs/openssl )
+ monitor? ( dev-python/twisted
+ dev-python/twisted-conch
+ pyside? ( dev-python/pyside )
+ !pyside? ( dev-python/PyQt4 )
+ net-zope/zope-interface )
+ debug? ( dev-lang/perl )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+CONFIG_CHECK="~NET_CLS_ACT ~NET_CLS_U32 ~NET_SCH_INGRESS ~NET_ACT_POLICE ~IPV6 ~TUN ~OPENVSWITCH"
+
+pkg_setup() {
+ linux-info_pkg_setup
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_configure() {
+ set_arch_to_kernel
+ use monitor || export ovs_cv_python="no"
+ use pyside || export ovs_cv_pyuic4="no"
+ local modconf
+ econf ${modconf} \
+ --with-rundir=/var/run/openvswitch \
+ --with-logdir=/var/log/openvswitch \
+ --with-pkidir=/etc/openvswitch/pki \
+ $(use_enable ssl) \
+ $(use_enable !debug ndebug)
+}
+
+src_compile() {
+ default
+
+ use monitor && python_convert_shebangs 2 \
+ utilities/ovs-{pcap,tcpundump,test,vlan-test} \
+ utilities/bugtool/ovs-bugtool \
+ ovsdb/ovsdbmonitor/ovsdbmonitor
+}
+
+src_install() {
+ default
+
+ # not working without the brcompat_mod kernel module which did not get
+ # included in the kernel and we can't build it anymore
+ rm "${D}/usr/sbin/ovs-brcompatd" "${D}/usr/share/man/man8/ovs-brcompatd.8"
+
+ keepdir /var/log/openvswitch
+ keepdir /etc/openvswitch/pki
+
+ rm -rf "${D}/var/run"
+ use monitor || rmdir "${D}/usr/share/openvswitch/ovsdbmonitor"
+ use debug || rm "${D}/usr/bin/ovs-parse-leaks"
+
+ newconfd "${FILESDIR}/ovsdb-server_conf" ovsdb-server
+ newconfd "${FILESDIR}/ovs-vswitchd_conf" ovs-vswitchd
+ doinitd "${FILESDIR}/ovsdb-server"
+ doinitd "${FILESDIR}/ovs-vswitchd"
+
+ insinto /etc/logrotate.d
+ newins rhel/etc_logrotate.d_openvswitch openvswitch
+}
+
+pkg_postinst() {
+ use monitor && python_mod_optimize /usr/share/openvswitch/ovsdbmonitor
+ python_mod_optimize /usr/share/openvswitch/python
+
+ elog "Use the following command to create an initial database for ovsdb-server:"
+ elog " emerge --config =${CATEGORY}/${PF}"
+ elog "(will create a database in /etc/openvswitch/conf.db)"
+}
+
+pkg_postrm() {
+ use monitor && python_mod_cleanup /usr/share/openvswitch/ovsdbmonitor
+ python_mod_cleanup /usr/share/openvswitch/python
+}
+
+pkg_config() {
+ local db="${PREFIX}/etc/openvswitch/conf.db"
+ if [ -e "${db}" ] ; then
+ eerror "Database already exists in ${db}, please remove it first."
+ die "${db} already exists"
+ fi
+ "${PREFIX}/usr/bin/ovsdb-tool" create "${db}" /usr/share/openvswitch/vswitch.ovsschema
+}