Skip to content

Commit b856644

Browse files
bones7456claude
andcommitted
Re-sign Sparkle helpers so notarization accepts them
SPM-built Autoupdate, Updater.app, Downloader.xpc and Installer.xpc come without a secure timestamp and aren't signed with our Developer ID, which notarization rejects. Re-sign each helper with hardened runtime + a secure timestamp, then resign the framework and the outer app to restore the enclosing seals. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 9ad6213 commit b856644

1 file changed

Lines changed: 28 additions & 1 deletion

File tree

scripts/package_release.sh

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,34 @@ rm -rf "$STAGE_DIR"
6464
mkdir -p "$STAGE_DIR"
6565
ditto "$BUILT_APP" "$APP_DIR"
6666

67-
# build_app.sh already signed the app with hardened runtime + entitlements.
67+
# Sparkle's SPM-built helpers ship without our Developer ID + secure
68+
# timestamp, which notarization rejects. Re-sign them and rebuild the
69+
# enclosing seals from innermost outward.
70+
SPARKLE_FRAMEWORK="$APP_DIR/Contents/Frameworks/Sparkle.framework"
71+
if [ -d "$SPARKLE_FRAMEWORK" ]; then
72+
echo "==> Re-signing Sparkle helpers with $SIGNING_IDENTITY"
73+
SPARKLE_VERSION_DIR="$SPARKLE_FRAMEWORK/Versions/Current"
74+
for helper in \
75+
"$SPARKLE_VERSION_DIR/XPCServices/Installer.xpc" \
76+
"$SPARKLE_VERSION_DIR/XPCServices/Downloader.xpc" \
77+
"$SPARKLE_VERSION_DIR/Updater.app" \
78+
"$SPARKLE_VERSION_DIR/Autoupdate"; do
79+
if [ -e "$helper" ]; then
80+
codesign --force --options runtime --timestamp \
81+
--sign "$SIGNING_IDENTITY" \
82+
--preserve-metadata=identifier,entitlements,requirements \
83+
"$helper"
84+
fi
85+
done
86+
codesign --force --options runtime --timestamp \
87+
--sign "$SIGNING_IDENTITY" \
88+
"$SPARKLE_FRAMEWORK"
89+
codesign --force --options runtime --timestamp \
90+
--sign "$SIGNING_IDENTITY" \
91+
--entitlements "$ROOT_DIR/Notchy/Notchy.entitlements" \
92+
"$APP_DIR"
93+
fi
94+
6895
codesign --verify --deep --strict --verbose=2 "$APP_DIR"
6996

7097
needs_notarize=1

0 commit comments

Comments
 (0)