Make the preview APK reproducible from its tag

未关闭
#26 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
android, github-actions, react-native, typescript

调研方向

Start with the APK recipe in docs/devices.md and the release workflow in .github/workflows/release-apk.yml; trace how the tag version and workflow run number reach apps/mobile/app.json and the release notes. Build twice from one tag as the recipe describes, then compare the unzipped APK contents while excluding META-INF/. Document each source of differences and whether it was fixed. Done means matching unsigned contents, an automated check, and the recipe on the download page and in release notes.

由索引模型根据 Issue 内容生成。

描述

accepted help wanted

Why

Anyone can build Hermit from the tag a preview APK came from, but the result doesn't match the published APK byte for byte, and nothing checks it. The PRD lists the reproducible APK as open (SL-45 and NFR-15 in docs/prd/hermit-prd.md). A rebuild that matches, apart from the signature, is how people can trust that the APK is the code they read.

What to do

  1. Make the recipe complete. Before it builds, .github/workflows/release-apk.yml writes the version from the tag, and a versionCode equal to the workflow's run number, into apps/mobile/app.json. Put the same step in the recipe in docs/devices.md ("Or build it yourself"), and print the versionCode in the release notes so a rebuild can use it.
  2. Build twice from the same tag, on two machines or two clean clones, following docs/devices.md. Compare the APKs with the signature left out: unzip both and compare every file except META-INF/, or use diffoscope.
  3. Find and remove each source of difference, such as timestamps, file order, absolute paths, the JavaScript bundle or the native builds. List what you find in the pull request, even the parts you couldn't fix.
  4. When two builds match, add a script or a CI job that checks it, and put the recipe in the release notes.

Done when

  • Two builds from the same tag give APKs that match apart from the signature, and a script or a CI job shows it.
  • docs/devices.md and the site's download page say so, and the release notes carry the recipe.

How to check

Build twice as docs/devices.md says, then compare the unzipped APKs without META-INF/.

Keep in mind

  • Compare unsigned contents. Never ask for the preview key, and never commit a keystore or a password.
  • The app gains no network call. Build-time downloads are fine when their versions are pinned.
主要语言
TypeScript
星标
11
派生
0
平均合并
10 分钟
30 天内合并 PR
6

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

DojoCodingLabs/hermit 的其他 Issue

查看 DojoCodingLabs/hermit 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。