From 5e387cd8af339700362c30b46ebf64c242b58ccd Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Tue, 27 Feb 2024 16:43:58 +0530 Subject: [PATCH] [CI:BUILD] rpm: Use $SOURCE_DATE_EPOCH instead of the current date MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 This is a copy-paste of commit a87dd6f50 in podman fedora dist-git. [NO NEW TESTS NEEDED] Signed-off-by: Lokesh Mandvekar --- rpm/podman.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpm/podman.spec b/rpm/podman.spec index 2f0cc734c3..0d8e781429 100644 --- a/rpm/podman.spec +++ b/rpm/podman.spec @@ -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}"