Make the preview APK reproducible from its tag

Đang mở
#26 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
android, github-actions, react-native, typescript
Lĩnh vực
build-system, mobile, release

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
TypeScript
Star
11
Fork
0
Merge trung bình
10 phút
Pull request đã merge (30 ngày)
6

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của DojoCodingLabs/hermit

Tất cả issue của DojoCodingLabs/hermit

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.