diff options
Diffstat (limited to 'app-emulation/cloud-init')
-rw-r--r-- | app-emulation/cloud-init/Manifest | 1 | ||||
-rw-r--r-- | app-emulation/cloud-init/cloud-init-0.7.7.ebuild | 86 | ||||
-rw-r--r-- | app-emulation/cloud-init/files/cloud-init-0.7.7-gentooinit.patch | 34 |
3 files changed, 121 insertions, 0 deletions
diff --git a/app-emulation/cloud-init/Manifest b/app-emulation/cloud-init/Manifest index 6a04d99d22f2..343c26896e8e 100644 --- a/app-emulation/cloud-init/Manifest +++ b/app-emulation/cloud-init/Manifest @@ -1,2 +1,3 @@ DIST cloud-init-0.7.6.tar.gz 515670 SHA256 9e8fd22eb7f6e40ae6a5f66173ddc3cc18f65ee406c460a728092b37db2f3ed7 SHA512 aa2397328afda8e77ed6d642e7642f41a4b4b5bcd3d0e87056aa8c88b56624ec65c57cfc66b0d13ccc235f1840baf1d577316974902a0439cf2f2eb0f8eef36d WHIRLPOOL 639a556e51b4b4b180951f9e481f9a0dcd45067d1d5760ce7e871ceea8bbb4e195258d96273d3ef88c7e2f2520318e9172c3ad0cb23d6ad0ae1835e17087e3a5 DIST cloud-init-0.7.6_p1212.tar.gz 451717 SHA256 d213ee72a62cef5ef63369737a52c0ce0c2034ca1ae230925b6679f4335e685d SHA512 25c5d1cc7c8fa887859624b4f28416d455063c278e3f00bfb3561ab0c99aa708d9fa431ff17c42994aba43eb985538982e5175bf0531857cc18fd8e724ef1fd3 WHIRLPOOL d6608c750370fd470d6aae0e88125e9e56b424c40a5b1131b610cb675808b1f7e0657169273db29c4e994d3dce12f6076566eccbac6deee8c4277ffd33ceae38 +DIST cloud-init-0.7.7.tar.gz 477287 SHA256 d7b75e314ecdb99619014f21f3b622294a6c3bde248887dfb5e9cedb927ad0b0 SHA512 06cd2bba67da9668204416073af771145668db43777d6f183dcb54e8e1d9d12471fe3bfc99dfbc03a81814c5614347ff7d6acc5dbe117e1206d7fc2041ae4b62 WHIRLPOOL 9fccfba02aacc138dc62a6be9547fa1e5bd6959a96eef9b7f6f1ac86112049b36751882d954ac0e8d7aa5bf9580c5e27ec9abfdc2ef542628af448c00c468a09 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..1453bb7303fc --- /dev/null +++ b/app-emulation/cloud-init/cloud-init-0.7.7.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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 http://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() { + 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.7-gentooinit.patch b/app-emulation/cloud-init/files/cloud-init-0.7.7-gentooinit.patch new file mode 100644 index 000000000000..83788109b89c --- /dev/null +++ b/app-emulation/cloud-init/files/cloud-init-0.7.7-gentooinit.patch @@ -0,0 +1,34 @@ +diff --git a/setup.py b/setup.py +index 4abbb67..4885cb5 100755 +--- a/setup.py ++++ b/setup.py +@@ -1,3 +1,4 @@ ++#!/usr/bin/env python + # vi: ts=4 expandtab + # + # Distutils magic for ec2-init +@@ -74,6 +75,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 +85,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'), +@@ -203,7 +206,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, |