diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2019-04-12 12:25:44 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2019-04-12 14:11:39 +0200 |
commit | 1bc05252f7cf93820d2815463a1f5adfc918f4c3 (patch) | |
tree | 70f69206a2bbd579af80e52fe446a734b1cb9bf4 /config | |
parent | 23fb0950ad1e7d31918a130d92e53f32e4edb713 (diff) | |
download | ptxdist-1bc05252f7cf93820d2815463a1f5adfc918f4c3.tar.gz ptxdist-1bc05252f7cf93820d2815463a1f5adfc918f4c3.tar.xz |
ptxconfig: make reproducible builds configurable
Some PTXdist packages use SOURCE_DATE_EPOCH to make the build more
reproducible. Make this behaviour more configurable via a newly
introduced ptxdist options. And make it possible to disable the stable
SOURCE_DATE_EPOCH via 'ptxdist setup'.
By default, this will set SOURCE_DATE_EPOCH to the year and month of the
PTXdist version. Using the toolchain version and a custom value is also
possible.
Move setting SOURCE_DATE_EPOCH to the scripts that are evaluated just
before make is called. This way, the toolchain setup and validation already
happened. Otherwise ptxd_timestamp_toolchain() may fail early before the
relevant checks and errors.
Based on a patch from Florian Bäuerle <florian.baeuerle@allegion.com>
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'config')
-rw-r--r-- | config/setup/Kconfig | 13 | ||||
-rw-r--r-- | config/setup/ptxdistrc.default | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/config/setup/Kconfig b/config/setup/Kconfig index cd0036548..dc57254c7 100644 --- a/config/setup/Kconfig +++ b/config/setup/Kconfig @@ -250,6 +250,19 @@ config SETUP_DISABLE_LOCAL_CHECK may fail under certain circumstances. Disable this check at your own risk. +config SETUP_DISABLE_REPRODUCIBLE + bool + prompt "disable reproducible builds" + help + PTXdist tries to make building as reproducible as possible. + This includes fixed user names and especially timestamps by + setting SOURCE_DATE_EPOCH and similar variables. + + This can be confusing during development. E.g. The Linux kernel + build timestamp never changes and cannot be used to ensure that + the correct kernel image is used. + Enable this option to get a new timestamp for every PTXdist call. + config SETUP_ENV_WHITELIST string "environment variable whitelist (space separated)" help diff --git a/config/setup/ptxdistrc.default b/config/setup/ptxdistrc.default index 0e6bf55ae..b4ed5a64e 100644 --- a/config/setup/ptxdistrc.default +++ b/config/setup/ptxdistrc.default @@ -56,6 +56,7 @@ PTXCONF_SETUP_JAVA_SDK="/usr/lib/jvm/default-java" # Developer Options # # PTXCONF_SETUP_DISABLE_LOCAL_CHECK is not set +# PTXCONF_SETUP_DISABLE_REPRODUCIBLE is not set PTXCONF_SETUP_ENV_WHITELIST="" # PTXCONF_SETUP_COMMON_CACHE is not set # PTXCONF_SETUP_GEN_DEP_TREE is not set |