diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2016-04-25 16:03:09 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2016-04-25 16:17:19 -0700 |
commit | ed5ad859b368e86d00025c26556b12d31e8b7f0d (patch) | |
tree | 9f61b10d64f93a4ee62c0c6dc62275a4d360848d /app-emulation | |
parent | dev-ruby/rbtree: Remove ruby19 (diff) | |
download | gentoo-ed5ad859b368e86d00025c26556b12d31e8b7f0d.tar.gz gentoo-ed5ad859b368e86d00025c26556b12d31e8b7f0d.tar.bz2 gentoo-ed5ad859b368e86d00025c26556b12d31e8b7f0d.zip |
app-emulation/cloud-init: version bump to upstream snapshot release, improve install script.
Package-Manager: portage-2.2.28
Diffstat (limited to 'app-emulation')
5 files changed, 240 insertions, 0 deletions
diff --git a/app-emulation/cloud-init/Manifest b/app-emulation/cloud-init/Manifest index 4f0a651c4e5d..6a04d99d22f2 100644 --- a/app-emulation/cloud-init/Manifest +++ b/app-emulation/cloud-init/Manifest @@ -1 +1,2 @@ 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 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..495d67be422f --- /dev/null +++ b/app-emulation/cloud-init/cloud-init-0.7.6-r2.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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.ebuild b/app-emulation/cloud-init/cloud-init-0.7.6_p1212.ebuild new file mode 100644 index 000000000000..9c9d0814657c --- /dev/null +++ b/app-emulation/cloud-init/cloud-init-0.7.6_p1212.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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 + SRC_URI="http://bazaar.launchpad.net/~${PN}-dev/${PN}/trunk/tarball/${PV/*_p} -> ${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/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', |