Bug 296290 - sysutils/py-salt: 3006.26,1 doesn't work with python312
Summary: sysutils/py-salt: 3006.26,1 doesn't work with python312
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Alan Somers
URL: https://github.com/freebsd/freebsd-po...
Keywords:
Depends on:
Blocks:
 
Reported: 2026-06-26 14:13 UTC by Johan Söllvander
Modified: 2026-11-04 09:58 UTC (History)
24 users (show)

See Also:


Attachments
Mark port as BROKEN with python 3.12+ (1.02 KB, patch)
2026-06-26 18:22 UTC, Alan Somers
asomers: maintainer-approval? (krion)
Details | Diff
salt 3008 update (10.45 KB, patch)
2026-06-28 10:16 UTC, Kirill Ponomarev
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Johan Söllvander freebsd_committer freebsd_triage 2026-06-26 14:13:43 UTC
Looks like we have some type of communication error between the salt-minion and salt-master on python312. I'm not seeing the same problem when I'm using python311:

root@<redacted>:~ # salt-call state.apply --log-level=trace
...
[DEBUG   ] Connecting to master. Attempt 1 of 1
[DEBUG   ] "salt" Not an IP address? Assuming it is a hostname.
[DEBUG   ] Master URI: tcp://10.2.10.87:4506
[DEBUG   ] Initializing new AsyncAuth for ('/usr/local/etc/salt/pki/minion', '<redacted>', 'tcp://10.2.10.87:4506', '1574223880.58654')
[DEBUG   ] Generated random reconnect delay between '1000ms' and '11000ms' (4273)
[DEBUG   ] Setting zmq_reconnect_ivl to '4273ms'
[DEBUG   ] Setting zmq_reconnect_ivl_max to '11000ms'
[DEBUG   ] salt.crypt.get_rsa_key: Loading private key
[DEBUG   ] salt.crypt._get_key_with_evict: Loading private key
[DEBUG   ] SaltEvent PUB socket URI: /var/run/salt/minion/minion_event_d0881ffea1_pub.ipc
[DEBUG   ] SaltEvent PULL socket URI: /var/run/salt/minion/minion_event_d0881ffea1_pull.ipc
[TRACE   ] ReqChannel send clear load={'cmd': '_auth', 'id': '<redacted>', 'nonce': '04df327b9ab94b6db4b178835a105f93', 'enc_algo': 'OAEP-SHA1', 'sig_algo': 'PKCS1v15-SHA1', 'token': b"<removed to reduce noise>", 'pub': '<removed to reduce noise>'}
[DEBUG   ] Using selector: KqueueSelector
[TRACE   ] Failed to send msg SaltReqTimeoutError('Message timed out')
[TRACE   ] ReqChannel send clear load={'cmd': '_auth', 'id': '<redacted>', 'nonce': '04df327b9ab94b6db4b178835a105f93', 'enc_algo': 'OAEP-SHA1', 'sig_algo': 'PKCS1v15-SHA1', 'token': b"<removed to reduce noise>", 'pub': '<removed to reduce noise>'}
[TRACE   ] Failed to send msg SaltReqTimeoutError('Message timed out')
[TRACE   ] ReqChannel send clear load={'cmd': '_auth', 'id': '<redacted>', 'nonce': '04df327b9ab94b6db4b178835a105f93', 'enc_algo': 'OAEP-SHA1', 'sig_algo': 'PKCS1v15-SHA1', 'token': b"<removed to reduce noise>", 'pub': '<removed to reduce noise>'}
[TRACE   ] Failed to send msg SaltReqTimeoutError('Message timed out')
[TRACE   ] ReqChannel send clear load={'cmd': '_auth', 'id': '<redacted>', 'nonce': '04df327b9ab94b6db4b178835a105f93', 'enc_algo': 'OAEP-SHA1', 'sig_algo': 'PKCS1v15-SHA1', 'token': b"<removed to reduce noise>", 'pub': '<removed to reduce noise>'}
[TRACE   ] Failed to send msg SaltReqTimeoutError('Message timed out')
[TRACE   ] ReqChannel send clear load={'cmd': '_auth', 'id': '<redacted>', 'nonce': '04df327b9ab94b6db4b178835a105f93', 'enc_algo': 'OAEP-SHA1', 'sig_algo': 'PKCS1v15-SHA1', 'token': b"<removed to reduce noise>", 'pub': '<removed to reduce noise>'}
[TRACE   ] Failed to send msg SaltReqTimeoutError('Message timed out')
[TRACE   ] ReqChannel send clear load={'cmd': '_auth', 'id': '<redacted>', 'nonce': '04df327b9ab94b6db4b178835a105f93', 'enc_algo': 'OAEP-SHA1', 'sig_algo': 'PKCS1v15-SHA1', 'token': b"<removed to reduce noise>", 'pub': '<removed to reduce noise>'}
[TRACE   ] Failed to send msg SaltReqTimeoutError('Message timed out')
[TRACE   ] ReqChannel send clear load={'cmd': '_auth', 'id': '<redacted>', 'nonce': '04df327b9ab94b6db4b178835a105f93', 'enc_algo': 'OAEP-SHA1', 'sig_algo': 'PKCS1v15-SHA1', 'token': b"<removed to reduce noise>", 'pub': '<removed to reduce noise>'}
[TRACE   ] Failed to send msg SaltReqTimeoutError('Message timed out')
[DEBUG   ] Closing AsyncReqChannel instance
Unable to sign_in to master: Attempt to authenticate with the salt master failed with timeout error


