|
16 | 16 | cat > "$tmp/bin/codesign" <<'EOF' |
17 | 17 | #!/usr/bin/env bash |
18 | 18 | set -euo pipefail |
| 19 | +printf 'codesign-home %s\n' "$HOME" >> "$RELEASE_TEST_LOG" |
19 | 20 | printf 'codesign %s\n' "$*" >> "$RELEASE_TEST_LOG" |
20 | 21 | if [[ " $* " == *' --display '* ]]; then |
21 | 22 | { |
|
61 | 62 | cat > "$tmp/bin/xcrun" <<'EOF' |
62 | 63 | #!/usr/bin/env bash |
63 | 64 | set -euo pipefail |
| 65 | +printf 'xcrun-home %s\n' "$HOME" >> "$RELEASE_TEST_LOG" |
64 | 66 | printf 'xcrun %s\n' "$*" >> "$RELEASE_TEST_LOG" |
65 | 67 | [[ "${MOCK_NOTARY_REJECT:-0}" != 1 ]] || exit 1 |
66 | 68 | printf '{"id":"12345678-1234-1234-1234-123456789abc","status":"%s"}\n' "${MOCK_NOTARY_STATUS:-Accepted}" |
@@ -111,6 +113,8 @@ export GOG_OFFICIAL_RELEASE=1 |
111 | 113 | export CODESIGN_IDENTITY='Developer ID Application: OpenClaw Foundation (FWJYW4S8P8)' |
112 | 114 | export CODESIGN_KEYCHAIN=/tmp/foundation-release.keychain-db |
113 | 115 | export MAC_RELEASE_CODESIGN_KEYCHAIN=$CODESIGN_KEYCHAIN |
| 116 | +mkdir -p "$tmp/isolated-home" |
| 117 | +export HOME="$tmp/isolated-home" |
114 | 118 |
|
115 | 119 | reset_binary |
116 | 120 | unset NOTARYTOOL_KEYCHAIN_PROFILE |
@@ -187,6 +191,13 @@ grep -Fq -- '--timestamp --options runtime --identifier com.steipete.gogcli.gog' |
187 | 191 | grep -Fq -- '--keychain /tmp/foundation-release.keychain-db --sign Developer ID Application: OpenClaw Foundation (FWJYW4S8P8)' "$log" |
188 | 192 | grep -Fq -- 'notarytool submit' "$log" |
189 | 193 | grep -Fq -- '--keychain-profile test-profile --no-s3-acceleration --wait --output-format json' "$log" |
| 194 | +expected_release_home=$(/usr/bin/dscl . -read "/Users/$(/usr/bin/id -un)" NFSHomeDirectory | /usr/bin/sed 's/^NFSHomeDirectory: //') |
| 195 | +grep -Fq "codesign-home $expected_release_home" "$log" |
| 196 | +grep -Fq "xcrun-home $expected_release_home" "$log" |
| 197 | +if grep -Fq "$tmp/isolated-home" "$log"; then |
| 198 | + echo "codesign test: Apple security tools retained the isolated build HOME" >&2 |
| 199 | + exit 1 |
| 200 | +fi |
190 | 201 | grep -Fq -- '--verify --strict -R=identifier "com.steipete.gogcli.gog"' "$log" |
191 | 202 | grep -Fq -- 'codesign -d -r-' "$log" |
192 | 203 | grep -Fq -- '--verify --strict --check-notarization -R=notarized' "$log" |
|
0 commit comments