Skip to content

Tidy up the macOS installer scripts and guard the openh264 licence - #29

Merged
dkmstr merged 2 commits into
masterfrom
chore/macos-installer-scripts-cleanup
Sep 1, 2026
Merged

Tidy up the macOS installer scripts and guard the openh264 licence#29
dkmstr merged 2 commits into
masterfrom
chore/macos-installer-scripts-cleanup

Conversation

@aschumann-virtualcable

Copy link
Copy Markdown
Contributor

Follow-up to the call: group the constants at the top of the installer scripts and review what they actually do.

Constants

ARCH and VERSION were defined halfway down the script, the URL was built there, and TEMP_FILE / DECOMPRESSED / TARGET_FILE lived further down still. Everything now sits in one block at the top of both postinstall and postremove.

What the review turned up

  • The download used fixed paths under /tmp, which any local user can write. A symlink or a pre-created file at /tmp/openh264.dylib would have been moved into /Library by root. Now it uses mktemp -d with a cleanup trap.
  • Nothing checked what came down the wire. Now that the launcher is signed with disable-library-validation, dyld no longer rejects a dylib signed by another team, so that guarantee has to be recovered here: the script verifies Cisco's TeamIdentifier before installing the file.
  • The log lived in /tmp too, next to a leftover debug marker (udslauncher-postinstall-ran) that nothing in the tree reads. Both moved to /var/log/udslauncher-install.log.

Licence guard

build-pkg.py now fails the build if any openh264 file is found inside the finished bundle. We are licensed to download that library, never to ship it, so a copy sneaking in is a licensing problem rather than a build glitch. Previously two continue statements skipped the copy, but nothing stopped it arriving by another route.

Checked against fake bundles: a clean one reports nothing, libopenh264.8.dylib under Frameworks is caught, and an OpenH264.framework directory under Resources is caught too.

One correction

The postinstallwas renaming the file already. The mv to $TARGET_DIR/$TARGET_FILE with TARGET_FILE="libopenh264.8.dylib" predates this branch, and the installed file is present on the ARM build machine:

/Library/Application Support/UDSLauncher/openh264/
-rw-r--r-- 1 root wheel 1207136 1 Sep 14:04 libopenh264.8.dylib

The path checked during the call was ~/Library/Application Support/UDS launcher/ — user ~/Library rather than /Library, and UDS launcher with a space rather than UDSLauncher. The bug that actually broke H264 was the loader looking for the unversioned name, fixed in #28.

Not verified here

The scripts are macOS-only and could not be executed on the development machine. Both pass bash -n; the licence guard was exercised against fake bundles. They need a real run on a build machine.

Group every constant at the top of postinstall and postremove instead of
spreading them through the body, and review what the scripts actually do.
Three things came out of that review:
- The download used fixed paths under /tmp, which any local user can write.
A symlink or a pre-created file there would have been moved into
/Library by root. Use mktemp -d with a cleanup trap instead.
- Nothing checked what was downloaded. Now that the launcher is signed with
disable-library-validation, dyld no longer rejects a dylib signed by
another team, so verify Cisco's team id before installing the file.
- The log lived in /tmp too, next to a leftover debug marker no code reads.
build-pkg.py now fails the build if any openh264 file is found inside the
finished bundle. We are licensed to download that library, never to ship it,
so a copy sneaking into the app is a licensing problem, not a build glitch.
The verification step must not be the reason a stock Mac ends up without the
codec, so fall back to installing unverified when codesign is missing, the
way the script behaved before. Cisco serves the same file over https, and
the download runs as root, so stop asking for it in the clear.
@dkmstr
dkmstr merged commit dfe5a0e into masterSep 1, 2026
3 checks passed
@aschumann-virtualcable
aschumann-virtualcable deleted the chore/macos-installer-scripts-cleanup branch September 1, 2026 15:31
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@aschumann-virtualcable@dkmstr