Accepting request 175205 from devel:languages:python
New package see http://lists.opensuse.org/opensuse-factory/2013-05/msg00163.html OBS-URL: https://build.opensuse.org/request/show/175205 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/salt?expand=0&rev=1
This commit is contained in:
commit
b1bd3c2146
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
3
salt-0.15.1.tar.gz
Normal file
3
salt-0.15.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2bd3bdb38bb7aefebdfaddfef70ebce29e7fa2dc9806e87115a9c6f0915b4f95
|
||||
size 5752766
|
241
salt-master
Normal file
241
salt-master
Normal file
@ -0,0 +1,241 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Template SUSE system startup script for salt-master
|
||||
# Copyright (C) 1995--2005 Kurt Garloff, SUSE / Novell Inc.
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
# your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# /etc/init.d/salt-master
|
||||
# and its symbolic link
|
||||
# /(usr/)sbin/rcsalt-master
|
||||
#
|
||||
#
|
||||
# LSB compatible service control script; see http://www.linuxbase.org/spec/
|
||||
#
|
||||
# Note: This template uses functions rc_XXX defined in /etc/rc.status on
|
||||
# UnitedLinux/SUSE/Novell based Linux distributions. If you want to base your
|
||||
# script on this template and ensure that it works on non UL based LSB
|
||||
# compliant Linux distributions, you either have to provide the rc.status
|
||||
# functions from UL or change the script to work without them.
|
||||
# See skeleton.compat for a template that works with other distros as well.
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: salt-master
|
||||
# Required-Start: $syslog $network $remote_fs
|
||||
# Should-Start: $time ypbind smtp
|
||||
# Required-Stop: $syslog $remote_fs
|
||||
# Should-Stop: ypbind smtp
|
||||
# Default-Start: 3 5
|
||||
# Default-Stop: 0 1 2 6
|
||||
# Short-Description: Salt master daemon providing control minions
|
||||
# Description: This is a daemon that controls the salt minions
|
||||
# Salt is an open source tool to manage your infrastructure. Easy enough to get
|
||||
# running in minutes and fast enough to manage tens of thousands of servers (and still
|
||||
# get a response back in seconds).
|
||||
### END INIT INFO
|
||||
#
|
||||
# Any extensions to the keywords given above should be preceeded by
|
||||
# X-VendorTag- (X-UnitedLinux- X-SuSE- for us) according to LSB.
|
||||
#
|
||||
# Notes on Required-Start/Should-Start:
|
||||
# * There are two different issues that are solved by Required-Start
|
||||
# and Should-Start
|
||||
# (a) Hard dependencies: This is used by the runlevel editor to determine
|
||||
# which services absolutely need to be started to make the start of
|
||||
# this service make sense. Example: nfsserver should have
|
||||
# Required-Start: $portmap
|
||||
# Also, required services are started before the dependent ones.
|
||||
# The runlevel editor will warn about such missing hard dependencies
|
||||
# and suggest enabling. During system startup, you may expect an error,
|
||||
# if the dependency is not fulfilled.
|
||||
# (b) Specifying the init script ordering, not real (hard) dependencies.
|
||||
# This is needed by insserv to determine which service should be
|
||||
# started first (and at a later stage what services can be started
|
||||
# in parallel). The tag Should-Start: is used for this.
|
||||
# It tells, that if a service is available, it should be started
|
||||
# before. If not, never mind.
|
||||
# * When specifying hard dependencies or ordering requirements, you can
|
||||
# use names of services (contents of their Provides: section)
|
||||
# or pseudo names starting with a $. The following ones are available
|
||||
# according to LSB (1.1):
|
||||
# $local_fs all local file systems are mounted
|
||||
# (most services should need this!)
|
||||
# $remote_fs all remote file systems are mounted
|
||||
# (note that /usr may be remote, so
|
||||
# many services should Require this!)
|
||||
# $syslog system logging facility up
|
||||
# $network low level networking (eth card, ...)
|
||||
# $named hostname resolution available
|
||||
# $netdaemons all network daemons are running
|
||||
# The $netdaemons pseudo service has been removed in LSB 1.2.
|
||||
# For now, we still offer it for backward compatibility.
|
||||
# These are new (LSB 1.2):
|
||||
# $time the system time has been set correctly
|
||||
# $portmap SunRPC portmapping service available
|
||||
# UnitedLinux extensions:
|
||||
# $ALL indicates that a script should be inserted
|
||||
# at the end
|
||||
# * The services specified in the stop tags
|
||||
# (Required-Stop/Should-Stop)
|
||||
# specify which services need to be still running when this service
|
||||
# is shut down. Often the entries there are just copies or a subset
|
||||
# from the respective start tag.
|
||||
# * Should-Start/Stop are now part of LSB as of 2.0,
|
||||
# formerly SUSE/Unitedlinux used X-UnitedLinux-Should-Start/-Stop.
|
||||
# insserv does support both variants.
|
||||
# * X-UnitedLinux-Default-Enabled: yes/no is used at installation time
|
||||
# (%fillup_and_insserv macro in %post of many RPMs) to specify whether
|
||||
# a startup script should default to be enabled after installation.
|
||||
# It's not used by insserv.
|
||||
#
|
||||
# Note on runlevels:
|
||||
# 0 - halt/poweroff 6 - reboot
|
||||
# 1 - single user 2 - multiuser without network exported
|
||||
# 3 - multiuser w/ network (text mode) 5 - multiuser w/ network and X11 (xdm)
|
||||
#
|
||||
# Note on script names:
|
||||
# http://www.linuxbase.org/spec/refspecs/LSB_1.3.0/gLSB/gLSB/scrptnames.html
|
||||
# A registry has been set up to manage the init script namespace.
|
||||
# http://www.lanana.org/
|
||||
# Please use the names already registered or register one or use a
|
||||
# vendor prefix.
|
||||
|
||||
|
||||
# Check for missing binaries (stale symlinks should not happen)
|
||||
# Note: Special treatment of stop for LSB conformance
|
||||
if [ -f /etc/default/salt ]; then
|
||||
. /etc/default/salt
|
||||
else
|
||||
SALTMASTER='/usr/bin/salt-master'
|
||||
fi
|
||||
|
||||
test -x $SALTMASTER || { echo "$SALTMASTER not installed";
|
||||
if [ "$1" = "stop" ]; then exit 0;
|
||||
else exit 5; fi; }
|
||||
|
||||
# Source LSB init functions
|
||||
# providing start_daemon, killproc, pidofproc,
|
||||
# log_success_msg, log_failure_msg and log_warning_msg.
|
||||
# This is currently not used by UnitedLinux based distributions and
|
||||
# not needed for init scripts for UnitedLinux only. If it is used,
|
||||
# the functions from rc.status should not be sourced or used.
|
||||
#. /lib/lsb/init-functions
|
||||
|
||||
# Shell functions sourced from /etc/rc.status:
|
||||
# rc_check check and set local and overall rc status
|
||||
# rc_status check and set local and overall rc status
|
||||
# rc_status -v be verbose in local rc status and clear it afterwards
|
||||
# rc_status -v -r ditto and clear both the local and overall rc status
|
||||
# rc_status -s display "skipped" and exit with status 3
|
||||
# rc_status -u display "unused" and exit with status 3
|
||||
# rc_failed set local and overall rc status to failed
|
||||
# rc_failed <num> set local and overall rc status to <num>
|
||||
# rc_reset clear both the local and overall rc status
|
||||
# rc_exit exit appropriate to overall rc status
|
||||
# rc_active checks whether a service is activated by symlinks
|
||||
. /etc/rc.status
|
||||
|
||||
# Reset status of this service
|
||||
rc_reset
|
||||
|
||||
# Return values acc. to LSB for all commands but status:
|
||||
# 0 - success
|
||||
# 1 - generic or unspecified error
|
||||
# 2 - invalid or excess argument(s)
|
||||
# 3 - unimplemented feature (e.g. "reload")
|
||||
# 4 - user had insufficient privileges
|
||||
# 5 - program is not installed
|
||||
# 6 - program is not configured
|
||||
# 7 - program is not running
|
||||
# 8--199 - reserved (8--99 LSB, 100--149 distrib, 150--199 appl)
|
||||
#
|
||||
# Note that starting an already running service, stopping
|
||||
# or restarting a not-running service as well as the restart
|
||||
# with force-reload (in case signaling is not supported) are
|
||||
# considered a success.
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting salt-master daemon: "
|
||||
## Start daemon with startproc(8). If this fails
|
||||
## the return value is set appropriately by startproc.
|
||||
/sbin/startproc ${SALTMASTER} -d
|
||||
|
||||
# Remember status and be verbose
|
||||
rc_status -v
|
||||
;;
|
||||
stop)
|
||||
echo -n "Shutting down salt-master daemon: "
|
||||
## Stop daemon with killproc(8) and if this fails
|
||||
## killproc sets the return value according to LSB.
|
||||
|
||||
/sbin/killproc -TERM $SALTMASTER
|
||||
|
||||
# Remember status and be verbose
|
||||
rc_status -v
|
||||
;;
|
||||
try-restart|condrestart)
|
||||
## Do a restart only if the service was active before.
|
||||
## Note: try-restart is now part of LSB (as of 1.9).
|
||||
## RH has a similar command named condrestart.
|
||||
if test "$1" = "condrestart"; then
|
||||
echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
|
||||
fi
|
||||
$0 status
|
||||
if test $? = 0; then
|
||||
$0 restart
|
||||
else
|
||||
rc_reset # Not running is not a failure.
|
||||
fi
|
||||
# Remember status and be quiet
|
||||
rc_status
|
||||
;;
|
||||
restart)
|
||||
## Stop the service and regardless of whether it was
|
||||
## running or not, start it again.
|
||||
$0 stop
|
||||
$0 start
|
||||
|
||||
# Remember status and be quiet
|
||||
rc_status
|
||||
;;
|
||||
reload)
|
||||
echo "can't reload configuration, you have to restart it"
|
||||
;;
|
||||
status)
|
||||
echo -n "Checking for service salt-master "
|
||||
## Check status with checkproc(8), if process is running
|
||||
## checkproc will return with exit status 0.
|
||||
|
||||
# Return value is slightly different for the status command:
|
||||
# 0 - service up and running
|
||||
# 1 - service dead, but /var/run/ pid file exists
|
||||
# 2 - service dead, but /var/lock/ lock file exists
|
||||
# 3 - service not running (unused)
|
||||
# 4 - service status unknown :-(
|
||||
# 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.)
|
||||
|
||||
# NOTE: checkproc returns LSB compliant status values.
|
||||
/sbin/checkproc $SALTMASTER
|
||||
# NOTE: rc_status knows that we called this init script with
|
||||
# "status" option and adapts its messages accordingly.
|
||||
rc_status -v
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|status|try-restart|restart|reload}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
rc_exit
|
10
salt-master.service
Normal file
10
salt-master.service
Normal file
@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=The Salt Master Server
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/salt-master
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
240
salt-minion
Normal file
240
salt-minion
Normal file
@ -0,0 +1,240 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Template SUSE system startup script for salt-minion
|
||||
# Copyright (C) 1995--2005 Kurt Garloff, SUSE / Novell Inc.
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
# your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# /etc/init.d/salt-minion
|
||||
# and its symbolic link
|
||||
# /(usr/)sbin/rcsalt-minion
|
||||
#
|
||||
#
|
||||
# LSB compatible service control script; see http://www.linuxbase.org/spec/
|
||||
#
|
||||
# Note: This template uses functions rc_XXX defined in /etc/rc.status on
|
||||
# UnitedLinux/SUSE/Novell based Linux distributions. If you want to base your
|
||||
# script on this template and ensure that it works on non UL based LSB
|
||||
# compliant Linux distributions, you either have to provide the rc.status
|
||||
# functions from UL or change the script to work without them.
|
||||
# See skeleton.compat for a template that works with other distros as well.
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: salt-minion
|
||||
# Required-Start: $syslog $network $remote_fs
|
||||
# Should-Start: $time ypbind smtp
|
||||
# Required-Stop: $syslog $remote_fs
|
||||
# Should-Stop: ypbind smtp
|
||||
# Default-Start: 3 5
|
||||
# Default-Stop: 0 1 2 6
|
||||
# Short-Description: Salt minion daemon providing control minions
|
||||
# Description: This is a daemon that controls the salt minions
|
||||
# Salt is an open source tool to manage your infrastructure. Easy enough to get
|
||||
# running in minutes and fast enough to manage tens of thousands of servers (and still
|
||||
# get a response back in seconds).
|
||||
### END INIT INFO
|
||||
#
|
||||
# Any extensions to the keywords given above should be preceeded by
|
||||
# X-VendorTag- (X-UnitedLinux- X-SuSE- for us) according to LSB.
|
||||
#
|
||||
# Notes on Required-Start/Should-Start:
|
||||
# * There are two different issues that are solved by Required-Start
|
||||
# and Should-Start
|
||||
# (a) Hard dependencies: This is used by the runlevel editor to determine
|
||||
# which services absolutely need to be started to make the start of
|
||||
# this service make sense. Example: nfsserver should have
|
||||
# Required-Start: $portmap
|
||||
# Also, required services are started before the dependent ones.
|
||||
# The runlevel editor will warn about such missing hard dependencies
|
||||
# and suggest enabling. During system startup, you may expect an error,
|
||||
# if the dependency is not fulfilled.
|
||||
# (b) Specifying the init script ordering, not real (hard) dependencies.
|
||||
# This is needed by insserv to determine which service should be
|
||||
# started first (and at a later stage what services can be started
|
||||
# in parallel). The tag Should-Start: is used for this.
|
||||
# It tells, that if a service is available, it should be started
|
||||
# before. If not, never mind.
|
||||
# * When specifying hard dependencies or ordering requirements, you can
|
||||
# use names of services (contents of their Provides: section)
|
||||
# or pseudo names starting with a $. The following ones are available
|
||||
# according to LSB (1.1):
|
||||
# $local_fs all local file systems are mounted
|
||||
# (most services should need this!)
|
||||
# $remote_fs all remote file systems are mounted
|
||||
# (note that /usr may be remote, so
|
||||
# many services should Require this!)
|
||||
# $syslog system logging facility up
|
||||
# $network low level networking (eth card, ...)
|
||||
# $named hostname resolution available
|
||||
# $netdaemons all network daemons are running
|
||||
# The $netdaemons pseudo service has been removed in LSB 1.2.
|
||||
# For now, we still offer it for backward compatibility.
|
||||
# These are new (LSB 1.2):
|
||||
# $time the system time has been set correctly
|
||||
# $portmap SunRPC portmapping service available
|
||||
# UnitedLinux extensions:
|
||||
# $ALL indicates that a script should be inserted
|
||||
# at the end
|
||||
# * The services specified in the stop tags
|
||||
# (Required-Stop/Should-Stop)
|
||||
# specify which services need to be still running when this service
|
||||
# is shut down. Often the entries there are just copies or a subset
|
||||
# from the respective start tag.
|
||||
# * Should-Start/Stop are now part of LSB as of 2.0,
|
||||
# formerly SUSE/Unitedlinux used X-UnitedLinux-Should-Start/-Stop.
|
||||
# insserv does support both variants.
|
||||
# * X-UnitedLinux-Default-Enabled: yes/no is used at installation time
|
||||
# (%fillup_and_insserv macro in %post of many RPMs) to specify whether
|
||||
# a startup script should default to be enabled after installation.
|
||||
# It's not used by insserv.
|
||||
#
|
||||
# Note on runlevels:
|
||||
# 0 - halt/poweroff 6 - reboot
|
||||
# 1 - single user 2 - multiuser without network exported
|
||||
# 3 - multiuser w/ network (text mode) 5 - multiuser w/ network and X11 (xdm)
|
||||
#
|
||||
# Note on script names:
|
||||
# http://www.linuxbase.org/spec/refspecs/LSB_1.3.0/gLSB/gLSB/scrptnames.html
|
||||
# A registry has been set up to manage the init script namespace.
|
||||
# http://www.lanana.org/
|
||||
# Please use the names already registered or register one or use a
|
||||
# vendor prefix.
|
||||
|
||||
|
||||
# Check for missing binaries (stale symlinks should not happen)
|
||||
# Note: Special treatment of stop for LSB conformance
|
||||
if [ -f /etc/default/salt ]; then
|
||||
. /etc/default/salt
|
||||
else
|
||||
SALTMINION='/usr/bin/salt-minion'
|
||||
fi
|
||||
test -x $SALTMINION || { echo "$SALTMINION not installed";
|
||||
if [ "$1" = "stop" ]; then exit 0;
|
||||
else exit 5; fi; }
|
||||
|
||||
# Source LSB init functions
|
||||
# providing start_daemon, killproc, pidofproc,
|
||||
# log_success_msg, log_failure_msg and log_warning_msg.
|
||||
# This is currently not used by UnitedLinux based distributions and
|
||||
# not needed for init scripts for UnitedLinux only. If it is used,
|
||||
# the functions from rc.status should not be sourced or used.
|
||||
#. /lib/lsb/init-functions
|
||||
|
||||
# Shell functions sourced from /etc/rc.status:
|
||||
# rc_check check and set local and overall rc status
|
||||
# rc_status check and set local and overall rc status
|
||||
# rc_status -v be verbose in local rc status and clear it afterwards
|
||||
# rc_status -v -r ditto and clear both the local and overall rc status
|
||||
# rc_status -s display "skipped" and exit with status 3
|
||||
# rc_status -u display "unused" and exit with status 3
|
||||
# rc_failed set local and overall rc status to failed
|
||||
# rc_failed <num> set local and overall rc status to <num>
|
||||
# rc_reset clear both the local and overall rc status
|
||||
# rc_exit exit appropriate to overall rc status
|
||||
# rc_active checks whether a service is activated by symlinks
|
||||
. /etc/rc.status
|
||||
|
||||
# Reset status of this service
|
||||
rc_reset
|
||||
|
||||
# Return values acc. to LSB for all commands but status:
|
||||
# 0 - success
|
||||
# 1 - generic or unspecified error
|
||||
# 2 - invalid or excess argument(s)
|
||||
# 3 - unimplemented feature (e.g. "reload")
|
||||
# 4 - user had insufficient privileges
|
||||
# 5 - program is not installed
|
||||
# 6 - program is not configured
|
||||
# 7 - program is not running
|
||||
# 8--199 - reserved (8--99 LSB, 100--149 distrib, 150--199 appl)
|
||||
#
|
||||
# Note that starting an already running service, stopping
|
||||
# or restarting a not-running service as well as the restart
|
||||
# with force-reload (in case signaling is not supported) are
|
||||
# considered a success.
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting salt-minion daemon: "
|
||||
## Start daemon with startproc(8). If this fails
|
||||
## the return value is set appropriately by startproc.
|
||||
/sbin/startproc ${SALTMINION} -d
|
||||
|
||||
# Remember status and be verbose
|
||||
rc_status -v
|
||||
;;
|
||||
stop)
|
||||
echo -n "Shutting down salt-minion daemon: "
|
||||
## Stop daemon with killproc(8) and if this fails
|
||||
## killproc sets the return value according to LSB.
|
||||
|
||||
/sbin/killproc -TERM $SALTMINION
|
||||
|
||||
# Remember status and be verbose
|
||||
rc_status -v
|
||||
;;
|
||||
try-restart|condrestart)
|
||||
## Do a restart only if the service was active before.
|
||||
## Note: try-restart is now part of LSB (as of 1.9).
|
||||
## RH has a similar command named condrestart.
|
||||
if test "$1" = "condrestart"; then
|
||||
echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
|
||||
fi
|
||||
$0 status
|
||||
if test $? = 0; then
|
||||
$0 restart
|
||||
else
|
||||
rc_reset # Not running is not a failure.
|
||||
fi
|
||||
# Remember status and be quiet
|
||||
rc_status
|
||||
;;
|
||||
restart)
|
||||
## Stop the service and regardless of whether it was
|
||||
## running or not, start it again.
|
||||
$0 stop
|
||||
$0 start
|
||||
|
||||
# Remember status and be quiet
|
||||
rc_status
|
||||
;;
|
||||
reload)
|
||||
echo "can't reload configuration, you have to restart it"
|
||||
;;
|
||||
status)
|
||||
echo -n "Checking for service salt-minion "
|
||||
## Check status with checkproc(8), if process is running
|
||||
## checkproc will return with exit status 0.
|
||||
|
||||
# Return value is slightly different for the status command:
|
||||
# 0 - service up and running
|
||||
# 1 - service dead, but /var/run/ pid file exists
|
||||
# 2 - service dead, but /var/lock/ lock file exists
|
||||
# 3 - service not running (unused)
|
||||
# 4 - service status unknown :-(
|
||||
# 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.)
|
||||
|
||||
# NOTE: checkproc returns LSB compliant status values.
|
||||
/sbin/checkproc $SALTMINION
|
||||
# NOTE: rc_status knows that we called this init script with
|
||||
# "status" option and adapts its messages accordingly.
|
||||
rc_status -v
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|status|try-restart|restart|reload}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
rc_exit
|
10
salt-minion.service
Normal file
10
salt-minion.service
Normal file
@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=The Salt Minion
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/salt-minion
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
240
salt-syndic
Normal file
240
salt-syndic
Normal file
@ -0,0 +1,240 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Template SUSE system startup script for salt-syndic
|
||||
# Copyright (C) 1995--2005 Kurt Garloff, SUSE / Novell Inc.
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
# your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# /etc/init.d/salt-syndic
|
||||
# and its symbolic link
|
||||
# /(usr/)sbin/rcsalt-syndic
|
||||
#
|
||||
#
|
||||
# LSB compatible service control script; see http://www.linuxbase.org/spec/
|
||||
#
|
||||
# Note: This template uses functions rc_XXX defined in /etc/rc.status on
|
||||
# UnitedLinux/SUSE/Novell based Linux distributions. If you want to base your
|
||||
# script on this template and ensure that it works on non UL based LSB
|
||||
# compliant Linux distributions, you either have to provide the rc.status
|
||||
# functions from UL or change the script to work without them.
|
||||
# See skeleton.compat for a template that works with other distros as well.
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: salt-syndic
|
||||
# Required-Start: $syslog $network $remote_fs
|
||||
# Should-Start: $time ypbind smtp
|
||||
# Required-Stop: $syslog $remote_fs
|
||||
# Should-Stop: ypbind smtp
|
||||
# Default-Start: 3 5
|
||||
# Default-Stop: 0 1 2 6
|
||||
# Short-Description: Salt master daemon providing control minions
|
||||
# Description: This is a daemon that controls the salt minions
|
||||
# Salt is an open source tool to manage your infrastructure. Easy enough to get
|
||||
# running in minutes and fast enough to manage tens of thousands of servers (and still
|
||||
# get a response back in seconds).
|
||||
### END INIT INFO
|
||||
#
|
||||
# Any extensions to the keywords given above should be preceeded by
|
||||
# X-VendorTag- (X-UnitedLinux- X-SuSE- for us) according to LSB.
|
||||
#
|
||||
# Notes on Required-Start/Should-Start:
|
||||
# * There are two different issues that are solved by Required-Start
|
||||
# and Should-Start
|
||||
# (a) Hard dependencies: This is used by the runlevel editor to determine
|
||||
# which services absolutely need to be started to make the start of
|
||||
# this service make sense. Example: nfsserver should have
|
||||
# Required-Start: $portmap
|
||||
# Also, required services are started before the dependent ones.
|
||||
# The runlevel editor will warn about such missing hard dependencies
|
||||
# and suggest enabling. During system startup, you may expect an error,
|
||||
# if the dependency is not fulfilled.
|
||||
# (b) Specifying the init script ordering, not real (hard) dependencies.
|
||||
# This is needed by insserv to determine which service should be
|
||||
# started first (and at a later stage what services can be started
|
||||
# in parallel). The tag Should-Start: is used for this.
|
||||
# It tells, that if a service is available, it should be started
|
||||
# before. If not, never mind.
|
||||
# * When specifying hard dependencies or ordering requirements, you can
|
||||
# use names of services (contents of their Provides: section)
|
||||
# or pseudo names starting with a $. The following ones are available
|
||||
# according to LSB (1.1):
|
||||
# $local_fs all local file systems are mounted
|
||||
# (most services should need this!)
|
||||
# $remote_fs all remote file systems are mounted
|
||||
# (note that /usr may be remote, so
|
||||
# many services should Require this!)
|
||||
# $syslog system logging facility up
|
||||
# $network low level networking (eth card, ...)
|
||||
# $named hostname resolution available
|
||||
# $netdaemons all network daemons are running
|
||||
# The $netdaemons pseudo service has been removed in LSB 1.2.
|
||||
# For now, we still offer it for backward compatibility.
|
||||
# These are new (LSB 1.2):
|
||||
# $time the system time has been set correctly
|
||||
# $portmap SunRPC portmapping service available
|
||||
# UnitedLinux extensions:
|
||||
# $ALL indicates that a script should be inserted
|
||||
# at the end
|
||||
# * The services specified in the stop tags
|
||||
# (Required-Stop/Should-Stop)
|
||||
# specify which services need to be still running when this service
|
||||
# is shut down. Often the entries there are just copies or a subset
|
||||
# from the respective start tag.
|
||||
# * Should-Start/Stop are now part of LSB as of 2.0,
|
||||
# formerly SUSE/Unitedlinux used X-UnitedLinux-Should-Start/-Stop.
|
||||
# insserv does support both variants.
|
||||
# * X-UnitedLinux-Default-Enabled: yes/no is used at installation time
|
||||
# (%fillup_and_insserv macro in %post of many RPMs) to specify whether
|
||||
# a startup script should default to be enabled after installation.
|
||||
# It's not used by insserv.
|
||||
#
|
||||
# Note on runlevels:
|
||||
# 0 - halt/poweroff 6 - reboot
|
||||
# 1 - single user 2 - multiuser without network exported
|
||||
# 3 - multiuser w/ network (text mode) 5 - multiuser w/ network and X11 (xdm)
|
||||
#
|
||||
# Note on script names:
|
||||
# http://www.linuxbase.org/spec/refspecs/LSB_1.3.0/gLSB/gLSB/scrptnames.html
|
||||
# A registry has been set up to manage the init script namespace.
|
||||
# http://www.lanana.org/
|
||||
# Please use the names already registered or register one or use a
|
||||
# vendor prefix.
|
||||
|
||||
|
||||
# Check for missing binaries (stale symlinks should not happen)
|
||||
# Note: Special treatment of stop for LSB conformance
|
||||
if [ -f /etc/default/salt ]; then
|
||||
. /etc/default/salt
|
||||
else
|
||||
SALTSYNDIC='/usr/bin/salt-syndic'
|
||||
fi
|
||||
test -x $SALTSYNDIC || { echo "$SALTMINION not installed";
|
||||
if [ "$1" = "stop" ]; then exit 0;
|
||||
else exit 5; fi; }
|
||||
|
||||
# Source LSB init functions
|
||||
# providing start_daemon, killproc, pidofproc,
|
||||
# log_success_msg, log_failure_msg and log_warning_msg.
|
||||
# This is currently not used by UnitedLinux based distributions and
|
||||
# not needed for init scripts for UnitedLinux only. If it is used,
|
||||
# the functions from rc.status should not be sourced or used.
|
||||
#. /lib/lsb/init-functions
|
||||
|
||||
# Shell functions sourced from /etc/rc.status:
|
||||
# rc_check check and set local and overall rc status
|
||||
# rc_status check and set local and overall rc status
|
||||
# rc_status -v be verbose in local rc status and clear it afterwards
|
||||
# rc_status -v -r ditto and clear both the local and overall rc status
|
||||
# rc_status -s display "skipped" and exit with status 3
|
||||
# rc_status -u display "unused" and exit with status 3
|
||||
# rc_failed set local and overall rc status to failed
|
||||
# rc_failed <num> set local and overall rc status to <num>
|
||||
# rc_reset clear both the local and overall rc status
|
||||
# rc_exit exit appropriate to overall rc status
|
||||
# rc_active checks whether a service is activated by symlinks
|
||||
. /etc/rc.status
|
||||
|
||||
# Reset status of this service
|
||||
rc_reset
|
||||
|
||||
# Return values acc. to LSB for all commands but status:
|
||||
# 0 - success
|
||||
# 1 - generic or unspecified error
|
||||
# 2 - invalid or excess argument(s)
|
||||
# 3 - unimplemented feature (e.g. "reload")
|
||||
# 4 - user had insufficient privileges
|
||||
# 5 - program is not installed
|
||||
# 6 - program is not configured
|
||||
# 7 - program is not running
|
||||
# 8--199 - reserved (8--99 LSB, 100--149 distrib, 150--199 appl)
|
||||
#
|
||||
# Note that starting an already running service, stopping
|
||||
# or restarting a not-running service as well as the restart
|
||||
# with force-reload (in case signaling is not supported) are
|
||||
# considered a success.
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting salt-syndic daemon: "
|
||||
## Start daemon with startproc(8). If this fails
|
||||
## the return value is set appropriately by startproc.
|
||||
/sbin/startproc ${SALTSYNDIC} -d
|
||||
|
||||
# Remember status and be verbose
|
||||
rc_status -v
|
||||
;;
|
||||
stop)
|
||||
echo -n "Shutting down salt-syndic daemon: "
|
||||
## Stop daemon with killproc(8) and if this fails
|
||||
## killproc sets the return value according to LSB.
|
||||
|
||||
/sbin/killproc $SALTSYNDIC
|
||||
|
||||
# Remember status and be verbose
|
||||
rc_status -v
|
||||
;;
|
||||
try-restart|condrestart)
|
||||
## Do a restart only if the service was active before.
|
||||
## Note: try-restart is now part of LSB (as of 1.9).
|
||||
## RH has a similar command named condrestart.
|
||||
if test "$1" = "condrestart"; then
|
||||
echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
|
||||
fi
|
||||
$0 status
|
||||
if test $? = 0; then
|
||||
$0 restart
|
||||
else
|
||||
rc_reset # Not running is not a failure.
|
||||
fi
|
||||
# Remember status and be quiet
|
||||
rc_status
|
||||
;;
|
||||
restart)
|
||||
## Stop the service and regardless of whether it was
|
||||
## running or not, start it again.
|
||||
$0 stop
|
||||
$0 start
|
||||
|
||||
# Remember status and be quiet
|
||||
rc_status
|
||||
;;
|
||||
reload)
|
||||
echo "can't reload configuration, you have to restart it"
|
||||
;;
|
||||
status)
|
||||
echo -n "Checking for service salt-syndic "
|
||||
## Check status with checkproc(8), if process is running
|
||||
## checkproc will return with exit status 0.
|
||||
|
||||
# Return value is slightly different for the status command:
|
||||
# 0 - service up and running
|
||||
# 1 - service dead, but /var/run/ pid file exists
|
||||
# 2 - service dead, but /var/lock/ lock file exists
|
||||
# 3 - service not running (unused)
|
||||
# 4 - service status unknown :-(
|
||||
# 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.)
|
||||
|
||||
# NOTE: checkproc returns LSB compliant status values.
|
||||
/sbin/checkproc $SALTSYNDIC
|
||||
# NOTE: rc_status knows that we called this init script with
|
||||
# "status" option and adapts its messages accordingly.
|
||||
rc_status -v
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|status|try-restart|restart|reload}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
rc_exit
|
10
salt-syndic.service
Normal file
10
salt-syndic.service
Normal file
@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=The Salt Master Server
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/salt-syndic
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
132
salt.changes
Normal file
132
salt.changes
Normal file
@ -0,0 +1,132 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun May 12 20:18:24 UTC 2013 - aboe76@gmail.com
|
||||
|
||||
- Updated package spec, for systemd unit files
|
||||
according to how systemd files needs to be packaged
|
||||
- added logrotate on salt log files
|
||||
- fixed rpmlint complain about reload function in init files
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 8 21:44:49 UTC 2013 - aboe76@gmail.com
|
||||
|
||||
- Updated to salt 0.15.1
|
||||
- bugfix release.
|
||||
- fixes suse service check
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat May 4 08:16:27 UTC 2013 - aboe76@gmail.com
|
||||
|
||||
- Updated to salt 0.15.0
|
||||
Major update:
|
||||
- salt mine function
|
||||
- ipv6 support
|
||||
- copy files from minions to master
|
||||
- better template debugging
|
||||
- state event firing
|
||||
- major syndic updates
|
||||
- peer system updates
|
||||
- minion key revokation
|
||||
- function return codes
|
||||
- functions in overstate
|
||||
- Pillar error reporting
|
||||
- Cached State Data
|
||||
- Monitoring states
|
||||
- Read http://docs.saltstack.com/topics/releases/0.15.0.html for more information
|
||||
- improved init files overwrite with /etc/default/salt
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 23 19:18:29 UTC 2013 - aboe76@gmail.com
|
||||
|
||||
- Updated init files:
|
||||
- removed probe/reload/force reload
|
||||
this isn't supported
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Apr 14 14:46:00 UTC 2013 - aboe76@gmail.com
|
||||
|
||||
- Updated init files
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Apr 14 07:00:51 UTC 2013 - aboe76@gmail.com
|
||||
|
||||
- Updated to 0.14.1 bugfix release:
|
||||
- some major fixes for the syndic system,
|
||||
- fixes to file.recurse and external auth and
|
||||
- fixes for windows
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 11 05:37:29 UTC 2013 - aboe76@gmail.com
|
||||
|
||||
- Updated salt init files with option -d to really daemonize it
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Mar 23 23:51:53 UTC 2013 - aboe76@gmail.com
|
||||
|
||||
- Updated to 0.14.0
|
||||
MAJOR FEATURES:
|
||||
- Salt - As a Cloud Controller
|
||||
- Libvirt State
|
||||
- New get Functions
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 19 06:46:36 UTC 2013 - aboe76@gmail.com
|
||||
|
||||
- Updated to 0.13.3
|
||||
Last Bugfixes release before 0.14.0
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 13 22:04:43 UTC 2013 - aboe76@gmail.com
|
||||
|
||||
- Updated 0.13.2
|
||||
Bugfixes release (not specified)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 25 17:52:59 UTC 2013 - aboe76@gmail.com
|
||||
|
||||
- Updated spec file, postun removal of init.d files
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Feb 16 09:25:30 UTC 2013 - aboe76@gmail.com
|
||||
|
||||
- Updated to Salt 0.13.1 bugfixes:
|
||||
- Fix #3693 (variable ref'ed before assignment)
|
||||
- Fix stack trace introduced with
|
||||
- Updated limit to be escaped like before and after.
|
||||
- Import install command from setuptools if we use them.
|
||||
- Fix user info not displayed correctly when group doesn't map cleanly
|
||||
- fix bug: Client.cache_dir()
|
||||
- Fix #3717
|
||||
- Fix #3716
|
||||
- Fix cmdmod.py daemon error
|
||||
- Updated test to properly determine homebrew user
|
||||
- Fixed whitespace issue
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 14 06:43:08 UTC 2013 - aboe76@gmail.com
|
||||
|
||||
- Updated to salt 0.13.0
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 30 20:57:57 UTC 2013 - aboe76@gmail.com
|
||||
|
||||
- Updated Suse Copyright in Spec-file
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 28 15:23:08 UTC 2013 - toddrme2178@gmail.com
|
||||
|
||||
- Cleanup spec file
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jan 26 09:29:39 UTC 2013 - aboe76@gmail.com
|
||||
|
||||
- split syndic from master in separate package
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 22 17:53:39 UTC 2013 - aboe76@gmail.com
|
||||
|
||||
- updated to salt 0.12.1 bugfix release
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 16 06:38:40 UTC 2013 - aboe76@gmail.com
|
||||
|
||||
- uploaded to salt 0.12.0
|
23
salt.logrotate
Normal file
23
salt.logrotate
Normal file
@ -0,0 +1,23 @@
|
||||
/var/log/salt/master {
|
||||
weekly
|
||||
missingok
|
||||
rotate 7
|
||||
compress
|
||||
notifempty
|
||||
}
|
||||
|
||||
/var/log/salt/minion {
|
||||
weekly
|
||||
missingok
|
||||
rotate 7
|
||||
compress
|
||||
notifempty
|
||||
}
|
||||
|
||||
/var/log/salt/key {
|
||||
weekly
|
||||
missingok
|
||||
rotate 7
|
||||
compress
|
||||
notifempty
|
||||
}
|
250
salt.spec
Normal file
250
salt.spec
Normal file
@ -0,0 +1,250 @@
|
||||
#
|
||||
# spec file for package salt
|
||||
#
|
||||
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
Name: salt
|
||||
Version: 0.15.1
|
||||
Release: 1
|
||||
License: Apache-2.0
|
||||
Summary: A parallel remote execution system
|
||||
Url: http://saltstack.org/
|
||||
Group: System/Monitoring
|
||||
Source0: http://pypi.python.org/packages/source/s/%{name}/%{name}-%{version}.tar.gz
|
||||
Source1: %{name}-master
|
||||
Source2: %{name}-syndic
|
||||
Source3: %{name}-minion
|
||||
Source4: %{name}-master.service
|
||||
Source5: %{name}-syndic.service
|
||||
Source6: %{name}-minion.service
|
||||
Source7: %{name}.logrotate
|
||||
BuildRequires: python-Jinja2
|
||||
BuildRequires: python-M2Crypto
|
||||
BuildRequires: python-PyYAML
|
||||
BuildRequires: python-msgpack-python
|
||||
BuildRequires: python-pycrypto
|
||||
BuildRequires: python-pyzmq >= 2.1.9
|
||||
BuildRequires: logrotate
|
||||
Requires: python-Jinja2
|
||||
Requires: python-M2Crypto
|
||||
Requires: python-PyYAML
|
||||
Requires: python-msgpack-python
|
||||
Requires: python-pycrypto
|
||||
Requires: python-pyzmq >= 2.1.9
|
||||
Requires: logrotate
|
||||
Requires(pre): %fillup_prereq
|
||||
Requires(pre): %insserv_prereq
|
||||
%if 0%{?suse_version} >= 1210
|
||||
BuildRequires: systemd
|
||||
%{?systemd_requires}
|
||||
%endif
|
||||
%ifarch %{ix86} x86_64
|
||||
%if 0%{?suse_version} && 0%{?sles_version} == 0
|
||||
Requires: dmidecode
|
||||
%endif
|
||||
%endif
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if 0%{?suse_version} && 0%{?suse_version} > 1110
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
|
||||
%description
|
||||
Salt is a distributed remote execution system used to execute commands and
|
||||
query data. It was developed in order to bring the best solutions found in
|
||||
the world of remote execution together and make them better, faster and more
|
||||
malleable. Salt accomplishes this via its ability to handle larger loads of
|
||||
information, and not just dozens, but hundreds or even thousands of individual
|
||||
servers, handle them quickly and through a simple and manageable interface.
|
||||
|
||||
%package master
|
||||
Summary: Management component for salt, a parallel remote execution system
|
||||
Group: System/Monitoring
|
||||
Requires: %{name} = %{version}
|
||||
Requires(pre): %fillup_prereq
|
||||
Requires(pre): %insserv_prereq
|
||||
|
||||
%description master
|
||||
The Salt master is the central server to which all minions connect.
|
||||
Enabled commands to remote systems to be called in parallel rather
|
||||
than serially.
|
||||
|
||||
%package minion
|
||||
Summary: Client component for salt, a parallel remote execution system
|
||||
Group: System/Monitoring
|
||||
Requires: %{name} = %{version}
|
||||
Requires(pre): %fillup_prereq
|
||||
Requires(pre): %insserv_prereq
|
||||
|
||||
%description minion
|
||||
Salt minion is queried and controlled from the master.
|
||||
Listens to the salt master and execute the commands.
|
||||
|
||||
%package syndic
|
||||
Summary: Syndic component for salt, a parallel remote execution system
|
||||
Group: System/Monitoring
|
||||
Requires: %{name} = %{version}
|
||||
Requires(pre): %fillup_prereq
|
||||
Requires(pre): %insserv_prereq
|
||||
|
||||
%description syndic
|
||||
Salt syndic is the master-of-masters for salt
|
||||
The master of masters for salt-- it enables
|
||||
the management of multiple masters at a time..
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
python setup.py build
|
||||
|
||||
%install
|
||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
|
||||
##missing directories
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/salt/
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/init.d
|
||||
mkdir -p %{buildroot}%{_localstatedir}/log/salt
|
||||
mkdir -p %{buildroot}/%{_sysconfdir}/logrotate.d/
|
||||
mkdir -p %{buildroot}/%{_sbindir}
|
||||
#
|
||||
##init scripts
|
||||
install -Dpm 0755 %{SOURCE1} %{buildroot}%{_initddir}/salt-master
|
||||
install -Dpm 0755 %{SOURCE2} %{buildroot}%{_initddir}/salt-syndic
|
||||
install -Dpm 0755 %{SOURCE3} %{buildroot}%{_initddir}/salt-minion
|
||||
ln -sf %{_initddir}/salt-master %{buildroot}%{_sbindir}/rcsalt-master
|
||||
ln -sf %{_initddir}/salt-syndic %{buildroot}%{_sbindir}/rcsalt-syndic
|
||||
ln -sf %{_initddir}/salt-minion %{buildroot}%{_sbindir}/rcsalt-minion
|
||||
|
||||
%if 0%{?_unitdir:1}
|
||||
install -Dpm 644 %{SOURCE4} %{buildroot}%_unitdir/salt-master.service
|
||||
install -Dpm 644 %{SOURCE5} %{buildroot}%_unitdir/salt-syndic.service
|
||||
install -Dpm 644 %{SOURCE6} %{buildroot}%_unitdir/salt-minion.service
|
||||
%endif
|
||||
#
|
||||
##config files
|
||||
install -Dpm 0640 conf/minion %{buildroot}%{_sysconfdir}/salt/minion
|
||||
install -Dpm 0640 conf/master %{buildroot}%{_sysconfdir}/salt/master
|
||||
#
|
||||
##logrotate file
|
||||
install -Dpm 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/logrotate.d/salt
|
||||
|
||||
%preun -n salt-syndic
|
||||
%stop_on_removal salt-syndic
|
||||
%if 0%{?_unitdir:1}
|
||||
%service_del_preun salt-syndic.service
|
||||
%endif
|
||||
|
||||
%post -n salt-syndic
|
||||
%fillup_and_insserv
|
||||
%if 0%{?_unitdir:1}
|
||||
%service_add_post salt-syndic.service
|
||||
%endif
|
||||
|
||||
%postun -n salt-syndic
|
||||
%restart_on_update salt-syndic
|
||||
%if 0%{?_unitdir:1}
|
||||
%service_del_postun salt-syndic.service
|
||||
%endif
|
||||
%insserv_cleanup
|
||||
|
||||
%preun -n salt-master
|
||||
%stop_on_removal salt-master
|
||||
%if 0%{?_unitdir:1}
|
||||
%service_del_preun salt-master.service
|
||||
%endif
|
||||
|
||||
%post -n salt-master
|
||||
%fillup_and_insserv
|
||||
%if 0%{?_unitdir:1}
|
||||
%service_add_post salt-master.service
|
||||
%endif
|
||||
|
||||
%postun -n salt-master
|
||||
%restart_on_update salt-master
|
||||
%if 0%{?_unitdir:1}
|
||||
%service_del_postun salt-master.service
|
||||
%endif
|
||||
%insserv_cleanup
|
||||
|
||||
%preun -n salt-minion
|
||||
%stop_on_removal salt-minion
|
||||
%if 0%{?_unitdir:1}
|
||||
%service_del_preun salt-minion.service
|
||||
%endif
|
||||
|
||||
%post -n salt-minion
|
||||
%fillup_and_insserv
|
||||
%if 0%{?_unitdir:1}
|
||||
%service_add_post salt-minion.service
|
||||
%endif
|
||||
|
||||
%postun -n salt-minion
|
||||
%restart_on_update salt-minion
|
||||
%if 0%{?_unitdir:1}
|
||||
%service_del_postun salt-minion.service
|
||||
%endif
|
||||
%insserv_cleanup
|
||||
|
||||
%files -n salt-syndic
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/salt-syndic
|
||||
%{_mandir}/man1/salt-syndic.1.*
|
||||
%{_sbindir}/rcsalt-syndic
|
||||
%{_sysconfdir}/init.d/salt-syndic
|
||||
%if 0%{?_unitdir:1}
|
||||
%_unitdir/salt-syndic.service
|
||||
%endif
|
||||
|
||||
%files -n salt-minion
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/salt-minion
|
||||
%{_bindir}/salt-call
|
||||
%{_mandir}/man1/salt-call.1.*
|
||||
%{_mandir}/man1/salt-minion.1.*
|
||||
%{_sbindir}/rcsalt-minion
|
||||
%config(noreplace) %{_sysconfdir}/init.d/salt-minion
|
||||
%config(noreplace) %{_sysconfdir}/salt/minion
|
||||
%if 0%{?_unitdir:1}
|
||||
%_unitdir/salt-minion.service
|
||||
%endif
|
||||
|
||||
%files -n salt-master
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/salt
|
||||
%{_bindir}/salt-master
|
||||
%{_bindir}/salt-cp
|
||||
%{_bindir}/salt-key
|
||||
%{_bindir}/salt-run
|
||||
%{_mandir}/man1/salt-master.1.*
|
||||
%{_mandir}/man1/salt.1.*
|
||||
%{_mandir}/man1/salt-cp.1.*
|
||||
%{_mandir}/man1/salt-key.1.*
|
||||
%{_mandir}/man1/salt-run.1.*
|
||||
%{_sbindir}/rcsalt-master
|
||||
%config(noreplace) %{_sysconfdir}/init.d/salt-master
|
||||
%config(noreplace) %{_sysconfdir}/salt/master
|
||||
%if 0%{?_unitdir:1}
|
||||
%_unitdir/salt-master.service
|
||||
%endif
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc LICENSE
|
||||
%dir %{_sysconfdir}/salt
|
||||
%{_mandir}/man7/salt.7.*
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/salt
|
||||
%{python_sitelib}/*
|
||||
|
||||
%changelog
|
Loading…
Reference in New Issue
Block a user