diff options
Diffstat (limited to 'app-emulation/cloud-init/cloud-init-9999.ebuild')
-rw-r--r-- | app-emulation/cloud-init/cloud-init-9999.ebuild | 70 |
1 files changed, 38 insertions, 32 deletions
diff --git a/app-emulation/cloud-init/cloud-init-9999.ebuild b/app-emulation/cloud-init/cloud-init-9999.ebuild index b5415723a60e..7bb69ee6336a 100644 --- a/app-emulation/cloud-init/cloud-init-9999.ebuild +++ b/app-emulation/cloud-init/cloud-init-9999.ebuild @@ -1,19 +1,29 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 -PYTHON_COMPAT=( python2_7 python3_5 python3_6 ) +EAPI=8 -inherit distutils-r1 git-r3 +# Disabled for now: bug #850628 +#DISTUTILS_USE_PEP517=setuptools +# https://bugs.launchpad.net/cloud-init/+bug/1978328 +PYTHON_COMPAT=( python3_10 python3_11 python3_12 ) + +inherit distutils-r1 udev + +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" -EGIT_REPO_URI="https://git.launchpad.net/cloud-init" LICENSE="GPL-3" SLOT="0" -KEYWORDS="" -IUSE="test" +IUSE="selinux" CDEPEND=" dev-python/jinja[${PYTHON_USEDEP}] @@ -24,18 +34,16 @@ CDEPEND=" dev-python/requests[${PYTHON_USEDEP}] dev-python/jsonpatch[${PYTHON_USEDEP}] dev-python/jsonschema[${PYTHON_USEDEP}] - dev-python/six[${PYTHON_USEDEP}] + dev-python/netifaces[${PYTHON_USEDEP}] " -DEPEND=" - dev-python/setuptools[${PYTHON_USEDEP}] +BDEPEND=" + ${CDEPEND} 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}] + dev-python/passlib[${PYTHON_USEDEP}] + dev-python/pytest-mock[${PYTHON_USEDEP}] + dev-python/responses[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}] ) " RDEPEND=" @@ -44,28 +52,20 @@ RDEPEND=" sys-apps/iproute2 sys-fs/growpart virtual/logger + selinux? ( sec-policy/selinux-cloudinit ) " -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}-18.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 -) +distutils_enable_tests pytest 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 + if [[ ${PV} == *9999 ]] ; then + sed -i 's/version=get_version(),/version=9999,/g' setup.py || die + fi + + distutils-r1_python_prepare_all } python_install() { @@ -78,10 +78,16 @@ python_install_all() { distutils-r1_python_install_all # installs as non-executable - chmod +x "${D}"/etc/init.d/* + chmod +x "${D}"/etc/init.d/* || die +} + +pkg_prerm() { + udev_reload } pkg_postinst() { + udev_reload + 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" |