From 6ca0cfb3fd82d34a14e0aaf1f13b6493d32a1fda Mon Sep 17 00:00:00 2001 From: Marc Mandel Date: Wed, 15 Jul 2026 22:38:26 -0400 Subject: [PATCH] fix: don't demand notarization-skip override for App Store builds final_validation() required MARCUT_ALLOW_NOTARIZATION_SKIP=1 whenever SKIP_NOTARIZATION was true, but main() unconditionally forces SKIP_NOTARIZATION=true for any non-Developer-ID (App Store) signing identity, since App Store builds are structurally exempt from notarization. Running build_appstore_release.sh standalone for an App Store archive -- the documented way to build one -- always failed at the final self-check, even though the archive/DMG/entitlements were all correct. Track the App-Store-identity case with its own flag so the override is only demanded for an actual unsafe direct-distribution skip. --- scripts/sh/build_appstore_release.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/sh/build_appstore_release.sh b/scripts/sh/build_appstore_release.sh index 17c5f74..51cb2c4 100755 --- a/scripts/sh/build_appstore_release.sh +++ b/scripts/sh/build_appstore_release.sh @@ -1730,7 +1730,12 @@ final_validation() { hdiutil verify "${FINAL_DMG}" if [ "${SKIP_NOTARIZATION:-false}" = "true" ]; then - if [ "${MARCUT_ALLOW_NOTARIZATION_SKIP:-}" = "1" ]; then + if [ "${APPSTORE_IDENTITY_DETECTED:-false}" = "true" ]; then + # App Store builds are structurally exempt from notarization (App + # Review substitutes for it), so this isn't the unsafe skip the + # override below guards against -- don't demand it here. + log_warning "Notarization validation skipped (App Store identity; notarization is not applicable for App Store submissions)" + elif [ "${MARCUT_ALLOW_NOTARIZATION_SKIP:-}" = "1" ]; then log_warning "Notarization validation skipped (SKIP_NOTARIZATION=true; MARCUT_ALLOW_NOTARIZATION_SKIP=1)" else log_error "Refusing to skip notarization validation without MARCUT_ALLOW_NOTARIZATION_SKIP=1" @@ -1770,6 +1775,7 @@ clean_app_logs() { main() { # Parse command line arguments SKIP_NOTARIZATION=false + APPSTORE_IDENTITY_DETECTED=false for arg in "$@"; do case $arg in --skip-notarization) @@ -1817,6 +1823,11 @@ main() { log_warning "Skipping notarization for App Store identity." log_warning "Use scripts/sh/build_devid_release.sh for direct distribution." SKIP_NOTARIZATION=true + # Distinguishes this structural, App-Store-exempt skip from an + # explicit/unsafe direct-distribution skip, so final_validation + # doesn't demand MARCUT_ALLOW_NOTARIZATION_SKIP=1 for a build + # that was never notarization-eligible in the first place. + APPSTORE_IDENTITY_DETECTED=true fi fi