pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/salt Update salt to 2018.3.2



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f02f659e3b1a
branches:  trunk
changeset: 383594:f02f659e3b1a
user:      tpaul <tpaul%pkgsrc.org@localhost>
date:      Mon Aug 06 05:01:26 2018 +0000

description:
Update salt to 2018.3.2

pkgsrc changes:
- Add patch for NetBSD 8 support
- Update patches to note they can be removed in the next release
- Fix existing patch so it doesn't crash when running with swap enabled

Changes:
Version 2018.3.2 is a bugfix release for 2018.3.0.

The 2018.3.2 release contains only a small number of fixes, which are
detailed below.

This release fixes two critical issues.

The first is Issue #48038, which is a critical bug that occurs in a
multi-syndic setup where the same job is run multiple times on a minion.

The second issue is #48130. This bug appears in certain setups where the
Master reports a Minion time-out, even though the job is still running
on the Minion.

Both of these issues have been fixed with this release.

diffstat:

 sysutils/salt/Makefile                            |    5 +-
 sysutils/salt/distinfo                            |   15 +-
 sysutils/salt/patches/patch-salt_grains_core.py   |    7 +-
 sysutils/salt/patches/patch-salt_modules_pkgin.py |    5 +-
 sysutils/salt/patches/patch-salt_utils_network.py |  114 ++++++++++++++++++++++
 5 files changed, 133 insertions(+), 13 deletions(-)

diffs (197 lines):

diff -r 4d5a89800841 -r f02f659e3b1a sysutils/salt/Makefile
--- a/sysutils/salt/Makefile    Mon Aug 06 02:22:31 2018 +0000
+++ b/sysutils/salt/Makefile    Mon Aug 06 05:01:26 2018 +0000
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.64 2018/06/20 15:00:15 tpaul Exp $
+# $NetBSD: Makefile,v 1.65 2018/08/06 05:01:26 tpaul Exp $
 
-DISTNAME=      salt-2018.3.1
-PKGREVISION=   2
+DISTNAME=      salt-2018.3.2
 CATEGORIES=    sysutils
 MASTER_SITES=  ${MASTER_SITE_PYPI:=s/salt/}
 
diff -r 4d5a89800841 -r f02f659e3b1a sysutils/salt/distinfo
--- a/sysutils/salt/distinfo    Mon Aug 06 02:22:31 2018 +0000
+++ b/sysutils/salt/distinfo    Mon Aug 06 05:01:26 2018 +0000
@@ -1,9 +1,10 @@
-$NetBSD: distinfo,v 1.38 2018/06/20 15:00:15 tpaul Exp $
+$NetBSD: distinfo,v 1.39 2018/08/06 05:01:26 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) = 5d9c5fbee2a5bf7d0a3f3445fc51c3156cd252e1
-SHA1 (patch-salt_modules_pkgin.py) = 7c51659f740508e5b305a31eb0ab6396f522f677
+SHA1 (salt-2018.3.2.tar.gz) = 2df3d3c1c35d29b66909c74818ec6ec945c4550e
+RMD160 (salt-2018.3.2.tar.gz) = ab3c0397658280307110f020f4d9d9042336d0ee
+SHA512 (salt-2018.3.2.tar.gz) = 142ebe13638d7e6dd0aecc9f0325002d30e115fe8688f5f74cbeb7ff21020327d65ded0dcd845e55362b97568b696887fa22243d66d5eadef65f97152d4775d3
+Size (salt-2018.3.2.tar.gz) = 12996445 bytes
+SHA1 (patch-salt_grains_core.py) = 780bea66de43764a82035a9d9a3c2ae884846d9f
+SHA1 (patch-salt_modules_pkgin.py) = f0141921e7faa6fb5bccfcd79f393a763f507d40
+SHA1 (patch-salt_utils_network.py) = effce8b4e6cdabdf25624da653b05609f1ae92ed
 SHA1 (patch-salt_version.py) = 1827dac3609a938fae38ee5dfd2a873c9723dfbd
diff -r 4d5a89800841 -r f02f659e3b1a sysutils/salt/patches/patch-salt_grains_core.py
--- a/sysutils/salt/patches/patch-salt_grains_core.py   Mon Aug 06 02:22:31 2018 +0000
+++ b/sysutils/salt/patches/patch-salt_grains_core.py   Mon Aug 06 05:01:26 2018 +0000
@@ -1,9 +1,12 @@
-$NetBSD: patch-salt_grains_core.py,v 1.6 2018/06/20 15:00:16 tpaul Exp $
+$NetBSD: patch-salt_grains_core.py,v 1.7 2018/08/06 05:01:26 tpaul Exp $
 
 Prevent crash on NetBSD and OpenBSD when no swap is configured.
 https://github.com/saltstack/salt/pull/47600
 PR: pkg/53278
 
+This patch should no longer be needed in 2018.3.3
+https://github.com/saltstack/salt/pull/47866
+
 --- 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):
@@ -15,7 +18,7 @@
 +            if swap_total == 'no swap devices configured':
 +                swap_total = 0
 +            else:
-+                swap_total = swap_data.split(' ')[1]
++                swap_total = swap_total.split(' ')[1]
          else:
              swap_total = __salt__['cmd.run']('{0} -n vm.swap_total'.format(sysctl))
          grains['swap_total'] = int(swap_total) // 1024 // 1024
