Gentoo Archives: gentoo-commits

From: "Matt Thode (prometheanfire)" <prometheanfire@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-cluster/neutron: neutron-2014.2.3-r1.ebuild neutron-2015.1.0-r2.ebuild ChangeLog neutron-2015.1.0-r1.ebuild neutron-2014.2.3.ebuild
Date: Thu, 02 Jul 2015 05:43:14
Message-Id: 20150702054305.C341A74B@oystercatcher.gentoo.org
1 prometheanfire 15/07/02 05:43:05
2
3 Modified: ChangeLog
4 Added: neutron-2014.2.3-r1.ebuild
5 neutron-2015.1.0-r2.ebuild
6 Removed: neutron-2015.1.0-r1.ebuild neutron-2014.2.3.ebuild
7 Log:
8 fixing CVE-2015-3221 no badness remaining
9
10 (Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 0x33ED3FD25AFC78BA)
11
12 Revision Changes Path
13 1.65 sys-cluster/neutron/ChangeLog
14
15 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/neutron/ChangeLog?rev=1.65&view=markup
16 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/neutron/ChangeLog?rev=1.65&content-type=text/plain
17 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/neutron/ChangeLog?r1=1.64&r2=1.65
18
19 Index: ChangeLog
20 ===================================================================
21 RCS file: /var/cvsroot/gentoo-x86/sys-cluster/neutron/ChangeLog,v
22 retrieving revision 1.64
23 retrieving revision 1.65
24 diff -u -r1.64 -r1.65
25 --- ChangeLog 17 May 2015 23:25:00 -0000 1.64
26 +++ ChangeLog 2 Jul 2015 05:43:05 -0000 1.65
27 @@ -1,6 +1,16 @@
28 # ChangeLog for sys-cluster/neutron
29 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
30 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/neutron/ChangeLog,v 1.64 2015/05/17 23:25:00 prometheanfire Exp $
31 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/neutron/ChangeLog,v 1.65 2015/07/02 05:43:05 prometheanfire Exp $
32 +
33 +*neutron-2014.2.3-r1 (02 Jul 2015)
34 +*neutron-2015.1.0-r2 (02 Jul 2015)
35 +*cve-2015-3221_2014.2.3 (02 Jul 2015)
36 +
37 + 02 Jul 2015; Matthew Thode <prometheanfire@g.o>
38 + +files/cve-2015-3221_2014.2.3.ebuild, +files/cve-2015-3221_2015.1.0.patch,
39 + +neutron-2014.2.3-r1.ebuild, +neutron-2015.1.0-r2.ebuild,
40 + -neutron-2014.2.3.ebuild, -neutron-2015.1.0-r1.ebuild:
41 + fixing CVE-2015-3221 no badness remaining
42
43 *neutron-2015.1.0-r1 (17 May 2015)
44
45
46
47
48 1.1 sys-cluster/neutron/neutron-2014.2.3-r1.ebuild
49
50 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/neutron/neutron-2014.2.3-r1.ebuild?rev=1.1&view=markup
51 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/neutron/neutron-2014.2.3-r1.ebuild?rev=1.1&content-type=text/plain
52
53 Index: neutron-2014.2.3-r1.ebuild
54 ===================================================================
55 # Copyright 1999-2015 Gentoo Foundation
56 # Distributed under the terms of the GNU General Public License v2
57 # $Header: /var/cvsroot/gentoo-x86/sys-cluster/neutron/neutron-2014.2.3-r1.ebuild,v 1.1 2015/07/02 05:43:05 prometheanfire Exp $
58
59 EAPI=5
60 PYTHON_COMPAT=( python2_7 )
61
62 inherit distutils-r1 linux-info user
63
64 DESCRIPTION="A virtual network service for Openstack"
65 HOMEPAGE="https://launchpad.net/neutron"
66 SRC_URI="http://launchpad.net/${PN}/juno/${PV}/+download/${P}.tar.gz"
67
68 LICENSE="Apache-2.0"
69 SLOT="0"
70 KEYWORDS="~amd64 ~x86"
71 IUSE="dhcp doc l3 metadata openvswitch linuxbridge server test sqlite mysql postgres"
72 REQUIRED_USE="|| ( mysql postgres sqlite )"
73
74 DEPEND="
75 dev-python/setuptools[${PYTHON_USEDEP}]
76 >=dev-python/pbr-0.8[${PYTHON_USEDEP}]
77 <dev-python/pbr-1.0[${PYTHON_USEDEP}]
78 app-admin/sudo
79 test? (
80 ${RDEPEND}
81 >=dev-python/hacking-0.9.2[${PYTHON_USEDEP}]
82 <dev-python/hacking-0.10[${PYTHON_USEDEP}]
83 >=dev-python/cliff-1.7.0[${PYTHON_USEDEP}]
84 >=dev-python/coverage-3.6[${PYTHON_USEDEP}]
85 >=dev-python/fixtures-0.3.14[${PYTHON_USEDEP}]
86 >=dev-python/mock-1.0[${PYTHON_USEDEP}]
87 >=dev-python/subunit-0.0.18[${PYTHON_USEDEP}]
88 dev-python/ordereddict[${PYTHON_USEDEP}]
89 >=dev-python/requests-mock-0.4.0[${PYTHON_USEDEP}]
90 >=dev-python/sphinx-1.1.2[${PYTHON_USEDEP}]
91 !~dev-python/sphinx-1.2.0[${PYTHON_USEDEP}]
92 <dev-python/sphinx-1.3[${PYTHON_USEDEP}]
93 >=dev-python/oslo-sphinx-2.2.0[${PYTHON_USEDEP}]
94 >=dev-python/testrepository-0.0.18[${PYTHON_USEDEP}]
95 >=dev-python/testtools-0.9.34[${PYTHON_USEDEP}]
96 !~dev-python/testtools-1.4.0[${PYTHON_USEDEP}]
97 >=dev-python/webtest-2.0[${PYTHON_USEDEP}]
98 dev-python/configobj[${PYTHON_USEDEP}]
99 )"
100
101 RDEPEND="
102 dev-python/paste[${PYTHON_USEDEP}]
103 >=dev-python/pastedeploy-1.5.0-r1[${PYTHON_USEDEP}]
104 >=dev-python/routes-1.12.3[${PYTHON_USEDEP}]
105 !~dev-python/routes-2.0[${PYTHON_USEDEP}]
106 >=dev-python/anyjson-0.3.3[${PYTHON_USEDEP}]
107 >=dev-python/Babel-1.3[${PYTHON_USEDEP}]
108 >=dev-python/eventlet-0.15.1[${PYTHON_USEDEP}]
109 <dev-python/eventlet-0.16.0[${PYTHON_USEDEP}]
110 >=dev-python/greenlet-0.3.2[${PYTHON_USEDEP}]
111 >=dev-python/httplib2-0.7.5[${PYTHON_USEDEP}]
112 >=dev-python/requests-2.1.0[${PYTHON_USEDEP}]
113 !~dev-python/requests-2.4.0[${PYTHON_USEDEP}]
114 >=dev-python/iso8601-0.1.9[${PYTHON_USEDEP}]
115 dev-python/jsonrpclib[${PYTHON_USEDEP}]
116 dev-python/jinja[${PYTHON_USEDEP}]
117 >=dev-python/keystonemiddleware-1.0.0[${PYTHON_USEDEP}]
118 >=dev-python/netaddr-0.7.12[${PYTHON_USEDEP}]
119 >=dev-python/python-neutronclient-2.3.6[${PYTHON_USEDEP}]
120 <=dev-python/python-neutronclient-3.0.0[${PYTHON_USEDEP}]
121 sqlite? (
122 >=dev-python/sqlalchemy-0.9.7[sqlite,${PYTHON_USEDEP}]
123 <=dev-python/sqlalchemy-0.9.99[sqlite,${PYTHON_USEDEP}]
124 )
125 mysql? (
126 dev-python/mysql-python
127 >=dev-python/sqlalchemy-0.9.7[${PYTHON_USEDEP}]
128 <=dev-python/sqlalchemy-0.9.99[${PYTHON_USEDEP}]
129 )
130 postgres? (
131 dev-python/psycopg:2
132 >=dev-python/sqlalchemy-0.9.7[${PYTHON_USEDEP}]
133 <=dev-python/sqlalchemy-0.9.99[${PYTHON_USEDEP}]
134 )
135 >=dev-python/webob-1.2.3[${PYTHON_USEDEP}]
136 >=dev-python/python-keystoneclient-0.10.0[${PYTHON_USEDEP}]
137 >=dev-python/alembic-0.6.4[${PYTHON_USEDEP}]
138 >=dev-python/six-1.7.0[${PYTHON_USEDEP}]
139 >=dev-python/stevedore-1.0.0[${PYTHON_USEDEP}]
140 >=dev-python/oslo-config-1.4.0[${PYTHON_USEDEP}]
141 >=dev-python/oslo-db-1.0.0[${PYTHON_USEDEP}]
142 <dev-python/oslo-db-1.1.0[${PYTHON_USEDEP}]
143 >=dev-python/oslo-messaging-1.4.0[${PYTHON_USEDEP}]
144 !~dev-python/oslo-messaging-1.5.0[${PYTHON_USEDEP}]
145 <dev-python/oslo-messaging-1.6.0[${PYTHON_USEDEP}]
146 >=dev-python/oslo-rootwrap-1.3.0[${PYTHON_USEDEP}]
147 >=dev-python/python-novaclient-2.18.0[${PYTHON_USEDEP}]
148 dev-python/pyudev[${PYTHON_USEDEP}]
149 sys-apps/iproute2
150 net-misc/bridge-utils
151 net-firewall/ipset
152 openvswitch? ( net-misc/openvswitch )
153 dhcp? ( net-dns/dnsmasq[dhcp-tools] )"
154
155 PATCHES=(
156 "${FILESDIR}/0001-Fixes-bug-in-interface-handling-of-ip_lib.py.patch"
157 "${FILESDIR}/0002-moving-vxlan-module-check-to-sanity-checks-and-makin.patch"
158 "${FILESDIR}/0003-fixes-error-logging-to-use-the-right-exception-paren.patch"
159 "${FILESDIR}/cve-2015-3221_2014.2.3.ebuild"
160 )
161
162 pkg_setup() {
163 linux-info_pkg_setup
164 CONFIG_CHECK_MODULES="VLAN_8021Q IP6_NF_FILTER IP6_NF_IPTABLES IP_NF_TARGET_REJECT \
165 IP_NF_MANGLE IP_NF_TARGET_MASQUERADE NF_NAT_IPV4 NF_CONNTRACK_IPV4 NF_DEFRAG_IPV4 \
166 NF_NAT_IPV4 NF_NAT NF_CONNTRACK IP_NF_FILTER IP_NF_IPTABLES NETFILTER_XTABLES"
167 if linux_config_exists; then
168 for module in ${CONFIG_CHECK_MODULES}; do
169 linux_chkconfig_present ${module} || ewarn "${module} needs to be enabled in kernel"
170 done
171 fi
172 enewgroup neutron
173 enewuser neutron -1 -1 /var/lib/neutron neutron
174 }
175
176 pkg_config() {
177 fperms 0700 /var/log/neutron
178 fowners neutron:neutron /var/log neutron
179 }
180
181 src_prepare() {
182 #it's /bin/ip not /sbin/ip
183 sed -i 's/sbin\/ip\,/bin\/ip\,/g' etc/neutron/rootwrap.d/*
184 distutils-r1_src_prepare
185 }
186
187 python_compile_all() {
188 use doc && make -C doc html
189 }
190
191 python_test() {
192 # https://bugs.launchpad.net/neutron/+bug/1234857
193 # https://bugs.launchpad.net/swift/+bug/1249727
194 # https://bugs.launchpad.net/neutron/+bug/1251657
195 # turn multiprocessing off, testr will use it --parallel
196 local DISTUTILS_NO_PARALLEL_BUILD=1
197 # Move tests out that attempt net connection, have failures
198 mv $(find . -name test_ovs_tunnel.py) . || die
199 sed -e 's:test_app_using_ipv6_and_ssl:_&:' \
200 -e 's:test_start_random_port_with_ipv6:_&:' \
201 -i neutron/tests/unit/test_wsgi.py || die
202 testr init
203 testr run --parallel || die "failed testsuite under python2.7"
204 }
205
206 python_install() {
207 distutils-r1_python_install
208 if use server; then
209 newinitd "${FILESDIR}/neutron.initd" "neutron-server"
210 newconfd "${FILESDIR}/neutron-server.confd" "neutron-server"
211 dosym /etc/neutron/plugin.ini /etc/neutron/plugins/ml2/ml2_conf.ini
212 fi
213 if use dhcp; then
214 newinitd "${FILESDIR}/neutron.initd" "neutron-dhcp-agent"
215 newconfd "${FILESDIR}/neutron-dhcp-agent.confd" "neutron-dhcp-agent"
216 fi
217 if use l3; then
218 newinitd "${FILESDIR}/neutron.initd" "neutron-l3-agent"
219 newconfd "${FILESDIR}/neutron-l3-agent.confd" "neutron-l3-agent"
220 fi
221 if use metadata; then
222 newinitd "${FILESDIR}/neutron.initd" "neutron-metadata-agent"
223 newconfd "${FILESDIR}/neutron-metadata-agent.confd" "neutron-metadata-agent"
224 fi
225 if use openvswitch; then
226 newinitd "${FILESDIR}/neutron.initd" "neutron-openvswitch-agent"
227 newconfd "${FILESDIR}/neutron-openvswitch-agent.confd" "neutron-openvswitch-agent"
228 newinitd "${FILESDIR}/neutron.initd" "neutron-ovs-cleanup"
229 newconfd "${FILESDIR}/neutron-openvswitch-agent.confd" "neutron-ovs-cleanup"
230 fi
231 if use linuxbridge; then
232 newinitd "${FILESDIR}/neutron.initd" "neutron-linuxbridge-agent"
233 newconfd "${FILESDIR}/neutron-linuxbridge-agent.confd" "neutron-linuxbridge-agent"
234 fi
235 diropts -m 755 -o neutron -g neutron
236 dodir /var/log/neutron /var/lib/neutron
237 keepdir /etc/neutron
238 insinto /etc/neutron
239 insopts -m 0640 -o neutron -g neutron
240
241 doins etc/*
242 # stupid renames
243 rm "${D}etc/neutron/quantum"
244 insinto /etc/neutron
245 doins -r "etc/neutron/plugins"
246 insopts -m 0640 -o root -g root
247 doins "etc/rootwrap.conf"
248 doins -r "etc/neutron/rootwrap.d"
249
250 insinto "/usr/lib64/python2.7/site-packages/neutron/db/migration/alembic_migrations/"
251 doins -r "neutron/db/migration/alembic_migrations/versions"
252
253 #add sudoers definitions for user neutron
254 insinto /etc/sudoers.d/
255 insopts -m 0440 -o root -g root
256 newins "${FILESDIR}/neutron.sudoersd" neutron
257
258 #remove superfluous stuff
259 rm -R "${D}/usr/etc/"
260 }
261
262 python_install_all() {
263 use doc && local HTML_DOCS=( doc/build/html/. )
264 distutils-r1_python_install_all
265 }
266
267
268
269 1.1 sys-cluster/neutron/neutron-2015.1.0-r2.ebuild
270
271 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/neutron/neutron-2015.1.0-r2.ebuild?rev=1.1&view=markup
272 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/neutron/neutron-2015.1.0-r2.ebuild?rev=1.1&content-type=text/plain
273
274 Index: neutron-2015.1.0-r2.ebuild
275 ===================================================================
276 # Copyright 1999-2015 Gentoo Foundation
277 # Distributed under the terms of the GNU General Public License v2
278 # $Header: /var/cvsroot/gentoo-x86/sys-cluster/neutron/neutron-2015.1.0-r2.ebuild,v 1.1 2015/07/02 05:43:05 prometheanfire Exp $
279
280 EAPI=5
281 PYTHON_COMPAT=( python2_7 )
282
283 inherit distutils-r1 linux-info user
284
285 DESCRIPTION="A virtual network service for Openstack"
286 HOMEPAGE="https://launchpad.net/neutron"
287 SRC_URI="http://launchpad.net/${PN}/kilo/${PV}/+download/${P}.tar.gz"
288
289 LICENSE="Apache-2.0"
290 SLOT="0"
291 KEYWORDS="~amd64 ~x86"
292 IUSE="compute-only dhcp doc l3 metadata openvswitch linuxbridge server test sqlite mysql postgres"
293 REQUIRED_USE="!compute-only? ( || ( mysql postgres sqlite ) )
294 compute-only? ( !mysql !postgres !sqlite !dhcp !l3 !metadata !server
295 || ( openvswitch linuxbridge ) )"
296
297 DEPEND="
298 dev-python/setuptools[${PYTHON_USEDEP}]
299 >=dev-python/pbr-0.8[${PYTHON_USEDEP}]
300 <dev-python/pbr-1.0[${PYTHON_USEDEP}]
301 app-admin/sudo
302 test? (
303 ${RDEPEND}
304 >=dev-python/hacking-0.10.0[${PYTHON_USEDEP}]
305 <dev-python/hacking-0.11[${PYTHON_USEDEP}]
306 >=dev-python/cliff-1.10.0[${PYTHON_USEDEP}]
307 <dev-python/cliff-1.11.0[${PYTHON_USEDEP}]
308 >=dev-python/coverage-3.6[${PYTHON_USEDEP}]
309 >=dev-python/fixtures-0.3.14[${PYTHON_USEDEP}]
310 >=dev-python/mock-1.0[${PYTHON_USEDEP}]
311 >=dev-python/subunit-0.0.18[${PYTHON_USEDEP}]
312 >=dev-python/requests-mock-0.6.0[${PYTHON_USEDEP}]
313 >=dev-python/sphinx-1.1.2[${PYTHON_USEDEP}]
314 !~dev-python/sphinx-1.2.0[${PYTHON_USEDEP}]
315 <dev-python/sphinx-1.3[${PYTHON_USEDEP}]
316 >=dev-python/oslo-sphinx-2.5.0[${PYTHON_USEDEP}]
317 <dev-python/oslo-sphinx-2.6.0[${PYTHON_USEDEP}]
318 >=dev-python/testrepository-0.0.18[${PYTHON_USEDEP}]
319 >=dev-python/testtools-0.9.36[${PYTHON_USEDEP}]
320 !~dev-python/testtools-1.2.0[${PYTHON_USEDEP}]
321 >=dev-python/testscenarios-0.4[${PYTHON_USEDEP}]
322 >=dev-python/webtest-2.0[${PYTHON_USEDEP}]
323 >=dev-python/oslotest-1.5.1[${PYTHON_USEDEP}]
324 <dev-python/oslotest-1.6.0[${PYTHON_USEDEP}]
325 >=dev-python/tempest-lib-0.4.0[${PYTHON_USEDEP}]
326 )"
327
328 RDEPEND="
329 dev-python/paste[${PYTHON_USEDEP}]
330 >=dev-python/pastedeploy-1.5.0-r1[${PYTHON_USEDEP}]
331 >=dev-python/routes-1.12.3[${PYTHON_USEDEP}]
332 !~dev-python/routes-2.0[${PYTHON_USEDEP}]
333 >=dev-python/eventlet-0.16.1[${PYTHON_USEDEP}]
334 !~dev-python/eventlet-0.17.0[${PYTHON_USEDEP}]
335 >=dev-python/greenlet-0.3.2[${PYTHON_USEDEP}]
336 >=dev-python/httplib2-0.7.5[${PYTHON_USEDEP}]
337 >=dev-python/requests-2.2.0[${PYTHON_USEDEP}]
338 !~dev-python/requests-2.4.0[${PYTHON_USEDEP}]
339 dev-python/jsonrpclib[${PYTHON_USEDEP}]
340 >=dev-python/jinja-2.6[${PYTHON_USEDEP}]
341 >=dev-python/keystonemiddleware-1.5.0[${PYTHON_USEDEP}]
342 <dev-python/keystonemiddleware-1.6.0[${PYTHON_USEDEP}]
343 >=dev-python/netaddr-0.7.12[${PYTHON_USEDEP}]
344 >=dev-python/python-neutronclient-2.3.11[${PYTHON_USEDEP}]
345 <dev-python/python-neutronclient-3.5.0[${PYTHON_USEDEP}]
346 >=dev-python/retrying-1.2.3[${PYTHON_USEDEP}]
347 !~dev-python/retrying-1.3.0[${PYTHON_USEDEP}]
348 compute-only? (
349 >=dev-python/sqlalchemy-0.9.7[${PYTHON_USEDEP}]
350 <=dev-python/sqlalchemy-0.9.99[${PYTHON_USEDEP}]
351 )
352 sqlite? (
353 >=dev-python/sqlalchemy-0.9.7[sqlite,${PYTHON_USEDEP}]
354 <=dev-python/sqlalchemy-0.9.99[sqlite,${PYTHON_USEDEP}]
355 )
356 mysql? (
357 dev-python/mysql-python
358 >=dev-python/sqlalchemy-0.9.7[${PYTHON_USEDEP}]
359 <=dev-python/sqlalchemy-0.9.99[${PYTHON_USEDEP}]
360 )
361 postgres? (
362 dev-python/psycopg:2
363 >=dev-python/sqlalchemy-0.9.7[${PYTHON_USEDEP}]
364 <=dev-python/sqlalchemy-0.9.99[${PYTHON_USEDEP}]
365 )
366 >=dev-python/webob-1.2.3[${PYTHON_USEDEP}]
367 >=dev-python/python-keystoneclient-1.1.0[${PYTHON_USEDEP}]
368 <dev-python/python-keystoneclient-1.4.0[${PYTHON_USEDEP}]
369 >=dev-python/alembic-0.7.2[${PYTHON_USEDEP}]
370 >=dev-python/six-1.9.0[${PYTHON_USEDEP}]
371 >=dev-python/stevedore-1.3.0[${PYTHON_USEDEP}]
372 <dev-python/stevedore-1.4.0[${PYTHON_USEDEP}]
373 >=dev-python/oslo-concurrency-1.8.0[${PYTHON_USEDEP}]
374 <dev-python/oslo-concurrency-1.9.0[${PYTHON_USEDEP}]
375 >=dev-python/oslo-config-1.9.3[${PYTHON_USEDEP}]
376 <dev-python/oslo-config-1.10.0[${PYTHON_USEDEP}]
377 >=dev-python/oslo-context-0.2.0[${PYTHON_USEDEP}]
378 <dev-python/oslo-context-0.3.0[${PYTHON_USEDEP}]
379 >=dev-python/oslo-db-1.7.0[${PYTHON_USEDEP}]
380 <dev-python/oslo-db-1.8.0[${PYTHON_USEDEP}]
381 >=dev-python/oslo-i18n-1.5.0[${PYTHON_USEDEP}]
382 <dev-python/oslo-i18n-1.6.0[${PYTHON_USEDEP}]
383 >=dev-python/oslo-log-1.0.0[${PYTHON_USEDEP}]
384 <dev-python/oslo-log-1.1.0[${PYTHON_USEDEP}]
385 >=dev-python/oslo-messaging-1.8.0[${PYTHON_USEDEP}]
386 <dev-python/oslo-messaging-1.9.0[${PYTHON_USEDEP}]
387 >=dev-python/oslo-middleware-1.0.0[${PYTHON_USEDEP}]
388 <dev-python/oslo-middleware-1.1.0[${PYTHON_USEDEP}]
389 >=dev-python/oslo-rootwrap-1.6.0[${PYTHON_USEDEP}]
390 <dev-python/oslo-rootwrap-1.7.0[${PYTHON_USEDEP}]
391 >=dev-python/oslo-serialization-1.4.0[${PYTHON_USEDEP}]
392 <dev-python/oslo-serialization-1.5.0[${PYTHON_USEDEP}]
393 >=dev-python/oslo-utils-1.4.0[${PYTHON_USEDEP}]
394 <dev-python/oslo-utils-1.5.0[${PYTHON_USEDEP}]
395 >=dev-python/python-novaclient-2.22.0[${PYTHON_USEDEP}]
396 <dev-python/python-novaclient-2.24.0[${PYTHON_USEDEP}]
397 dev-python/pyudev[${PYTHON_USEDEP}]
398 sys-apps/iproute2
399 net-misc/bridge-utils
400 net-firewall/ipset
401 net-firewall/iptables
402 net-firewall/ebtables
403 openvswitch? ( net-misc/openvswitch )
404 dhcp? ( net-dns/dnsmasq[dhcp-tools] )"
405
406 PATCHES=(
407 "${FILESDIR}/cve-2015-3221_2015.1.0.patch"
408 )
409
410 pkg_setup() {
411 linux-info_pkg_setup
412 CONFIG_CHECK_MODULES="VLAN_8021Q IP6_NF_FILTER IP6_NF_IPTABLES IP_NF_TARGET_REJECT \
413 IP_NF_MANGLE IP_NF_TARGET_MASQUERADE NF_NAT_IPV4 NF_CONNTRACK_IPV4 NF_DEFRAG_IPV4 \
414 NF_NAT_IPV4 NF_NAT NF_CONNTRACK IP_NF_FILTER IP_NF_IPTABLES NETFILTER_XTABLES"
415 if linux_config_exists; then
416 for module in ${CONFIG_CHECK_MODULES}; do
417 linux_chkconfig_present ${module} || ewarn "${module} needs to be enabled in kernel"
418 done
419 fi
420 enewgroup neutron
421 enewuser neutron -1 -1 /var/lib/neutron neutron
422 }
423
424 pkg_config() {
425 fperms 0700 /var/log/neutron
426 fowners neutron:neutron /var/log neutron
427 }
428
429 src_prepare() {
430 #it's /bin/ip not /sbin/ip
431 sed -i 's/sbin\/ip\,/bin\/ip\,/g' etc/neutron/rootwrap.d/*
432 distutils-r1_src_prepare
433 }
434
435 python_compile_all() {
436 use doc && make -C doc html
437 }
438
439 python_test() {
440 # https://bugs.launchpad.net/neutron/+bug/1234857
441 # https://bugs.launchpad.net/swift/+bug/1249727
442 # https://bugs.launchpad.net/neutron/+bug/1251657
443 # turn multiprocessing off, testr will use it --parallel
444 local DISTUTILS_NO_PARALLEL_BUILD=1
445 # Move tests out that attempt net connection, have failures
446 mv $(find . -name test_ovs_tunnel.py) . || die
447 sed -e 's:test_app_using_ipv6_and_ssl:_&:' \
448 -e 's:test_start_random_port_with_ipv6:_&:' \
449 -i neutron/tests/unit/test_wsgi.py || die
450 testr init
451 testr run --parallel || die "failed testsuite under python2.7"
452 }
453
454 python_install() {
455 distutils-r1_python_install
456 if use server; then
457 newinitd "${FILESDIR}/neutron.initd" "neutron-server"
458 newconfd "${FILESDIR}/neutron-server.confd" "neutron-server"
459 dosym /etc/neutron/plugin.ini /etc/neutron/plugins/ml2/ml2_conf.ini
460 fi
461 if use dhcp; then
462 newinitd "${FILESDIR}/neutron.initd" "neutron-dhcp-agent"
463 newconfd "${FILESDIR}/neutron-dhcp-agent.confd" "neutron-dhcp-agent"
464 fi
465 if use l3; then
466 newinitd "${FILESDIR}/neutron.initd" "neutron-l3-agent"
467 newconfd "${FILESDIR}/neutron-l3-agent.confd" "neutron-l3-agent"
468 fi
469 if use metadata; then
470 newinitd "${FILESDIR}/neutron.initd" "neutron-metadata-agent"
471 newconfd "${FILESDIR}/neutron-metadata-agent.confd" "neutron-metadata-agent"
472 fi
473 if use openvswitch; then
474 newinitd "${FILESDIR}/neutron.initd" "neutron-openvswitch-agent"
475 newconfd "${FILESDIR}/neutron-openvswitch-agent.confd" "neutron-openvswitch-agent"
476 newinitd "${FILESDIR}/neutron.initd" "neutron-ovs-cleanup"
477 newconfd "${FILESDIR}/neutron-openvswitch-agent.confd" "neutron-ovs-cleanup"
478 fi
479 if use linuxbridge; then
480 newinitd "${FILESDIR}/neutron.initd" "neutron-linuxbridge-agent"
481 newconfd "${FILESDIR}/neutron-linuxbridge-agent.confd" "neutron-linuxbridge-agent"
482 fi
483 diropts -m 755 -o neutron -g neutron
484 dodir /var/log/neutron /var/lib/neutron
485 keepdir /etc/neutron
486 insinto /etc/neutron
487 insopts -m 0640 -o neutron -g neutron
488
489 doins etc/*
490 # stupid renames
491 rm "${D}etc/neutron/quantum"
492 insinto /etc/neutron
493 doins -r "etc/neutron/plugins"
494 insopts -m 0640 -o root -g root
495 doins "etc/rootwrap.conf"
496 doins -r "etc/neutron/rootwrap.d"
497
498 insopts -m 0644
499 insinto "/usr/lib64/python2.7/site-packages/neutron/db/migration/alembic_migrations/"
500 doins -r "neutron/db/migration/alembic_migrations/versions"
501
502 #add sudoers definitions for user neutron
503 insinto /etc/sudoers.d/
504 insopts -m 0440 -o root -g root
505 newins "${FILESDIR}/neutron.sudoersd" neutron
506
507 #remove superfluous stuff
508 rm -R "${D}/usr/etc/"
509 }
510
511 python_install_all() {
512 use doc && local HTML_DOCS=( doc/build/html/. )
513 distutils-r1_python_install_all
514 }
515
516 pkg_postinst() {
517 elog
518 elog "neutron-server's conf.d file may need updating to include additional ini files"
519 elog "We currently assume the ml2 plugin will be used but do not make assumptions"
520 elog "on if you will use openvswitch or linuxbridge (or something else)"
521 elog
522 elog "Other conf.d files may need updating too, but should be good for the default use case"
523 elog
524 }