From nobody Thu Feb 27 21:14:36 2025 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Z3kcX3jSKz59X2D; Thu, 27 Feb 2025 21:14:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Z3kcX31wgz4760; Thu, 27 Feb 2025 21:14:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1740690876; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7rWxt8VSqvWtEXUqMbrtuMNIjYpxS46xLn7VzwE4mfY=; b=jOf5dpDCoCBiuu00DjRSC+33kHi8XJ31pMtm+GjgmO056MaCJd0pLyJP6VQP8XcRTGlnTt iz8o7REHNgYG0L1xsGYnMSzzWI662o3s9Rzmqamu95R4uwd7XZv+xLVmMXSzIQvzgqdjpd kjDQfPyXN6VKiInI0/BXfJlDJbSa7U6fh4W219dLfJfHGSbb5XPP1cgVwpWSyXy8ZipF1M 1QbzcV8s5Mzd4OlkfYRsyz1dNlbeVT3zIsiFw7WOiqu8EKa1G638pwJStnQPhiCPUbMyu7 OCrv2z0/RZEtqcrmF7brJO0Zyg97zF+2oSJoq7Zazyt8u7bcyQFNY91DxI8/pw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1740690876; a=rsa-sha256; cv=none; b=ktJv1X05IkE1IppGjEgMf3yKiukiR5IEOzLuFhImlut7bSx3C+QFNZO6v6LeqDeCXeJMTO CXlNdeP1FebNM+03r0tkxMnHTg4h+IZy51n3nCR59qSxaL9vHFRWVBSrwKuG/Ezq/9Cs/d wZ+Lt0usdkkPyW0yNWo99iTlUs3vqezCI/19XCjvU6ZSLbOnEPDj1guay+MToBjEE7kQNx E0RsyPFZnNRMJRAZKSFTYTXAVuU4fUjbQeCLdiBAs6cfsHN24apC7LXNvaF+XkwflnUvpf 8wQz9SMasgjwNwf7/q8IibCYX0quqaVMPSNiMF3G00+f9jHDrhbK7iNOm6WU1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1740690876; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7rWxt8VSqvWtEXUqMbrtuMNIjYpxS46xLn7VzwE4mfY=; b=IgC6DTgNhOpMVtm8qTrdEX8TeqDVio8UuKF6Bn8/BY2LEeBmtNmjcN3Zu4wZnTKQFHOY+e ygkGuUmFG7ieLtvIkoPQnx/m61zhDoSSLC832W0JJjhKQDc4BEr80QIaqw16n/jxTd93n9 gVOpO3j1kV596pglEY+VF5Cu99w2gA3sWSo1zVUbPyUEvr3dvZIsc1+2n6MZ3JE28pjESK ITdkNBVPmA22jU7WD/o/dFANpeSuRolV7mKhm7yuWwT8tQTN/oSG5mu4BnnsUGlgcOhl6O 9cGvsbgla5OMOLExUdm6M3Au9/jyofSiDkVKnz0+BKpNTq+nj6C+5E5rCk/l2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Z3kcX2QDHzycG; Thu, 27 Feb 2025 21:14:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 51RLEaM2004629; Thu, 27 Feb 2025 21:14:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 51RLEaYH004626; Thu, 27 Feb 2025 21:14:36 GMT (envelope-from git) Date: Thu, 27 Feb 2025 21:14:36 GMT Message-Id: <202502272114.51RLEaYH004626@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Alan Somers Subject: git: ce4c8c49210b - main - sysutils/py-salt: fix commands like "service salt_minion status" List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ce4c8c49210b7a646d63b3956ee5e71b74dbf902 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/ports/commit/?id=ce4c8c49210b7a646d63b3956ee5e71b74dbf902 commit ce4c8c49210b7a646d63b3956ee5e71b74dbf902 Author: Alan Somers AuthorDate: 2025-02-27 17:40:20 +0000 Commit: Alan Somers CommitDate: 2025-02-27 21:04:59 +0000 sysutils/py-salt: fix commands like "service salt_minion status" When py-processtitle is installed, the master and minion daemons will change their process titles in a way that breaks commands like "service salt_minion status". status, stop, restart, etc are all broken. Fix this bug by: * Always installing py-processtitle unconditionally, * Fixing utils/process.py to not insert an extra space in the title * Adjusting the RC scripts accordingly A downside is that many service subcommands will now print this harmless warning message: ``` /usr/local/etc/rc.d/salt_minion: WARNING: cannot read shebang line from MultiMinionProcessManager ``` Approved by: krion (maintainer) Sponsored by: ConnectWise PR: 285053 --- sysutils/py-salt/Makefile | 2 +- sysutils/py-salt/files/patch-salt_utils_process.py | 14 ++++++++++++++ sysutils/py-salt/files/salt_master.in | 1 + sysutils/py-salt/files/salt_minion.in | 1 + 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/sysutils/py-salt/Makefile b/sysutils/py-salt/Makefile index 16c3913c606b..4dc82ac149a1 100644 --- a/sysutils/py-salt/Makefile +++ b/sysutils/py-salt/Makefile @@ -1,6 +1,6 @@ PORTNAME= salt PORTVERSION= 3006.9 -PORTREVISION= 3 +PORTREVISION= 4 PORTEPOCH= 1 CATEGORIES= sysutils python MASTER_SITES= PYPI diff --git a/sysutils/py-salt/files/patch-salt_utils_process.py b/sysutils/py-salt/files/patch-salt_utils_process.py new file mode 100644 index 000000000000..b12e5996c9a3 --- /dev/null +++ b/sysutils/py-salt/files/patch-salt_utils_process.py @@ -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): diff --git a/sysutils/py-salt/files/salt_master.in b/sysutils/py-salt/files/salt_master.in index 249c1d735e41..d8691747e322 100644 --- a/sysutils/py-salt/files/salt_master.in +++ b/sysutils/py-salt/files/salt_master.in @@ -34,6 +34,7 @@ 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}" diff --git a/sysutils/py-salt/files/salt_minion.in b/sysutils/py-salt/files/salt_minion.in index ff0a70f4c812..d7a125daad9d 100644 --- a/sysutils/py-salt/files/salt_minion.in +++ b/sysutils/py-salt/files/salt_minion.in @@ -34,6 +34,7 @@ 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}"