Compare commits

...
Author SHA1 Message Date
FredApps bc1642a9f0 Merge main into fredapps/macos-plugin-entitlements 2026-11-28 23:10:54 +01:00
c475779755 macOS: plugin-loading entitlements for the signed app and CLI
Add com.apple.security.cs.disable-library-validation and
com.apple.security.cs.allow-unsigned-executable-memory to the hardened-runtime
entitlements, and sign soundcraft-cli with the same entitlements, so signed
builds load third-party VST3/CLAP/AU plugins (including UADx/PACE). Combines
#395 and #1119.

Co-authored-by: IfritisZ <44840600+IfritisZ@users.noreply.github.com>
Co-authored-by: timlehmann1234567890-cell <346860803+timlehmann1234567890-cell@users.noreply.github.com>
2026-11-28 23:07:07 +01:00
4 changed files with 29 additions and 9 deletions
+8 -4
View File
@@ -1,6 +1,6 @@
# Where SoundCraft falls short of Pro Tools
> **Last reviewed:** 2026-11-14 · **Last updated:** 2026-11-25 · **Change:** minor (G-01: the Playback Engine shows the current device choice after a command changes it, and a buffer size the driver does not take is reported; previously trivial: G-04: Number of Loops accepts up to 1,000; crossfade remains open; previously minor: G-06: recording to disk is done (#84, long takes #888); streaming sources remain; previously minor: G-02 shrunk: MIDI input devices work; G-03: strict external-WAV AAF import; previously minor: G-05: plugin editors on Linux/X11; previously trivial: G-09: the pt-BR catalog now covers helper-passed tooltips, the status bar, the remove-session prompt and engine error text; G-08: Frequency Shifter, 28 processors; G-04: volume automation read at every sample, #1354; G-01: `setup.playback_engine` applies the device buffer in the desktop app; G-04: Clip Looping crossfade and loop count) · **Target:** Avid Pro Tools Ultimate 2026.4.1
> **Last reviewed:** 2026-11-14 · **Last updated:** 2026-11-28 · **Change:** minor (G-05: the signed macOS app and CLI carry the plugin-loading entitlements; previously minor: G-01: the Playback Engine shows the current device choice after a command changes it, and a buffer size the driver does not take is reported; previously trivial: G-04: Number of Loops accepts up to 1,000; crossfade remains open; previously minor: G-06: recording to disk is done (#84, long takes #888); streaming sources remain; previously minor: G-02 shrunk: MIDI input devices work; G-03: strict external-WAV AAF import; previously minor: G-05: plugin editors on Linux/X11; previously trivial: G-09: the pt-BR catalog now covers helper-passed tooltips, the status bar, the remove-session prompt and engine error text; G-08: Frequency Shifter, 28 processors; G-04: volume automation read at every sample, #1354; G-01: `setup.playback_engine` applies the device buffer in the desktop app; G-04: Clip Looping crossfade and loop count) · **Target:** Avid Pro Tools Ultimate 2026.4.1
Every known shortfall, one entry each, ranked by how much it stops a Pro Tools user from doing
real work in SoundCraft. This is the work list: pick from the top. Rows marked **alpha blocker**
@@ -150,11 +150,14 @@ launch #142; Linux #45, #107.
### G-05. Plugin hosting on macOS
- **Missing:** the `com.apple.security.cs.disable-library-validation` entitlement in the signed
build, so hardened runtime refuses third-party VST3 bundles (#153, #149). AU editor views
- **Fixed (pending release):** the `com.apple.security.cs.disable-library-validation` and
`com.apple.security.cs.allow-unsigned-executable-memory` entitlements are now in
`entitlements.plist` and applied to the app and the CLI (#153, #149); verify on a signed build
with `codesign -d --entitlements - SoundCraft.app` and a third-party VST3.
- **Missing:** AU editor views
(`crates/au-host/src/lib.rs` header: "Not hosted yet: Audio Unit editor views"). Embedded CLAP
GUIs on macOS (#485). VST3 and embedded CLAP editors are hosted on Windows and Linux/X11.
- **Estimate:** ≈ 10–15 h (entitlement ≈ 1 h; AU Cocoa views and embedded CLAP on macOS most of it).
- **Estimate:** ≈ 9–14 h (AU Cocoa views and embedded CLAP on macOS).
### G-06. Memory-bound media
@@ -266,6 +269,7 @@ missing. Out of scope unless the owner decides otherwise.
| Date | Change | Summary |
|---|---|---|
| 2026-11-28 | minor | G-05: library-validation and unsigned-executable-memory entitlements for the macOS app and CLI, so signed builds load third-party plugins (#153, #149); G-05 estimate ≈ 9–14 h |
| 2026-11-25 | minor | G-01: the Playback Engine shows the current device choice after a command changes it, and Apply keeps it; a buffer size the driver does not take is reported, with the driver's range (#1757); estimates unchanged |
| 2026-11-23 | trivial | G-04: Clip Looping Number of Loops accepts up to 1,000; crossfade remains open; estimates unchanged |
| 2026-11-14 | minor | G-03: strict external-WAV AAF import with bounded property caching; AAF/OMF export, OMF import and `.ptx` remain; estimates unchanged |
+6 -2
View File
@@ -90,8 +90,12 @@ plugins), and WebAudio in the browser.
the default player. `NSMicrophoneUsageDescription` explains the recording prompt.
- **Signing** goes inside-out with the hardened runtime and a secure timestamp. The executable is
signed first, then the bundle. There's no `--deep` on the final signature. `entitlements.plist`
holds a single exception, `com.apple.security.device.audio-input`, without which the hardened
runtime blocks recording.
holds three exceptions: `com.apple.security.device.audio-input`, without which the hardened
runtime blocks recording; `com.apple.security.cs.disable-library-validation`, without which
`dlopen` refuses every third-party VST3/CLAP/AU bundle (signed by another Team ID); and
`com.apple.security.cs.allow-unsigned-executable-memory`, without which plugin runtimes that
create executable memory without `MAP_JIT` (UADx/PACE) are killed at load. The CLI is signed
with the same entitlements because it hosts plugins too.
- **Notarization:** the app is zipped and sent with `xcrun notarytool submit --wait`, then the
ticket is stapled to the app. The app goes on a DMG (`hdiutil`, with an `Applications` link).
The DMG is signed, notarized and stapled too.
+12 -2
View File
@@ -1,10 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!-- Hardened-runtime entitlements for SoundCraft. The app is pure Rust, loads no unsigned code,
needs no JIT, and is not sandboxed (it opens files by path, from the command line and
<!-- Hardened-runtime entitlements for SoundCraft. The host is Rust, loads third-party plugins,
and is not sandboxed (it opens files by path, from the command line and
drag-and-drop). Add exceptions here only with a reason in a comment. -->
<plist version="1.0">
<dict>
<!-- VST3/CLAP/AU plugins are signed by their own developers (or ad hoc for local builds).
Library validation otherwise rejects these modules in the signed host, even when
discovery succeeds in an unpackaged build. -->
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<!-- Third-party plugin runtimes can create executable memory without MAP_JIT. UADx/PACE
initialisation is killed with CODESIGNING/Invalid Page without this exception; allow-jit
alone does not suffice. Keep executable-page protection and the hardened runtime enabled. -->
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<!-- Recording: the hardened runtime blocks audio input (CoreAudio via cpal) without this,
even after the user grants microphone access (NSMicrophoneUsageDescription). -->
<key>com.apple.security.device.audio-input</key>
+3 -1
View File
@@ -212,7 +212,9 @@ CLI_DIR="$WORK/soundcraft-cli-$VERSION-macos-$ARCH"
mkdir -p "$CLI_DIR"
cp "$WORK/bin/soundcraft-cli" "$CLI_DIR/"
copy_docs "$CLI_DIR"
sign --options runtime "$CLI_DIR/soundcraft-cli"
# The CLI runs the same engine and hosts plugins too, so it needs the same entitlements (the
# plugin exceptions) or third-party plugins fail to load there as well.
sign --options runtime --entitlements "$HERE/entitlements.plist" "$CLI_DIR/soundcraft-cli"
codesign --verify --strict --verbose=2 "$CLI_DIR/soundcraft-cli"
rm -f "$CLI_ZIP"
ditto -c -k --keepParent "$CLI_DIR" "$CLI_ZIP"