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)
This commit is contained in:
Steve Wills 2016-12-05 15:00:49 +00:00
parent 4940cfccd5
commit d5f1652d5d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=427901
6 changed files with 1517 additions and 72 deletions

View file

@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= salt
PORTVERSION= 2016.3.4
PORTVERSION= 2016.11.0
CATEGORIES= sysutils python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@ -46,19 +46,6 @@ USE_PYTHON= distutils
NO_ARCH= yes
PYDISTUTILS_EGGINFO= salt-${DISTVERSION}-py${PYTHON_VER}.egg-info
PYDISTUTILS_INSTALLARGS+=\
--prefix=${PREFIX} \
--salt-root-dir=/ \
--salt-config-dir=${ETCDIR} \
--salt-cache-dir=/var/cache/salt \
--salt-sock-dir=/var/run/salt \
--salt-srv-root-dir=${ETCDIR} \
--salt-base-file-roots-dir=${ETCDIR}/states \
--salt-base-pillar-roots-dir=${ETCDIR}/pillar \
--salt-base-master-roots-dir=${ETCDIR}/salt-master \
--salt-logs-dir=/var/log/salt \
--salt-pidfile-dir=/var/run
USE_RC_SUBR= salt_api \
salt_proxy \
salt_master \

View file

@ -1,3 +1,3 @@
TIMESTAMP = 1478030317
SHA256 (salt-2016.3.4.tar.gz) = 5d4c822719d7fb2d79b0103cd9b015d251300890f8aa174e16b73fcfd6eb22f9
SIZE (salt-2016.3.4.tar.gz) = 8354090
TIMESTAMP = 1479913379
SHA256 (salt-2016.11.0.tar.gz) = b516285926ee95cedc64ecddab05d14422b7c8819c9f6d046a431c41d608e6bc
SIZE (salt-2016.11.0.tar.gz) = 9044879

View file

@ -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):

View file

@ -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

View file

@ -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:

File diff suppressed because it is too large Load diff