Attention is currently required from: Maciej Pijanowski.
Hello Maciej Pijanowski,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/69716
to review the following change.
Change subject: util/genbuild_h: Set fixed git hash length ......................................................................
util/genbuild_h: Set fixed git hash length
The commit hash length as produced by the genbuild_h.sh can differ depending on the environment (not really sure whether git version, config, or anything else is the reason here). By focing fixed length, we can improve build reproducibility on different machines, as this information is stored in the binary as the COREBOOT_ORIGIN_GIT_REVISION string.
See below reference on heads issue describing similar problem: https://github.com/osresearch/heads/pull/1228
Signed-off-by: Maciej Pijanowski maciej.pijanowski@3mdeb.com Change-Id: Idf77596e5af7115417a400956678b8aaaf67c3b0 --- M util/genbuild_h/genbuild_h.sh 1 file changed, 22 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/69716/1
diff --git a/util/genbuild_h/genbuild_h.sh b/util/genbuild_h/genbuild_h.sh index 8c72ddf..e7e1a10 100755 --- a/util/genbuild_h/genbuild_h.sh +++ b/util/genbuild_h/genbuild_h.sh @@ -20,8 +20,8 @@
# $1: format string get_git_head_data() { - LANG= git log --no-show-signature -1 --format="format:$1" 2>/dev/null || \ - LANG= git log -1 --format="format:$1" + LANG= git log --no-show-signature -1 --abbrev=10 --format="format:$1" 2>/dev/null || \ + LANG= git log -1 --abbrev=10 --format="format:$1" }
if [ "${BUILD_TIMELESS}" = "1" ]; then