Index: head/sysutils/py-salt/Makefile =================================================================== --- head/sysutils/py-salt/Makefile (revision 398041) +++ head/sysutils/py-salt/Makefile (revision 398042) @@ -1,85 +1,88 @@ # Created by: Christer Edwards # $FreeBSD$ PORTNAME= salt PORTVERSION= 2015.8.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 RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}yaml>0:${PORTSDIR}/devel/py-yaml \ ${PYTHON_PKGNAMEPREFIX}Jinja2>0:${PORTSDIR}/devel/py-Jinja2 \ ${PYTHON_PKGNAMEPREFIX}msgpack>=0.1.13:${PORTSDIR}/devel/py-msgpack \ ${PYTHON_PKGNAMEPREFIX}libcloud>=0.14.0:${PORTSDIR}/net/py-libcloud \ ${PYTHON_PKGNAMEPREFIX}botocore>0:${PORTSDIR}/devel/py-botocore \ ${PYTHON_PKGNAMEPREFIX}MarkupSafe>0:${PORTSDIR}/textproc/py-MarkupSafe \ ${PYTHON_PKGNAMEPREFIX}requests>1:${PORTSDIR}/www/py-requests \ ${PYTHON_PKGNAMEPREFIX}enum34>0:${PORTSDIR}/devel/py-enum34 \ ${PYTHON_PKGNAMEPREFIX}progressbar>0:${PORTSDIR}/misc/py-progressbar \ ${PYTHON_PKGNAMEPREFIX}futures>=2.0:${PORTSDIR}/devel/py-futures \ ${PYTHON_PKGNAMEPREFIX}tornado>=4.2.1:${PORTSDIR}/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:${PORTSDIR}/net/py-pyzmq ZEROMQ_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyzmq>=2.2.0:${PORTSDIR}/net/py-pyzmq \ ${PYTHON_PKGNAMEPREFIX}pycrypto>2.6.1:${PORTSDIR}/security/py-pycrypto RAET_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}libnacl>=1.4.2:${PORTSDIR}/security/py-libnacl \ ${PYTHON_PKGNAMEPREFIX}ioflo>=1.2.1:${PORTSDIR}/devel/py-ioflo \ ${PYTHON_PKGNAMEPREFIX}raet>0:${PORTSDIR}/net/py-raet USES= python:2 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_master \ +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/pkg-message.in =================================================================== --- head/sysutils/py-salt/files/pkg-message.in (revision 398041) +++ head/sysutils/py-salt/files/pkg-message.in (revision 398042) @@ -1,19 +1,27 @@ =================================================================================================== To configure a Salt Master, do the following: o Copy %%PREFIX%%/etc/salt/master.sample to %%PREFIX%%/etc/salt/master o Update to meet your needs o sysrc salt_master_enable="YES" --------------------------------------------------------------------------------------------------- To configure a Salt Minion, do the following: o Copy %%PREFIX%%/etc/salt/minion.sample to %%PREFIX%%/etc/salt/minion o Update 'master: salt' to point to your Salt Master's hostname or IP o sysrc salt_minion_enable="YES" +--------------------------------------------------------------------------------------------------- + +To configure a Salt Proxy Minion, do the following: + + o sysrc salt_proxy_enable="YES" + o sysrc salt_proxy_list="" + o Update the salt_proxy_list with the proxy minion name(s) + =================================================================================================== Index: head/sysutils/py-salt/files/salt_api.in =================================================================== --- head/sysutils/py-salt/files/salt_api.in (revision 398041) +++ head/sysutils/py-salt/files/salt_api.in (revision 398042) @@ -1,30 +1,31 @@ #!/bin/sh # $FreeBSD$ # # Salt API startup script # # PROVIDE: salt_api # REQUIRE: LOGIN # KEYWORD: shutdown # Add the following to /etc/rc.conf[.local] to enable this service # -# salt_api_enable="YES" +# salt_api_enable (bool): Set to NO by default. +# Set it to YES to enable salt_api # . /etc/rc.subr -name="salt_api" +name=salt_api rcvar=salt_api_enable load_rc_config ${name} -: ${salt_api_enable:="NO"} +: ${salt_api_enable:=NO} command="%%PREFIX%%/bin/salt-api" command_interpreter="%%PYTHON_CMD%%" required_files="%%PREFIX%%/etc/salt" command_args="-c ${required_files} -d" run_rc_command "$1" Index: head/sysutils/py-salt/files/salt_master.in =================================================================== --- head/sysutils/py-salt/files/salt_master.in (revision 398041) +++ head/sysutils/py-salt/files/salt_master.in (revision 398042) @@ -1,30 +1,40 @@ #!/bin/sh # $FreeBSD$ # # Salt Master startup script # # PROVIDE: salt_master # REQUIRE: LOGIN # KEYWORD: shutdown # Add the following to /etc/rc.conf[.local] to enable this service # -# salt_master_enable="YES" +# salt_master_enable (bool): Set to NO by default. +# Set it to YES to enable salt_master. +# salt_master_paths (string): Set to "/sbin:/bin:/usr/sbin:/usr/bin:%%PREFIX%%/bin:%%PREFIX%%/sbin" by default. +# Default $PATH for salt_master. +# salt_master_eggcache (string): Set to "/tmp" by default. +# Allows defining egg cache directory to fix runtime on diskless systems. # . /etc/rc.subr -name="salt_master" +name=salt_master rcvar=salt_master_enable load_rc_config ${name} -: ${salt_master_enable:="NO"} +: ${salt_master_enable:=NO} +: ${salt_master_paths=/sbin:/bin:/usr/sbin:/usr/bin:%%PREFIX%%/bin:%%PREFIX%%/sbin} +: ${salt_master_eggcache=/tmp} command="%%PREFIX%%/bin/salt-master" command_interpreter="%%PYTHON_CMD%%" required_files="%%PREFIX%%/etc/salt" command_args="-c ${required_files} -d" + +export PATH="${salt_master_paths}" +export PYTHON_EGG_CACHE="${salt_master_eggcache}" run_rc_command "$1" Index: head/sysutils/py-salt/files/salt_minion.in =================================================================== --- head/sysutils/py-salt/files/salt_minion.in (revision 398041) +++ head/sysutils/py-salt/files/salt_minion.in (revision 398042) @@ -1,35 +1,40 @@ #!/bin/sh # $FreeBSD$ # # Salt Minion startup script # # PROVIDE: salt_minion # REQUIRE: LOGIN # KEYWORD: shutdown # Add the following to /etc/rc.conf[.local] to enable this service # -# salt_minion_enable="YES" +# salt_minion_enable (bool): Set to NO by default. +# Set it to YES to enable salt_minion +# salt_minion_paths (string): Set to "/sbin:/bin:/usr/sbin:/usr/bin:%%PREFIX%%/bin:%%PREFIX%%/sbin" by default. +# Default $PATH for salt_minion +# salt_minion_eggcache (string): Set to "/tmp" by default. +# Allows defining egg cache directory to fix runtime on diskless systems. # . /etc/rc.subr -name="salt_minion" +name=salt_minion rcvar=salt_minion_enable load_rc_config ${name} -: ${salt_minion_enable:="NO"} -: ${salt_minion_paths="$PATH"} -: ${salt_minion_eggcache="/tmp"} +: ${salt_minion_enable:=NO} +: ${salt_minion_paths=/sbin:/bin:/usr/sbin:/usr/bin:%%PREFIX%%/bin:%%PREFIX%%/sbin} +: ${salt_minion_eggcache=/tmp} command="%%PREFIX%%/bin/salt-minion" command_interpreter="%%PYTHON_CMD%%" required_files="%%PREFIX%%/etc/salt" command_args="-c ${required_files} -d" export PATH="${salt_minion_paths}" export PYTHON_EGG_CACHE="${salt_minion_eggcache}" run_rc_command "$1" Index: head/sysutils/py-salt/files/salt_proxy.in =================================================================== --- head/sysutils/py-salt/files/salt_proxy.in (nonexistent) +++ head/sysutils/py-salt/files/salt_proxy.in (revision 398042) @@ -0,0 +1,59 @@ +#!/bin/sh + +# $FreeBSD$ +# +# Salt Proxy startup script +# +# PROVIDE: salt_proxy +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# Add the following to /etc/rc.conf[.local] to enable this service +# +# salt_proxy_enable (bool): Set to NO by default. +# Set it to YES to enable salt_proxy. +# salt_proxy_paths (string): Set to "/sbin:/bin:/usr/sbin:/usr/bin:%%PREFIX%%/bin:%%PREFIX%%/sbin" by default. +# Default $PATH for Salt +# salt_proxy_eggcache (string): Set to "/tmp" by default. +# Allows defining egg cache directory to fix runtime on diskless systems. +# salt_proxy_list (string): Set to "" by default. +# Space separated list of proxies. +# + +. /etc/rc.subr + +name=salt_proxy +rcvar=salt_proxy_enable + +load_rc_config ${name} + +: ${salt_proxy_enable:=NO} +: ${salt_proxy_paths=/sbin:/bin:/usr/sbin:/usr/bin:%%PREFIX%%/bin:%%PREFIX%%/sbin} +: ${salt_proxy_eggcache=/tmp} + +start_cmd=salt_proxy_start + +command="%%PREFIX%%/bin/salt-proxy" +command_interpreter="%%PYTHON_CMD%%" +required_files="%%PREFIX%%/etc/salt" +command_args="-c ${required_files} -d" + +export PATH="${salt_minion_paths}" +export PYTHON_EGG_CACHE="${salt_minion_eggcache}" + +salt_proxy_start() +{ + if [ ! -n "${salt_proxy_list}" ]; then + echo "${salt_proxy_list} is undefined" + return 1 + fi + + local _proxy + + for _proxy in ${salt_proxy_list}; do + echo "Starting salt-proxy: ${_proxy}" + ${command_interpreter} ${command} --proxyid ${_proxy} ${command_args} + done +} + +run_rc_command "$1" Property changes on: head/sysutils/py-salt/files/salt_proxy.in ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ 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/salt_syndic.in =================================================================== --- head/sysutils/py-salt/files/salt_syndic.in (revision 398041) +++ head/sysutils/py-salt/files/salt_syndic.in (revision 398042) @@ -1,30 +1,31 @@ #!/bin/sh # $FreeBSD$ # # Salt Synic startup script # # PROVIDE: salt_syndic # REQUIRE: LOGIN # KEYWORD: shutdown # Add the following to /etc/rc.conf[.local] to enable this service # -# salt_syndic_enable="YES" +# salt_syndic_enable (bool): Set to NO by default. +# Set it to YES to enable salt_syndic # . /etc/rc.subr -name="salt_syndic" +name=salt_syndic rcvar=salt_syndic_enable load_rc_config ${name} -: ${salt_syndic_enable:="NO"} +: ${salt_syndic_enable:=NO} command="%%PREFIX%%/bin/salt-syndic" command_interpreter="%%PYTHON_CMD%%" required_files="%%PREFIX%%/etc/salt" command_args="-c ${required_files} -d" run_rc_command "$1"