summaryrefslogtreecommitdiff
path: root/net-misc/openvswitch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-misc/openvswitch
reinit the tree, so we can have metadata
Diffstat (limited to 'net-misc/openvswitch')
-rw-r--r--net-misc/openvswitch/Manifest19
-rw-r--r--net-misc/openvswitch/files/openvswitch.tmpfiles1
-rw-r--r--net-misc/openvswitch/files/ovs-vswitchd-r121
-rw-r--r--net-misc/openvswitch/files/ovs-vswitchd.service15
-rw-r--r--net-misc/openvswitch/files/ovs-vswitchd_conf6
-rw-r--r--net-misc/openvswitch/files/ovsdb-server-r134
-rw-r--r--net-misc/openvswitch/files/ovsdb-server.service14
-rw-r--r--net-misc/openvswitch/files/ovsdb-server_conf16
-rw-r--r--net-misc/openvswitch/files/ovsdb-server_conf216
-rw-r--r--net-misc/openvswitch/files/xcp-interface-reconfigure-2.3.2.patch20
-rw-r--r--net-misc/openvswitch/metadata.xml17
-rw-r--r--net-misc/openvswitch/openvswitch-2.6.1.ebuild159
-rw-r--r--net-misc/openvswitch/openvswitch-2.7.2-r1.ebuild155
-rw-r--r--net-misc/openvswitch/openvswitch-2.7.2.ebuild152
-rw-r--r--net-misc/openvswitch/openvswitch-2.8.1.ebuild155
15 files changed, 800 insertions, 0 deletions
diff --git a/net-misc/openvswitch/Manifest b/net-misc/openvswitch/Manifest
new file mode 100644
index 000000000000..a2769ec96a7e
--- /dev/null
+++ b/net-misc/openvswitch/Manifest
@@ -0,0 +1,19 @@
+AUX openvswitch.tmpfiles 40 SHA256 34bd2c1b2e3a67fe71922f85d8348737d8c79e498f6aee1f6130d28a6844876c SHA512 020aaa9599b853d75a612f7bbd4ef8ea024908f283afe5c727f5d2a1f3a5a98634f82d840b3ebf886b9a82e9c60c237ced2fb13057bc7bb9ab5c449e11b51997 WHIRLPOOL 8551d8bc62ac8d7a344e756e96ac1f4d0fbfcc6ed8309437d71401a15b1da26277bfa4dcf6964a7fb4673a3eaf327c7911a078601742c225c8b8fab73b282c2f
+AUX ovs-vswitchd-r1 436 SHA256 42d1203da4ea855e111bea0b4faf175b82907ed8af93a4271b46bc4c9003dedb SHA512 7a98f85251a7b60d93a28ade482669537585fc05265cc51eb61e283739537df980230bd5f9dccfdb60772afe3f0bf2493eed9a25b289c7ef37d998e8ca5ec4df WHIRLPOOL 524fd908a191039f816df9315123c9d21ddd8f115bcee31f1b022c0a9c104df97c0f433af40adbaa095f03ba9ac4bed361cdc42f64ef82992d095b0ee414b044
+AUX ovs-vswitchd.service 393 SHA256 87e54341221e22ef86dfbe18e96a125f12046795c8cc03acea2914bf6afef707 SHA512 74d2ba9b76ad29dbb75e9b3321e1e714140a1c9bf9f5176c8418b025ffdb9c14d9f532709835c163c7256b4c81d69b522fcbc12d6bd9399283c8bd45b94cd7f2 WHIRLPOOL cbc92f53a4c23dc89fae73a96fc9203787a2b8828389edcb14d3e5b0e1cd1f5393f960fbab80bbd934011f53b9ff770b2a123b3ca61afc1e3c50985387edf01c
+AUX ovs-vswitchd_conf 164 SHA256 438c58741562af201c816f0a72101b5abb0e75788369bb04ed57be28425e5f81 SHA512 2e65f8658b6120e30849a8b3b0268d7776635c36bdd77920537355fc1883f306d3df5c78d2a5fefffdcf76b093b126f9d315c1595cd0ab643ac5f000c8b4f439 WHIRLPOOL 3cf05adfa5f1bfecdf022442c26b100ae3e63db7a1837b441fcef46e8864103eb3e761735ad1d81ad5d105cbc978d12e96449edf70aef3eb7d310080ce50ce9a
+AUX ovsdb-server-r1 855 SHA256 9c1e14ad81ad8d95a75358a7641d3a3ef4ced6e7d48ca3feb362b76d358de870 SHA512 fa51b2a661c1bdd345adf58c2b0e4c4c68bb4ed4ce78dc6e195ba9fe662fa451753664c72f56d755cfa682d0c9accd283dc501aee3c4ba58238f44df1ddaf5a5 WHIRLPOOL f7aa66e625bff40c3f2968d74b1dce3ec0f6f46bef98c597eaadace9cf743246d0f4d075287e06885f30305cbd611e8f549664fc4491b34d481e265b0547b2af
+AUX ovsdb-server.service 480 SHA256 44049e1b675590bdacf4dc8ba2e9fa1a721c694b730a7951eec9a945f8933b9b SHA512 cb9196ebdb7f16eca4182172a079027dc2c28f366d0a4f9251480b20172758cb581cd91b9a0f2a3dde95742455bec9ef96aa584305f17bdc97b3de7d4c99aa19 WHIRLPOOL e78085be373ae2d31e7d153d95b19728304e94352c88fad33078483951e975343e64137bf44ddff2e18e723e5a9fb6464685a2efad65eaac3c554dad83da60b0
+AUX ovsdb-server_conf 492 SHA256 15c508d134fed8cda13e2d394fc7c20b9868294a30e73a952ebffd31df129251 SHA512 a9aab68cf5188ebdff520e8ae1bc90018fab13fea5cf7c36dda42a4acdeb842de8344191f2f52213ea173a73e647fe48e7bd29ce6974c9bf3880d0f91a3713aa WHIRLPOOL 076bbaf28d36bc6a748ee38c5b574946e938a78de4ac2948894cb41f9b639d04d3427019d227fcd559252869794004c1f467f6dfb23f0ab60450450d2cd7973f
+AUX ovsdb-server_conf2 544 SHA256 d0d8a6a7256f4cc47ab1b9f9f7657202388133bcfff3668e7c1d4adbcc572261 SHA512 b1588d076bbfc7ef2dd46fce8e46186f40cbbc4667697f7ac13ddc68e34568fdab315fde47838de7f6d32916853190336cfe3735f672ad7cb624ae14dbff55a5 WHIRLPOOL 40ee3ad1cce80c053da80b410209546b427963e06f9713396823f1d97b535e34c9c2c19212a096685cb08d7214751c731c1652f883f7f4b7cdc418d5fd56524d
+AUX xcp-interface-reconfigure-2.3.2.patch 920 SHA256 e7b08bb9370235f1c803c66cbfd9963e98afc26aa136f2b78fd090f766365a02 SHA512 7f2dd6fbd3f734abe2cf8e23a0aa49d81a8acb26ac5c28004a95ec0fe4630f7792aabdaeb8825a62ff96fcf1c3a871eea10b11c6b92ddf7965aa1f73150f7ec7 WHIRLPOOL 5d4b3cf29485039a46f5e368ce59af0c4384f701e122f6fc3928116f1a65855e40be3d7f9e28420df93c75032e50ff0549ea8246d9f93c4f33a79ddc38cee67f
+DIST openvswitch-2.6.1.tar.gz 5399107 SHA256 307b20aba6a179bf13e5da9ac242933c31349073762473a9d4782619c8c1cf0c SHA512 c5a716d2d9ac5f353827a4ad1e26f4d0ddfc4d7bf1e8f696043c32676e77c068e3e0dd423348cc33d5507753d7a27ce24898b823dad3fbc6a8d79297fa088b39 WHIRLPOOL 1ab35852ad45fc99964c814923ea54b22ec6c4630b2aa6cb6aee7b96ca806095d0be60c1b08f926419efa79a3c7ce4d484efe497bb50a9596db69b6020175092
+DIST openvswitch-2.7.2.tar.gz 6192414 SHA256 fe36c86ed52f6f7c17b01cdbb7ae37bf521cc5c2e50997b618f3f742485f655b SHA512 790a715dd31729893a1c21af4197400b7362569d15cb763cbbab82830c5f5168d2dea0cb40282faa17734a2ad967bc40d02b8f4f92ea585164386d2aa0719470 WHIRLPOOL 6525d475cc10b3e32d5b9c01cbfd909dff3cfad28bbe13bf55b5775471a58fd49e9f9cf484a9e68a0f371c56824910142513c34dc5d2f11a0dcebf5b789e75d4
+DIST openvswitch-2.8.1.tar.gz 6746474 SHA256 8d1c439e26d7044f0ec823c7fef1b00b7c6465da0b83a7d0cf3191ed1dc43893 SHA512 b9e90b49bb91aef80942b146e7e324b74f8961342dcc7836f2551ea976a69d66506a3a739bcb01a926b3b3874c7e4312de02965738a1536a342ab95f935d92f7 WHIRLPOOL 864ac85d1330cf04cf499dcbbbed0e0b09351795a5ecd780e0f94cae3dc744229875181cea05fa39a7108583271319cedc7a0dfc77b7793453c76604e81a7fe1
+EBUILD openvswitch-2.6.1.ebuild 4598 SHA256 f436e9db6e428229e01604db4665165cd62df91dac8566e6443f5b397243ef7d SHA512 9a721804797c2097a9b80685e11be009205cdba66732920bf73b7f86c5cb0d1564965e806e276ddbfb33ed95f61e8a440bca099059cb7e42f7e37e220901f614 WHIRLPOOL 777fc8051def0d208fbdf0572d7c109bd376a22d1f086298023c55da68e28090f6afc7976d54b0d4884e2967b99820bf96a1c6056ad5bf409798eaf8663ef8ff
+EBUILD openvswitch-2.7.2-r1.ebuild 4477 SHA256 6d08777c9fa1dfa66a20323dff93eedb42b0da08e96388d6957217db6c05c22c SHA512 c50955052fc0164de1301d160cca3411f311e4c2f537e86077fc1ec6f63d13c17328677beb085eda01ba857f20af912b56da4beb2ac2a77eb409703ce4a51fda WHIRLPOOL cf6cbb7d02b0f15edf5f51c1ad10d2c90b26f4f9fa5423f90e0894fb4c1936430dab57707e746d27e8e26c3a7e3424c16938d04aa52cd0a280634e2d8eb1b046
+EBUILD openvswitch-2.7.2.ebuild 4424 SHA256 7b20bad4a9114fd6e68365bb3e8cdabab90048ccec6f2105974957c9d675e28d SHA512 b7e20f241c64c3fb02874bae2a2ad57b6d855d5f6c48ba6dc86ffc678a57cf1f129105c3f34d20b8ecc18f31924ad39e78096eba68a78aecaf343c6ccbae78cf WHIRLPOOL a2f837fc968db4b107ce3e14d3544508ac34fae5d3c6d4efbac53dcb0180ba5e205aa1c9290d86335d4bbef12a7f55f40763c6557c70a9724fb3af4f5d44b920
+EBUILD openvswitch-2.8.1.ebuild 4483 SHA256 d42d11464d144e3826490f65ea7e46d1f5b17ce7bd44f472429c7d1f20634362 SHA512 ee99f6b6d488ad725275dfb23055b8732e1a0d441c61c79bb4a9305a9c1c08065c4a181d4bc8e15d8457f7588ceb23595987f239ceb6f723ed5ae8bd972d305a WHIRLPOOL e6fac63860d3deccbf0af61147402fc7e70cd7067df6fb1b91cfa00e485e3452d366c8a567b0885d68d3c67d16719e0e2b76ecd0c9fefe1cf8bfa46b3dff4c7a
+MISC ChangeLog 7223 SHA256 d517f25f2aa4647e87c93cb7a95eb9ed905fc9f2a969cdd73e9bf8e06a408ea9 SHA512 ef53da2138c7f8fac43b850dac72a11a4de37dc0c32813ab9dfed1d6929b82cc139deaf092e2d6e1c1f45039ae9855a64960644121e066578b63e60a03b3d987 WHIRLPOOL 469d54ba28cb540435c7a803f5fabfdc1a2aebc00745df65719a588eb628e5ca94799ae8bbae22a8484956ad8bf80ccf93306c0876ccd6b6920815609e59007c
+MISC ChangeLog-2015 6297 SHA256 cdc094f2be0b8004a39cb8b49c58fff84fcb574ba0a26dfddbf2406f3bc21c62 SHA512 752e17557a57cc42f0e8e0065ce5e4fa0c8b90ae5eb635f987a55fab9d9efa0f8d18f6359bbea096917a7fdf0502660b0b700c3c0e339d57222f178db40aebc6 WHIRLPOOL 1d01028fdd6a83d86d21582a252dfe9e47758fd0f3567e7adf1f3e908cef0c52d9c0bfa910c6bde0f7a8d6010a3f49eb9e4af08456878ab8b2d758beb2a6a6fb
+MISC metadata.xml 538 SHA256 e9f11468f6ead889035a33ddb52b7744715b2588770c8ae6a6803f1e6711349d SHA512 79f8fecddfb657298b4c261eb8c6d502cf5e320764acdc92fb97ac6f67379ec10faf553e8a3a0a37d4d650b52c0fa827e485655dbaa126f97d19fbf7b8fbeffd WHIRLPOOL 15f2515fa82f8f09d8bf908cbbe1e122e93dd299841ce57efec981c494e4f9f22fc71bebb188c2a11c3e2197fc969ce449800f703e2fa81e274ee14058c99c8d
diff --git a/net-misc/openvswitch/files/openvswitch.tmpfiles b/net-misc/openvswitch/files/openvswitch.tmpfiles
new file mode 100644
index 000000000000..58c583ee4747
--- /dev/null
+++ b/net-misc/openvswitch/files/openvswitch.tmpfiles
@@ -0,0 +1 @@
+d /var/run/openvswitch 0770 root root -
diff --git a/net-misc/openvswitch/files/ovs-vswitchd-r1 b/net-misc/openvswitch/files/ovs-vswitchd-r1
new file mode 100644
index 000000000000..bc5602a60030
--- /dev/null
+++ b/net-misc/openvswitch/files/ovs-vswitchd-r1
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="Open vSwitch virtual switch"
+
+command="/usr/sbin/ovs-vswitchd"
+command_args="
+ --pidfile
+ --detach
+ --monitor
+ ${OPTIONS} ${DATABASE}"
+pidfile="/var/run/openvswitch/ovs-vswitchd.pid"
+
+depend() {
+ use ovsdb-server logger
+}
+
+start_pre() {
+ checkpath -d "/var/run/openvswitch" -m 0750
+}
diff --git a/net-misc/openvswitch/files/ovs-vswitchd.service b/net-misc/openvswitch/files/ovs-vswitchd.service
new file mode 100644
index 000000000000..a573a503e14c
--- /dev/null
+++ b/net-misc/openvswitch/files/ovs-vswitchd.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Open vSwitch Daemon
+Documentation=man:ovs-vswitchd
+Wants=network.target
+Before=network.target
+Requires=ovsdb-server.service
+After=ovsdb-server.service
+
+[Service]
+# --pidfile options is needed for create file used
+# by ovs-appctl command.
+ExecStart=/usr/sbin/ovs-vswitchd --mlockall --monitor unix:/var/run/openvswitch/db.sock --pidfile
+
+[Install]
+WantedBy=multi-user.target
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-r1 b/net-misc/openvswitch/files/ovsdb-server-r1
new file mode 100644
index 000000000000..f7360adbb4c8
--- /dev/null
+++ b/net-misc/openvswitch/files/ovsdb-server-r1
@@ -0,0 +1,34 @@
+#!/sbin/openrc-run
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="Open vSwitch database server"
+
+remote_punix=${DB_SOCKET:+"--remote=punix:${DB_SOCKET}"}
+remote_db=${REMOTE_DB:+"--remote=${REMOTE_DB}"}
+private_key=${PRIVATE_KEY:+"--private-key=${PRIVATE_KEY}"}
+certificate=${CERTIFICATE:+"--certificate=${CERTIFICATE}"}
+bootstrap_ca_cert=${BOOTSTRAP_CA_CERT:+"--bootstrap-ca-cert=${BOOTSTRAP_CA_CERT}"}
+
+command="/usr/sbin/ovsdb-server"
+command_args="
+ --pidfile
+ --detach
+ --monitor
+ ${remote_punix}
+ ${remote_db}
+ ${private_key}
+ ${certificate}
+ ${bootstrap_ca_cert}
+ ${DATABASE}
+ ${OPTIONS}"
+pidfile="/var/run/openvswitch/ovsdb-server.pid"
+
+depend() {
+ need localmount
+ use logger
+}
+
+start_pre() {
+ checkpath -d "/var/run/openvswitch" -m 0750
+}
diff --git a/net-misc/openvswitch/files/ovsdb-server.service b/net-misc/openvswitch/files/ovsdb-server.service
new file mode 100644
index 000000000000..9493c40755d8
--- /dev/null
+++ b/net-misc/openvswitch/files/ovsdb-server.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Open vSwitch Database Server
+Documentation=man:ovsdb-server
+
+[Service]
+# The file can be shared for this as this values are prone to change
+# and that way we don't need to update them in two different places
+EnvironmentFile=/etc/conf.d/ovsdb-server
+ExecStart=/usr/sbin/ovsdb-server --monitor \
+ --remote=punix:${DB_SOCKET} \
+ --remote=${REMOTE_DB} \
+ --private-key=${PRIVATE_KEY} \
+ --certificate=${CERTIFICATE} \
+ --bootstrap-ca-cert=${BOOTSTRAP_CA_CERT}
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/files/ovsdb-server_conf2 b/net-misc/openvswitch/files/ovsdb-server_conf2
new file mode 100644
index 000000000000..97367b9717e7
--- /dev/null
+++ b/net-misc/openvswitch/files/ovsdb-server_conf2
@@ -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,Open_vSwitch,manager_options"
+
+# All certificates and keys are stored in the database (if any)
+PRIVATE_KEY="db:Open_vSwitch,SSL,private_key"
+CERTIFICATE="db:Open_vSwitch,SSL,certificate"
+BOOTSTRAP_CA_CERT="db:Open_vSwitch,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/files/xcp-interface-reconfigure-2.3.2.patch b/net-misc/openvswitch/files/xcp-interface-reconfigure-2.3.2.patch
new file mode 100644
index 000000000000..e5f813b6755a
--- /dev/null
+++ b/net-misc/openvswitch/files/xcp-interface-reconfigure-2.3.2.patch
@@ -0,0 +1,20 @@
+Description: Use xcp-xapi interface-reconfigure if found
+ Ubuntu/Debian provide the XCP interface-reconfigure hook in
+ a FHS compliant location; use this if found.
+Author: James Page <james.page@ubuntu.com>
+Ubuntu-Bug: https://bugs.launchpad.net/ubuntu/+source/openvswitch/+bug/1195053
+Forwarded: no
+
+--- a/xenserver/etc_xapi.d_plugins_openvswitch-cfg-update
++++ b/xenserver/etc_xapi.d_plugins_openvswitch-cfg-update
+@@ -43,6 +43,10 @@ def delete_cacert():
+ def update(session, args):
+ # Refresh bridge network UUIDs in case this host joined or left a pool.
+ script = '/opt/xensource/libexec/interface-reconfigure'
++ # NOTE(jamespage): Override with distro xcp xapi locations
++ # if present
++ if os.path.exists('/usr/lib/xcp/lib/interface-reconfigure'):
++ script = '/usr/lib/xcp/lib/interface-reconfigure'
+ try:
+ retval = subprocess.call([script, 'rewrite'])
+ if retval != 0:
diff --git a/net-misc/openvswitch/metadata.xml b/net-misc/openvswitch/metadata.xml
new file mode 100644
index 000000000000..cd4755d9fd44
--- /dev/null
+++ b/net-misc/openvswitch/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>dev-zero@gentoo.org</email>
+ </maintainer>
+ <maintainer type="person">
+ <email>prometheanfire@gentoo.org</email>
+ </maintainer>
+ <maintainer type="project">
+ <email>virtualization@gentoo.org</email>
+ <name>Gentoo Virtualization Project</name>
+ </maintainer>
+ <use>
+ <flag name="monitor">Build the Python and GUI dependent monitor applications</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/openvswitch/openvswitch-2.6.1.ebuild b/net-misc/openvswitch/openvswitch-2.6.1.ebuild
new file mode 100644
index 000000000000..9d7d5282fc39
--- /dev/null
+++ b/net-misc/openvswitch/openvswitch-2.6.1.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+
+inherit autotools eutils linux-info linux-mod python-r1 systemd
+
+DESCRIPTION="Production quality, multilayer virtual switch"
+HOMEPAGE="http://openvswitch.org"
+SRC_URI="http://openvswitch.org/releases/${P}.tar.gz"
+
+LICENSE="Apache-2.0 GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug modules monitor +ssl"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+ || (
+ >=sys-apps/openrc-0.10.5
+ sys-apps/systemd
+ )
+ ssl? ( dev-libs/openssl:0= )
+ ${PYTHON_DEPS}
+ ~dev-python/ovs-${PV}
+ dev-python/twisted-core
+ dev-python/twisted-conch
+ dev-python/twisted-web
+ dev-python/zope-interface[${PYTHON_USEDEP}]
+ debug? ( dev-lang/perl )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES="${FILESDIR}/xcp-interface-reconfigure-2.3.2.patch"
+
+CONFIG_CHECK="~NET_CLS_ACT ~NET_CLS_U32 ~NET_SCH_INGRESS ~NET_ACT_POLICE ~IPV6 ~TUN"
+MODULE_NAMES="openvswitch(net:${S}/datapath/linux)"
+BUILD_TARGETS="all"
+
+pkg_setup() {
+ if use modules ; then
+ CONFIG_CHECK+=" ~!OPENVSWITCH"
+ kernel_is ge 3 10 0 || die "Linux >= 3.10.0 and <= 4.8 required for userspace modules"
+ kernel_is le 4 7 999 || die "Linux >= 3.10.0 and <= 4.8 required for userspace modules"
+ linux-mod_pkg_setup
+ else
+ CONFIG_CHECK+=" ~OPENVSWITCH"
+ linux-info_pkg_setup
+ fi
+}
+
+src_prepare() {
+ # Never build kernelmodules, doing this manually
+ sed -i \
+ -e '/^SUBDIRS/d' \
+ datapath/Makefile.in || die "sed failed"
+ eautoreconf
+ default
+}
+
+src_configure() {
+ set_arch_to_kernel
+ #monitor ist statically enabled for bug 596206
+ #use monitor || export ovs_cv_python="no"
+ #pyside is staticly disabled
+ export ovs_cv_pyuic4="no"
+
+ local linux_config
+ use modules && linux_config="--with-linux=${KV_OUT_DIR}"
+
+ econf ${linux_config} \
+ --with-rundir=/var/run/openvswitch \
+ --with-logdir=/var/log/openvswitch \
+ --with-pkidir=/etc/ssl/openvswitch \
+ --with-dbdir=/var/lib/openvswitch \
+ $(use_enable ssl) \
+ $(use_enable !debug ndebug)
+}
+
+src_compile() {
+ default
+
+ use modules && linux-mod_src_compile
+}
+
+src_install() {
+ default
+
+ local SCRIPT
+ for SCRIPT in ovs-{pcap,parse-backtrace,dpctl-top,l3ping,tcpundump,test,vlan-test} bugtool/ovs-bugtool; do
+ sed -e '1s|^.*$|#!/usr/bin/python|' -i utilities/"${SCRIPT}" || die
+ python_foreach_impl python_doscript utilities/"${SCRIPT}"
+ done
+
+ python_foreach_impl python_optimize "${ED%/}"/usr/share/ovsdbmonitor
+
+ rm -r "${ED%/}"/usr/share/openvswitch/python || die
+
+ keepdir /var/{lib,log}/openvswitch
+ keepdir /etc/ssl/openvswitch
+ fperms 0750 /etc/ssl/openvswitch
+
+ rm -rf "${ED%/}"/var/run || die
+ # monitor is statically enabled for bug 596206
+ #if ! use monitor ; then
+ # rm -r "${ED%/}"/usr/share/ovsdbmonitor || die
+ #fi
+
+ newconfd "${FILESDIR}/ovsdb-server_conf2" ovsdb-server
+ newconfd "${FILESDIR}/ovs-vswitchd_conf" ovs-vswitchd
+ newinitd "${FILESDIR}/ovsdb-server-r1" ovsdb-server
+ newinitd "${FILESDIR}/ovs-vswitchd-r1" ovs-vswitchd
+
+ systemd_dounit "${FILESDIR}/ovsdb-server.service"
+ systemd_dounit "${FILESDIR}/ovs-vswitchd.service"
+ systemd_newtmpfilesd "${FILESDIR}/openvswitch.tmpfiles" openvswitch.conf
+
+ insinto /etc/logrotate.d
+ newins rhel/etc_logrotate.d_openvswitch openvswitch
+
+ use modules && linux-mod_src_install
+}
+
+pkg_postinst() {
+ use modules && linux-mod_pkg_postinst
+
+ local pv
+ for pv in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 1.9.0 ${pv} ; then
+ ewarn "The configuration database for Open vSwitch got moved in version 1.9.0 from"
+ ewarn " /etc/openvswitch"
+ ewarn "to"
+ ewarn " /var/lib/openvswitch"
+ ewarn "Please copy/move the database manually before running the schema upgrade."
+ ewarn "The PKI files are now supposed to go to /etc/ssl/openvswitch"
+ fi
+ done
+
+ elog "Use the following command to create an initial database for ovsdb-server:"
+ elog " emerge --config =${CATEGORY}/${PF}"
+ elog "(will create a database in /var/lib/openvswitch/conf.db)"
+ elog "or to convert the database to the current schema after upgrading."
+}
+
+pkg_config() {
+ local db="${EROOT%/}"/var/lib/openvswitch/conf.db
+ if [[ -e "${db}" ]] ; then
+ einfo "Database '${db}' already exists, doing schema migration..."
+ einfo "(if the migration fails, make sure that ovsdb-server is not running)"
+ ovsdb-tool convert "${db}" \
+ "${EROOT%/}"/usr/share/openvswitch/vswitch.ovsschema || die "converting database failed"
+ else
+ einfo "Creating new database '${db}'..."
+ ovsdb-tool create "${db}" \
+ "${EROOT%/}"/usr/share/openvswitch/vswitch.ovsschema || die "creating database failed"
+ fi
+}
diff --git a/net-misc/openvswitch/openvswitch-2.7.2-r1.ebuild b/net-misc/openvswitch/openvswitch-2.7.2-r1.ebuild
new file mode 100644
index 000000000000..d8f19c8e8535
--- /dev/null
+++ b/net-misc/openvswitch/openvswitch-2.7.2-r1.ebuild
@@ -0,0 +1,155 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+
+inherit autotools eutils linux-info linux-mod python-r1 systemd
+
+DESCRIPTION="Production quality, multilayer virtual switch"
+HOMEPAGE="http://openvswitch.org"
+SRC_URI="http://openvswitch.org/releases/${P}.tar.gz"
+
+LICENSE="Apache-2.0 GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm64 x86"
+IUSE="debug modules monitor +ssl"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+ || (
+ >=sys-apps/openrc-0.10.5
+ sys-apps/systemd
+ )
+ ssl? ( dev-libs/openssl:0= )
+ ${PYTHON_DEPS}
+ ~dev-python/ovs-2.7.0[${PYTHON_USEDEP}]
+ || (
+ dev-python/twisted[conch,${PYTHON_USEDEP}]
+ dev-python/twisted-web[${PYTHON_USEDEP}]
+ )
+ dev-python/zope-interface[${PYTHON_USEDEP}]
+ debug? ( dev-lang/perl )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES="${FILESDIR}/xcp-interface-reconfigure-2.3.2.patch"
+
+CONFIG_CHECK="~NET_CLS_ACT ~NET_CLS_U32 ~NET_SCH_INGRESS ~NET_ACT_POLICE ~IPV6 ~TUN"
+MODULE_NAMES="openvswitch(net:${S}/datapath/linux)"
+BUILD_TARGETS="all"
+
+pkg_setup() {
+ if use modules ; then
+ CONFIG_CHECK+=" ~!OPENVSWITCH"
+ kernel_is ge 3 10 0 || die "Linux >= 3.10.0 and <= 4.8 required for userspace modules"
+ kernel_is le 4 9 999 || die "Linux >= 3.10.0 and <= 4.8 required for userspace modules"
+ linux-mod_pkg_setup
+ else
+ CONFIG_CHECK+=" ~OPENVSWITCH"
+ linux-info_pkg_setup
+ fi
+}
+
+src_prepare() {
+ # Never build kernelmodules, doing this manually
+ sed -i \
+ -e '/^SUBDIRS/d' \
+ datapath/Makefile.in || die "sed failed"
+ eautoreconf
+ default
+}
+
+src_configure() {
+ set_arch_to_kernel
+ # monitor is statically enabled for bug 596206
+ use monitor || export ovs_cv_python="no"
+ # pyside is staticly disabled
+ export ovs_cv_pyuic4="no"
+
+ local linux_config
+ use modules && linux_config="--with-linux=${KV_OUT_DIR}"
+
+ econf ${linux_config} \
+ --with-rundir=/var/run/openvswitch \
+ --with-logdir=/var/log/openvswitch \
+ --with-pkidir=/etc/ssl/openvswitch \
+ --with-dbdir=/var/lib/openvswitch \
+ $(use_enable ssl) \
+ $(use_enable !debug ndebug)
+}
+
+src_compile() {
+ default
+
+ use modules && linux-mod_src_compile
+}
+
+src_install() {
+ default
+
+ local SCRIPT
+ if use monitor; then
+ for SCRIPT in ovs-{pcap,parse-backtrace,dpctl-top,l3ping,tcpdump,tcpundump,test,vlan-test} bugtool/ovs-bugtool; do
+ sed -e '1s|^.*$|#!/usr/bin/python|' -i utilities/"${SCRIPT}"
+ python_foreach_impl python_doscript utilities/"${SCRIPT}"
+ done
+ rm -r "${ED%/}"/usr/share/openvswitch/python || die
+ fi
+
+ keepdir /var/{lib,log}/openvswitch
+ keepdir /etc/ssl/openvswitch
+ fperms 0750 /etc/ssl/openvswitch
+
+ rm -rf "${ED%/}"/var/run || die
+
+ newconfd "${FILESDIR}/ovsdb-server_conf2" ovsdb-server
+ newconfd "${FILESDIR}/ovs-vswitchd_conf" ovs-vswitchd
+ newinitd "${FILESDIR}/ovsdb-server-r1" ovsdb-server
+ newinitd "${FILESDIR}/ovs-vswitchd-r1" ovs-vswitchd
+
+ systemd_dounit "${FILESDIR}/ovsdb-server.service"
+ systemd_dounit "${FILESDIR}/ovs-vswitchd.service"
+ systemd_newtmpfilesd "${FILESDIR}/openvswitch.tmpfiles" openvswitch.conf
+
+ insinto /etc/logrotate.d
+ newins rhel/etc_logrotate.d_openvswitch openvswitch
+
+ use modules && linux-mod_src_install
+}
+
+pkg_postinst() {
+ use modules && linux-mod_pkg_postinst
+
+ local pv
+ for pv in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 1.9.0 ${pv} ; then
+ ewarn "The configuration database for Open vSwitch got moved in version 1.9.0 from"
+ ewarn " /etc/openvswitch"
+ ewarn "to"
+ ewarn " /var/lib/openvswitch"
+ ewarn "Please copy/move the database manually before running the schema upgrade."
+ ewarn "The PKI files are now supposed to go to /etc/ssl/openvswitch"
+ fi
+ done
+
+ elog "Use the following command to create an initial database for ovsdb-server:"
+ elog " emerge --config =${CATEGORY}/${PF}"
+ elog "(will create a database in /var/lib/openvswitch/conf.db)"
+ elog "or to convert the database to the current schema after upgrading."
+}
+
+pkg_config() {
+ local db="${EROOT%/}"/var/lib/openvswitch/conf.db
+ if [[ -e "${db}" ]] ; then
+ einfo "Database '${db}' already exists, doing schema migration..."
+ einfo "(if the migration fails, make sure that ovsdb-server is not running)"
+ ovsdb-tool convert "${db}" \
+ "${EROOT%/}"/usr/share/openvswitch/vswitch.ovsschema || die "converting database failed"
+ else
+ einfo "Creating new database '${db}'..."
+ ovsdb-tool create "${db}" \
+ "${EROOT%/}"/usr/share/openvswitch/vswitch.ovsschema || die "creating database failed"
+ fi
+}
diff --git a/net-misc/openvswitch/openvswitch-2.7.2.ebuild b/net-misc/openvswitch/openvswitch-2.7.2.ebuild
new file mode 100644
index 000000000000..596a2985f9c7
--- /dev/null
+++ b/net-misc/openvswitch/openvswitch-2.7.2.ebuild
@@ -0,0 +1,152 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+
+inherit autotools eutils linux-info linux-mod python-r1 systemd
+
+DESCRIPTION="Production quality, multilayer virtual switch"
+HOMEPAGE="http://openvswitch.org"
+SRC_URI="http://openvswitch.org/releases/${P}.tar.gz"
+
+LICENSE="Apache-2.0 GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm64 x86"
+IUSE="debug modules monitor +ssl"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+ || (
+ >=sys-apps/openrc-0.10.5
+ sys-apps/systemd
+ )
+ ssl? ( dev-libs/openssl:0= )
+ ${PYTHON_DEPS}
+ ~dev-python/ovs-2.7.0[${PYTHON_USEDEP}]
+ dev-python/twisted[conch,${PYTHON_USEDEP}]
+ dev-python/zope-interface[${PYTHON_USEDEP}]
+ debug? ( dev-lang/perl )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES="${FILESDIR}/xcp-interface-reconfigure-2.3.2.patch"
+
+CONFIG_CHECK="~NET_CLS_ACT ~NET_CLS_U32 ~NET_SCH_INGRESS ~NET_ACT_POLICE ~IPV6 ~TUN"
+MODULE_NAMES="openvswitch(net:${S}/datapath/linux)"
+BUILD_TARGETS="all"
+
+pkg_setup() {
+ if use modules ; then
+ CONFIG_CHECK+=" ~!OPENVSWITCH"
+ kernel_is ge 3 10 0 || die "Linux >= 3.10.0 and <= 4.8 required for userspace modules"
+ kernel_is le 4 9 999 || die "Linux >= 3.10.0 and <= 4.8 required for userspace modules"
+ linux-mod_pkg_setup
+ else
+ CONFIG_CHECK+=" ~OPENVSWITCH"
+ linux-info_pkg_setup
+ fi
+}
+
+src_prepare() {
+ # Never build kernelmodules, doing this manually
+ sed -i \
+ -e '/^SUBDIRS/d' \
+ datapath/Makefile.in || die "sed failed"
+ eautoreconf
+ default
+}
+
+src_configure() {
+ set_arch_to_kernel
+ # monitor is statically enabled for bug 596206
+ use monitor || export ovs_cv_python="no"
+ # pyside is staticly disabled
+ export ovs_cv_pyuic4="no"
+
+ local linux_config
+ use modules && linux_config="--with-linux=${KV_OUT_DIR}"
+
+ econf ${linux_config} \
+ --with-rundir=/var/run/openvswitch \
+ --with-logdir=/var/log/openvswitch \
+ --with-pkidir=/etc/ssl/openvswitch \
+ --with-dbdir=/var/lib/openvswitch \
+ $(use_enable ssl) \
+ $(use_enable !debug ndebug)
+}
+
+src_compile() {
+ default
+
+ use modules && linux-mod_src_compile
+}
+
+src_install() {
+ default
+
+ local SCRIPT
+ if use monitor; then
+ for SCRIPT in ovs-{pcap,parse-backtrace,dpctl-top,l3ping,tcpdump,tcpundump,test,vlan-test} bugtool/ovs-bugtool; do
+ sed -e '1s|^.*$|#!/usr/bin/python|' -i utilities/"${SCRIPT}"
+ python_foreach_impl python_doscript utilities/"${SCRIPT}"
+ done
+ rm -r "${ED%/}"/usr/share/openvswitch/python || die
+ fi
+
+ keepdir /var/{lib,log}/openvswitch
+ keepdir /etc/ssl/openvswitch
+ fperms 0750 /etc/ssl/openvswitch
+
+ rm -rf "${ED%/}"/var/run || die
+
+ newconfd "${FILESDIR}/ovsdb-server_conf2" ovsdb-server
+ newconfd "${FILESDIR}/ovs-vswitchd_conf" ovs-vswitchd
+ newinitd "${FILESDIR}/ovsdb-server-r1" ovsdb-server
+ newinitd "${FILESDIR}/ovs-vswitchd-r1" ovs-vswitchd
+
+ systemd_dounit "${FILESDIR}/ovsdb-server.service"
+ systemd_dounit "${FILESDIR}/ovs-vswitchd.service"
+ systemd_newtmpfilesd "${FILESDIR}/openvswitch.tmpfiles" openvswitch.conf
+
+ insinto /etc/logrotate.d
+ newins rhel/etc_logrotate.d_openvswitch openvswitch
+
+ use modules && linux-mod_src_install
+}
+
+pkg_postinst() {
+ use modules && linux-mod_pkg_postinst
+
+ local pv
+ for pv in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 1.9.0 ${pv} ; then
+ ewarn "The configuration database for Open vSwitch got moved in version 1.9.0 from"
+ ewarn " /etc/openvswitch"
+ ewarn "to"
+ ewarn " /var/lib/openvswitch"
+ ewarn "Please copy/move the database manually before running the schema upgrade."
+ ewarn "The PKI files are now supposed to go to /etc/ssl/openvswitch"
+ fi
+ done
+
+ elog "Use the following command to create an initial database for ovsdb-server:"
+ elog " emerge --config =${CATEGORY}/${PF}"
+ elog "(will create a database in /var/lib/openvswitch/conf.db)"
+ elog "or to convert the database to the current schema after upgrading."
+}
+
+pkg_config() {
+ local db="${EROOT%/}"/var/lib/openvswitch/conf.db
+ if [[ -e "${db}" ]] ; then
+ einfo "Database '${db}' already exists, doing schema migration..."
+ einfo "(if the migration fails, make sure that ovsdb-server is not running)"
+ ovsdb-tool convert "${db}" \
+ "${EROOT%/}"/usr/share/openvswitch/vswitch.ovsschema || die "converting database failed"
+ else
+ einfo "Creating new database '${db}'..."
+ ovsdb-tool create "${db}" \
+ "${EROOT%/}"/usr/share/openvswitch/vswitch.ovsschema || die "creating database failed"
+ fi
+}
diff --git a/net-misc/openvswitch/openvswitch-2.8.1.ebuild b/net-misc/openvswitch/openvswitch-2.8.1.ebuild
new file mode 100644
index 000000000000..99125f9190fe
--- /dev/null
+++ b/net-misc/openvswitch/openvswitch-2.8.1.ebuild
@@ -0,0 +1,155 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+
+inherit autotools eutils linux-info linux-mod python-r1 systemd
+
+DESCRIPTION="Production quality, multilayer virtual switch"
+HOMEPAGE="http://openvswitch.org"
+SRC_URI="http://openvswitch.org/releases/${P}.tar.gz"
+
+LICENSE="Apache-2.0 GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="debug modules monitor +ssl"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+ || (
+ >=sys-apps/openrc-0.10.5
+ sys-apps/systemd
+ )
+ ssl? ( dev-libs/openssl:0= )
+ ${PYTHON_DEPS}
+ ~dev-python/ovs-2.7.2[${PYTHON_USEDEP}]
+ || (
+ dev-python/twisted[conch,${PYTHON_USEDEP}]
+ dev-python/twisted-web[${PYTHON_USEDEP}]
+ )
+ dev-python/zope-interface[${PYTHON_USEDEP}]
+ debug? ( dev-lang/perl )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES="${FILESDIR}/xcp-interface-reconfigure-2.3.2.patch"
+
+CONFIG_CHECK="~NET_CLS_ACT ~NET_CLS_U32 ~NET_SCH_INGRESS ~NET_ACT_POLICE ~IPV6 ~TUN"
+MODULE_NAMES="openvswitch(net:${S}/datapath/linux)"
+BUILD_TARGETS="all"
+
+pkg_setup() {
+ if use modules ; then
+ CONFIG_CHECK+=" ~!OPENVSWITCH"
+ kernel_is ge 3 10 0 || die "Linux >= 3.10.0 and <= 4.8 required for userspace modules"
+ kernel_is le 4 12 999 || die "Linux >= 3.10.0 and <= 4.12 required for userspace modules"
+ linux-mod_pkg_setup
+ else
+ CONFIG_CHECK+=" ~OPENVSWITCH"
+ linux-info_pkg_setup
+ fi
+}
+
+src_prepare() {
+ # Never build kernelmodules, doing this manually
+ sed -i \
+ -e '/^SUBDIRS/d' \
+ datapath/Makefile.in || die "sed failed"
+ eautoreconf
+ default
+}
+
+src_configure() {
+ set_arch_to_kernel
+ # monitor is statically enabled for bug 596206
+ # use monitor || export ovs_cv_python="no"
+ # pyside is staticly disabled
+ export ovs_cv_pyuic4="no"
+
+ local linux_config
+ use modules && linux_config="--with-linux=${KV_OUT_DIR}"
+
+ econf ${linux_config} \
+ --with-rundir=/var/run/openvswitch \
+ --with-logdir=/var/log/openvswitch \
+ --with-pkidir=/etc/ssl/openvswitch \
+ --with-dbdir=/var/lib/openvswitch \
+ $(use_enable ssl) \
+ $(use_enable !debug ndebug)
+}
+
+src_compile() {
+ default
+
+ use modules && linux-mod_src_compile
+}
+
+src_install() {
+ default
+
+ local SCRIPT
+ if use monitor; then
+ for SCRIPT in ovs-{pcap,parse-backtrace,dpctl-top,l3ping,tcpdump,tcpundump,test,vlan-test} bugtool/ovs-bugtool; do
+ sed -e '1s|^.*$|#!/usr/bin/python|' -i utilities/"${SCRIPT}"
+ python_foreach_impl python_doscript utilities/"${SCRIPT}"
+ done
+ rm -r "${ED%/}"/usr/share/openvswitch/python || die
+ fi
+
+ keepdir /var/{lib,log}/openvswitch
+ keepdir /etc/ssl/openvswitch
+ fperms 0750 /etc/ssl/openvswitch
+
+ rm -rf "${ED%/}"/var/run || die
+
+ newconfd "${FILESDIR}/ovsdb-server_conf2" ovsdb-server
+ newconfd "${FILESDIR}/ovs-vswitchd_conf" ovs-vswitchd
+ newinitd "${FILESDIR}/ovsdb-server-r1" ovsdb-server
+ newinitd "${FILESDIR}/ovs-vswitchd-r1" ovs-vswitchd
+
+ systemd_dounit "${FILESDIR}/ovsdb-server.service"
+ systemd_dounit "${FILESDIR}/ovs-vswitchd.service"
+ systemd_newtmpfilesd "${FILESDIR}/openvswitch.tmpfiles" openvswitch.conf
+
+ insinto /etc/logrotate.d
+ newins rhel/etc_logrotate.d_openvswitch openvswitch
+
+ use modules && linux-mod_src_install
+}
+
+pkg_postinst() {
+ use modules && linux-mod_pkg_postinst
+
+ local pv
+ for pv in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 1.9.0 ${pv} ; then
+ ewarn "The configuration database for Open vSwitch got moved in version 1.9.0 from"
+ ewarn " /etc/openvswitch"
+ ewarn "to"
+ ewarn " /var/lib/openvswitch"
+ ewarn "Please copy/move the database manually before running the schema upgrade."
+ ewarn "The PKI files are now supposed to go to /etc/ssl/openvswitch"
+ fi
+ done
+
+ elog "Use the following command to create an initial database for ovsdb-server:"
+ elog " emerge --config =${CATEGORY}/${PF}"
+ elog "(will create a database in /var/lib/openvswitch/conf.db)"
+ elog "or to convert the database to the current schema after upgrading."
+}
+
+pkg_config() {
+ local db="${EROOT%/}"/var/lib/openvswitch/conf.db
+ if [[ -e "${db}" ]] ; then
+ einfo "Database '${db}' already exists, doing schema migration..."
+ einfo "(if the migration fails, make sure that ovsdb-server is not running)"
+ ovsdb-tool convert "${db}" \
+ "${EROOT%/}"/usr/share/openvswitch/vswitch.ovsschema || die "converting database failed"
+ else
+ einfo "Creating new database '${db}'..."
+ ovsdb-tool create "${db}" \
+ "${EROOT%/}"/usr/share/openvswitch/vswitch.ovsschema || die "creating database failed"
+ fi
+}