diff options
author | Steve Wills <swills@FreeBSD.org> | 2016-12-05 15:00:49 +0000 |
---|---|---|
committer | Steve Wills <swills@FreeBSD.org> | 2016-12-05 15:00:49 +0000 |
commit | d5f1652d5d4b6f9d92993917fd94bbbf20bafb7d (patch) | |
tree | e0cd14a458143748c06674f4b12de04c30fc8c5b /sysutils/py-salt/files | |
parent | Fix build with ffmpeg-3.x (diff) |
sysutils/py-salt : update to 2016.3.4
While here, fix OpenSSL 1.1 compatibility
PR: 214786
PR: 214998
PR: 215051
Submitted by: Christer Edwards <christer.edwards@gmail.com> (maintainer)
Reported by: Melvyn Sopacua <m.r.sopacua@gmail.com> (214998)
Obtained from: https://github.com/saltstack/salt/pull/37772 (215051)
Notes
Notes:
svn path=/head/; revision=427901
Diffstat (limited to 'sysutils/py-salt/files')
-rw-r--r-- | sysutils/py-salt/files/patch-freebsd_sysctl.py | 44 | ||||
-rw-r--r-- | sysutils/py-salt/files/patch-salt_utils_rsax931.py | 32 | ||||
-rw-r--r-- | sysutils/py-salt/files/patch-setup.py | 8 |
3 files changed, 36 insertions, 48 deletions
diff --git a/sysutils/py-salt/files/patch-freebsd_sysctl.py b/sysutils/py-salt/files/patch-freebsd_sysctl.py deleted file mode 100644 index 81c654b76bcd..000000000000 --- a/sysutils/py-salt/files/patch-freebsd_sysctl.py +++ /dev/null @@ -1,44 +0,0 @@ ---- salt/modules/freebsd_sysctl.py.orig 2016-10-31 11:21:36.000000000 -0600 -+++ salt/modules/freebsd_sysctl.py 2016-11-02 08:44:19.743993000 -0600 -@@ -56,17 +56,31 @@ - ) - cmd = 'sysctl -ae' - ret = {} -- out = __salt__['cmd.run'](cmd, output_loglevel='trace') - comps = [''] -- for line in out.splitlines(): -- if any([line.startswith('{0}.'.format(root)) for root in roots]): -- comps = line.split('=', 1) -- ret[comps[0]] = comps[1] -- elif comps[0]: -- ret[comps[0]] += '{0}\n'.format(line) -- else: -- continue -- return ret -+ -+ if config_file: -+ try: -+ with salt.utils.fopen(config_file, 'r') as f: -+ for line in f.readlines(): -+ l = line.strip() -+ if l != "" and not l.startswith("#"): -+ comps = line.split('=', 1) -+ ret[comps[0]] = comps[1] -+ return ret -+ except (OSError, IOError): -+ log.error('Could not open sysctl config file') -+ return None -+ else: -+ out = __salt__['cmd.run'](cmd, output_loglevel='trace') -+ for line in out.splitlines(): -+ if any([line.startswith('{0}.'.format(root)) for root in roots]): -+ comps = line.split('=', 1) -+ ret[comps[0]] = comps[1] -+ elif comps[0]: -+ ret[comps[0]] += '{0}\n'.format(line) -+ else: -+ continue -+ return ret - - - def get(name): diff --git a/sysutils/py-salt/files/patch-salt_utils_rsax931.py b/sysutils/py-salt/files/patch-salt_utils_rsax931.py new file mode 100644 index 000000000000..d2a1e150ba3e --- /dev/null +++ b/sysutils/py-salt/files/patch-salt_utils_rsax931.py @@ -0,0 +1,32 @@ +--- salt/utils/rsax931.py.orig 2016-11-22 17:52:40 UTC ++++ salt/utils/rsax931.py +@@ -16,6 +16,11 @@ import salt.utils + from ctypes import cdll, c_char_p, c_int, c_void_p, pointer, create_string_buffer + from ctypes.util import find_library + ++# Constants taken from openssl-1.1.0c/include/openssl/crypto.h ++OPENSSL_INIT_ADD_ALL_CIPHERS = 0x00000004 ++OPENSSL_INIT_ADD_ALL_DIGESTS = 0x00000008 ++OPENSSL_INIT_NO_LOAD_CONFIG = 0x00000080 ++ + + def _load_libcrypto(): + ''' +@@ -62,8 +67,15 @@ def _init_libcrypto(): + libcrypto.RSA_private_encrypt.argtypes = (c_int, c_char_p, c_char_p, c_void_p, c_int) + libcrypto.RSA_public_decrypt.argtypes = (c_int, c_char_p, c_char_p, c_void_p, c_int) + +- libcrypto.OPENSSL_no_config() +- libcrypto.OPENSSL_add_all_algorithms_noconf() ++ try: ++ if libcrypto.OPENSSL_init_crypto(OPENSSL_INIT_NO_LOAD_CONFIG | ++ OPENSSL_INIT_ADD_ALL_CIPHERS | ++ OPENSSL_INIT_ADD_ALL_DIGESTS, None) != 1: ++ raise OSError("Failed to initialize OpenSSL library (OPENSSL_init_crypto failed)") ++ except AttributeError: ++ # Support for OpenSSL < 1.1 (OPENSSL_API_COMPAT < 0x10100000L) ++ libcrypto.OPENSSL_no_config() ++ libcrypto.OPENSSL_add_all_algorithms_noconf() + + return libcrypto + diff --git a/sysutils/py-salt/files/patch-setup.py b/sysutils/py-salt/files/patch-setup.py index a3661e6bddf8..616ec5cf0778 100644 --- a/sysutils/py-salt/files/patch-setup.py +++ b/sysutils/py-salt/files/patch-setup.py @@ -1,12 +1,12 @@ ---- setup.py.orig 2016-05-25 22:30:31 UTC +--- setup.py.orig 2016-11-22 16:50:54 UTC +++ setup.py -@@ -986,8 +986,8 @@ class SaltDistribution(distutils.dist.Di +@@ -988,8 +988,8 @@ class SaltDistribution(distutils.dist.Di def _property_data_files(self): # Data files common to all scenarios data_files = [ -- ('share/man/man1', ['doc/man/salt-call.1']), +- ('share/man/man1', ['doc/man/salt-call.1', 'doc/man/salt-run.1']), - ('share/man/man7', ['doc/man/salt.7']) -+ ('man/man1', ['doc/man/salt-call.1']), ++ ('man/man1', ['doc/man/salt-call.1', 'doc/man/salt-run.1']), + ('man/man7', ['doc/man/salt.7']) ] if self.ssh_packaging or PACKAGED_FOR_SALT_SSH: |