Skip to content

Commit

Permalink
Merge pull request #51336 from Ch3LL/merge-2019.2.0rc1
Browse files Browse the repository at this point in the history
[2019.2] Merge Forward from 2019.2.0.rc1 to 2019.2
  • Loading branch information
dwoz authored Jan 27, 2019
2 parents 02b43a0 + 62a20b1 commit d4b9093
Show file tree
Hide file tree
Showing 20 changed files with 103 additions and 72 deletions.
20 changes: 10 additions & 10 deletions pkg/osx/build_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ $MAKE install
############################################################################
echo -n -e "\033]0;Build_Env: libsodium: download\007"

PKGURL="https://download.libsodium.org/libsodium/releases/libsodium-1.0.15.tar.gz"
PKGDIR="libsodium-1.0.15"
PKGURL="https://download.libsodium.org/libsodium/releases/libsodium-1.0.17.tar.gz"
PKGDIR="libsodium-1.0.17"

download $PKGURL

Expand All @@ -200,8 +200,8 @@ $MAKE install
############################################################################
echo -n -e "\033]0;Build_Env: zeromq: download\007"

PKGURL="http://download.zeromq.org/zeromq-4.1.4.tar.gz"
PKGDIR="zeromq-4.1.4"
PKGURL="https://github.com/zeromq/zeromq4-1/releases/download/v4.1.6/zeromq-4.1.6.tar.gz"
PKGDIR="zeromq-4.1.6"

download $PKGURL

Expand All @@ -223,8 +223,8 @@ $MAKE install
############################################################################
echo -n -e "\033]0;Build_Env: OpenSSL: download\007"

PKGURL="http://openssl.org/source/openssl-1.0.2p.tar.gz"
PKGDIR="openssl-1.0.2p"
PKGURL="http://openssl.org/source/openssl-1.0.2q.tar.gz"
PKGDIR="openssl-1.0.2q"

download $PKGURL

Expand All @@ -247,11 +247,11 @@ $MAKE install
echo -n -e "\033]0;Build_Env: Python: download\007"

if [ "$PYVER" == "2" ]; then
PKGURL="https://www.python.org/ftp/python/2.7.14/Python-2.7.14.tar.xz"
PKGDIR="Python-2.7.14"
PKGURL="https://www.python.org/ftp/python/2.7.15/Python-2.7.15.tar.xz"
PKGDIR="Python-2.7.15"
else
PKGURL="https://www.python.org/ftp/python/3.5.3/Python-3.5.3.tar.xz"
PKGDIR="Python-3.5.3"
PKGURL="https://www.python.org/ftp/python/3.5.4/Python-3.5.4.tar.xz"
PKGDIR="Python-3.5.4"
fi

download $PKGURL
Expand Down
38 changes: 19 additions & 19 deletions pkg/osx/req.txt
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
apache-libcloud==2.2.1
backports.ssl_match_hostname==3.5.0.1
apache-libcloud==2.4.0
backports.ssl_match_hostname==3.7.0.1
backports_abc==0.5
certifi
cffi==1.11.2
CherryPy==13.0.0
click==6.7
CherryPy==17.4.1
click==7.0
enum34==1.1.6
futures==3.1.1
futures==3.2.0; python_version == '2.7'
gitdb==0.6.4
GitPython==2.1.7
idna==2.6
ipaddress==1.0.18
GitPython==2.1.10
idna==2.8
ipaddress==1.0.22
Jinja2==2.10
linode-python==1.1.1
Mako==1.0.7
MarkupSafe==1.0
msgpack-python==0.4.8
pyasn1==0.4.2
pycparser==2.18
MarkupSafe==1.1.0
msgpack-python==0.5.6
pyasn1==0.4.5
pycparser==2.19
pycrypto==2.6.1
python-dateutil==2.6.1
python-gnupg==0.4.1
PyYAML==3.12
pyzmq==17.0.0
pyobjc==5.1.2
python-dateutil==2.7.5
python-gnupg==0.4.3
PyYAML==3.13
pyzmq==17.1.2
requests==2.21.0
singledispatch==3.4.0.3
six==1.11.0
smmap==0.9.0
timelib==0.2.4
tornado==4.5.2
vultr==1.0rc1
tornado==4.5.3
vultr==1.0.1
4 changes: 2 additions & 2 deletions pkg/osx/req_ext.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
cryptography==2.1.4
pyOpenSSL==17.5.0
cryptography==2.4.2
pyOpenSSL==18.0.0
1 change: 0 additions & 1 deletion pkg/osx/shasums/Python-2.7.14.tar.xz.sha512

This file was deleted.

