Andrew Geissler | 9b4d8b0 | 2021-02-19 12:26:16 -0600 | [diff] [blame] | 1 | [PATCH] generate-configlist.sh: Fix determinism issue |
| 2 | |
| 3 | Currently git binaries are not entirely reproducible, at least partly |
| 4 | due to config-list.h differing in order depending on the system's |
| 5 | locale settings. Under different locales, the entries: |
| 6 | |
| 7 | "sendemail.identity", |
| 8 | "sendemail.<identity>.*", |
| 9 | |
| 10 | would differ in order for example and this leads to differences in |
| 11 | the debug symbols for the binaries. |
| 12 | |
| 13 | This can be fixed by specifying the C locale for the sort in the |
| 14 | shell script generating the header. |
| 15 | |
| 16 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> |
| 17 | Upstream-Status: Submitted [https://public-inbox.org/git/f029a942dd3d50d85e60bd37d8e454524987842f.camel@linuxfoundation.org/T/#u] |
| 18 | |
| 19 | Index: git-2.30.0/generate-configlist.sh |
| 20 | =================================================================== |
| 21 | --- git-2.30.0.orig/generate-configlist.sh |
| 22 | +++ git-2.30.0/generate-configlist.sh |
| 23 | @@ -9,7 +9,7 @@ static const char *config_name_list[] = |
| 24 | EOF |
| 25 | grep -h '^[a-zA-Z].*\..*::$' Documentation/*config.txt Documentation/config/*.txt | |
| 26 | sed '/deprecated/d; s/::$//; s/, */\n/g' | |
| 27 | - sort | |
| 28 | + LC_ALL=C sort | |
| 29 | sed 's/^.*$/ "&",/' |
| 30 | cat <<EOF |
| 31 | NULL, |