Repository navigation
fix(build): repin proot to 5.1.107.101 in the Termux asset lock - #416
Open
yuga-hashimoto wants to merge 1 commit into
Open
yuga-hashimoto wants to merge 1 commit into
yuga-hashimoto wants to merge 1 commit into
Conversation
Termux removed proot_5.1.107.97_{aarch64,x86_64}.deb from its pool when it
published 5.1.107.101, so a clean build only worked while a lagging mirror
(mirror.iscas.ac.cn) still carried the old files. Repin both architectures.
Lock (refreshed with prepare_android_runtime_assets.py --lock-only, then
checked independently against the GPG-signed Release/Packages index and four
separate download hosts):
aarch64 a28355e9be257e1f87f4e9294b3118470d4fd7a5442fed8b278f4443c83407d7
x86_64 85adb8d0d2e1edc6c56e60c17136adf05e54ce75f69407ec7116a4c5997eaed5
libandroid-shmem 0.7 and libtalloc 2.5.0 are unchanged; the dependency closure
is the same.
The proot row of THIRD_PARTY_NOTICES.md (and its bundled copy) and the mirrored
termux-packages recipe name the shipped version and its source archive, so they
move to 5.1.107.101 too (source SHA-256 a66743f5...017f, equal to the recipe's
TERMUX_PKG_SHA256).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Demonic1594
added a commit
to Demonic1594/and-code
that referenced
this pull request
Oct 31, 2026
Ported from upstream yuga-hashimoto#416. Termux removed proot 5.1.107.97 from its pool, so the asset step failed on every host; both architectures now pin 5.1.107.101, with the notices and the mirrored recipe updated to match. Co-authored-by: Yu-ga <74749461+yuga-hashimoto@users.noreply.github.com>
This branch has not been deployed
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.
Summary
runtime_tools/termux_assets.lock.jsonpinnedproot_5.1.107.97_{aarch64,x86_64}.deb. Termux removed those files from its pool when it published5.1.107.101, so a clean build (no cachedbuild/generated) fails in:app:prepareOpenCodeRuntimeAssetsunless a mirror that still carries the old files answers. This repins proot to5.1.107.101for both architectures.This changes which binary ships in the app: only
usr/bin/prootdiffers (aarch64 254,328 → 259,784 B, x86_64 271,560 → 277,032 B).libexec/proot/loader,loader32,bin/termux-chroot, the man page and the file layout are byte-identical.libandroid-shmem 0.7andlibtalloc 2.5.0are unchanged.Hashes that changed
pool/main/p/proot/proot_*_aarch64.deb9a368d879876b1458b03d3936f7b75f94875eca9ece4c5870acf24993648fd94a28355e9be257e1f87f4e9294b3118470d4fd7a5442fed8b278f4443c83407d7pool/main/p/proot/proot_*_x86_64.debbd1795306f42d2d0e0ea73930f942744f77dfdfabcb6514ba52e5531f415b3ea85adb8d0d2e1edc6c56e60c17136adf05e54ce75f69407ec7116a4c5997eaed5Also changed (they name the shipped proot version and its source, so they would otherwise be wrong):
v5.1.107.x.zipSHA-256 (THIRD_PARTY_NOTICES.md+ bundledoss_licenses.md)badd014e6868c0d57b5eae6db08afc284b77f85990c71665d1659e121482df26a66743f50c7b0bac1913b83bf55e139d679c80a0ca2808eec76432a65640017fruntime_tools/termux-packaging-recipes/proot.build.shd6a36549b20eadb7723015eb3423e753ea125567, identical totermux-packagesmastere9f81a4ccf3e48e218c7b57ff5739f56537783f9on 2026-10-31); body is byte-identical to upstreamWhere each new value came from
The lock was written with the repo's own
python3 scripts/prepare_android_runtime_assets.py --lock-only. That path takes the first mirror that answers and does not check any signature, so each value was re-derived independently:Release/Release.gpg/InReleasefrompackages.termux.dev,mirror.rinarin.devandftp.fau.deverified withgpgvagainst the Termux keyring files fetched fromgithub.com/termux/termux-packages(packages/termux-keyring/*.gpg), not from the mirrors. Signer: "Termux Releases (Termux automatic builds)", fingerprintCC72CF8BA7DBFA0182877D045A897D96E57CF20C.Packagesindex of each architecture hashes to exactly what that signedReleasedeclares, and lists proot5.1.107.101with the sha256 values above andDepends: libandroid-shmem, libtalloc..debfiles were downloaded separately from four hosts (packages.termux.dev,packages-cf.termux.dev,mirror.rinarin.dev,ftp.fau.de); all four hash to the table values. The control file inside each.debalso saysDepends: libandroid-shmem, libtalloc.github.com/termux/proot/archive/v5.1.107.101.ziphashes toa66743f5…017f, equal toTERMUX_PKG_SHA256in the upstream recipe.What I found when probing the old lock (differs from the report that prompted this)
I tried every locked file on every mirror in
TERMUX_MAIN_FALLBACK_BASE_URLS:libandroid-shmemandlibtalloc: still download and match on every mirror that carries them. Nothing to change.proot 5.1.107.97: 404 onpackages.termux.dev,packages-cf,librehat,rinarinandfau.mirror.iscas.ac.cnstill serves it with a matching hash (its snapshot is from 2026-10-18), soprepare_android_runtime_assets.pyrun against the old lock from a clean directory exits 0 on my machine today. So the old lock was not unbuildable everywhere; it depended on one lagging third-party mirror and breaks as soon as that mirror is unreachable or catches up. The new files are available on four mirrors that carry the full set (packages.termux.dev,packages-cf.termux.dev,mirror.rinarin.dev,ftp.fau.de);iscasdoes not have them yet.grimler.seanswers 200 with a ~3 KB non-deb body for every path; the script rejects it by hash. Pre-existing, left alone.Test plan
python3 scripts/prepare_android_runtime_assets.py --output-dir <empty dir>with the new lock: exit 0; generated manifests differ from the old lock's only in the proot filename/version/sha256; onlyprefix/bin/prootdiffers in the extracted tree../gradlew :app:testGithubDebugUnitTestin a fresh worktree without-x :app:prepareOpenCodeRuntimeAssets -x :app:prepareOpenCodeRuntimeNativeLibs: both asset tasks executed,BUILD SUCCESSFUL, 1670 tests, 0 failures, 0 errors, 8 skipped../gradlew detekt spotlessCheck:BUILD SUCCESSFUL(no Kotlin changed).sha256is 64 hex, filenames match name/version/arch, everydependsentry is present in the same architecture's lock.runtime_tools/**also triggersnative-source-libs.yml; the runtime cache key hashes the lock, so this PR starts from a cold asset cache and exercises the real download path).Not done / follow-ups
.98 → .99 → .100 → .101between 2026-10-19 and 2026-10-24 and drops the previous pool file each time, so this lock will go stale again within days to weeks. Worth considering the already-supportedpackage_archivepin (a stored zip of the locked debs that the script tries first, falling back to the mirrors;--build-package-archivecreates it) so the build does not depend on Termux keeping old files. Not changed here.--lock-onlydoes not verify the repository signature. Not changed here.termux-packagescommit, and nothing reads the mirrored recipe at build time.Pre-PR review
Per
AGENTS.mdthe pre-PR review was run with thepre-pr-reviewskill. Therepo-revieweragent is defined for OpenCode only (.opencode/agents/repo-reviewer.md), so the review was done by a read-only Claude Codecode-reviewersubagent that was given that file as its role and told to follow it exactly (no edits, no network, same read-only git/ls/rg/grep/cat/wc command set).Pre-PR review
Reviewed commit:
29c91174(the only commit on this branch).判定: APPROVE
ブロッカー
なし
提案(非ブロッキング)
runtime_tools/termux_assets.lock.json— proot のピンは今回で .94 → .96 → .97 → .101 と何度も陳腐化しています(git logで確認)。原因は Termux が pool から古い .deb を消すことです。scripts/prepare_android_runtime_assets.pyには、ロックのpackage_archive(url と sha256)で固定 ZIP から取る仕組みと--build-package-archiveがあります(167〜217行、601〜603行)。しかし現在のロックにはpackage_archiveキーが無く、リポジトリ内のどこからも使われていません。今回の PR のスコープ外なので、再発防止のフォローアップ課題として検討する価値があります。--lock-only(build_lock_payload)は署名検証なしで最初に応答したミラーを信用します。作者ノートにある GPG 署名付き Release での独立検証は有益です。ただし手順がリポジトリ内のどこにも文書化されていません。今後の再ピン用にdocs/へ短く書いておくと役立ちます(任意)。proot.build.shのヘッダコメントでは、「Mirrored here (rather than only linked) because the upstream」の行が新しく折り返されています。「verbatim」はレシピ本文のことなので実害はなく、差分も最小です。何もする必要はありません。チェック済み項目
以下はすべて、リポジトリ内のファイルと git だけで私が確認した項目です。
使用コマンドについての申告: 指示された許可コマンド(git status/log/diff/show/branch/fetch、ls、rg、grep、cat、wc)以外に、以下を使いました。
python3 -I(ロック JSON を読み込んで構造を検証しただけ)cut、od、tail、sed、cmpいずれも読み取り専用で、ファイルの変更・作成、ネットワーク通信、Gradle やスクリプトの実行はしていません。終了時の
git status --shortは空(ワーキングツリーは clean)です。1. ロックファイルの内部整合性(リポジトリ内で検証済み)
json.dumps(indent=2, sort_keys=True)+"\n"と完全一致することを確認しました。write_lock_fileの出力形式と同一なので、並び順・インデント・末尾改行に余計な差分はありません。git diff --checkも問題なしで、差分内に CR もありません。filename、sha256、versionの 3 項目 × 2 アーキテクチャ(計 6 行)だけです。depends、libandroid-shmem0.7、libtalloc2.5.0 は不変です。filenameの末尾が{name}_{version}_{termux_arch}.debと一致する。versionがfilename内のバージョンと一致する。sha256が 64 桁の小文字 16 進である。dependsの全要素(libandroid-shmem、libtalloc)が同じアーキテクチャ内に存在し、閉包になっている。root_packagesのprootが各アーキテクチャに存在する。a28355e9…07d7、x86_64 は85adb8d0…eed5です。aarch64 の行に x86_64 のハッシュが入る、といった取り違えはありません。termux_archも一致しています(aarch64 の proot が*_aarch64.debで arm64-v8a ブロックに、x86_64 の proot が*_x86_64.debで x86_64 ブロックにある)。9a368d87…、bd179530…)はリポジトリ全体(.gitとbuildを除く)から消えています。2. ロック ↔ ドキュメント ↔ レシピの整合性(リポジトリ内で検証済み)
THIRD_PARTY_NOTICES.mdとapp/src/main/assets/legal/oss_licenses.mdをcmpで比べ、全体がバイト単位で同一です。a66743f50c7b0bac1913b83bf55e139d679c80a0ca2808eec76432a65640017fは、次の 3 ファイルにそれぞれ 1 回ずつ、完全一致で出現します。THIRD_PARTY_NOTICES.mdoss_licenses.mdproot.build.shのTERMUX_PKG_SHA256badd014e…は 3 ファイルとも 0 件です。v5.1.107.101.zip。github.com/termux/proot/archive/v5.1.107.101.zip。TERMUX_PKG_VERSION="5.1.107.101"。TERMUX_PKG_SRCURLはv${TERMUX_PKG_VERSION}.zipで、URL と整合する。5\.1\.107の全リポジトリ grep(.git、build、node_modulesを除く)では、ロック、両ドキュメント、レシピ以外に「5.1.107.9x」の取り残しはありません。残っているのは両ドキュメント 29 行目の「currentlyproot5.1.107.94」だけです。docs/RELEASE.md:177のTermuxPackages@2a342d4b…とbuild_android_runtime_native_debs.sh:28のピン留めコミットからソースビルドされるバージョンを指します。ミラーのロックとは別系統なので、今回変更しなくてよいという認識は妥当です。直前のコミット a4a9038 の「lag the mirror by a few versions」という文言とも矛盾しません。3. 「ミラーしたレシピはビルドで読まれない」(リポジトリ内で検証済み、主張は正しい)
termux-packaging-recipes、proot.build.sh、*.build.shを、.git、build、node_modulesを除く全体で grep しました。ヒットは次の場所だけで、実行時の参照は 1 件もありません。scripts/build_android_runtime_native_debs.shのコメント(ミラーではなく termux-packages を clone して使う)runtime_tools/の実体はtermux_assets.py、ロック、__init__.py、レシピ 3 ファイルです。runtime_toolsを参照するのは次だけです。scripts/prepare_android_runtime_assets.py(termux_assetsと lock を読む)app/build.gradle.kts47〜57行(termux_assets.pyと lock を入力にする).github/workflows/native-source-libs.ymlはruntime_tools/**の変更で PR 時に発火します。そのため今回の PR でも走る見込みです。ただし処理は次の流れです。build_android_runtime_native_debs.sh --setupが、固定コミット2a342d4b…の termux-packages を clone してビルドする。ミラーのレシピは使わない。prepare_android_runtime_assets.py --local-debs-dirで展開する。local_locked_package(220〜239行)は、まずロックのファイル名に完全一致する .deb を探し、無ければ{name}_*_{arch}.debを glob します。今回ファイル名がproot_5.1.107.101_*に変わっても、ビルドされた .94 の .deb が glob で拾われます。ロックの sha256 はこの経路では検証されません。したがってロック変更がこのジョブに影響を与える余地はなく、結果は変わらないはずです(実行はしていません)。package_archiveキーは無く、locked_package_archiveはNoneを返します。そのため、ロックの変更が別の経路に波及することもありません。4. キャッシュキー(リポジトリ内で検証済み)
android.ymlの 61行目(lint ジョブ)と 94行目(test-and-build ジョブ)、release.ymlの 55行目は、いずれも次の式で実行時キャッシュのキーを作っています。and-code-runtime-${{ runner.os }}-${{ hashFiles('runtime_tools/termux_assets.lock.json', 'runtime_tools/termux_assets.py', 'scripts/prepare_android_runtime_*.py') }}.github配下にrestore-keysは 1 件もありません。そのためロックが変わればキーが変わり、古い(.97 を展開した)キャッシュは復元されません。今回の変更で自然に無効化されます。release.ymlでは、github フレーバーと fdroid フレーバーが同じジョブ内で同じキャッシュ対象ディレクトリを使います。fdroid 側は-Pandcode.sourceNativeLibs=trueで--local-debs-dir経路に切り替わります。この構造は既存のもので、今回の変更が悪化させる箇所ではありません。5. AGENTS.md とハードルール
fix-termux-lock-stale-prootは、git merge-base HEAD origin/mainとorigin/main(git fetch origin main後)が共にb0be8ad5で一致します。差分は 1 コミットです。ワークツリーは.worktree/配下にあり、scripts/new-worktree.sh方式と整合しています。fix(build): repin proot to 5.1.107.101 in the Termux asset lockは、commitlint.ymlの正規表現に合致します。app/src/main/assets/legal/oss_licenses.mdを変更した件は、ルートのTHIRD_PARTY_NOTICES.mdと同一内容のまま同期されているので問題ありません。アプリに同梱されるオフラインコピーを更新するのは、前例(9a687821)どおりです。作者の主張のうち私が検証できなかったもの(ネットワークが必要)
以下はすべて作者ノート
termux-lock-refresh-evidence.mdの主張で、私は事実として扱っていません。a28355e9…、85adb8d0…)が実際の .deb と一致すること。CC72CF8B…の鍵で GPG 署名されていること。v5.1.107.101.zipの SHA-256 がa66743f5…017fであること。d6a36549…と mastere9f81a4c…で、レシピ本文がミラー内容とバイト単位で一致すること。usr/bin/prootだけであること。私がリポジトリ内で確認できたのは、ロック・ドキュメント・レシピが互いに矛盾なく同じ値を指していることと、書式・構造が妥当なことまでです。実際のハッシュ値の正しさは、PR の CI が .101 の .deb をダウンロードして
verify_sha256を通過するかどうかで最終的に確認されます。Not merged: waiting for an explicit go-ahead from the maintainer because this changes shipped binaries.
🤖 Generated with Claude Code