summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation/cloud-init')
-rw-r--r--app-emulation/cloud-init/Manifest7
-rw-r--r--app-emulation/cloud-init/cloud-init-21.2.ebuild93
-rw-r--r--app-emulation/cloud-init/cloud-init-22.2.2.ebuild (renamed from app-emulation/cloud-init/cloud-init-22.2.ebuild)30
-rw-r--r--app-emulation/cloud-init/cloud-init-22.4.ebuild (renamed from app-emulation/cloud-init/cloud-init-22.1-r1.ebuild)41
-rw-r--r--app-emulation/cloud-init/cloud-init-23.4.ebuild (renamed from app-emulation/cloud-init/cloud-init-20.4.ebuild)60
-rw-r--r--app-emulation/cloud-init/cloud-init-9999.ebuild32
-rw-r--r--app-emulation/cloud-init/files/18.4-add-support-for-package_upgrade.patch54
-rw-r--r--app-emulation/cloud-init/files/18.4-fix-filename-for-storing-locale.patch30
-rw-r--r--app-emulation/cloud-init/files/18.4-fix-update_package_sources-function.patch26
-rw-r--r--app-emulation/cloud-init/files/22.1-add-support-for-package_upgrade.patch48
-rw-r--r--app-emulation/cloud-init/files/22.1-fix-update_package_sources-function.patch21
-rw-r--r--app-emulation/cloud-init/files/cloud-init-18.4-fix-packages-module.patch25
-rw-r--r--app-emulation/cloud-init/files/cloud-init-20.4-gentoo-support-upstream-templates.patch86
-rw-r--r--app-emulation/cloud-init/files/cloud-init-21.2-gentoo-support-upstream-templates.patch101
-rw-r--r--app-emulation/cloud-init/metadata.xml1
15 files changed, 102 insertions, 553 deletions
diff --git a/app-emulation/cloud-init/Manifest b/app-emulation/cloud-init/Manifest
index 042f59bcb1c1..a1fdc85deb9c 100644
--- a/app-emulation/cloud-init/Manifest
+++ b/app-emulation/cloud-init/Manifest
@@ -1,4 +1,3 @@
-DIST cloud-init-20.4.tar.gz 1228898 BLAKE2B c5697af31e7219a060a82732fbae2e89dd00786e5b0feb638f1f64f6ce861df041ef687a6095cc3bdb5478f4f4c1504286155808102aea9cae853caa97d4ba1b SHA512 da2fa4673b253468380c4472795fd449809c8ac84d8f13ec1472b9b7e7d54e187ae06e5a81a36774793b05f4e1212dca57bc19aa8955b4c7fa7183cb100bfbb9
-DIST cloud-init-21.2.tar.gz 1278878 BLAKE2B 74e07649a24fc85df54aafcd72797a05f0bdbcceb90fe90c6af7024da09e876780b67bb1d7963cd164d03e3151715944b1f3fd5709d3557ac341a09061409fcc SHA512 8cc24945efc6f16b3c64411c5e7e5b83582d337f1c3f546163d52c14a6177ff752e91ba1fec04b7ade800f921c2b79c04d032df62c2b4171930ca1fb74c49a7d
-DIST cloud-init-22.1.tar.gz 1313034 BLAKE2B ca55378db822cdf58808de1bd2b519861c50ad8b08ed699212827833e0134fdc0968b76a4c2a13f39eae1d20ef8b22a99ff99b85ef77e496fd41593f4e2f2d55 SHA512 485e358777379a22dd2b0f6aa7afb1751eb44831c6e03ecbbd9c6823eaa20535e6e83fc245818ce1bb207425976839b356dadcfa3cfe62385b9d340b08ff21ab
-DIST cloud-init-22.2.tar.gz 1348736 BLAKE2B ae95bf04a0229ed0c7bbf6dc6889793eb020ffe6e6223b02f4003b3f38253781a1ed22a41f535b5064a8ba4bde20b197d58eb5d55789d4decd9b39aabd46d1c3 SHA512 07fec2f1d6eab20a1161672bb339a0c6b2826540bcb03936f95458b179fcb1b3142773c9a4038fe02b30bb05a5ca48a4153b6b0f59015b43bd6c6602832f9d6f
+DIST cloud-init-22.2.2.tar.gz 1349451 BLAKE2B fdb6669e9762984614fefe787834f20f056345d304327679fa8bc7b4d6566509a23ecc4a7ac4e6368b9b9078a72fe6fe35533a67e7aeb0c0accbf5ad014f8aae SHA512 18b75ebbb5e808e19df5ceddb6402cc881c33443fb169f736f54837254ba43836994f2392a26febbd8df3342b3467ee72759b6942cfeb96d07c0e452c11dd0bf
+DIST cloud-init-22.4.tar.gz 1494295 BLAKE2B 5f961c895c0d6c78a7cee47d2b52acd57d959baeb5172cea89d75ffe23424e3a8a3170a0ecdcad729c6cb0c898477ea94c43a5f8bdf200fc3f122c32fdb2e96d SHA512 6151d1d5e4be241219cb5804ca2bad2dd790f366bc847d286a8840faad1fb4adf5d780c9418ce574c2cfcefc16851a49961f33c5da1fbc84bb8299cf138bfcfc
+DIST cloud-init-23.4.tar.gz 1648908 BLAKE2B 0acec9c437c7a5a86ed9cd8718830a7311c257ae9f223a68959b8d1eccc693b35f6a716de5c04112d848c1e2e54f6461a3919fd733debba18989145f6669d359 SHA512 34966b173571764bf83779bef0e89a86971310ff0fa62feceef4fbe17c9fa6d1b69f11f57caaa32cc4ae4a74f598f157dfb3ce356221044666401230cfb1ad13
diff --git a/app-emulation/cloud-init/cloud-init-21.2.ebuild b/app-emulation/cloud-init/cloud-init-21.2.ebuild
deleted file mode 100644
index f99af619353e..000000000000
--- a/app-emulation/cloud-init/cloud-init-21.2.ebuild
+++ /dev/null
@@ -1,93 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-PYTHON_COMPAT=( python3_7 python3_8 python3_9 )
-DISTUTILS_USE_SETUPTOOLS=rdepend
-
-inherit distutils-r1
-
-if [[ ${PV} == *9999 ]];then
- inherit git-r3
- EGIT_REPO_URI="https://git.launchpad.net/cloud-init"
-else
- SRC_URI="https://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.gz"
- KEYWORDS="amd64 ~arm64 x86"
-fi
-
-DESCRIPTION="Cloud instance initialisation magic"
-HOMEPAGE="https://launchpad.net/cloud-init"
-
-LICENSE="GPL-3"
-SLOT="0"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-CDEPEND="
- dev-python/jinja[${PYTHON_USEDEP}]
- dev-python/oauthlib[${PYTHON_USEDEP}]
- dev-python/pyserial[${PYTHON_USEDEP}]
- >=dev-python/configobj-5.0.2[${PYTHON_USEDEP}]
- dev-python/pyyaml[${PYTHON_USEDEP}]
- dev-python/requests[${PYTHON_USEDEP}]
- dev-python/jsonpatch[${PYTHON_USEDEP}]
- dev-python/jsonschema[${PYTHON_USEDEP}]
-"
-DEPEND="
- ${CDEPEND}
- test? (
- >=dev-python/httpretty-0.7.1[${PYTHON_USEDEP}]
- dev-python/mock[${PYTHON_USEDEP}]
- dev-python/pytest[${PYTHON_USEDEP}]
- dev-python/coverage[${PYTHON_USEDEP}]
- )
-"
-RDEPEND="
- ${CDEPEND}
- net-analyzer/macchanger
- sys-apps/iproute2
- sys-fs/growpart
- virtual/logger
-"
-
-PATCHES=(
- # Fix Gentoo support
- # https://code.launchpad.net/~gilles-dartiguelongue/cloud-init/+git/cloud-init/+merge/358777
- "${FILESDIR}/${PN}-18.4-fix-packages-module.patch"
- "${FILESDIR}/${PN}-21.2-gentoo-support-upstream-templates.patch"
- "${FILESDIR}"/18.4-fix-filename-for-storing-locale.patch
- "${FILESDIR}"/18.4-fix-update_package_sources-function.patch
- "${FILESDIR}"/18.4-add-support-for-package_upgrade.patch
-)
-
-python_prepare_all() {
- # Fix location of documentation installation
- sed -i "s:USR + '/share/doc/cloud-init:USR + '/share/doc/${PF}:" setup.py || die
- sed -i 's/version=get_version(),/version=9999,/g' setup.py || die
- distutils-r1_python_prepare_all
-}
-
-python_test() {
- # Do not use Makefile target as it does not setup environment correctly
- esetup.py pytest -v cloudinit tests/unittests || die
-}
-
-python_install() {
- distutils-r1_python_install --init-system=sysvinit_openrc,systemd --distro gentoo
-}
-
-python_install_all() {
- keepdir /etc/cloud
-
- distutils-r1_python_install_all
-
- # installs as non-executable
- chmod +x "${D}"/etc/init.d/*
-}
-
-pkg_postinst() {
- elog "cloud-init-local needs to be run in the boot runlevel because it"
- elog "modifies services in the default runlevel. When a runlevel is started"
- elog "it is cached, so modifications that happen to the current runlevel"
- elog "while you are in it are not acted upon."
-}
diff --git a/app-emulation/cloud-init/cloud-init-22.2.ebuild b/app-emulation/cloud-init/cloud-init-22.2.2.ebuild
index f8fc9fc2c079..a1d0ec08c413 100644
--- a/app-emulation/cloud-init/cloud-init-22.2.ebuild
+++ b/app-emulation/cloud-init/cloud-init-22.2.2.ebuild
@@ -1,19 +1,21 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} )
+# Disabled for now: bug #850628
+# https://bugs.launchpad.net/cloud-init/+bug/1978328
+#DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_10 )
-inherit distutils-r1
+inherit distutils-r1 udev
-if [[ ${PV} == *9999 ]];then
+if [[ ${PV} == *9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://git.launchpad.net/cloud-init"
else
SRC_URI="https://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.gz"
- KEYWORDS="~amd64 ~arm64 ~x86"
+ KEYWORDS="amd64 arm64 ppc64 x86"
fi
DESCRIPTION="Cloud instance initialisation magic"
@@ -21,7 +23,7 @@ HOMEPAGE="https://launchpad.net/cloud-init"
LICENSE="GPL-3"
SLOT="0"
-IUSE="test"
+IUSE="selinux test"
RESTRICT="!test? ( test )"
CDEPEND="
@@ -51,6 +53,7 @@ RDEPEND="
sys-apps/iproute2
sys-fs/growpart
virtual/logger
+ selinux? ( sec-policy/selinux-cloudinit )
"
distutils_enable_tests pytest
@@ -58,7 +61,10 @@ distutils_enable_tests pytest
python_prepare_all() {
# Fix location of documentation installation
sed -i "s:USR + '/share/doc/cloud-init:USR + '/share/doc/${PF}:" setup.py || die
- sed -i 's/version=get_version(),/version=9999,/g' setup.py || die
+
+ if [[ ${PV} == *9999 ]] ; then
+ sed -i 's/version=get_version(),/version=9999,/g' setup.py || die
+ fi
distutils-r1_python_prepare_all
}
@@ -72,10 +78,16 @@ python_install_all() {
distutils-r1_python_install_all
# installs as non-executable
- chmod +x "${D}"/etc/init.d/*
+ chmod +x "${D}"/etc/init.d/* || die
+}
+
+pkg_prerm() {
+ udev_reload
}
pkg_postinst() {
+ udev_reload
+
elog "cloud-init-local needs to be run in the boot runlevel because it"
elog "modifies services in the default runlevel. When a runlevel is started"
elog "it is cached, so modifications that happen to the current runlevel"
diff --git a/app-emulation/cloud-init/cloud-init-22.1-r1.ebuild b/app-emulation/cloud-init/cloud-init-22.4.ebuild
index 667839f99352..839d6105a832 100644
--- a/app-emulation/cloud-init/cloud-init-22.1-r1.ebuild
+++ b/app-emulation/cloud-init/cloud-init-22.4.ebuild
@@ -1,19 +1,21 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} )
+# Disabled for now: bug #850628
+# https://bugs.launchpad.net/cloud-init/+bug/1978328
+#DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_10 python3_11 )
-inherit distutils-r1
+inherit distutils-r1 udev
-if [[ ${PV} == *9999 ]];then
+if [[ ${PV} == *9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://git.launchpad.net/cloud-init"
else
SRC_URI="https://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.gz"
- KEYWORDS="~amd64 ~arm64 ~x86"
+ KEYWORDS="amd64 arm64 ppc64 x86"
fi
DESCRIPTION="Cloud instance initialisation magic"
@@ -21,7 +23,7 @@ HOMEPAGE="https://launchpad.net/cloud-init"
LICENSE="GPL-3"
SLOT="0"
-IUSE="test"
+IUSE="selinux test"
RESTRICT="!test? ( test )"
CDEPEND="
@@ -40,7 +42,9 @@ BDEPEND="
test? (
>=dev-python/httpretty-0.7.1[${PYTHON_USEDEP}]
dev-python/mock[${PYTHON_USEDEP}]
- dev-python/coverage[${PYTHON_USEDEP}]
+ dev-python/pytest-mock[${PYTHON_USEDEP}]
+ dev-python/responses[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
)
"
RDEPEND="
@@ -49,21 +53,18 @@ RDEPEND="
sys-apps/iproute2
sys-fs/growpart
virtual/logger
+ selinux? ( sec-policy/selinux-cloudinit )
"
-PATCHES=(
- # Fix Gentoo support
- # https://code.launchpad.net/~gilles-dartiguelongue/cloud-init/+git/cloud-init/+merge/358777
- "${FILESDIR}"/22.1-fix-update_package_sources-function.patch
- "${FILESDIR}"/22.1-add-support-for-package_upgrade.patch
-)
-
distutils_enable_tests pytest
python_prepare_all() {
# Fix location of documentation installation
sed -i "s:USR + '/share/doc/cloud-init:USR + '/share/doc/${PF}:" setup.py || die
- sed -i 's/version=get_version(),/version=9999,/g' setup.py || die
+
+ if [[ ${PV} == *9999 ]] ; then
+ sed -i 's/version=get_version(),/version=9999,/g' setup.py || die
+ fi
distutils-r1_python_prepare_all
}
@@ -77,10 +78,16 @@ python_install_all() {
distutils-r1_python_install_all
# installs as non-executable
- chmod +x "${D}"/etc/init.d/*
+ chmod +x "${D}"/etc/init.d/* || die
+}
+
+pkg_prerm() {
+ udev_reload
}
pkg_postinst() {
+ udev_reload
+
elog "cloud-init-local needs to be run in the boot runlevel because it"
elog "modifies services in the default runlevel. When a runlevel is started"
elog "it is cached, so modifications that happen to the current runlevel"
diff --git a/app-emulation/cloud-init/cloud-init-20.4.ebuild b/app-emulation/cloud-init/cloud-init-23.4.ebuild
index 31a7326ac086..eba8a0ee55f0 100644
--- a/app-emulation/cloud-init/cloud-init-20.4.ebuild
+++ b/app-emulation/cloud-init/cloud-init-23.4.ebuild
@@ -1,18 +1,21 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
-PYTHON_COMPAT=( python3_{7,8} )
-DISTUTILS_USE_SETUPTOOLS=rdepend
+EAPI=8
-inherit distutils-r1
+# Disabled for now: bug #850628
+# https://bugs.launchpad.net/cloud-init/+bug/1978328
+#DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_10 python3_11 python3_12 )
-if [[ ${PV} == *9999 ]];then
+inherit distutils-r1 udev
+
+if [[ ${PV} == *9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://git.launchpad.net/cloud-init"
else
SRC_URI="https://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.gz"
- KEYWORDS="~amd64 ~arm64 ~x86"
+ KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
fi
DESCRIPTION="Cloud instance initialisation magic"
@@ -20,7 +23,7 @@ HOMEPAGE="https://launchpad.net/cloud-init"
LICENSE="GPL-3"
SLOT="0"
-IUSE="test"
+IUSE="selinux test"
RESTRICT="!test? ( test )"
CDEPEND="
@@ -32,14 +35,16 @@ CDEPEND="
dev-python/requests[${PYTHON_USEDEP}]
dev-python/jsonpatch[${PYTHON_USEDEP}]
dev-python/jsonschema[${PYTHON_USEDEP}]
+ dev-python/netifaces[${PYTHON_USEDEP}]
"
-DEPEND="
+BDEPEND="
+ ${CDEPEND}
test? (
- ${CDEPEND}
- >=dev-python/httpretty-0.7.1[${PYTHON_USEDEP}]
dev-python/mock[${PYTHON_USEDEP}]
- dev-python/pytest[${PYTHON_USEDEP}]
- dev-python/coverage[${PYTHON_USEDEP}]
+ dev-python/passlib[${PYTHON_USEDEP}]
+ dev-python/pytest-mock[${PYTHON_USEDEP}]
+ dev-python/responses[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
)
"
RDEPEND="
@@ -48,28 +53,19 @@ RDEPEND="
sys-apps/iproute2
sys-fs/growpart
virtual/logger
+ selinux? ( sec-policy/selinux-cloudinit )
"
-PATCHES=(
- # Fix Gentoo support
- # https://code.launchpad.net/~gilles-dartiguelongue/cloud-init/+git/cloud-init/+merge/358777
- "${FILESDIR}/${PN}-18.4-fix-packages-module.patch"
- "${FILESDIR}/${PN}-20.4-gentoo-support-upstream-templates.patch"
- "${FILESDIR}"/18.4-fix-filename-for-storing-locale.patch
- "${FILESDIR}"/18.4-fix-update_package_sources-function.patch
- "${FILESDIR}"/18.4-add-support-for-package_upgrade.patch
-)
+distutils_enable_tests pytest
python_prepare_all() {
# Fix location of documentation installation
sed -i "s:USR + '/share/doc/cloud-init:USR + '/share/doc/${PF}:" setup.py || die
- sed -i 's/version=get_version(),/version=9999,/g' setup.py || die
- distutils-r1_python_prepare_all
-}
-python_test() {
- # Do not use Makefile target as it does not setup environment correctly
- esetup.py pytest -v cloudinit/ tests/unittests || die
+ if [[ ${PV} == *9999 ]] ; then
+ sed -i 's/version=get_version(),/version=9999,/g' setup.py || die
+ fi
+ distutils-r1_python_prepare_all
}
python_install() {
@@ -82,10 +78,16 @@ python_install_all() {
distutils-r1_python_install_all
# installs as non-executable
- chmod +x "${D}"/etc/init.d/*
+ chmod +x "${D}"/etc/init.d/* || die
+}
+
+pkg_prerm() {
+ udev_reload
}
pkg_postinst() {
+ udev_reload
+
elog "cloud-init-local needs to be run in the boot runlevel because it"
elog "modifies services in the default runlevel. When a runlevel is started"
elog "it is cached, so modifications that happen to the current runlevel"
diff --git a/app-emulation/cloud-init/cloud-init-9999.ebuild b/app-emulation/cloud-init/cloud-init-9999.ebuild
index f8fc9fc2c079..7bb69ee6336a 100644
--- a/app-emulation/cloud-init/cloud-init-9999.ebuild
+++ b/app-emulation/cloud-init/cloud-init-9999.ebuild
@@ -1,14 +1,16 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} )
+# Disabled for now: bug #850628
+#DISTUTILS_USE_PEP517=setuptools
+# https://bugs.launchpad.net/cloud-init/+bug/1978328
+PYTHON_COMPAT=( python3_10 python3_11 python3_12 )
-inherit distutils-r1
+inherit distutils-r1 udev
-if [[ ${PV} == *9999 ]];then
+if [[ ${PV} == *9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://git.launchpad.net/cloud-init"
else
@@ -21,8 +23,7 @@ HOMEPAGE="https://launchpad.net/cloud-init"
LICENSE="GPL-3"
SLOT="0"
-IUSE="test"
-RESTRICT="!test? ( test )"
+IUSE="selinux"
CDEPEND="
dev-python/jinja[${PYTHON_USEDEP}]
@@ -38,8 +39,8 @@ CDEPEND="
BDEPEND="
${CDEPEND}
test? (
- >=dev-python/httpretty-0.7.1[${PYTHON_USEDEP}]
dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/passlib[${PYTHON_USEDEP}]
dev-python/pytest-mock[${PYTHON_USEDEP}]
dev-python/responses[${PYTHON_USEDEP}]
dev-python/setuptools[${PYTHON_USEDEP}]
@@ -51,6 +52,7 @@ RDEPEND="
sys-apps/iproute2
sys-fs/growpart
virtual/logger
+ selinux? ( sec-policy/selinux-cloudinit )
"
distutils_enable_tests pytest
@@ -58,7 +60,11 @@ distutils_enable_tests pytest
python_prepare_all() {
# Fix location of documentation installation
sed -i "s:USR + '/share/doc/cloud-init:USR + '/share/doc/${PF}:" setup.py || die
- sed -i 's/version=get_version(),/version=9999,/g' setup.py || die
+
+ if [[ ${PV} == *9999 ]] ; then
+ sed -i 's/version=get_version(),/version=9999,/g' setup.py || die
+ fi
+
distutils-r1_python_prepare_all
}
@@ -72,10 +78,16 @@ python_install_all() {
distutils-r1_python_install_all
# installs as non-executable
- chmod +x "${D}"/etc/init.d/*
+ chmod +x "${D}"/etc/init.d/* || die
+}
+
+pkg_prerm() {
+ udev_reload
}
pkg_postinst() {
+ udev_reload
+
elog "cloud-init-local needs to be run in the boot runlevel because it"
elog "modifies services in the default runlevel. When a runlevel is started"
elog "it is cached, so modifications that happen to the current runlevel"
diff --git a/app-emulation/cloud-init/files/18.4-add-support-for-package_upgrade.patch b/app-emulation/cloud-init/files/18.4-add-support-for-package_upgrade.patch
deleted file mode 100644
index 9c542cfc0777..000000000000
--- a/app-emulation/cloud-init/files/18.4-add-support-for-package_upgrade.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 7868b97507d0dd7d7721ad5c4539e22c67635f92 Mon Sep 17 00:00:00 2001
-From: Gilles Dartiguelongue <eva@gentoo.org>
-Date: Wed, 14 Nov 2018 15:58:30 +0100
-Subject: [PATCH 5/5] gentoo: add support for package_upgrade
-
----
- cloudinit/distros/gentoo.py | 25 ++++++++++++++-----------
- 1 file changed, 14 insertions(+), 11 deletions(-)
-
-diff --git a/cloudinit/distros/gentoo.py b/cloudinit/distros/gentoo.py
-index 7b838e82..22ad2cf3 100644
---- a/cloudinit/distros/gentoo.py
-+++ b/cloudinit/distros/gentoo.py
-@@ -189,23 +189,26 @@ class Distro(distros.Distro):
- distros.set_etc_timezone(tz=tz, tz_file=self._find_tz_file(tz))
-
- def package_command(self, command, args=None, pkgs=None):
-- if pkgs is None:
-- pkgs = []
--
- cmd = ['emerge']
- # Redirect output
- cmd.append("--quiet")
-
-- if args and isinstance(args, str):
-- cmd.append(args)
-- elif args and isinstance(args, list):
-- cmd.extend(args)
-+ if command == "upgrade":
-+ cmd.extend(["--update", "world"])
-+ else:
-+ if pkgs is None:
-+ pkgs = []
-+
-+ if args and isinstance(args, str):
-+ cmd.append(args)
-+ elif args and isinstance(args, list):
-+ cmd.extend(args)
-
-- if command:
-- cmd.append(command)
-+ if command:
-+ cmd.append(command)
-
-- pkglist = util.expand_package_list('%s-%s', pkgs)
-- cmd.extend(pkglist)
-+ pkglist = util.expand_package_list('%s-%s', pkgs)
-+ cmd.extend(pkglist)
-
- # Allow the output of this to flow outwards (ie not be captured)
- util.subp(cmd, capture=False)
---
-2.19.1
-
diff --git a/app-emulation/cloud-init/files/18.4-fix-filename-for-storing-locale.patch b/app-emulation/cloud-init/files/18.4-fix-filename-for-storing-locale.patch
deleted file mode 100644
index a5bbf6034ac5..000000000000
--- a/app-emulation/cloud-init/files/18.4-fix-filename-for-storing-locale.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 3756cdea3e844b9611de321a8075df80e7dbf74d Mon Sep 17 00:00:00 2001
-From: Gilles Dartiguelongue <eva@gentoo.org>
-Date: Wed, 14 Nov 2018 15:28:22 +0100
-Subject: [PATCH 3/5] gentoo: fix filename for storing locale
-
-There must have been a misunderstanding as locale.gen is meant to
-contain locales to be generated if no argument is passed to locale-gen.
-
-When using openrc, Gentoo stores system locale in /etc/env.d/02locale
-which is generally manipulated through eselect.
----
- cloudinit/distros/gentoo.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/cloudinit/distros/gentoo.py b/cloudinit/distros/gentoo.py
-index 98ac41ca..50bb61fb 100644
---- a/cloudinit/distros/gentoo.py
-+++ b/cloudinit/distros/gentoo.py
-@@ -20,7 +20,7 @@ LOG = logging.getLogger(__name__)
-
-
- class Distro(distros.Distro):
-- locale_conf_fn = '/etc/locale.gen'
-+ locale_conf_fn = '/etc/env.d/02locale'
- network_conf_fn = '/etc/conf.d/net'
- resolve_conf_fn = '/etc/resolv.conf'
- hostname_conf_fn = '/etc/conf.d/hostname'
---
-2.19.1
-
diff --git a/app-emulation/cloud-init/files/18.4-fix-update_package_sources-function.patch b/app-emulation/cloud-init/files/18.4-fix-update_package_sources-function.patch
deleted file mode 100644
index d90258d1bc48..000000000000
--- a/app-emulation/cloud-init/files/18.4-fix-update_package_sources-function.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From b15c4c4b24c894b3c8d444466110c881c35525e2 Mon Sep 17 00:00:00 2001
-From: Gilles Dartiguelongue <eva@gentoo.org>
-Date: Wed, 14 Nov 2018 15:35:37 +0100
-Subject: [PATCH 4/5] gentoo: fix update_package_sources function
-
-Method is meant to update packages repository, not to update the system.
----
- cloudinit/distros/gentoo.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/cloudinit/distros/gentoo.py b/cloudinit/distros/gentoo.py
-index 50bb61fb..7b838e82 100644
---- a/cloudinit/distros/gentoo.py
-+++ b/cloudinit/distros/gentoo.py
-@@ -212,7 +212,7 @@ class Distro(distros.Distro):
-
- def update_package_sources(self):
- self._runner.run("update-sources", self.package_command,
-- ["-u", "world"], freq=PER_INSTANCE)
-+ ["--sync"], freq=PER_INSTANCE)
-
-
- def convert_resolv_conf(settings):
---
-2.19.1
-
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
deleted file mode 100644
index 124b4225d830..000000000000
--- a/app-emulation/cloud-init/files/22.1-add-support-for-package_upgrade.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 7868b97507d0dd7d7721ad5c4539e22c67635f92 Mon Sep 17 00:00:00 2001
-From: Gilles Dartiguelongue <eva@gentoo.org>
-Date: Wed, 14 Nov 2018 15:58:30 +0100
-Subject: [PATCH 5/5] gentoo: add support for package_upgrade
-
----
-diff --git a/cloudinit/distros/gentoo.py b/cloudinit/distros/gentoo.py
-index 4eb76da8..702cda8a 100644
---- a/cloudinit/distros/gentoo.py
-+++ b/cloudinit/distros/gentoo.py
-@@ -218,23 +218,26 @@ class Distro(distros.Distro):
- distros.set_etc_timezone(tz=tz, tz_file=self._find_tz_file(tz))
-
- def package_command(self, command, args=None, pkgs=None):
-- if pkgs is None:
-- pkgs = []
--
- cmd = list("emerge")
- # Redirect output
- cmd.append("--quiet")
-
-- if args and isinstance(args, str):
-- cmd.append(args)
-- elif args and isinstance(args, list):
-- cmd.extend(args)
-+ if command == "upgrade":
-+ cmd.extend(["--update", "world"])
-+ else:
-+ if pkgs is None:
-+ pkgs = []
-+
-+ if args and isinstance(args, str):
-+ cmd.append(args)
-+ elif args and isinstance(args, list):
-+ cmd.extend(args)
-
-- if command:
-- cmd.append(command)
-+ if command:
-+ cmd.append(command)
-
-- pkglist = util.expand_package_list("%s-%s", pkgs)
-- cmd.extend(pkglist)
-+ pkglist = util.expand_package_list("%s-%s", pkgs)
-+ cmd.extend(pkglist)
-
- # Allow the output of this to flow outwards (ie not be captured)
- subp.subp(cmd, capture=False)
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
deleted file mode 100644
index 7a1b938e4e60..000000000000
--- a/app-emulation/cloud-init/files/22.1-fix-update_package_sources-function.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-From b15c4c4b24c894b3c8d444466110c881c35525e2 Mon Sep 17 00:00:00 2001
-From: Gilles Dartiguelongue <eva@gentoo.org>
-Date: Wed, 14 Nov 2018 15:35:37 +0100
-Subject: [PATCH 4/5] gentoo: fix update_package_sources function
-
-Method is meant to update packages repository, not to update the system.
----
-
-diff --git a/cloudinit/distros/gentoo.py b/cloudinit/distros/gentoo.py
-index 702cda8a..37217fe4 100644
---- a/cloudinit/distros/gentoo.py
-+++ b/cloudinit/distros/gentoo.py
-@@ -246,7 +246,7 @@ class Distro(distros.Distro):
- self._runner.run(
- "update-sources",
- self.package_command,
-- ["-u", "world"],
-+ ["--sync"],
- freq=PER_INSTANCE,
- )
-
diff --git a/app-emulation/cloud-init/files/cloud-init-18.4-fix-packages-module.patch b/app-emulation/cloud-init/files/cloud-init-18.4-fix-packages-module.patch
deleted file mode 100644
index 4a42cbb7d9e1..000000000000
--- a/app-emulation/cloud-init/files/cloud-init-18.4-fix-packages-module.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From e894c6f57b88305cdf6e4e2b1543475b2e02f436 Mon Sep 17 00:00:00 2001
-From: Gilles Dartiguelongue <eva@gentoo.org>
-Date: Tue, 23 Oct 2018 18:59:58 +0200
-Subject: [PATCH 1/2] Fix Gentoo package installation command
-
----
- cloudinit/distros/gentoo.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/cloudinit/distros/gentoo.py b/cloudinit/distros/gentoo.py
-index dc57717d..98ac41ca 100644
---- a/cloudinit/distros/gentoo.py
-+++ b/cloudinit/distros/gentoo.py
-@@ -192,7 +192,7 @@ class Distro(distros.Distro):
- if pkgs is None:
- pkgs = []
-
-- cmd = list('emerge')
-+ cmd = ['emerge']
- # Redirect output
- cmd.append("--quiet")
-
---
-2.19.0
-
diff --git a/app-emulation/cloud-init/files/cloud-init-20.4-gentoo-support-upstream-templates.patch b/app-emulation/cloud-init/files/cloud-init-20.4-gentoo-support-upstream-templates.patch
deleted file mode 100644
index ec6063d0c68a..000000000000
--- a/app-emulation/cloud-init/files/cloud-init-20.4-gentoo-support-upstream-templates.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From 823454f1ea140ec47f5f9c5c3c5ad62eb458eb8a Mon Sep 17 00:00:00 2001
-From: Gilles Dartiguelongue <eva@gentoo.org>
-Date: Wed, 24 Oct 2018 10:52:46 +0200
-Subject: [PATCH 2/5] Add support for gentoo in cloud.cfg and templates
-
----
- config/cloud.cfg.tmpl | 8 ++++++--
- templates/hosts.gentoo.tmpl | 24 ++++++++++++++++++++++++
- tools/render-cloudcfg | 2 +-
- 3 files changed, 31 insertions(+), 3 deletions(-)
- create mode 100644 templates/hosts.gentoo.tmpl
-
-diff --git a/config/cloud.cfg.tmpl b/config/cloud.cfg.tmpl
-index 1fef133a..3f5a41a2 100644
---- a/config/cloud.cfg.tmpl 2020-12-27 18:35:39.107000000 +0000
-+++ b/config/cloud.cfg.tmpl 2020-12-27 18:38:23.982000000 +0000
-@@ -154,7 +154,7 @@ cloud_final_modules:
- system_info:
- # This will affect which distro class gets used
- {% if variant in ["alpine", "amazon", "arch", "centos", "debian",
-- "fedora", "freebsd", "netbsd", "openbsd", "rhel",
-+ "fedora", "freebsd", "gentoo", "netbsd", "openbsd", "rhel",
- "suse", "ubuntu"] %}
- distro: {{ variant }}
- {% else %}
-@@ -206,7 +206,7 @@ system_info:
- primary: http://ports.ubuntu.com/ubuntu-ports
- security: http://ports.ubuntu.com/ubuntu-ports
- ssh_svcname: ssh
--{% elif variant in ["alpine", "amazon", "arch", "centos", "fedora",
-+{% elif variant in ["alpine", "amazon", "arch", "centos", "fedora", "gentoo",
- "rhel", "suse"] %}
- # Default user name + that default users groups (if added/used)
- default_user:
-@@ -221,6 +221,10 @@ system_info:
- {% endif %}
- {% if variant == "suse" %}
- groups: [cdrom, users]
-+{% elif variant == "gentoo" %}
-+ groups: [users, wheel]
-+ primary_group: users
-+ no_user_group: true
- {% elif variant == "alpine" %}
- groups: [adm, sudo]
- {% elif variant == "arch" %}
-diff --git a/templates/hosts.gentoo.tmpl b/templates/hosts.gentoo.tmpl
-new file mode 100644
-index 00000000..cd045fa6
---- /dev/null
-+++ b/templates/hosts.gentoo.tmpl
-@@ -0,0 +1,24 @@
-+## template:jinja
-+{#
-+This file /etc/cloud/templates/hosts.gentoo.tmpl is only utilized
-+if enabled in cloud-config. Specifically, in order to enable it
-+you need to add the following to config:
-+ manage_etc_hosts: True
-+-#}
-+# Your system has configured 'manage_etc_hosts' as True.
-+# As a result, if you wish for changes to this file to persist
-+# then you will need to either
-+# a.) make changes to the master file in /etc/cloud/templates/hosts.gentoo.tmpl
-+# b.) change or remove the value of 'manage_etc_hosts' in
-+# /etc/cloud/cloud.cfg or cloud-config from user-data
-+#
-+# The following lines are desirable for IPv4 capable hosts
-+127.0.0.1 {{fqdn}} {{hostname}}
-+127.0.0.1 localhost.localdomain localhost
-+127.0.0.1 localhost4.localdomain4 localhost4
-+
-+# The following lines are desirable for IPv6 capable hosts
-+::1 {{fqdn}} {{hostname}}
-+::1 localhost.localdomain localhost
-+::1 localhost6.localdomain6 localhost6
-+
-diff --git a/tools/render-cloudcfg b/tools/render-cloudcfg
-index 8b7cb875..d109044e 100755
---- a/tools/render-cloudcfg 2020-12-27 18:44:22.032049636 +0000
-+++ a/tools/render-cloudcfg 2020-12-27 18:44:41.632619051 +0000
-@@ -5,7 +5,7 @@ import os
- import sys
-
- VARIANTS = ["alpine", "amazon", "arch", "centos", "debian", "fedora",
-- "freebsd", "netbsd", "openbsd", "rhel", "suse", "ubuntu",
-+ "freebsd", "gentoo", "netbsd", "openbsd", "rhel", "suse", "ubuntu",
- "unknown"]
diff --git a/app-emulation/cloud-init/files/cloud-init-21.2-gentoo-support-upstream-templates.patch b/app-emulation/cloud-init/files/cloud-init-21.2-gentoo-support-upstream-templates.patch
deleted file mode 100644
index fb4eed77fcbc..000000000000
--- a/app-emulation/cloud-init/files/cloud-init-21.2-gentoo-support-upstream-templates.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From 823454f1ea140ec47f5f9c5c3c5ad62eb458eb8a Mon Sep 17 00:00:00 2001
-From: Gilles Dartiguelongue <eva@gentoo.org>
-Date: Wed, 24 Oct 2018 10:52:46 +0200
-Subject: [PATCH 2/5] Add support for gentoo in cloud.cfg and templates
-
----
- config/cloud.cfg.tmpl | 8 ++++++--
- templates/hosts.gentoo.tmpl | 24 ++++++++++++++++++++++++
- tools/render-cloudcfg | 2 +-
- 3 files changed, 31 insertions(+), 3 deletions(-)
- create mode 100644 templates/hosts.gentoo.tmpl
-
-diff --git a/config/cloud.cfg.tmpl b/config/cloud.cfg.tmpl
-index 1fef133a..3f5a41a2 100644
---- a/config/cloud.cfg.tmpl
-+++ b/config/cloud.cfg.tmpl
-@@ -134,7 +134,7 @@ cloud_final_modules:
- # (not accessible to handlers/transforms)
- system_info:
- # This will affect which distro class gets used
--{% if variant in ["alpine", "amazon", "arch", "centos", "debian",
-- "fedora", "freebsd", "netbsd", "openbsd", "rhel",
-- "suse", "ubuntu"] %}
-+{% if variant in ["alpine", "amazon", "arch", "centos", "debian",
-+ "fedora", "freebsd", "gentoo", "netbsd",
-+ "openbsd", "rhel", "suse", "ubuntu"] %}
- distro: {{ variant }}
- {% else %}
- # Unknown/fallback distro.
-@@ -172,7 +172,7 @@ system_info:
- primary: http://ports.ubuntu.com/ubuntu-ports
- security: http://ports.ubuntu.com/ubuntu-ports
- ssh_svcname: ssh
--{% elif variant in ["alpine", "amazon", "arch", "centos", "fedora",
-- "rhel", "suse"] %}
-+{% elif variant in ["alpine", "amazon", "arch", "centos", "fedora",
-+ "gentoo", "rhel", "suse"] %}
- # Default user name + that default users groups (if added/used)
- default_user:
- name: {{ variant }}
-@@ -180,6 +180,10 @@ system_info:
- {% endif %}
- {% if variant == "suse" %}
- groups: [cdrom, users]
-+{% elif variant == "gentoo" %}
-+ groups: [users, wheel]
-+ primary_group: users
-+ no_user_group: true
- {% elif variant == "arch" %}
- groups: [wheel, users]
- {% else %}
-diff --git a/templates/hosts.gentoo.tmpl b/templates/hosts.gentoo.tmpl
-new file mode 100644
-index 00000000..cd045fa6
---- /dev/null
-+++ b/templates/hosts.gentoo.tmpl
-@@ -0,0 +1,24 @@
-+## template:jinja
-+{#
-+This file /etc/cloud/templates/hosts.gentoo.tmpl is only utilized
-+if enabled in cloud-config. Specifically, in order to enable it
-+you need to add the following to config:
-+ manage_etc_hosts: True
-+-#}
-+# Your system has configured 'manage_etc_hosts' as True.
-+# As a result, if you wish for changes to this file to persist
-+# then you will need to either
-+# a.) make changes to the master file in /etc/cloud/templates/hosts.gentoo.tmpl
-+# b.) change or remove the value of 'manage_etc_hosts' in
-+# /etc/cloud/cloud.cfg or cloud-config from user-data
-+#
-+# The following lines are desirable for IPv4 capable hosts
-+127.0.0.1 {{fqdn}} {{hostname}}
-+127.0.0.1 localhost.localdomain localhost
-+127.0.0.1 localhost4.localdomain4 localhost4
-+
-+# The following lines are desirable for IPv6 capable hosts
-+::1 {{fqdn}} {{hostname}}
-+::1 localhost.localdomain localhost
-+::1 localhost6.localdomain6 localhost6
-+
-diff --git a/tools/render-cloudcfg b/tools/render-cloudcfg
-index 8b7cb875..d109044e 100755
---- a/tools/render-cloudcfg
-+++ b/tools/render-cloudcfg
-@@ -4,7 +4,7 @@ import argparse
- import os
- import sys
-
--VARIANTS = ["alpine", "amazon", "arch", "centos", "debian", "fedora",
-- "freebsd", "netbsd", "openbsd", "rhel", "suse", "ubuntu",
-- "unknown"]
-+VARIANTS = ["alpine", "amazon", "arch", "centos", "debian", "fedora",
-+ "freebsd", "gentoo", "netbsd", "openbsd", "rhel", "suse",
-+ "ubuntu", "unknown"]
-
- if "avoid-pep8-E402-import-not-top-of-file":
- _tdir = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
---
-2.19.1
-
diff --git a/app-emulation/cloud-init/metadata.xml b/app-emulation/cloud-init/metadata.xml
index f64358336851..a754b254be6b 100644
--- a/app-emulation/cloud-init/metadata.xml
+++ b/app-emulation/cloud-init/metadata.xml
@@ -10,5 +10,6 @@
</longdescription>
<upstream>
<remote-id type="launchpad">cloud-init</remote-id>
+ <remote-id type="github">canonical/cloud-init</remote-id>
</upstream>
</pkgmetadata>