dda21083ee07

restore Peach release certificate and guard Kepr publication

time
2026-09-11 23:43 UTC · 2 months ago
machine
koh2
agent
camel-stream/auto
session
repair Android release signing
parent
bdfbe81aa8b2
5 files VERSION+1 −1releases/v2.17.35.md+12 −0scripts/kepr-build-apk.sh+8 −2scripts/kepr-build-helpers.sh+12 −0scripts/test-kepr-build-helpers.sh+2 −0
VERSION+1 −1
@@ -1 +1 @@1-2.17.341+2.17.35

view file

releases/v2.17.35.md+12 −0
@@ -0,0 +1,12 @@1+# Peach Android v2.17.352+3+## Fixes4+5+- Restore updates for existing Peach installations by publishing the APKs with the established Peach signing certificate and lineage.6+- Release publication now refuses a temporary or replacement keystore even when the APK and local keystore match each other.7+8+## Verification9+10+- JDK 17 release assembly passed with the established Peach keystore.11+- Kepr publication checks verify the configured certificate and APK signer certificate.12+- The downloaded APKs are verified against the live Kepr checksums after publication.

view file

scripts/kepr-build-apk.sh+8 −2
@@ -111,12 +111,18 @@111111 # aapt2 badging reports no signature at all. Compare the APK's signer112112 # certificate against the configured release keystore's certificate — a build113113 # environment that produced an artifact signed with a different key is exactly114-# the drift that used to reach staging unnoticed.114+# the drift that used to reach staging unnoticed. The configured certificate is115+# also pinned here so a disposable test keystore cannot pass its own comparison116+# and reach Kepr by mistake.115117 RELEASE_KEYSTORE=$(sed -n 's/^peachStoreFile=//p' "$ROOT_DIR/local.properties" | sed -n '1p')116118 RELEASE_STOREPASS=$(sed -n 's/^peachStorePassword=//p' "$ROOT_DIR/local.properties" | sed -n '1p')117119 RELEASE_ALIAS=$(sed -n 's/^peachKeyAlias=//p' "$ROOT_DIR/local.properties" | sed -n '1p')120+RELEASE_CERTIFICATE=$(release_certificate_sha256 "$RELEASE_KEYSTORE" "$RELEASE_STOREPASS" "$RELEASE_ALIAS")121+if ! assert_established_release_certificate "$RELEASE_CERTIFICATE"; then122+    exit 1123+fi118124 if ! assert_release_signer_matches \119-    "$(release_certificate_sha256 "$RELEASE_KEYSTORE" "$RELEASE_STOREPASS" "$RELEASE_ALIAS")" \125+    "$RELEASE_CERTIFICATE" \120126     "$(apk_signer_sha256 "$BUILD_TOOLS_DIR/apksigner" "$APK")" \121127     "$APK_NAME"; then122128     exit 1

view file

scripts/kepr-build-helpers.sh+12 −0
@@ -192,6 +192,18 @@192192         tr -d '[:space:]'193193 }194194 195+# The release keystore is a trust anchor, not merely a local build input.196+# Keep the established certificate pinned so a temporary or replacement key197+# cannot pass a self-consistent local comparison and reach existing installs.198+EXPECTED_RELEASE_CERTIFICATE="e10b975178f0bee7fb5a4802519da70ec2988b6ef7d8c9401fbbcff5a1137668"199+assert_established_release_certificate() {200+    actual=$1201+    if [ "$actual" != "$EXPECTED_RELEASE_CERTIFICATE" ]; then202+        echo "refusing to publish: configured keystore is not the established Peach release certificate" >&2203+        return 1204+    fi205+}206+195207 # Arguments: apksigner apk196208 apk_signer_sha256() {197209     apksigner=$1; apk=$2

view file

scripts/test-kepr-build-helpers.sh+2 −0
@@ -119,5 +119,7 @@119119 expect_failure assert_release_signer_matches "$keystore_digest" "$different_digest" "test.apk"120120 expect_failure assert_release_signer_matches "" "$apk_digest" "test.apk"121121 expect_failure assert_release_signer_matches "$keystore_digest" "" "test.apk"122+expect_failure assert_established_release_certificate "$keystore_digest"123+assert_established_release_certificate "e10b975178f0bee7fb5a4802519da70ec2988b6ef7d8c9401fbbcff5a1137668"122124 123125 printf 'PASS: stable tool selection, malformed/ambiguous metadata, semantic-version mismatch, and signing-identity gates\n'

view file