1 |
commit: f4c814c4c7ee3b4d9740fecb99394208213fb3d5 |
2 |
Author: Thomas Bettler <thomas.bettler <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu Apr 7 22:13:10 2022 +0000 |
4 |
Commit: Matthew Thode <prometheanfire <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Apr 8 19:03:43 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f4c814c4 |
7 |
|
8 |
app-emulation/cloud-init: bump to 22.1 |
9 |
|
10 |
Closes: https://github.com/gentoo/gentoo/pull/24949 |
11 |
|
12 |
Signed-off-by: Thomas Bettler <thomas.bettler <AT> gmail.com> |
13 |
Signed-off-by: Matthew Thode <prometheanfire <AT> gentoo.org> |
14 |
|
15 |
app-emulation/cloud-init/Manifest | 1 + |
16 |
...oud-init-9999.ebuild => cloud-init-22.1.ebuild} | 23 ++++------- |
17 |
app-emulation/cloud-init/cloud-init-9999.ebuild | 23 ++++------- |
18 |
.../22.1-add-support-for-package_upgrade.patch | 48 ++++++++++++++++++++++ |
19 |
.../22.1-fix-update_package_sources-function.patch | 21 ++++++++++ |
20 |
5 files changed, 88 insertions(+), 28 deletions(-) |
21 |
|
22 |
diff --git a/app-emulation/cloud-init/Manifest b/app-emulation/cloud-init/Manifest |
23 |
index 52f471a1757f..2daed96816fa 100644 |
24 |
--- a/app-emulation/cloud-init/Manifest |
25 |
+++ b/app-emulation/cloud-init/Manifest |
26 |
@@ -1,2 +1,3 @@ |
27 |
DIST cloud-init-20.4.tar.gz 1228898 BLAKE2B c5697af31e7219a060a82732fbae2e89dd00786e5b0feb638f1f64f6ce861df041ef687a6095cc3bdb5478f4f4c1504286155808102aea9cae853caa97d4ba1b SHA512 da2fa4673b253468380c4472795fd449809c8ac84d8f13ec1472b9b7e7d54e187ae06e5a81a36774793b05f4e1212dca57bc19aa8955b4c7fa7183cb100bfbb9 |
28 |
DIST cloud-init-21.2.tar.gz 1278878 BLAKE2B 74e07649a24fc85df54aafcd72797a05f0bdbcceb90fe90c6af7024da09e876780b67bb1d7963cd164d03e3151715944b1f3fd5709d3557ac341a09061409fcc SHA512 8cc24945efc6f16b3c64411c5e7e5b83582d337f1c3f546163d52c14a6177ff752e91ba1fec04b7ade800f921c2b79c04d032df62c2b4171930ca1fb74c49a7d |
29 |
+DIST cloud-init-22.1.tar.gz 1313034 BLAKE2B ca55378db822cdf58808de1bd2b519861c50ad8b08ed699212827833e0134fdc0968b76a4c2a13f39eae1d20ef8b22a99ff99b85ef77e496fd41593f4e2f2d55 SHA512 485e358777379a22dd2b0f6aa7afb1751eb44831c6e03ecbbd9c6823eaa20535e6e83fc245818ce1bb207425976839b356dadcfa3cfe62385b9d340b08ff21ab |
30 |
|
31 |
diff --git a/app-emulation/cloud-init/cloud-init-9999.ebuild b/app-emulation/cloud-init/cloud-init-22.1.ebuild |
32 |
similarity index 79% |
33 |
copy from app-emulation/cloud-init/cloud-init-9999.ebuild |
34 |
copy to app-emulation/cloud-init/cloud-init-22.1.ebuild |
35 |
index c355c9f901de..ace04bcfa721 100644 |
36 |
--- a/app-emulation/cloud-init/cloud-init-9999.ebuild |
37 |
+++ b/app-emulation/cloud-init/cloud-init-22.1.ebuild |
38 |
@@ -1,9 +1,10 @@ |
39 |
# Copyright 1999-2021 Gentoo Authors |
40 |
# Distributed under the terms of the GNU General Public License v2 |
41 |
|
42 |
-EAPI=7 |
43 |
-PYTHON_COMPAT=( python3_7 python3_8 python3_9 ) |
44 |
-DISTUTILS_USE_SETUPTOOLS=rdepend |
45 |
+EAPI=8 |
46 |
+ |
47 |
+DISTUTILS_USE_PEP517=setuptools |
48 |
+PYTHON_COMPAT=( python3_{8..10} ) |
49 |
|
50 |
inherit distutils-r1 |
51 |
|
52 |
@@ -35,8 +36,8 @@ CDEPEND=" |
53 |
dev-python/six[${PYTHON_USEDEP}] |
54 |
" |
55 |
DEPEND=" |
56 |
- test? ( |
57 |
${CDEPEND} |
58 |
+ test? ( |
59 |
>=dev-python/httpretty-0.7.1[${PYTHON_USEDEP}] |
60 |
dev-python/mock[${PYTHON_USEDEP}] |
61 |
dev-python/nose[${PYTHON_USEDEP}] |
62 |
@@ -54,13 +55,12 @@ RDEPEND=" |
63 |
PATCHES=( |
64 |
# Fix Gentoo support |
65 |
# https://code.launchpad.net/~gilles-dartiguelongue/cloud-init/+git/cloud-init/+merge/358777 |
66 |
- "${FILESDIR}/${PN}-18.4-fix-packages-module.patch" |
67 |
- "${FILESDIR}/${PN}-21.2-gentoo-support-upstream-templates.patch" |
68 |
- "${FILESDIR}"/18.4-fix-filename-for-storing-locale.patch |
69 |
- "${FILESDIR}"/18.4-fix-update_package_sources-function.patch |
70 |
- "${FILESDIR}"/18.4-add-support-for-package_upgrade.patch |
71 |
+ "${FILESDIR}"/22.1-fix-update_package_sources-function.patch |
72 |
+ "${FILESDIR}"/22.1-add-support-for-package_upgrade.patch |
73 |
) |
74 |
|
75 |
+distutils_enable_tests nose |
76 |
+ |
77 |
python_prepare_all() { |
78 |
# Fix location of documentation installation |
79 |
sed -i "s:USR + '/share/doc/cloud-init:USR + '/share/doc/${PF}:" setup.py || die |
80 |
@@ -68,11 +68,6 @@ python_prepare_all() { |
81 |
distutils-r1_python_prepare_all |
82 |
} |
83 |
|
84 |
-python_test() { |
85 |
- # Do not use Makefile target as it does not setup environment correclty |
86 |
- esetup.py nosetests -v --where cloudinit --where tests/unittests || die |
87 |
-} |
88 |
- |
89 |
python_install() { |
90 |
distutils-r1_python_install --init-system=sysvinit_openrc,systemd --distro gentoo |
91 |
} |
92 |
|
93 |
diff --git a/app-emulation/cloud-init/cloud-init-9999.ebuild b/app-emulation/cloud-init/cloud-init-9999.ebuild |
94 |
index c355c9f901de..ace04bcfa721 100644 |
95 |
--- a/app-emulation/cloud-init/cloud-init-9999.ebuild |
96 |
+++ b/app-emulation/cloud-init/cloud-init-9999.ebuild |
97 |
@@ -1,9 +1,10 @@ |
98 |
# Copyright 1999-2021 Gentoo Authors |
99 |
# Distributed under the terms of the GNU General Public License v2 |
100 |
|
101 |
-EAPI=7 |
102 |
-PYTHON_COMPAT=( python3_7 python3_8 python3_9 ) |
103 |
-DISTUTILS_USE_SETUPTOOLS=rdepend |
104 |
+EAPI=8 |
105 |
+ |
106 |
+DISTUTILS_USE_PEP517=setuptools |
107 |
+PYTHON_COMPAT=( python3_{8..10} ) |
108 |
|
109 |
inherit distutils-r1 |
110 |
|
111 |
@@ -35,8 +36,8 @@ CDEPEND=" |
112 |
dev-python/six[${PYTHON_USEDEP}] |
113 |
" |
114 |
DEPEND=" |
115 |
- test? ( |
116 |
${CDEPEND} |
117 |
+ test? ( |
118 |
>=dev-python/httpretty-0.7.1[${PYTHON_USEDEP}] |
119 |
dev-python/mock[${PYTHON_USEDEP}] |
120 |
dev-python/nose[${PYTHON_USEDEP}] |
121 |
@@ -54,13 +55,12 @@ RDEPEND=" |
122 |
PATCHES=( |
123 |
# Fix Gentoo support |
124 |
# https://code.launchpad.net/~gilles-dartiguelongue/cloud-init/+git/cloud-init/+merge/358777 |
125 |
- "${FILESDIR}/${PN}-18.4-fix-packages-module.patch" |
126 |
- "${FILESDIR}/${PN}-21.2-gentoo-support-upstream-templates.patch" |
127 |
- "${FILESDIR}"/18.4-fix-filename-for-storing-locale.patch |
128 |
- "${FILESDIR}"/18.4-fix-update_package_sources-function.patch |
129 |
- "${FILESDIR}"/18.4-add-support-for-package_upgrade.patch |
130 |
+ "${FILESDIR}"/22.1-fix-update_package_sources-function.patch |
131 |
+ "${FILESDIR}"/22.1-add-support-for-package_upgrade.patch |
132 |
) |
133 |
|
134 |
+distutils_enable_tests nose |
135 |
+ |
136 |
python_prepare_all() { |
137 |
# Fix location of documentation installation |
138 |
sed -i "s:USR + '/share/doc/cloud-init:USR + '/share/doc/${PF}:" setup.py || die |
139 |
@@ -68,11 +68,6 @@ python_prepare_all() { |
140 |
distutils-r1_python_prepare_all |
141 |
} |
142 |
|
143 |
-python_test() { |
144 |
- # Do not use Makefile target as it does not setup environment correclty |
145 |
- esetup.py nosetests -v --where cloudinit --where tests/unittests || die |
146 |
-} |
147 |
- |
148 |
python_install() { |
149 |
distutils-r1_python_install --init-system=sysvinit_openrc,systemd --distro gentoo |
150 |
} |
151 |
|
152 |
diff --git a/app-emulation/cloud-init/files/22.1-add-support-for-package_upgrade.patch b/app-emulation/cloud-init/files/22.1-add-support-for-package_upgrade.patch |
153 |
new file mode 100644 |
154 |
index 000000000000..124b4225d830 |
155 |
--- /dev/null |
156 |
+++ b/app-emulation/cloud-init/files/22.1-add-support-for-package_upgrade.patch |
157 |
@@ -0,0 +1,48 @@ |
158 |
+From 7868b97507d0dd7d7721ad5c4539e22c67635f92 Mon Sep 17 00:00:00 2001 |
159 |
+From: Gilles Dartiguelongue <eva@g.o> |
160 |
+Date: Wed, 14 Nov 2018 15:58:30 +0100 |
161 |
+Subject: [PATCH 5/5] gentoo: add support for package_upgrade |
162 |
+ |
163 |
+--- |
164 |
+diff --git a/cloudinit/distros/gentoo.py b/cloudinit/distros/gentoo.py |
165 |
+index 4eb76da8..702cda8a 100644 |
166 |
+--- a/cloudinit/distros/gentoo.py |
167 |
++++ b/cloudinit/distros/gentoo.py |
168 |
+@@ -218,23 +218,26 @@ class Distro(distros.Distro): |
169 |
+ distros.set_etc_timezone(tz=tz, tz_file=self._find_tz_file(tz)) |
170 |
+ |
171 |
+ def package_command(self, command, args=None, pkgs=None): |
172 |
+- if pkgs is None: |
173 |
+- pkgs = [] |
174 |
+- |
175 |
+ cmd = list("emerge") |
176 |
+ # Redirect output |
177 |
+ cmd.append("--quiet") |
178 |
+ |
179 |
+- if args and isinstance(args, str): |
180 |
+- cmd.append(args) |
181 |
+- elif args and isinstance(args, list): |
182 |
+- cmd.extend(args) |
183 |
++ if command == "upgrade": |
184 |
++ cmd.extend(["--update", "world"]) |
185 |
++ else: |
186 |
++ if pkgs is None: |
187 |
++ pkgs = [] |
188 |
++ |
189 |
++ if args and isinstance(args, str): |
190 |
++ cmd.append(args) |
191 |
++ elif args and isinstance(args, list): |
192 |
++ cmd.extend(args) |
193 |
+ |
194 |
+- if command: |
195 |
+- cmd.append(command) |
196 |
++ if command: |
197 |
++ cmd.append(command) |
198 |
+ |
199 |
+- pkglist = util.expand_package_list("%s-%s", pkgs) |
200 |
+- cmd.extend(pkglist) |
201 |
++ pkglist = util.expand_package_list("%s-%s", pkgs) |
202 |
++ cmd.extend(pkglist) |
203 |
+ |
204 |
+ # Allow the output of this to flow outwards (ie not be captured) |
205 |
+ subp.subp(cmd, capture=False) |
206 |
|
207 |
diff --git a/app-emulation/cloud-init/files/22.1-fix-update_package_sources-function.patch b/app-emulation/cloud-init/files/22.1-fix-update_package_sources-function.patch |
208 |
new file mode 100644 |
209 |
index 000000000000..7a1b938e4e60 |
210 |
--- /dev/null |
211 |
+++ b/app-emulation/cloud-init/files/22.1-fix-update_package_sources-function.patch |
212 |
@@ -0,0 +1,21 @@ |
213 |
+From b15c4c4b24c894b3c8d444466110c881c35525e2 Mon Sep 17 00:00:00 2001 |
214 |
+From: Gilles Dartiguelongue <eva@g.o> |
215 |
+Date: Wed, 14 Nov 2018 15:35:37 +0100 |
216 |
+Subject: [PATCH 4/5] gentoo: fix update_package_sources function |
217 |
+ |
218 |
+Method is meant to update packages repository, not to update the system. |
219 |
+--- |
220 |
+ |
221 |
+diff --git a/cloudinit/distros/gentoo.py b/cloudinit/distros/gentoo.py |
222 |
+index 702cda8a..37217fe4 100644 |
223 |
+--- a/cloudinit/distros/gentoo.py |
224 |
++++ b/cloudinit/distros/gentoo.py |
225 |
+@@ -246,7 +246,7 @@ class Distro(distros.Distro): |
226 |
+ self._runner.run( |
227 |
+ "update-sources", |
228 |
+ self.package_command, |
229 |
+- ["-u", "world"], |
230 |
++ ["--sync"], |
231 |
+ freq=PER_INSTANCE, |
232 |
+ ) |
233 |
+ |