Skip to content

Commit 2d4771e

Browse files
committed
chore: reproducible builds
* use new bldr version with SOURCE_DATE_EPOCH * fix reproducibility issues in `meson` and `openssl` * bump toolchain to the latest reproducible 0.5.0 Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
1 parent 8197edb commit 2d4771e

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ SHA ?= $(shell git describe --match=none --always --abbrev=8 --dirty)
44
TAG ?= $(shell git describe --tag --always --dirty)
55
BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
66
REGISTRY_AND_USERNAME := $(REGISTRY)/$(USERNAME)
7+
SOURCE_DATE_EPOCH ?= $(shell git log -1 --pretty=%ct)
78

89
# Sync bldr image with Pkgfile
910
BLDR ?= docker run --rm --volume $(PWD):/tools --entrypoint=/bldr \
@@ -17,6 +18,7 @@ DEST ?= _out
1718
COMMON_ARGS := --file=Pkgfile
1819
COMMON_ARGS += --progress=$(PROGRESS)
1920
COMMON_ARGS += --platform=$(PLATFORM)
21+
COMMON_ARGS += --build-arg=SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH)
2022

2123
TARGETS = tools
2224

Pkgfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# syntax = ghcr.io/talos-systems/bldr:v0.2.0-alpha.5-frontend
1+
# syntax = ghcr.io/talos-systems/bldr:v0.2.0-alpha.7-frontend
22

33
# Sync bldr image with Makefile
44

55
format: v1alpha2
66

77
vars:
8-
TOOLCHAIN_IMAGE: ghcr.io/talos-systems/toolchain:v0.4.0
8+
TOOLCHAIN_IMAGE: ghcr.io/talos-systems/toolchain:v0.5.0
99

1010
labels:
1111
org.opencontainers.image.source: https://github.com/talos-systems/tools

meson/pkg.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ steps:
2020
install:
2121
- |
2222
python3 setup.py install --prefix=/toolchain --root="/rootfs"
23+
24+
# Determinism: remove all bytecode
25+
find /rootfs -type d -name __pycache__ -print0 | xargs -0 -I {} rm -rf "{}"
2326
finalize:
2427
- from: /rootfs
2528
to: /

openssl/pkg.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ steps:
88
destination: openssl.tar.gz
99
sha256: f89199be8b23ca45fc7cb9f1d8d3ee67312318286ad030f5316aca6462db6c96
1010
sha512: ba0ef99b321546c13385966e4a607734df38b96f6ed45c4c67063a5f8d1482986855279797a6920d9f86c2ec31ce3e104dcc62c37328caacdd78aec59aa66156
11+
env:
12+
SOURCE_DATE_EPOCH: "1"
1113
prepare:
1214
- |
1315
mkdir openssl

0 commit comments

Comments
 (0)