summaryrefslogtreecommitdiff
path: root/app-emulation/cloud-init
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-emulation/cloud-init
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-emulation/cloud-init')
-rw-r--r--app-emulation/cloud-init/Manifest25
-rw-r--r--app-emulation/cloud-init/cloud-init-0.7.6-r1.ebuild102
-rw-r--r--app-emulation/cloud-init/cloud-init-0.7.6-r2.ebuild76
-rw-r--r--app-emulation/cloud-init/cloud-init-0.7.6_p1212-r1.ebuild79
-rw-r--r--app-emulation/cloud-init/cloud-init-0.7.6_p1212.ebuild78
-rw-r--r--app-emulation/cloud-init/cloud-init-0.7.7.ebuild87
-rw-r--r--app-emulation/cloud-init/cloud-init-0.7.8-r2.ebuild94
-rw-r--r--app-emulation/cloud-init/cloud-init-0.7.9.ebuild94
-rw-r--r--app-emulation/cloud-init/cloud-init-17.1.ebuild81
-rw-r--r--app-emulation/cloud-init/cloud-init-17.2.ebuild80
-rw-r--r--app-emulation/cloud-init/cloud-init-9999.ebuild86
-rw-r--r--app-emulation/cloud-init/files/cloud-init-0.7.6-gentoo.patch51
-rw-r--r--app-emulation/cloud-init/files/cloud-init-0.7.6_p1212-gentoo.patch33
-rw-r--r--app-emulation/cloud-init/files/cloud-init-0.7.7-gentooinit.patch42
-rw-r--r--app-emulation/cloud-init/files/cloud-init-0.7.8-gentooinit.patch38
-rw-r--r--app-emulation/cloud-init/files/cloud-init-0.7.9-tests.patch13
-rw-r--r--app-emulation/cloud-init/files/cloud.cfg79
-rw-r--r--app-emulation/cloud-init/files/hosts.gentoo.tmpl23
-rw-r--r--app-emulation/cloud-init/metadata.xml14
19 files changed, 1175 insertions, 0 deletions
diff --git a/app-emulation/cloud-init/Manifest b/app-emulation/cloud-init/Manifest
new file mode 100644
index 000000000000..03ea1fc0ae94
--- /dev/null
+++ b/app-emulation/cloud-init/Manifest
@@ -0,0 +1,25 @@
+AUX cloud-init-0.7.6-gentoo.patch 2569 BLAKE2B 661f547ddcfa1592e76871c4171da972cfd196fbf30aac74a7725f39753e22f018bb39ad5247006265c6cc93c02dc3df29dd29ecdbaa720f2e77efcb57838d42 SHA512 5de2fe7632162bd5b527bda21a6f8c96122bdb2a9cb4ae40e8d73e48a303b56ae479a06985b8c1807829f53dd859e59d053b3613d6e2e446e5506b310d5e2eb5
+AUX cloud-init-0.7.6_p1212-gentoo.patch 1521 BLAKE2B 8b71c4a17eb6c20f9cd3a5f20a42da0d4f06533755abc6a94cde2219de03487980bfbf7e3bf50f096fb3a7a9db6c4b8dfbfef143b7cf37932779ff0fffccc58e SHA512 e364bc88b8a41dc109d0e44ac7045d2de9312bbc27afa0668cfc31f6cdc60456ca39b08e23669eb36da8dc71e72e8360a113179f1524ab0646665749e7a9cd5e
+AUX cloud-init-0.7.7-gentooinit.patch 2066 BLAKE2B d21f669bcd7738c9fd882a8395d03f63ffbf81733576b6e7171e448c9a5a35f8004310447135c35a8fe72f84de2d84833fed8f354bbe9e699d0bb1337a7734d8 SHA512 2846c04f65d37f8dd981c5feb445ebb3ba1c437ac4e7fae12557a49cc12bc369e0e46acf3977a8fc2890f3675480a47f504b6a69b79e61307f6c82f17bf00c47
+AUX cloud-init-0.7.8-gentooinit.patch 1111 BLAKE2B 1c560115f2718187738808a16ca2625aa161231917c57ff5275e423515f1038d58c1e82ec500dad489cb747c46d7d88a0bc208d23ba77cc7d4b2899b9c8afc57 SHA512 2a7e81b327853c8052c7eeb039d8166414d302e3558fa1a5147c2614f6f14d85419a70d10e8e526c3611b72273b5cae8027bb250f1a0f743924b89fd350aa130
+AUX cloud-init-0.7.9-tests.patch 468 BLAKE2B d4788b2e9557de53dcb225801d54854b38f97a61d36c6ec92abe1cf02f704406e18d49912184957c78d27d0b55b428571abbd38ef91da34d32e0f9d99b7e364b SHA512 07538a07a494c752b49ca357b448b4ae012ae855751886c4368e95d7a152a65afcc7c243eae428b670ae5f5802fbaeedeebf5a07d3a470bdc74d33c1f5f8ca02
+AUX cloud.cfg 1815 BLAKE2B df997117fc3e15303171942c2127eb1ae8c333a04c3d8ba7aa6e55b6f0641872e90bc643cb4ac576876c50af09136777507b739b4cc50b5b4094272b5e8bcdb0 SHA512 ff9a978befebdc177000ce50252a89d2b9adf4e2ab92c7c87300c54cebe5ff160fd6619dd56f0432a6ec8a819a4f948aa3e99c06e37dc6650ed41fdce16daeb3
+AUX hosts.gentoo.tmpl 920 BLAKE2B 9195167754ff1f09c37c0220a2dbf7c0c098daf8e71edabe944a96cbf66d2b029fbb36fef9efe6ffa7410bb8ee33f71f04a4dc1f7c62811fdd87e5216eb6589a SHA512 39e6bcdf40bd842a1d2e4ccd1c993b432016f7b3c4d5455b71896a16ee87a5d698e214919172f0a7e2f647156f5efe0964fed999dd193e4f16c944efdcc0f9c5
+DIST cloud-init-0.7.6.tar.gz 515670 BLAKE2B edaab1c731d5ac0ce1f0a3a82b1fed9cca54ac555f2704a4bf0bab2627d54d8f090610fa6aed79d0e2f131abff4016fb8ed55c0c0822ca45c602eabc80548ca9 SHA512 aa2397328afda8e77ed6d642e7642f41a4b4b5bcd3d0e87056aa8c88b56624ec65c57cfc66b0d13ccc235f1840baf1d577316974902a0439cf2f2eb0f8eef36d
+DIST cloud-init-0.7.6_p1212.tar.gz 451717 BLAKE2B 0b2136e36b78de38a700f9abad0639cfd3f49ca5a0e43aa7673afd0f9aa365a7ebe2b5767b076e481d4eb3521a0e8a04d581d1aa3de5537bbd09bcead867d3ee SHA512 25c5d1cc7c8fa887859624b4f28416d455063c278e3f00bfb3561ab0c99aa708d9fa431ff17c42994aba43eb985538982e5175bf0531857cc18fd8e724ef1fd3
+DIST cloud-init-0.7.7.tar.gz 477287 BLAKE2B eade80cff35e545a619f7d0beafadde145777c5ae581325a4588436ad8becc95a5945c216d8c3c814331099dd4b5cfafe62ee411329f4dce9897ab816ce5ba1f SHA512 06cd2bba67da9668204416073af771145668db43777d6f183dcb54e8e1d9d12471fe3bfc99dfbc03a81814c5614347ff7d6acc5dbe117e1206d7fc2041ae4b62
+DIST cloud-init-0.7.8.tar.gz 508777 BLAKE2B 7b5b3f1b5f28b6a4ba67ef30cbbb32e1a1eb21a373da5491a7157f45553843de68b56e040ec9f07a2ca35a0bbf9fdd5f90d0ef381d2da558422080de3da0299d SHA512 ff6c3837afe702359879f0ae1d7443247b0ed97d60ecf0cbe85fc364dc833e553962aae221f48becb104ad3f951a28cbd742a3b8521ef25dfb8fd19439759447
+DIST cloud-init-0.7.9.tar.gz 602188 BLAKE2B c2e2b8538488474cd4674b976f859164f0ab8ed585fc0b59c6e75f23a62fd035b8b76e0700c1e68893fc4a8346b3110ff2b25f13be92ff13eeac0f1ad2405641 SHA512 ee52909f634f51dcf9e1229a8f49faa8c562bf05b69fac108fcc80cb3217f4364a33cf696df015e4dcd7887c68cf6108729850648b4daee07b3d3247ca3cc5b1
+DIST cloud-init-17.1.tar.gz 780532 BLAKE2B 10809da2e81d594542d83b2416481c493474cac2e790da25363e631f6dae9edc1e2fd160708121486dd3a2ebd19cfc29d18978cbe7d82eb1aec907762bf7bf0b SHA512 988cae4291c8d6a5bce012b78d651c602c02ad38c3790e9ed9aa7c815ae84c98767718ab9b0d346ddbc9c83cb886d455590128af750183618c0bf0f0c5a79564
+DIST cloud-init-17.2.tar.gz 810821 BLAKE2B df1a7c1ed1fc48a7801a53bd89839d963debca6abf7f892d61bf7ec9222ab33bf78221e65d79028e0445cac4c5fe1e0c1620d49aea26c036ee17933d9c1893f5 SHA512 ad1c7f6ca9762b70a1f06a6b538032a7de0c5371fd792260d5959df113f4f51509d184b2207ffa23b41f395c1903d551d66aaf2a2ad60af3594cf1f18d1e4a38
+EBUILD cloud-init-0.7.6-r1.ebuild 2585 BLAKE2B c2f9bd34d430b99f8b78be2c4d2cb8b5ca7613ab71ec02c8e21c4001b35f3c16d637243e93f55a872f7e4ab7b0c990bf78abc36c3a3e822389a191a57e005c2c SHA512 0c82e788cacd91e923ff57c240a3615c20157d2a4ba1fdf7d28eb6f0e9f7c55b64b3ef321dc1f2cadd40e47128d2ef0854f3488fe7aabf5cdcf3f8b326eb6ad8
+EBUILD cloud-init-0.7.6-r2.ebuild 1916 BLAKE2B c4162b4ab96626c481db4d4f96aba3b0d85c18ad25afe510ece533b0aacaab91fe075b9ba36cbec945382d94ec7de964a774f818359a10f45a99dc60863acf8a SHA512 f5457fc4315e0533ab4d68b5a62d79516797b1aa1214539e9b56b1d9d6e3e2f14b069788843b09ae29ca64b70b6d3d8a6fb686f51e86318d90da59a32617f9ca
+EBUILD cloud-init-0.7.6_p1212-r1.ebuild 1989 BLAKE2B da729eef70d23a2a0df1bfdb28d74714ced55a097c8dcc2eb0c25d8d6e9acb57651340ca4d8190f100ca5fe0dcb8eee674e7e513bb8b50772383ef12fd23f11c SHA512 4e71e5ff1b4a2ea8bf600d627911f7eb197d5f90f354e553996388bdef13309ceecab732b168e1f4c3bd8d5fa3dfa736a34bc535eedb55ffe6c23a6b1eb873ce
+EBUILD cloud-init-0.7.6_p1212.ebuild 1952 BLAKE2B df5190629901c000c7a0aa49b41bd2537b26e65abc7a8830d1e5a8fce9d9367be7bd42613a0af0dcdeeba4a964a3d5d4698c9bc470e7beb79a43136a36481df0 SHA512 4e5064b3cf997f7cbcc3a615f0d1817a37608015c599aa718a60d8e1adcf994422c5fbccbcfe65ad98d93a208364e96382e78f4534e88b8f8e2b936c3c5c25f7
+EBUILD cloud-init-0.7.7.ebuild 2399 BLAKE2B 54d7784a165c51d994259e70367551addbb015be284ad3b109cf6ec4cad961cb581e246d6824eff40e8bf875d405ec377cf1b0ffdada35d5ea4d43a4292dbb4b SHA512 1c171970b6e60cc075b3863dafbb527fe23ad2ff0005303b34dba2d5ccff640ade4cfc0bfe54f97d0dd424b95266624599fd585d8931e92ad78bf5b8dae38bce
+EBUILD cloud-init-0.7.8-r2.ebuild 2547 BLAKE2B b508988c338b35cbb4866957fae9a215c53effbdaa5f1c0845e64747296bb5747c3f960bb0f7928e2b26f1d1fb6bb585fab947fe7b2cbdf40e849f2c629c2433 SHA512 972a04cc2c359f7271960820f4212ae1afc13def893b5bd87efe8ed30dd5f03f7219c008c9c7806f918eb7dbe3609e3c0407b7c0d5d5ad66b568abd2361ce2ec
+EBUILD cloud-init-0.7.9.ebuild 2542 BLAKE2B 3f13fa11cc65dd9f2cf1bde72541ed07d4b2991fd010437eabbc70fb8180ed71d06d00781a4679ac7ecbb77d912a74dbb56684ca90cbe97001d348efbd2a138f SHA512 11db9733a73ca6ca53189b2f768e08a471a00adb419d96b00d7a64731299aa43fe45f6b4a03e1ebe16ce7d58316b06eb96933a83b99cb19bd6a6b2453278220d
+EBUILD cloud-init-17.1.ebuild 2014 BLAKE2B 544f5fca45a28b2d1cece53fcbf2397c54cb56e65e0dbb368b78a4f0c08d5d4c84af7436710e4d3e666adf12c6d00f7947bc2de8c7ff5345d158c99a46b4271d SHA512 5dcbc40adbef50088e66e021ca4200293a6f044ed853dc2e1675a68a63d875ce1580d8bda4fe0c74de9738ff09931f3bf56efbad235bed57d81a5c30a9d19cef
+EBUILD cloud-init-17.2.ebuild 1962 BLAKE2B 253368bf942bbda581e586ba346b56ee9e80b92069c5eb4b6f114d62a5756aa68bd61a87ddf8b46d27ac27e90b8e3f201802d1ed9137846e0c6063bea248ed77 SHA512 aa04144b55af445074987e4c3bdb9a8caefa5c34f6c07f10dbfa980e97036c34379e3c062acf97d29d82c309e0e5257c56ec89cac3e05eb67b5dc0e091eb8ece
+EBUILD cloud-init-9999.ebuild 2215 BLAKE2B 58401178bc8dba30a20fabfccaa35668c8c07f9bfdfc6a4d455e9d301ff790b7444b71c6c8de84b07d425e7b67a429356584cd29f85a1a808a78eac3818578a0 SHA512 b1a0ba6b710d9ca4325cfdc5e89be8a039449428b5521bf81121dc0819d6b1d1b2fd0b2b020930e4724742fe6c01a99ed7d6afb6b96fb1ae23a976ee0e0c72c6
+MISC metadata.xml 465 BLAKE2B 5398fc1968cb3b137fbef2e05917db7edc8fa1d9d777906524c2905eeaeefa20176935e2a9e13105c3330a1d7de7cac2f70dd573a3c9c1f190418a77c7c0a572 SHA512 61808e99f90a21f708cd899837396b15ea156519406f7d8f3168b76f85c5b948e31e4d8c8b5a560e8b18859190914466f5b81236ae3de7b52bd253c0bf3c0ad9
diff --git a/app-emulation/cloud-init/cloud-init-0.7.6-r1.ebuild b/app-emulation/cloud-init/cloud-init-0.7.6-r1.ebuild
new file mode 100644
index 000000000000..9af4ed7a5fd2
--- /dev/null
+++ b/app-emulation/cloud-init/cloud-init-0.7.6-r1.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1 eutils multilib systemd
+
+DESCRIPTION="EC2 initialisation magic"
+HOMEPAGE="https://launchpad.net/cloud-init"
+SRC_URI="https://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="test"
+
+CDEPEND="
+ dev-python/cheetah[${PYTHON_USEDEP}]
+ dev-python/configobj[${PYTHON_USEDEP}]
+ dev-python/jinja[${PYTHON_USEDEP}]
+ dev-python/jsonpatch[${PYTHON_USEDEP}]
+ dev-python/oauth[${PYTHON_USEDEP}]
+ dev-python/prettytable[${PYTHON_USEDEP}]
+ dev-python/pyserial[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+"
+DEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? (
+ ${CDEPEND}
+ >=dev-python/httpretty-0.7.1[${PYTHON_USEDEP}]
+ dev-python/mocker[${PYTHON_USEDEP}]
+ dev-python/nose[${PYTHON_USEDEP}]
+ ~dev-python/pep8-1.5.7[${PYTHON_USEDEP}]
+ dev-python/pyflakes[${PYTHON_USEDEP}]
+ sys-apps/iproute2
+ )
+"
+RDEPEND="
+ ${CDEPEND}
+ sys-fs/growpart
+ virtual/logger
+"
+
+python_prepare_all() {
+ # Note: Gentoo places ip in /sbin/ not /bin/
+ ebegin 'patching cloudinit/sources/DataSourceOpenNebula.py'
+ sed \
+ -e '438s/sbin/bin/' \
+ -i cloudinit/sources/DataSourceOpenNebula.py
+ STATUS=$?
+ eend ${STATUS}
+ [[ ${STATUS} -gt 0 ]] && die
+
+ # https://bugs.launchpad.net/cloud-init/+bug/1380424
+ ebegin 'patching tests/unittests/test_distros/test_netconfig.py'
+ sed \
+ -e '177s/test_simple_write_freebsd/_&/' \
+ -i tests/unittests/test_distros/test_netconfig.py
+ STATUS=$?
+ eend ${STATUS}
+ [[ ${STATUS} -gt 0 ]] && die
+
+ # Note Gentoo installs its own RC files
+ ebegin 'patching setup.py'
+ sed \
+ -e "144 s/'tests'/'tests.*', &/" \
+ -e '163,167 d' \
+ -i setup.py
+ STATUS=$?
+ eend ${STATUS}
+ [[ ${STATUS} -gt 0 ]] && die
+
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ emake test
+}
+
+python_install_all() {
+ keepdir /etc/cloud
+
+ distutils-r1_python_install_all
+
+ doinitd "${S}"/sysvinit/gentoo/cloud-config
+ doinitd "${S}"/sysvinit/gentoo/cloud-final
+ doinitd "${S}"/sysvinit/gentoo/cloud-init
+ doinitd "${S}"/sysvinit/gentoo/cloud-init-local
+ insinto /etc/cloud/templates
+ doins "${FILESDIR}/hosts.gentoo.tmpl"
+ insinto /etc/cloud
+ doins "${FILESDIR}/cloud.cfg"
+
+ systemd_dounit "${S}"/systemd/cloud-config.service
+ systemd_dounit "${S}"/systemd/cloud-config.target
+ systemd_dounit "${S}"/systemd/cloud-final.service
+ systemd_dounit "${S}"/systemd/cloud-init-local.service
+ systemd_dounit "${S}"/systemd/cloud-init.service
+}
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
new file mode 100644
index 000000000000..f97fbc9cf6dc
--- /dev/null
+++ b/app-emulation/cloud-init/cloud-init-0.7.6-r2.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1 eutils multilib systemd
+
+DESCRIPTION="EC2 initialisation magic"
+HOMEPAGE="https://launchpad.net/cloud-init"
+SRC_URI="https://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+CDEPEND="
+ dev-python/cheetah[${PYTHON_USEDEP}]
+ dev-python/configobj[${PYTHON_USEDEP}]
+ dev-python/jinja[${PYTHON_USEDEP}]
+ dev-python/jsonpatch[${PYTHON_USEDEP}]
+ dev-python/oauth[${PYTHON_USEDEP}]
+ dev-python/prettytable[${PYTHON_USEDEP}]
+ dev-python/pyserial[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+"
+DEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? (
+ ${CDEPEND}
+ >=dev-python/httpretty-0.7.1[${PYTHON_USEDEP}]
+ dev-python/mocker[${PYTHON_USEDEP}]
+ dev-python/nose[${PYTHON_USEDEP}]
+ ~dev-python/pep8-1.5.7[${PYTHON_USEDEP}]
+ dev-python/pyflakes[${PYTHON_USEDEP}]
+ sys-apps/iproute2
+ )
+"
+RDEPEND="
+ ${CDEPEND}
+ sys-fs/growpart
+ virtual/logger
+"
+
+PATCHES=( "${FILESDIR}/cloud-init-0.7.6-gentoo.patch" )
+
+python_prepare_all() {
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ emake test
+}
+
+python_install_all() {
+ keepdir /etc/cloud
+
+ distutils-r1_python_install_all
+
+ doinitd "${S}"/sysvinit/gentoo/cloud-config
+ doinitd "${S}"/sysvinit/gentoo/cloud-final
+ doinitd "${S}"/sysvinit/gentoo/cloud-init
+ doinitd "${S}"/sysvinit/gentoo/cloud-init-local
+ insinto /etc/cloud/templates
+ doins "${FILESDIR}/hosts.gentoo.tmpl"
+ insinto /etc/cloud
+ doins "${FILESDIR}/cloud.cfg"
+
+ systemd_dounit "${S}"/systemd/cloud-config.service
+ systemd_dounit "${S}"/systemd/cloud-config.target
+ systemd_dounit "${S}"/systemd/cloud-final.service
+ systemd_dounit "${S}"/systemd/cloud-init-local.service
+ systemd_dounit "${S}"/systemd/cloud-init.service
+}
diff --git a/app-emulation/cloud-init/cloud-init-0.7.6_p1212-r1.ebuild b/app-emulation/cloud-init/cloud-init-0.7.6_p1212-r1.ebuild
new file mode 100644
index 000000000000..91ce7346914a
--- /dev/null
+++ b/app-emulation/cloud-init/cloud-init-0.7.6_p1212-r1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+BZRTGZ=1
+
+inherit distutils-r1 eutils multilib systemd
+
+DESCRIPTION="EC2 initialisation magic"
+HOMEPAGE="https://launchpad.net/cloud-init"
+if [ "x$BZRTGZ" != x1 ]; then
+ SRC_URI="https://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.gz"
+else
+ # Launchpad does not provide consistent checksums https://bugs.launchpad.net/launchpad/+bug/1576338
+ # SRC_URI="http://bazaar.launchpad.net/~${PN}-dev/${PN}/trunk/tarball/${PV/*_p} -> ${P}.tar.gz"
+ SRC_URI="mirror://gentoo/${P}.tar.gz https://dev.gentoo.org/~robbat2/distfiles/${P}.tar.gz"
+ S="${WORKDIR}/~cloud-init-dev/cloud-init/trunk/"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+CDEPEND="
+ dev-python/cheetah[${PYTHON_USEDEP}]
+ dev-python/configobj[${PYTHON_USEDEP}]
+ dev-python/jinja[${PYTHON_USEDEP}]
+ dev-python/jsonpatch[${PYTHON_USEDEP}]
+ dev-python/oauth[${PYTHON_USEDEP}]
+ dev-python/prettytable[${PYTHON_USEDEP}]
+ dev-python/pyserial[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+"
+DEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? (
+ ${CDEPEND}
+ >=dev-python/httpretty-0.7.1[${PYTHON_USEDEP}]
+ dev-python/mocker[${PYTHON_USEDEP}]
+ dev-python/nose[${PYTHON_USEDEP}]
+ ~dev-python/pep8-1.5.7[${PYTHON_USEDEP}]
+ dev-python/pyflakes[${PYTHON_USEDEP}]
+ sys-apps/iproute2
+ )
+"
+RDEPEND="
+ ${CDEPEND}
+ sys-fs/growpart
+ virtual/logger
+"
+
+PATCHES=( "${FILESDIR}/cloud-init-0.7.6_p1212-gentoo.patch" )
+
+python_prepare_all() {
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ emake test
+}
+
+python_install() {
+ distutils-r1_python_install "--init-system=sysvinit_openrc"
+}
+
+python_install_all() {
+ keepdir /etc/cloud
+
+ distutils-r1_python_install_all
+ chmod +x "${D}"/etc/init.d/* || die
+
+ insinto /etc/cloud/templates
+ doins "${FILESDIR}/hosts.gentoo.tmpl"
+ insinto /etc/cloud
+ doins "${FILESDIR}/cloud.cfg"
+}
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
new file mode 100644
index 000000000000..737e56a54944
--- /dev/null
+++ b/app-emulation/cloud-init/cloud-init-0.7.6_p1212.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+BZRTGZ=1
+
+inherit distutils-r1 eutils multilib systemd
+
+DESCRIPTION="EC2 initialisation magic"
+HOMEPAGE="https://launchpad.net/cloud-init"
+if [ "x$BZRTGZ" != x1 ]; then
+ SRC_URI="https://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.gz"
+else
+ # Launchpad does not provide consistent checksums https://bugs.launchpad.net/launchpad/+bug/1576338
+ # SRC_URI="http://bazaar.launchpad.net/~${PN}-dev/${PN}/trunk/tarball/${PV/*_p} -> ${P}.tar.gz"
+ SRC_URI="mirror://gentoo/${P}.tar.gz https://dev.gentoo.org/~robbat2/distfiles/${P}.tar.gz"
+ S="${WORKDIR}/~cloud-init-dev/cloud-init/trunk/"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+CDEPEND="
+ dev-python/cheetah[${PYTHON_USEDEP}]
+ dev-python/configobj[${PYTHON_USEDEP}]
+ dev-python/jinja[${PYTHON_USEDEP}]
+ dev-python/jsonpatch[${PYTHON_USEDEP}]
+ dev-python/oauth[${PYTHON_USEDEP}]
+ dev-python/prettytable[${PYTHON_USEDEP}]
+ dev-python/pyserial[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+"
+DEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? (
+ ${CDEPEND}
+ >=dev-python/httpretty-0.7.1[${PYTHON_USEDEP}]
+ dev-python/mocker[${PYTHON_USEDEP}]
+ dev-python/nose[${PYTHON_USEDEP}]
+ ~dev-python/pep8-1.5.7[${PYTHON_USEDEP}]
+ dev-python/pyflakes[${PYTHON_USEDEP}]
+ sys-apps/iproute2
+ )
+"
+RDEPEND="
+ ${CDEPEND}
+ sys-fs/growpart
+ virtual/logger
+"
+
+PATCHES=( "${FILESDIR}/cloud-init-0.7.6_p1212-gentoo.patch" )
+
+python_prepare_all() {
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ emake test
+}
+
+python_install() {
+ distutils-r1_python_install "--init-system=sysvinit_openrc"
+}
+
+python_install_all() {
+ keepdir /etc/cloud
+
+ distutils-r1_python_install_all
+
+ insinto /etc/cloud/templates
+ doins "${FILESDIR}/hosts.gentoo.tmpl"
+ insinto /etc/cloud
+ doins "${FILESDIR}/cloud.cfg"
+}
diff --git a/app-emulation/cloud-init/cloud-init-0.7.7.ebuild b/app-emulation/cloud-init/cloud-init-0.7.7.ebuild
new file mode 100644
index 000000000000..389eb6402e3c
--- /dev/null
+++ b/app-emulation/cloud-init/cloud-init-0.7.7.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 python3_4 python3_5 )
+
+inherit distutils-r1 eutils multilib systemd
+
+DESCRIPTION="cloud initialisation magic"
+HOMEPAGE="https://launchpad.net/cloud-init"
+# Launchpad does not provide consistent checksums https://bugs.launchpad.net/launchpad/+bug/1576338
+# SRC_URI="http://bazaar.launchpad.net/~${PN}-dev/${PN}/trunk/tarball/${PV/*_p} -> ${P}.tar.gz"
+SRC_URI="mirror://gentoo/${P}.tar.gz https://dev.gentoo.org/~prometheanfire/dist/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+CDEPEND="
+ dev-python/six[${PYTHON_USEDEP}]
+ dev-python/configobj[${PYTHON_USEDEP}]
+ dev-python/jinja[${PYTHON_USEDEP}]
+ dev-python/jsonpatch[${PYTHON_USEDEP}]
+ dev-python/oauthlib[${PYTHON_USEDEP}]
+ dev-python/prettytable[${PYTHON_USEDEP}]
+ dev-python/pyserial[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+"
+DEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ 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/pep8[${PYTHON_USEDEP}]
+ dev-python/flake8[${PYTHON_USEDEP}]
+ dev-python/hacking[${PYTHON_USEDEP}]
+ )
+"
+RDEPEND="
+ ${CDEPEND}
+ sys-apps/iproute2
+ sys-fs/growpart
+ virtual/logger
+"
+
+PATCHES=( "${FILESDIR}/cloud-init-0.7.7-gentooinit.patch" )
+
+python_prepare_all() {
+ sed -i '/^argparse/d' requirements.txt || die
+ sed -i '/^hacking/d' test-requirements.txt || die
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ emake test
+}
+
+python_install() {
+ distutils-r1_python_install "--init-system=sysvinit_openrc"
+}
+
+python_install_all() {
+ keepdir /etc/cloud
+
+ distutils-r1_python_install_all
+
+ chmod +x "${D}"/etc/init.d/cloud-config
+ chmod +x "${D}"/etc/init.d/cloud-final
+ chmod +x "${D}"/etc/init.d/cloud-init
+ chmod +x "${D}"/etc/init.d/cloud-init-local
+
+ insinto /etc/cloud/templates
+ doins "${FILESDIR}/hosts.gentoo.tmpl"
+ insinto /etc/cloud
+ doins "${FILESDIR}/cloud.cfg"
+
+ systemd_dounit "${S}"/systemd/cloud-config.service
+ systemd_dounit "${S}"/systemd/cloud-config.target
+ systemd_dounit "${S}"/systemd/cloud-final.service
+ systemd_dounit "${S}"/systemd/cloud-init-local.service
+ systemd_dounit "${S}"/systemd/cloud-init.service
+}
diff --git a/app-emulation/cloud-init/cloud-init-0.7.8-r2.ebuild b/app-emulation/cloud-init/cloud-init-0.7.8-r2.ebuild
new file mode 100644
index 000000000000..88cb62749cb1
--- /dev/null
+++ b/app-emulation/cloud-init/cloud-init-0.7.8-r2.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 python3_4 python3_5 )
+
+inherit distutils-r1 eutils multilib systemd
+
+DESCRIPTION="cloud initialisation magic"
+HOMEPAGE="https://launchpad.net/cloud-init"
+SRC_URI="https://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="test"
+
+CDEPEND="
+ dev-python/six[${PYTHON_USEDEP}]
+ dev-python/configobj[${PYTHON_USEDEP}]
+ dev-python/jinja[${PYTHON_USEDEP}]
+ dev-python/jsonpatch[${PYTHON_USEDEP}]
+ dev-python/oauthlib[${PYTHON_USEDEP}]
+ dev-python/prettytable[${PYTHON_USEDEP}]
+ dev-python/pyserial[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ dev-python/cheetah[$(python_gen_usedep 'python2_7')]
+"
+DEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ 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/pep8[${PYTHON_USEDEP}]
+ dev-python/flake8[${PYTHON_USEDEP}]
+ dev-python/hacking[${PYTHON_USEDEP}]
+ )
+"
+RDEPEND="
+ ${CDEPEND}
+ net-analyzer/macchanger
+ sys-apps/iproute2
+ sys-fs/growpart
+ virtual/logger
+"
+
+PATCHES=( "${FILESDIR}/cloud-init-0.7.8-gentooinit.patch" )
+
+python_prepare_all() {
+ sed -i '/^argparse/d' requirements.txt || die
+ sed -i '/^hacking/d' test-requirements.txt || die
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ emake test
+}
+
+python_install() {
+ distutils-r1_python_install "--init-system=sysvinit_openrc"
+}
+
+python_install_all() {
+ keepdir /etc/cloud
+
+ distutils-r1_python_install_all
+
+ chmod +x "${D}"/etc/init.d/cloud-config
+ chmod +x "${D}"/etc/init.d/cloud-final
+ chmod +x "${D}"/etc/init.d/cloud-init
+ chmod +x "${D}"/etc/init.d/cloud-init-local
+
+ insinto /etc/cloud/templates
+ doins "${FILESDIR}/hosts.gentoo.tmpl"
+ insinto /etc/cloud
+ doins "${FILESDIR}/cloud.cfg"
+
+ systemd_dounit "${S}"/systemd/cloud-config.service
+ systemd_dounit "${S}"/systemd/cloud-config.target
+ systemd_dounit "${S}"/systemd/cloud-final.service
+ systemd_dounit "${S}"/systemd/cloud-init-local.service
+ systemd_dounit "${S}"/systemd/cloud-init.service
+}
+
+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-0.7.9.ebuild b/app-emulation/cloud-init/cloud-init-0.7.9.ebuild
new file mode 100644
index 000000000000..df1fcce20697
--- /dev/null
+++ b/app-emulation/cloud-init/cloud-init-0.7.9.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 python3_4 python3_5 )
+
+inherit distutils-r1 eutils multilib systemd
+
+DESCRIPTION="cloud initialisation magic"
+HOMEPAGE="https://launchpad.net/cloud-init"
+SRC_URI="https://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="test"
+
+CDEPEND="
+ dev-python/six[${PYTHON_USEDEP}]
+ dev-python/configobj[${PYTHON_USEDEP}]
+ dev-python/jinja[${PYTHON_USEDEP}]
+ dev-python/jsonpatch[${PYTHON_USEDEP}]
+ dev-python/oauthlib[${PYTHON_USEDEP}]
+ dev-python/prettytable[${PYTHON_USEDEP}]
+ dev-python/pyserial[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ dev-python/cheetah[$(python_gen_usedep 'python2_7')]
+"
+DEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ 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/pep8[${PYTHON_USEDEP}]
+ dev-python/flake8[${PYTHON_USEDEP}]
+ dev-python/hacking[${PYTHON_USEDEP}]
+ )
+"
+RDEPEND="
+ ${CDEPEND}
+ net-analyzer/macchanger
+ sys-apps/iproute2
+ sys-fs/growpart
+ virtual/logger
+"
+
+PATCHES=( "${FILESDIR}/cloud-init-0.7.9-tests.patch" )
+
+python_prepare_all() {
+ sed -i '/^argparse/d' requirements.txt || die
+ sed -i '/^hacking/d' test-requirements.txt || die
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ emake test
+}
+
+python_install() {
+ distutils-r1_python_install "--init-system=sysvinit_openrc"
+}
+
+python_install_all() {
+ keepdir /etc/cloud
+
+ distutils-r1_python_install_all
+
+ chmod +x "${D}"/etc/init.d/cloud-config
+ chmod +x "${D}"/etc/init.d/cloud-final
+ chmod +x "${D}"/etc/init.d/cloud-init
+ chmod +x "${D}"/etc/init.d/cloud-init-local
+
+ insinto /etc/cloud/templates
+ doins "${FILESDIR}/hosts.gentoo.tmpl"
+ insinto /etc/cloud
+ doins "${FILESDIR}/cloud.cfg"
+
+ systemd_dounit "${S}"/systemd/cloud-config.service
+ systemd_dounit "${S}"/systemd/cloud-config.target
+ systemd_dounit "${S}"/systemd/cloud-final.service
+ systemd_dounit "${S}"/systemd/cloud-init-local.service
+ systemd_dounit "${S}"/systemd/cloud-init.service
+}
+
+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-17.1.ebuild b/app-emulation/cloud-init/cloud-init-17.1.ebuild
new file mode 100644
index 000000000000..193f0cbe21fd
--- /dev/null
+++ b/app-emulation/cloud-init/cloud-init-17.1.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 python3_4 python3_5 python3_6 )
+
+inherit distutils-r1 eutils multilib systemd
+
+DESCRIPTION="cloud initialisation magic"
+HOMEPAGE="https://launchpad.net/cloud-init"
+SRC_URI="https://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+RESTRICT="test"
+
+# remove pretytable in 17.2
+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/prettytable-0.7.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="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ 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=( )
+
+python_test() {
+ emake test
+}
+
+python_install() {
+ distutils-r1_python_install "--init-system=sysvinit_openrc,systemd"
+}
+
+python_install_all() {
+ keepdir /etc/cloud
+
+ distutils-r1_python_install_all
+
+ # installs as non-executable
+ chmod +x "${D}"/etc/init.d/*
+
+ insinto /etc/cloud/templates
+ doins "${FILESDIR}/hosts.gentoo.tmpl"
+ insinto /etc/cloud
+ doins "${FILESDIR}/cloud.cfg"
+}
+
+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-17.2.ebuild b/app-emulation/cloud-init/cloud-init-17.2.ebuild
new file mode 100644
index 000000000000..d041da0ca5dc
--- /dev/null
+++ b/app-emulation/cloud-init/cloud-init-17.2.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 python3_4 python3_5 python3_6 )
+
+inherit distutils-r1 eutils multilib systemd
+
+DESCRIPTION="cloud initialisation magic"
+HOMEPAGE="https://launchpad.net/cloud-init"
+SRC_URI="https://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="test"
+RESTRICT="test"
+
+# remove pretytable in 17.2
+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="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ 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=( )
+
+python_test() {
+ emake test
+}
+
+python_install() {
+ distutils-r1_python_install "--init-system=sysvinit_openrc,systemd"
+}
+
+python_install_all() {
+ keepdir /etc/cloud
+
+ distutils-r1_python_install_all
+
+ # installs as non-executable
+ chmod +x "${D}"/etc/init.d/*
+
+ insinto /etc/cloud/templates
+ doins "${FILESDIR}/hosts.gentoo.tmpl"
+ insinto /etc/cloud
+ doins "${FILESDIR}/cloud.cfg"
+}
+
+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-9999.ebuild b/app-emulation/cloud-init/cloud-init-9999.ebuild
new file mode 100644
index 000000000000..4072bd36f068
--- /dev/null
+++ b/app-emulation/cloud-init/cloud-init-9999.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit distutils-r1 eutils git-r3 multilib systemd
+
+DESCRIPTION="cloud initialisation magic"
+HOMEPAGE="https://launchpad.net/cloud-init"
+EGIT_REPO_URI="https://git.launchpad.net/cloud-init"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS=""
+IUSE="test"
+
+CDEPEND="
+ dev-python/six[${PYTHON_USEDEP}]
+ dev-python/configobj[${PYTHON_USEDEP}]
+ dev-python/jinja[${PYTHON_USEDEP}]
+ dev-python/jsonpatch[${PYTHON_USEDEP}]
+ dev-python/oauthlib[${PYTHON_USEDEP}]
+ dev-python/prettytable[${PYTHON_USEDEP}]
+ dev-python/pyserial[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+"
+DEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ 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/pep8[${PYTHON_USEDEP}]
+ dev-python/flake8[${PYTHON_USEDEP}]
+ dev-python/hacking[${PYTHON_USEDEP}]
+ )
+"
+RDEPEND="
+ ${CDEPEND}
+ sys-apps/iproute2
+ sys-fs/growpart
+ virtual/logger
+"
+
+PATCHES=( "${FILESDIR}/cloud-init-0.7.8-gentooinit.patch" )
+
+python_prepare_all() {
+ sed -i 's/version=get_version(),/version=9999,/g' setup.py || die
+ sed -i '/^argparse/d' requirements.txt || die
+ sed -i '/^hacking/d' test-requirements.txt || die
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ emake test
+}
+
+python_install() {
+ distutils-r1_python_install "--init-system=sysvinit_openrc"
+}
+
+python_install_all() {
+ keepdir /etc/cloud
+
+ distutils-r1_python_install_all
+
+ chmod +x "${D}"/etc/init.d/cloud-config
+ chmod +x "${D}"/etc/init.d/cloud-final
+ chmod +x "${D}"/etc/init.d/cloud-init
+ chmod +x "${D}"/etc/init.d/cloud-init-local
+
+ insinto /etc/cloud/templates
+ doins "${FILESDIR}/hosts.gentoo.tmpl"
+ insinto /etc/cloud
+ doins "${FILESDIR}/cloud.cfg"
+
+ systemd_dounit "${S}"/systemd/cloud-config.service
+ systemd_dounit "${S}"/systemd/cloud-config.target
+ systemd_dounit "${S}"/systemd/cloud-final.service
+ systemd_dounit "${S}"/systemd/cloud-init-local.service
+ systemd_dounit "${S}"/systemd/cloud-init.service
+}
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
new file mode 100644
index 000000000000..27abd3812ab4
--- /dev/null
+++ b/app-emulation/cloud-init/files/cloud-init-0.7.6-gentoo.patch
@@ -0,0 +1,51 @@
+# Note: Gentoo places ip in /sbin/ not /bin/
+diff -Nuar cloud-init-0.7.6.orig/cloudinit/sources/DataSourceOpenNebula.py cloud-init-0.7.6/cloudinit/sources/DataSourceOpenNebula.py
+--- cloud-init-0.7.6.orig/cloudinit/sources/DataSourceOpenNebula.py 2014-10-10 08:26:25.000000000 -0700
++++ cloud-init-0.7.6/cloudinit/sources/DataSourceOpenNebula.py 2016-04-25 15:24:51.483130933 -0700
+@@ -435,7 +435,7 @@
+ # http://opennebula.org/documentation:rel3.8:cong#network_configuration
+ for k in context.keys():
+ if re.match(r'^ETH\d+_IP$', k):
+- (out, _) = util.subp(['/sbin/ip', 'link'])
++ (out, _) = util.subp(['/bin/ip', 'link'])
+ net = OpenNebulaNetwork(out, context)
+ results['network-interfaces'] = net.gen_conf()
+ break
+
+# Note Gentoo installs its own RC files
+diff -Nuar cloud-init-0.7.6.orig/setup.py cloud-init-0.7.6/setup.py
+--- cloud-init-0.7.6.orig/setup.py 2014-10-10 08:26:25.000000000 -0700
++++ cloud-init-0.7.6/setup.py 2016-04-25 15:24:51.488131027 -0700
+@@ -141,7 +141,7 @@
+ author='Scott Moser',
+ author_email='scott.moser@canonical.com',
+ url='http://launchpad.net/cloud-init/',
+- packages=setuptools.find_packages(exclude=['tests']),
++ packages=setuptools.find_packages(exclude=['tests.*', 'tests']),
+ scripts=['bin/cloud-init',
+ 'tools/cloud-init-per',
+ ],
+@@ -160,9 +160,4 @@
+ [f for f in glob('doc/examples/seed/*') if is_f(f)]),
+ ],
+ install_requires=read_requires(),
+- cmdclass={
+- # Use a subclass for install that handles
+- # adding on the right init system configuration files
+- 'install': InitsysInstallData,
+- },
+ )
+
+# https://bugs.launchpad.net/cloud-init/+bug/1380424
+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
+--- cloud-init-0.7.6.orig/tests/unittests/test_distros/test_netconfig.py 2014-10-10 08:26:25.000000000 -0700
++++ cloud-init-0.7.6/tests/unittests/test_distros/test_netconfig.py 2016-04-25 15:24:51.485130971 -0700
+@@ -174,7 +174,7 @@
+ self.assertCfgEquals(expected_buf, str(write_buf))
+ self.assertEquals(write_buf.mode, 0644)
+
+- def test_simple_write_freebsd(self):
++ def _test_simple_write_freebsd(self):
+ fbsd_distro = self._get_distro('freebsd')
+ util_mock = self.mocker.replace(util.write_file,
+ spec=False, passthrough=False)
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
new file mode 100644
index 000000000000..ef5d950842fe
--- /dev/null
+++ b/app-emulation/cloud-init/files/cloud-init-0.7.6_p1212-gentoo.patch
@@ -0,0 +1,33 @@
+diff -Nuar --exclude '*~' trunk.orig/setup.py trunk/setup.py
+--- trunk.orig/setup.py 2016-04-25 14:44:43.000000000 -0700
++++ trunk/setup.py 2016-04-25 15:44:45.254496814 -0700
+@@ -1,3 +1,4 @@
++#!/usr/bin/python2
+ # vi: ts=4 expandtab
+ #
+ # Distutils magic for ec2-init
+@@ -74,6 +75,7 @@
+ 'sysvinit': [f for f in glob('sysvinit/redhat/*') if is_f(f)],
+ 'sysvinit_freebsd': [f for f in glob('sysvinit/freebsd/*') if is_f(f)],
+ 'sysvinit_deb': [f for f in glob('sysvinit/debian/*') if is_f(f)],
++ 'sysvinit_openrc': [f for f in glob('sysvinit/gentoo/*') if is_f(f)],
+ 'systemd': [f for f in (glob('systemd/*.service') +
+ glob('systemd/*.target')) if is_f(f)],
+ 'systemd.generators': [f for f in glob('systemd/*-generator') if is_f(f)],
+@@ -83,6 +85,7 @@
+ 'sysvinit': '/etc/rc.d/init.d',
+ 'sysvinit_freebsd': '/usr/local/etc/rc.d',
+ 'sysvinit_deb': '/etc/init.d',
++ 'sysvinit_openrc': '/etc/init.d',
+ 'systemd': pkg_config_read('systemd', 'systemdsystemunitdir'),
+ 'systemd.generators': pkg_config_read('systemd',
+ 'systemdsystemgeneratordir'),
+@@ -205,7 +208,7 @@
+ author='Scott Moser',
+ author_email='scott.moser@canonical.com',
+ url='http://launchpad.net/cloud-init/',
+- packages=setuptools.find_packages(exclude=['tests']),
++ packages=setuptools.find_packages(exclude=['tests.*', 'tests']),
+ scripts=['bin/cloud-init',
+ 'tools/cloud-init-per'],
+ license='GPLv3',
diff --git a/app-emulation/cloud-init/files/cloud-init-0.7.7-gentooinit.patch b/app-emulation/cloud-init/files/cloud-init-0.7.7-gentooinit.patch
new file mode 100644
index 000000000000..ddb4f38201cc
--- /dev/null
+++ b/app-emulation/cloud-init/files/cloud-init-0.7.7-gentooinit.patch
@@ -0,0 +1,42 @@
+diff --git a/cloudinit/sources/DataSourceOpenNebula.py b/cloudinit/sources/DataSourceOpenNebula.py
+index 7b3a76b..635a836 100644
+--- a/cloudinit/sources/DataSourceOpenNebula.py
++++ b/cloudinit/sources/DataSourceOpenNebula.py
+@@ -407,7 +407,7 @@ def read_context_disk_dir(source_dir, asuser=None):
+ # http://opennebula.org/documentation:rel3.8:cong#network_configuration
+ for k in context:
+ if re.match(r'^ETH\d+_IP$', k):
+- (out, _) = util.subp(['/sbin/ip', 'link'])
++ (out, _) = util.subp(['ip', 'link'])
+ net = OpenNebulaNetwork(out, context)
+ results['network-interfaces'] = net.gen_conf()
+ break
+diff --git a/setup.py b/setup.py
+index bbadd7b..1578a3d 100755
+--- a/setup.py
++++ b/setup.py
+@@ -74,6 +74,7 @@ INITSYS_FILES = {
+ 'sysvinit': [f for f in glob('sysvinit/redhat/*') if is_f(f)],
+ 'sysvinit_freebsd': [f for f in glob('sysvinit/freebsd/*') if is_f(f)],
+ 'sysvinit_deb': [f for f in glob('sysvinit/debian/*') if is_f(f)],
++ 'sysvinit_openrc': [f for f in glob('sysvinit/gentoo/*') if is_f(f)],
+ 'systemd': [f for f in (glob('systemd/*.service') +
+ glob('systemd/*.target')) if is_f(f)],
+ 'systemd.generators': [f for f in glob('systemd/*-generator') if is_f(f)],
+@@ -83,6 +84,7 @@ INITSYS_ROOTS = {
+ 'sysvinit': '/etc/rc.d/init.d',
+ 'sysvinit_freebsd': '/usr/local/etc/rc.d',
+ 'sysvinit_deb': '/etc/init.d',
++ 'sysvinit_openrc': '/etc/init.d',
+ 'systemd': pkg_config_read('systemd', 'systemdsystemunitdir'),
+ 'systemd.generators': pkg_config_read('systemd',
+ 'systemdsystemgeneratordir'),
+@@ -205,7 +207,7 @@ setuptools.setup(
+ author='Scott Moser',
+ author_email='scott.moser@canonical.com',
+ url='http://launchpad.net/cloud-init/',
+- packages=setuptools.find_packages(exclude=['tests']),
++ packages=setuptools.find_packages(exclude=['tests.*', 'tests']),
+ scripts=['tools/cloud-init-per'],
+ license='GPLv3',
+ data_files=data_files,
diff --git a/app-emulation/cloud-init/files/cloud-init-0.7.8-gentooinit.patch b/app-emulation/cloud-init/files/cloud-init-0.7.8-gentooinit.patch
new file mode 100644
index 000000000000..ff0e0149fa3b
--- /dev/null
+++ b/app-emulation/cloud-init/files/cloud-init-0.7.8-gentooinit.patch
@@ -0,0 +1,38 @@
+diff --git a/setup.py b/setup.py
+index bbadd7b..1578a3d 100755
+--- a/setup.py
++++ b/setup.py
+@@ -205,7 +207,7 @@ setuptools.setup(
+ author='Scott Moser',
+ author_email='scott.moser@canonical.com',
+ url='http://launchpad.net/cloud-init/',
+- packages=setuptools.find_packages(exclude=['tests']),
++ packages=setuptools.find_packages(exclude=['tests.*', 'tests']),
+ scripts=['tools/cloud-init-per'],
+ license='GPLv3',
+ data_files=data_files,
+diff --git a/sysvinit/gentoo/cloud-init b/sysvinit/gentoo/cloud-init
+index 5afc0f2..531a715 100644
+--- a/sysvinit/gentoo/cloud-init
++++ b/sysvinit/gentoo/cloud-init
+@@ -2,6 +2,7 @@
+ # add depends for network, dns, fs etc
+ depend() {
+ after cloud-init-local
++ after net
+ before cloud-config
+ provide cloud-init
+ }
+diff --git a/sysvinit/gentoo/cloud-init-local b/sysvinit/gentoo/cloud-init-local
+index 9bd0b56..0f8cf65 100644
+--- a/sysvinit/gentoo/cloud-init-local
++++ b/sysvinit/gentoo/cloud-init-local
+@@ -2,7 +2,7 @@
+
+ depend() {
+ after localmount
+- after netmount
++ before net
+ before cloud-init
+ provide cloud-init-local
+ }
diff --git a/app-emulation/cloud-init/files/cloud-init-0.7.9-tests.patch b/app-emulation/cloud-init/files/cloud-init-0.7.9-tests.patch
new file mode 100644
index 000000000000..b80a60a47b7f
--- /dev/null
+++ b/app-emulation/cloud-init/files/cloud-init-0.7.9-tests.patch
@@ -0,0 +1,13 @@
+diff --git a/setup.py b/setup.py
+index bbadd7b..1578a3d 100755
+--- a/setup.py
++++ b/setup.py
+@@ -205,7 +207,7 @@ setuptools.setup(
+ author='Scott Moser',
+ author_email='scott.moser@canonical.com',
+ url='http://launchpad.net/cloud-init/',
+- packages=setuptools.find_packages(exclude=['tests']),
++ packages=setuptools.find_packages(exclude=['tests.*', 'tests']),
+ scripts=['tools/cloud-init-per'],
+ license='GPLv3',
+ data_files=data_files,
diff --git a/app-emulation/cloud-init/files/cloud.cfg b/app-emulation/cloud-init/files/cloud.cfg
new file mode 100644
index 000000000000..d62e3a22241b
--- /dev/null
+++ b/app-emulation/cloud-init/files/cloud.cfg
@@ -0,0 +1,79 @@
+# The top level settings are used as module
+# and system configuration.
+
+# A set of users which may be applied and/or used by various modules
+# when a 'default' entry is found it will reference the 'default_user'
+# from the distro configuration specified below
+users:
+ - default
+
+# If this is set, 'root' will not be able to ssh in and they
+# will get a message to login instead as the above $user (ubuntu)
+disable_root: true
+ssh_pwauth: false
+
+# This will cause the set+update hostname module to not operate (if true)
+# preserve_hostname: false
+
+syslog_fix_perms: root:root
+
+ssh_deletekeys: false
+ssh_genkeytypes: [rsa, dsa]
+
+cloud_init_modules:
+ - seed_random
+ - bootcmd
+ - write-files
+ - growpart
+ - resizefs
+ - set_hostname
+ - update_hostname
+ - update_etc_hosts
+ - ca-certs
+ - users-groups
+ - ssh
+
+cloud_config_modules:
+ - disk_setup
+ - mounts
+ - ssh-import-id
+ - set-passwords
+ - timezone
+ - puppet
+ - chef
+ - salt-minion
+ - mcollective
+ - disable-ec2-metadata
+ - runcmd
+
+cloud_final_modules:
+ - scripts-vendor
+ - scripts-per-once
+ - scripts-per-boot
+ - scripts-per-instance
+ - scripts-user
+ - ssh-authkey-fingerprints
+ - keys-to-console
+ - phone-home
+ - final-message
+ - power-state-change
+
+# System and/or distro specific settings
+# (not accessible to handlers/transforms)
+system_info:
+ # This will affect which distro class gets used
+ distro: gentoo
+ # Default user name + that default users groups (if added/used)
+ default_user:
+ name: gentoo
+ lock_passwd: True
+ gecos: Gentoo
+ groups: [users, wheel]
+ primary_group: users
+ no-user-group: true
+ sudo: ["ALL=(ALL) NOPASSWD:ALL"]
+ shell: /bin/bash
+ # Other config here will be given to the distro class and/or path classes
+ paths:
+ cloud_dir: /var/lib/cloud/
+ templates_dir: /etc/cloud/templates/
diff --git a/app-emulation/cloud-init/files/hosts.gentoo.tmpl b/app-emulation/cloud-init/files/hosts.gentoo.tmpl
new file mode 100644
index 000000000000..bc0bca47c5ce
--- /dev/null
+++ b/app-emulation/cloud-init/files/hosts.gentoo.tmpl
@@ -0,0 +1,23 @@
+## 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: template
+-#}
+# Your system has configured 'manage_etc_hosts' as 'template'.
+# 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 \ No newline at end of file
diff --git a/app-emulation/cloud-init/metadata.xml b/app-emulation/cloud-init/metadata.xml
new file mode 100644
index 000000000000..0516fdb4ff99
--- /dev/null
+++ b/app-emulation/cloud-init/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>prometheanfire@gentoo.org</email>
+ <name>Matthew Thode</name>
+ </maintainer>
+ <longdescription lang="en">
+ Package provides configuration and customization of cloud instance.
+ </longdescription>
+ <upstream>
+ <remote-id type="launchpad">cloud-init</remote-id>
+ </upstream>
+</pkgmetadata>