summaryrefslogtreecommitdiff
path: root/app-emulation/cloud-init/cloud-init-9999.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-10-27 12:48:57 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-10-27 12:48:57 +0100
commit70b82ae359a5538711e103b0e8dfb92654296644 (patch)
tree8412b84ff9ce02a22be5251052b00feefe1d5b70 /app-emulation/cloud-init/cloud-init-9999.ebuild
parent64e107b9b6058580ff0432107eb37cefb0b2a7d8 (diff)
gentoo resync : 27.10.2018
Diffstat (limited to 'app-emulation/cloud-init/cloud-init-9999.ebuild')
-rw-r--r--app-emulation/cloud-init/cloud-init-9999.ebuild58
1 files changed, 28 insertions, 30 deletions
diff --git a/app-emulation/cloud-init/cloud-init-9999.ebuild b/app-emulation/cloud-init/cloud-init-9999.ebuild
index 4072bd36f068..0b0b7bcaac95 100644
--- a/app-emulation/cloud-init/cloud-init-9999.ebuild
+++ b/app-emulation/cloud-init/cloud-init-9999.ebuild
@@ -1,12 +1,12 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
-PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+PYTHON_COMPAT=( python2_7 python3_4 python3_5 python3_6 )
-inherit distutils-r1 eutils git-r3 multilib systemd
+inherit distutils-r1 git-r3
-DESCRIPTION="cloud initialisation magic"
+DESCRIPTION="Cloud instance initialisation magic"
HOMEPAGE="https://launchpad.net/cloud-init"
EGIT_REPO_URI="https://git.launchpad.net/cloud-init"
@@ -16,15 +16,15 @@ 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/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}]
@@ -34,33 +34,37 @@ DEPEND="
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}]
+ dev-python/coverage[${PYTHON_USEDEP}]
+ dev-python/contextlib2[${PYTHON_USEDEP}]
)
"
RDEPEND="
${CDEPEND}
+ net-analyzer/macchanger
sys-apps/iproute2
sys-fs/growpart
virtual/logger
"
-PATCHES=( "${FILESDIR}/cloud-init-0.7.8-gentooinit.patch" )
+PATCHES=(
+ "${FILESDIR}"/${PN}-18.4-fix-packages-module.patch
+ "${FILESDIR}"/${PN}-18.4-gentoo-support-upstream-templates.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
- sed -i '/^argparse/d' requirements.txt || die
- sed -i '/^hacking/d' test-requirements.txt || die
distutils-r1_python_prepare_all
}
python_test() {
- emake 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"
+ distutils-r1_python_install --init-system=sysvinit_openrc,systemd --distro gentoo
}
python_install_all() {
@@ -68,19 +72,13 @@ python_install_all() {
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"
+ # installs as non-executable
+ chmod +x "${D}"/etc/init.d/*
+}
- 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."
}