From 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 14 Jul 2018 21:03:06 +0100 Subject: gentoo resync : 14.07.2018 --- app-emulation/openstack-guest-agents-unix/Manifest | 13 + .../0513f013625b6a652d7dcb663eb396b9b5bb924e.patch | 60 ++++ .../4453b4773688eef6c60736d9cf07100716308a5e.patch | 57 ++++ ...penstack-guest-agents-unix-1.39.0-python2.patch | 15 + .../files/patches-1.39.0-20140621.patch | 323 +++++++++++++++++++++ .../openstack-guest-agents-unix/metadata.xml | 10 + .../openstack-guest-agents-unix-1.39.0-r1.ebuild | 39 +++ .../openstack-guest-agents-unix-1.39.0-r2.ebuild | 44 +++ .../openstack-guest-agents-unix-1.39.0.ebuild | 31 ++ .../openstack-guest-agents-unix-1.39.1.ebuild | 65 +++++ ...stack-guest-agents-unix-1.39.1_p20170227.ebuild | 73 +++++ 11 files changed, 730 insertions(+) create mode 100644 app-emulation/openstack-guest-agents-unix/Manifest create mode 100644 app-emulation/openstack-guest-agents-unix/files/0513f013625b6a652d7dcb663eb396b9b5bb924e.patch create mode 100644 app-emulation/openstack-guest-agents-unix/files/4453b4773688eef6c60736d9cf07100716308a5e.patch create mode 100644 app-emulation/openstack-guest-agents-unix/files/openstack-guest-agents-unix-1.39.0-python2.patch create mode 100644 app-emulation/openstack-guest-agents-unix/files/patches-1.39.0-20140621.patch create mode 100644 app-emulation/openstack-guest-agents-unix/metadata.xml create mode 100644 app-emulation/openstack-guest-agents-unix/openstack-guest-agents-unix-1.39.0-r1.ebuild create mode 100644 app-emulation/openstack-guest-agents-unix/openstack-guest-agents-unix-1.39.0-r2.ebuild create mode 100644 app-emulation/openstack-guest-agents-unix/openstack-guest-agents-unix-1.39.0.ebuild create mode 100644 app-emulation/openstack-guest-agents-unix/openstack-guest-agents-unix-1.39.1.ebuild create mode 100644 app-emulation/openstack-guest-agents-unix/openstack-guest-agents-unix-1.39.1_p20170227.ebuild (limited to 'app-emulation/openstack-guest-agents-unix') diff --git a/app-emulation/openstack-guest-agents-unix/Manifest b/app-emulation/openstack-guest-agents-unix/Manifest new file mode 100644 index 000000000000..63adae1caf94 --- /dev/null +++ b/app-emulation/openstack-guest-agents-unix/Manifest @@ -0,0 +1,13 @@ +AUX 0513f013625b6a652d7dcb663eb396b9b5bb924e.patch 2829 BLAKE2B a7fa55afb736dcf48e86f9ece1a626017f8e8cb3911de5b5bc51bff1a98abaea57497f38b8cabe7d22d2b0cda0af4d23cb559d47f7f92cbf86ed14921da9f17d SHA512 4394b16194411c8b5d7c258681a9bfde8d384fffb0c254e2d3a5cd85ecf58af369c7d286d40dcf9b215c96b7ec29ec49f7a9640b3c525f9c718c8aabc428d211 +AUX 4453b4773688eef6c60736d9cf07100716308a5e.patch 2604 BLAKE2B f586e6341e95e5ce7a6e241463080892ba164f26333c832ee403edc8f4bf574adb57196092a5b78b4aeaac843a411a16f7fd219626611f13ba8a8c730069d325 SHA512 2841a9529649cdc1631bb95f52c8bd5ef440258d81ff07f77cf97c70bb1e554883a59116f806f05b5f4a7035a7ca2fa0abab9df4d0159ae202069894731a758b +AUX openstack-guest-agents-unix-1.39.0-python2.patch 882 BLAKE2B 86e5e3c87e08e7d61b5199c161599be15f7153f2f0d45c34775084dec3f55851165d65dfd8ccdc40a1e77826d996b07e516d2cfb13b412e8228dc87734e93e58 SHA512 573dc02f578894c0df8f4c7ff9f4064ea94a2e17c35bef689dfe348f8611302cdc1a6a2126188cc2c4383e1a484e3acea180365ee555a5bdfac749c857828380 +AUX patches-1.39.0-20140621.patch 13058 BLAKE2B aa9ddf619bc57bc164aeb976545d2105e0fa105ea61f164d1b52357299febb19a5f501260dfee57e220dbd6154848c3488ba628a1f41dc24d5b9fb62246eb45a SHA512 562aaae73acfd92a7af5d1cb7dfed52c07a1b94ce1b1bb645002515344aeba6c0737eeb4db120986495c8f6558ebf68d9cbe3862da2f0fe14d4266d0470fe185 +DIST openstack-guest-agents-unix-1.39.0.tar.gz 75013 BLAKE2B 4245fb6fa2f8344469b264d1e9eee39e1914f76a33f54677d36ca854feb5a0548454af00cf02db9c5f2f0b6e68de9dc19fcf62a604b5d55fab96b20ed70a507e SHA512 4f7c4c1f2bc2c8ebda25dc8c0fa79c39e8e5a83040ff103f8c583d9142e71c6527d23e430da983e3a8c9add508298c31ec13a7e56d1db3b5338736dd470fec80 +DIST openstack-guest-agents-unix-1.39.1.tar.gz 75458 BLAKE2B 6afcf0cb40c7f24f7ea6ea8ca8af40373ce2fcbfffc5a8cae65e2ed8bf7003eb498b4592fa215e57a20e3c5d11064cfa4629b79eb94712ebb0ad5b09459fe815 SHA512 b1e88bb3492018375e7b2275829e2698d82d75c975a396ab7409c9b88f7787145b0da87c81a089aa8914fae30e996654b589bc1675bba769b661d7d1deb9590d +DIST openstack-guest-agents-unix-1.39.1_p20170227.zip 143082 BLAKE2B 78835e6ff4cc5975e08d1e8f3fd39f2fb4efdc3ec1078f014c79648e5299acf81804c2257e878ff6dc158f32cc4dac2ec25ba93791f5581538c6e2762c35320c SHA512 f4ef4ca4d844109ef741126eee7c313734f5faefcf68926294c83411384eb7461c779070ed0bfcc35ffba56ef47e2677bf4b990dccd9007aa6b82551346dca8f +EBUILD openstack-guest-agents-unix-1.39.0-r1.ebuild 939 BLAKE2B 851af6f0a387a4acc821768156aaee12fe15ddb42165830d864cd2d76afd88818b4ff445a758e2f45a722ea4466b77779b0889e64ca06aa9495587219be376e7 SHA512 df63509a304e16fbd222e3b6234be09fe04771f04a85e83d0638bf11ae1c22a79955e719f50917ecb367aff928226692e298e1c6b8bbfadaf461c9a18a39ad18 +EBUILD openstack-guest-agents-unix-1.39.0-r2.ebuild 1175 BLAKE2B d32e75df33806cb4e6a5a07c4270ebd717a8d9266fcbd5d5c1fad558715e5863ddd6e799e94c657fe21a8657865b58c72bbe5affc10d73453ca3e006390243cf SHA512 45fe477835854f74c4739ff58180ac12e59c76f20636d11e8a22fc27e13e897a76840f2ac847a3144808b4fa923d95696aafead0d069acc36132cd114c80f380 +EBUILD openstack-guest-agents-unix-1.39.0.ebuild 610 BLAKE2B ae5c7e6c520e9baf3db5f3a5b7f4210e292727e865c8cf2cb023ef4dece9bcc470e815a8cbec119201fe7cd45f4e2cc4877890fb560ff1df4bbef47cbe803863 SHA512 513e7e710b81cd33f3dec761baeb9c769b042014bc7a05275cb400cfef591e1dc71055cc3ebab195cb009be907645b0b00c317f15e0b1a944fda4cb76c0e393f +EBUILD openstack-guest-agents-unix-1.39.1.ebuild 1461 BLAKE2B 6af82a08b86a7a24e49be92ae953158e278fe6ccf07e0d06d1f49bcae5e83daf8f11e99b7680b2e4786a3036a9452d08d4cfedecd3cfa6487e528147761abb54 SHA512 fc3b5a8fa6a1c4728dbf4114274ed8a02dabd4dd93b7a407a25a3ae0acc3a22adf86051022d1ed4ed9fcc6f1f4a618e9d1acc3472a4d0807979e41062ba7b09a +EBUILD openstack-guest-agents-unix-1.39.1_p20170227.ebuild 1674 BLAKE2B 97c825197fb69d61f11cb299434130c16455e10669ee1e27e1d8d818d97c85055ff0306befaec7a3fc7f6f14785a1cf5cbc4cebbc4924a57c2b3fb6f67101c76 SHA512 d23db9a2d138b5227087b3aff4bf96710bacc8cd320b51582ec1d13a90e9ee141e8ae2e7077d3230eb4877cf5b4b5b4599831936ff5cceec313866a9cabb06f1 +MISC metadata.xml 329 BLAKE2B a2fdd220d42ab64eceb8ed37e7646523856b3a3578a0e1e811fcc70730c6090234d2d270ddc6dc8175088eda91b73e3905b47d19fc2e118b11667b37215769a5 SHA512 853f823555872a4294c7c6aff0b51a9e348fde71767ecf24c8f6e83002caa8c26767c7ab36d4231d14520d8689994b4dc924e3d3721528a8bd697f44783dffab 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 +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 +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/files/openstack-guest-agents-unix-1.39.0-python2.patch b/app-emulation/openstack-guest-agents-unix/files/openstack-guest-agents-unix-1.39.0-python2.patch new file mode 100644 index 000000000000..0010e9ea5eae --- /dev/null +++ b/app-emulation/openstack-guest-agents-unix/files/openstack-guest-agents-unix-1.39.0-python2.patch @@ -0,0 +1,15 @@ +diff -Nuar openstack-guest-agents-unix-1.39.0.orig/scripts/gentoo/nova-agent.in openstack-guest-agents-unix-1.39.0/scripts/gentoo/nova-agent.in +--- openstack-guest-agents-unix-1.39.0.orig/scripts/gentoo/nova-agent.in 2013-12-31 02:02:57.000000000 -0800 ++++ openstack-guest-agents-unix-1.39.0/scripts/gentoo/nova-agent.in 2014-06-21 17:20:01.527148493 -0700 +@@ -35,8 +35,9 @@ + NOVA_PYTHONPATH="${reallibdir}/${NOVA_PYTHONPATH}" + NOVA_PYTHONPATH="${NOVA_PYTHONPATH}:${NOVA_PYTHONPATH}/site-packages" + +-if [ `which python > /dev/null 2>&1 ; echo $?` -eq 0 ]; then +- PYTHONPATH="$(python -c 'import sys; print ":".join(sys.path)')" ++PYTHON=python2 ++if [ `which $PYTHON > /dev/null 2>&1 ; echo $?` -eq 0 ]; then ++ PYTHONPATH="$($PYTHON -c 'import sys; print ":".join(sys.path)')" + fi + export PYTHONPATH="$NOVA_PYTHONPATH:$PYTHONPATH" + export PYTHONHOME="$NOVA_PYTHONPATH:$PYTHONPATH" diff --git a/app-emulation/openstack-guest-agents-unix/files/patches-1.39.0-20140621.patch b/app-emulation/openstack-guest-agents-unix/files/patches-1.39.0-20140621.patch new file mode 100644 index 000000000000..c275982fa94b --- /dev/null +++ b/app-emulation/openstack-guest-agents-unix/files/patches-1.39.0-20140621.patch @@ -0,0 +1,323 @@ +commit fc8c9fe076e321ff98cc6717abbb21ee57808c52 +Merge: eaaae09 1ecec49 +Author: teran-mckinney +Date: Wed Apr 30 15:33:43 2014 +0000 + + Merge pull request #43 from gtmanfred/master + + sbindir changes to exec_prefix + +commit eaaae09c27a33998374a8d63702c75b04ab3e5c2 +Merge: 773e431 1505a5a +Author: teran-mckinney +Date: Tue Apr 29 18:21:27 2014 +0000 + + Merge pull request #45 from leader716/master + + Added addditional logic to deterine if the hardware address for and inte... + +commit 1505a5a8e180910c3307bf04ccfc4eed09c0f40a +Author: John Ward +Date: Tue Apr 29 14:28:34 2014 +0000 + + Added addditional logic to deterine if the hardware address for and interface is 0x0 if so go to the next interface. + I put this into place to handle tun adapters that have a hardware address of 0x0 which was causing the agent to + segfault when it encounterd this type of adapter. + +commit 1ecec499d5bea73980a8aec992b394339acc83c7 +Author: Daniel Wallace +Date: Fri Apr 25 20:38:35 2014 -0500 + + sbindir changes to exec_prefix + + Systemd requires a full path for the start of the command, and there + isn't one that isn't a nice way to change this. + +commit 773e431997a6612cbda9f11ec9d57f5685a29eea +Merge: 1ca2056 12c0294 +Author: teran-mckinney +Date: Fri Apr 25 18:41:56 2014 +0000 + + Merge pull request #39 from Camisa/master + + nova-agent should replace the Slice or Image ID rather than append + +commit 1ca2056a455f8075ed951f0a82b92820c0b33b54 +Merge: 1b05c75 f9a365e +Author: teran-mckinney +Date: Fri Apr 25 18:40:29 2014 +0000 + + Merge pull request #42 from gtmanfred/master + + Do not add static routes that are the default route, if a default gateway already exists. + + Courtesy of gtmanfred. Thank you! + +commit f9a365e7a9543d407ca9d75164688faa0ff53528 +Author: Daniel Wallace +Date: Fri Apr 25 10:54:29 2014 -0500 + + remove extra and from debian network.py + +commit 387d4e77695598a07be9e4593c5b236b81a1aeea +Author: Daniel Wallace +Date: Fri Apr 25 09:31:15 2014 -0500 + + Do not add static routes that are the default route + +commit 1b05c75530c8b4cbf5347e84815e275ee0bbacd4 +Author: teran-mckinney +Date: Thu Feb 13 19:26:36 2014 +0000 + + Fix nova-agent not starting on some systems + + data/host existing could cause a fault on xs_handle.mkdir(self.request_path) if request_path (data/host) already existed. Wrap it in a try/except clause to ignore the fault as if the directory already exists, there's no reason to throw an exception while trying to create it. + + Workaround without this patch is to xenstore-rm data/host from affected VMs, or to do it from dom0 with the full path. + +commit 12c02941ef02dc6645e6d4700e8a028decbf0c19 +Author: Christopher J. Camisa +Date: Thu Jan 30 03:11:51 2014 -0600 + + nova-agent should replace the Slice or Image ID rather than append + +commit ce388bf600136736fdb790edef58a57aad8adfc1 +Author: AbhishekKr +Date: Tue Jan 21 17:22:23 2014 +0530 + + shebang fixed for installer.sh and bintar script; gitignore updated + +commit 91fe7d0262fe8ad685a287df291b504250b1184c +Author: AbhishekKr +Date: Fri Jan 3 16:51:54 2014 +0530 + + FreeBSD changed ports, so bintar creation script need to +diff --git a/.gitignore b/.gitignore +index ae1ae1b..6bdeda8 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -55,3 +55,4 @@ unix/scripts/generic/nova-agent + unix/scripts/gentoo/nova-agent + unix/scripts/freebsd/nova-agent + .idea/* ++**/.venv +diff --git a/commands/arch/network.py b/commands/arch/network.py +index 1d698ca..2bc0aff 100644 +--- a/commands/arch/network.py ++++ b/commands/arch/network.py +@@ -373,6 +373,11 @@ def _update_rc_conf_legacy(infile, interfaces): + ifaces.append((ifname.replace(':', '_'), ' '.join(line))) + + for i, route in enumerate(interface['routes']): ++ if route['network'] == '0.0.0.0' and \ ++ route['netmask'] == '0.0.0.0' and \ ++ route['gateway'] == gateway4: ++ continue ++ + line = "-net %(network)s netmask %(netmask)s gw %(gateway)s" % \ + route + +@@ -499,7 +504,10 @@ def _get_file_data_netctl(ifname, interface): + print >>outfile, 'Gateway6=%s' % gateway6 + + routes = ['%(network)s/%(netmask)s via %(gateway)s' % route +- for route in interface['routes']] ++ for route in interface['routes'] if not ++ route['network'] == '0.0.0.0' and not ++ route['netmask'] == '0.0.0.0' and not ++ route['gateway'] == gateway4] + + if routes: + print >>outfile, 'Routes=(\'%s\')' % '\' \''.join(routes) +@@ -552,7 +560,10 @@ def _get_file_data_netcfg(ifname, interface): + print >>outfile, 'GATEWAY6="%s"' % gateway6 + + routes = ['"%(network)s/%(netmask)s via %(gateway)s"' % route +- for route in interface['routes']] ++ for route in interface['routes'] if not ++ route['network'] == '0.0.0.0' and not ++ route['netmask'] == '0.0.0.0' and not ++ route['gateway'] == gateway4] + + if routes: + print >>outfile, 'ROUTES=(%s)' % ' '.join(routes) +diff --git a/commands/debian/network.py b/commands/debian/network.py +index d91d602..3b82d97 100644 +--- a/commands/debian/network.py ++++ b/commands/debian/network.py +@@ -234,6 +234,11 @@ def _get_file_data(interfaces): + ifname_suffix_num += 1 + + for route in interface['routes']: ++ if route['network'] == '0.0.0.0' \ ++ and route['netmask'] == '0.0.0.0'\ ++ and 'gateway4' in interface \ ++ and route['gateway'] == interface['gateway4']: ++ continue + file_data += " post-up route add -net %(network)s " \ + "netmask %(netmask)s gw %(gateway)s || true\n" % route + file_data += " pre-down route del -net %(network)s " \ +diff --git a/commands/freebsd/network.py b/commands/freebsd/network.py +index 2d5d7f1..87e5e9e 100644 +--- a/commands/freebsd/network.py ++++ b/commands/freebsd/network.py +@@ -211,6 +211,10 @@ def _create_rcconf_file(infile, interfaces, hostname): + ifname_suffix_num += 1 + + for route in interface['routes']: ++ if route['network'] == '0.0.0.0' and \ ++ route['netmask'] == '0.0.0.0' and \ ++ route['gateway'] == gateway4: ++ continue + if ':' in route['network']: + # ipv6 + fmt = '-net %(network)s/%(netmask)s %(gateway)s' +diff --git a/commands/gentoo/network.py b/commands/gentoo/network.py +index f3ceff5..f3e5251 100644 +--- a/commands/gentoo/network.py ++++ b/commands/gentoo/network.py +@@ -199,7 +199,11 @@ def _confd_net_file(interfaces): + lines.extend([ " {0}/{1} via {2}".format(route['network'], + commands.network.NETMASK_TO_PREFIXLEN[route['netmask']], + route['gateway'] +- ) for route in interface['routes'] ]) ++ ) for route in interface['routes'] if not ++ route['network'] == '0.0.0.0' and not ++ route['netmask'] == '0.0.0.0' and ++ 'gateway4' in interface and not ++ route['gateway'] == interface['gateway4']]) + if 'gateway4' in interface and interface['gateway4']: + lines.append(" default via {0}".format(interface['gateway4'])) + if 'gateway6' in interface and interface['gateway6']: +@@ -247,7 +251,11 @@ def _confd_net_file_legacy(interfaces): + lines.append("routes_{0}=(".format(name)) + lines.extend([ " \"{0} netmask {1} gw {2}\"".format( + route['network'], route['netmask'], route['gateway'] +- ) for route in interface['routes'] ]) ++ ) for route in interface['routes'] if not ++ route['network'] == '0.0.0.0' and not ++ route['netmask'] == '0.0.0.0' and ++ 'gateway4' in interface and not ++ route['gateway'] == interface['gateway4'] ]) + if 'gateway4' in interface and interface['gateway4']: + lines.append(" \"default via {0}\"".format(interface['gateway4'])) + if 'gateway6' in interface and interface['gateway6']: +diff --git a/commands/redhat/network.py b/commands/redhat/network.py +index a85ed6b..e853fbd 100644 +--- a/commands/redhat/network.py ++++ b/commands/redhat/network.py +@@ -202,6 +202,11 @@ def _get_file_data(ifname_prefix, interface): + + route_data = '' + for i, route in enumerate(interface['routes']): ++ if route['network'] == '0.0.0.0' and \ ++ route['netmask'] == '0.0.0.0' and \ ++ 'gateway4' in interface and \ ++ route['gateway'] == interface['gateway4']: ++ continue + route_data += "ADDRESS%d=%s\n" % (i, route['network']) + route_data += "NETMASK%d=%s\n" % (i, route['netmask']) + route_data += "GATEWAY%d=%s\n" % (i, route['gateway']) +diff --git a/commands/suse/network.py b/commands/suse/network.py +index 2947974..baad7b2 100644 +--- a/commands/suse/network.py ++++ b/commands/suse/network.py +@@ -191,6 +191,10 @@ def _get_file_data(ifname, interface): + + route_data = '' + for route in interface['routes']: ++ if route['network'] == '0.0.0.0' and \ ++ route['netmask'] == '0.0.0.0' and \ ++ route['gateway'] == gateway4: ++ continue + network = route['network'] + netmask = route['netmask'] + gateway = route['gateway'] +diff --git a/lib/agentlib.c b/lib/agentlib.c +index ccba6e3..cced430 100644 +--- a/lib/agentlib.c ++++ b/lib/agentlib.c +@@ -73,7 +73,10 @@ static PyObject *_agentlib_get_interfaces(PyObject *self, PyObject *args) + goto next; + + #if defined(__linux__) +- if (ifa->ifa_addr->sa_family != PF_PACKET) ++ if (ifa->ifa_addr == NULL) ++ goto next; ++ ++ if (ifa->ifa_addr->sa_family != PF_PACKET) + goto next; + + struct sockaddr_ll *sll = (struct sockaddr_ll *)ifa->ifa_addr; +diff --git a/plugins/xscomm.py b/plugins/xscomm.py +index e3faa2e..9b8a33b 100644 +--- a/plugins/xscomm.py ++++ b/plugins/xscomm.py +@@ -41,7 +41,11 @@ class XSComm(object): + XENSTORE_RESPONSE_PATH) + + self.xs_handle = pyxenstore.Handle() +- self.xs_handle.mkdir(self.request_path) ++ try: ++ self.xs_handle.mkdir(self.request_path) ++ except: ++ pass ++ + self.requests = [] + + def _check_handle(self): +diff --git a/scripts/gentoo/nova-agent.in b/scripts/gentoo/nova-agent.in +index a043394..7f2687e 100755 +--- a/scripts/gentoo/nova-agent.in ++++ b/scripts/gentoo/nova-agent.in +@@ -59,7 +59,7 @@ start() { + /usr/bin/xenstore write data/host/system-init '{"name":"resetnetwork","value":""}' + /usr/bin/xenstore watch -n 1 data/guest/system-init >/dev/null + [ "$(/usr/bin/xenstore read data/guest/system-init | wc -l)" -gt "0" ] || eend 1 +- echo "UUID=\"$(/usr/bin/xenstore read name)\"" >> /etc/conf.d/nova-agent ++ echo "UUID=\"$(/usr/bin/xenstore read name)\"" > /etc/conf.d/nova-agent + fi + + eend $RET +diff --git a/scripts/installer.sh.in b/scripts/installer.sh.in +index 8ef793d..3fbf352 100755 +--- a/scripts/installer.sh.in ++++ b/scripts/installer.sh.in +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/usr/bin/env bash + + # vim: tabstop=4 shiftwidth=4 softtabstop=4 + # +diff --git a/scripts/systemd/nova-agent.service.in b/scripts/systemd/nova-agent.service.in +index 9d8a4a7..b73ebbe 100644 +--- a/scripts/systemd/nova-agent.service.in ++++ b/scripts/systemd/nova-agent.service.in +@@ -4,7 +4,7 @@ Description=nova-agent service + [Service] + Environment=LD_LIBRARY_PATH=@prefix@/share/@PACKAGE@/@PACKAGE_VERSION@/lib + EnvironmentFile=-/etc/nova-agent.env +-ExecStart=@sbindir@/nova-agent -n -l info @prefix@/share/@PACKAGE@/nova-agent.py ++ExecStart=@prefix@/sbin/nova-agent -n -l info @prefix@/share/@PACKAGE@/nova-agent.py + + + [Install] +diff --git a/tools/nova-agent-builder.sh b/tools/nova-agent-builder.sh +index 1823639..fcaa7c7 100755 +--- a/tools/nova-agent-builder.sh ++++ b/tools/nova-agent-builder.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/usr/bin/env bash + ##### NOVA AGENT BUILDER + ##### how_to:$ sh nova-agent-builder.sh help + ##### W.I.P. works fine for most of cases, +@@ -202,7 +202,7 @@ install_pre_requisite_freebsd(){ + export INSTALL_D="" + uname -a + +- pkg_add -r git autogen automake wget bash ++ pkg_add -r git autogen automake wget bash libtool + pkg_add -r py27-unittest2 py27-cryptkit py27-pycrypto py27-mox + + # re-install xen-tool :: required for pyxenstore install diff --git a/app-emulation/openstack-guest-agents-unix/metadata.xml b/app-emulation/openstack-guest-agents-unix/metadata.xml new file mode 100644 index 000000000000..9ece78e0b73c --- /dev/null +++ b/app-emulation/openstack-guest-agents-unix/metadata.xml @@ -0,0 +1,10 @@ + + + + + robbat2@gentoo.org + + + rackerlabs/openstack-guest-agents-unix + + diff --git a/app-emulation/openstack-guest-agents-unix/openstack-guest-agents-unix-1.39.0-r1.ebuild b/app-emulation/openstack-guest-agents-unix/openstack-guest-agents-unix-1.39.0-r1.ebuild new file mode 100644 index 000000000000..ef90ea71bc02 --- /dev/null +++ b/app-emulation/openstack-guest-agents-unix/openstack-guest-agents-unix-1.39.0-r1.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) # does not work with py3 yet + +inherit autotools eutils vcs-snapshot python-single-r1 + +DESCRIPTION="Openstack Unix Guest Agent" +HOMEPAGE="https://github.com/rackerlabs/openstack-guest-agents-unix" +SRC_URI="https://github.com/rackerlabs/${PN}/tarball/v${PV} -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND="dev-util/patchelf + dev-python/pycrypto[${PYTHON_USEDEP}] + dev-python/pyxenstore[${PYTHON_USEDEP}] + ${PYTHON_DEPS}" +DEPEND="${RDEPEND}" + +pkg_setup() { + python-single-r1_pkg_setup +} + +src_prepare() { + epatch \ + "${FILESDIR}"/patches-1.39.0-20140621.patch \ + "${FILESDIR}"/openstack-guest-agents-unix-1.39.0-python2.patch + eautoreconf +} + +src_install() { + emake DESTDIR="${D}" install + doinitd scripts/gentoo/nova-agent +} diff --git a/app-emulation/openstack-guest-agents-unix/openstack-guest-agents-unix-1.39.0-r2.ebuild b/app-emulation/openstack-guest-agents-unix/openstack-guest-agents-unix-1.39.0-r2.ebuild new file mode 100644 index 000000000000..d3efb5aa64c5 --- /dev/null +++ b/app-emulation/openstack-guest-agents-unix/openstack-guest-agents-unix-1.39.0-r2.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) # does not work with py3 yet + +inherit autotools eutils vcs-snapshot python-single-r1 + +DESCRIPTION="Openstack Unix Guest Agent" +HOMEPAGE="https://github.com/rackerlabs/openstack-guest-agents-unix" +SRC_URI="https://github.com/rackerlabs/${PN}/tarball/v${PV} -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND="dev-util/patchelf + dev-python/pycrypto[${PYTHON_USEDEP}] + dev-python/pyxenstore[${PYTHON_USEDEP}] + ${PYTHON_DEPS}" +DEPEND="${RDEPEND}" + +pkg_setup() { + python-single-r1_pkg_setup +} + +src_prepare() { + epatch \ + "${FILESDIR}"/patches-1.39.0-20140621.patch \ + "${FILESDIR}"/openstack-guest-agents-unix-1.39.0-python2.patch + # Ignore the deps of install-exec-local + sed -i -e '/^install-exec-local:/s,:.*,:,g' Makefile.am + # bashism fix + sed -r -i -e '/^export ([A-Z_]+)/{ s,^export ,,g; s,^([A-Z0-9_]+)(.*),\1\2; export \1,g; }' scripts/gentoo/nova-agent.in + + eautoreconf +} + +src_install() { + emake DESTDIR="${D}" install + doinitd scripts/gentoo/nova-agent +} diff --git a/app-emulation/openstack-guest-agents-unix/openstack-guest-agents-unix-1.39.0.ebuild b/app-emulation/openstack-guest-agents-unix/openstack-guest-agents-unix-1.39.0.ebuild new file mode 100644 index 000000000000..46959c8c3844 --- /dev/null +++ b/app-emulation/openstack-guest-agents-unix/openstack-guest-agents-unix-1.39.0.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit autotools eutils vcs-snapshot + +DESCRIPTION="Openstack Unix Guest Agent" +HOMEPAGE="https://github.com/rackerlabs/openstack-guest-agents-unix" +SRC_URI="https://github.com/rackerlabs/${PN}/tarball/v${PV} -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +DEPEND=" + dev-util/patchelf + dev-python/pycrypto + dev-python/pyxenstore + " +RDEPEND="${DEPEND}" + +src_prepare() { + eautoreconf +} + +src_install() { + emake DESTDIR="${D}" install + doinitd scripts/gentoo/nova-agent +} 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..0da3fbbb7ff5 --- /dev/null +++ b/app-emulation/openstack-guest-agents-unix/openstack-guest-agents-unix-1.39.1.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) + +inherit autotools eutils python-single-r1 vcs-snapshot + +DESCRIPTION="Openstack Unix Guest Agent" +HOMEPAGE="https://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" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +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" +} diff --git a/app-emulation/openstack-guest-agents-unix/openstack-guest-agents-unix-1.39.1_p20170227.ebuild b/app-emulation/openstack-guest-agents-unix/openstack-guest-agents-unix-1.39.1_p20170227.ebuild new file mode 100644 index 000000000000..55c5697d99b9 --- /dev/null +++ b/app-emulation/openstack-guest-agents-unix/openstack-guest-agents-unix-1.39.1_p20170227.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +PYTHON_COMPAT=( python2_7 ) + +inherit eutils autotools linux-info python-single-r1 + +COMMIT="c9a4f15b8c8f2349601d3073cc95e30d3b91af13" + +DESCRIPTION="Unix Guest Agent for OpenStack" +HOMEPAGE="https://wiki.openstack.org/wiki/GuestAgent" +SRC_URI="https://github.com/rackerlabs/${PN}/archive/${COMMIT}.zip -> ${P}.zip" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" +RESTRICT="mirror strip" + +DEPEND=" + app-emulation/xe-guest-utilities[-xenstore] + dev-util/patchelf + dev-python/pycrypto[${PYTHON_USEDEP}] + test? ( dev-python/mox[${PYTHON_USEDEP}] ) + test? ( dev-python/unittest2[${PYTHON_USEDEP}] ) + ${PYTHON_DEPS} +" +RDEPEND=" + app-emulation/xe-guest-utilities + dev-python/pyxenstore[${PYTHON_USEDEP}] + dev-python/pycrypto[${PYTHON_USEDEP}] + ${PYTHON_DEPS} +" +S=${WORKDIR}/${PN}-${COMMIT} + +# Required for Emergency Console +CONFIG_CHECK="~KEYBOARD_ATKBD" + +pkg_setup() +{ + python-single-r1_pkg_setup +} + +src_prepare() +{ + # 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 + + eapply_user + eautoreconf +} + +src_install() +{ + emake DESTDIR="${D}" install || die + doinitd scripts/gentoo/nova-agent +} + +pkg_postinst() +{ + if [ "$(rc-config list default | grep nova-agent)" = "" ] ; then + elog "To start nova-agent automatically by default" + elog "you should add it to the default runlevel :" + elog "\`rc-update add nova-agent default\`" + elog + fi +} -- cgit v1.2.3