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.
This commit is contained in:
Paresh More 2020-02-05 14:00:18 +05:30 committed by Akshay Joshi
parent 93e83dddae
commit 520b03cb0a
5 changed files with 5 additions and 10 deletions

View File

@ -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}"
}

View File

@ -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

View File

@ -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

View File

@ -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