macvim-dev / macvim-dev/macvim
Epic: Support reproducible builds
还没有人认领这个 Issue。
- 主要语言
- Vim Script
- 星标
- 7.9k
- 派生
- 691
- PR 合并指标
- 30 天内没有已合并 PR
描述
We currently distribute binary releases that people can use to download and install MacVim. We should add reproducible builds so that the binary we release is deterministic and reproducible and can be easily built on a local machine by any third party in an identical fashion.
Some motivations include the fact that supply chain attacks are real and while MacVim is unlikely a high-value target, it's still useful to reduce the likelihood of such problem happening to begin with. Also, with the deprecation of the macos-12 GitHub Action runner we will need to find another way to build the legacy MacVim binaries (either via a custom VM, or another CI service like Circle CI), and it would be nice to have some standard way to compare the generated artifacts and to have trust in the process working.
Note that we distribute signed apps, which is signed by a private key that only the maintainer controls, so it's impossible to have an artifact (MacVim.app) that can be compared bit-by-bit to a local build. We will need to provide a script that could strip the app signature before comparing.
- Use relative paths for debug symbols and reproducible linker flags when building Vim
- Use
SOURCE_DATE_EPOCHto make builds not dependent on date/time. - Add documentation, and refactor build scripts (also necessary when adding another CI system) to make it more easily to build locally with the same flags.
- Add CI output artifacts that contain necessary environment info.
- #1586
- Add user script that could compare two apps by stripping the signature, resign with adhoc signature, and then compare the result binaries. We also need to compare the entitlements.
- CI test to validate reproducible builds.
- Test in older versions of Xcode to make sure didn't break anything.
Related:
- Add support for exporting dSYM files as part of build steps. These contain debug symbols and help diagnose crash issues for users. Make sure to use relative paths as it's necessary for reproducibility. This is a bit annoying to do due to a clang issue llvm/llvm-project#113973.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
该 issue 未指定具体文件或测试;首先查看现有的 build 脚本和 binary-release CI workflow。当本地和 CI 构建使用一致的 flags 和环境数据、可以比较未签名或 ad-hoc-signed 的 app,并且 CI 验证受支持的 build 环境之间的可复现性时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- github-actions, macos, vim
- 领域
- build-system, ci-cd, release
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 20/100