commit:     18bffb865e754c667a135593d358e1a0613f14f6
Author:     Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 16 17:06:21 2016 +0000
Commit:     Matt Thode <prometheanfire <AT> gentoo <DOT> org>
CommitDate: Wed Mar 16 17:07:09 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=18bffb86

net-misc/openvswitch: bup

Package-Manager: portage-2.2.26

 net-misc/openvswitch/Manifest                 |   1 +
 net-misc/openvswitch/openvswitch-2.5.0.ebuild | 157 ++++++++++++++++++++++++++
 2 files changed, 158 insertions(+)

diff --git a/net-misc/openvswitch/Manifest b/net-misc/openvswitch/Manifest
index e4b15d8..a192ce7 100644
--- a/net-misc/openvswitch/Manifest
+++ b/net-misc/openvswitch/Manifest
@@ -5,3 +5,4 @@ DIST openvswitch-2.3.0.tar.gz 3259225 SHA256 
011052645cd4c7afee2732e87d45e589a05
 DIST openvswitch-2.3.1.tar.gz 3266916 SHA256 
21174901c311d54703b4a7f498be0c42e5d2cc68bdecb0090dbb555e2af4bcd2 SHA512 
8ef4ca61b06a16b361436130bda3b119e4067e78837908fa1d509c3706bc0fe8cc8eb92c76fe439625aa6732a49cbbc6f26898f965b1bbb8b4062e21bcd2edf9
 WHIRLPOOL 
7556342957b8bb58667161fad37e544896a3b299384688f9edb8aa8675d7be613e6ea41bd0721f60736e52d157689a4f7e27efdd8d77e811073f6d0a9dc110b7
 DIST openvswitch-2.3.2.tar.gz 3277164 SHA256 
386b11df94d06c68d391ee4091832360095bd3a14c72d454325fab284dad9887 SHA512 
dfbd9d5b16aeecdc880efb910e0ec2e474dcc02515f0033b1e9466735387b39f2855bec49936a261aea66badb35e09598dbb9fc4b506e9a9e0c18d3441fea691
 WHIRLPOOL 
ca3e767383ff4cc7527e037472ea3b98b7e36fcdc1b936919cc68c9d28b382264b6e485726e4ec266619656013c5b4e09d55a7808a8399f15246b67f264c5ff8
 DIST openvswitch-2.4.0.tar.gz 4182154 SHA256 
424c5a8dea1c5b153e8c1803bb041d0495e81379fb6f386dd58ee903a7681b9a SHA512 
bd66bcb37beacb0d684001609c26d9dc487efde0ecb051004813b0f8a5999039207b012617195d82d56aefe9a1756615e2158e531a71e9b1e5e10345f0370bae
 WHIRLPOOL 
9efc94031279679611bd4a69079e452b3b0055bb96a0337851cce925d8ba1019887b747594263d2dd2a866c98c45b65b274db22d7949b6bf1edd9bc0ec17048a
+DIST openvswitch-2.5.0.tar.gz 4603077 SHA256 
34da54fbad503205b1a66b48ca4312679e1ce5b04763a9fb86050b2b25d66f21 SHA512 
32addb6ed8d4b78e6eb5b951de6b2390dacb3a66096ff8de6020e6d42d460e1038eec43c4057707942f8043ebcad848488d09c7aabfa4599d53782a9cc69f089
 WHIRLPOOL 
3b879ce376268bb65858f4c4b7193c54fc43a9903029f2000cee1a4f8739eae3ed5b2ad67c57de7ecfe3028874831796bd69a1b8a0599d9dad56f1b524302c5d

diff --git a/net-misc/openvswitch/openvswitch-2.5.0.ebuild 
b/net-misc/openvswitch/openvswitch-2.5.0.ebuild
new file mode 100644
index 0000000..204bd0a
--- /dev/null
+++ b/net-misc/openvswitch/openvswitch-2.5.0.ebuild
@@ -0,0 +1,157 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils linux-info linux-mod python-single-r1 systemd autotools
+
+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"
+
+RDEPEND=">=sys-apps/openrc-0.10.5
+       ssl? ( dev-libs/openssl:= )
+       monitor? (
+               ${PYTHON_DEPS}
+               dev-python/twisted-core
+               dev-python/twisted-conch
+               dev-python/twisted-web
+               dev-python/PyQt4[${PYTHON_USEDEP}]
+               dev-python/zope-interface[${PYTHON_USEDEP}] )
+       debug? ( dev-lang/perl )"
+DEPEND="${RDEPEND}
+       virtual/pkgconfig"
+
+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 2 6 32 || die "Linux >= 2.6.32 and <= 4.0 required 
for userspace modules"
+               kernel_is le 4 0 || die "Linux >= 2.6.32 and <= 4.0 required 
for userspace modules"
+               linux-mod_pkg_setup
+       else
+               CONFIG_CHECK+=" ~OPENVSWITCH"
+               linux-info_pkg_setup
+       fi
+       use monitor && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+       # Never build kernelmodules, doing this manually
+       sed -i \
+               -e '/^SUBDIRS/d' \
+               datapath/Makefile.in || die "sed failed"
+       epatch "${FILESDIR}/xcp-interface-reconfigure-2.3.2.patch"
+       eautoreconf
+}
+src_configure() {
+       set_arch_to_kernel
+       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}"
+
+       PYTHON=python2.7 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 monitor && python_fix_shebang \
+#              utilities/ovs-{pcap,tcpundump,test,vlan-test} \
+#              utilities/bugtool/ovs-bugtool
+       if use monitor; then
+               sed -i \
+                       's/^#\!\ python2\.7/#\!\/usr\/bin\/env\ python2\.7/' \
+                       
utilities/ovs-{pcap,parse-backtrace,dpctl-top,l3ping,tcpundump,test,vlan-test} \
+                       utilities/bugtool/ovs-bugtool || die "sed died :("
+       fi
+
+       use modules && linux-mod_src_compile
+}
+
+src_install() {
+       default
+
+       if use monitor ; then
+               python_domodule "${ED}"/usr/share/openvswitch/python/*
+               rm -r "${ED}/usr/share/openvswitch/python"
+               python_optimize "${ED}/usr/share/ovsdbmonitor"
+       fi
+       # 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/{lib,log}/openvswitch
+       keepdir /etc/ssl/openvswitch
+       fperms 0750 /etc/ssl/openvswitch
+
+       rm -rf "${ED}/var/run"
+       use monitor || rmdir "${ED}/usr/share/ovsdbmonitor"
+       use debug || rm "${ED}/usr/bin/ovs-parse-leaks"
+
+       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
+
+       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="${EPREFIX}/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)"
+               "${EPREFIX}/usr/bin/ovsdb-tool" convert "${db}" 
"${EPREFIX}/usr/share/openvswitch/vswitch.ovsschema" || die "converting 
database failed"
+       else
+               einfo "Creating new database '${db}'..."
+               "${EPREFIX}/usr/bin/ovsdb-tool" create "${db}" 
"${EPREFIX}/usr/share/openvswitch/vswitch.ovsschema" || die "creating database 
failed"
+       fi
+}

Reply via email to