diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-01-01 21:06:00 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-01-01 21:06:00 +0000 |
commit | 129160ec854dca4c3fedb5bcfbcb56930371da0f (patch) | |
tree | 53bf797418ac5e9b99c41ca0382c87b82421e5de /app-emulation/cloud-init | |
parent | 441d1370330332b7d78f238d2f5e13f7aed5e4e0 (diff) |
gentoo new year resync : 01.01.2021
Diffstat (limited to 'app-emulation/cloud-init')
3 files changed, 185 insertions, 0 deletions
diff --git a/app-emulation/cloud-init/Manifest b/app-emulation/cloud-init/Manifest index 32d3a4c82731..3bb127e50867 100644 --- a/app-emulation/cloud-init/Manifest +++ b/app-emulation/cloud-init/Manifest @@ -5,9 +5,12 @@ AUX cloud-init-18.4-fix-packages-module.patch 704 BLAKE2B e5deb163e7d97365befb63 AUX cloud-init-19.4-gentoo-support-upstream-templates.patch 3445 BLAKE2B e7a7e9d3d36d78ab00f2d495f9a3fad795b142c755c797c4cfaf93263c98392b6a03f14bfd38fe4f3a332b108d3c5624051c267e60d0bad1c3469457a0f2f937 SHA512 b88f71c2131e15ead8638f0e094930c76eb1da213443402b4ac15fd735a307393952d4970f6584a2d0199cf58f535956ffa8226a0ce0b51a309299f4424b2f5d AUX cloud-init-19.4_CVE-2020-8631.patch 821 BLAKE2B 1c684ab25b44ab35d027d342647070c2558f4740d2117316790ef244a3fac0cd47d205f4af9968c7b6438602172a4f383d211ac58726431e7d1eeeb4bafb4600 SHA512 057158b90890bd14c8252da2c53f04f818f1e7ac7146f39fcbd90fa9cc6ab4914881804bfdf552bc8af589f6f297a8c96584131f648165d9dbbe42a3ce6f3617 AUX cloud-init-20.1-gentoo-support-upstream-templates.patch 3505 BLAKE2B 6f4b75493e6354c73ad87546337d4520f334883cd0bcd7f3f7eb34276a5c6d57dfbd46f5dc22306ab9843164b56638196238025431a319ad67c9e3d03945ef05 SHA512 3151504396a55baca141a8f509e93007bfe93e4e5945cfcd17ef98a2394ba64564cd7233e792233389776c5baa0b1fd3609a868a5f386dcf5d84563e00d7885b +AUX cloud-init-20.4-gentoo-support-upstream-templates.patch 3467 BLAKE2B 0d6185373ef7de03de60f3ae277a808a8457c8bbce23ab5a10ff3382c0ace244fe5d054285d2eeeb99956863156f3ff0000b7f6f84b706489d19c29cb1dbeadf SHA512 d5209c78ede276b6d614baad2ff586008694e4533114394207f377a67cbb8cd9a73547c8e0a9daa55051fa56ccb099b3a0f2bcf824cda0cbef0de858332c95f8 DIST cloud-init-19.4.tar.gz 1091893 BLAKE2B 2ab8fef70b420c066d6d8f83871568eeac24f00879ecf3d58c3768dd809cff6a3b79c7e72d9a10204002101049ab86ab64f0c524362e00497a9222960ef380df SHA512 e69ea47eab41d69d64fa44102fbde59319da5f71a68f28a0f6ac65cd6866542b4fe58a71b84c903cfa9b1d2f26eb648cdf4de633b8df61e4f89c9fa4c2a2b1d3 DIST cloud-init-20.1.tar.gz 1088152 BLAKE2B 1c075676bcf7454965beafaaa38f3cdf08f321ddd0303b7f710c49d2a69e0fb2ec8a81870a632b7504c47af6436555c97ea9fa9c8416955de78f8f551b5509b7 SHA512 ad28e4a0290165308ef2cdb8a935778ad99039978a204bee1098460de006bc3f375a3b81d0d72971fc4f4195d5d2ade9c648fb19e6d6eba12decf750dc54b6eb +DIST cloud-init-20.4.tar.gz 1228898 BLAKE2B c5697af31e7219a060a82732fbae2e89dd00786e5b0feb638f1f64f6ce861df041ef687a6095cc3bdb5478f4f4c1504286155808102aea9cae853caa97d4ba1b SHA512 da2fa4673b253468380c4472795fd449809c8ac84d8f13ec1472b9b7e7d54e187ae06e5a81a36774793b05f4e1212dca57bc19aa8955b4c7fa7183cb100bfbb9 EBUILD cloud-init-19.4.ebuild 2544 BLAKE2B 01532bf72141708fae2b5731c37987c2eae5e22687c0ef6235d2a2a15330e48d0d08f6d2c3c9d4355efbefe54186f4db2f9bfc22cb9f2a03464f0813da379e53 SHA512 d79fae60f1fb36e51193e4b066a9f1075627f43a219a2769d5922f397a0f5fa6eb0cb7d7914f7eb24011777d8ba890d98fb01e55a35152165b6e7e8e2d10eb8b EBUILD cloud-init-20.1.ebuild 2718 BLAKE2B 9586c5d6cf9b4936ea0b4e4f2de5dc3b6ee5dbc0b45284b517c8fb55a43fa0c8ca834708a42f81f236ed5911de045e2d908eda7b4d911e750d2cd35a00dc6750 SHA512 a0bb10a25b1ed1ef9fb26222b5ab2c17bb9fde398ad471de6cd166db06195327d76946287ee9725fcf70a6b585406468cbe83a66e54b5e6bb542537582696b86 +EBUILD cloud-init-20.4.ebuild 2704 BLAKE2B 34f99d78fc0c362a3457570148c8ad581c6ac12c7e0a93f12f9b2f00bcefc025d4781b1ac60b251c52756f1a7df06ad77053fd0e40dfeb7f10723da960a5c4d3 SHA512 7e60238cf053547d764cdb9229eafb9470d90a114ef5fe344dbf8e1a7f70f95df915898952d22bd653d7daa5762230466617bcb8274a34a56b12ee2f8a26e0cf EBUILD cloud-init-9999.ebuild 2713 BLAKE2B ac4c332041fc76f3f47b6f677867803389af0ef99c4003660d408a5d6b8f923e805fb8a8e57a84b9819a26a48a3fb358b8f2dfd324a52236c0d5a905f1eeb017 SHA512 161abf356202ae21551f04ae7a54387152c657939e842aec279f357f8f817abb18d1a42ab57e32d99f20c9a2d22224f3f5d479eea3629a0a2f6cf6b6a4dfa444 MISC metadata.xml 769 BLAKE2B 4a6e831e4cd77a81826f3d8a1f16603ece81cb75261a0dfb0b4ff2cea47a4458abf3f7fb5d61672a3bbe38d538b8ba827fd50a7c9c12ef69a69107216e923c29 SHA512 760c8e7a756438fc511eb6959b0ce50cf58e0df6e553e3634a233c2bd95ad0a04310be96ee6ce392eb97e12d2d8760399ab135c4c9eb97b0dd9cd62aeecd1859 diff --git a/app-emulation/cloud-init/cloud-init-20.4.ebuild b/app-emulation/cloud-init/cloud-init-20.4.ebuild new file mode 100644 index 000000000000..9ad56e71193d --- /dev/null +++ b/app-emulation/cloud-init/cloud-init-20.4.ebuild @@ -0,0 +1,96 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{7,8} ) +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}] + dev-python/six[${PYTHON_USEDEP}] +" +DEPEND=" + test? ( + ${CDEPEND} + >=dev-python/httpretty-0.7.1[${PYTHON_USEDEP}] + dev-python/mock[${PYTHON_USEDEP}] + dev-python/nose[${PYTHON_USEDEP}] + dev-python/unittest2[${PYTHON_USEDEP}] + dev-python/coverage[${PYTHON_USEDEP}] + dev-python/contextlib2[${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}-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 +) + +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 correclty + esetup.py nosetests -v --where cloudinit --where 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/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 new file mode 100644 index 000000000000..ec6063d0c68a --- /dev/null +++ b/app-emulation/cloud-init/files/cloud-init-20.4-gentoo-support-upstream-templates.patch @@ -0,0 +1,86 @@ +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"] |