I tried changing KqueueSelector to PollSelector with a ugly patch in salt/__init__.py but it didn't help. I know python312 isn't officially supported by salt so I figured I'd start with making this ticket before reporting it upstream.
Comment 1 Alan Somers freebsd_committer freebsd_triage 2026-06-26 16:56:05 UTC
I get the same problem with python-313.
Comment 2 Alan Somers freebsd_committer freebsd_triage 2026-06-26 17:15:37 UTC
Here's a theory: Salt 3006 vendors an old version of Tornado, which uses ssl.match_hostname().  But that function is long obsolete in Python, and got removed in Python 3.12.  Salt 3007 removed the vendored Tornado, but that change never got backported to 3006.  If this theory is correct, then our choices are:

* Stick with Python 3.11
* Backport the patch that removes vendored Tornado.  But it doesn't apply cleanly to 3006
* Upgrade the port to Salt 3008 (3007 seems to be discontinued), which may require updating Python to 3.14.  A least, Salt's website claims that 3008 is only supported on Python 3.14.

More details: https://github.com/saltstack/salt/issues/65360
Comment 3 Kirill Ponomarev freebsd_committer freebsd_triage 2026-06-26 17:20:53 UTC
Thanks for the report and the analysis.

Alan's theory matches the upstream issue exactly. Salt 3006 vendors an old Tornado that still calls ssl.match_hostname(), which was removed in Python 3.12, so the minion's TLS auth to the master silently times out, exactly the SaltReqTimeoutError loop seen here. This is the same root cause tracked upstream in https://github.com/saltstack/salt/issues/65360, and it is not specific to FreeBSD.

