1 |
commit: 353ead38dc41437704919d82b9bc4e64ed294cdc |
2 |
Author: Matthew Thode <prometheanfire <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Feb 11 18:12:01 2020 +0000 |
4 |
Commit: Matthew Thode <prometheanfire <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Feb 11 18:12:52 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=353ead38 |
7 |
|
8 |
app-emulation/cloud-init: 19.4 bump |
9 |
|
10 |
includes fix for CVE-2020-{8631,8632} |
11 |
Bug: https://bugs.gentoo.org/708738 |
12 |
Package-Manager: Portage-2.3.84, Repoman-2.3.20 |
13 |
Signed-off-by: Matthew Thode <prometheanfire <AT> gentoo.org> |
14 |
|
15 |
app-emulation/cloud-init/Manifest | 1 + |
16 |
app-emulation/cloud-init/cloud-init-19.4.ebuild | 90 +++++++++++++++++++++ |
17 |
...it-19.4-gentoo-support-upstream-templates.patch | 93 ++++++++++++++++++++++ |
18 |
.../files/cloud-init-19.4_CVE-2020-8631.patch | 25 ++++++ |
19 |
app-emulation/cloud-init/metadata.xml | 2 +- |
20 |
5 files changed, 210 insertions(+), 1 deletion(-) |
21 |
|
22 |
diff --git a/app-emulation/cloud-init/Manifest b/app-emulation/cloud-init/Manifest |
23 |
index 4f2aa6f1599..41552972418 100644 |
24 |
--- a/app-emulation/cloud-init/Manifest |
25 |
+++ b/app-emulation/cloud-init/Manifest |
26 |
@@ -1,3 +1,4 @@ |
27 |
DIST cloud-init-17.2.tar.gz 810821 BLAKE2B df1a7c1ed1fc48a7801a53bd89839d963debca6abf7f892d61bf7ec9222ab33bf78221e65d79028e0445cac4c5fe1e0c1620d49aea26c036ee17933d9c1893f5 SHA512 ad1c7f6ca9762b70a1f06a6b538032a7de0c5371fd792260d5959df113f4f51509d184b2207ffa23b41f395c1903d551d66aaf2a2ad60af3594cf1f18d1e4a38 |
28 |
DIST cloud-init-18.4.tar.gz 965112 BLAKE2B 2879aafedea877e4e406a5e837d100ba65e40c62660621f606e7a189af7b1ec8d98ba2c02ae5d253a0b4587502d3a636dec5c2772c968a9037b47e62a05656b4 SHA512 730aca6406f652f55afc2dd50c49eb6708584e0a96715606bcba05cb7f40e47c256faff1f9748f04674a8f941ec9435801c9ed2ac79adec8a6ef167d6b195103 |
29 |
DIST cloud-init-18.5.tar.gz 990381 BLAKE2B 0dbbd5b2402d3a7742c46f8a37b0ea31f40ac16bdbfe49dca0056ab8f90c47dbf26e6d3f40f34275caf5102d0b9b8be4e2c28bfc2276e85a5aad11af20b08979 SHA512 f89ee636922e33b5b2dcb5230763404fbeee148e28b8f61bf5b2f1f07000f960f9d38545dfb7bcbe9afb8253f77d66c94b39e9a159715b44a440a7cbe1fe1aeb |
30 |
+DIST cloud-init-19.4.tar.gz 1091893 BLAKE2B 2ab8fef70b420c066d6d8f83871568eeac24f00879ecf3d58c3768dd809cff6a3b79c7e72d9a10204002101049ab86ab64f0c524362e00497a9222960ef380df SHA512 e69ea47eab41d69d64fa44102fbde59319da5f71a68f28a0f6ac65cd6866542b4fe58a71b84c903cfa9b1d2f26eb648cdf4de633b8df61e4f89c9fa4c2a2b1d3 |
31 |
|
32 |
diff --git a/app-emulation/cloud-init/cloud-init-19.4.ebuild b/app-emulation/cloud-init/cloud-init-19.4.ebuild |
33 |
new file mode 100644 |
34 |
index 00000000000..67e494f94a8 |
35 |
--- /dev/null |
36 |
+++ b/app-emulation/cloud-init/cloud-init-19.4.ebuild |
37 |
@@ -0,0 +1,90 @@ |
38 |
+# Copyright 1999-2020 Gentoo Authors |
39 |
+# Distributed under the terms of the GNU General Public License v2 |
40 |
+ |
41 |
+EAPI=7 |
42 |
+PYTHON_COMPAT=( python3_6 python3_7 ) |
43 |
+ |
44 |
+inherit distutils-r1 |
45 |
+ |
46 |
+DESCRIPTION="Cloud instance initialisation magic" |
47 |
+HOMEPAGE="https://launchpad.net/cloud-init" |
48 |
+SRC_URI="https://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.gz" |
49 |
+ |
50 |
+LICENSE="GPL-3" |
51 |
+SLOT="0" |
52 |
+KEYWORDS="~amd64 ~x86" |
53 |
+IUSE="test" |
54 |
+RESTRICT="!test? ( test )" |
55 |
+ |
56 |
+CDEPEND=" |
57 |
+ dev-python/jinja[${PYTHON_USEDEP}] |
58 |
+ dev-python/oauthlib[${PYTHON_USEDEP}] |
59 |
+ dev-python/pyserial[${PYTHON_USEDEP}] |
60 |
+ >=dev-python/configobj-5.0.2[${PYTHON_USEDEP}] |
61 |
+ dev-python/pyyaml[${PYTHON_USEDEP}] |
62 |
+ dev-python/requests[${PYTHON_USEDEP}] |
63 |
+ dev-python/jsonpatch[${PYTHON_USEDEP}] |
64 |
+ dev-python/jsonschema[${PYTHON_USEDEP}] |
65 |
+ dev-python/six[${PYTHON_USEDEP}] |
66 |
+" |
67 |
+DEPEND=" |
68 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
69 |
+ test? ( |
70 |
+ ${CDEPEND} |
71 |
+ >=dev-python/httpretty-0.7.1[${PYTHON_USEDEP}] |
72 |
+ dev-python/mock[${PYTHON_USEDEP}] |
73 |
+ dev-python/nose[${PYTHON_USEDEP}] |
74 |
+ dev-python/unittest2[${PYTHON_USEDEP}] |
75 |
+ dev-python/coverage[${PYTHON_USEDEP}] |
76 |
+ dev-python/contextlib2[${PYTHON_USEDEP}] |
77 |
+ ) |
78 |
+" |
79 |
+RDEPEND=" |
80 |
+ ${CDEPEND} |
81 |
+ net-analyzer/macchanger |
82 |
+ sys-apps/iproute2 |
83 |
+ sys-fs/growpart |
84 |
+ virtual/logger |
85 |
+" |
86 |
+ |
87 |
+PATCHES=( |
88 |
+ # Fix Gentoo support |
89 |
+ # https://code.launchpad.net/~gilles-dartiguelongue/cloud-init/+git/cloud-init/+merge/358777 |
90 |
+ "${FILESDIR}/${PN}-18.4-fix-packages-module.patch" |
91 |
+ "${FILESDIR}/${P}-gentoo-support-upstream-templates.patch" |
92 |
+ "${FILESDIR}"/18.4-fix-filename-for-storing-locale.patch |
93 |
+ "${FILESDIR}"/18.4-fix-update_package_sources-function.patch |
94 |
+ "${FILESDIR}"/18.4-add-support-for-package_upgrade.patch |
95 |
+ "${FILESDIR}/${P}_CVE-2020-8631.patch" |
96 |
+) |
97 |
+ |
98 |
+src_prepare() { |
99 |
+ # Fix location of documentation installation |
100 |
+ sed -i "s:USR + '/share/doc/cloud-init:USR + '/share/doc/${PF}:" setup.py || die |
101 |
+ distutils-r1_src_prepare |
102 |
+} |
103 |
+ |
104 |
+python_test() { |
105 |
+ # Do not use Makefile target as it does not setup environment correclty |
106 |
+ esetup.py nosetests -v --where cloudinit --where tests/unittests || die |
107 |
+} |
108 |
+ |
109 |
+python_install() { |
110 |
+ distutils-r1_python_install --init-system=sysvinit_openrc,systemd --distro gentoo |
111 |
+} |
112 |
+ |
113 |
+python_install_all() { |
114 |
+ keepdir /etc/cloud |
115 |
+ |
116 |
+ distutils-r1_python_install_all |
117 |
+ |
118 |
+ # installs as non-executable |
119 |
+ chmod +x "${D}"/etc/init.d/* |
120 |
+} |
121 |
+ |
122 |
+pkg_postinst() { |
123 |
+ elog "cloud-init-local needs to be run in the boot runlevel because it" |
124 |
+ elog "modifies services in the default runlevel. When a runlevel is started" |
125 |
+ elog "it is cached, so modifications that happen to the current runlevel" |
126 |
+ elog "while you are in it are not acted upon." |
127 |
+} |
128 |
|
129 |
diff --git a/app-emulation/cloud-init/files/cloud-init-19.4-gentoo-support-upstream-templates.patch b/app-emulation/cloud-init/files/cloud-init-19.4-gentoo-support-upstream-templates.patch |
130 |
new file mode 100644 |
131 |
index 00000000000..210c2943736 |
132 |
--- /dev/null |
133 |
+++ b/app-emulation/cloud-init/files/cloud-init-19.4-gentoo-support-upstream-templates.patch |
134 |
@@ -0,0 +1,93 @@ |
135 |
+From 823454f1ea140ec47f5f9c5c3c5ad62eb458eb8a Mon Sep 17 00:00:00 2001 |
136 |
+From: Gilles Dartiguelongue <eva@g.o> |
137 |
+Date: Wed, 24 Oct 2018 10:52:46 +0200 |
138 |
+Subject: [PATCH 2/5] Add support for gentoo in cloud.cfg and templates |
139 |
+ |
140 |
+--- |
141 |
+ config/cloud.cfg.tmpl | 8 ++++++-- |
142 |
+ templates/hosts.gentoo.tmpl | 24 ++++++++++++++++++++++++ |
143 |
+ tools/render-cloudcfg | 2 +- |
144 |
+ 3 files changed, 31 insertions(+), 3 deletions(-) |
145 |
+ create mode 100644 templates/hosts.gentoo.tmpl |
146 |
+ |
147 |
+diff --git a/config/cloud.cfg.tmpl b/config/cloud.cfg.tmpl |
148 |
+index 1fef133a..3f5a41a2 100644 |
149 |
+--- a/config/cloud.cfg.tmpl |
150 |
++++ b/config/cloud.cfg.tmpl |
151 |
+@@ -134,7 +134,7 @@ cloud_final_modules: |
152 |
+ # (not accessible to handlers/transforms) |
153 |
+ system_info: |
154 |
+ # This will affect which distro class gets used |
155 |
+-{% if variant in ["arch", "centos", "debian", "fedora", "freebsd", "rhel", "suse", "ubuntu"] %} |
156 |
++{% if variant in ["arch", "centos", "debian", "fedora", "freebsd", "gentoo", "rhel", "suse", "ubuntu"] %} |
157 |
+ distro: {{ variant }} |
158 |
+ {% else %} |
159 |
+ # Unknown/fallback distro. |
160 |
+@@ -172,7 +172,7 @@ system_info: |
161 |
+ primary: http://ports.ubuntu.com/ubuntu-ports |
162 |
+ security: http://ports.ubuntu.com/ubuntu-ports |
163 |
+ ssh_svcname: ssh |
164 |
+-{% elif variant in ["arch", "centos", "fedora", "rhel", "suse"] %} |
165 |
++{% elif variant in ["arch", "centos", "fedora", "gentoo", "rhel", "suse"] %} |
166 |
+ # Default user name + that default users groups (if added/used) |
167 |
+ default_user: |
168 |
+ name: {{ variant }} |
169 |
+@@ -180,6 +180,10 @@ system_info: |
170 |
+ {% endif %} |
171 |
+ {% if variant == "suse" %} |
172 |
+ groups: [cdrom, users] |
173 |
++{% elif variant == "gentoo" %} |
174 |
++ groups: [users, wheel] |
175 |
++ primary_group: users |
176 |
++ no_user_group: true |
177 |
+ {% elif variant == "arch" %} |
178 |
+ groups: [wheel, users] |
179 |
+ {% else %} |
180 |
+diff --git a/templates/hosts.gentoo.tmpl b/templates/hosts.gentoo.tmpl |
181 |
+new file mode 100644 |
182 |
+index 00000000..cd045fa6 |
183 |
+--- /dev/null |
184 |
++++ b/templates/hosts.gentoo.tmpl |
185 |
+@@ -0,0 +1,24 @@ |
186 |
++## template:jinja |
187 |
++{# |
188 |
++This file /etc/cloud/templates/hosts.gentoo.tmpl is only utilized |
189 |
++if enabled in cloud-config. Specifically, in order to enable it |
190 |
++you need to add the following to config: |
191 |
++ manage_etc_hosts: True |
192 |
++-#} |
193 |
++# Your system has configured 'manage_etc_hosts' as True. |
194 |
++# As a result, if you wish for changes to this file to persist |
195 |
++# then you will need to either |
196 |
++# a.) make changes to the master file in /etc/cloud/templates/hosts.gentoo.tmpl |
197 |
++# b.) change or remove the value of 'manage_etc_hosts' in |
198 |
++# /etc/cloud/cloud.cfg or cloud-config from user-data |
199 |
++# |
200 |
++# The following lines are desirable for IPv4 capable hosts |
201 |
++127.0.0.1 {{fqdn}} {{hostname}} |
202 |
++127.0.0.1 localhost.localdomain localhost |
203 |
++127.0.0.1 localhost4.localdomain4 localhost4 |
204 |
++ |
205 |
++# The following lines are desirable for IPv6 capable hosts |
206 |
++::1 {{fqdn}} {{hostname}} |
207 |
++::1 localhost.localdomain localhost |
208 |
++::1 localhost6.localdomain6 localhost6 |
209 |
++ |
210 |
+diff --git a/tools/render-cloudcfg b/tools/render-cloudcfg |
211 |
+index 8b7cb875..d109044e 100755 |
212 |
+--- a/tools/render-cloudcfg |
213 |
++++ b/tools/render-cloudcfg |
214 |
+@@ -4,7 +4,7 @@ import argparse |
215 |
+ import os |
216 |
+ import sys |
217 |
+ |
218 |
+-VARIANTS = ["arch", "centos", "debian", "fedora", "freebsd", "rhel", "suse", |
219 |
+- "ubuntu", "unknown"] |
220 |
++VARIANTS = ["arch", "centos", "debian", "fedora", "freebsd", "gentoo", "rhel", |
221 |
++ "suse", "ubuntu", "unknown"] |
222 |
+ |
223 |
+ if "avoid-pep8-E402-import-not-top-of-file": |
224 |
+ _tdir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) |
225 |
+-- |
226 |
+2.19.1 |
227 |
+ |
228 |
|
229 |
diff --git a/app-emulation/cloud-init/files/cloud-init-19.4_CVE-2020-8631.patch b/app-emulation/cloud-init/files/cloud-init-19.4_CVE-2020-8631.patch |
230 |
new file mode 100644 |
231 |
index 00000000000..625473c68f1 |
232 |
--- /dev/null |
233 |
+++ b/app-emulation/cloud-init/files/cloud-init-19.4_CVE-2020-8631.patch |
234 |
@@ -0,0 +1,25 @@ |
235 |
+From 42788bf24a1a0a5421a2d00a7f59b59e38ba1a14 Mon Sep 17 00:00:00 2001 |
236 |
+From: Ryan Harper <ryan.harper@×××××××××.com> |
237 |
+Date: Fri, 24 Jan 2020 21:33:12 +0200 |
238 |
+Subject: [PATCH] cc_set_password: increase random pwlength from 9 to 20 (#189) |
239 |
+ |
240 |
+Increasing the bits of security from 52 to 115. |
241 |
+ |
242 |
+LP: #1860795 |
243 |
+--- |
244 |
+ cloudinit/config/cc_set_passwords.py | 2 +- |
245 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
246 |
+ |
247 |
+diff --git a/cloudinit/config/cc_set_passwords.py b/cloudinit/config/cc_set_passwords.py |
248 |
+index e3b39d8be..4943d5453 100755 |
249 |
+--- a/cloudinit/config/cc_set_passwords.py |
250 |
++++ b/cloudinit/config/cc_set_passwords.py |
251 |
+@@ -236,7 +236,7 @@ def handle(_name, cfg, cloud, log, args): |
252 |
+ raise errors[-1] |
253 |
+ |
254 |
+ |
255 |
+-def rand_user_password(pwlen=9): |
256 |
++def rand_user_password(pwlen=20): |
257 |
+ return util.rand_str(pwlen, select_from=PW_SET) |
258 |
+ |
259 |
+ |
260 |
|
261 |
diff --git a/app-emulation/cloud-init/metadata.xml b/app-emulation/cloud-init/metadata.xml |
262 |
index ac6c94ad067..997452569a6 100644 |
263 |
--- a/app-emulation/cloud-init/metadata.xml |
264 |
+++ b/app-emulation/cloud-init/metadata.xml |
265 |
@@ -10,7 +10,7 @@ |
266 |
<name>Gilles Dartiguelongue</name> |
267 |
</maintainer> |
268 |
<longdescription lang="en"> |
269 |
- Package provides configuration and customization of cloud instance. |
270 |
+ Cloud-init is the industry standard multi-distribution method for cross-platform cloud instance initialization. It is supported across all major public cloud providers, provisioning systems for private cloud infrastructure, and bare-metal installations. |
271 |
</longdescription> |
272 |
<upstream> |
273 |
<remote-id type="launchpad">cloud-init</remote-id> |