Skip to content

Commit

Permalink
[CI:BUILD] rpm: Add fallback for $SOURCE_DATE_EPOCH not being set
Browse files Browse the repository at this point in the history
At least in all recent Fedora releases, SOURCE_DATE_EPOCH would be set. But the
build should work even if it not set, e.g. in copr builds on c8s. Add 'date +%s'
as a fallback.

From: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>

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

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
  • Loading branch information
lsm5 committed Feb 27, 2024
1 parent 5e387cd commit 50a0c51
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=${SOURCE_DATE_EPOCH:?} \
LDFLAGS="-X %{ld_libpod}/define.buildInfo=${SOURCE_DATE_EPOCH:-$(date +%s)} \
-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 50a0c51

Please sign in to comment.