diff options
author | Matthew Thode <mthode@mthode.org> | 2015-09-15 13:29:44 -0500 |
---|---|---|
committer | Matthew Thode <mthode@mthode.org> | 2015-09-15 13:29:44 -0500 |
commit | c5bb368e22f052dfed812477a02d6e8faaca260b (patch) | |
tree | 03a5a37554960849cb2c29a8e14cd7dabea754c8 /net-misc/openvswitch | |
parent | net-misc/wget: rework patch to not trigger automake #560568 (diff) | |
download | gentoo-c5bb368e22f052dfed812477a02d6e8faaca260b.tar.gz gentoo-c5bb368e22f052dfed812477a02d6e8faaca260b.tar.bz2 gentoo-c5bb368e22f052dfed812477a02d6e8faaca260b.zip |
net-misc/openvswitch: bup for bug 560270
Package-Manager: portage-2.2.20.1
Diffstat (limited to 'net-misc/openvswitch')
-rw-r--r-- | net-misc/openvswitch/Manifest | 1 | ||||
-rw-r--r-- | net-misc/openvswitch/openvswitch-2.4.0.ebuild | 157 |
2 files changed, 158 insertions, 0 deletions
diff --git a/net-misc/openvswitch/Manifest b/net-misc/openvswitch/Manifest index b2eabd8f3763..e4b15d877f12 100644 --- a/net-misc/openvswitch/Manifest +++ b/net-misc/openvswitch/Manifest @@ -4,3 +4,4 @@ DIST openvswitch-2.1.3.tar.gz 3080126 SHA256 43a2562fe5e8e48e997bfdb04691ffaaaef DIST openvswitch-2.3.0.tar.gz 3259225 SHA256 011052645cd4c7afee2732e87d45e589a0540ac7b7523027d3be2d7c7db7c899 SHA512 f3a665bc84d8a6e282928db61ae648a826f273e44e34311a60e6f0e74a6ab10c8410cb374f0ce80abe7c58b9559a97388cdbfe2ef28ac4bedd2f5e52b3cd6ed1 WHIRLPOOL 0fc743b7d12c2ab9c6bea58ec3b80d7633f860c720acb2b61306ff5035d4f3bfeddf7b9bab44a21a1b7fb62c0c3828c2aaf7e9b9167a67ee2def065248ef329c 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 diff --git a/net-misc/openvswitch/openvswitch-2.4.0.ebuild b/net-misc/openvswitch/openvswitch-2.4.0.ebuild new file mode 100644 index 000000000000..044509c6551f --- /dev/null +++ b/net-misc/openvswitch/openvswitch-2.4.0.ebuild @@ -0,0 +1,157 @@ +# Copyright 1999-2015 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 +} |