1 change: 1 addition & 0 deletions pkg/osx/shasums/Python-2.7.15.tar.xz.sha512
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
27ea43eb45fc68f3d2469d5f07636e10801dee11635a430ec8ec922ed790bb426b072da94df885e4dfa1ea8b7a24f2f56dd92f9b0f51e162330f161216bd6de6 ./Python-2.7.15.tar.xz
1 change: 0 additions & 1 deletion pkg/osx/shasums/Python-3.5.3.tar.xz.sha512

This file was deleted.

1 change: 1 addition & 0 deletions pkg/osx/shasums/Python-3.5.4.tar.xz.sha512
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dbbe2740ee1cce5404b7b6436a9b3887e15f415a1006efa22014ec7e5b1e48c43eed0ff98f6f5b365c527b8d2525be4ce72bbe404ce71c0835529fcd6f0267ff ./Python-3.5.4.tar.xz
1 change: 0 additions & 1 deletion pkg/osx/shasums/libsodium-1.0.15.tar.gz.sha512

This file was deleted.

1 change: 1 addition & 0 deletions pkg/osx/shasums/libsodium-1.0.17.tar.gz.sha512
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7cc9e4f11e656008ce9dff735acea95acbcb91ae4936de4d26f7798093766a77c373e9bd4a7b45b60ef8a11de6c55bc8dcac13bebf8c23c671d0536430501da1 ./libsodium-1.0.17.tar.gz
1 change: 0 additions & 1 deletion pkg/osx/shasums/openssl-1.0.2p.tar.gz.sha512

This file was deleted.

1 change: 1 addition & 0 deletions pkg/osx/shasums/openssl-1.0.2q.tar.gz.sha512
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
403e6cad42db3ba860c3fa4fa81c1b7b02f0b873259e5c19a7fc8e42de0854602555f1b1ca74f4e3a7737a4cbd3aac063061e628ec86534586500819fae7fec0 ./openssl-1.0.2q.tar.gz
1 change: 0 additions & 1 deletion pkg/osx/shasums/zeromq-4.1.4.tar.gz.sha512

This file was deleted.

1 change: 1 addition & 0 deletions pkg/osx/shasums/zeromq-4.1.6.tar.gz.sha512
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c04a6bb7a719687d8e8e5e8a103f93ab75ead3fcd3516e6089959e4f02cff7c18e9d7a8696af4245d434b45e6aa6e2ca8f73d98db058df621bca3def97bf7af1 ./zeromq-4.1.6.tar.gz
52 changes: 26 additions & 26 deletions pkg/windows/req.txt
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
backports-abc==0.5
backports.ssl-match-hostname==3.5.0.1
backports.ssl-match-hostname==3.7.0.1
certifi
cffi==1.10.0
CherryPy==10.2.1
cryptography==2.1.4
cffi==1.11.5
CherryPy==17.4.1
cryptography==2.4.2
enum34==1.1.6
futures==3.1.1
futures==3.2.0; python_version == '2.7'
gitdb==0.6.4
GitPython==2.1.3
idna==2.5
GitPython==2.1.10
idna==2.8
ioloop==0.1a0
ipaddress==1.0.18
Jinja2==2.9.6
ipaddress==1.0.22
Jinja2==2.10
libnacl==1.6.1 # required by the nacl module
lxml==3.7.3
Mako==1.0.6
MarkupSafe==1.0
msgpack-python==0.4.8
psutil==5.2.2
pyasn1==0.2.3
pycparser==2.17
lxml==4.3.0
Mako==1.0.7
MarkupSafe==1.1.0
msgpack-python==0.5.6
psutil==5.4.8
pyasn1==0.4.5
pycparser==2.19
pycrypto==2.6.1
pycurl==7.43.0
PyMySQL==0.7.11
pyOpenSSL==17.5.0
pycurl==7.43.0.2
PyMySQL==0.9.3
pyOpenSSL==18.0.0
#python-certifi-win32==1.2
python-dateutil==2.6.1
python-gnupg==0.4.1
python-dateutil==2.7.5
python-gnupg==0.4.3
pythonnet==2.3.0
pywin32==223
PyYAML==3.12
pyzmq==16.0.3
pywin32==224
PyYAML==3.13
pyzmq==17.1.2
requests==2.21.0
singledispatch==3.4.0.3
smmap==0.9.0
timelib==0.2.4
tornado==4.5.1
wheel==0.30.0a0
tornado==4.5.3
wheel==0.32.3
WMI==1.4.9
9 changes: 1 addition & 8 deletions salt/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,6 @@ def __init__(self, address):
:param address:
'''
# pylint: disable-all
if not hasattr(self, '_is_packed_binary'):
# This method (below) won't be around for some Python 3 versions
# and we need check this differently anyway
self._is_packed_binary = lambda p: isinstance(p, bytes)
# pylint: enable-all

if isinstance(address, string_types) and '%' in address:
buff = address.split('%')
if len(buff) != 2:
Expand Down Expand Up @@ -189,7 +182,7 @@ def _is_packed_binary(self, data):
:return:
'''
packed = False
if len(data) == 16 and ':' not in data:
if isinstance(data, bytes) and len(data) == 16 and b':' not in data:
try:
packed = bool(int(str(bytearray(data)).encode('hex'), 16))
except ValueError:
Expand Down
7 changes: 6 additions & 1 deletion salt/auth/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,14 @@ def __auth_call(self, load):
fstr = '{0}.auth'.format(load['eauth'])
if fstr not in self.auth:
return False
# When making auth calls, only username, password, auth, and token
# are valid, so we strip anything else out.
_valid = ['username', 'password', 'eauth', 'token']
_load = {key: value for (key, value) in load.items() if key in _valid}

