Repository navigation
F-Droid 配布 APK のソース照合と再現ビルド検証 / Verify F-Droid release sources and builds - #1295
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #1293
日本語
v1.7.149(versionCode 844)の配布 APK と、タグから再ビルドするソースが異なるため、F-Droid の再現ビルド比較が失敗しています。実際にダウンロードした
app-liteFdroid-release.apkのリビジョンはcb4b8006、Issue の再ビルド側はf9bef456、調査時点の公開タグはb8ce510eでした。三段フリック非公開化に伴う履歴整理後に、タグと配布 APK の対応が崩れています。配布 DEX に存在する
TfbiStickyFlickControllerなどは再ビルド側のソースで削除されており、メタデータだけの差ではありません。比較した両コミットの AI 関連ソースに差分はなく、AI ネイティブランタイムは Full 専用依存で、Lite の配布 APK にはネイティブライブラリがありません。元の障害が Gradle キャッシュ破損によるものかは未確認です。変更
releaseバリアントを署名設定なしでビルドします。releaseUnsignedはBuildConfig.BUILD_TYPEが異なるため使用しません。検証
691e2784のassembleLiteFdroidReleaseが 2 回成功。片方は空の Gradle user home、もう片方は既存の依存キャッシュを使用し、両方ともビルド・設定キャッシュは無効化。両 APK のリビジョン照合も成功。zipalign、検証用キーによる v2 署名、apksigner verify、署名後のリビジョン照合が成功。cmpで完全一致。両方の SHA-256 はf3d1acfebb4e4db6ef903c286472c3d658cdabd2c5a80f61ef7f61a31aefe481。既存の v1.7.149 のタグ・APK・リリースは変更していません。配布 APK とソースを一致させるには、新しいバージョン・versionCode・タグでのリリースが必要です。公開後に手動でタグを移動する操作はこの CI では防げないため、公開済みタグは固定してください。Issue #1293 は open のまま維持します。
変更はリリース設定・検証コード・直接関係するテストの 3 ファイルのみです。APK・ログ・調査用ファイルはコミットに含めていません。
English
F-Droid cannot reproduce v1.7.149 (versionCode 844) because the distributed APK and tagged source refer to different revisions. The downloaded Lite F-Droid APK embeds
cb4b8006; the issue reports a rebuild off9bef456, while the public tag pointed tob8ce510eduring this investigation.The tag/APK relationship diverged after the public-history cleanup associated with retiring three-stage flick input. Classes such as
TfbiStickyFlickControllerremain in the distributed DEX but were removed from the rebuild source, so changing revision metadata alone would not resolve the mismatch. The compared revisions have no AI-source changes, and the AI native runtimes are Full-only dependencies. Corrupted Gradle caches have not been established as the original cause.Changes
releasevariant twice in independent clean checkouts with empty Gradle user homes and both build/configuration caches disabled.releaseUnsigned, which changesBuildConfig.BUILD_TYPE.Validation
691e2784successfully buildassembleLiteFdroidRelease. One uses an empty Gradle user home; the other reuses the dependency cache. Both disable build/configuration caches, and both APK revision checks pass.cmp), both with SHA-256f3d1acfebb4e4db6ef903c286472c3d658cdabd2c5a80f61ef7f61a31aefe481.This PR leaves the existing v1.7.149 tag, APKs, and release untouched. A new version, versionCode, and tag are required to distribute matching source and binaries. CI cannot prevent manual tag movement after publication; published tags must remain fixed. Issue #1293 remains open.
Only release configuration, verification code, and directly related tests are included (3 files). No APKs, logs, or investigation artifacts are committed.
追加修正 / Additional signing verification
--alignment-preserved trueを追加し、署名前の ZIP 整列情報を保持します。apksigcopier==1.1.1で署名済み APK と独立再ビルドした未署名 APK を比較します。通常のapksigner verifyだけでなく、F-Droid の署名コピー方式でも検証します。691e2784の既存検証 APK と独立ビルドを使い、従来の署名では署名コピー比較が失敗し、整列保持を指定した検証鍵での署名では成功することを確認しました。新リリースの成果物と F-Droid 公式サーバー側の結果は未確認です。git diff --checkが成功しています。