ci: reproducible builds with SOURCE_DATE_EPOCH

オープン
#716 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 4 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
68/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
git, python

調査の方向性

まず scripts/apache_release.py を読んでリリースビルドの経路を追跡し、既存のビルドドキュメントについて scripts/README.md を確認します。タグ付きコミットの再ビルドに対するカバレッジを追加し、繰り返し生成したアーティファクトのチェックサムが一致することを検証します。完了条件は、ビルド前にタグから SOURCE_DATE_EPOCH が設定され、再現可能性が文書化されていることです。

索引モデルが issue の本文から書いたものです。

説明

area/ci kind/improvement priority/high

Part of #715

Problem

Our build artifacts are not reproducible. Building the same source twice may produce different checksums due to timestamps embedded in the tarball/wheel metadata. This makes voter verification harder and prevents bit-for-bit comparison of locally rebuilt packages against the RC artifacts.

Solution

Set SOURCE_DATE_EPOCH to the timestamp of the tagged commit before building. This ensures all file timestamps inside the archive are deterministic.

Airflow does this in their release tooling and it allows voters to rebuild from source and binary-compare against the SVN artifacts.

Implementation
  • In scripts/apache_release.py, before calling hatch build or python -m build:
    import subprocess
    epoch = subprocess.check_output(["git", "log", "-1", "--format=%ct", tag]).strip()
    os.environ["SOURCE_DATE_EPOCH"] = epoch.decode()
    
  • Document in scripts/README.md that builds are reproducible
  • Add a test that rebuilds from a tagged commit and compares checksums
References
主要言語
Python
スター
2.6k
フォーク
212
平均マージ
5日 14時間
マージ済み PR(30日)
39

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/burr のほかの issue

apache/burr の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。