makecatalogs on Linux

5 views
Skip to first unread message

Gregory Neagle

unread,
Aug 6, 2026, 12:43:00 PM (6 days ago) Aug 6
to munki-dev, munki-discuss
Attachment available until Sep 5, 2026
Prior to Munki 7, the Munki command-line tools were written in Python. Because of this, it was possible to run `makecatalogs` on Linux, which can sometimes prove useful, especially if your Munki repo is stored on a Linux webserver.

With the transition to Munki 7, the Munki command-line tools are now compiled binaries. A binary for macOS will not run on Linux. Fortunately, there have been no important changes in `makecatalogs` for several years, and the Python `makecatalogs` can still be used on Linux.

However, it is possible to compile Swift binaries for Linux. Prodded by some folks on the MacAdmins Slack, and heavily assisted by Claude Code, there is now an experimental build of `makecatalogs` for Linux. You can build it for yourself on macOS or Linux with the help of Docker:

$ cd munki
$ git checkout linux_makecatalogs
$ cd code/cli/munki/
$ docker run --rm \
    -v "$(pwd)":/src -w /src \
    --platform linux/amd64 \
    swift:6.3.3 \
    bash -c "swift sdk install https://download.swift.org/swift-6.3.3-release/static-sdk/swift-6.3.3-RELEASE/swift-6.3.3-RELEASE_static-linux-0.1.0.artifactbundle.tar.gz --checksum 87c3eaf908e67c0e13a84367119e12273cec1d2cd3d81f7d74bb36722d6b607b && swift build -c release --swift-sdk x86_64-swift-linux-musl"

You can find the built binary like so:
$ find .build -name makecatalogs

Which should return a path like:
.build/x86_64-swift-linux-musl/release/makecatalogs

I haven't done a ton of testing, but I have tested against a copy of my production repo's pkgsinfo directory, which has nearly 3000 pkginfo files. Generated catalogs were identical to those generated by makecatalogs running on macOS.

If you don’t want to build the binary yourself, I’ve attached a build I did. It works on Red Hat Enterprise Linux 9.6. The intention is that it should work on virtually any Linux distro, but I have not tested anything other than RHEL9.6.


Click to Download
makecatalogs.zip
56.9 MB


Reply all
Reply to author
Forward
0 new messages