diff -r 4d5a89800841 -r f02f659e3b1a sysutils/salt/patches/patch-salt_modules_pkgin.py
--- a/sysutils/salt/patches/patch-salt_modules_pkgin.py Mon Aug 06 02:22:31 2018 +0000
+++ b/sysutils/salt/patches/patch-salt_modules_pkgin.py Mon Aug 06 05:01:26 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-salt_modules_pkgin.py,v 1.1 2018/06/20 11:50:56 tpaul Exp $
+$NetBSD: patch-salt_modules_pkgin.py,v 1.2 2018/08/06 05:01:26 tpaul Exp $
 
 Fixes 2 bugs in the pkgin module:
 - pkg.latest_version doesn't return a version for an uninstalled package.
@@ -6,6 +6,9 @@
 https://github.com/saltstack/salt/pull/47814
 PR: pkg/53344
 
+This patch should no longer be needed in 2018.3.3
+https://github.com/saltstack/salt/pull/47866
+
 --- 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):
diff -r 4d5a89800841 -r f02f659e3b1a sysutils/salt/patches/patch-salt_utils_network.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/salt/patches/patch-salt_utils_network.py Mon Aug 06 05:01:26 2018 +0000
@@ -0,0 +1,114 @@
+$NetBSD: patch-salt_utils_network.py,v 1.7 2018/08/06 05:01:26 tpaul Exp $
+
+Handle new ifconfig output on NetBSD 8.0
+
+Upstream issue: https://github.com/saltstack/salt/issues/48856
+Upstream pull request: https://github.com/saltstack/salt/pull/48926
+
+--- salt/utils/network.py.orig 2018-06-27 16:04:57.000000000 +0000
++++ salt/utils/network.py
+@@ -15,6 +15,7 @@ import platform
+ import random
+ import subprocess
+ from string import ascii_letters, digits
++from salt.utils.versions import LooseVersion
+ 
+ # Import 3rd-party libs
+ from salt.ext import six
+@@ -862,6 +863,83 @@ def linux_interfaces():
+     return ifaces
+ 
+ 
++def _netbsd_interfaces_ifconfig(out):
++    '''
++    Uses ifconfig to return a dictionary of interfaces with various information
++    about each (up/down state, ip address, netmask, and hwaddr)
++    '''
++    ret = dict()
++
++    piface = re.compile(r'^([^\s:]+)')
++    pmac = re.compile('.*?address: ([0-9a-f:]+)')
++
++    pip = re.compile(r'.*?inet [^\d]*(.*?)/([\d]*)\s')
++    pip6 = re.compile('.*?inet6 ([0-9a-f:]+)%([a-zA-Z0-9]*)/([\d]*)\s')
++
++    pupdown = re.compile('UP')
++    pbcast = re.compile(r'.*?broadcast ([\d\.]+)')
++
++    groups = re.compile('\r?\n(?=\\S)').split(out)
++    for group in groups:
++        data = dict()
++        iface = ''
++        updown = False
++        for line in group.splitlines():
++            miface = piface.match(line)
++            mmac = pmac.match(line)
++            mip = pip.match(line)
++            mip6 = pip6.match(line)
++            mupdown = pupdown.search(line)
++            if miface:
++                iface = miface.group(1)
++            if mmac:
++                data['hwaddr'] = mmac.group(1)
++            if mip:
++                if 'inet' not in data:
++                    data['inet'] = list()
++                addr_obj = dict()
++                addr_obj['address'] = mip.group(1)
++                mmask = mip.group(2)
++                if mip.group(2):
++                    addr_obj['netmask'] = cidr_to_ipv4_netmask(mip.group(2))
++                mbcast = pbcast.match(line)
++                if mbcast:
++                    addr_obj['broadcast'] = mbcast.group(1)
++                data['inet'].append(addr_obj)
++            if mupdown:
++                updown = True
++            if mip6:
++                if 'inet6' not in data:
++                    data['inet6'] = list()
++                addr_obj = dict()
++                addr_obj['address'] = mip6.group(1)
++                mmask6 = mip6.group(3)
++                addr_obj['scope'] = mip6.group(2)
++                addr_obj['prefixlen'] = mip6.group(3)
++                data['inet6'].append(addr_obj)
++        data['up'] = updown
++        ret[iface] = data
++        del data
++    return ret
++
++def netbsd_interfaces():
++    '''
++    Obtain interface information for NetBSD >= 8 where the ifconfig
++    output diverged from other BSD variants (Netmask is now part of the
++    address)
++    '''
++    # NetBSD versions prior to 8.0 can still use linux_interfaces()
++    if LooseVersion(os.uname()[2]) < LooseVersion('8.0'):
++        return linux_interfaces()
++
++    ifconfig_path = salt.utils.path.which('ifconfig')
++    cmd = subprocess.Popen(
++        '{0} -a'.format(ifconfig_path),
++        shell=True,
++        stdout=subprocess.PIPE,
++        stderr=subprocess.STDOUT).communicate()[0]
++    return _netbsd_interfaces_ifconfig(salt.utils.stringutils.to_str(cmd))
++
+ def _interfaces_ipconfig(out):
+     '''
+     Returns a dictionary of interfaces with various information about each
+@@ -963,10 +1041,11 @@ def interfaces():
+     '''
+     if salt.utils.platform.is_windows():
+         return win_interfaces()
++    elif salt.utils.platform.is_netbsd():
++        return netbsd_interfaces()
+     else:
+         return linux_interfaces()
+ 
+-
+ def get_net_start(ipaddr, netmask):
+     '''
+     Return the address of the network



Home | Main Index | Thread Index | Old Index