fcall = salt.utils.args.format_call(
self.auth[fstr],
load,
_load,
expected_extra_kws=AUTH_INTERNAL_KEYWORDS)
try:
if 'kwargs' in fcall:
Expand Down
8 changes: 7 additions & 1 deletion salt/cli/caller.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,13 @@ def call(self):
}
data.update(kwargs)
executors = getattr(self.minion, 'module_executors', []) or \
self.opts.get('module_executors', ['direct_call'])
salt.utils.args.yamlify_arg(
self.opts.get('module_executors', '[direct_call]')
)
if self.opts.get('executor_opts', None):
data['executor_opts'] = salt.utils.args.yamlify_arg(
self.opts['executor_opts']
)
if isinstance(executors, six.string_types):
executors = [executors]
try:
Expand Down
4 changes: 4 additions & 0 deletions tests/integration/modules/test_cp.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
from tests.support.unit import skipIf
import tests.support.paths as paths

# Import 3rd party libs
import salt.ext.six as six

# Import salt libs
import salt.utils.files
import salt.utils.path
Expand Down Expand Up @@ -78,6 +81,7 @@ def test_get_file_to_dir(self):
self.assertNotIn('bacon', data)

@with_tempfile()
@skipIf(salt.utils.platform.is_windows() and six.PY3, 'This test hangs on Windows on Py3')
def test_get_file_templated_paths(self, tgt):
'''
cp.get_file
Expand Down
14 changes: 14 additions & 0 deletions tests/integration/netapi/rest_cherrypy/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,20 @@ def test_run_pathname_not_exists_token(self):
})
assert response.status == '401 Unauthorized'

def test_run_extra_parameters(self):
'''
Test the run URL with good auth credentials
'''
cmd = dict(self.low, **dict(self.auth_creds))
cmd['id_'] = 'someminionname'
body = urlencode(cmd)

request, response = self.request('/run', method='POST', body=body,
headers={
'content-type': 'application/x-www-form-urlencoded'
})
self.assertEqual(response.status, '200 OK')


class TestWebhookDisableAuth(cptc.BaseRestCherryPyTest):

Expand Down
9 changes: 9 additions & 0 deletions tests/unit/utils/test_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,17 @@ def test__generate_minion_id_with_unicode_in_etc_hosts(self):
def test_is_ip(self):
self.assertTrue(network.is_ip('10.10.0.3'))
self.assertFalse(network.is_ip('0.9.800.1000'))
# Check 16-char-long unicode string
# https://github.com/saltstack/salt/issues/51258
self.assertFalse(network.is_ipv6('sixteen-char-str'))

def test_is_ipv4(self):
self.assertTrue(network.is_ipv4('10.10.0.3'))
self.assertFalse(network.is_ipv4('10.100.1'))
self.assertFalse(network.is_ipv4('2001:db8:0:1:1:1:1:1'))
# Check 16-char-long unicode string
# https://github.com/saltstack/salt/issues/51258
self.assertFalse(network.is_ipv4('sixteen-char-str'))

def test_is_ipv6(self):
self.assertTrue(network.is_ipv6('2001:db8:0:1:1:1:1:1'))
Expand All @@ -202,6 +208,9 @@ def test_is_ipv6(self):
self.assertFalse(network.is_ipv6('2001:0db8:::0370:7334'))
self.assertFalse(network.is_ipv6('10.0.1.2'))
self.assertFalse(network.is_ipv6('2001.0db8.85a3.0000.0000.8a2e.0370.7334'))
# Check 16-char-long unicode string
# https://github.com/saltstack/salt/issues/51258
self.assertFalse(network.is_ipv6('sixteen-char-str'))

def test_parse_host_port(self):
_ip = ipaddress.ip_address
Expand Down

0 comments on commit d4b9093

Please sign in to comment.