pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/sysutils/ansible
Module Name: pkgsrc
Committed By: maya
Date: Fri Aug 7 07:40:42 UTC 2020
Modified Files:
pkgsrc/sysutils/ansible: Makefile distinfo
Added Files:
pkgsrc/sysutils/ansible/patches:
patch-lib_ansible_module__utils_facts_hardware_netbsd.py
Log Message:
ansible: parse the output of mount(8) instead of /etc/fstab.
bump PKGREVISION
PR pkg/55544
To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 pkgsrc/sysutils/ansible/Makefile
cvs rdiff -u -r1.21 -r1.22 pkgsrc/sysutils/ansible/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/sysutils/ansible/patches/patch-lib_ansible_module__utils_facts_hardware_netbsd.py
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/sysutils/ansible/Makefile
diff -u pkgsrc/sysutils/ansible/Makefile:1.34 pkgsrc/sysutils/ansible/Makefile:1.35
--- pkgsrc/sysutils/ansible/Makefile:1.34 Wed Jul 29 13:54:07 2020
+++ pkgsrc/sysutils/ansible/Makefile Fri Aug 7 07:40:41 2020
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.34 2020/07/29 13:54:07 adam Exp $
+# $NetBSD: Makefile,v 1.35 2020/08/07 07:40:41 maya Exp $
DISTNAME= ansible-2.9.11
+PKGREVISION= 1
CATEGORIES= sysutils python
MASTER_SITES= https://releases.ansible.com/ansible/
Index: pkgsrc/sysutils/ansible/distinfo
diff -u pkgsrc/sysutils/ansible/distinfo:1.21 pkgsrc/sysutils/ansible/distinfo:1.22
--- pkgsrc/sysutils/ansible/distinfo:1.21 Wed Jul 29 13:54:07 2020
+++ pkgsrc/sysutils/ansible/distinfo Fri Aug 7 07:40:41 2020
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.21 2020/07/29 13:54:07 adam Exp $
+$NetBSD: distinfo,v 1.22 2020/08/07 07:40:41 maya Exp $
SHA1 (ansible-2.9.11.tar.gz) = fc122230ba41a3927d649ab44a49e70084a61d23
RMD160 (ansible-2.9.11.tar.gz) = e0a05be08ffa67ef7923f7c8d06ee309c9b6accd
SHA512 (ansible-2.9.11.tar.gz) = b157a5cfb5ba7cb651c7afc0dc92cfe3b8f9eebd06de6d7a1e4917ffca3c542c5207c8e1820acc5be840190c8754f111e2501304ad7e64867247e5b973aec81e
Size (ansible-2.9.11.tar.gz) = 14243995 bytes
+SHA1 (patch-lib_ansible_module__utils_facts_hardware_netbsd.py) = cdc41b104bffab7badd00446a9d0cdecba32cca2
Added files:
Index: pkgsrc/sysutils/ansible/patches/patch-lib_ansible_module__utils_facts_hardware_netbsd.py
diff -u /dev/null pkgsrc/sysutils/ansible/patches/patch-lib_ansible_module__utils_facts_hardware_netbsd.py:1.1
--- /dev/null Fri Aug 7 07:40:42 2020
+++ pkgsrc/sysutils/ansible/patches/patch-lib_ansible_module__utils_facts_hardware_netbsd.py Fri Aug 7 07:40:41 2020
@@ -0,0 +1,39 @@
+$NetBSD: patch-lib_ansible_module__utils_facts_hardware_netbsd.py,v 1.1 2020/08/07 07:40:41 maya Exp $
+
+use mount(8) to get run-time file systems instead of boot-time /etc/fstab
+
+--- lib/ansible/module_utils/facts/hardware/netbsd.py.orig 2020-07-21 01:08:10.000000000 +0000
++++ lib/ansible/module_utils/facts/hardware/netbsd.py
+@@ -116,20 +116,23 @@ class NetBSDHardware(Hardware):
+ mount_facts = {}
+
+ mount_facts['mounts'] = []
+- fstab = get_file_content('/etc/fstab')
++ mount_cmd = self.module.get_bin_path('mount')
+
+- if not fstab:
++ if not mount_cmd:
+ return mount_facts
+
+- for line in fstab.splitlines():
+- if line.startswith('#') or line.strip() == '':
+- continue
++ rc, mount_out, err = self.module.run_command(mount_cmd)
++ if rc != 0:
++ return mount_facts
++
++ for line in mount_out.splitlines():
+ fields = re.sub(r'\s+', ' ', line).split()
+- mount_statvfs_info = get_mount_size(fields[1])
+- mount_info = {'mount': fields[1],
++ mount_statvfs_info = get_mount_size(fields[2])
++ mount_options = line[line.find("(")+1 : line.find(")")].replace(" ","")
++ mount_info = {'mount': fields[2],
+ 'device': fields[0],
+- 'fstype': fields[2],
+- 'options': fields[3]}
++ 'fstype': fields[4],
++ 'options': mount_options}
+ mount_info.update(mount_statvfs_info)
+ mount_facts['mounts'].append(mount_info)
+ return mount_facts
Home |
Main Index |
Thread Index |
Old Index