public inbox for buildroot@busybox.net
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] pkg-generic: suppress SOURCE_DATE_EPOCH warning in step_time
@ 2026-03-19 10:42 Nathan Bloch
  2026-04-07 18:42 ` Arnout Vandecappelle via buildroot
  0 siblings, 1 reply; 4+ messages in thread
From: Nathan Bloch @ 2026-03-19 10:42 UTC (permalink / raw)
  To: buildroot; +Cc: Nathan Bloch

From: Nathan Bloch <nblochn@gmail.com>

The step_time hook calls date +%s.%N to measure build step elapsed time.
When SOURCE_DATE_EPOCH is set (for reproducible builds), GNU coreutils date
emits "Warning: using $SOURCE_DATE_EPOCH instead of true time" for every
call — twice per step, across all packages, resulting in hundreds of noisy
log lines.

Unset SOURCE_DATE_EPOCH inline for these timing-only calls, since they
measure real elapsed time and do not affect build reproducibility.

Signed-off-by: Nathan Bloch <nblochn@gmail.com>
---
 package/pkg-generic.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index a2749320..e4bf6def 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -50,7 +50,7 @@ endef
 # Time steps
 define step_time
 	printf "%s:%-5.5s:%-20.20s: %s\n"           \
-	       "$$(date +%s.%N)" "$(1)" "$(2)" "$(3)"  \
+	       "$$(SOURCE_DATE_EPOCH= date +%s.%N)" "$(1)" "$(2)" "$(3)"  \
 	       >>"$(BUILD_DIR)/build-time.log"
 endef
 GLOBAL_INSTRUMENTATION_HOOKS += step_time
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-04-08  9:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-19 10:42 [Buildroot] [PATCH] pkg-generic: suppress SOURCE_DATE_EPOCH warning in step_time Nathan Bloch
2026-04-07 18:42 ` Arnout Vandecappelle via buildroot
2026-04-08  9:29   ` Nicolas Cavallari
2026-04-08  9:57     ` Arnout Vandecappelle via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox