[CI:BUILD] rpm: Use $SOURCE_DATE_EPOCH instead of the current date

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 <zbyszek@in.waw.pl>

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

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
This commit is contained in:
Lokesh Mandvekar
2024-02-27 16:43:58 +05:30
parent cc7b19279a
commit 5e387cd8af

View File

@ -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}"