From f9aec6e2984878d779369fa5bb64c0404e81d4de Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Sun, 16 Jul 2023 00:59:55 +0200 Subject: Makefile,genbuild: Provide length for abbreviated commit hashes The original default, minimum abbreviated hash length was 7. It dif- fers on newer systems, however. This breaks reproducibility, so set an explicit length. 12 hex digits should be good enough. Note: This sets only a minimum. With a high enough number of commit objects in the repository, Git could still decide to use a longer hash, again breaking reproducibility. 12 digits will hopefully pro- vide enough margin. Change-Id: Ia86e9cc41e27a0a57d498dcb13aec954c4ea0f04 Signed-off-by: Nico Huber Reviewed-on: https://review.coreboot.org/c/coreboot/+/76560 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- util/genbuild_h/genbuild_h.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util/genbuild_h') diff --git a/util/genbuild_h/genbuild_h.sh b/util/genbuild_h/genbuild_h.sh index b4878c6407..5e2fe7df8f 100755 --- a/util/genbuild_h/genbuild_h.sh +++ b/util/genbuild_h/genbuild_h.sh @@ -23,8 +23,8 @@ fi # $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 --abbrev=12 -1 --format="format:$1" 2>/dev/null || \ + LANG="" git log --abbrev=12 -1 --format="format:$1" } if [ "${BUILD_TIMELESS}" = "1" ]; then -- cgit v1.2.3