threads / patch / 55162

patchgenerate-configlist.sh: Fix determinism issue

Subject: [PATCH] generate-configlist.sh: Fix determinism issue

## tl;dr

One message between Feb 17, 2021 and Feb 17, 2021. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Richard Purdie· Feb 17, 2021, 17:53 UTC · lore

Currently git binaries are not entirely reproducible, at least partly due to config-list.h differing in order depending on the system's locale settings. Under different locales, the entries:

​"sendemail.​identity",​ "sendemail.​<identity>.​*",​

would differ in order for example and this leads to differences in  the debug symbols for the binaries.

This can be fixed by specifying the C locale for the sort in the shell script generating the header.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Show changes to diff +1 −1
Index: git-2.30.0/generate-configlist.sh
===================================================================
--- git-2.30.0.orig/generate-configlist.sh
+++ git-2.30.0/generate-configlist.sh
@@ -9,7 +9,7 @@ static const char *config_name_list[] =
 EOF
 	grep -h '^[a-zA-Z].*\..*::$' Documentation/*config.txt Documentation/config/*.txt |
 	sed '/deprecated/d; s/::$//; s/,  */\n/g' |
-	sort |
+	LC_ALL=C sort |
 	sed 's/^.*$/	"&",/'
 	cat <<EOF
 	NULL,

← back to recent threads