summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation/openstack-guest-agents-unix')
-rw-r--r--app-emulation/openstack-guest-agents-unix/ChangeLog8
-rw-r--r--app-emulation/openstack-guest-agents-unix/files/0513f013625b6a652d7dcb663eb396b9b5bb924e.patch60
-rw-r--r--app-emulation/openstack-guest-agents-unix/files/4453b4773688eef6c60736d9cf07100716308a5e.patch57
-rw-r--r--app-emulation/openstack-guest-agents-unix/openstack-guest-agents-unix-1.39.1.ebuild65
4 files changed, 189 insertions, 1 deletions
diff --git a/app-emulation/openstack-guest-agents-unix/ChangeLog b/app-emulation/openstack-guest-agents-unix/ChangeLog
index 170fcd17139a..27133908f518 100644
--- a/app-emulation/openstack-guest-agents-unix/ChangeLog
+++ b/app-emulation/openstack-guest-agents-unix/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-emulation/openstack-guest-agents-unix
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/openstack-guest-agents-unix/ChangeLog,v 1.5 2014/08/23 21:53:53 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/openstack-guest-agents-unix/ChangeLog,v 1.6 2014/11/09 03:46:59 alunduil Exp $
+
+*openstack-guest-agents-unix-1.39.1 (09 Nov 2014)
+
+ 09 Nov 2014; Alex Brandt <alunduil@gentoo.org>
+ +openstack-guest-agents-unix-1.39.1.ebuild:
+ add version 1.39.1
23 Aug 2014; Ulrich Müller <ulm@gentoo.org>
files/patches-1.39.0-20140621.patch:
diff --git a/app-emulation/openstack-guest-agents-unix/files/0513f013625b6a652d7dcb663eb396b9b5bb924e.patch b/app-emulation/openstack-guest-agents-unix/files/0513f013625b6a652d7dcb663eb396b9b5bb924e.patch
new file mode 100644
index 000000000000..bf95287a86f9
--- /dev/null
+++ b/app-emulation/openstack-guest-agents-unix/files/0513f013625b6a652d7dcb663eb396b9b5bb924e.patch
@@ -0,0 +1,60 @@
+From 84e1a32ee2b8d0607f2868365aa46aaea58f014c Mon Sep 17 00:00:00 2001
+From: Nate House <nathan.house@rackspace.com>
+Date: Mon, 20 Oct 2014 18:50:52 -0500
+Subject: [PATCH] Updated regexp to work with config headers added sometime ago
+
+---
+ tests/test_resetnetwork_interfaces.py | 26 +++++++++++---------------
+ 1 file changed, 11 insertions(+), 15 deletions(-)
+
+diff --git a/tests/test_resetnetwork_interfaces.py b/tests/test_resetnetwork_interfaces.py
+index dc8e7e7..b12b84c 100644
+--- a/tests/test_resetnetwork_interfaces.py
++++ b/tests/test_resetnetwork_interfaces.py
+@@ -344,17 +344,13 @@ def test_gentoo_legacy_ipv4(self):
+
+ generated = outfiles['net'].rstrip()
+ # (todo: naterh) Update tests to mock for both ifconfig/iproute2
+- pattern = ('modules=\( "ifconfig|iproute2" \)\n*' +
++ # (todo: naterh) Remove excessive unused kwargs
++ pattern = ('.*?modules="(ifconfig|iproute2)"\n*' +
+ '# Label public\n*' +
+ 'config_eth0=\(\s*"192.0.2.42 netmask 255.255.255.0"\s*\)\n*' +
+ 'routes_eth0=\(\s*"default via 192.0.2.1"\s*\)\n*' +
+- 'dns_servers_eth0=\(\s*"192.0.2.2"\s*\)').format(
+- ip=interface['ipv4'][0][0],
+- netmask=interface['ipv4'][0][1],
+- gateway=interface['gateway4'],
+- dns=interface['dns'][0]
+- )
+- expected_regex = re.compile(pattern, re.MULTILINE)
++ 'dns_servers_eth0=\(\s*"192.0.2.2"\s*\)')
++ expected_regex = re.compile(pattern, re.DOTALL)
+
+ self.assertRegexpMatches(generated, expected_regex)
+
+@@ -373,17 +369,17 @@ def test_gentoo_legacy_ipv6(self):
+
+ # (todo: naterh) Update tests to mock for both ifconfig/iproute2
+ generated = outfiles['net'].rstrip()
+- pattern = ('modules=\( "ifconfig|iproute2" \)\n*' +
++ pattern = ('.*?modules="(ifconfig|iproute2)"\n*' +
+ '# Label public\n*' +
+ 'config_eth0=\(\s*"{ip}/{netmask_len}"\s*\)\n*' +
+ 'routes_eth0=\(\s*"default via {gateway}"\s*\)\n*' +
+ 'dns_servers_eth0=\(\s*"{dns}"\s*\)').format(
+- ip=interface['ipv6'][0][0],
+- netmask_len=interface['ipv6'][0][1],
+- gateway=interface['gateway6'],
+- dns=interface['dns'][0]
+- )
+- expected_regex = re.compile(pattern, re.MULTILINE)
++ ip=interface['ipv6'][0][0],
++ netmask_len=interface['ipv6'][0][1],
++ gateway=interface['gateway6'],
++ dns=interface['dns'][0]
++ )
++ expected_regex = re.compile(pattern, re.DOTALL)
+
+ self.assertRegexpMatches(generated, expected_regex)
+
diff --git a/app-emulation/openstack-guest-agents-unix/files/4453b4773688eef6c60736d9cf07100716308a5e.patch b/app-emulation/openstack-guest-agents-unix/files/4453b4773688eef6c60736d9cf07100716308a5e.patch
new file mode 100644
index 000000000000..ea506845ed36
--- /dev/null
+++ b/app-emulation/openstack-guest-agents-unix/files/4453b4773688eef6c60736d9cf07100716308a5e.patch
@@ -0,0 +1,57 @@
+From 4453b4773688eef6c60736d9cf07100716308a5e Mon Sep 17 00:00:00 2001
+From: Nate House <nathan.house@rackspace.com>
+Date: Sun, 19 Oct 2014 15:49:35 -0500
+Subject: [PATCH] Updated tests to check for either ifconfig/iproute2
+
+---
+ tests/test_resetnetwork_interfaces.py | 13 ++++++++-----
+ 1 file changed, 8 insertions(+), 5 deletions(-)
+
+diff --git a/tests/test_resetnetwork_interfaces.py b/tests/test_resetnetwork_interfaces.py
+index f2b73bf..dc8e7e7 100644
+--- a/tests/test_resetnetwork_interfaces.py
++++ b/tests/test_resetnetwork_interfaces.py
+@@ -343,8 +343,8 @@ def test_gentoo_legacy_ipv4(self):
+ self.assertTrue('net' in outfiles)
+
+ generated = outfiles['net'].rstrip()
+-
+- pattern = ('modules=\( "ifconfig" \)\n*' +
++ # (todo: naterh) Update tests to mock for both ifconfig/iproute2
++ pattern = ('modules=\( "ifconfig|iproute2" \)\n*' +
+ '# Label public\n*' +
+ 'config_eth0=\(\s*"192.0.2.42 netmask 255.255.255.0"\s*\)\n*' +
+ 'routes_eth0=\(\s*"default via 192.0.2.1"\s*\)\n*' +
+@@ -371,8 +371,9 @@ def test_gentoo_legacy_ipv6(self):
+
+ self.assertTrue('net' in outfiles)
+
++ # (todo: naterh) Update tests to mock for both ifconfig/iproute2
+ generated = outfiles['net'].rstrip()
+- pattern = ('modules=\( "ifconfig" \)\n*' +
++ pattern = ('modules=\( "ifconfig|iproute2" \)\n*' +
+ '# Label public\n*' +
+ 'config_eth0=\(\s*"{ip}/{netmask_len}"\s*\)\n*' +
+ 'routes_eth0=\(\s*"default via {gateway}"\s*\)\n*' +
+@@ -399,8 +400,9 @@ def test_gentoo_openrc_ipv4(self):
+
+ self.assertTrue('net' in outfiles)
+
++ # (todo: naterh) Update tests to mock for both ifconfig/iproute2
+ generated = outfiles['net'].rstrip()
+- pattern = ('modules="ifconfig"\n*' +
++ pattern = ('modules="ifconfig|iproute2"\n*' +
+ '# Label public\n*' +
+ 'config_eth0="\s*{ip}/{netmask_len}\s*"\n*' +
+ 'routes_eth0="\s*default via {gateway}\s*"\n*' +
+@@ -429,8 +431,9 @@ def test_gentoo_openrc_ipv6(self):
+
+ self.assertTrue('net' in outfiles)
+
++ # (todo: naterh) Update tests to mock for both ifconfig/iproute2
+ generated = outfiles['net'].rstrip()
+- pattern = ('modules="ifconfig"\n*' +
++ pattern = ('modules="ifconfig|iproute2"\n*' +
+ '# Label public\n*' +
+ 'config_eth0="\s*{ip}/{netmask_len}\s*"\n*' +
+ 'routes_eth0="\s*default via {gateway}\s*"\n*' +
diff --git a/app-emulation/openstack-guest-agents-unix/openstack-guest-agents-unix-1.39.1.ebuild b/app-emulation/openstack-guest-agents-unix/openstack-guest-agents-unix-1.39.1.ebuild
new file mode 100644
index 000000000000..bfc404e5130a
--- /dev/null
+++ b/app-emulation/openstack-guest-agents-unix/openstack-guest-agents-unix-1.39.1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/openstack-guest-agents-unix/openstack-guest-agents-unix-1.39.1.ebuild,v 1.1 2014/11/09 03:46:59 alunduil Exp $
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils python-single-r1 vcs-snapshot
+
+DESCRIPTION="Openstack Unix Guest Agent"
+HOMEPAGE="http://github.com/rackerlabs/openstack-guest-agents-unix"
+SRC_URI="https://github.com/rackerlabs/${PN}/tarball/${PV} -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="test"
+
+CDEPEND="
+ dev-python/pycrypto[${PYTHON_USEDEP}]
+ dev-python/pyxenstore[${PYTHON_USEDEP}]
+ dev-util/patchelf
+ ${PYTHON_DEPS}
+"
+DEPEND="
+ ${CDEPEND}
+ test? (
+ dev-python/mox[${PYTHON_USEDEP}]
+ dev-python/unittest2[${PYTHON_USEDEP}]
+ )
+"
+RDEPEND="${CDEPEND}"
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/4453b4773688eef6c60736d9cf07100716308a5e.patch \
+ "${FILESDIR}"/0513f013625b6a652d7dcb663eb396b9b5bb924e.patch
+
+ # Note: https://github.com/rackerlabs/openstack-guest-agents-unix/issues/52
+ ebegin 'patching tests/test_injectfile.py'
+ sed \
+ -e '97,127 d' \
+ -i tests/test_injectfile.py
+ STATUS=$?
+ eend ${STATUS}
+ [[ ${STATUS} -gt 0 ]] && die
+
+ eautoreconf
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ doinitd scripts/gentoo/nova-agent
+}
+
+pkg_postinst() {
+ elog "If you would like to utilize openstack-guest-agents-unix, add 'nova-agent' to"
+ elog "your 'default' runlevel:"
+ elog " rc-update add nova-agent default"
+}