Testing py-salt
This commit is contained in:
8
sysutils/py-salt/files/patch-requirements_base.txt
Normal file
8
sysutils/py-salt/files/patch-requirements_base.txt
Normal file
@ -0,0 +1,8 @@
|
||||
--- requirements/base.txt.orig 2025-01-16 10:30:29 UTC
|
||||
+++ requirements/base.txt
|
||||
@@ -14,5 +14,3 @@ croniter>=0.3.0,!=0.3.22; sys_platform != 'win32'
|
||||
packaging>=21.3
|
||||
looseversion
|
||||
croniter>=0.3.0,!=0.3.22; sys_platform != 'win32'
|
||||
-# We need contextvars for salt-ssh
|
||||
-contextvars
|
||||
10
sysutils/py-salt/files/patch-salt_ext_tornado_iostream.py
Normal file
10
sysutils/py-salt/files/patch-salt_ext_tornado_iostream.py
Normal file
@ -0,0 +1,10 @@
|
||||
--- salt/ext/tornado/iostream.py.orig 2023-05-16 11:50:28 UTC
|
||||
+++ salt/ext/tornado/iostream.py
|
||||
@@ -1116,6 +1116,7 @@ class IOStream(BaseIOStream):
|
||||
future = self._connect_future = TracebackFuture()
|
||||
try:
|
||||
self.socket.connect(address)
|
||||
+ self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_SNDBUF, 524288)
|
||||
except socket.error as e:
|
||||
# In non-blocking mode we expect connect() to raise an
|
||||
# exception with EINPROGRESS or EWOULDBLOCK.
|
||||
11
sysutils/py-salt/files/patch-salt_loader_lazy.py
Normal file
11
sysutils/py-salt/files/patch-salt_loader_lazy.py
Normal file
@ -0,0 +1,11 @@
|
||||
--- salt/loader/lazy.py.orig 2021-09-27 17:31:38 UTC
|
||||
+++ salt/loader/lazy.py
|
||||
@@ -447,7 +447,7 @@ class LazyLoader(salt.utils.lazy.LazyDict):
|
||||
try:
|
||||
pycache_files = [
|
||||
os.path.join("__pycache__", x)
|
||||
- for x in sorted(os.listdir(os.path.join(mod_dir, "__pycache__")))
|
||||
+ for x in sorted(os.listdir(os.path.join(mod_dir, '__pycache__'))) if not x.endswith('opt-1.pyc') and not x.endswith('opt-2.pyc')
|
||||
]
|
||||
except OSError:
|
||||
pass
|
||||
17
sysutils/py-salt/files/patch-salt_modules_config.py
Normal file
17
sysutils/py-salt/files/patch-salt_modules_config.py
Normal file
@ -0,0 +1,17 @@
|
||||
--- salt/modules/config.py.orig 2025-01-17 15:15:13 UTC
|
||||
+++ salt/modules/config.py
|
||||
@@ -17,13 +17,7 @@ from salt.loader.context import LoaderContext
|
||||
import salt.utils.sdb as sdb
|
||||
from salt.loader.context import LoaderContext
|
||||
|
||||
-try:
|
||||
- # Gated for salt-ssh (salt.utils.cloud imports msgpack)
|
||||
- import salt.utils.cloud
|
||||
-
|
||||
- HAS_CLOUD = True
|
||||
-except ImportError:
|
||||
- HAS_CLOUD = False
|
||||
+HAS_CLOUD = False
|
||||
|
||||
|
||||
if salt.utils.platform.is_windows():
|
||||
14
sysutils/py-salt/files/patch-salt_utils_process.py
Normal file
14
sysutils/py-salt/files/patch-salt_utils_process.py
Normal file
@ -0,0 +1,14 @@
|
||||
--- salt/utils/process.py.orig 2024-07-29 07:51:58 UTC
|
||||
+++ salt/utils/process.py
|
||||
@@ -59,7 +59,10 @@ def appendproctitle(name):
|
||||
current = setproctitle.getproctitle()
|
||||
if current.strip().endswith("MainProcess"):
|
||||
current, _ = current.rsplit("MainProcess", 1)
|
||||
- setproctitle.setproctitle(f"{current.rstrip()} {name}")
|
||||
+ if len(current) > 0:
|
||||
+ setproctitle.setproctitle(f"{current.rstrip()} {name}")
|
||||
+ else:
|
||||
+ setproctitle.setproctitle(name)
|
||||
|
||||
|
||||
def daemonize(redirect_out=True):
|
||||
36
sysutils/py-salt/files/pkg-message.in
Normal file
36
sysutils/py-salt/files/pkg-message.in
Normal file
@ -0,0 +1,36 @@
|
||||
[
|
||||
{ type: install
|
||||
message: <<EOM
|
||||
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)
|
||||
|
||||
|
||||
|
||||
To change the Transport method from the default option of Zeromq to either TCP or RAET:
|
||||
|
||||
o Re-build the port with the desired options enabled to install the correct runtime dependencies
|
||||
o Ensure the master and minions all have salt installed with these same options and dependencies
|
||||
o Add the line 'transport: [tcp|raet]' to both the master and minion configuration files
|
||||
o Restart salt on the master and minions
|
||||
EOM
|
||||
}
|
||||
]
|
||||
29
sysutils/py-salt/files/salt_api.in
Normal file
29
sysutils/py-salt/files/salt_api.in
Normal file
@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 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 (bool): Set to NO by default.
|
||||
# Set it to YES to enable salt_api
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=salt_api
|
||||
rcvar=salt_api_enable
|
||||
|
||||
load_rc_config ${name}
|
||||
|
||||
: ${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"
|
||||
42
sysutils/py-salt/files/salt_master.in
Normal file
42
sysutils/py-salt/files/salt_master.in
Normal file
@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 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 (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
|
||||
rcvar=salt_master_enable
|
||||
|
||||
load_rc_config ${name}
|
||||
|
||||
: ${salt_master_enable:=NO}
|
||||
: ${salt_master_paths=/sbin:/bin:/usr/sbin:/usr/bin:%%PREFIX%%/bin:%%PREFIX%%/sbin}
|
||||
: ${salt_master_configdir:=%%PREFIX%%/etc/salt}
|
||||
: ${salt_master_pidfile:=/var/run/salt-master.pid}
|
||||
: ${salt_master_eggcache=/tmp}
|
||||
|
||||
command="%%PREFIX%%/bin/salt-master"
|
||||
command_interpreter="%%PYTHON_CMD%%"
|
||||
required_files=${salt_master_configdir}
|
||||
pidfile=${salt_master_pidfile}
|
||||
command_args="-c ${required_files} --pid-file=${pidfile} -d"
|
||||
procname="MainProcess"
|
||||
|
||||
export PATH="${salt_master_paths}"
|
||||
export PYTHON_EGG_CACHE="${salt_master_eggcache}"
|
||||
|
||||
run_rc_command "$1"
|
||||
42
sysutils/py-salt/files/salt_minion.in
Normal file
42
sysutils/py-salt/files/salt_minion.in
Normal file
@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 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 (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
|
||||
rcvar=salt_minion_enable
|
||||
|
||||
load_rc_config ${name}
|
||||
|
||||
: ${salt_minion_enable:=NO}
|
||||
: ${salt_minion_paths=/sbin:/bin:/usr/sbin:/usr/bin:%%PREFIX%%/bin:%%PREFIX%%/sbin}
|
||||
: ${salt_minion_configdir:=%%PREFIX%%/etc/salt}
|
||||
: ${salt_minion_pidfile:=/var/run/salt-minion.pid}
|
||||
: ${salt_minion_eggcache=/tmp}
|
||||
|
||||
command="%%PREFIX%%/bin/salt-minion"
|
||||
command_interpreter="%%PYTHON_CMD%%"
|
||||
required_files=${salt_minion_configdir}
|
||||
pidfile=${salt_minion_pidfile}
|
||||
command_args="-c ${required_files} --pid-file=${pidfile} -d"
|
||||
procname="MultiMinionProcessManager"
|
||||
|
||||
export PATH="${salt_minion_paths}"
|
||||
export PYTHON_EGG_CACHE="${salt_minion_eggcache}"
|
||||
|
||||
run_rc_command "$1"
|
||||
57
sysutils/py-salt/files/salt_proxy.in
Normal file
57
sysutils/py-salt/files/salt_proxy.in
Normal file
@ -0,0 +1,57 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 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_proxy_paths}"
|
||||
export PYTHON_EGG_CACHE="${salt_proxy_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"
|
||||
29
sysutils/py-salt/files/salt_syndic.in
Normal file
29
sysutils/py-salt/files/salt_syndic.in
Normal file
@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 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 (bool): Set to NO by default.
|
||||
# Set it to YES to enable salt_syndic
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=salt_syndic
|
||||
rcvar=salt_syndic_enable
|
||||
|
||||
load_rc_config ${name}
|
||||
|
||||
: ${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"
|
||||
Reference in New Issue
Block a user