1 |
commit: ed5ad859b368e86d00025c26556b12d31e8b7f0d |
2 |
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Apr 25 23:03:09 2016 +0000 |
4 |
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Apr 25 23:17:19 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed5ad859 |
7 |
|
8 |
app-emulation/cloud-init: version bump to upstream snapshot release, improve install script. |
9 |
|
10 |
Package-Manager: portage-2.2.28 |
11 |
|
12 |
app-emulation/cloud-init/Manifest | 1 + |
13 |
.../cloud-init/cloud-init-0.7.6-r2.ebuild | 77 +++++++++++++++++++++ |
14 |
.../cloud-init/cloud-init-0.7.6_p1212.ebuild | 78 ++++++++++++++++++++++ |
15 |
.../cloud-init/files/cloud-init-0.7.6-gentoo.patch | 51 ++++++++++++++ |
16 |
.../files/cloud-init-0.7.6_p1212-gentoo.patch | 33 +++++++++ |
17 |
5 files changed, 240 insertions(+) |
18 |
|
19 |
diff --git a/app-emulation/cloud-init/Manifest b/app-emulation/cloud-init/Manifest |
20 |
index 4f0a651..6a04d99 100644 |
21 |
--- a/app-emulation/cloud-init/Manifest |
22 |
+++ b/app-emulation/cloud-init/Manifest |
23 |
@@ -1 +1,2 @@ |
24 |
DIST cloud-init-0.7.6.tar.gz 515670 SHA256 9e8fd22eb7f6e40ae6a5f66173ddc3cc18f65ee406c460a728092b37db2f3ed7 SHA512 aa2397328afda8e77ed6d642e7642f41a4b4b5bcd3d0e87056aa8c88b56624ec65c57cfc66b0d13ccc235f1840baf1d577316974902a0439cf2f2eb0f8eef36d WHIRLPOOL 639a556e51b4b4b180951f9e481f9a0dcd45067d1d5760ce7e871ceea8bbb4e195258d96273d3ef88c7e2f2520318e9172c3ad0cb23d6ad0ae1835e17087e3a5 |
25 |
+DIST cloud-init-0.7.6_p1212.tar.gz 451717 SHA256 d213ee72a62cef5ef63369737a52c0ce0c2034ca1ae230925b6679f4335e685d SHA512 25c5d1cc7c8fa887859624b4f28416d455063c278e3f00bfb3561ab0c99aa708d9fa431ff17c42994aba43eb985538982e5175bf0531857cc18fd8e724ef1fd3 WHIRLPOOL d6608c750370fd470d6aae0e88125e9e56b424c40a5b1131b610cb675808b1f7e0657169273db29c4e994d3dce12f6076566eccbac6deee8c4277ffd33ceae38 |
26 |
|
27 |
diff --git a/app-emulation/cloud-init/cloud-init-0.7.6-r2.ebuild b/app-emulation/cloud-init/cloud-init-0.7.6-r2.ebuild |
28 |
new file mode 100644 |
29 |
index 0000000..495d67b |
30 |
--- /dev/null |
31 |
+++ b/app-emulation/cloud-init/cloud-init-0.7.6-r2.ebuild |
32 |
@@ -0,0 +1,77 @@ |
33 |
+# Copyright 1999-2016 Gentoo Foundation |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+# $Id$ |
36 |
+ |
37 |
+EAPI=6 |
38 |
+PYTHON_COMPAT=( python2_7 ) |
39 |
+ |
40 |
+inherit distutils-r1 eutils multilib systemd |
41 |
+ |
42 |
+DESCRIPTION="EC2 initialisation magic" |
43 |
+HOMEPAGE="https://launchpad.net/cloud-init" |
44 |
+SRC_URI="https://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.gz" |
45 |
+ |
46 |
+LICENSE="GPL-3" |
47 |
+SLOT="0" |
48 |
+KEYWORDS="~amd64 ~x86" |
49 |
+IUSE="test" |
50 |
+ |
51 |
+CDEPEND=" |
52 |
+ dev-python/cheetah[${PYTHON_USEDEP}] |
53 |
+ dev-python/configobj[${PYTHON_USEDEP}] |
54 |
+ dev-python/jinja[${PYTHON_USEDEP}] |
55 |
+ dev-python/jsonpatch[${PYTHON_USEDEP}] |
56 |
+ dev-python/oauth[${PYTHON_USEDEP}] |
57 |
+ dev-python/prettytable[${PYTHON_USEDEP}] |
58 |
+ dev-python/pyserial[${PYTHON_USEDEP}] |
59 |
+ dev-python/pyyaml[${PYTHON_USEDEP}] |
60 |
+ dev-python/requests[${PYTHON_USEDEP}] |
61 |
+" |
62 |
+DEPEND=" |
63 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
64 |
+ test? ( |
65 |
+ ${CDEPEND} |
66 |
+ >=dev-python/httpretty-0.7.1[${PYTHON_USEDEP}] |
67 |
+ dev-python/mocker[${PYTHON_USEDEP}] |
68 |
+ dev-python/nose[${PYTHON_USEDEP}] |
69 |
+ ~dev-python/pep8-1.5.7[${PYTHON_USEDEP}] |
70 |
+ dev-python/pyflakes[${PYTHON_USEDEP}] |
71 |
+ sys-apps/iproute2 |
72 |
+ ) |
73 |
+" |
74 |
+RDEPEND=" |
75 |
+ ${CDEPEND} |
76 |
+ sys-fs/growpart |
77 |
+ virtual/logger |
78 |
+" |
79 |
+ |
80 |
+PATCHES=( "${FILESDIR}/cloud-init-0.7.6-gentoo.patch" ) |
81 |
+ |
82 |
+python_prepare_all() { |
83 |
+ distutils-r1_python_prepare_all |
84 |
+} |
85 |
+ |
86 |
+python_test() { |
87 |
+ emake test |
88 |
+} |
89 |
+ |
90 |
+python_install_all() { |
91 |
+ keepdir /etc/cloud |
92 |
+ |
93 |
+ distutils-r1_python_install_all |
94 |
+ |
95 |
+ doinitd "${S}"/sysvinit/gentoo/cloud-config |
96 |
+ doinitd "${S}"/sysvinit/gentoo/cloud-final |
97 |
+ doinitd "${S}"/sysvinit/gentoo/cloud-init |
98 |
+ doinitd "${S}"/sysvinit/gentoo/cloud-init-local |
99 |
+ insinto /etc/cloud/templates |
100 |
+ doins "${FILESDIR}/hosts.gentoo.tmpl" |
101 |
+ insinto /etc/cloud |
102 |
+ doins "${FILESDIR}/cloud.cfg" |
103 |
+ |
104 |
+ systemd_dounit "${S}"/systemd/cloud-config.service |
105 |
+ systemd_dounit "${S}"/systemd/cloud-config.target |
106 |
+ systemd_dounit "${S}"/systemd/cloud-final.service |
107 |
+ systemd_dounit "${S}"/systemd/cloud-init-local.service |
108 |
+ systemd_dounit "${S}"/systemd/cloud-init.service |
109 |
+} |
110 |
|
111 |
diff --git a/app-emulation/cloud-init/cloud-init-0.7.6_p1212.ebuild b/app-emulation/cloud-init/cloud-init-0.7.6_p1212.ebuild |
112 |
new file mode 100644 |
113 |
index 0000000..9c9d081 |
114 |
--- /dev/null |
115 |
+++ b/app-emulation/cloud-init/cloud-init-0.7.6_p1212.ebuild |
116 |
@@ -0,0 +1,78 @@ |
117 |
+# Copyright 1999-2016 Gentoo Foundation |
118 |
+# Distributed under the terms of the GNU General Public License v2 |
119 |
+# $Id$ |
120 |
+ |
121 |
+EAPI=6 |
122 |
+PYTHON_COMPAT=( python2_7 ) |
123 |
+BZRTGZ=1 |
124 |
+ |
125 |
+inherit distutils-r1 eutils multilib systemd |
126 |
+ |
127 |
+DESCRIPTION="EC2 initialisation magic" |
128 |
+HOMEPAGE="https://launchpad.net/cloud-init" |
129 |
+if [ "x$BZRTGZ" != x1 ]; then |
130 |
+ SRC_URI="https://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.gz" |
131 |
+else |
132 |
+ SRC_URI="http://bazaar.launchpad.net/~${PN}-dev/${PN}/trunk/tarball/${PV/*_p} -> ${P}.tar.gz" |
133 |
+ S="${WORKDIR}/~cloud-init-dev/cloud-init/trunk/" |
134 |
+fi |
135 |
+ |
136 |
+LICENSE="GPL-3" |
137 |
+SLOT="0" |
138 |
+KEYWORDS="~amd64 ~x86" |
139 |
+IUSE="test" |
140 |
+ |
141 |
+ |
142 |
+CDEPEND=" |
143 |
+ dev-python/cheetah[${PYTHON_USEDEP}] |
144 |
+ dev-python/configobj[${PYTHON_USEDEP}] |
145 |
+ dev-python/jinja[${PYTHON_USEDEP}] |
146 |
+ dev-python/jsonpatch[${PYTHON_USEDEP}] |
147 |
+ dev-python/oauth[${PYTHON_USEDEP}] |
148 |
+ dev-python/prettytable[${PYTHON_USEDEP}] |
149 |
+ dev-python/pyserial[${PYTHON_USEDEP}] |
150 |
+ dev-python/pyyaml[${PYTHON_USEDEP}] |
151 |
+ dev-python/requests[${PYTHON_USEDEP}] |
152 |
+" |
153 |
+DEPEND=" |
154 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
155 |
+ test? ( |
156 |
+ ${CDEPEND} |
157 |
+ >=dev-python/httpretty-0.7.1[${PYTHON_USEDEP}] |
158 |
+ dev-python/mocker[${PYTHON_USEDEP}] |
159 |
+ dev-python/nose[${PYTHON_USEDEP}] |
160 |
+ ~dev-python/pep8-1.5.7[${PYTHON_USEDEP}] |
161 |
+ dev-python/pyflakes[${PYTHON_USEDEP}] |
162 |
+ sys-apps/iproute2 |
163 |
+ ) |
164 |
+" |
165 |
+RDEPEND=" |
166 |
+ ${CDEPEND} |
167 |
+ sys-fs/growpart |
168 |
+ virtual/logger |
169 |
+" |
170 |
+ |
171 |
+PATCHES=( "${FILESDIR}/cloud-init-0.7.6_p1212-gentoo.patch" ) |
172 |
+ |
173 |
+python_prepare_all() { |
174 |
+ distutils-r1_python_prepare_all |
175 |
+} |
176 |
+ |
177 |
+python_test() { |
178 |
+ emake test |
179 |
+} |
180 |
+ |
181 |
+python_install() { |
182 |
+ distutils-r1_python_install "--init-system=sysvinit_openrc" |
183 |
+} |
184 |
+ |
185 |
+python_install_all() { |
186 |
+ keepdir /etc/cloud |
187 |
+ |
188 |
+ distutils-r1_python_install_all |
189 |
+ |
190 |
+ insinto /etc/cloud/templates |
191 |
+ doins "${FILESDIR}/hosts.gentoo.tmpl" |
192 |
+ insinto /etc/cloud |
193 |
+ doins "${FILESDIR}/cloud.cfg" |
194 |
+} |
195 |
|
196 |
diff --git a/app-emulation/cloud-init/files/cloud-init-0.7.6-gentoo.patch b/app-emulation/cloud-init/files/cloud-init-0.7.6-gentoo.patch |
197 |
new file mode 100644 |
198 |
index 0000000..27abd38 |
199 |
--- /dev/null |
200 |
+++ b/app-emulation/cloud-init/files/cloud-init-0.7.6-gentoo.patch |
201 |
@@ -0,0 +1,51 @@ |
202 |
+# Note: Gentoo places ip in /sbin/ not /bin/ |
203 |
+diff -Nuar cloud-init-0.7.6.orig/cloudinit/sources/DataSourceOpenNebula.py cloud-init-0.7.6/cloudinit/sources/DataSourceOpenNebula.py |
204 |
+--- cloud-init-0.7.6.orig/cloudinit/sources/DataSourceOpenNebula.py 2014-10-10 08:26:25.000000000 -0700 |
205 |
++++ cloud-init-0.7.6/cloudinit/sources/DataSourceOpenNebula.py 2016-04-25 15:24:51.483130933 -0700 |
206 |
+@@ -435,7 +435,7 @@ |
207 |
+ # http://opennebula.org/documentation:rel3.8:cong#network_configuration |
208 |
+ for k in context.keys(): |
209 |
+ if re.match(r'^ETH\d+_IP$', k): |
210 |
+- (out, _) = util.subp(['/sbin/ip', 'link']) |
211 |
++ (out, _) = util.subp(['/bin/ip', 'link']) |
212 |
+ net = OpenNebulaNetwork(out, context) |
213 |
+ results['network-interfaces'] = net.gen_conf() |
214 |
+ break |
215 |
+ |
216 |
+# Note Gentoo installs its own RC files |
217 |
+diff -Nuar cloud-init-0.7.6.orig/setup.py cloud-init-0.7.6/setup.py |
218 |
+--- cloud-init-0.7.6.orig/setup.py 2014-10-10 08:26:25.000000000 -0700 |
219 |
++++ cloud-init-0.7.6/setup.py 2016-04-25 15:24:51.488131027 -0700 |
220 |
+@@ -141,7 +141,7 @@ |
221 |
+ author='Scott Moser', |
222 |
+ author_email='scott.moser@×××××××××.com', |
223 |
+ url='http://launchpad.net/cloud-init/', |
224 |
+- packages=setuptools.find_packages(exclude=['tests']), |
225 |
++ packages=setuptools.find_packages(exclude=['tests.*', 'tests']), |
226 |
+ scripts=['bin/cloud-init', |
227 |
+ 'tools/cloud-init-per', |
228 |
+ ], |
229 |
+@@ -160,9 +160,4 @@ |
230 |
+ [f for f in glob('doc/examples/seed/*') if is_f(f)]), |
231 |
+ ], |
232 |
+ install_requires=read_requires(), |
233 |
+- cmdclass={ |
234 |
+- # Use a subclass for install that handles |
235 |
+- # adding on the right init system configuration files |
236 |
+- 'install': InitsysInstallData, |
237 |
+- }, |
238 |
+ ) |
239 |
+ |
240 |
+# https://bugs.launchpad.net/cloud-init/+bug/1380424 |
241 |
+diff -Nuar cloud-init-0.7.6.orig/tests/unittests/test_distros/test_netconfig.py cloud-init-0.7.6/tests/unittests/test_distros/test_netconfig.py |
242 |
+--- cloud-init-0.7.6.orig/tests/unittests/test_distros/test_netconfig.py 2014-10-10 08:26:25.000000000 -0700 |
243 |
++++ cloud-init-0.7.6/tests/unittests/test_distros/test_netconfig.py 2016-04-25 15:24:51.485130971 -0700 |
244 |
+@@ -174,7 +174,7 @@ |
245 |
+ self.assertCfgEquals(expected_buf, str(write_buf)) |
246 |
+ self.assertEquals(write_buf.mode, 0644) |
247 |
+ |
248 |
+- def test_simple_write_freebsd(self): |
249 |
++ def _test_simple_write_freebsd(self): |
250 |
+ fbsd_distro = self._get_distro('freebsd') |
251 |
+ util_mock = self.mocker.replace(util.write_file, |
252 |
+ spec=False, passthrough=False) |
253 |
|
254 |
diff --git a/app-emulation/cloud-init/files/cloud-init-0.7.6_p1212-gentoo.patch b/app-emulation/cloud-init/files/cloud-init-0.7.6_p1212-gentoo.patch |
255 |
new file mode 100644 |
256 |
index 0000000..ef5d950 |
257 |
--- /dev/null |
258 |
+++ b/app-emulation/cloud-init/files/cloud-init-0.7.6_p1212-gentoo.patch |
259 |
@@ -0,0 +1,33 @@ |
260 |
+diff -Nuar --exclude '*~' trunk.orig/setup.py trunk/setup.py |
261 |
+--- trunk.orig/setup.py 2016-04-25 14:44:43.000000000 -0700 |
262 |
++++ trunk/setup.py 2016-04-25 15:44:45.254496814 -0700 |
263 |
+@@ -1,3 +1,4 @@ |
264 |
++#!/usr/bin/python2 |
265 |
+ # vi: ts=4 expandtab |
266 |
+ # |
267 |
+ # Distutils magic for ec2-init |
268 |
+@@ -74,6 +75,7 @@ |
269 |
+ 'sysvinit': [f for f in glob('sysvinit/redhat/*') if is_f(f)], |
270 |
+ 'sysvinit_freebsd': [f for f in glob('sysvinit/freebsd/*') if is_f(f)], |
271 |
+ 'sysvinit_deb': [f for f in glob('sysvinit/debian/*') if is_f(f)], |
272 |
++ 'sysvinit_openrc': [f for f in glob('sysvinit/gentoo/*') if is_f(f)], |
273 |
+ 'systemd': [f for f in (glob('systemd/*.service') + |
274 |
+ glob('systemd/*.target')) if is_f(f)], |
275 |
+ 'systemd.generators': [f for f in glob('systemd/*-generator') if is_f(f)], |
276 |
+@@ -83,6 +85,7 @@ |
277 |
+ 'sysvinit': '/etc/rc.d/init.d', |
278 |
+ 'sysvinit_freebsd': '/usr/local/etc/rc.d', |
279 |
+ 'sysvinit_deb': '/etc/init.d', |
280 |
++ 'sysvinit_openrc': '/etc/init.d', |
281 |
+ 'systemd': pkg_config_read('systemd', 'systemdsystemunitdir'), |
282 |
+ 'systemd.generators': pkg_config_read('systemd', |
283 |
+ 'systemdsystemgeneratordir'), |
284 |
+@@ -205,7 +208,7 @@ |
285 |
+ author='Scott Moser', |
286 |
+ author_email='scott.moser@×××××××××.com', |
287 |
+ url='http://launchpad.net/cloud-init/', |
288 |
+- packages=setuptools.find_packages(exclude=['tests']), |
289 |
++ packages=setuptools.find_packages(exclude=['tests.*', 'tests']), |
290 |
+ scripts=['bin/cloud-init', |
291 |
+ 'tools/cloud-init-per'], |
292 |
+ license='GPLv3', |