The 3006 branch will not get a fix: upstream removed the vendored Tornado only in 3007, and that change does not backport cleanly to 3006. 3007 is effectively discontinued, and 3008 is documented as Python 3.14 only
Comment 4 Alan Somers freebsd_committer freebsd_triage 2026-06-26 17:29:06 UTC
How shall we proceed, krion?  Shall we hastily upgrade the port to 3008?  And if we do that, shall we add a new port called salt-3006 for Python-3.11 users?  I can try the upgrade, if you're too busy.  And in any case, we should probably take the port as BROKEN immediately, keyed on PYTHON_VERSION.
Comment 5 Kirill Ponomarev freebsd_committer freebsd_triage 2026-06-26 17:29:55 UTC
To add on that: the long-term plan is to update the port to Salt 3008 (with the required Python 3.14 bump). I'll start working on that, since 3006 is a dead end on Python 3.12+
Comment 6 Kirill Ponomarev freebsd_committer freebsd_triage 2026-06-26 17:33:22 UTC
Thanks Alan, yes, please go ahead and take the BROKEN approach immediately, keyed on PYTHON_VERSION for 3.12+. The default is still 3.11 so most users keep working.

I'd rather not rush the 3008 jump, though. 3008 needs Python 3.14, and I want to make sure 3.14 is actually in good enough shape in the tree before we make py-salt depend on it, a hasty upgrade that drags in an immature Python default would just trade one breakage for another. If you have time to try the 3008 upgrade in a branch/poudriere run, that'd be very welcome, I'll review and test on my side.

On a separate salt-3006 port for 3.11 users: I think that's the right call. 3006 is the current LTS and people are running it in production. So tha plan would be:

