* [gentoo-commits] repo/gentoo:master commit in: app-emulation/cloud-init/, app-emulation/cloud-init/files/
@ 2016-01-31 23:39 Matt Thode
0 siblings, 0 replies; 8+ messages in thread
From: Matt Thode @ 2016-01-31 23:39 UTC (permalink / raw
To: gentoo-commits
commit: 03cde2b911bc4aee23bd284a93cfc96021ef4650
Author: Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 31 23:37:05 2016 +0000
Commit: Matt Thode <prometheanfire <AT> gentoo <DOT> org>
CommitDate: Sun Jan 31 23:38:58 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03cde2b9
app-emulation/cloud-init: split out growpart
Package-Manager: portage-2.2.26
app-emulation/cloud-init/Manifest | 1 -
.../cloud-init/cloud-init-0.7.5-r1.ebuild | 52 --
.../cloud-init/cloud-init-0.7.5-r2.ebuild | 84 ---
.../cloud-init/cloud-init-0.7.5-r3.ebuild | 88 ---
.../cloud-init/cloud-init-0.7.6-r1.ebuild | 6 +-
app-emulation/cloud-init/cloud-init-0.7.6.ebuild | 98 ---
.../files/cloud-init-0.7.5-tests-exclude.patch | 12 -
app-emulation/cloud-init/files/growpart | 778 ---------------------
8 files changed, 2 insertions(+), 1117 deletions(-)
diff --git a/app-emulation/cloud-init/Manifest b/app-emulation/cloud-init/Manifest
index 93c02cd..4f0a651 100644
--- a/app-emulation/cloud-init/Manifest
+++ b/app-emulation/cloud-init/Manifest
@@ -1,2 +1 @@
-DIST cloud-init-0.7.5.tar.gz 503717 SHA256 a92bb83809c139a7db378916414c18b0819e306852d6c60dd89388868857ed33 SHA512 79e1e4a9e1130a3a9deb0482278215baf5ed41e02beebed0a2c6fac4e215340a9537158bd259758a2e074f334c0c0b9e7b936c23eeb9c848c67f7e7835cf0f5d WHIRLPOOL 7d92a0e1b6a3faf550bc442b02c117280c47d160e7e318d9fb859d6d8b59a0ef947d057dfb615bd925420a25ca28852742ee87ffd6066664faf640ca53a13073
DIST cloud-init-0.7.6.tar.gz 515670 SHA256 9e8fd22eb7f6e40ae6a5f66173ddc3cc18f65ee406c460a728092b37db2f3ed7 SHA512 aa2397328afda8e77ed6d642e7642f41a4b4b5bcd3d0e87056aa8c88b56624ec65c57cfc66b0d13ccc235f1840baf1d577316974902a0439cf2f2eb0f8eef36d WHIRLPOOL 639a556e51b4b4b180951f9e481f9a0dcd45067d1d5760ce7e871ceea8bbb4e195258d96273d3ef88c7e2f2520318e9172c3ad0cb23d6ad0ae1835e17087e3a5
diff --git a/app-emulation/cloud-init/cloud-init-0.7.5-r1.ebuild b/app-emulation/cloud-init/cloud-init-0.7.5-r1.ebuild
deleted file mode 100644
index a01d1dc..0000000
--- a/app-emulation/cloud-init/cloud-init-0.7.5-r1.ebuild
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-PYTHON_COMPAT=( python2_7 )
-
-inherit distutils-r1 eutils multilib
-
-DESCRIPTION="Package provides configuration and customization of cloud instance"
-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"
-
-RDEPEND="dev-python/cheetah[${PYTHON_USEDEP}]
- >=dev-python/prettytable-0.7.1[${PYTHON_USEDEP}]
- dev-python/oauth[${PYTHON_USEDEP}]
- dev-python/pyserial[${PYTHON_USEDEP}]
- dev-python/configobj[${PYTHON_USEDEP}]
- dev-python/pyyaml[${PYTHON_USEDEP}]
- dev-python/requests[${PYTHON_USEDEP}]
- dev-python/jsonpatch[${PYTHON_USEDEP}]"
-DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
- test? ( ${RDEPEND}
- sys-apps/iproute2 )"
-
-PATCHES=( "${FILESDIR}"/${P}-tests-exclude.patch )
-
-#python_prepare_all() {
-# distutils-r_python_prepare_all
-#}
-
-python_test() {
- # These tests are not broken but expect to locate an installed exe file
- # other than where a gentoo system installs it; (/bin/ip sought in /sbin)
- # See cloudinit/sources/DataSourceOpenNebula.py for possible patching
- sed -e 's:test_hostname:_&:' \
- -e 's:test_network_interfaces:_&:' \
- -i tests/unittests/test_datasource/test_opennebula.py
- emake test
-}
-
-python_install() {
- distutils-r1_python_install
- for svc in config final init init-local; do
- newinitd "${WORKDIR}/${P}/sysvinit/gentoo/cloud-${svc}" "cloud-${svc}"
- done
-}
diff --git a/app-emulation/cloud-init/cloud-init-0.7.5-r2.ebuild b/app-emulation/cloud-init/cloud-init-0.7.5-r2.ebuild
deleted file mode 100644
index d53ccc6..0000000
--- a/app-emulation/cloud-init/cloud-init-0.7.5-r2.ebuild
+++ /dev/null
@@ -1,84 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-PYTHON_COMPAT=( python2_7 )
-DISTUTILS_SINGLE_IMPL=TRUE
-
-inherit distutils-r1 eutils multilib systemd
-
-DESCRIPTION="Cloud instance initialization"
-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/jsonpatch[${PYTHON_USEDEP}]
- dev-python/oauth[${PYTHON_USEDEP}]
- >=dev-python/prettytable-0.7.1[${PYTHON_USEDEP}]
- dev-python/pyserial[${PYTHON_USEDEP}]
- dev-python/pyyaml[${PYTHON_USEDEP}]
- dev-python/requests[${PYTHON_USEDEP}]
-"
-DEPEND="
- test? (
- ${CDEPEND}
- >=dev-python/httpretty-0.7.1[${PYTHON_USEDEP}]
- dev-python/mocker[${PYTHON_USEDEP}]
- dev-python/nose[${PYTHON_USEDEP}]
- dev-python/pep8[${PYTHON_USEDEP}]
- dev-python/pyflakes[${PYTHON_USEDEP}]
- dev-python/pylint[${PYTHON_USEDEP}]
- sys-apps/iproute2
- )
-"
-RDEPEND="
- ${CDEPEND}
- virtual/logger
-"
-
-python_prepare_all() {
- local PATCHES=(
- "${FILESDIR}"/${P}-tests-exclude.patch
- )
-
- distutils-r1_python_prepare_all
-
- # Skip SmartOS tests since they don't generally apply and don't skip based
- # on environment. Documented in bug #511384.
- rm tests/unittests/test_datasource/test_smartos.py
-}
-
-python_test() {
- # These tests are not broken but expect to locate an installed exe file
- # other than where a gentoo system installs it; (/bin/ip sought in /sbin)
- # See cloudinit/sources/DataSourceOpenNebula.py for possible patching
- sed \
- -e 's:test_hostname:_&:' \
- -e 's:test_network_interfaces:_&:' \
- -i tests/unittests/test_datasource/test_opennebula.py
-
- emake test
-}
-
-python_install_all() {
- 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
-
- 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.5-r3.ebuild b/app-emulation/cloud-init/cloud-init-0.7.5-r3.ebuild
deleted file mode 100644
index c0861d4..0000000
--- a/app-emulation/cloud-init/cloud-init-0.7.5-r3.ebuild
+++ /dev/null
@@ -1,88 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-PYTHON_COMPAT=( python2_7 )
-DISTUTILS_SINGLE_IMPL=TRUE
-
-inherit distutils-r1 eutils multilib systemd
-
-DESCRIPTION="Cloud instance initialization"
-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/jsonpatch[${PYTHON_USEDEP}]
- dev-python/oauth[${PYTHON_USEDEP}]
- >=dev-python/prettytable-0.7.1[${PYTHON_USEDEP}]
- dev-python/pyserial[${PYTHON_USEDEP}]
- dev-python/pyyaml[${PYTHON_USEDEP}]
- dev-python/requests[${PYTHON_USEDEP}]
-"
-DEPEND="
- test? (
- ${CDEPEND}
- >=dev-python/httpretty-0.7.1[${PYTHON_USEDEP}]
- dev-python/mocker[${PYTHON_USEDEP}]
- dev-python/nose[${PYTHON_USEDEP}]
- dev-python/pep8[${PYTHON_USEDEP}]
- dev-python/pyflakes[${PYTHON_USEDEP}]
- dev-python/pylint[${PYTHON_USEDEP}]
- sys-apps/iproute2
- )
-"
-RDEPEND="
- ${CDEPEND}
- virtual/logger
-"
-
-python_prepare_all() {
- local PATCHES=(
- "${FILESDIR}"/${P}-tests-exclude.patch
- )
-
- distutils-r1_python_prepare_all
-
- # Skip SmartOS tests since they don't generally apply and don't skip based
- # on environment. Documented in bug #511384.
- rm tests/unittests/test_datasource/test_smartos.py
-}
-
-python_test() {
- # These tests are not broken but expect to locate an installed exe file
- # other than where a gentoo system installs it; (/bin/ip sought in /sbin)
- # See cloudinit/sources/DataSourceOpenNebula.py for possible patching
- sed \
- -e 's:test_hostname:_&:' \
- -e 's:test_network_interfaces:_&:' \
- -i tests/unittests/test_datasource/test_opennebula.py
-
- emake test
-}
-
-python_install_all() {
- 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
-
- 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
-
- rm /etc/cloud/cloud.cfg
- insinto /etc/cloud
- doins "${FILESDIR}/cloud.cfg"
-}
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
index 4ba95f2..9c1c7ea 100644
--- a/app-emulation/cloud-init/cloud-init-0.7.6-r1.ebuild
+++ b/app-emulation/cloud-init/cloud-init-0.7.6-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -41,7 +41,7 @@ DEPEND="
"
RDEPEND="
${CDEPEND}
- sys-apps/gptfdisk
+ sys-fs/growpart
virtual/logger
"
@@ -92,8 +92,6 @@ python_install_all() {
doinitd "${S}"/sysvinit/gentoo/cloud-init-local
insinto /etc/cloud/templates
doins "${FILESDIR}/hosts.gentoo.tmpl"
- exeinto /usr/bin
- doexe "${FILESDIR}/growpart"
insinto /etc/cloud
doins "${FILESDIR}/cloud.cfg"
diff --git a/app-emulation/cloud-init/cloud-init-0.7.6.ebuild b/app-emulation/cloud-init/cloud-init-0.7.6.ebuild
deleted file mode 100644
index b35adae..0000000
--- a/app-emulation/cloud-init/cloud-init-0.7.6.ebuild
+++ /dev/null
@@ -1,98 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-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}
- 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
-
- 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.5-tests-exclude.patch b/app-emulation/cloud-init/files/cloud-init-0.7.5-tests-exclude.patch
deleted file mode 100644
index 225f1a1..0000000
--- a/app-emulation/cloud-init/files/cloud-init-0.7.5-tests-exclude.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur cloud-init-0.7.5.orig/setup.py cloud-init-0.7.5/setup.py
---- setup.py 2014-04-02 02:26:07.000000000 +0800
-+++ setup.py 2014-05-01 23:38:15.848225975 +0800
-@@ -114,7 +114,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',
- ],
diff --git a/app-emulation/cloud-init/files/growpart b/app-emulation/cloud-init/files/growpart
deleted file mode 100644
index 4b67d8b..0000000
--- a/app-emulation/cloud-init/files/growpart
+++ /dev/null
@@ -1,778 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2011 Canonical Ltd.
-# Copyright (C) 2013 Hewlett-Packard Development Company, L.P.
-#
-# Authors: Scott Moser <smoser@canonical.com>
-# Juerg Haefliger <juerg.haefliger@hp.com>
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, version 3 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# the fudge factor. if within this many bytes dont bother
-FUDGE=${GROWPART_FUDGE:-$((1024*1024))}
-TEMP_D=""
-RESTORE_FUNC=""
-RESTORE_HUMAN=""
-VERBOSITY=0
-DISK=""
-PART=""
-PT_UPDATE=false
-DRY_RUN=0
-
-SFDISK_VERSION=""
-SFDISK_2_26="22600"
-MBR_BACKUP=""
-GPT_BACKUP=""
-_capture=""
-
-error() {
- echo "$@" 1>&2
-}
-
-fail() {
- [ $# -eq 0 ] || echo "FAILED:" "$@"
- exit 2
-}
-
-nochange() {
- echo "NOCHANGE:" "$@"
- exit 1
-}
-
-changed() {
- echo "CHANGED:" "$@"
- exit 0
-}
-
-change() {
- echo "CHANGE:" "$@"
- exit 0
-}
-
-cleanup() {
- if [ -n "${RESTORE_FUNC}" ]; then
- error "***** WARNING: Resize failed, attempting to revert ******"
- if ${RESTORE_FUNC} ; then
- error "***** Appears to have gone OK ****"
- else
- error "***** FAILED! ******"
- if [ -n "${RESTORE_HUMAN}" -a -f "${RESTORE_HUMAN}" ]; then
- error "**** original table looked like: ****"
- cat "${RESTORE_HUMAN}" 1>&2
- else
- error "We seem to have not saved the partition table!"
- fi
- fi
- fi
- [ -z "${TEMP_D}" -o ! -d "${TEMP_D}" ] || rm -Rf "${TEMP_D}"
-}
-
-debug() {
- local level=${1}
- shift
- [ "${level}" -gt "${VERBOSITY}" ] && return
- if [ "${DEBUG_LOG}" ]; then
- echo "$@" >>"${DEBUG_LOG}"
- else
- error "$@"
- fi
-}
-
-debugcat() {
- local level="$1"
- shift;
- [ "${level}" -gt "$VERBOSITY" ] && return
- if [ "${DEBUG_LOG}" ]; then
- cat "$@" >>"${DEBUG_LOG}"
- else
- cat "$@" 1>&2
- fi
-}
-
-mktemp_d() {
- # just a mktemp -d that doens't need mktemp if its not there.
- _RET=$(mktemp -d "${TMPDIR:-/tmp}/${0##*/}.XXXXXX" 2>/dev/null) &&
- return
- _RET=$(umask 077 && t="${TMPDIR:-/tmp}/${0##*/}.$$" &&
- mkdir "${t}" && echo "${t}")
- return
-}
-
-Usage() {
- cat <<EOF
-${0##*/} disk partition
- rewrite partition table so that partition takes up all the space it can
- options:
- -h | --help print Usage and exit
- --fudge F if part could be resized, but change would be
- less than 'F' bytes, do not resize (default: ${FUDGE})
- -N | --dry-run only report what would be done, show new 'sfdisk -d'
- -v | --verbose increase verbosity / debug
- -u | --update R update the the kernel partition table info after growing
- this requires kernel support and 'partx --update'
- R is one of:
- - 'auto' : [default] update partition if possible
- - 'force' : try despite sanity checks (fail on failure)
- - 'off' : do not attempt
- - 'on' : fail if sanity checks indicate no support
-
- Example:
- - ${0##*/} /dev/sda 1
- Resize partition 1 on /dev/sda
-EOF
-}
-
-bad_Usage() {
- Usage 1>&2
- error "$@"
- exit 2
-}
-
-sfdisk_restore_legacy() {
- sfdisk --no-reread "${DISK}" -I "${MBR_BACKUP}"
-}
-
-sfdisk_restore() {
- # files are named: sfdisk-<device>-<offset>.bak
- local f="" offset="" fails=0
- for f in "${MBR_BACKUP}"*.bak; do
- [ -f "$f" ] || continue
- offset=${f##*-}
- offset=${offset%.bak}
- [ "$offset" = "$f" ] && {
- error "WARN: confused by file $f";
- continue;
- }
- dd "if=$f" "of=${DISK}" seek=$(($offset)) bs=1 conv=notrunc ||
- { error "WARN: failed restore from $f"; fails=$(($fails+1)); }
- done
- return $fails
-}
-
-sfdisk_worked_but_blkrrpart_failed() {
- local ret="$1" output="$2"
- # exit code found was just 1, but dont insist on that
- #[ $ret -eq 1 ] || return 1
- # Successfully wrote the new partition table
- grep -qi "Success.* wrote.* new.* partition" "$output" &&
- grep -qi "BLKRRPART: Device or resource busy" "$output"
- return
-}
-
-get_sfdisk_version() {
- # set SFDISK_VERSION to MAJOR*10000+MINOR*100+MICRO
- local out oifs="$IFS" ver=""
- [ -n "$SFDISK_VERSION" ] && return 0
- # expected output: sfdisk from util-linux 2.25.2
- out=$(sfdisk --version) ||
- { error "failed to get sfdisk version"; return 1; }
- set -- $out
- ver=$4
- case "$ver" in
- [0-9]*.[0-9]*.[0-9]|[0-9].[0-9]*)
- IFS="."; set -- $ver; IFS="$oifs"
- SFDISK_VERSION=$(($1*10000+$2*100+${3:-0}))
- return 0;;
- *) error "unexpected output in sfdisk --version [$out]"
- return 1;;
- esac
-}
-
-resize_sfdisk() {
- local humanpt="${TEMP_D}/recovery"
- local mbr_backup="${TEMP_D}/orig.save"
- local restore_func=""
- local format="$1"
-
- local change_out=${TEMP_D}/change.out
- local dump_out=${TEMP_D}/dump.out
- local new_out=${TEMP_D}/new.out
- local dump_mod=${TEMP_D}/dump.mod
- local tmp="${TEMP_D}/tmp.out"
- local err="${TEMP_D}/err.out"
- local mbr_max_512="4294967296"
-
- local pt_start pt_size pt_end max_end new_size change_info dpart
- local sector_num sector_size disk_size tot out
-
- rqe sfd_list sfdisk --list --unit=S "$DISK" >"$tmp" ||
- fail "failed: sfdisk --list $DISK"
- if [ "${SFDISK_VERSION}" -lt ${SFDISK_2_26} ]; then
- # exected output contains: Units: sectors of 512 bytes, ...
- out=$(awk '$1 == "Units:" && $5 ~ /bytes/ { print $4 }' "$tmp") ||
- fail "failed to read sfdisk output"
- if [ -z "$out" ]; then
- error "WARN: sector size not found in sfdisk output, assuming 512"
- sector_size=512
- else
- sector_size="$out"
- fi
- local _w _cyl _w1 _heads _w2 sectors _w3 t s
- # show-size is in units of 1024 bytes (same as /proc/partitions)
- t=$(sfdisk --show-size "${DISK}") ||
- fail "failed: sfdisk --show-size $DISK"
- disk_size=$((t*1024))
- sector_num=$(($disk_size/$sector_size))
- msg="disk size '$disk_size' not evenly div by sector size '$sector_size'"
- [ "$((${disk_size}%${sector_size}))" -eq 0 ] ||
- error "WARN: $msg"
- restore_func=sfdisk_restore_legacy
- else
- # --list first line output:
- # Disk /dev/vda: 20 GiB, 21474836480 bytes, 41943040 sectors
- local _x
- read _x _x _x _x disk_size _x sector_num _x < "$tmp"
- sector_size=$((disk_size/$sector_num))
- restore_func=sfdisk_restore
- fi
-
- debug 1 "$sector_num sectors of $sector_size. total size=${disk_size} bytes"
- [ $(($disk_size/512)) -gt $mbr_max_512 ] &&
- debug 1 "WARN: disk is larger than 2TB. additional space will go unused."
-
- rqe sfd_dump sfdisk --unit=S --dump "${DISK}" >"${dump_out}" ||
- fail "failed to dump sfdisk info for ${DISK}"
- RESTORE_HUMAN="$dump_out"
-
- {
- echo "## sfdisk --unit=S --dump ${DISK}"
- cat "${dump_out}"
- } >"$humanpt"
-
- [ $? -eq 0 ] || fail "failed to save sfdisk -d output"
- RESTORE_HUMAN="$humanpt"
-
- debugcat 1 "$humanpt"
-
- sed -e 's/,//g; s/start=/start /; s/size=/size /' "${dump_out}" \
- >"${dump_mod}" ||
- fail "sed failed on dump output"
-
- dpart="${DISK}${PART}" # disk and partition number
- if [ -b "${DISK}p${PART}" -a "${DISK%[0-9]}" != "${DISK}" ]; then
- # for block devices that end in a number (/dev/nbd0)
- # the partition is "<name>p<partition_number>" (/dev/nbd0p1)
- dpart="${DISK}p${PART}"
- elif [ "${DISK#/dev/loop[0-9]}" != "${DISK}" ]; then
- # for /dev/loop devices, sfdisk output will be <name>p<number>
- # format also, even though there is not a device there.
- dpart="${DISK}p${PART}"
- fi
-
- pt_start=$(awk '$1 == pt { print $4 }' "pt=${dpart}" <"${dump_mod}") &&
- pt_size=$(awk '$1 == pt { print $6 }' "pt=${dpart}" <"${dump_mod}") &&
- [ -n "${pt_start}" -a -n "${pt_size}" ] &&
- pt_end=$((${pt_size}+${pt_start})) ||
- fail "failed to get start and end for ${dpart} in ${DISK}"
-
- # find the minimal starting location that is >= pt_end
- max_end=$(awk '$3 == "start" { if($4 >= pt_end && $4 < min)
- { min = $4 } } END { printf("%s\n",min); }' \
- min=${sector_num} pt_end=${pt_end} "${dump_mod}") &&
- [ -n "${max_end}" ] ||
- fail "failed to get max_end for partition ${PART}"
-
- mbr_max_sectors=$((mbr_max_512*$((sector_size/512))))
- if [ "$max_end" -gt "$mbr_max_sectors" ]; then
- max_end=$mbr_max_sectors
- fi
-
- if [ "$format" = "gpt" ]; then
- # sfdisk respects 'last-lba' in input, and complains about
- # partitions that go past that. without it, it does the right thing.
- sed -i '/^last-lba:/d' "$dump_out" ||
- fail "failed to remove last-lba from output"
- fi
-
- local gpt_second_size="33"
- if [ "${max_end}" -gt "$((${sector_num}-${gpt_second_size}))" ]; then
- # if mbr allow subsequent conversion to gpt without shrinking the
- # partition. safety net at cost of 33 sectors, seems reasonable.
- # if gpt, we can't write there anyway.
- debug 1 "padding ${gpt_second_size} sectors for gpt secondary header"
- max_end=$((${sector_num}-${gpt_second_size}))
- fi
-
- debug 1 "max_end=${max_end} tot=${sector_num} pt_end=${pt_end}" \
- "pt_start=${pt_start} pt_size=${pt_size}"
- [ $((${pt_end})) -eq ${max_end} ] &&
- nochange "partition ${PART} is size ${pt_size}. it cannot be grown"
- [ $((${pt_end}+(${FUDGE}/$sector_size))) -gt ${max_end} ] &&
- nochange "partition ${PART} could only be grown by" \
- "$((${max_end}-${pt_end})) [fudge=$((${FUDGE}/$sector_size))]"
-
- # now, change the size for this partition in ${dump_out} to be the
- # new size
- new_size=$((${max_end}-${pt_start}))
- sed "\|^\s*${dpart} |s/${pt_size},/${new_size},/" "${dump_out}" \
- >"${new_out}" ||
- fail "failed to change size in output"
-
- change_info="partition=${PART} start=${pt_start} old: size=${pt_size} end=${pt_end} new: size=${new_size},end=${max_end}"
- if [ ${DRY_RUN} -ne 0 ]; then
- echo "CHANGE: ${change_info}"
- {
- echo "# === old sfdisk -d ==="
- cat "${dump_out}"
- echo "# === new sfdisk -d ==="
- cat "${new_out}"
- } 1>&2
- exit 0
- fi
-
- MBR_BACKUP="${mbr_backup}"
- LANG=C sfdisk --no-reread "${DISK}" --force \
- -O "${mbr_backup}" <"${new_out}" >"${change_out}" 2>&1
- ret=$?
- [ $ret -eq 0 ] || RESTORE_FUNC="${restore_func}"
-
- if [ $ret -eq 0 ]; then
- :
- elif $PT_UPDATE &&
- sfdisk_worked_but_blkrrpart_failed "$ret" "${change_out}"; then
- # if the command failed, but it looks like only because
- # the device was busy and we have pt_update, then go on
- debug 1 "sfdisk failed, but likely only because of blkrrpart"
- else
- error "attempt to resize ${DISK} failed. sfdisk output below:"
- sed 's,^,| ,' "${change_out}" 1>&2
- fail "failed to resize"
- fi
-
- rq pt_update pt_update "$DISK" "$PART" ||
- fail "pt_resize failed"
-
- RESTORE_FUNC=""
-
- changed "${change_info}"
-
- # dump_out looks something like:
- ## partition table of /tmp/out.img
- #unit: sectors
- #
- #/tmp/out.img1 : start= 1, size= 48194, Id=83
- #/tmp/out.img2 : start= 48195, size= 963900, Id=83
- #/tmp/out.img3 : start= 1012095, size= 305235, Id=82
- #/tmp/out.img4 : start= 1317330, size= 771120, Id= 5
- #/tmp/out.img5 : start= 1317331, size= 642599, Id=83
- #/tmp/out.img6 : start= 1959931, size= 48194, Id=83
- #/tmp/out.img7 : start= 2008126, size= 80324, Id=83
-}
-
-gpt_restore() {
- sgdisk -l "${GPT_BACKUP}" "${DISK}"
-}
-
-resize_sgdisk() {
- GPT_BACKUP="${TEMP_D}/pt.backup"
-
- local pt_info="${TEMP_D}/pt.info"
- local pt_pretend="${TEMP_D}/pt.pretend"
- local pt_data="${TEMP_D}/pt.data"
- local out="${TEMP_D}/out"
-
- local dev="disk=${DISK} partition=${PART}"
-
- local pt_start pt_end pt_size last pt_max code guid name new_size
- local old new change_info sector_size
-
- # Dump the original partition information and details to disk. This is
- # used in case something goes wrong and human interaction is required
- # to revert any changes.
- rqe sgd_info sgdisk "--info=${PART}" --print "${DISK}" >"${pt_info}" ||
- fail "${dev}: failed to dump original sgdisk info"
- RESTORE_HUMAN="${pt_info}"
-
- sector_size=$(awk '$0 ~ /^Logical sector size:.*bytes/ { print $4 }' \
- "$pt_info") && [ -n "$sector_size" ] || {
- sector_size=512
- error "WARN: did not find sector size, assuming 512"
- }
-
- debug 1 "$dev: original sgdisk info:"
- debugcat 1 "${pt_info}"
-
- # Pretend to move the backup GPT header to the end of the disk and dump
- # the resulting partition information. We use this info to determine if
- # we have to resize the partition.
- rqe sgd_pretend sgdisk --pretend --move-second-header \
- --print "${DISK}" >"${pt_pretend}" ||
- fail "${dev}: failed to dump pretend sgdisk info"
-
- debug 1 "$dev: pretend sgdisk info"
- debugcat 1 "${pt_pretend}"
-
- # Extract the partition data from the pretend dump
- awk 'found { print } ; $1 == "Number" { found = 1 }' \
- "${pt_pretend}" >"${pt_data}" ||
- fail "${dev}: failed to parse pretend sgdisk info"
-
- # Get the start and end sectors of the partition to be grown
- pt_start=$(awk '$1 == '"${PART}"' { print $2 }' "${pt_data}") &&
- [ -n "${pt_start}" ] ||
- fail "${dev}: failed to get start sector"
- pt_end=$(awk '$1 == '"${PART}"' { print $3 }' "${pt_data}") &&
- [ -n "${pt_end}" ] ||
- fail "${dev}: failed to get end sector"
- pt_size="$((${pt_end} - ${pt_start}))"
-
- # Get the last usable sector
- last=$(awk '/last usable sector is/ { print $NF }' \
- "${pt_pretend}") && [ -n "${last}" ] ||
- fail "${dev}: failed to get last usable sector"
-
- # Find the minimal start sector that is >= pt_end
- pt_max=$(awk '{ if ($2 >= pt_end && $2 < min) { min = $2 } } END \
- { print min }' min="${last}" pt_end="${pt_end}" \
- "${pt_data}") && [ -n "${pt_max}" ] ||
- fail "${dev}: failed to find max end sector"
-
- debug 1 "${dev}: pt_start=${pt_start} pt_end=${pt_end}" \
- "pt_size=${pt_size} pt_max=${pt_max} last=${last}"
-
- # Check if the partition can be grown
- [ "${pt_end}" -eq "${pt_max}" ] &&
- nochange "${dev}: size=${pt_size}, it cannot be grown"
- [ "$((${pt_end} + ${FUDGE}/${sector_size}))" -gt "${pt_max}" ] &&
- nochange "${dev}: could only be grown by" \
- "$((${pt_max} - ${pt_end})) [fudge=$((${FUDGE}/$sector_size))]"
-
- # The partition can be grown if we made it here. Get some more info
- # about it so we can do it properly.
- # FIXME: Do we care about the attribute flags?
- code=$(awk '/^Partition GUID code:/ { print $4 }' "${pt_info}")
- guid=$(awk '/^Partition unique GUID:/ { print $4 }' "${pt_info}")
- name=$(awk '/^Partition name:/ { gsub(/'"'"'/, "") ; \
- if (NF >= 3) print substr($0, index($0, $3)) }' "${pt_info}")
- [ -n "${code}" -a -n "${guid}" ] ||
- fail "${dev}: failed to parse sgdisk details"
-
- debug 1 "${dev}: code=${code} guid=${guid} name='${name}'"
- local wouldrun=""
- [ "$DRY_RUN" -ne 0 ] && wouldrun="would-run"
-
- # Calculate the new size of the partition
- new_size=$((${pt_max} - ${pt_start}))
- old="old: size=${pt_size},end=${pt_end}"
- new="new: size=${new_size},end=${pt_max}"
- change_info="${dev}: start=${pt_start} ${old} ${new}"
-
- # Backup the current partition table, we're about to modify it
- rq sgd_backup $wouldrun sgdisk "--backup=${GPT_BACKUP}" "${DISK}" ||
- fail "${dev}: failed to backup the partition table"
-
- # Modify the partition table. We do it all in one go (the order is
- # important!):
- # - move the GPT backup header to the end of the disk
- # - delete the partition
- # - recreate the partition with the new size
- # - set the partition code
- # - set the partition GUID
- # - set the partition name
- rq sgdisk_mod $wouldrun sgdisk --move-second-header "--delete=${PART}" \
- "--new=${PART}:${pt_start}:${pt_max}" \
- "--typecode=${PART}:${code}" \
- "--partition-guid=${PART}:${guid}" \
- "--change-name=${PART}:${name}" "${DISK}" &&
- rq pt_update $wouldrun pt_update "$DISK" "$PART" || {
- RESTORE_FUNC=gpt_restore
- fail "${dev}: failed to repartition"
- }
-
- # Dry run
- [ "${DRY_RUN}" -ne 0 ] && change "${change_info}"
-
- changed "${change_info}"
-}
-
-kver_to_num() {
- local kver="$1" maj="" min="" mic="0"
- kver=${kver%%-*}
- maj=${kver%%.*}
- min=${kver#${maj}.}
- min=${min%%.*}
- mic=${kver#${maj}.${min}.}
- [ "$kver" = "$mic" ] && mic=0
- _RET=$(($maj*1000*1000+$min*1000+$mic))
-}
-
-kver_cmp() {
- local op="$2" n1="" n2=""
- kver_to_num "$1"
- n1="$_RET"
- kver_to_num "$3"
- n2="$_RET"
- [ $n1 $op $n2 ]
-}
-
-rq() {
- # runquieterror(label, command)
- # gobble stderr of a command unless it errors
- local label="$1" ret="" efile=""
- efile="$TEMP_D/$label.err"
- shift;
-
- local rlabel="running"
- [ "$1" = "would-run" ] && rlabel="would-run" && shift
-
- local cmd="" x=""
- for x in "$@"; do
- [ "${x#* }" != "$x" -o "${x#* \"}" != "$x" ] && x="'$x'"
- cmd="$cmd $x"
- done
- cmd=${cmd# }
-
- debug 2 "$rlabel[$label][$_capture]" "$cmd"
- [ "$rlabel" = "would-run" ] && return 0
-
- if [ "${_capture}" = "erronly" ]; then
- "$@" 2>"$TEMP_D/$label.err"
- ret=$?
- else
- "$@" >"$TEMP_D/$label.err" 2>&1
- ret=$?
- fi
- if [ $ret -ne 0 ]; then
- error "failed [$label:$ret]" "$@"
- cat "$efile" 1>&2
- fi
- return $ret
-}
-
-rqe() {
- local _capture="erronly"
- rq "$@"
-}
-
-verify_ptupdate() {
- local input="$1" found="" reason="" kver=""
-
- # we can always satisfy 'off'
- if [ "$input" = "off" ]; then
- _RET="false";
- return 0;
- fi
-
- if command -v partx >/dev/null 2>&1; then
- local out="" ret=0
- out=$(partx --help 2>&1)
- ret=$?
- if [ $ret -eq 0 ]; then
- echo "$out" | grep -q -- --update || {
- reason="partx has no '--update' flag in usage."
- found="off"
- }
- else
- reason="'partx --help' returned $ret. assuming it is old."
- found="off"
- fi
- else
- reason="no 'partx' command"
- found="off"
- fi
-
- if [ -z "$found" ]; then
- if [ "$(uname)" != "Linux" ]; then
- reason="Kernel is not Linux per uname."
- found="off"
- fi
- fi
-
- if [ -z "$found" ]; then
- kver=$(uname -r) || debug 1 "uname -r failed!"
-
- if ! kver_cmp "${kver-0.0.0}" -ge 3.8.0; then
- reason="Kernel '$kver' < 3.8.0."
- found="off"
- fi
- fi
-
- if [ -z "$found" ]; then
- _RET="true"
- return 0
- fi
-
- case "$input" in
- on) error "$reason"; return 1;;
- auto)
- _RET="false";
- debug 1 "partition update disabled: $reason"
- return 0;;
- force)
- _RET="true"
- error "WARNING: ptupdate forced on even though: $reason"
- return 0;;
- esac
- error "unknown input '$input'";
- return 1;
-}
-
-pt_update() {
- local dev="$1" part="$2" update="${3:-$PT_UPDATE}"
- if ! $update; then
- return 0
- fi
- # partx only works on block devices (do not run on file)
- [ -b "$dev" ] || return 0
- partx --update "$part" "$dev"
-}
-
-has_cmd() {
- command -v "${1}" >/dev/null 2>&1
-}
-
-resize_sgdisk_gpt() {
- resize_sgdisk gpt
-}
-
-resize_sgdisk_dos() {
- fail "unable to resize dos label with sgdisk"
-}
-
-resize_sfdisk_gpt() {
- resize_sfdisk gpt
-}
-
-resize_sfdisk_dos() {
- resize_sfdisk dos
-}
-
-get_table_format() {
- local out="" disk="$1"
- if has_cmd blkid && out=$(blkid -o value -s PTTYPE "$disk") &&
- [ "$out" = "dos" -o "$out" = "gpt" ]; then
- _RET="$out"
- return
- fi
- _RET="dos"
- if [ ${SFDISK_VERSION} -lt ${SFDISK_2_26} ] &&
- out=$(sfdisk --id --force "$disk" 1 2>/dev/null); then
- if [ "$out" = "ee" ]; then
- _RET="gpt"
- else
- _RET="dos"
- fi
- return
- elif out=$(LANG=C sfdisk --list "$disk"); then
- out=$(echo "$out" | sed -e '/Disklabel type/!d' -e 's/.*: //')
- case "$out" in
- gpt|dos) _RET="$out";;
- *) error "WARN: unknown label $out";;
- esac
- fi
-}
-
-get_resizer() {
- local format="$1" user=${2:-"auto"}
-
- case "$user" in
- sgdisk) _RET="resize_sgdisk_$format"; return;;
- sfdisk) _RET="resize_sfdisk_$format"; return;;
- auto) :;;
- *) error "unexpected input: '$user'";;
- esac
-
- if [ "$format" = "dos" ]; then
- _RET="resize_sfdisk_dos"
- return 0
- fi
-
- if [ "${SFDISK_VERSION}" -ge ${SFDISK_2_26} ]; then
- _RET="resize_sfdisk_gpt"
- elif has_cmd sgdisk; then
- _RET="resize_sgdisk_$format"
- else
- error "no tools available to resize disk with '$format'"
- return 1
- fi
- return 0
-}
-
-pt_update="auto"
-resizer=${GROWPART_RESIZER:-"auto"}
-while [ $# -ne 0 ]; do
- cur=${1}
- next=${2}
- case "$cur" in
- -h|--help)
- Usage
- exit 0
- ;;
- --fudge)
- FUDGE=${next}
- shift
- ;;
- -N|--dry-run)
- DRY_RUN=1
- ;;
- -u|--update|--update=*)
- if [ "${cur#--update=}" != "$cur" ]; then
- next="${cur#--update=}"
- else
- shift
- fi
- case "$next" in
- off|auto|force|on) pt_update=$next;;
- *) fail "unknown --update option: $next";;
- esac
- ;;
- -v|--verbose)
- VERBOSITY=$(($VERBOSITY+1))
- ;;
- --)
- shift
- break
- ;;
- -*)
- fail "unknown option ${cur}"
- ;;
- *)
- if [ -z "${DISK}" ]; then
- DISK=${cur}
- else
- [ -z "${PART}" ] || fail "confused by arg ${cur}"
- PART=${cur}
- fi
- ;;
- esac
- shift
-done
-
-[ -n "${DISK}" ] || bad_Usage "must supply disk and partition-number"
-[ -n "${PART}" ] || bad_Usage "must supply partition-number"
-
-has_cmd "sfdisk" || fail "sfdisk not found"
-get_sfdisk_version || fail
-
-[ -e "${DISK}" ] || fail "${DISK}: does not exist"
-
-[ "${PART#*[!0-9]}" = "${PART}" ] || fail "partition-number must be a number"
-
-verify_ptupdate "$pt_update" || fail
-PT_UPDATE=$_RET
-
-debug 1 "update-partition set to $PT_UPDATE"
-
-mktemp_d && TEMP_D="${_RET}" || fail "failed to make temp dir"
-trap cleanup 0 # EXIT - some shells may not like 'EXIT' but are ok with 0
-
-# get the ID of the first partition to determine if it's MBR or GPT
-get_table_format "$DISK" || fail
-format=$_RET
-get_resizer "$format" "$resizer" ||
- fail "failed to get a resizer for id '$id'"
-resizer=$_RET
-
-debug 1 "resizing $PART on $DISK using $resizer"
-"$resizer"
-
-# vi: ts=4 noexpandtab
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-emulation/cloud-init/, app-emulation/cloud-init/files/
@ 2016-04-25 23:17 Robin H. Johnson
0 siblings, 0 replies; 8+ messages in thread
From: Robin H. Johnson @ 2016-04-25 23:17 UTC (permalink / raw
To: gentoo-commits
commit: ed5ad859b368e86d00025c26556b12d31e8b7f0d
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 25 23:03:09 2016 +0000
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Mon Apr 25 23:17:19 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed5ad859
app-emulation/cloud-init: version bump to upstream snapshot release, improve install script.
Package-Manager: portage-2.2.28
app-emulation/cloud-init/Manifest | 1 +
.../cloud-init/cloud-init-0.7.6-r2.ebuild | 77 +++++++++++++++++++++
.../cloud-init/cloud-init-0.7.6_p1212.ebuild | 78 ++++++++++++++++++++++
.../cloud-init/files/cloud-init-0.7.6-gentoo.patch | 51 ++++++++++++++
.../files/cloud-init-0.7.6_p1212-gentoo.patch | 33 +++++++++
5 files changed, 240 insertions(+)
diff --git a/app-emulation/cloud-init/Manifest b/app-emulation/cloud-init/Manifest
index 4f0a651..6a04d99 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 0000000..495d67b
--- /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 0000000..9c9d081
--- /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 0000000..27abd38
--- /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 0000000..ef5d950
--- /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',
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-emulation/cloud-init/, app-emulation/cloud-init/files/
@ 2016-08-18 21:13 Matt Thode
0 siblings, 0 replies; 8+ messages in thread
From: Matt Thode @ 2016-08-18 21:13 UTC (permalink / raw
To: gentoo-commits
commit: 43d54c0b1029a18779588b23fb6cdbe5fa0fa4ba
Author: Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 18 21:12:23 2016 +0000
Commit: Matt Thode <prometheanfire <AT> gentoo <DOT> org>
CommitDate: Thu Aug 18 21:13:04 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43d54c0b
app-emulation/cloud-init: bup
Package-Manager: portage-2.2.28
app-emulation/cloud-init/Manifest | 1 +
app-emulation/cloud-init/cloud-init-0.7.7.ebuild | 86 ++++++++++++++++++++++
.../files/cloud-init-0.7.7-gentooinit.patch | 34 +++++++++
3 files changed, 121 insertions(+)
diff --git a/app-emulation/cloud-init/Manifest b/app-emulation/cloud-init/Manifest
index 6a04d99..343c268 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 0000000..1453bb7
--- /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 0000000..8378810
--- /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,
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-emulation/cloud-init/, app-emulation/cloud-init/files/
@ 2016-12-24 2:01 Matt Thode
0 siblings, 0 replies; 8+ messages in thread
From: Matt Thode @ 2016-12-24 2:01 UTC (permalink / raw
To: gentoo-commits
commit: 85d88604737fdf165aa6521cbdcb5a3851c4e48b
Author: Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 24 02:00:47 2016 +0000
Commit: Matt Thode <prometheanfire <AT> gentoo <DOT> org>
CommitDate: Sat Dec 24 02:01:01 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85d88604
app-emulation/cloud-init: bup
Package-Manager: portage-2.3.0
app-emulation/cloud-init/Manifest | 1 +
app-emulation/cloud-init/cloud-init-0.7.9.ebuild | 95 ++++++++++++++++++++++
.../cloud-init/files/cloud-init-0.7.9-tests.patch | 13 +++
3 files changed, 109 insertions(+)
diff --git a/app-emulation/cloud-init/Manifest b/app-emulation/cloud-init/Manifest
index 350a943..37637ec 100644
--- a/app-emulation/cloud-init/Manifest
+++ b/app-emulation/cloud-init/Manifest
@@ -2,3 +2,4 @@ DIST cloud-init-0.7.6.tar.gz 515670 SHA256 9e8fd22eb7f6e40ae6a5f66173ddc3cc18f65
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
DIST cloud-init-0.7.8.tar.gz 508777 SHA256 4a4f1f7fb9dd0987a02aa7cd6f609910294fce8f9724dcebc0cd88630b4f1fd6 SHA512 ff6c3837afe702359879f0ae1d7443247b0ed97d60ecf0cbe85fc364dc833e553962aae221f48becb104ad3f951a28cbd742a3b8521ef25dfb8fd19439759447 WHIRLPOOL 1881cc41ee85e69cf5169115c7449ff581f927def51aaf3df986b8e8c29baeace658bb24bc5b98fd6eab6fdb5f05ab4555ba4081b7758402089a35fe20595876
+DIST cloud-init-0.7.9.tar.gz 602188 SHA256 76edb80bf1bdbda68f8014bc057a303ae438a139bdf394e825e548d6ae39d472 SHA512 ee52909f634f51dcf9e1229a8f49faa8c562bf05b69fac108fcc80cb3217f4364a33cf696df015e4dcd7887c68cf6108729850648b4daee07b3d3247ca3cc5b1 WHIRLPOOL 02093161cd3c6930b868ed18ca2e649ebbfac57b4ba3e8dcf4cb3107775cf052c739a0aee40ac79c69511efe5b3dfe60cbc2d55d9bbad74512cdf3a31fb77261
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 00000000..746ae04
--- /dev/null
+++ b/app-emulation/cloud-init/cloud-init-0.7.9.ebuild
@@ -0,0 +1,95 @@
+# 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"
+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/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 00000000..b80a60a
--- /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,
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-emulation/cloud-init/, app-emulation/cloud-init/files/
@ 2018-11-20 11:13 Gilles Dartiguelongue
0 siblings, 0 replies; 8+ messages in thread
From: Gilles Dartiguelongue @ 2018-11-20 11:13 UTC (permalink / raw
To: gentoo-commits
commit: e98de08886fcfdc46109c1d38048247174a9e0ac
Author: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 20 11:12:16 2018 +0000
Commit: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
CommitDate: Tue Nov 20 11:13:15 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e98de088
app-emulation/cloud-init: update gentoo fixes
Package-Manager: Portage-2.3.51, Repoman-2.3.12
Signed-off-by: Gilles Dartiguelongue <eva <AT> gentoo.org>
...-init-9999.ebuild => cloud-init-18.4-r1.ebuild} | 20 ++++----
app-emulation/cloud-init/cloud-init-9999.ebuild | 5 ++
.../18.4-add-support-for-package_upgrade.patch | 54 ++++++++++++++++++++++
.../18.4-fix-filename-for-storing-locale.patch | 30 ++++++++++++
.../18.4-fix-update_package_sources-function.patch | 26 +++++++++++
...it-18.4-gentoo-support-upstream-templates.patch | 10 ++--
6 files changed, 132 insertions(+), 13 deletions(-)
diff --git a/app-emulation/cloud-init/cloud-init-9999.ebuild b/app-emulation/cloud-init/cloud-init-18.4-r1.ebuild
similarity index 77%
copy from app-emulation/cloud-init/cloud-init-9999.ebuild
copy to app-emulation/cloud-init/cloud-init-18.4-r1.ebuild
index 0b0b7bcaac9..34fd8b7e077 100644
--- a/app-emulation/cloud-init/cloud-init-9999.ebuild
+++ b/app-emulation/cloud-init/cloud-init-18.4-r1.ebuild
@@ -4,15 +4,15 @@
EAPI=6
PYTHON_COMPAT=( python2_7 python3_4 python3_5 python3_6 )
-inherit distutils-r1 git-r3
+inherit distutils-r1
DESCRIPTION="Cloud instance initialisation magic"
HOMEPAGE="https://launchpad.net/cloud-init"
-EGIT_REPO_URI="https://git.launchpad.net/cloud-init"
+SRC_URI="https://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
-KEYWORDS=""
+KEYWORDS="~amd64 ~x86"
IUSE="test"
CDEPEND="
@@ -47,15 +47,19 @@ RDEPEND="
"
PATCHES=(
- "${FILESDIR}"/${PN}-18.4-fix-packages-module.patch
- "${FILESDIR}"/${PN}-18.4-gentoo-support-upstream-templates.patch
+ # Fix Gentoo support
+ # https://code.launchpad.net/~gilles-dartiguelongue/cloud-init/+git/cloud-init/+merge/358777
+ "${FILESDIR}"/${P}-fix-packages-module.patch
+ "${FILESDIR}"/${P}-gentoo-support-upstream-templates.patch
+ "${FILESDIR}"/${PV}-fix-filename-for-storing-locale.patch
+ "${FILESDIR}"/${PV}-fix-update_package_sources-function.patch
+ "${FILESDIR}"/${PV}-add-support-for-package_upgrade.patch
)
-python_prepare_all() {
+src_prepare() {
# 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
+ distutils-r1_src_prepare
}
python_test() {
diff --git a/app-emulation/cloud-init/cloud-init-9999.ebuild b/app-emulation/cloud-init/cloud-init-9999.ebuild
index 0b0b7bcaac9..141eb23c883 100644
--- a/app-emulation/cloud-init/cloud-init-9999.ebuild
+++ b/app-emulation/cloud-init/cloud-init-9999.ebuild
@@ -47,8 +47,13 @@ RDEPEND="
"
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
)
python_prepare_all() {
diff --git a/app-emulation/cloud-init/files/18.4-add-support-for-package_upgrade.patch b/app-emulation/cloud-init/files/18.4-add-support-for-package_upgrade.patch
new file mode 100644
index 00000000000..9c542cfc077
--- /dev/null
+++ b/app-emulation/cloud-init/files/18.4-add-support-for-package_upgrade.patch
@@ -0,0 +1,54 @@
+From 7868b97507d0dd7d7721ad5c4539e22c67635f92 Mon Sep 17 00:00:00 2001
+From: Gilles Dartiguelongue <eva@gentoo.org>
+Date: Wed, 14 Nov 2018 15:58:30 +0100
+Subject: [PATCH 5/5] gentoo: add support for package_upgrade
+
+---
+ cloudinit/distros/gentoo.py | 25 ++++++++++++++-----------
+ 1 file changed, 14 insertions(+), 11 deletions(-)
+
+diff --git a/cloudinit/distros/gentoo.py b/cloudinit/distros/gentoo.py
+index 7b838e82..22ad2cf3 100644
+--- a/cloudinit/distros/gentoo.py
++++ b/cloudinit/distros/gentoo.py
+@@ -189,23 +189,26 @@ class Distro(distros.Distro):
+ distros.set_etc_timezone(tz=tz, tz_file=self._find_tz_file(tz))
+
+ def package_command(self, command, args=None, pkgs=None):
+- if pkgs is None:
+- pkgs = []
+-
+ cmd = ['emerge']
+ # Redirect output
+ cmd.append("--quiet")
+
+- if args and isinstance(args, str):
+- cmd.append(args)
+- elif args and isinstance(args, list):
+- cmd.extend(args)
++ if command == "upgrade":
++ cmd.extend(["--update", "world"])
++ else:
++ if pkgs is None:
++ pkgs = []
++
++ if args and isinstance(args, str):
++ cmd.append(args)
++ elif args and isinstance(args, list):
++ cmd.extend(args)
+
+- if command:
+- cmd.append(command)
++ if command:
++ cmd.append(command)
+
+- pkglist = util.expand_package_list('%s-%s', pkgs)
+- cmd.extend(pkglist)
++ pkglist = util.expand_package_list('%s-%s', pkgs)
++ cmd.extend(pkglist)
+
+ # Allow the output of this to flow outwards (ie not be captured)
+ util.subp(cmd, capture=False)
+--
+2.19.1
+
diff --git a/app-emulation/cloud-init/files/18.4-fix-filename-for-storing-locale.patch b/app-emulation/cloud-init/files/18.4-fix-filename-for-storing-locale.patch
new file mode 100644
index 00000000000..a5bbf6034ac
--- /dev/null
+++ b/app-emulation/cloud-init/files/18.4-fix-filename-for-storing-locale.patch
@@ -0,0 +1,30 @@
+From 3756cdea3e844b9611de321a8075df80e7dbf74d Mon Sep 17 00:00:00 2001
+From: Gilles Dartiguelongue <eva@gentoo.org>
+Date: Wed, 14 Nov 2018 15:28:22 +0100
+Subject: [PATCH 3/5] gentoo: fix filename for storing locale
+
+There must have been a misunderstanding as locale.gen is meant to
+contain locales to be generated if no argument is passed to locale-gen.
+
+When using openrc, Gentoo stores system locale in /etc/env.d/02locale
+which is generally manipulated through eselect.
+---
+ cloudinit/distros/gentoo.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cloudinit/distros/gentoo.py b/cloudinit/distros/gentoo.py
+index 98ac41ca..50bb61fb 100644
+--- a/cloudinit/distros/gentoo.py
++++ b/cloudinit/distros/gentoo.py
+@@ -20,7 +20,7 @@ LOG = logging.getLogger(__name__)
+
+
+ class Distro(distros.Distro):
+- locale_conf_fn = '/etc/locale.gen'
++ locale_conf_fn = '/etc/env.d/02locale'
+ network_conf_fn = '/etc/conf.d/net'
+ resolve_conf_fn = '/etc/resolv.conf'
+ hostname_conf_fn = '/etc/conf.d/hostname'
+--
+2.19.1
+
diff --git a/app-emulation/cloud-init/files/18.4-fix-update_package_sources-function.patch b/app-emulation/cloud-init/files/18.4-fix-update_package_sources-function.patch
new file mode 100644
index 00000000000..d90258d1bc4
--- /dev/null
+++ b/app-emulation/cloud-init/files/18.4-fix-update_package_sources-function.patch
@@ -0,0 +1,26 @@
+From b15c4c4b24c894b3c8d444466110c881c35525e2 Mon Sep 17 00:00:00 2001
+From: Gilles Dartiguelongue <eva@gentoo.org>
+Date: Wed, 14 Nov 2018 15:35:37 +0100
+Subject: [PATCH 4/5] gentoo: fix update_package_sources function
+
+Method is meant to update packages repository, not to update the system.
+---
+ cloudinit/distros/gentoo.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cloudinit/distros/gentoo.py b/cloudinit/distros/gentoo.py
+index 50bb61fb..7b838e82 100644
+--- a/cloudinit/distros/gentoo.py
++++ b/cloudinit/distros/gentoo.py
+@@ -212,7 +212,7 @@ class Distro(distros.Distro):
+
+ def update_package_sources(self):
+ self._runner.run("update-sources", self.package_command,
+- ["-u", "world"], freq=PER_INSTANCE)
++ ["--sync"], freq=PER_INSTANCE)
+
+
+ def convert_resolv_conf(settings):
+--
+2.19.1
+
diff --git a/app-emulation/cloud-init/files/cloud-init-18.4-gentoo-support-upstream-templates.patch b/app-emulation/cloud-init/files/cloud-init-18.4-gentoo-support-upstream-templates.patch
index 60d9da60055..6f87399af94 100644
--- a/app-emulation/cloud-init/files/cloud-init-18.4-gentoo-support-upstream-templates.patch
+++ b/app-emulation/cloud-init/files/cloud-init-18.4-gentoo-support-upstream-templates.patch
@@ -1,7 +1,7 @@
-From 946ce2b005a71e9922654af79bce51fefa16c3d4 Mon Sep 17 00:00:00 2001
+From 823454f1ea140ec47f5f9c5c3c5ad62eb458eb8a Mon Sep 17 00:00:00 2001
From: Gilles Dartiguelongue <eva@gentoo.org>
Date: Wed, 24 Oct 2018 10:52:46 +0200
-Subject: [PATCH 2/2] Add support for gentoo in cloud.cfg and templates
+Subject: [PATCH 2/5] Add support for gentoo in cloud.cfg and templates
---
config/cloud.cfg.tmpl | 8 ++++++--
@@ -11,7 +11,7 @@ Subject: [PATCH 2/2] Add support for gentoo in cloud.cfg and templates
create mode 100644 templates/hosts.gentoo.tmpl
diff --git a/config/cloud.cfg.tmpl b/config/cloud.cfg.tmpl
-index 1fef133a..f66b5f7e 100644
+index 1fef133a..3f5a41a2 100644
--- a/config/cloud.cfg.tmpl
+++ b/config/cloud.cfg.tmpl
@@ -134,7 +134,7 @@ cloud_final_modules:
@@ -39,7 +39,7 @@ index 1fef133a..f66b5f7e 100644
+{% elif variant == "gentoo" %}
+ groups: [users, wheel]
+ primary_group: users
-+ no-user-group: true
++ no_user_group: true
{% else %}
groups: [wheel, adm, systemd-journal]
{% endif %}
@@ -87,5 +87,5 @@ index 8b7cb875..d109044e 100755
if "avoid-pep8-E402-import-not-top-of-file":
_tdir = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
--
-2.19.0
+2.19.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-emulation/cloud-init/, app-emulation/cloud-init/files/
@ 2020-02-25 17:52 Matthew Thode
0 siblings, 0 replies; 8+ messages in thread
From: Matthew Thode @ 2020-02-25 17:52 UTC (permalink / raw
To: gentoo-commits
commit: 1aa00da6a419e83bab5c59c8163e391d9844adff
Author: Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 25 17:51:58 2020 +0000
Commit: Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
CommitDate: Tue Feb 25 17:52:17 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1aa00da6
app-emulation/cloud-init: cleanup
Bug: https://bugs.gentoo.org/708738
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Matthew Thode <prometheanfire <AT> gentoo.org>
app-emulation/cloud-init/Manifest | 3 -
app-emulation/cloud-init/cloud-init-17.2.ebuild | 80 -------------------
app-emulation/cloud-init/cloud-init-18.4-r1.ebuild | 89 ---------------------
app-emulation/cloud-init/cloud-init-18.5.ebuild | 91 ----------------------
app-emulation/cloud-init/cloud-init-9999.ebuild | 4 +-
.../files/18.5-fix-invalid-string-format.patch | 46 -----------
...it-18.4-gentoo-support-upstream-templates.patch | 91 ----------------------
7 files changed, 2 insertions(+), 402 deletions(-)
diff --git a/app-emulation/cloud-init/Manifest b/app-emulation/cloud-init/Manifest
index 41552972418..dcc617fd5bc 100644
--- a/app-emulation/cloud-init/Manifest
+++ b/app-emulation/cloud-init/Manifest
@@ -1,4 +1 @@
-DIST cloud-init-17.2.tar.gz 810821 BLAKE2B df1a7c1ed1fc48a7801a53bd89839d963debca6abf7f892d61bf7ec9222ab33bf78221e65d79028e0445cac4c5fe1e0c1620d49aea26c036ee17933d9c1893f5 SHA512 ad1c7f6ca9762b70a1f06a6b538032a7de0c5371fd792260d5959df113f4f51509d184b2207ffa23b41f395c1903d551d66aaf2a2ad60af3594cf1f18d1e4a38
-DIST cloud-init-18.4.tar.gz 965112 BLAKE2B 2879aafedea877e4e406a5e837d100ba65e40c62660621f606e7a189af7b1ec8d98ba2c02ae5d253a0b4587502d3a636dec5c2772c968a9037b47e62a05656b4 SHA512 730aca6406f652f55afc2dd50c49eb6708584e0a96715606bcba05cb7f40e47c256faff1f9748f04674a8f941ec9435801c9ed2ac79adec8a6ef167d6b195103
-DIST cloud-init-18.5.tar.gz 990381 BLAKE2B 0dbbd5b2402d3a7742c46f8a37b0ea31f40ac16bdbfe49dca0056ab8f90c47dbf26e6d3f40f34275caf5102d0b9b8be4e2c28bfc2276e85a5aad11af20b08979 SHA512 f89ee636922e33b5b2dcb5230763404fbeee148e28b8f61bf5b2f1f07000f960f9d38545dfb7bcbe9afb8253f77d66c94b39e9a159715b44a440a7cbe1fe1aeb
DIST cloud-init-19.4.tar.gz 1091893 BLAKE2B 2ab8fef70b420c066d6d8f83871568eeac24f00879ecf3d58c3768dd809cff6a3b79c7e72d9a10204002101049ab86ab64f0c524362e00497a9222960ef380df SHA512 e69ea47eab41d69d64fa44102fbde59319da5f71a68f28a0f6ac65cd6866542b4fe58a71b84c903cfa9b1d2f26eb648cdf4de633b8df61e4f89c9fa4c2a2b1d3
diff --git a/app-emulation/cloud-init/cloud-init-17.2.ebuild b/app-emulation/cloud-init/cloud-init-17.2.ebuild
deleted file mode 100644
index a6362ee9668..00000000000
--- a/app-emulation/cloud-init/cloud-init-17.2.ebuild
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-PYTHON_COMPAT=( 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-18.4-r1.ebuild b/app-emulation/cloud-init/cloud-init-18.4-r1.ebuild
deleted file mode 100644
index a9eb0b9556f..00000000000
--- a/app-emulation/cloud-init/cloud-init-18.4-r1.ebuild
+++ /dev/null
@@ -1,89 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-PYTHON_COMPAT=( python3_6 )
-
-inherit distutils-r1
-
-DESCRIPTION="Cloud instance 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? ( test )"
-
-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=(
- # Fix Gentoo support
- # https://code.launchpad.net/~gilles-dartiguelongue/cloud-init/+git/cloud-init/+merge/358777
- "${FILESDIR}"/${P}-fix-packages-module.patch
- "${FILESDIR}"/${P}-gentoo-support-upstream-templates.patch
- "${FILESDIR}"/${PV}-fix-filename-for-storing-locale.patch
- "${FILESDIR}"/${PV}-fix-update_package_sources-function.patch
- "${FILESDIR}"/${PV}-add-support-for-package_upgrade.patch
-)
-
-src_prepare() {
- # Fix location of documentation installation
- sed -i "s:USR + '/share/doc/cloud-init:USR + '/share/doc/${PF}:" setup.py || die
- distutils-r1_src_prepare
-}
-
-python_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,systemd --distro gentoo
-}
-
-python_install_all() {
- keepdir /etc/cloud
-
- distutils-r1_python_install_all
-
- # installs as non-executable
- chmod +x "${D}"/etc/init.d/*
-}
-
-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-18.5.ebuild b/app-emulation/cloud-init/cloud-init-18.5.ebuild
deleted file mode 100644
index b2591bcafde..00000000000
--- a/app-emulation/cloud-init/cloud-init-18.5.ebuild
+++ /dev/null
@@ -1,91 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-PYTHON_COMPAT=( python3_6 )
-
-inherit distutils-r1
-
-DESCRIPTION="Cloud instance 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? ( test )"
-
-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=(
- # 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
- # From master
- "${FILESDIR}"/${PV}-fix-invalid-string-format.patch
-)
-
-src_prepare() {
- # Fix location of documentation installation
- sed -i "s:USR + '/share/doc/cloud-init:USR + '/share/doc/${PF}:" setup.py || die
- distutils-r1_src_prepare
-}
-
-python_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,systemd --distro gentoo
-}
-
-python_install_all() {
- keepdir /etc/cloud
-
- distutils-r1_python_install_all
-
- # installs as non-executable
- chmod +x "${D}"/etc/init.d/*
-}
-
-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
index bf9be29d7df..6c2ca0f3c26 100644
--- a/app-emulation/cloud-init/cloud-init-9999.ebuild
+++ b/app-emulation/cloud-init/cloud-init-9999.ebuild
@@ -50,8 +50,8 @@ RDEPEND="
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}/${PN}-18.4-fix-packages-module.patch"
+ "${FILESDIR}/${PN}-19.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
diff --git a/app-emulation/cloud-init/files/18.5-fix-invalid-string-format.patch b/app-emulation/cloud-init/files/18.5-fix-invalid-string-format.patch
deleted file mode 100644
index 42030f57dc4..00000000000
--- a/app-emulation/cloud-init/files/18.5-fix-invalid-string-format.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 5b065316113b97aadb43e63cc31bb8639f6a6376 Mon Sep 17 00:00:00 2001
-From: Scott Moser <smoser@ubuntu.com>
-Date: Fri, 14 Dec 2018 03:24:26 +0000
-Subject: [PATCH] Update to pylint 2.2.2.
-
-The tip-pylint tox target correctly reported the invalid use of
-string formatting. The change here is to:
-
-a.) Fix the error that was caught.
-b.) move to pylint 2.2.2 for the default 'pylint' target.
----
- cloudinit/sources/DataSourceAzure.py | 4 ++--
- tox.ini | 2 +-
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/cloudinit/sources/DataSourceAzure.py b/cloudinit/sources/DataSourceAzure.py
-index e076d5dc..46efca4a 100644
---- a/cloudinit/sources/DataSourceAzure.py
-+++ b/cloudinit/sources/DataSourceAzure.py
-@@ -980,8 +980,8 @@ def read_azure_ovf(contents):
- raise NonAzureDataSource("No LinuxProvisioningConfigurationSet")
- if len(lpcs_nodes) > 1:
- raise BrokenAzureDataSource("found '%d' %ss" %
-- ("LinuxProvisioningConfigurationSet",
-- len(lpcs_nodes)))
-+ (len(lpcs_nodes),
-+ "LinuxProvisioningConfigurationSet"))
- lpcs = lpcs_nodes[0]
-
- if not lpcs.hasChildNodes():
-diff --git a/tox.ini b/tox.ini
-index 2fb3209d..d983348b 100644
---- a/tox.ini
-+++ b/tox.ini
-@@ -21,7 +21,7 @@ setenv =
- basepython = python3
- deps =
- # requirements
-- pylint==1.8.1
-+ pylint==2.2.2
- # test-requirements because unit tests are now present in cloudinit tree
- -r{toxinidir}/test-requirements.txt
- commands = {envpython} -m pylint {posargs:cloudinit tests tools}
---
-2.20.0
-
diff --git a/app-emulation/cloud-init/files/cloud-init-18.4-gentoo-support-upstream-templates.patch b/app-emulation/cloud-init/files/cloud-init-18.4-gentoo-support-upstream-templates.patch
deleted file mode 100644
index 6f87399af94..00000000000
--- a/app-emulation/cloud-init/files/cloud-init-18.4-gentoo-support-upstream-templates.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-From 823454f1ea140ec47f5f9c5c3c5ad62eb458eb8a Mon Sep 17 00:00:00 2001
-From: Gilles Dartiguelongue <eva@gentoo.org>
-Date: Wed, 24 Oct 2018 10:52:46 +0200
-Subject: [PATCH 2/5] Add support for gentoo in cloud.cfg and templates
-
----
- config/cloud.cfg.tmpl | 8 ++++++--
- templates/hosts.gentoo.tmpl | 24 ++++++++++++++++++++++++
- tools/render-cloudcfg | 2 +-
- 3 files changed, 31 insertions(+), 3 deletions(-)
- create mode 100644 templates/hosts.gentoo.tmpl
-
-diff --git a/config/cloud.cfg.tmpl b/config/cloud.cfg.tmpl
-index 1fef133a..3f5a41a2 100644
---- a/config/cloud.cfg.tmpl
-+++ b/config/cloud.cfg.tmpl
-@@ -134,7 +134,7 @@ cloud_final_modules:
- # (not accessible to handlers/transforms)
- system_info:
- # This will affect which distro class gets used
--{% if variant in ["centos", "debian", "fedora", "rhel", "suse", "ubuntu", "freebsd"] %}
-+{% if variant in ["centos", "debian", "fedora", "rhel", "suse", "ubuntu", "freebsd", "gentoo"] %}
- distro: {{ variant }}
- {% else %}
- # Unknown/fallback distro.
-@@ -172,7 +172,7 @@ system_info:
- primary: http://ports.ubuntu.com/ubuntu-ports
- security: http://ports.ubuntu.com/ubuntu-ports
- ssh_svcname: ssh
--{% elif variant in ["centos", "rhel", "fedora", "suse"] %}
-+{% elif variant in ["centos", "rhel", "fedora", "suse", "gentoo"] %}
- # Default user name + that default users groups (if added/used)
- default_user:
- name: {{ variant }}
-@@ -180,6 +180,10 @@ system_info:
- gecos: {{ variant }} Cloud User
- {% if variant == "suse" %}
- groups: [cdrom, users]
-+{% elif variant == "gentoo" %}
-+ groups: [users, wheel]
-+ primary_group: users
-+ no_user_group: true
- {% else %}
- groups: [wheel, adm, systemd-journal]
- {% endif %}
-diff --git a/templates/hosts.gentoo.tmpl b/templates/hosts.gentoo.tmpl
-new file mode 100644
-index 00000000..cd045fa6
---- /dev/null
-+++ b/templates/hosts.gentoo.tmpl
-@@ -0,0 +1,24 @@
-+## 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: True
-+-#}
-+# Your system has configured 'manage_etc_hosts' as True.
-+# 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
-+
-diff --git a/tools/render-cloudcfg b/tools/render-cloudcfg
-index 8b7cb875..d109044e 100755
---- a/tools/render-cloudcfg
-+++ b/tools/render-cloudcfg
-@@ -4,7 +4,7 @@ import argparse
- import os
- import sys
-
--VARIANTS = ["bsd", "centos", "fedora", "rhel", "suse", "ubuntu", "unknown"]
-+VARIANTS = ["bsd", "centos", "fedora", "gentoo", "rhel", "suse", "ubuntu", "unknown"]
-
- if "avoid-pep8-E402-import-not-top-of-file":
- _tdir = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
---
-2.19.1
-
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-emulation/cloud-init/, app-emulation/cloud-init/files/
@ 2020-04-19 17:37 Matthew Thode
0 siblings, 0 replies; 8+ messages in thread
From: Matthew Thode @ 2020-04-19 17:37 UTC (permalink / raw
To: gentoo-commits
commit: b144df77b41ff1ebf099898140cdbbb68eb4bde1
Author: Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 19 17:32:54 2020 +0000
Commit: Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
CommitDate: Sun Apr 19 17:32:54 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b144df77
app-emulation/cloud-init: 20.1 bump with py37/38 support
Closes: https://bugs.gentoo.org/718208
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Matthew Thode <prometheanfire <AT> gentoo.org>
app-emulation/cloud-init/Manifest | 1 +
...oud-init-9999.ebuild => cloud-init-20.1.ebuild} | 18 +++--
app-emulation/cloud-init/cloud-init-9999.ebuild | 18 +++--
...it-20.1-gentoo-support-upstream-templates.patch | 93 ++++++++++++++++++++++
4 files changed, 118 insertions(+), 12 deletions(-)
diff --git a/app-emulation/cloud-init/Manifest b/app-emulation/cloud-init/Manifest
index dcc617fd5bc..c613182719d 100644
--- a/app-emulation/cloud-init/Manifest
+++ b/app-emulation/cloud-init/Manifest
@@ -1 +1,2 @@
DIST cloud-init-19.4.tar.gz 1091893 BLAKE2B 2ab8fef70b420c066d6d8f83871568eeac24f00879ecf3d58c3768dd809cff6a3b79c7e72d9a10204002101049ab86ab64f0c524362e00497a9222960ef380df SHA512 e69ea47eab41d69d64fa44102fbde59319da5f71a68f28a0f6ac65cd6866542b4fe58a71b84c903cfa9b1d2f26eb648cdf4de633b8df61e4f89c9fa4c2a2b1d3
+DIST cloud-init-20.1.tar.gz 1088152 BLAKE2B 1c075676bcf7454965beafaaa38f3cdf08f321ddd0303b7f710c49d2a69e0fb2ec8a81870a632b7504c47af6436555c97ea9fa9c8416955de78f8f551b5509b7 SHA512 ad28e4a0290165308ef2cdb8a935778ad99039978a204bee1098460de006bc3f375a3b81d0d72971fc4f4195d5d2ade9c648fb19e6d6eba12decf750dc54b6eb
diff --git a/app-emulation/cloud-init/cloud-init-9999.ebuild b/app-emulation/cloud-init/cloud-init-20.1.ebuild
similarity index 87%
copy from app-emulation/cloud-init/cloud-init-9999.ebuild
copy to app-emulation/cloud-init/cloud-init-20.1.ebuild
index 6c2ca0f3c26..f1f5ed321e9 100644
--- a/app-emulation/cloud-init/cloud-init-9999.ebuild
+++ b/app-emulation/cloud-init/cloud-init-20.1.ebuild
@@ -1,18 +1,24 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
-PYTHON_COMPAT=( python3_6 )
+EAPI=7
+PYTHON_COMPAT=( python3_6 python3_7 python3_8 )
-inherit distutils-r1 git-r3
+inherit distutils-r1
+
+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 ~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"
RESTRICT="!test? ( test )"
@@ -51,7 +57,7 @@ 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}-19.4-gentoo-support-upstream-templates.patch"
+ "${FILESDIR}/${PN}-20.1-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
diff --git a/app-emulation/cloud-init/cloud-init-9999.ebuild b/app-emulation/cloud-init/cloud-init-9999.ebuild
index 6c2ca0f3c26..f1f5ed321e9 100644
--- a/app-emulation/cloud-init/cloud-init-9999.ebuild
+++ b/app-emulation/cloud-init/cloud-init-9999.ebuild
@@ -1,18 +1,24 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
-PYTHON_COMPAT=( python3_6 )
+EAPI=7
+PYTHON_COMPAT=( python3_6 python3_7 python3_8 )
-inherit distutils-r1 git-r3
+inherit distutils-r1
+
+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 ~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"
RESTRICT="!test? ( test )"
@@ -51,7 +57,7 @@ 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}-19.4-gentoo-support-upstream-templates.patch"
+ "${FILESDIR}/${PN}-20.1-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
diff --git a/app-emulation/cloud-init/files/cloud-init-20.1-gentoo-support-upstream-templates.patch b/app-emulation/cloud-init/files/cloud-init-20.1-gentoo-support-upstream-templates.patch
new file mode 100644
index 00000000000..c840f4fde3e
--- /dev/null
+++ b/app-emulation/cloud-init/files/cloud-init-20.1-gentoo-support-upstream-templates.patch
@@ -0,0 +1,93 @@
+From 823454f1ea140ec47f5f9c5c3c5ad62eb458eb8a Mon Sep 17 00:00:00 2001
+From: Gilles Dartiguelongue <eva@gentoo.org>
+Date: Wed, 24 Oct 2018 10:52:46 +0200
+Subject: [PATCH 2/5] Add support for gentoo in cloud.cfg and templates
+
+---
+ config/cloud.cfg.tmpl | 8 ++++++--
+ templates/hosts.gentoo.tmpl | 24 ++++++++++++++++++++++++
+ tools/render-cloudcfg | 2 +-
+ 3 files changed, 31 insertions(+), 3 deletions(-)
+ create mode 100644 templates/hosts.gentoo.tmpl
+
+diff --git a/config/cloud.cfg.tmpl b/config/cloud.cfg.tmpl
+index 1fef133a..3f5a41a2 100644
+--- a/config/cloud.cfg.tmpl
++++ b/config/cloud.cfg.tmpl
+@@ -134,7 +134,7 @@ cloud_final_modules:
+ # (not accessible to handlers/transforms)
+ system_info:
+ # This will affect which distro class gets used
+-{% if variant in ["amazon", "arch", "centos", "debian", "fedora", "freebsd", "rhel", "suse", "ubuntu"] %}
++{% if variant in ["amazon", "arch", "centos", "debian", "fedora", "freebsd", "gentoo", "rhel", "suse", "ubuntu"] %}
+ distro: {{ variant }}
+ {% else %}
+ # Unknown/fallback distro.
+@@ -172,7 +172,7 @@ system_info:
+ primary: http://ports.ubuntu.com/ubuntu-ports
+ security: http://ports.ubuntu.com/ubuntu-ports
+ ssh_svcname: ssh
+-{% elif variant in ["amazon", "arch", "centos", "fedora", "rhel", "suse"] %}
++{% elif variant in ["amazon", "arch", "centos", "fedora", "gentoo", "rhel", "suse"] %}
+ # Default user name + that default users groups (if added/used)
+ default_user:
+ name: {{ variant }}
+@@ -180,6 +180,10 @@ system_info:
+ {% endif %}
+ {% if variant == "suse" %}
+ groups: [cdrom, users]
++{% elif variant == "gentoo" %}
++ groups: [users, wheel]
++ primary_group: users
++ no_user_group: true
+ {% elif variant == "arch" %}
+ groups: [wheel, users]
+ {% else %}
+diff --git a/templates/hosts.gentoo.tmpl b/templates/hosts.gentoo.tmpl
+new file mode 100644
+index 00000000..cd045fa6
+--- /dev/null
++++ b/templates/hosts.gentoo.tmpl
+@@ -0,0 +1,24 @@
++## 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: True
++-#}
++# Your system has configured 'manage_etc_hosts' as True.
++# 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
++
+diff --git a/tools/render-cloudcfg b/tools/render-cloudcfg
+index 8b7cb875..d109044e 100755
+--- a/tools/render-cloudcfg
++++ b/tools/render-cloudcfg
+@@ -4,7 +4,7 @@ import argparse
+ import os
+ import sys
+
+-VARIANTS = ["amazon", "arch", "centos", "debian", "fedora", "freebsd", "rhel",
+- "suse", "ubuntu", "unknown"]
++VARIANTS = ["amazon", "arch", "centos", "debian", "fedora", "freebsd",
++ "gentoo", "rhel", "suse", "ubuntu", "unknown"]
+
+ if "avoid-pep8-E402-import-not-top-of-file":
+ _tdir = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
+--
+2.19.1
+
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-emulation/cloud-init/, app-emulation/cloud-init/files/
@ 2022-04-08 19:04 Matthew Thode
0 siblings, 0 replies; 8+ messages in thread
From: Matthew Thode @ 2022-04-08 19:04 UTC (permalink / raw
To: gentoo-commits
commit: f4c814c4c7ee3b4d9740fecb99394208213fb3d5
Author: Thomas Bettler <thomas.bettler <AT> gmail <DOT> com>
AuthorDate: Thu Apr 7 22:13:10 2022 +0000
Commit: Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
CommitDate: Fri Apr 8 19:03:43 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f4c814c4
app-emulation/cloud-init: bump to 22.1
Closes: https://github.com/gentoo/gentoo/pull/24949
Signed-off-by: Thomas Bettler <thomas.bettler <AT> gmail.com>
Signed-off-by: Matthew Thode <prometheanfire <AT> gentoo.org>
app-emulation/cloud-init/Manifest | 1 +
...oud-init-9999.ebuild => cloud-init-22.1.ebuild} | 23 ++++-------
app-emulation/cloud-init/cloud-init-9999.ebuild | 23 ++++-------
.../22.1-add-support-for-package_upgrade.patch | 48 ++++++++++++++++++++++
.../22.1-fix-update_package_sources-function.patch | 21 ++++++++++
5 files changed, 88 insertions(+), 28 deletions(-)
diff --git a/app-emulation/cloud-init/Manifest b/app-emulation/cloud-init/Manifest
index 52f471a1757f..2daed96816fa 100644
--- a/app-emulation/cloud-init/Manifest
+++ b/app-emulation/cloud-init/Manifest
@@ -1,2 +1,3 @@
DIST cloud-init-20.4.tar.gz 1228898 BLAKE2B c5697af31e7219a060a82732fbae2e89dd00786e5b0feb638f1f64f6ce861df041ef687a6095cc3bdb5478f4f4c1504286155808102aea9cae853caa97d4ba1b SHA512 da2fa4673b253468380c4472795fd449809c8ac84d8f13ec1472b9b7e7d54e187ae06e5a81a36774793b05f4e1212dca57bc19aa8955b4c7fa7183cb100bfbb9
DIST cloud-init-21.2.tar.gz 1278878 BLAKE2B 74e07649a24fc85df54aafcd72797a05f0bdbcceb90fe90c6af7024da09e876780b67bb1d7963cd164d03e3151715944b1f3fd5709d3557ac341a09061409fcc SHA512 8cc24945efc6f16b3c64411c5e7e5b83582d337f1c3f546163d52c14a6177ff752e91ba1fec04b7ade800f921c2b79c04d032df62c2b4171930ca1fb74c49a7d
+DIST cloud-init-22.1.tar.gz 1313034 BLAKE2B ca55378db822cdf58808de1bd2b519861c50ad8b08ed699212827833e0134fdc0968b76a4c2a13f39eae1d20ef8b22a99ff99b85ef77e496fd41593f4e2f2d55 SHA512 485e358777379a22dd2b0f6aa7afb1751eb44831c6e03ecbbd9c6823eaa20535e6e83fc245818ce1bb207425976839b356dadcfa3cfe62385b9d340b08ff21ab
diff --git a/app-emulation/cloud-init/cloud-init-9999.ebuild b/app-emulation/cloud-init/cloud-init-22.1.ebuild
similarity index 79%
copy from app-emulation/cloud-init/cloud-init-9999.ebuild
copy to app-emulation/cloud-init/cloud-init-22.1.ebuild
index c355c9f901de..ace04bcfa721 100644
--- a/app-emulation/cloud-init/cloud-init-9999.ebuild
+++ b/app-emulation/cloud-init/cloud-init-22.1.ebuild
@@ -1,9 +1,10 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
-PYTHON_COMPAT=( python3_7 python3_8 python3_9 )
-DISTUTILS_USE_SETUPTOOLS=rdepend
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{8..10} )
inherit distutils-r1
@@ -35,8 +36,8 @@ CDEPEND="
dev-python/six[${PYTHON_USEDEP}]
"
DEPEND="
- test? (
${CDEPEND}
+ test? (
>=dev-python/httpretty-0.7.1[${PYTHON_USEDEP}]
dev-python/mock[${PYTHON_USEDEP}]
dev-python/nose[${PYTHON_USEDEP}]
@@ -54,13 +55,12 @@ RDEPEND="
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}-21.2-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
+ "${FILESDIR}"/22.1-fix-update_package_sources-function.patch
+ "${FILESDIR}"/22.1-add-support-for-package_upgrade.patch
)
+distutils_enable_tests nose
+
python_prepare_all() {
# Fix location of documentation installation
sed -i "s:USR + '/share/doc/cloud-init:USR + '/share/doc/${PF}:" setup.py || die
@@ -68,11 +68,6 @@ python_prepare_all() {
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
-}
-
python_install() {
distutils-r1_python_install --init-system=sysvinit_openrc,systemd --distro gentoo
}
diff --git a/app-emulation/cloud-init/cloud-init-9999.ebuild b/app-emulation/cloud-init/cloud-init-9999.ebuild
index c355c9f901de..ace04bcfa721 100644
--- a/app-emulation/cloud-init/cloud-init-9999.ebuild
+++ b/app-emulation/cloud-init/cloud-init-9999.ebuild
@@ -1,9 +1,10 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
-PYTHON_COMPAT=( python3_7 python3_8 python3_9 )
-DISTUTILS_USE_SETUPTOOLS=rdepend
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{8..10} )
inherit distutils-r1
@@ -35,8 +36,8 @@ CDEPEND="
dev-python/six[${PYTHON_USEDEP}]
"
DEPEND="
- test? (
${CDEPEND}
+ test? (
>=dev-python/httpretty-0.7.1[${PYTHON_USEDEP}]
dev-python/mock[${PYTHON_USEDEP}]
dev-python/nose[${PYTHON_USEDEP}]
@@ -54,13 +55,12 @@ RDEPEND="
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}-21.2-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
+ "${FILESDIR}"/22.1-fix-update_package_sources-function.patch
+ "${FILESDIR}"/22.1-add-support-for-package_upgrade.patch
)
+distutils_enable_tests nose
+
python_prepare_all() {
# Fix location of documentation installation
sed -i "s:USR + '/share/doc/cloud-init:USR + '/share/doc/${PF}:" setup.py || die
@@ -68,11 +68,6 @@ python_prepare_all() {
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
-}
-
python_install() {
distutils-r1_python_install --init-system=sysvinit_openrc,systemd --distro gentoo
}
diff --git a/app-emulation/cloud-init/files/22.1-add-support-for-package_upgrade.patch b/app-emulation/cloud-init/files/22.1-add-support-for-package_upgrade.patch
new file mode 100644
index 000000000000..124b4225d830
--- /dev/null
+++ b/app-emulation/cloud-init/files/22.1-add-support-for-package_upgrade.patch
@@ -0,0 +1,48 @@
+From 7868b97507d0dd7d7721ad5c4539e22c67635f92 Mon Sep 17 00:00:00 2001
+From: Gilles Dartiguelongue <eva@gentoo.org>
+Date: Wed, 14 Nov 2018 15:58:30 +0100
+Subject: [PATCH 5/5] gentoo: add support for package_upgrade
+
+---
+diff --git a/cloudinit/distros/gentoo.py b/cloudinit/distros/gentoo.py
+index 4eb76da8..702cda8a 100644
+--- a/cloudinit/distros/gentoo.py
++++ b/cloudinit/distros/gentoo.py
+@@ -218,23 +218,26 @@ class Distro(distros.Distro):
+ distros.set_etc_timezone(tz=tz, tz_file=self._find_tz_file(tz))
+
+ def package_command(self, command, args=None, pkgs=None):
+- if pkgs is None:
+- pkgs = []
+-
+ cmd = list("emerge")
+ # Redirect output
+ cmd.append("--quiet")
+
+- if args and isinstance(args, str):
+- cmd.append(args)
+- elif args and isinstance(args, list):
+- cmd.extend(args)
++ if command == "upgrade":
++ cmd.extend(["--update", "world"])
++ else:
++ if pkgs is None:
++ pkgs = []
++
++ if args and isinstance(args, str):
++ cmd.append(args)
++ elif args and isinstance(args, list):
++ cmd.extend(args)
+
+- if command:
+- cmd.append(command)
++ if command:
++ cmd.append(command)
+
+- pkglist = util.expand_package_list("%s-%s", pkgs)
+- cmd.extend(pkglist)
++ pkglist = util.expand_package_list("%s-%s", pkgs)
++ cmd.extend(pkglist)
+
+ # Allow the output of this to flow outwards (ie not be captured)
+ subp.subp(cmd, capture=False)
diff --git a/app-emulation/cloud-init/files/22.1-fix-update_package_sources-function.patch b/app-emulation/cloud-init/files/22.1-fix-update_package_sources-function.patch
new file mode 100644
index 000000000000..7a1b938e4e60
--- /dev/null
+++ b/app-emulation/cloud-init/files/22.1-fix-update_package_sources-function.patch
@@ -0,0 +1,21 @@
+From b15c4c4b24c894b3c8d444466110c881c35525e2 Mon Sep 17 00:00:00 2001
+From: Gilles Dartiguelongue <eva@gentoo.org>
+Date: Wed, 14 Nov 2018 15:35:37 +0100
+Subject: [PATCH 4/5] gentoo: fix update_package_sources function
+
+Method is meant to update packages repository, not to update the system.
+---
+
+diff --git a/cloudinit/distros/gentoo.py b/cloudinit/distros/gentoo.py
+index 702cda8a..37217fe4 100644
+--- a/cloudinit/distros/gentoo.py
++++ b/cloudinit/distros/gentoo.py
+@@ -246,7 +246,7 @@ class Distro(distros.Distro):
+ self._runner.run(
+ "update-sources",
+ self.package_command,
+- ["-u", "world"],
++ ["--sync"],
+ freq=PER_INSTANCE,
+ )
+
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-04-08 19:04 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-19 17:37 [gentoo-commits] repo/gentoo:master commit in: app-emulation/cloud-init/, app-emulation/cloud-init/files/ Matthew Thode
-- strict thread matches above, loose matches on Subject: below --
2022-04-08 19:04 Matthew Thode
2020-02-25 17:52 Matthew Thode
2018-11-20 11:13 Gilles Dartiguelongue
2016-12-24 2:01 Matt Thode
2016-08-18 21:13 Matt Thode
2016-04-25 23:17 Robin H. Johnson
2016-01-31 23:39 Matt Thode
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox