Skip to content

Commit

Permalink
[CI:BUILD] rpm: Use $SOURCE_DATE_EPOCH instead of the current date
Browse files Browse the repository at this point in the history
Use $SOURCE_DATE_EPOCH instead of the current date

Using the current timestamp makes every build slightly different, breaking build
reproducibility.

From: Zbigniew Jędrzejewski-Szmek <[email protected]>

This is a copy-paste of commit a87dd6f50 in podman fedora dist-git.

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <[email protected]>
  • Loading branch information
lsm5 committed Feb 27, 2024
1 parent cc7b192 commit 5e387cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rpm/podman.spec
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ export CGO_CFLAGS+=" -m64 -mtune=generic -fcf-protection=full"

export GOPROXY=direct

LDFLAGS="-X %{ld_libpod}/define.buildInfo=$(date +%s) \
LDFLAGS="-X %{ld_libpod}/define.buildInfo=${SOURCE_DATE_EPOCH:?} \
-X %{ld_libpod}/config._installPrefix=%{_prefix} \
-X %{ld_libpod}/config._etcDir=%{_sysconfdir} \
-X %{ld_project}/pkg/systemd/quadlet._binDir=%{_bindir}"
Expand Down

0 comments on commit 5e387cd

Please sign in to comment.