* now: BROKEN on Python 3.12+ for the existing port
* short term: keep 3006 working on 3.11 (either pinned here or as sysutils/salt-3006)
* then: move sysutils/py-salt to 3008 on Python 3.14 once 3.14 is solid
Comment 7 Alan Somers freebsd_committer freebsd_triage 2026-06-26 17:37:19 UTC
Ok, I'll prepare a BROKEN patch.  As for 3008, I can test that over here.  Do you already have a WIP patch to update the port to 3008?
Comment 8 Kirill Ponomarev freebsd_committer freebsd_triage 2026-06-26 17:42:00 UTC
Nothing yet, I haven't started on 3008. I'll start working on the patch next week and post it here for you to test. Thanks for handling the BROKEN patch in the meantime
Comment 9 Alan Somers freebsd_committer freebsd_triage 2026-06-26 18:22:54 UTC
Created attachment 272155 [details]
Mark port as BROKEN with python 3.12+
Comment 10 Kirill Ponomarev freebsd_committer freebsd_triage 2026-06-26 18:28:21 UTC
(In reply to Alan Somers from comment #9)
approved, go ahead
Comment 11 commit-hook freebsd_committer freebsd_triage 2026-06-26 20:07:04 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d6a37d99e723278cd676de830565663b2456c56f

commit d6a37d99e723278cd676de830565663b2456c56f
Author:     Alan Somers <asomers@FreeBSD.org>
AuthorDate: 2026-06-26 18:19:18 +0000
Commit:     Alan Somers <asomers@FreeBSD.org>
CommitDate: 2026-06-26 20:06:28 +0000

    sysutils/py-salt: mark as BROKEN with python-3.12+

    The port will build, but not run, with Python 3.12 or later.

    PR:             296290
    Reported by:    js
    MFH:            2026Q2
    Approved by:    krion (maintainer)
    Sponsored by:   ConnectWise

 sysutils/py-salt/Makefile | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
Comment 12 Kirill Ponomarev freebsd_committer freebsd_triage 2026-06-28 10:16:59 UTC
Created attachment 272214 [details]
salt 3008 update

Hi Alan,

I have a working update to salt 3008.1 ready for testing, patch attached.

Status on my side:

- The whole dependency chain builds cleanly on Python 3.14. All 40 runtime deps already exist in the tree, the only upstream base.txt entries without ports are vultr and opentelemetry-exporter-prometheus and salt imports both lazily so I just left them out of RUN_DEPENDS.

- Basic functional tests in a clean jail are done as well

Could you give it a spin on your side?

One more thing I'd like your opinion on: do we actually need a separate sysutils/py-salt-3006 for 3.11 users or should we just move sysutils/py-salt straight to 3008 and be done with it? Given 3006 is a dead end on 3.12+ and 3008 works witgh 3.14, I'm leaning toward skipping the extra port and doing the inplace 3008 update. What do you think?
Comment 13 T. S. 2026-06-29 06:57:15 UTC
Hi,
sorry for stepping in, I may do testing as well. Salt Proxy and Multi-OS environment with BSD, Linux, Windows.
Though I would like to see a separate port for 3008 - maybe the existing 3006 one can be renamed to "oldstable" or something, then upgrading to 3008 so people may downgrade in case something doesn't work due to FreeBSD specific issues or 3008 specific issues.
Comment 14 Kirill Ponomarev freebsd_committer freebsd_triage 2026-06-29 07:24:45 UTC
(In reply to T. S. from comment #13)
Hi, thanks for jumping inб no need to apologize, the more testing the better, and a Salt Proxy + mixed BSD/Linux/Windows setup is exactly the kind of coverage I can't easily reproduce on my side. Please do test the attached 3008.1 patch and report anything that breaks.

Good point on keeping a fallback, and it's the open question here. So far I'm weighing two options: (a) just move sysutils/py-salt to 3008 in place, or (b) keep the current 3006 around as a separate "oldstable" port so people can downgrade if they hit a FreeBSD or 3008 specific issue. Your multi-OS/proxy results will help decide whether a 3006 fallback is actually worth carrying. Interested in your and Alan's take.

Thanks again!
Comment 15 Alan Somers freebsd_committer freebsd_triage 2026-06-29 21:32:29 UTC
Your patch file includes a few changes to files in / that just update timestamps, but don't actually change the contents of the patches.  You should remove those parts.

Aside from that, the port works.  I can build it for FreeBSD 15.0 amd64 with DEFAULT_VERSIONS+=python=3.14 or python=3.12 (changing the USES=cpe python3.12+ in the port, of course). Once the minion is running, I can ping the master, and collect grains.  I did not test the salt 3008.1 master.

There's one big problem, which is that Salt 3008.1 removed the ZFS state.  Without that, I can't successfully apply state.  That's going to create a huge headache for me when actually deploying this port, so it might help to have a salt-3006.1 port to fall back on, to help the transition.
Comment 16 Fabian Keil 2026-07-02 11:13:09 UTC
(In reply to Kirill Ponomarev from comment #12)

I'm using salt-ssh and the patch works for me.

The only problem I noticed is that the ZFS state is gone as Alan already mentioned.

I tested on ElectroBSD amd64 systems based on stable/15.

The system running salt-ssh is using python 3.12, the client systems use python 3.11 or 3.12.
Comment 17 Delta Regeer 2026-07-05 05:09:18 UTC
salt 3008 removed a whole bunch of "salt extensions":

https://salt.tips/the-great-salt-module-migration/

The zfs one has moved to: https://github.com/salt-extensions/saltext-zfs 

However this includes various tools that are necessary to manage a FreeBSD system, such as sysrc/freebsdservice which have not yet found a home, see for example that https://github.com/salt-extensions/saltext-freebsd is a non-existent repository.

I've had to vendor in the old extensions from 3007 to continue working with 3008, but this does not really feel tenable moving forward. I don't know if VMWare/Broadcom just no longer care to support FreeBSD for Saltstack moving forward...
Comment 18 Alan Somers freebsd_committer freebsd_triage 2026-07-05 13:15:13 UTC
(In reply to Delta Regeer from comment #17)
No, I don't think that Broadcom cares about FreeBSD moving forward.  Broadcom doesn't seem to care about a lot of things.

Johan and I haven't migrated our stack to 3008.1 yet, but we'll have to eventually, because as bad as Salt has gotten I don't see any good alternatives..  And we'll have the same problems that you had with sysrc etc.  Would you like to collaborate on a saltext-freebsd repository?
Comment 19 Delta Regeer 2026-07-05 16:54:31 UTC
I've been using SaltStack (primarily via salt-ssh) to manage my systems for a while, and over time I've run into a number of breakages introduced by upstream changes.

I've decided to migrate to Ansible. SaltStack and Ansible aren't really comparable when it comes to the master/minion model, but for the handful of systems I manage, Ansible covers my needs.

I'm not in a position to help maintain FreeBSD support. FreeBSD support has historically been a rough spot in SaltStack — I've filed and attempted to fix a number of issues over the years. More recently, the move to Python 3.14 introduced a vt bug (https://github.com/saltstack/salt/issues/69705) that I hit when upgrading my local install on macOS.

My impression is that testing coverage outside the officially supported Linux platforms is limited. While the deprecation of the salt extensions has apparently been discussed in the issue tracker since 2024, there were no deprecation warnings or other signals that would have reached users like me before things broke.

I'm mainly commenting because I found this issue while trying to work out how the FreeBSD port would handle the now-missing FreeBSD salt extensions, and discovered the port hasn't even been updated to 3007, let alone 3008.

Honestly, I'm disappointed. SaltStack was my preferred configuration management system, and there are design choices in Ansible I've never loved — but as a hobbyist maintaining a website, mail server, and home router, Ansible fits the bill just as well.
Comment 20 ml 2026-07-05 19:40:37 UTC
(In reply to Alan Somers from comment #18)

> Would you like to collaborate on a saltext-freebsd repository?

I'm not sure I have the time or the skills, but I depend on Salt on FreeBSD, so if I can help, I'd gladly do.
I also have no idea where to start, but I'd gladly read discussions about this.
Feel free to contact me privately if you think it's useful.
Comment 21 Lorenzo Perone 2026-07-16 21:32:47 UTC
Hi, Yes, PLEASE go on supporting saltstack on FreeBSD. I have tons of jails and hosts orchestrated / configured via saltstack. I'll be a super early adopter of py31[234]-salt and would be reporting any problems sooner than later.
Dropping support for salt would be a bad signal also upstream to the salt people. They have supported FreeBSD better than many other tools until now at least.
Had to resort to a poudriere repository for the time being, building 3006 with python 3.11, but that will be supposedly dropped in september, so that's just a survival move... 

Kudos and thanx!

Lorenzo
Comment 22 Andrew 2026-07-19 17:08:33 UTC
I'm with both Lorenzo and ml@netfence.it: it would be really a shame to loose Saltstack, which, even as bad as it has become, has no valid contender out there AFAIK. So please tell me anything I can do to help you maintain sysutils/py-salt working on FreeBSD!
I'm not a dev guy, but I have a 3006.23 master in production (FreeBSD 14.4 jail) serving a bunch of minions (mainly macOS clients). I guess at least I can help in testing your work.

Sincerely.

--
Andrew
Comment 23 Aaron C. de Bruyn 2026-07-21 23:55:30 UTC
Just as an FYI, I ran into Salt not being in the latest version of FreeBSD and I use 3007.14 everywhere because I'm not ready to transition to the 'gutted' 3008 yet.

I installed FreeBSD on a new box and got the minion working just fine using these steps:


# pkg install py32-pip py312-packaging-26.2 py312-tornado py312-msgpack py312-distro py312-rsa py312-m2crypto py312-pyzmq py312-cffi py312-pycryptodome py312-gnupg py312-timelib py312-cryptography

# pip install salt==3007.14

# mkdir -p /usr/local/etc/salt/pki/minion

# salt-call -l info --master whatever.example.tld state.highstate


Of course this is missing the rc scripts, but it worked to apply the ~350 states I needed.
Comment 24 Kevin Bowling freebsd_committer freebsd_triage 2026-07-22 05:34:08 UTC
How about updating the port to 3007.14 for a short term so the pkg repo works again, while 3008 is figured out?
Comment 25 Aaron C. de Bruyn 2026-07-22 12:58:06 UTC
Keep in mind, I only tested that with salt-minion, and some people may still be using salt-master, salt-api, salt-ssh, salt-syndic, etc...so upgrading to 3007.14 might break someone's setup pretty badly.  Maybe rename the package to py-salt-minion instead of py-salt so it doesn't imply that everything works?
Comment 26 Julien Cigar 2026-08-03 09:37:20 UTC
All our infrastructure is based on SaltStack so .. a big +1 for a saltext-freebsd -like repository, and I would be happy to contribute (if I can). 

(I've already written a bunch of (FreeBSD) formulas (for eg https://github.com/silenius/jails-formula) for our internal usage at work).
Comment 27 Johan Söllvander freebsd_committer freebsd_triage 2026-08-06 13:21:34 UTC
Alan and I have been talking a bit and wanted to give you guys an update. We're going to spend some time in the coming weeks to make our $WORK environment work on 3008, and we will be making all the extension repositories we need to create available for everyone. And if we need to, we will prepare patches to make a py-salt 3008 port work on older versions of python.

However, I don't have a timeline or any details to share yet.
Comment 28 Alan Somers freebsd_committer freebsd_triage 2026-08-17 21:41:24 UTC
Status update: I have the Salt 3008.1 minion mostly working at $WORK.  I had to create a separate port for saltext.zfs .  And I had to create a new repository for saltext.freebsd, and a port for it too.  There are still two problems:

* I haven't tested the Salt 3008 master yet.  And I don't expect to, because at $WORK I run the master on Linux, not FreeBSD.

* The tests in the saltext.freebsd repo don't work yet.  I copied them verbatim from the 3006 branch, but they need some adjustment.

https://github.com/freebsd/freebsd-ports/pull/588
https://github.com/asomers/saltext-freebsd
Comment 29 Alexander Ushakov 2026-08-31 20:06:10 UTC
I have used salt master with Kirill's patch for a month - it works nice.
Of cause salt 3008 requires to install additional saltexts through pip.
Comment 30 Alan Somers freebsd_committer freebsd_triage 2026-09-02 20:11:05 UTC
I fixed all of the problems with saltext.freebsd, and two volunteers (including Alexander Ushakov, above) have tested the master.  So I think these changes are ready to review.

https://github.com/freebsd/freebsd-ports/pull/588
Comment 31 Kirill Ponomarev freebsd_committer freebsd_triage 2026-09-09 06:17:50 UTC
(In reply to Alan Somers from comment #30)
I've tested the changes from https://github.com/freebsd/freebsd-ports/pull/588 on my side and everything looks fine so far. Since the bulk of the work here is yours, feel free to commit the update yourself, it's approved. Thanks a lot for picking this up and for sorting out saltext.freebsd and saltext.zfs.
Comment 32 commit-hook freebsd_committer freebsd_triage 2026-09-09 19:07:59 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7d944fce2dc60f518a234dce421a5059a5fd7429

commit 7d944fce2dc60f518a234dce421a5059a5fd7429
Author:     Alan Somers <asomers@FreeBSD.org>
AuthorDate: 2026-08-17 20:23:58 +0000
Commit:     Alan Somers <asomers@FreeBSD.org>
CommitDate: 2026-09-09 19:07:06 +0000

    sysutils/py-saltext.zfs: ZFS extensions for Salt 3008

    This port contains modules and states that were previously builtin to
    Salt 3006, but must now be installed separately.

    It includes two patches used internally at Connectwise.

    PR:             296290
    Reviewed by:    krion
    Approved by:    krion (ports)
    Sponsored by:   ConnectWise

 sysutils/Makefile                                  |  1 +
 sysutils/py-saltext.zfs/Makefile (new)             | 26 ++++++++++++++++++++++
 sysutils/py-saltext.zfs/distinfo (new)             |  3 +++
 .../patch-src_saltext_zfs_states_zfs.py (new)      | 19 ++++++++++++++++
 sysutils/py-saltext.zfs/pkg-descr (new)            |  4 ++++
 5 files changed, 53 insertions(+)
Comment 33 commit-hook freebsd_committer freebsd_triage 2026-09-09 19:08:07 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=19708bb3a7ed3aaa097cf00f36b2afa8f517a5b6

commit 19708bb3a7ed3aaa097cf00f36b2afa8f517a5b6
Author:     Alan Somers <asomers@FreeBSD.org>
AuthorDate: 2026-08-17 20:24:31 +0000
Commit:     Alan Somers <asomers@FreeBSD.org>
CommitDate: 2026-09-09 19:07:07 +0000

    sysutils/py-saltext.freebsd: new port

    This is a Salt extension for interacting with various FreeBSD-specific
    commands.  The bsd.shadow module, used by all BSDs, is also included.
    The modules herein used to be part of Salt, in version 3006, but are now
    developed in a separate repository.

    PR:             296290
    Reviewed by:    krion
    Approved by:    krion (ports)
    Sponsored by:   ConnectWise

 sysutils/Makefile                           |  1 +
 sysutils/py-saltext.freebsd/Makefile (new)  | 26 ++++++++++++++++++++++++++
 sysutils/py-saltext.freebsd/distinfo (new)  |  3 +++
 sysutils/py-saltext.freebsd/pkg-descr (new) |  4 ++++
 4 files changed, 34 insertions(+)
Comment 34 commit-hook freebsd_committer freebsd_triage 2026-09-09 19:08:09 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=344b4b0f44599af946c73208befcc511e643fee5

commit 344b4b0f44599af946c73208befcc511e643fee5
Author:     Alan Somers <asomers@FreeBSD.org>
AuthorDate: 2026-08-17 20:22:21 +0000
Commit:     Alan Somers <asomers@FreeBSD.org>
CommitDate: 2026-09-09 19:07:06 +0000

    sysutils/py-salt: 3008.2

    Version 3008.1 version works with Python 3.12+.  However, it lacks many
    states included in Salt 3006, for example ZFS.

    Version 3008.2 fixes a regression in the pkg.installed state, though it
    wasn't mentioned in Salt's changelog.

    PR:             296290
    Approved by:    krion (maintainer)
    Sponsored by:   ConnectWise

 sysutils/py-salt/Makefile                          | 50 ++++++++++++++++------
 sysutils/py-salt/distinfo                          |  8 ++--
 sysutils/py-salt/files/patch-pyproject.toml (new)  | 10 +++++
 .../files/patch-requirements_base.txt (gone)       | 41 ------------------
 .../patch-tools_pkg_salt__build__backend.py (new)  | 21 +++++++++
 sysutils/py-salt/pkg-plist                         |  5 ---
 6 files changed, 72 insertions(+), 63 deletions(-)
Comment 35 Alan Somers freebsd_committer freebsd_triage 2026-09-09 19:09:53 UTC
All done.  Thanks for the help, krion.
Comment 36 Paul Mather 2026-09-10 23:56:03 UTC
Many thanks for getting sysutils/py-salt working again!
Comment 37 Kevin Bowling freebsd_committer freebsd_triage 2026-09-11 15:33:57 UTC
Mostly working well for me but I see the following, do I need to enable something on the master/minion or do we need to make it depend on a pkg? 

     Comment: State 'service.running' was not found in SLS 'salt.minion'
              Reason: 'service' __virtual__ returned False: No service execution module loaded: check support for service man
agement on FreeBSD-15
Comment 38 Alan Somers freebsd_committer freebsd_triage 2026-09-11 15:39:35 UTC
(In reply to Kevin Bowling from comment #37)
Did you install the py312-saltext.freebsd package?  It wasn't required with Salt 3006, but it is with Salt 3008.
Comment 39 Kevin Bowling freebsd_committer freebsd_triage 2026-09-11 16:17:54 UTC
(In reply to Alan Somers from comment #38)
That seems to be the issue.  For some reason the run depend doesn't seem to pull it into poudriere there.
Comment 40 Alan Somers freebsd_committer freebsd_triage 2026-09-11 16:36:32 UTC
(In reply to Kevin Bowling from comment #39)
That's deliberate.  py-salt does not unconditionally depend on py-saltext.freebsd.  It's possible to use the former without the latter, if you don't care about any of the FreeBSD-specific states.
Comment 41 ml 2026-09-17 14:45:06 UTC
(In reply to Alan Somers from comment #35)

Thank you very very very much for this work!
I can finally remove Python 3.11 from most of my systems!

I currently upgraded the master and one of the simplest minion: so far so good.
(I also tested salt-ssh).
I'll get back if I find any troubles with more complex states.



Just three notes...

_ Starting the minion, the following is printed:
/usr/local/lib/python3.12/site-packages/salt/utils/process.py:81: DeprecationWarning: This process (pid=51205) is multi-threaded, use of fork() may lead to deadlocks in the child.
  pid = os.fork()
Probably nothing to worry about.

_ The new master did not work properly until I commented the following in /usr/local/etc/salt:
file_roots:
  base:
    - /usr/local/etc/salt/states
pillar_roots:
  base:
    - /usr/local/etc/salt/pillar
These weren't needed in 3006 (they should be the default, I guess).

_ py312-saltext.freebsd and py312-saltext.zfs should be installed on the minion.
Perhaps this is common knowledge, but I personally wondered whether they should be installed on the master.
Comment 42 Alan Somers freebsd_committer freebsd_triage 2026-09-17 16:00:35 UTC
(In reply to ml from comment #41)
Th os.fork() thing is definitely a problem, but it should be addressed upstream.

Should py312-saltext.freebsd and py312-saltext.zfs be installed on the master?  I don't know.  I haven't ever run a 3008 master.  I'm mostly sure that they don't need to be installed on the master, but I'm not 100% certain.
Comment 43 Andrew 2026-10-12 18:27:57 UTC
Sorry to bother you all, but I do not know how to debug this: just after upgrading to v3008 (and many thanks for all contributors for this!) all seemed to work well, but then I noticed that minion data cache stopped working, and Salt master's log file is filled with these lines:

 [salt.payload     :100 ][CRITICAL][96806] Could not deserialize msgpack message. This often happens when trying to read a file not in binary mode. To see message payload, enable debug logging and retry. Exception: unpack(b) received extra data.

I can confirm that py312-msgpack-1.2.2 is installed:

# salt --versions-report | grep msgpack
       msgpack: 1.2.2
  msgpack-pure: Not Installed

Anyone can kindly point me to the right direction to troubleshoot this?
Comment 44 Alan Somers freebsd_committer freebsd_triage 2026-10-12 20:07:17 UTC
(In reply to Andrew from comment #43)
I haven't seen such an error myself.  But I see some similar looking bug reports online:
https://github.com/saltstack/salt/issues/68678
https://github.com/saltstack/salt/issues/60094
Comment 45 Andrew 2026-10-14 16:18:42 UTC
(In reply to Alan Somers from comment #44)
Thanks, it was only may fault: I just realized that, in this new version of SaltStack, minion data cache location has been changed from /var/cache/salt/master/minions/${minion}/data.p to /var/cache/salt/master/grains/${minion}.p ! :S

msgpack errors are likely caused by old minions, which nevertheless are working and updating their cached grains on the master regularly.
Comment 46 Julien Cigar 2026-11-04 09:58:04 UTC
Hello,

3008 works well, except through salt-api with an external_auth user (PAM), I'm getting weird permission issues, and wheel modules don't work at all.

I'm wondering if the problem is not a difference between Linux and FreeBSD regarding returned uid and euid in some Python module.

I've opened a discussion here: https://github.com/saltstack/salt/discussions/70663