pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/sysutils/salt
Module Name: pkgsrc
Committed By: tpaul
Date: Wed Jun 20 11:50:56 UTC 2018
Modified Files:
pkgsrc/sysutils/salt: Makefile distinfo
Added Files:
pkgsrc/sysutils/salt/patches: patch-salt_grains_core.py
patch-salt_modules_pkgin.py
Log Message:
salt: don't crash if no swap is configured, apply pkgin module fixes
patches/patch-salt_grains_core.py:
- Reapply patch in a NetBSD/OpenBSD specific code block after package update
to 2018.3.1, from PR pkg/53278
- upstream pull #47600
patches/patch-salt_modules_pkgin.py:
- Apply patch in pkgin specific code block from PR pkg/53344
- upstream pull #47814
bump PKGREVISION
ok <leot>
To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 pkgsrc/sysutils/salt/Makefile
cvs rdiff -u -r1.36 -r1.37 pkgsrc/sysutils/salt/distinfo
cvs rdiff -u -r0 -r1.5 pkgsrc/sysutils/salt/patches/patch-salt_grains_core.py
cvs rdiff -u -r0 -r1.1 \
pkgsrc/sysutils/salt/patches/patch-salt_modules_pkgin.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/salt/Makefile
diff -u pkgsrc/sysutils/salt/Makefile:1.62 pkgsrc/sysutils/salt/Makefile:1.63
--- pkgsrc/sysutils/salt/Makefile:1.62 Sat Jun 16 15:23:35 2018
+++ pkgsrc/sysutils/salt/Makefile Wed Jun 20 11:50:56 2018
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.62 2018/06/16 15:23:35 adam Exp $
+# $NetBSD: Makefile,v 1.63 2018/06/20 11:50:56 tpaul Exp $
DISTNAME= salt-2018.3.1
+PKGREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_PYPI:=s/salt/}
Index: pkgsrc/sysutils/salt/distinfo
diff -u pkgsrc/sysutils/salt/distinfo:1.36 pkgsrc/sysutils/salt/distinfo:1.37
--- pkgsrc/sysutils/salt/distinfo:1.36 Sat Jun 16 15:23:35 2018
+++ pkgsrc/sysutils/salt/distinfo Wed Jun 20 11:50:56 2018
@@ -1,7 +1,9 @@
-$NetBSD: distinfo,v 1.36 2018/06/16 15:23:35 adam Exp $
+$NetBSD: distinfo,v 1.37 2018/06/20 11:50:56 tpaul Exp $
SHA1 (salt-2018.3.1.tar.gz) = 683dc72a84cf3a19dc1a5734837cf5b2dc19ef2a
RMD160 (salt-2018.3.1.tar.gz) = 8cc98668c98b89f9d244a665b5a9b76794754b32
SHA512 (salt-2018.3.1.tar.gz) = 38af8f1e8673f14e62d4a01bdb734efe8a7c8ca5cde83ce652ea0b1e260fbe7e3df04e27033c915b8d10c2ac49a88e26dae83b7f27798fb6ab53054a1329a840
Size (salt-2018.3.1.tar.gz) = 12939682 bytes
+SHA1 (patch-salt_grains_core.py) = 44c23bbfb76f86027fefcafe83e657f46f5a4871
+SHA1 (patch-salt_modules_pkgin.py) = 7c51659f740508e5b305a31eb0ab6396f522f677
SHA1 (patch-salt_version.py) = 1827dac3609a938fae38ee5dfd2a873c9723dfbd
Added files:
Index: pkgsrc/sysutils/salt/patches/patch-salt_grains_core.py
diff -u /dev/null pkgsrc/sysutils/salt/patches/patch-salt_grains_core.py:1.5
--- /dev/null Wed Jun 20 11:50:56 2018
+++ pkgsrc/sysutils/salt/patches/patch-salt_grains_core.py Wed Jun 20 11:50:56 2018
@@ -0,0 +1,21 @@
+$NetBSD: patch-salt_grains_core.py,v 1.5 2018/06/20 11:50:56 tpaul Exp $
+
+Prevent crash on NetBSD and OpenBSD when no swap is configured.
+https://github.com/saltstack/salt/pull/47600
+PR: pkg/53278
+
+--- salt/grains/core.py.orig 2018-06-13 16:03:06.000000000 +0000
++++ salt/grains/core.py
+@@ -451,7 +451,11 @@ def _bsd_memdata(osdata):
+
+ if osdata['kernel'] in ['OpenBSD', 'NetBSD']:
+ swapctl = salt.utils.path.which('swapctl')
+- swap_total = __salt__['cmd.run']('{0} -sk'.format(swapctl)).split(' ')[1]
++ swap_total = __salt__['cmd.run']('{0} -sk'.format(swapctl))
++ if swap_data == 'no swap devices configured':
++ swap_total = 0
++ else:
++ swap_total = swap_data.split(' ')[1]
+ else:
+ swap_total = __salt__['cmd.run']('{0} -n vm.swap_total'.format(sysctl))
+ grains['swap_total'] = int(swap_total) // 1024 // 1024
Index: pkgsrc/sysutils/salt/patches/patch-salt_modules_pkgin.py
diff -u /dev/null pkgsrc/sysutils/salt/patches/patch-salt_modules_pkgin.py:1.1
--- /dev/null Wed Jun 20 11:50:56 2018
+++ pkgsrc/sysutils/salt/patches/patch-salt_modules_pkgin.py Wed Jun 20 11:50:56 2018
@@ -0,0 +1,39 @@
+$NetBSD: patch-salt_modules_pkgin.py,v 1.1 2018/06/20 11:50:56 tpaul Exp $
+
+Fixes 2 bugs in the pkgin module:
+- pkg.latest_version doesn't return a version for an uninstalled package.
+- pkg.file_dict crashes.
+https://github.com/saltstack/salt/pull/47814
+PR: pkg/53344
+
+--- salt/modules/pkgin.py.orig 2018-04-02 16:35:12.000000000 +0000
++++ salt/modules/pkgin.py
+@@ -181,7 +181,9 @@ def latest_version(*names, **kwargs):
+
+ out = __salt__['cmd.run'](cmd, output_loglevel='trace')
+ for line in out.splitlines():
+- p = line.split(',' if _supports_parsing() else None)
++ if line.startswith('No results found for'):
++ return pkglist
++ p = line.split(';' if _supports_parsing() else None)
+
+ if p and p[0] in ('=:', '<:', '>:', ''):
+ # These are explanation comments
+@@ -190,7 +192,7 @@ def latest_version(*names, **kwargs):
+ s = _splitpkg(p[0])
+ if s:
+ if not s[0] in pkglist:
+- if len(p) > 1 and p[1] == '<':
++ if len(p) > 1 and p[1] in ('<', '', '='):
+ pkglist[s[0]] = s[1]
+ else:
+ pkglist[s[0]] = ''
+@@ -681,7 +683,7 @@ def file_dict(*packages):
+ continue # unexpected string
+
+ ret = {'errors': errors, 'files': files}
+- for field in ret:
++ for field in list(ret):
+ if not ret[field] or ret[field] == '':
+ del ret[field]
+ return ret
Home |
Main Index |
Thread Index |
Old Index