diff --git a/sysutils/py-salt/Makefile b/sysutils/py-salt/Makefile index 235f105f92b0..416e4d0af533 100644 --- a/sysutils/py-salt/Makefile +++ b/sysutils/py-salt/Makefile @@ -1,131 +1,136 @@ PORTNAME= salt -PORTVERSION= 3006.9 -PORTREVISION= 7 +PORTVERSION= 3006.23 PORTEPOCH= 1 CATEGORIES= sysutils python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= krion@FreeBSD.org COMMENT= Distributed remote execution and configuration management system WWW= https://pypi.org/project/salt/ LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}markupsafe>0:textproc/py-markupsafe@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}distro>=1.5.0:sysutils/py-distro@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}libcloud>=0.14.0:net/py-libcloud@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}msgpack>=0.3:devel/py-msgpack@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}progressbar>0:misc/py-progressbar@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}psutil>=0.3.0:sysutils/py-psutil@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}requests>=1.0.0:www/py-requests@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pyyaml>=0:devel/py-pyyaml@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}jmespath>0:devel/py-jmespath@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pyinotify>0:devel/py-pyinotify@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}looseversion>0:devel/py-looseversion@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}packaging>0:devel/py-packaging@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}croniter>0:sysutils/py-croniter@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}setproctitle>0:devel/py-setproctitle@${PY_FLAVOR} + ${PYTHON_PKGNAMEPREFIX}frozenlist>0:devel/py-frozenlist@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}timelib>0:devel/py-timelib@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}immutables>0:devel/py-immutables@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}cffi>0:devel/py-cffi@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}backports>0:devel/py-backports@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}tornado>0:www/py-tornado@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}virtualenv>0:devel/py-virtualenv@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}jaraco.text>=4.0.0:devel/py-jaraco.text@${PY_FLAVOR} -USES= cpe python +USES= cpe python:-3.11 CPE_VENDOR= saltstack CPE_PRODUCT= salt USE_PYTHON= autoplist cryptography distutils NO_ARCH= yes -CONFLICTS= py[0-9]*-salt-2019* +CONFLICTS= py[0-9]*-salt-300* # we must pass these options before the target name, and python.mk has no # early-arguments variable, so we have to manipulate the target PYDISTUTILS_INSTALL_TARGET=\ --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 \ install USE_RC_SUBR= salt_api \ salt_master \ salt_minion \ salt_proxy \ salt_syndic SUB_LIST+= PYTHON_CMD=${PYTHON_CMD} SUB_FILES= pkg-message # Upstream archive contains files with UTF-8 names EXTRACT_CMD= ${SETENV} LC_ALL=en_US.UTF-8 /usr/bin/bsdtar OPTIONS_DEFINE= AWS BASH FISH TCP ZEROMQ ZSH OPTIONS_DEFAULT= BASH FISH ZEROMQ ZSH AWS_DESC= Install dependencies required for Amazon Web Services TCP_DESC= Install dependencies required for TCP transport ZEROMQ_DESC= Install dependencies required for ZeroMQ transport # AWS dependencies (Note: the devel/py-botocore port is updated very frequently) AWS_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}boto3>0:www/py-boto3@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}boto>=2.32.1:devel/py-boto@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}botocore>0:devel/py-botocore@${PY_FLAVOR} TCP_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pycryptodomex>=3.9.7:security/py-pycryptodomex@${PY_FLAVOR} ZEROMQ_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyzmq>=2.2.0:net/py-pyzmq@${PY_FLAVOR} ZEROMQ_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyzmq>=2.2.0:net/py-pyzmq@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pycryptodomex>=3.9.7:security/py-pycryptodomex@${PY_FLAVOR} BASH_PLIST_FILES= share/bash-completion/completions/salt FISH_PLIST_FILES= share/fish/completions/salt-call.fish \ share/fish/completions/salt-cp.fish \ share/fish/completions/salt-key.fish \ share/fish/completions/salt-master.fish \ share/fish/completions/salt-minion.fish \ share/fish/completions/salt-run.fish \ share/fish/completions/salt-syndic.fish \ share/fish/completions/salt.fish \ share/fish/completions/salt_common.fish ZSH_PLIST_FILES= share/zsh/site-functions/_salt 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-master.1 doc/man/salt-run.1 doc/man/salt.1 \ doc/man/salt-call.1 salt/modules/mysql.py salt/modules/tls.py salt/modules/postgres.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 @${REINPLACE_CMD} -e 's|"/usr/bin/python3"|"${PYTHON_CMD}"|' ${WRKSRC}/salt/auth/pam.py do-install-BASH-on: @${MKDIR} ${STAGEDIR}${PREFIX}/share/bash-completion/completions/ - ${INSTALL_DATA} ${WRKSRC}/pkg/common/salt.bash \ + ${INSTALL_DATA} ${WRKSRC}/pkg/rpm/salt.bash \ ${STAGEDIR}${PREFIX}/share/bash-completion/completions/salt do-install-FISH-on: @${MKDIR} ${STAGEDIR}${PREFIX}/share/fish/completions/ ${INSTALL_DATA} ${WRKSRC}/pkg/common/fish-completions/*.fish \ ${STAGEDIR}${PREFIX}/share/fish/completions do-install-ZSH-on: @${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions ${INSTALL_DATA} ${WRKSRC}/pkg/common/salt.zsh \ ${STAGEDIR}${PREFIX}/share/zsh/site-functions/_salt post-install: @${MKDIR} ${STAGEDIR}${ETCDIR} ${INSTALL_DATA} ${WRKSRC}/conf/master ${STAGEDIR}${ETCDIR}/master.sample ${INSTALL_DATA} ${WRKSRC}/conf/minion ${STAGEDIR}${ETCDIR}/minion.sample .include diff --git a/sysutils/py-salt/distinfo b/sysutils/py-salt/distinfo index 690dd1c5e3a3..68e321a89a80 100644 --- a/sysutils/py-salt/distinfo +++ b/sysutils/py-salt/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1737023351 -SHA256 (salt-3006.9.tar.gz) = 7703c73a71c67327d48b2893ce9cf031ee52e2816df0daf78d6fe18a99b353e3 -SIZE (salt-3006.9.tar.gz) = 19691113 +TIMESTAMP = 1772029286 +SHA256 (salt-3006.23.tar.gz) = 89a53ef52bb484f910a4e666810b0d096f0ad42005a54ffd035036d003865e1c +SIZE (salt-3006.23.tar.gz) = 16480449 diff --git a/sysutils/py-salt/files/patch-requirements_base.txt b/sysutils/py-salt/files/patch-requirements_base.txt index 3b1985d11b8d..29ae46a45ae7 100644 --- a/sysutils/py-salt/files/patch-requirements_base.txt +++ b/sysutils/py-salt/files/patch-requirements_base.txt @@ -1,8 +1,31 @@ ---- requirements/base.txt.orig 2025-01-16 10:30:29 UTC +--- requirements/base.txt.orig 2026-02-23 20:07:08 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 +@@ -8,9 +8,9 @@ + certifi>=2024.7.4 + cffi>=2.0.0 + # We need contextvars for salt-ssh -contextvars +-croniter>=0.3.0,!=0.3.22; sys_platform != 'win32' +-cryptography>=46.0.5 ++#contextvars ++#croniter>=0.3.0,!=0.3.22; sys_platform != 'win32' ++cryptography>=42.0.0 + distro>=1.0.1 + frozenlist>=1.3.0; python_version < '3.11' + frozenlist>=1.5.0; python_version >= '3.11' +@@ -22,12 +22,12 @@ + Jinja2>=3.1.5 + jmespath>=1.1.0 + looseversion +-MarkupSafe<3.0.0 ++MarkupSafe + msgpack>=1.0.0 + # Packaging 24.1 imports annotations from __future__ which breaks salt ssh + # tests on target hosts with older python versions. +-packaging==24.0 +-psutil<6.0.0; python_version <= '3.9' ++packaging>=21.3 ++#psutil<6.0.0; python_version <= '3.9' + psutil>=5.0.0; python_version >= '3.10' + PyYAML + requests<2.32.0 ; python_version < '3.10' diff --git a/sysutils/py-salt/files/patch-salt_ext_tornado_iostream.py b/sysutils/py-salt/files/patch-salt_ext_tornado_iostream.py deleted file mode 100644 index 4a163d249474..000000000000 --- a/sysutils/py-salt/files/patch-salt_ext_tornado_iostream.py +++ /dev/null @@ -1,10 +0,0 @@ ---- 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. diff --git a/sysutils/py-salt/files/patch-salt_loader_lazy.py b/sysutils/py-salt/files/patch-salt_loader_lazy.py index f5d66afdcd99..65b06a6338f8 100644 --- a/sysutils/py-salt/files/patch-salt_loader_lazy.py +++ b/sysutils/py-salt/files/patch-salt_loader_lazy.py @@ -1,11 +1,11 @@ ---- salt/loader/lazy.py.orig 2021-09-27 17:31:38 UTC +--- salt/loader/lazy.py.orig 2026-02-23 20:07:08 UTC +++ salt/loader/lazy.py -@@ -447,7 +447,7 @@ class LazyLoader(salt.utils.lazy.LazyDict): +@@ -540,7 +540,7 @@ 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') ++ 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 diff --git a/sysutils/py-salt/files/patch-salt_modules_config.py b/sysutils/py-salt/files/patch-salt_modules_config.py index 197f64dc1b8e..36dba0418eea 100644 --- a/sysutils/py-salt/files/patch-salt_modules_config.py +++ b/sysutils/py-salt/files/patch-salt_modules_config.py @@ -1,17 +1,17 @@ ---- salt/modules/config.py.orig 2025-01-17 15:15:13 UTC +--- salt/modules/config.py.orig 2026-02-23 20:07:08 UTC +++ salt/modules/config.py -@@ -17,13 +17,7 @@ from salt.loader.context import LoaderContext +@@ -17,13 +17,7 @@ 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(): diff --git a/sysutils/py-salt/files/patch-salt_utils_process.py b/sysutils/py-salt/files/patch-salt_utils_process.py index b12e5996c9a3..f3d6a31f41e7 100644 --- a/sysutils/py-salt/files/patch-salt_utils_process.py +++ b/sysutils/py-salt/files/patch-salt_utils_process.py @@ -1,14 +1,16 @@ ---- salt/utils/process.py.orig 2024-07-29 07:51:58 UTC +--- salt/utils/process.py.orig 2026-02-23 20:07:08 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): +@@ -43,11 +43,7 @@ + except ImportError: + pass + +-try: +- import setproctitle +- +- HAS_SETPROCTITLE = True +-except ImportError: +- HAS_SETPROCTITLE = False ++# setproctitle disabled: it breaks rc script stop/restart when procname changes ++HAS_SETPROCTITLE = False + + # Process finalization function list diff --git a/sysutils/py-salt/files/salt_master.in b/sysutils/py-salt/files/salt_master.in index d8691747e322..249c1d735e41 100644 --- a/sysutils/py-salt/files/salt_master.in +++ b/sysutils/py-salt/files/salt_master.in @@ -1,42 +1,41 @@ #!/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" diff --git a/sysutils/py-salt/files/salt_minion.in b/sysutils/py-salt/files/salt_minion.in index d7a125daad9d..ff0a70f4c812 100644 --- a/sysutils/py-salt/files/salt_minion.in +++ b/sysutils/py-salt/files/salt_minion.in @@ -1,42 +1,41 @@ #!/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"