From 5ca8bfcacb3be58c46965ab52fba72ac6dfb828c Mon Sep 17 00:00:00 2001 From: Andrew Yourtchenko Date: Wed, 18 Oct 2023 21:18:32 +0000 Subject: build: allow for reproducible builds Setting and using the SOURCE_DATE_EPOCH variable takes care of most of the magic necessary. https://reproducible-builds.org/docs/source-date-epoch/ vpp-ext-deps packages after this change is being built with that date set to date of the last modification of the subtree (similar logic to deriving the "number" for the package version) For the rest of the packages, pinning the following three variables should result in bit-identical artifacts across multiple runs: export SOURCE_DATE_EPOCH=$(date +%s) export VPP_BUILD_HOST="buildhost" export VPP_BUILD_USER="builduser" Add a blurb in the docs describing this new functionality. Type: improvement Change-Id: I71b085f0577b2358aa98f01dafd8e392239420a6 Signed-off-by: Andrew Yourtchenko --- build-data/packages/vpp.mk | 3 +++ 1 file changed, 3 insertions(+) (limited to 'build-data') diff --git a/build-data/packages/vpp.mk b/build-data/packages/vpp.mk index 40aa8c79d23..4dd65ecb4fc 100644 --- a/build-data/packages/vpp.mk +++ b/build-data/packages/vpp.mk @@ -33,6 +33,9 @@ endif ifneq ($(VPP_EXCLUDED_PLUGINS),) vpp_cmake_args += -DVPP_EXCLUDED_PLUGINS="$(VPP_EXCLUDED_PLUGINS)" endif +ifneq (${SOURCE_DATE_EPOCH}),) +vpp_cmake_args += -DVPP_SOURCE_DATE_EPOCH="$(SOURCE_DATE_EPOCH)" +endif ifneq ($(VPP_EXTRA_CMAKE_ARGS),) vpp_cmake_args += $(VPP_EXTRA_CMAKE_ARGS) -- cgit 1.2.3-korg