From 520b03cb0a6913ed8bd6f83198c1256b2686e468 Mon Sep 17 00:00:00 2001 From: Paresh More Date: Wed, 5 Feb 2020 14:00:18 +0530 Subject: [PATCH] Fixed notarization issue on Catalina for pgAdmin4 binaries - Revert back binary name pgAdmin 4 to pgAdmin. - Added timestamp, force and developer bundle_id option for codesign binaries, app, and dmg file. --- pkg/mac/build.sh | 4 ---- pkg/mac/codesign-binaries.sh | 5 ++--- pkg/mac/codesign-bundle.sh | 2 +- pkg/mac/codesign-dmg.sh | 2 +- pkg/mac/pgadmin.Info.plist.in | 2 +- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/pkg/mac/build.sh b/pkg/mac/build.sh index fad77a06e..c8b443b70 100755 --- a/pkg/mac/build.sh +++ b/pkg/mac/build.sh @@ -152,10 +152,6 @@ _build_runtime() { make clean ${QMAKE} || { echo qmake failed; exit 1; } make || { echo make failed; exit 1; } - # Hack to pass notarization due to name change between app and binary - if [ -f pgAdmin4.app/Contents/MacOS/pgAdmin4 ]; then - mv pgAdmin4.app/Contents/MacOS/pgAdmin4 "pgAdmin4.app/Contents/MacOS/${APP_NAME}" - fi cp -r pgAdmin4.app "${BUILDROOT}/${APP_BUNDLE_NAME}" } diff --git a/pkg/mac/codesign-binaries.sh b/pkg/mac/codesign-binaries.sh index c4c555417..f73858d2a 100755 --- a/pkg/mac/codesign-binaries.sh +++ b/pkg/mac/codesign-binaries.sh @@ -1,5 +1,4 @@ #!/bin/sh - BUNDLE="$1" if ! test -d "${BUNDLE}" ; then @@ -25,13 +24,13 @@ for i in $(find "${BUNDLE}" -type f) do file "${i}" | grep -E "Mach-O executable|Mach-O 64-bit executable|Mach-O 64-bit bundle" if [ $? -eq 0 ] ; then - codesign --deep --verify --verbose --timestamp --options runtime -i "${DEVELOPER_BUNDLE_ID}" --sign "${DEVELOPER_ID}" "$i" + codesign --deep --force --verify --verbose --timestamp --options runtime -i "${DEVELOPER_BUNDLE_ID}" --sign "${DEVELOPER_ID}" "$i" fi done echo Signing ${BUNDLE} libraries for i in $(find "${BUNDLE}" -type f -name "*.dylib*") do - codesign --deep --verify --verbose --timestamp --options runtime -i "${DEVELOPER_BUNDLE_ID}" --sign "${DEVELOPER_ID}" "$i" + codesign --deep --force --verify --verbose --timestamp --options runtime -i "${DEVELOPER_BUNDLE_ID}" --sign "${DEVELOPER_ID}" "$i" done diff --git a/pkg/mac/codesign-bundle.sh b/pkg/mac/codesign-bundle.sh index dfc128d34..c556ebf07 100755 --- a/pkg/mac/codesign-bundle.sh +++ b/pkg/mac/codesign-bundle.sh @@ -12,7 +12,7 @@ source codesign.conf # Sign the .app echo Signing ${BUNDLE} -codesign --sign "${DEVELOPER_ID}" --timestamp --verbose --deep --force "${BUNDLE}" +codesign --deep --force --verify --verbose --timestamp --options runtime -i "${DEVELOPER_BUNDLE_ID}" --sign "${DEVELOPER_ID}" "${BUNDLE}" # Verify it worked echo Verifying the signature diff --git a/pkg/mac/codesign-dmg.sh b/pkg/mac/codesign-dmg.sh index 5fbd031c4..5aa81b58f 100755 --- a/pkg/mac/codesign-dmg.sh +++ b/pkg/mac/codesign-dmg.sh @@ -16,7 +16,7 @@ SCRIPT_DIR=`pwd` # Sign the .app echo Signing ${DMG_IMAGE} -codesign --sign "${DEVELOPER_ID}" --timestamp --verbose --force "${DMG_IMAGE}" +codesign --deep --force --verify --verbose --timestamp --options runtime -i "${DEVELOPER_BUNDLE_ID}" --sign "${DEVELOPER_ID}" "${DMG_IMAGE}" # Verify it worked echo Verifying the signature diff --git a/pkg/mac/pgadmin.Info.plist.in b/pkg/mac/pgadmin.Info.plist.in index 1aeac6e1e..fb57ac894 100644 --- a/pkg/mac/pgadmin.Info.plist.in +++ b/pkg/mac/pgadmin.Info.plist.in @@ -5,7 +5,7 @@ CFBundleDevelopmentRegion English CFBundleExecutable - pgAdmin 4 + pgAdmin4 CFBundleGetInfoString pgAdmin4 PGADMIN_LONG_VERSION CFBundleIconFile