Index: head/sysutils/py-salt/Makefile =================================================================== --- head/sysutils/py-salt/Makefile (revision 412640) +++ head/sysutils/py-salt/Makefile (revision 412641) @@ -1,90 +1,91 @@ # Created by: Christer Edwards # $FreeBSD$ PORTNAME= salt PORTVERSION= 2015.8.8 +PORTREVISION= 1 CATEGORIES= sysutils python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= christer.edwards@gmail.com COMMENT= Distributed remote execution and configuration management system LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}yaml>0:devel/py-yaml \ ${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2 \ ${PYTHON_PKGNAMEPREFIX}msgpack-python>=0.1.13:devel/py-msgpack-python \ ${PYTHON_PKGNAMEPREFIX}libcloud>=0.14.0:net/py-libcloud \ ${PYTHON_PKGNAMEPREFIX}botocore>0:devel/py-botocore \ ${PYTHON_PKGNAMEPREFIX}MarkupSafe>0:textproc/py-MarkupSafe \ ${PYTHON_PKGNAMEPREFIX}requests>1:www/py-requests \ ${PYTHON_PKGNAMEPREFIX}enum34>0:devel/py-enum34 \ ${PYTHON_PKGNAMEPREFIX}progressbar>0:misc/py-progressbar \ ${PYTHON_PKGNAMEPREFIX}futures>=2.0:devel/py-futures \ ${PYTHON_PKGNAMEPREFIX}tornado>=4.2.1:www/py-tornado OPTIONS_DEFINE= ZEROMQ RAET OPTIONS_DEFAULT= ZEROMQ ZEROMQ_DESC= Enable ZeroMQ transport RAET_DESC= Enable RAET transport ZEROMQ_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyzmq>=2.2.0:net/py-pyzmq ZEROMQ_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyzmq>=2.2.0:net/py-pyzmq \ ${PYTHON_PKGNAMEPREFIX}pycrypto>2.6.1:security/py-pycrypto RAET_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}libnacl>=1.4.2:security/py-libnacl \ ${PYTHON_PKGNAMEPREFIX}ioflo>=1.2.1:devel/py-ioflo \ ${PYTHON_PKGNAMEPREFIX}raet>0:net/py-raet USES= cpe python:2 CPE_VENDOR= saltstack CPE_PRODUCT= salt 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 \ salt_minion \ salt_syndic SUB_LIST+= PYTHON_CMD=${PYTHON_CMD} SUB_FILES= pkg-message post-patch: .for file in conf/minion conf/master doc/man/salt-key.1 \ doc/man/salt-cp.1 doc/man/salt-minion.1 doc/man/salt-syndic.1 \ doc/man/salt-master.1 doc/man/salt-run.1 doc/man/salt.7 doc/man/salt.1 \ doc/man/salt-call.1 salt/config.py \ salt/modules/mysql.py salt/utils/parsers.py salt/modules/tls.py \ salt/modules/postgres.py salt/utils/migrations.py @${REINPLACE_CMD} -e 's|/etc/salt|${ETCDIR}|' \ -e 's|/srv/salt|${ETCDIR}/states|' \ -e 's|/srv/pillar|${ETCDIR}/pillar|' ${WRKSRC}/${file} .endfor @${REINPLACE_CMD} -e 's|yumpkg5|pkgng|' ${WRKSRC}/conf/minion post-install: @${MKDIR} ${STAGEDIR}${ETCDIR} ${INSTALL_DATA} ${WRKSRC}/conf/master ${STAGEDIR}${ETCDIR}/master.sample ${INSTALL_DATA} ${WRKSRC}/conf/minion ${STAGEDIR}${ETCDIR}/minion.sample .include Index: head/sysutils/py-salt/files/patch-salt__config.py =================================================================== --- head/sysutils/py-salt/files/patch-salt__config.py (nonexistent) +++ head/sysutils/py-salt/files/patch-salt__config.py (revision 412641) @@ -0,0 +1,116 @@ +diff --git a/salt/config.py b/salt/config.py +index 071e06b..1f83c33 100644 +--- salt/config.py.orig ++++ salt/config.py +@@ -63,7 +63,7 @@ + + VALID_OPTS = { + # The address of the salt master. May be specified as IP address or hostname +- 'master': str, ++ 'master': (str, list), + + # The TCP/UDP port of the master to connect to in order to listen to publications + 'master_port': int, +@@ -541,7 +541,7 @@ + 'file_recv': bool, + 'file_recv_max_size': int, + 'file_ignore_regex': list, +- 'file_ignore_glob': bool, ++ 'file_ignore_glob': list, + 'fileserver_backend': list, + 'fileserver_followsymlinks': bool, + 'fileserver_ignoresymlinks': bool, +@@ -833,7 +833,7 @@ + 'file_recv': False, + 'file_recv_max_size': 100, + 'file_ignore_regex': [], +- 'file_ignore_glob': None, ++ 'file_ignore_glob': [], + 'fileserver_backend': ['roots'], + 'fileserver_followsymlinks': True, + 'fileserver_ignoresymlinks': False, +@@ -1348,26 +1348,30 @@ def _validate_opts(opts): + Check that all of the types of values passed into the config are + of the right types + ''' ++ def format_multi_opt(valid_type): ++ try: ++ num_types = len(valid_type) ++ except TypeError: ++ # Bare type name won't have a length, return the name of the type ++ # passed. ++ return valid_type.__name__ ++ else: ++ if num_types == 1: ++ return valid_type.__name__ ++ elif num_types > 1: ++ ret = ', '.join(x.__name__ for x in valid_type[:-1]) ++ ret += ' or ' + valid_type[-1].__name__ ++ + errors = [] +- err = ('Key {0} with value {1} has an invalid type of {2}, a {3} is ' ++ ++ err = ('Key \'{0}\' with value {1} has an invalid type of {2}, a {3} is ' + 'required for this value') + for key, val in six.iteritems(opts): + if key in VALID_OPTS: +- if isinstance(VALID_OPTS[key](), list): +- if isinstance(val, VALID_OPTS[key]): +- continue +- else: +- errors.append( +- err.format(key, val, type(val).__name__, 'list') +- ) +- if isinstance(VALID_OPTS[key](), dict): +- if isinstance(val, VALID_OPTS[key]): +- continue +- else: +- errors.append( +- err.format(key, val, type(val).__name__, 'dict') +- ) +- else: ++ if isinstance(val, VALID_OPTS[key]): ++ continue ++ ++ if hasattr(VALID_OPTS[key], '__call__'): + try: + VALID_OPTS[key](val) + if isinstance(val, (list, dict)): +@@ -1384,14 +1388,21 @@ def _validate_opts(opts): + VALID_OPTS[key].__name__ + ) + ) +- except ValueError: ++ except (TypeError, ValueError): + errors.append( +- err.format(key, val, type(val).__name__, VALID_OPTS[key]) +- ) +- except TypeError: +- errors.append( +- err.format(key, val, type(val).__name__, VALID_OPTS[key]) ++ err.format(key, ++ val, ++ type(val).__name__, ++ VALID_OPTS[key].__name__) + ) ++ continue ++ ++ errors.append( ++ err.format(key, ++ val, ++ type(val).__name__, ++ format_multi_opt(VALID_OPTS[key].__name__)) ++ ) + + # RAET on Windows uses 'win32file.CreateMailslot()' for IPC. Due to this, + # sock_dirs must start with '\\.\mailslot\' and not contain any colons. +@@ -1404,7 +1415,7 @@ def _validate_opts(opts): + '\\\\.\\mailslot\\' + opts['sock_dir'].replace(':', '')) + + for error in errors: +- log.warning(error) ++ log.debug(error) + if errors: + return False + return True + Property changes on: head/sysutils/py-salt/files/patch-salt__config.py ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sysutils/py-salt/files/patch-salt__modules__win_dacl.py =================================================================== --- head/sysutils/py-salt/files/patch-salt__modules__win_dacl.py (nonexistent) +++ head/sysutils/py-salt/files/patch-salt__modules__win_dacl.py (revision 412641) @@ -0,0 +1,34 @@ +diff --git a/salt/modules/win_dacl.py b/salt/modules/win_dacl.py +index d57bb7b..d9ee27a 100644 +--- salt/modules/win_dacl.py ++++ salt/modules/win_dacl.py +@@ -44,9 +44,10 @@ class daclConstants(object): + # in ntsecuritycon has the extra bits 0x200 enabled. + # Note that you when you set this permission what you'll generally get back is it + # ORed with 0x200 (SI_NO_ACL_PROTECT), which is what ntsecuritycon incorrectly defines. +- FILE_ALL_ACCESS = (ntsecuritycon.STANDARD_RIGHTS_REQUIRED | ntsecuritycon.SYNCHRONIZE | 0x1ff) + + def __init__(self): ++ self.FILE_ALL_ACCESS = (ntsecuritycon.STANDARD_RIGHTS_REQUIRED | ntsecuritycon.SYNCHRONIZE | 0x1ff) ++ + self.hkeys_security = { + 'HKEY_LOCAL_MACHINE': 'MACHINE', + 'HKEY_USERS': 'USERS', +@@ -88,7 +89,7 @@ def __init__(self): + ntsecuritycon.DELETE, + 'TEXT': 'modify'}, + 'FULLCONTROL': { +- 'BITS': daclConstants.FILE_ALL_ACCESS, ++ 'BITS': self.FILE_ALL_ACCESS, + 'TEXT': 'full control'} + } + } +@@ -368,7 +369,7 @@ def add_ace(path, objectType, user, permission, acetype, propagation): + path: path to the object (i.e. c:\\temp\\file, HKEY_LOCAL_MACHINE\\SOFTWARE\\KEY, etc) + user: user to add + permission: permissions for the user +- acetypes: either allow/deny for each user/permission (ALLOW, DENY) ++ acetype: either allow/deny for each user/permission (ALLOW, DENY) + propagation: how the ACE applies to children for Registry Keys and Directories(KEY, KEY&SUBKEYS, SUBKEYS) + + CLI Example: Property changes on: head/sysutils/py-salt/files/patch-salt__modules__win_dacl.py ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property