Index: head/sysutils/py-salt/Makefile =================================================================== --- head/sysutils/py-salt/Makefile (revision 416913) +++ head/sysutils/py-salt/Makefile (revision 416914) @@ -1,90 +1,91 @@ # Created by: Christer Edwards # $FreeBSD$ PORTNAME= salt PORTVERSION= 2016.3.0 +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/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_grains_core.py =================================================================== --- head/sysutils/py-salt/files/patch-salt_grains_core.py (nonexistent) +++ head/sysutils/py-salt/files/patch-salt_grains_core.py (revision 416914) @@ -0,0 +1,12 @@ +# Issue #33608 +# https://github.com/saltstack/salt/issues/33608 +--- salt/grains/core.py.orig 2016-05-25 22:30:31 UTC ++++ salt/grains/core.py +@@ -1422,6 +1422,7 @@ def os_data(): + else: + grains['os'] = grains['kernel'] + if grains['kernel'] == 'FreeBSD': ++ grains.update(_bsd_cpudata(grains)) + try: + grains['osrelease'] = __salt__['cmd.run']('freebsd-version -u').split('-')[0] + except salt.exceptions.CommandExecutionError: Property changes on: head/sysutils/py-salt/files/patch-salt_grains_core.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_grains_disks.py =================================================================== --- head/sysutils/py-salt/files/patch-salt_grains_disks.py (nonexistent) +++ head/sysutils/py-salt/files/patch-salt_grains_disks.py (revision 416914) @@ -0,0 +1,51 @@ +--- salt/grains/disks.py.orig 2016-05-25 22:30:31 UTC ++++ salt/grains/disks.py +@@ -57,18 +57,27 @@ class _geomconsts(object): + + _datatypes = { + MEDIASIZE: ('re_int', r'(\d+)'), +- SECTORSIZE: 'int', +- STRIPESIZE: 'int', +- STRIPEOFFSET: 'int', +- ROTATIONRATE: 'int', ++ SECTORSIZE: 'try_int', ++ STRIPESIZE: 'try_int', ++ STRIPEOFFSET: 'try_int', ++ ROTATIONRATE: 'try_int', + } + + + def _datavalue(datatype, data): +- if datatype == 'int': +- return int(data) +- elif datatype and datatype[0] == 're_int': +- return int(re.search(datatype[1], data).group(1)) ++ if datatype == 'try_int': ++ try: ++ return int(data) ++ except ValueError: ++ return None ++ elif datatype is tuple and datatype[0] == 're_int': ++ search = re.search(datatype[1], data) ++ if search: ++ try: ++ return int(search.group(1)) ++ except ValueError: ++ return None ++ return None + else: + return data + +@@ -97,9 +106,11 @@ def _freebsd_geom(): + tmp[_geomconsts._aliases[attrib]] = value + + name = tmp.pop(_geomconsts.GEOMNAME) ++ if name.startswith('cd'): ++ return + + ret['disks'][name] = tmp +- if tmp[_geomconsts.ROTATIONRATE] == 0: ++ if tmp.get(_geomconsts.ROTATIONRATE) == 0: + log.trace('Device {0} reports itself as an SSD'.format(device)) + ret['SSDs'].append(name) + Property changes on: head/sysutils/py-salt/files/patch-salt_grains_disks.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_pkgng.py =================================================================== --- head/sysutils/py-salt/files/patch-salt_modules_pkgng.py (nonexistent) +++ head/sysutils/py-salt/files/patch-salt_modules_pkgng.py (revision 416914) @@ -0,0 +1,24 @@ +--- salt/modules/pkgng.py.orig 2016-05-25 22:30:31 UTC ++++ salt/modules/pkgng.py +@@ -97,7 +97,8 @@ def _get_pkgng_version(jail=None, chroot + ''' + return the version of 'pkg' + ''' +- return __salt__['cmd.run']([_pkg(jail, chroot), '--version']).strip() ++ cmd = _pkg(jail, chroot) + ['--version'] ++ return __salt__['cmd.run'](cmd).strip() + + + def _get_version(name, results): +@@ -287,9 +288,9 @@ def latest_version(*names, **kwargs): + for name in names: + # FreeBSD supports packages in format java/openjdk7 + if '/' in name: +- cmd = [_pkg(jail, chroot), 'search'] ++ cmd = _pkg(jail, chroot) + ['search'] + else: +- cmd = [_pkg(jail, chroot), 'search', '-S', 'name', '-Q', 'version', '-e'] ++ cmd = _pkg(jail, chroot) + ['search', '-S', 'name', '-Q', 'version', '-e'] + if quiet: + cmd.append('-q') + cmd.append(name) Property changes on: head/sysutils/py-salt/files/patch-salt_modules_pkgng.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_returners_local__cache.py =================================================================== --- head/sysutils/py-salt/files/patch-salt_returners_local__cache.py (nonexistent) +++ head/sysutils/py-salt/files/patch-salt_returners_local__cache.py (revision 416914) @@ -0,0 +1,22 @@ +# Issue #33554 +# https://github.com/saltstack/salt/issues/33554 +--- salt/returners/local_cache.py.orig 2016-05-25 22:30:31 UTC ++++ salt/returners/local_cache.py +@@ -407,14 +407,14 @@ def clean_old_jobs(): + for final in t_path_dirs: + f_path = os.path.join(t_path, final) + jid_file = os.path.join(f_path, 'jid') +- if not os.path.isfile(jid_file): ++ if not os.path.isfile(jid_file) and os.path.exists(t_path): + # No jid file means corrupted cache entry, scrub it + # by removing the entire t_path directory + shutil.rmtree(t_path) +- else: ++ elif os.path.isfile(jid_file): + jid_ctime = os.stat(jid_file).st_ctime + hours_difference = (cur - jid_ctime) / 3600.0 +- if hours_difference > __opts__['keep_jobs']: ++ if hours_difference > __opts__['keep_jobs'] and os.path.exists(t_path): + # Remove the entire t_path from the original JID dir + shutil.rmtree(t_path) + Property changes on: head/sysutils/py-salt/files/patch-salt_returners_local__cache.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-setup.py =================================================================== --- head/sysutils/py-salt/files/patch-setup.py (revision 416913) +++ head/sysutils/py-salt/files/patch-setup.py (revision 416914) @@ -1,13 +1,13 @@ ---- setup.py.orig 2015-04-17 18:44:50 UTC +--- setup.py.orig 2016-05-25 22:30:31 UTC +++ setup.py -@@ -623,8 +623,8 @@ class SaltDistribution(distutils.dist.Di +@@ -986,8 +986,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/man7', ['doc/man/salt.7']) + ('man/man1', ['doc/man/salt-call.1']), + ('man/man7', ['doc/man/salt.7']) ] if self.ssh_packaging or PACKAGED_FOR_SALT_SSH: data_files[0][1].append('doc/man/salt-ssh.1')