summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjperkin <jperkin>2015-06-25 13:21:03 +0000
committerjperkin <jperkin>2015-06-25 13:21:03 +0000
commit2dacad73fd83c3203ff216b381bc464d612b9e4c (patch)
treeb974974f52687b8334d858212d3546dea9a6b6aa
parentf28e2a8a85af4737a70692ee4cdc08a61bb06e9f (diff)
downloadpkgsrc-2dacad73fd83c3203ff216b381bc464d612b9e4c.tar.gz
Fix a couple of issues:
- pkgin changed its output delimiter from a space to ';' when outputting to a non-tty, breaking various configuration management systems which relied on the previous behaviour. Handle both types in ansible until NetBSDfr/pkgin#46 is resolved. - OS X 10.10 changed the behaviour of sysctl(8) to hide certain entries unless they are explicitly named. Apply patch to fix hw.model and hw.usermem from https://github.com/ansible/ansible/pull/8171/files Clean up patches while here. Bump PKGREVISION.
-rw-r--r--sysutils/ansible/Makefile3
-rw-r--r--sysutils/ansible/distinfo19
-rw-r--r--sysutils/ansible/patches/patch-examples_ansible.cfg4
-rw-r--r--sysutils/ansible/patches/patch-lib_ansible_callbacks.py4
-rw-r--r--sysutils/ansible/patches/patch-lib_ansible_constants.py10
-rw-r--r--sysutils/ansible/patches/patch-lib_ansible_module__utils_facts.py30
-rw-r--r--sysutils/ansible/patches/patch-library-system-ping4
-rw-r--r--sysutils/ansible/patches/patch-library_database_riak4
-rw-r--r--sysutils/ansible/patches/patch-library_monitoring_nagios4
-rw-r--r--sysutils/ansible/patches/patch-library_packaging_pkgin19
-rw-r--r--sysutils/ansible/patches/patch-library_system_setup4
11 files changed, 75 insertions, 30 deletions
diff --git a/sysutils/ansible/Makefile b/sysutils/ansible/Makefile
index 15ef657a3cf..9b68441bcf8 100644
--- a/sysutils/ansible/Makefile
+++ b/sysutils/ansible/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.13 2015/02/05 15:22:06 pettai Exp $
+# $NetBSD: Makefile,v 1.14 2015/06/25 13:21:03 jperkin Exp $
DISTNAME= ansible-1.6.10
+PKGREVISION= 1
#PKGNAME= ${PYPKGPREFIX}-${DISTNAME} # XXX: for when package is py3x-ready
CATEGORIES= python sysutils
MASTER_SITES= http://releases.ansible.com/ansible/
diff --git a/sysutils/ansible/distinfo b/sysutils/ansible/distinfo
index 80076c5e44d..36f8d402079 100644
--- a/sysutils/ansible/distinfo
+++ b/sysutils/ansible/distinfo
@@ -1,13 +1,14 @@
-$NetBSD: distinfo,v 1.7 2015/02/05 15:22:06 pettai Exp $
+$NetBSD: distinfo,v 1.8 2015/06/25 13:21:03 jperkin Exp $
SHA1 (ansible-1.6.10.tar.gz) = 35d4af5beaff73de339442962da286bd3d7bacf4
RMD160 (ansible-1.6.10.tar.gz) = 2e9160769d06b14fcd4446a8337c5ef3447139bc
Size (ansible-1.6.10.tar.gz) = 654605 bytes
-SHA1 (patch-examples_ansible.cfg) = 8951c1da381130e3de5178e858edabdd919868b5
-SHA1 (patch-lib_ansible_callbacks.py) = e712d8215221ff11920039aa8ed4efd4d6e5fae6
-SHA1 (patch-lib_ansible_constants.py) = f54e5bb869382cc58b910463543a885b059a9ec3
-SHA1 (patch-library-system-ping) = 4b2c1fd8f9844f11cfbe0ba975f7bca7eb88079b
-SHA1 (patch-library_database_riak) = e78fa264f03353ee25c1b358fd4daa90fe27fd44
-SHA1 (patch-library_monitoring_nagios) = 4c101d9c16d7f29a4557c29a2870cfb6bd3ab537
-SHA1 (patch-library_packaging_pkgin) = f235023fbad90c01f24cc33903b781a193611334
-SHA1 (patch-library_system_setup) = ed003c6bd067e61c696316827992f3510c6f4ed8
+SHA1 (patch-examples_ansible.cfg) = aa743238d77edc4abfeddae69456067a53f6afeb
+SHA1 (patch-lib_ansible_callbacks.py) = 786a30966784b2c0bbf749cb48786f50d42c8894
+SHA1 (patch-lib_ansible_constants.py) = 170f57a2f651c4fd1678a8ad695ce1848c0b7282
+SHA1 (patch-lib_ansible_module__utils_facts.py) = b44b9d03be1e30f5a2590100a62853516700fbd2
+SHA1 (patch-library-system-ping) = 11be10c2c6617b48dba54823ead462628702708b
+SHA1 (patch-library_database_riak) = cffae39d5a5e591938818655b78729a8e39084f1
+SHA1 (patch-library_monitoring_nagios) = 7e40fb967bbb03fb52d0478a8d2caeb213e2fb7f
+SHA1 (patch-library_packaging_pkgin) = 0dcc1699822251b7cc69db60d286e71964a99e0c
+SHA1 (patch-library_system_setup) = d19520ddfa5f69f281fe18ccc9a31a2f6fb30d86
diff --git a/sysutils/ansible/patches/patch-examples_ansible.cfg b/sysutils/ansible/patches/patch-examples_ansible.cfg
index 80cc2203193..69c503f5481 100644
--- a/sysutils/ansible/patches/patch-examples_ansible.cfg
+++ b/sysutils/ansible/patches/patch-examples_ansible.cfg
@@ -1,8 +1,8 @@
-$NetBSD: patch-examples_ansible.cfg,v 1.3 2014/06/15 00:15:08 rodent Exp $
+$NetBSD: patch-examples_ansible.cfg,v 1.4 2015/06/25 13:21:03 jperkin Exp $
Fix hardcoded paths to be replaced with SUBST framework.
---- examples/ansible.cfg.orig 2014-06-09 21:23:31.000000000 +0000
+--- examples/ansible.cfg.orig 2014-07-25 20:48:49.000000000 +0000
+++ examples/ansible.cfg
@@ -4,15 +4,15 @@
# nearly all parameters can be overridden in ansible-playbook
diff --git a/sysutils/ansible/patches/patch-lib_ansible_callbacks.py b/sysutils/ansible/patches/patch-lib_ansible_callbacks.py
index 013541586f2..29d3f650137 100644
--- a/sysutils/ansible/patches/patch-lib_ansible_callbacks.py
+++ b/sysutils/ansible/patches/patch-lib_ansible_callbacks.py
@@ -1,8 +1,8 @@
-$NetBSD: patch-lib_ansible_callbacks.py,v 1.4 2014/06/15 00:15:08 rodent Exp $
+$NetBSD: patch-lib_ansible_callbacks.py,v 1.5 2015/06/25 13:21:03 jperkin Exp $
Fix hardcoded paths to be replaced with SUBST framework.
---- lib/ansible/callbacks.py.orig 2014-06-09 21:23:31.000000000 +0000
+--- lib/ansible/callbacks.py.orig 2014-07-25 20:48:49.000000000 +0000
+++ lib/ansible/callbacks.py
@@ -55,9 +55,9 @@ def get_cowsay_info():
cowsay = "/usr/bin/cowsay"
diff --git a/sysutils/ansible/patches/patch-lib_ansible_constants.py b/sysutils/ansible/patches/patch-lib_ansible_constants.py
index d9f15624665..6aa62781ba1 100644
--- a/sysutils/ansible/patches/patch-lib_ansible_constants.py
+++ b/sysutils/ansible/patches/patch-lib_ansible_constants.py
@@ -1,10 +1,10 @@
-$NetBSD: patch-lib_ansible_constants.py,v 1.6 2015/02/05 15:22:06 pettai Exp $
+$NetBSD: patch-lib_ansible_constants.py,v 1.7 2015/06/25 13:21:03 jperkin Exp $
Fix hardcoded paths to be replaced with SUBST framework.
---- lib/ansible/constants.py.orig 2014-06-09 21:23:31.000000000 +0000
+--- lib/ansible/constants.py.orig 2014-07-25 20:48:49.000000000 +0000
+++ lib/ansible/constants.py
-@@ -65,7 +65,7 @@ def load_config_file():
+@@ -67,7 +67,7 @@ def load_config_file():
path0 = os.path.expanduser(path0)
path1 = os.getcwd() + "/ansible.cfg"
path2 = os.path.expanduser("~/.ansible.cfg")
@@ -13,7 +13,7 @@ Fix hardcoded paths to be replaced with SUBST framework.
for path in [path0, path1, path2, path3]:
if path is not None and os.path.exists(path):
-@@ -90,7 +90,7 @@ if getattr(sys, "real_prefix", None):
+@@ -92,7 +92,7 @@ if getattr(sys, "real_prefix", None):
# in a virtualenv
DIST_MODULE_PATH = os.path.join(sys.prefix, 'share/ansible/')
else:
@@ -22,7 +22,7 @@ Fix hardcoded paths to be replaced with SUBST framework.
# check all of these extensions when looking for yaml files for things like
# group variables -- really anything we can load
-@@ -100,7 +100,7 @@ YAML_FILENAME_EXTENSIONS = [ "", ".yml",
+@@ -102,7 +102,7 @@ YAML_FILENAME_EXTENSIONS = [ "", ".yml",
DEFAULTS='defaults'
# configurable things
diff --git a/sysutils/ansible/patches/patch-lib_ansible_module__utils_facts.py b/sysutils/ansible/patches/patch-lib_ansible_module__utils_facts.py
new file mode 100644
index 00000000000..e2d8bc0ed08
--- /dev/null
+++ b/sysutils/ansible/patches/patch-lib_ansible_module__utils_facts.py
@@ -0,0 +1,30 @@
+$NetBSD: patch-lib_ansible_module__utils_facts.py,v 1.1 2015/06/25 13:21:03 jperkin Exp $
+
+Handle sysctl(8) behaviour in OS X 10.10, using patch from
+https://github.com/ansible/ansible/pull/8171/files
+
+--- lib/ansible/module_utils/facts.py.orig 2014-07-25 20:48:49.000000000 +0000
++++ lib/ansible/module_utils/facts.py
+@@ -1361,7 +1361,9 @@ class Darwin(Hardware):
+ return system_profile
+
+ def get_mac_facts(self):
+- self.facts['model'] = self.sysctl['hw.model']
++ rc, out, err = module.run_command("sysctl hw.model")
++ if rc == 0:
++ self.facts['model'] = out.splitlines()[-1].split()[1]
+ self.facts['osversion'] = self.sysctl['kern.osversion']
+ self.facts['osrevision'] = self.sysctl['kern.osrevision']
+
+@@ -1376,7 +1378,10 @@ class Darwin(Hardware):
+
+ def get_memory_facts(self):
+ self.facts['memtotal_mb'] = long(self.sysctl['hw.memsize']) / 1024 / 1024
+- self.facts['memfree_mb'] = long(self.sysctl['hw.usermem']) / 1024 / 1024
++ rc, out, err = module.run_command("sysctl hw.usermem")
++ if rc == 0:
++ self.facts['memfree_mb'] = long(out.splitlines()[-1].split()[1]) / 1024 / 1024
++
+
+ class Network(Facts):
+ """
diff --git a/sysutils/ansible/patches/patch-library-system-ping b/sysutils/ansible/patches/patch-library-system-ping
index eadcd7a5174..e64de15e125 100644
--- a/sysutils/ansible/patches/patch-library-system-ping
+++ b/sysutils/ansible/patches/patch-library-system-ping
@@ -1,8 +1,8 @@
-$NetBSD: patch-library-system-ping,v 1.2 2014/06/15 00:15:08 rodent Exp $
+$NetBSD: patch-library-system-ping,v 1.3 2015/06/25 13:21:03 jperkin Exp $
Fix hardcoded paths to be replaced with SUBST framework.
---- library/system/ping.orig 2014-06-09 21:23:31.000000000 +0000
+--- library/system/ping.orig 2014-07-25 20:48:49.000000000 +0000
+++ library/system/ping
@@ -27,7 +27,7 @@ short_description: Try to connect to hos
description:
diff --git a/sysutils/ansible/patches/patch-library_database_riak b/sysutils/ansible/patches/patch-library_database_riak
index 8b1ac7ace31..949727953a9 100644
--- a/sysutils/ansible/patches/patch-library_database_riak
+++ b/sysutils/ansible/patches/patch-library_database_riak
@@ -1,8 +1,8 @@
-$NetBSD: patch-library_database_riak,v 1.2 2014/06/15 00:15:08 rodent Exp $
+$NetBSD: patch-library_database_riak,v 1.3 2015/06/25 13:21:03 jperkin Exp $
Fix hardcoded paths to be replaced with SUBST framework.
---- library/database/riak.orig 2014-06-09 21:23:31.000000000 +0000
+--- library/database/riak.orig 2014-07-25 20:48:49.000000000 +0000
+++ library/database/riak
@@ -118,7 +118,7 @@ def main():
argument_spec=dict(
diff --git a/sysutils/ansible/patches/patch-library_monitoring_nagios b/sysutils/ansible/patches/patch-library_monitoring_nagios
index b1da9279af0..1d758c866fa 100644
--- a/sysutils/ansible/patches/patch-library_monitoring_nagios
+++ b/sysutils/ansible/patches/patch-library_monitoring_nagios
@@ -1,8 +1,8 @@
-$NetBSD: patch-library_monitoring_nagios,v 1.2 2014/06/15 00:15:08 rodent Exp $
+$NetBSD: patch-library_monitoring_nagios,v 1.3 2015/06/25 13:21:03 jperkin Exp $
Fix hardcoded paths to be replaced with SUBST framework.
---- library/monitoring/nagios.orig 2014-06-09 21:23:31.000000000 +0000
+--- library/monitoring/nagios.orig 2014-07-25 20:48:49.000000000 +0000
+++ library/monitoring/nagios
@@ -125,6 +125,8 @@ import os.path
diff --git a/sysutils/ansible/patches/patch-library_packaging_pkgin b/sysutils/ansible/patches/patch-library_packaging_pkgin
index 907b3a15086..d95794fbaf2 100644
--- a/sysutils/ansible/patches/patch-library_packaging_pkgin
+++ b/sysutils/ansible/patches/patch-library_packaging_pkgin
@@ -1,10 +1,23 @@
-$NetBSD: patch-library_packaging_pkgin,v 1.2 2014/06/15 00:15:08 rodent Exp $
+$NetBSD: patch-library_packaging_pkgin,v 1.3 2015/06/25 13:21:03 jperkin Exp $
Fix hardcoded paths to be replaced with SUBST framework.
+Handle newer pkgin non-tty ';' delimited output.
---- library/packaging/pkgin.orig 2014-06-09 21:23:31.000000000 +0000
+--- library/packaging/pkgin.orig 2014-07-25 20:48:49.000000000 +0000
+++ library/packaging/pkgin
-@@ -150,7 +150,7 @@ def main():
+@@ -87,7 +87,10 @@ def query_package(module, pkgin_path, na
+
+ # Strip description
+ # (results in sth. like 'gcc47-libs-4.7.2nb4')
+- pkgname_with_version = out.split(' ')[0]
++ if len(out.split(';')) >= 3:
++ pkgname_with_version = out.split(';')[0]
++ else:
++ pkgname_with_version = out.split(' ')[0]
+
+ # Strip version
+ # (results in sth like 'gcc47-libs')
+@@ -150,7 +153,7 @@ def main():
state = dict(default="present", choices=["present","absent"]),
name = dict(aliases=["pkg"], required=True)))
diff --git a/sysutils/ansible/patches/patch-library_system_setup b/sysutils/ansible/patches/patch-library_system_setup
index 66e821f0c8d..9f67780a634 100644
--- a/sysutils/ansible/patches/patch-library_system_setup
+++ b/sysutils/ansible/patches/patch-library_system_setup
@@ -1,8 +1,8 @@
-$NetBSD: patch-library_system_setup,v 1.2 2014/06/15 00:15:08 rodent Exp $
+$NetBSD: patch-library_system_setup,v 1.3 2015/06/25 13:21:03 jperkin Exp $
Fix hardcoded paths to be replaced with SUBST framework.
---- library/system/setup.orig 2014-06-09 21:23:31.000000000 +0000
+--- library/system/setup.orig 2014-07-25 20:48:49.000000000 +0000
+++ library/system/setup
@@ -42,7 +42,7 @@ options:
description: