buildman: Disable CONFIG_CMD_CONFIG for reproduceable build
PATCH 1/1 buildman: Disable CONFIG_CMD_CONFIG for reproduceable build
When the ordering of CONFIG options changes, the gzipped CONFIG list can change in size and contents. This makes it hard to compare commits which only different in CONFIG ordering.
Disable this when -r is given, to make this easier. Update the documentation as well.
---
tools/buildman/buildman.rst | 3 ++- tools/buildman/control.py | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-)
tools/buildman/buildman.rst +2 -1
@@ -1021,7 +1021,8 @@ various files to be rebuilt even if no source changes are made, which in turn requires that the final U-Boot binary be re-linked. This unnecessary work can be avoided by turning off the timestamp feature. This can be achieved using the `-r` flag, which enables reproducible builds by setting -`SOURCE_DATE_EPOCH=0` when building. +`SOURCE_DATE_EPOCH=0` when building, as well as disabling `LOCALVERSION_AUTO` +and `CONFIG_CMD_CONFIG`. Combining all of these options together yields the command-line shown below. This will provide the quickest possible feedback regarding the current content
tools/buildman/control.py +4 -0
@@ -575,6 +575,10 @@ def calc_adjust_cfg(adjust_cfg, reproducible_builds): print('Not dropping LOCALVERSION_AUTO for reproducible build') else: adjust_cfg['LOCALVERSION_AUTO'] = '~' + if 'CMD_CONFIG' in adjust_cfg: + print('Not dropping CMD_CONFIG for reproducible build') + else: + adjust_cfg['CMD_CONFIG'] = '~' return adjust_cfg
Signature · 1 line
2.42.0.283.g2d96d420d3-goog
Quoted 8 lines · Simon Glass
When the ordering of CONFIG options changes, the gzipped CONFIG list can change in size and contents. This makes it hard to compare commits which only different in CONFIG ordering.
Disable this when -r is given, to make this easier. Update the documentation as well.
Signed-off-by Simon Glass <[email protected]>
This isn't the right approach. First, thanks for figuring out the slight rodata change that happens when testing some Kconfig rework series. However, this first violates the principal of least surprise as you're turning off part of the build that was on before. Second, it's not the only zlib in the build, and it's often reproducible.
We should have a section somewhere in the docs about tips and tricks for doing Kconfig rework as there's other things too such as not having the baseline commit to compare with be a version tag since everything will grow slightly due to then having a githash appending to it.
Signature · 1 line
Tom