Lab Software Update
Software reaches the lab Macs in three hops. An installer is imported into a
Munki repository on the admin Mac; publish.sh copies that repository to the
lab server; each lab Mac notices the change on its next hourly check and
installs it. The whole point is that updating Fusion for the entire lab is a
download, one munkiimport, and one ./publish.sh, instead of a trip to every
desk.
This page covers two things: rebuilding the admin Mac if it dies, and the routine for adding or updating a title. If you're here for the routine, skip to Add a New Title.
How the Repository Is Organized
Everything is a folder of plain files. Munki has no database.
| Folder | Contents | Who writes it |
|---|---|---|
pkgs/ |
The installers themselves, named <name>-<version>.pkg |
munkiimport |
pkgsinfo/ |
One plist per installer describing it: name, version, how to tell if it's installed | munkiimport, then you touch it up |
catalogs/ |
Generated index of everything in pkgsinfo/; production is the one clients read |
makecatalogs (automatic in publish.sh) |
manifests/ |
Which titles go on which Macs; site_default is the one every lab Mac uses |
manifestutil |
icons/ |
<name>.png, shown in Managed Software Center |
munkiimport, optional |
A title is one piece of software across all its versions, identified by its
name (for example fusion). A new version of a title is a new pkg and a new
pkginfo with the same name and a higher version; Munki works out the
upgrade from there.
Set Up the Admin Mac
Steps are numbered continuously through this page.
-
Install the Munki tools from the current release. The one
.pkginstalls the admin tools and the client together. Restart when asked. -
Put the tools on your path.
-
Recover the repository. If the lab server is alive, it has a complete copy of everything except
publish.sh:If the server is also gone, start empty and rebuild it from the installers:
-
Tell
munkiimportwhere the repository is.Prompt Response Repo URL file:///Users/<your username>/munki_repo(type the real path;~is not expanded here)pkginfo extension leave blank pkginfo editor nano(or your editor's command-line name)Default catalog productionRepo access plugin FileRepo -
Give this Mac passwordless SSH to the server.
-
Create the publish script. It rebuilds the catalogs, mirrors the repository to the server, and sets permissions nginx can read.
cat > ~/munki_repo/publish.sh <<'SCRIPT' #!/bin/zsh set -e /usr/local/munki/makecatalogs ~/munki_repo rsync -rltv --delete \ --exclude '.DS_Store' --exclude 'publish.sh' \ ~/munki_repo/ pi@engineering.local:/srv/munki_repo/ ssh pi@engineering.local 'chmod -R u=rwX,go=rX /srv/munki_repo' SCRIPT chmod +x ~/munki_repo/publish.shThis Is Not GNU rsync
macOS ships
openrsyncunder the namersync. It does not understand--chmod, and-awould copy each file's mode from the Mac, where a downloaded installer is sometimes600. The-rltvflags plus the trailingchmodover SSH are what make the files readable by nginx.--deleteis intentional: this Mac is the single source of truth. -
If you started empty in step 3, create the lab manifest; otherwise skip.
-
Publish once to prove the pipeline.
Your terminal should look like this: the
rsyncfile list, thenHTTP/1.1 200 OK.
Add a New Title
Every title goes through the same five moves: import, touch up the pkginfo, add it to the manifest, publish, confirm on one lab Mac. Updating an existing title is the same minus the manifest step; see Update an Existing Title.
-
Download the installer. Munki wants a
.pkg. Most vendors offer one, and Autodesk's lab install for Fusion is one. A.dmgthat contains a.pkgalso imports directly. -
Import it. The prompts below are in the order
munkiimportasks them. Fields marked optional can be left blank by pressing Enter.Prompt Response Notes Item name The bare product name, lowercase, no spaces or version: thonny,fusion,prusaslicerOverwrite the suggestion. munkiimportguesses from the filename and usually includes a version or architecture. This value must stay identical across versions; it is how manifests and icons find the titleDisplay name The product's proper name: Thonny,Autodesk FusionWhat students see in Managed Software Center Description One plain sentence: 3D CAD used in the engineering labsOptional. Shown under the display name Version Accept the detected value Only correct it if you know the pkg's version metadata is wrong Category CAD,Programming, or blankOptional. Only groups items in Managed Software Center; has no effect on what installs where. Avoid class or teacher names here; that's the manifest's job Developer Autodesk, or blankOptional. Cosmetic Unattended install TrueInstalls without a student clicking anything. Munki still waits if the app is running or a restart is needed Unattended uninstall Trueif the pkg has a clean uninstaller,Falsefor large suites like FusionMatters only if you later remove the title Catalogs productionThe only catalog clients read Import this item? yUpload item to subdirectory blank Keeps pkgs/flatUse this directory? (first import only) yAppears once, on an empty repo Attempt to create a product icon? yOptional. Harmless if it finds nothing Edit pkginfo before upload? NThe touch-ups in step 11 are easier afterward Rebuild catalogs? yExpected Noise on an Empty Repo
The very first import prints
Could not read existing catalogs: Could not read 'all' catalog. That catalog doesn't exist until the first rebuild. Carry on.Worked Example: Autodesk Fusion
Prompt Response Item name fusionDisplay name Autodesk FusionDescription 3D CAD used in the engineering labsVersion 2705.1.15(accepted)Category CADDeveloper AutodeskUnattended install TrueUnattended uninstall FalseCatalogs productionUpload item to subdirectory blank Attempt to create a product icon? yEdit pkginfo before upload? NRebuild catalogs? y -
Touch up the pkginfo. Three things, every time. Set the two variables first; they're used by all three.
Rename the pkg to
<name>-<version>.pkgand record the new location.munkiimportkeeps the vendor's filename, which for Autodesk contains spaces that break plain URLs.OLD=$(ls pkgs | grep -i "$NAME" | grep -v "^$NAME-$VER.pkg$") [ -n "$OLD" ] && mv "pkgs/$OLD" "pkgs/$NAME-$VER.pkg" /usr/libexec/PlistBuddy -c "Set :installer_item_location $NAME-$VER.pkg" "pkgsinfo/$NAME-$VER"Add
installsifmunkiimportdidn't. This tells Munki to decide "installed or not" by looking for the application itself, rather than by the package receipt. Students drag apps to the Trash; receipts survive that, and a receipts-only item would never be reinstalled.grep -c '<key>installs</key>' "pkgsinfo/$NAME-$VER" # 0 means add it APP="Autodesk Fusion" # app name without .app /usr/libexec/PlistBuddy \ -c 'Add :installs array' \ -c 'Add :installs:0 dict' \ -c 'Add :installs:0:type string application' \ -c "Add :installs:0:path string /Applications/$APP.app" \ -c "Add :installs:0:CFBundleShortVersionString string $VER" \ -c 'Add :installs:0:version_comparison_key string CFBundleShortVersionString' \ "pkgsinfo/$NAME-$VER"Check the Version Key First
CFBundleShortVersionStringis the usual key, but confirm on a Mac that already has the app:defaults read "/Applications/$APP.app/Contents/Info.plist" CFBundleShortVersionStringshould print a version in the same style as$VER. If onlyCFBundleVersiondoes, use that key in both places above. Comparing the wrong key gives either a perpetual reinstall or a perpetual "already installed."Add
blocking_applicationsso Munki won't replace the app while a student has it open; it waits and retries next cycle. -
Add the title to the lab manifest. New titles only; an updated version of an existing title is already listed.
-
Publish, and confirm the server has the whole file.
./publish.sh curl -sI "http://engineering.local/munki/pkgs/$NAME-$VER.pkg" | grep -i -E 'HTTP|content-length' ls -l "pkgs/$NAME-$VER.pkg"Your terminal should look like this:
200 OK, and the two byte counts match. A 3.8 GB publish over Wi-Fi takes a while; that's the one slow leg. -
Confirm on one lab Mac before trusting the hourly cycle. Quit the app first if it's open.
sudo managedsoftwareupdate -vv --checkonly 2>&1 | grep -i -E "$NAME|install" sudo managedsoftwareupdate --installonlyThe check should list
+ <name>-<version>a few lines above the closingAllowing idle sleep/Finishing.../Done. The install runs quietly; Fusion takes several minutes. Afterward the app's About box, ordefaults read "/Applications/$APP.app/Contents/Info.plist" CFBundleShortVersionString, shows the new version.
Done
Every other lab Mac picks it up within the hour, provided the app isn't running there at that moment.
Update an Existing Title
Run these steps on the admin Mac, in one Terminal window. The existing Munki tools and repository are already installed. Use the lab network for publishing and client checks. Stop if a command fails.
-
Locate and save the existing definition. These are the actual Fusion paths checked on November 16, 2026. On later updates, set
OLDto the newest Fusion definition printed byfind.cd /Users/stevewillis/munki_repo find "$PWD/pkgsinfo" -type f -name 'fusion-*' -print OLD="$PWD/pkgsinfo/fusion-2705.1.15" plutil -p "$OLD" plutil -p manifests/site_default WORK=$(mktemp -d /tmp/munki-fusion-update.XXXXXX) cp "$OLD" "$WORK/previous.plist" cp manifests/site_default "$WORK/site_default"Keep the existing
name:fusion.site_defaultalready listsfusionwithout a version and usesproduction; leave it unchanged. The current definition uses/Applications/Autodesk Fusion.app, blocksAutodesk Fusionwhile running, enables unattended installation, and disables unattended uninstallation. It has no custom scripts or installer environment settings; the preservation command below retains any added later. -
Download the Mac lab/admin installer from Autodesk's Fusion lab download page. Save it as
Autodesk Fusion Admin Install.pkgin Downloads. Use the all-users lab.pkg, not the personal-use downloader.dmg. Autodesk supports deploying this package through Munki; no separate streamer command is needed for this package workflow (lab installation guide).INSTALLER="$HOME/Downloads/Autodesk Fusion Admin Install.pkg" /usr/local/munki/makepkginfo "$INSTALLER" > "$WORK/installer.plist" VER=$(/usr/libexec/PlistBuddy -c 'Print :version' "$WORK/installer.plist") printf 'Replacement version: %s\n' "$VER" /usr/libexec/PlistBuddy -c 'Print :receipts' "$WORK/installer.plist"Confirm the receipt is
com.autodesk.edu.fusion360and the version is newer than the existing definition's2705.1.15. Do not reuse that old version or substitute Fusion's differently formatted marketing version. If Autodesk supplies a different deployment format or receipt, stop and review its installation requirements before using this package procedure. -
Import under the existing name. Copy to a versioned filename first; this leaves older installers intact and avoids spaces in the served URL.
cp "$INSTALLER" "$WORK/fusion-$VER.pkg" /usr/local/munki/munkiimport \ --repo-url file:///Users/stevewillis/munki_repo --plugin FileRepo \ --name fusion --catalog production "$WORK/fusion-$VER.pkg"Prompt, if shown Response Use existing item as a template? y, only if it isfusionItem name / display name fusion/Autodesk FusionVersion The replacement version printed above Catalogs productionImport this item? yUpload item to subdirectory Leave blank Create an icon? n(keep the existing icon)Edit pkginfo? n(next step preserves the settings)Rebuild catalogs? n(do this after the next step)Accept the other existing values. If Munki reports an identical installer already in the repository, stop: this is not a new update. Do not overwrite an existing version's pkginfo or installer.
-
Preserve settings and update detection. This copies the old definition, replaces only the new package's version, receipts, sizes, hash, location, and import metadata, and advances Fusion's app-version check. It also removes the duplicate identical
installsentry in the current definition. Wait until the interactive import has finished and the Terminal prompt returns before pasting this block.: "${WORK:?Run step 15 in this Terminal window first}" VER=$(/usr/libexec/PlistBuddy -c 'Print :version' "$WORK/installer.plist") NEW="/Users/stevewillis/munki_repo/pkgsinfo/fusion-$VER" /usr/bin/python3 - "$WORK/previous.plist" "$WORK/installer.plist" "$NEW" <<'PY' import copy, pathlib, plistlib, sys old_path, fresh_path, new_path = map(pathlib.Path, sys.argv[1:]) old = plistlib.loads(old_path.read_bytes()) fresh = plistlib.loads(fresh_path.read_bytes()) imported = plistlib.loads(new_path.read_bytes()) assert old['name'] == imported['name'] == 'fusion', 'Wrong item name' version = fresh['version'] assert tuple(map(int, version.split('.'))) > tuple(map(int, old['version'].split('.'))), 'Not a newer version' assert {r['packageid'] for r in fresh['receipts']} == {'com.autodesk.edu.fusion360'}, 'Unexpected package' result = copy.deepcopy(old) for key in ('version', 'receipts', 'installed_size', 'installer_item_size', 'installer_item_hash', '_metadata'): result.pop(key, None) if key in fresh: result[key] = fresh[key] result['installer_item_location'] = imported['installer_item_location'] installs = [] for item in result.get('installs', []): if item.get('path') == '/Applications/Autodesk Fusion.app': key = item.get('version_comparison_key', 'CFBundleShortVersionString') item[key] = version if item not in installs: installs.append(item) result['installs'] = installs new_path.write_bytes(plistlib.dumps(result)) print('Updated:', new_path) PY plutil -lint "$NEW" diff -u "$WORK/previous.plist" "$NEW"diffnormally returns status1because the files differ. Check that only the package metadata, detection version, and duplicate entry changed. If the replacement specifies new OS/architecture limits or restart requirements, reconcile those with the old definition before publishing. Preserve custom scripts and installer options; revise any embedded version checks to match the replacement. For another title, use its existing name, paths, receipt IDs, and detection rules instead of this Fusion-specific block. -
Rebuild catalogs and publish. The existing
publish.shruns/usr/local/munki/makecatalogs ~/munki_repo, mirrors the repository topi@engineering.local:/srv/munki_repo/, and makes files readable by nginx. Publishing makes the update available to all lab Macs immediately.cmp "$WORK/site_default" manifests/site_default /Users/stevewillis/munki_repo/publish.sh curl -fI http://engineering.local/munki/catalogs/production curl -fI "http://engineering.local/munki/pkgs/fusion-$VER.pkg" stat -f '%z bytes' "pkgs/fusion-$VER.pkg"cmpshould print nothing. Stop if catalog generation or transfer fails. Both HTTP requests must return200 OK; the package'sContent-Lengthmust match the byte count. Keep the old pkginfo and installer for now. -
Verify on one lab Mac. Quit Fusion in every logged-in session. Open Terminal on that Mac and run:
defaults read /Library/Preferences/ManagedInstalls SoftwareRepoURL sudo /usr/local/munki/managedsoftwareupdate -vv --checkonlyThe URL must be
http://engineering.local/munki. Confirm the pending installs includefusionat the replacement version, then run:sudo /usr/local/munki/managedsoftwareupdate --installonly /usr/libexec/PlistBuddy -c 'Print :CFBundleShortVersionString' \ '/Applications/Autodesk Fusion.app/Contents/Info.plist' sudo /usr/local/munki/managedsoftwareupdate -vv --checkonly--installonlyinstalls all pending items, not just Fusion. Allow several minutes. The app version must equal the replacement version, and the second check must no longer offer that Fusion update. Launch Fusion as a student and confirm it opens and signs in. If installation fails, read/Library/Managed Installs/Logs/ManagedSoftwareUpdate.logbefore continuing.Values still checked during the update
The commands use the verified admin-Mac configuration. The downloaded package determines the new version; a lab Mac confirms the installed version key. The live Pi still needs to pass the transfer and HTTP checks above. Do not prune old versions until the client test succeeds.
Remove a Title
-
Take it out of the manifest and publish. Existing installs stay on the Macs; Munki simply stops managing them.
To actively uninstall it from the lab as well, use
manifestutil add-pkg $NAME --section managed_uninstalls --manifest site_defaultinstead of removing it. That only works for titles imported with Unattended uninstallTrueand a working uninstall method.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
curl -I on a pkg returns a body of about 146 bytes |
nginx 404: the filename doesn't match installer_item_location (spaces, vendor name) |
Redo the rename in step 11, publish |
curl -I returns 403 Forbidden |
File mode 600 reached the server |
./publish.sh again; its chmod line fixes it |
| Client says No changes to managed software but the app is missing | Receipts-only pkginfo; the receipt survived a drag to the Trash | Add installs (step 11), publish |
| Client never upgrades, or reinstalls every hour | Wrong version_comparison_key |
See the warning in step 11 |
-vv --checkonly shows 404s for manifests/<serial>, manifests/<hostname>, or client_resources/site_default.zip |
Normal: Munki tries per-machine manifests before site_default, and the zip is optional branding we don't use |
Nothing. A 404 on site_default or catalogs/production is the one that matters |
| Install skipped with blocking application running | The app is open on that Mac | Nothing; Munki retries next cycle |
rsync: --chmod=...: invalid argument |
Someone restored a GNU-style publish.sh |
Use the script in step 6 |