summaryrefslogtreecommitdiff
path: root/sysutils/py-salt/files
diff options
context:
space:
mode:
authorSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2016-12-19 15:54:48 +0000
committerSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2016-12-19 15:54:48 +0000
commitd27a263393a1b19d814ba59c3194cf0f4374f137 (patch)
treeef93def1be2a35ef30c71b5fdb7dfe9af4a80f57 /sysutils/py-salt/files
parent- Update *_DEPENDS: Bio::Coordinate family has been moved from biology/p5-Bio... (diff)
- Update to 2016.11.1
- While I'm here: - Update version requirement - Use USE_PYTHON=autoplist - Remove PYDISTUTILS_EGGINFO - Sort USE_RC_SUBR - Sort PLIST Changes: https://docs.saltstack.com/en/latest/topics/releases/2016.11.1.html PR: 215380 Submitted by: Christer Edwards <christer.edwards@gmail.com> (maintainer)
Notes
Notes: svn path=/head/; revision=428944
Diffstat (limited to 'sysutils/py-salt/files')
-rw-r--r--sysutils/py-salt/files/patch-freebsd_sysctl.py44
-rw-r--r--sysutils/py-salt/files/patch-salt_utils_rsax931.py32
2 files changed, 0 insertions, 76 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
deleted file mode 100644
index d2a1e150ba3e..000000000000
--- a/sysutils/py-salt/files/patch-salt_utils_rsax931.py
+++ /dev/null
@@ -1,32 +0,0 @@
---- 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
-