Repository navigation
Description
Description
I try to build own Deb packages on Debian 12 for the Salt Minion with some local modifications. The documentation link I found via Google (https://docs.saltproject.io/en/latest/topics/packaging/index.html#how-to-build-deb-packages) seems incomplete, and/or parts do not work.
Suggested Fix
A perfect 10 would be a step-by-step guide from git clone to a directory full of working Salt onedir .deb (or .rpm, .exe, .msi) packages, expecting only knowledge about the OS to build for (for me Debian 12) and the packaging format (deb).
Some details/suggestions:
Step 2 does not work as-is on Debian 12: Installing os-wide pip dependencies on Debian 12 is (IMHO rightfully) deactivated, thus the pip install command fails with a big warning. Debian recommends using the packaged python modules instead.
Analyzing the text file from step 2, I came up with this:
apt-get install python3-attr python3-boto3 python3-botocore python3-certifi python3-charset-normalizer python3-commonmark python3-idna python3-jinja2 python3-jmespath python3-markupsafe python3-packaging python3-pygments python3-dateutil python3-yaml python3-requests python3-rich python3-s3transfer python3-six python3-urllib3
(This will most certainly not provide the exact versions from the tools.txt file, and the virustotal3 module is not available in Debian 12)
There's also pipx available in Debian, which will install modules locally below the user's home directory (though I do not know if this will work transparently with the actuall build/packaging process)
Step 4 and 5 look like having a formatting error, there is no "tools" command.
Possibly, the python scripts tools/changelog.py and tools/pkg/build.py are meant.
Both fail with a missing ptscripts module that even Google does not know, so I guess my assumption is false:
$ python3 tools/pkg/build.py deb
Traceback (most recent call last):
File "/home/emric05/tmp/salt/tools/pkg/build.py", line 17, in <module>
from ptscripts import Context, command_group
ModuleNotFoundError: No module named 'ptscripts'
Yet that mysterious tools command is mentioned here explicitly: https://docs.saltproject.io/en/latest/topics/packaging/testing.html#using-tools
But again no explaination on where to get that tools tool. (Tbh, giving any tool that generic name "tools" and placing it in $PATH feels a bit strange, too.)
So I have no clue what to do there and I am stuck now.
Apart from that, I tried the "generic" Debian package build approach: find the debian/../ directory and run dpkg-buildpackage, but that did not work either.
Type of documentation
Salt documentation (Onedir Packaging guide)
Location or format of documentation
https://docs.saltproject.io/en/latest/topics/packaging/index.html#how-to-build-deb-packages
Activity
OrangeDog commentedon Oct 20, 2023
pip --usershould do the same thingDarkentik commentedon May 26, 2025
Hi @MartinEmrich,
i want to let you know that we now were able to build the Debian packages on our own after hardly reverse engineer the Salt's Github code.
We are not finished now to set this up in our internal Gitlab env but we are working on it.
For now here are the infos that i can share with you:
Forword
For now we are able to build the DEB packages inside a clean Dockercontainter but not in a local dev env using python venv.
That
toolsis a python package.Here is the pypi page: https://pypi.org/project/python-tools-scripts/
Pre-requisites
System wide packages:
First we tried to install the packages on our own and after we got it running we used AI 'Grok' to check for redundant package dependencies and it came up with this list that works:
Python virtual environment packages
Build magic using
python-tools-scriptsFinal words
Dockerfile complete
For us it was quite a lot of pain to find out the correct versions of the packages and to reverse engineer the Github actions and workflows.
I hope that our experience will help you to get forward.
After we finished our internal DEB build pipeline i try to remember this here and share our experience.
Now we have to face the challenge how we can implement patchmanagement to the build chain.
Have a nice time.
MartinEmrich commentedon Jun 2, 2025
Nice, great work!
But sorry, TBH after that long time, we seem to have just worked around the original issue, and I forgot what that was in the first place. (It could have been that at that time, there were no native Debian 12 packages, but now they are. It could also be the unusual installation directory under /opt, but we managed that now, too).
dwoz commentedon Oct 28, 2026
Closing — consolidated into #70585. The checkbox for this item is in the appropriate theme section of that tracker. Please pick up the sub-item there.