Gentoo Archives: gentoo-commits

From: "Matt Thode (prometheanfire)" <prometheanfire@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-misc/openvswitch: openvswitch-2.0.0-r2.ebuild ChangeLog
Date: Sun, 09 Feb 2014 08:56:21
Message-Id: 20140209085618.3C9112004E@flycatcher.gentoo.org
1 prometheanfire 14/02/09 08:56:18
2
3 Modified: ChangeLog
4 Added: openvswitch-2.0.0-r2.ebuild
5 Log:
6 fixing bugs 494152 498728 499500
7
8 (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0x2471eb3e40ac5ac3)
9
10 Revision Changes Path
11 1.21 net-misc/openvswitch/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openvswitch/ChangeLog?rev=1.21&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openvswitch/ChangeLog?rev=1.21&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openvswitch/ChangeLog?r1=1.20&r2=1.21
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-misc/openvswitch/ChangeLog,v
20 retrieving revision 1.20
21 retrieving revision 1.21
22 diff -u -r1.20 -r1.21
23 --- ChangeLog 14 Dec 2013 13:06:53 -0000 1.20
24 +++ ChangeLog 9 Feb 2014 08:56:18 -0000 1.21
25 @@ -1,6 +1,14 @@
26 # ChangeLog for net-misc/openvswitch
27 -# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-misc/openvswitch/ChangeLog,v 1.20 2013/12/14 13:06:53 pacho Exp $
29 +# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
30 +# $Header: /var/cvsroot/gentoo-x86/net-misc/openvswitch/ChangeLog,v 1.21 2014/02/09 08:56:18 prometheanfire Exp $
31 +
32 +*openvswitch-2.0.0-r2 (09 Feb 2014)
33 +
34 + 09 Feb 2014; Matthew Thode <prometheanfire@g.o>
35 + +files/atomic-test.patch, +files/configure.patch,
36 + +files/kernel-3.11-support.patch, +files/kernel-3.12-support.patch,
37 + +files/xcp-interface-reconfigure.patch, +openvswitch-2.0.0-r2.ebuild:
38 + fixing bugs 494152 498728 499500
39
40 *openvswitch-2.0.0-r1 (14 Dec 2013)
41
42
43
44
45 1.1 net-misc/openvswitch/openvswitch-2.0.0-r2.ebuild
46
47 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openvswitch/openvswitch-2.0.0-r2.ebuild?rev=1.1&view=markup
48 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openvswitch/openvswitch-2.0.0-r2.ebuild?rev=1.1&content-type=text/plain
49
50 Index: openvswitch-2.0.0-r2.ebuild
51 ===================================================================
52 # Copyright 1999-2014 Gentoo Foundation
53 # Distributed under the terms of the GNU General Public License v2
54 # $Header: /var/cvsroot/gentoo-x86/net-misc/openvswitch/openvswitch-2.0.0-r2.ebuild,v 1.1 2014/02/09 08:56:18 prometheanfire Exp $
55
56 EAPI=5
57
58 PYTHON_COMPAT=( python2_7 )
59
60 inherit eutils linux-info linux-mod python-single-r1 systemd autotools
61
62 DESCRIPTION="Production quality, multilayer virtual switch"
63 HOMEPAGE="http://openvswitch.org"
64 SRC_URI="http://openvswitch.org/releases/${P}.tar.gz"
65
66 LICENSE="Apache-2.0 GPL-2"
67 SLOT="0"
68 KEYWORDS="~amd64 ~x86"
69 IUSE="debug modules monitor +ssl"
70
71 RDEPEND=">=sys-apps/openrc-0.10.5
72 ssl? ( dev-libs/openssl )
73 monitor? (
74 ${PYTHON_DEPS}
75 dev-python/twisted-core
76 dev-python/twisted-conch
77 dev-python/twisted-web
78 dev-python/PyQt4[${PYTHON_USEDEP}]
79 net-zope/zope-interface[${PYTHON_USEDEP}] )
80 debug? ( dev-lang/perl )"
81 DEPEND="${RDEPEND}
82 virtual/pkgconfig"
83
84 CONFIG_CHECK="~NET_CLS_ACT ~NET_CLS_U32 ~NET_SCH_INGRESS ~NET_ACT_POLICE ~IPV6 ~TUN"
85 MODULE_NAMES="openvswitch(net:${S}/datapath/linux)"
86 BUILD_TARGETS="all"
87
88 pkg_setup() {
89 if use modules ; then
90 CONFIG_CHECK+=" ~!OPENVSWITCH"
91 kernel_is ge 2 6 32 || die "Linux >=2.6.32 and <3.10 required"
92 kernel_is lt 3 14 || die "Linux >=2.6.18 and <3.14 required"
93 linux-mod_pkg_setup
94 else
95 CONFIG_CHECK+=" ~OPENVSWITCH"
96 linux-info_pkg_setup
97 fi
98 use monitor && python-single-r1_pkg_setup
99 }
100
101 src_prepare() {
102 # Never build kernelmodules, doing this manually
103 sed -i \
104 -e '/^SUBDIRS/d' \
105 datapath/Makefile.in || die "sed failed"
106 epatch "${FILESDIR}/prevent-traceback.patch"
107 epatch "${FILESDIR}/kernel-3.11-support.patch"
108 epatch "${FILESDIR}/xcp-interface-reconfigure.patch"
109 # epatch "${FILESDIR}/atomic-test.patch"
110 epatch "${FILESDIR}/kernel-3.12-support.patch"
111 epatch "${FILESDIR}/configure.patch"
112 eautoreconf
113 }
114 src_configure() {
115 set_arch_to_kernel
116 use monitor || export ovs_cv_python="no"
117 use pyside || export ovs_cv_pyuic4="no"
118
119 local linux_config
120 use modules && linux_config="--with-linux=${KV_OUT_DIR}"
121
122 econf ${linux_config} \
123 --with-rundir=/var/run/openvswitch \
124 --with-logdir=/var/log/openvswitch \
125 --with-pkidir=/etc/ssl/openvswitch \
126 --with-dbdir=/var/lib/openvswitch \
127 $(use_enable ssl) \
128 $(use_enable !debug ndebug)
129 }
130
131 src_compile() {
132 default
133
134 use monitor && python_fix_shebang \
135 utilities/ovs-{pcap,tcpundump,test,vlan-test} \
136 utilities/bugtool/ovs-bugtool \
137 ovsdb/ovsdbmonitor/ovsdbmonitor
138
139 use modules && linux-mod_src_compile
140 }
141
142 src_install() {
143 default
144
145 if use monitor ; then
146 python_domodule "${ED}"/usr/share/openvswitch/python/*
147 rm -r "${ED}/usr/share/openvswitch/python"
148 python_optimize "${ED}/usr/share/ovsdbmonitor"
149 fi
150 # not working without the brcompat_mod kernel module which did not get
151 # included in the kernel and we can't build it anymore
152 rm "${D}/usr/sbin/ovs-brcompatd" "${D}/usr/share/man/man8/ovs-brcompatd.8"
153
154 keepdir /var/{lib,log}/openvswitch
155 keepdir /etc/ssl/openvswitch
156 fperms 0750 /etc/ssl/openvswitch
157
158 rm -rf "${ED}/var/run"
159 use monitor || rmdir "${ED}/usr/share/ovsdbmonitor"
160 use debug || rm "${ED}/usr/bin/ovs-parse-leaks"
161
162 newconfd "${FILESDIR}/ovsdb-server_conf2" ovsdb-server
163 newconfd "${FILESDIR}/ovs-vswitchd_conf" ovs-vswitchd
164 newconfd "${FILESDIR}/ovs-controller_conf" ovs-controller
165 newinitd "${FILESDIR}/ovsdb-server-r1" ovsdb-server
166 newinitd "${FILESDIR}/ovs-vswitchd-r1" ovs-vswitchd
167 newinitd "${FILESDIR}/ovs-controller-r1" ovs-controller
168
169 systemd_dounit "${FILESDIR}/ovsdb-server.service"
170 systemd_dounit "${FILESDIR}/ovs-vswitchd.service"
171 systemd_dounit "${FILESDIR}/ovs-controller.service"
172 systemd_newtmpfilesd "${FILESDIR}/openvswitch.tmpfiles" openvswitch.conf
173
174 insinto /etc/logrotate.d
175 newins rhel/etc_logrotate.d_openvswitch openvswitch
176
177 use modules && linux-mod_src_install
178 }
179
180 pkg_postinst() {
181 use modules && linux-mod_pkg_postinst
182
183 for pv in ${REPLACING_VERSIONS}; do
184 if ! version_is_at_least 1.9.0 ${pv} ; then
185 ewarn "The configuration database for Open vSwitch got moved in version 1.9.0 from"
186 ewarn " /etc/openvswitch"
187 ewarn "to"
188 ewarn " /var/lib/openvswitch"
189 ewarn "Please copy/move the database manually before running the schema upgrade."
190 ewarn "The PKI files are now supposed to go to /etc/ssl/openvswitch"
191 fi
192 done
193
194 elog "Use the following command to create an initial database for ovsdb-server:"
195 elog " emerge --config =${CATEGORY}/${PF}"
196 elog "(will create a database in /var/lib/openvswitch/conf.db)"
197 elog "or to convert the database to the current schema after upgrading."
198 }
199
200 pkg_config() {
201 local db="${EPREFIX}/var/lib/openvswitch/conf.db"
202 if [ -e "${db}" ] ; then
203 einfo "Database '${db}' already exists, doing schema migration..."
204 einfo "(if the migration fails, make sure that ovsdb-server is not running)"
205 "${EPREFIX}/usr/bin/ovsdb-tool" convert "${db}" "${EPREFIX}/usr/share/openvswitch/vswitch.ovsschema" || die "converting database failed"
206 else
207 einfo "Creating new database '${db}'..."
208 "${EPREFIX}/usr/bin/ovsdb-tool" create "${db}" "${EPREFIX}/usr/share/openvswitch/vswitch.ovsschema" || die "creating database failed"
209 fi
210 }