From 73f7fc428294ff42cf67fdd27ec19010edd1a26b Mon Sep 17 00:00:00 2001 From: Benjamin Hardy Date: Thu, 9 Jul 2026 14:59:54 +0200 Subject: [PATCH] Fixed build issues --- backend/build_sidecar.sh | 17 ++++++++--------- frontend/src-tauri/entitlements.plist | 16 ++++++++++++++++ frontend/src-tauri/tauri.conf.json | 3 ++- 3 files changed, 26 insertions(+), 10 deletions(-) create mode 100644 frontend/src-tauri/entitlements.plist diff --git a/backend/build_sidecar.sh b/backend/build_sidecar.sh index 92c2abd..ac8c7b8 100755 --- a/backend/build_sidecar.sh +++ b/backend/build_sidecar.sh @@ -11,15 +11,14 @@ PY="${PY:-.venv/bin/python}" "$PY" -m PyInstaller --noconfirm --clean konduktor-sidecar.spec echo "Built: $ROOT/dist/konduktor-sidecar" -# macOS: ad-hoc sign the sidecar so the app can spawn it. On Apple Silicon the -# OS kills unsigned executables on exec, and a signed .app (see tauri.conf.json -# bundle.macOS.signingIdentity "-") isn't enough on its own — the nested sidecar -# must be signed too. Ad-hoc (`-s -`) needs no cert/keychain; --force re-signs -# cleanly even if Tauri signs it again during bundling. -if [ "$(uname)" = "Darwin" ] && command -v codesign >/dev/null 2>&1; then - codesign --force -s - "$ROOT/dist/konduktor-sidecar" - echo "Ad-hoc signed: $ROOT/dist/konduktor-sidecar" -fi +# NOTE: do NOT re-codesign this binary. PyInstaller already ad-hoc signs the +# one-file bootloader AND its packed libraries (Python.framework, etc.) with a +# matching identity. Re-signing only the outer bootloader (e.g. `codesign -s -`) +# desyncs the Team IDs, so at runtime dlopen of the extracted Python framework +# fails with "different Team IDs" and the sidecar dies on launch (which makes +# the Tauri app panic: "backend sidecar did not report a port"). The app bundle +# is ad-hoc signed separately via tauri.conf.json `bundle.macOS.signingIdentity`, +# which seals this binary without re-signing it. # Stage for Tauri: the sidecar must be named with the host target triple so the # shell plugin can resolve it in both dev and bundle. (rustc must be on PATH.) diff --git a/frontend/src-tauri/entitlements.plist b/frontend/src-tauri/entitlements.plist new file mode 100644 index 0000000..7cfb3e4 --- /dev/null +++ b/frontend/src-tauri/entitlements.plist @@ -0,0 +1,16 @@ + + + + + + com.apple.security.cs.disable-library-validation + + + diff --git a/frontend/src-tauri/tauri.conf.json b/frontend/src-tauri/tauri.conf.json index 4d0f4ee..cb8b1e0 100644 --- a/frontend/src-tauri/tauri.conf.json +++ b/frontend/src-tauri/tauri.conf.json @@ -28,7 +28,8 @@ "icons/icon.ico" ], "macOS": { - "signingIdentity": "-" + "signingIdentity": "-", + "entitlements": "entitlements.plist" }, "android": { "debugApplicationIdSuffix": ".debug"