diff options
| -rw-r--r-- | meta/recipes-devtools/git/git.inc | 2 | ||||
| -rw-r--r-- | meta/recipes-devtools/git/git/fixsort.patch | 36 |
2 files changed, 37 insertions, 1 deletions
diff --git a/meta/recipes-devtools/git/git.inc b/meta/recipes-devtools/git/git.inc index 738a429875..2b75bed055 100644 --- a/meta/recipes-devtools/git/git.inc +++ b/meta/recipes-devtools/git/git.inc | |||
| @@ -10,7 +10,7 @@ PROVIDES_append_class-native = " git-replacement-native" | |||
| 10 | SRC_URI = "${KERNELORG_MIRROR}/software/scm/git/git-${PV}.tar.gz;name=tarball \ | 10 | SRC_URI = "${KERNELORG_MIRROR}/software/scm/git/git-${PV}.tar.gz;name=tarball \ |
| 11 | ${KERNELORG_MIRROR}/software/scm/git/git-manpages-${PV}.tar.gz;name=manpages \ | 11 | ${KERNELORG_MIRROR}/software/scm/git/git-manpages-${PV}.tar.gz;name=manpages \ |
| 12 | file://CVE-2021-21300.patch \ | 12 | file://CVE-2021-21300.patch \ |
| 13 | " | 13 | file://fixsort.patch" |
| 14 | 14 | ||
| 15 | S = "${WORKDIR}/git-${PV}" | 15 | S = "${WORKDIR}/git-${PV}" |
| 16 | 16 | ||
diff --git a/meta/recipes-devtools/git/git/fixsort.patch b/meta/recipes-devtools/git/git/fixsort.patch new file mode 100644 index 0000000000..eec1f84945 --- /dev/null +++ b/meta/recipes-devtools/git/git/fixsort.patch | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | [PATCH] generate-cmdlist.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 | Note: This is a backport of Richard Purdie's original patch for a more | ||
| 17 | recent version of git. The offending code in this older version is | ||
| 18 | in generate-cmdlist.sh. The upstream current version has this code | ||
| 19 | in generate-configlist.sh. | ||
| 20 | |||
| 21 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
| 22 | Signed-off-by: Steve Sakoman <steve@sakoman.com> | ||
| 23 | Upstream-Status: Submitted [https://public-inbox.org/git/f029a942dd3d50d85e60bd37d8e454524987842f.camel@linuxfoundation.org/T/#u] | ||
| 24 | |||
| 25 | index 71158f7..c137091 100755 | ||
| 26 | --- a/generate-cmdlist.sh | ||
| 27 | +++ b/generate-cmdlist.sh | ||
| 28 | @@ -82,7 +82,7 @@ static const char *config_name_list[] = { | ||
| 29 | EOF | ||
| 30 | grep -h '^[a-zA-Z].*\..*::$' Documentation/*config.txt Documentation/config/*.txt | | ||
| 31 | sed '/deprecated/d; s/::$//; s/, */\n/g' | | ||
| 32 | - sort | | ||
| 33 | + LC_ALL=C sort | | ||
| 34 | while read line | ||
| 35 | do | ||
| 36 | echo " \"$line\"," | ||
