From 8f5577c6f78085983ce42f837f896c97a9020fc9 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 17 Feb 2021 17:57:13 +0000 Subject: git: Fix determinism issue (From OE-Core rev: 9ae740939f8315c64fe7571f912404127a29dc89) Signed-off-by: Richard Purdie --- meta/recipes-devtools/git/git.inc | 3 ++- meta/recipes-devtools/git/git/fixsort.patch | 31 +++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-devtools/git/git/fixsort.patch (limited to 'meta/recipes-devtools') diff --git a/meta/recipes-devtools/git/git.inc b/meta/recipes-devtools/git/git.inc index 544e23c844..586a305b27 100644 --- a/meta/recipes-devtools/git/git.inc +++ b/meta/recipes-devtools/git/git.inc @@ -7,7 +7,8 @@ DEPENDS = "openssl curl zlib expat" PROVIDES_append_class-native = " git-replacement-native" SRC_URI = "${KERNELORG_MIRROR}/software/scm/git/git-${PV}.tar.gz;name=tarball \ - ${KERNELORG_MIRROR}/software/scm/git/git-manpages-${PV}.tar.gz;name=manpages" + ${KERNELORG_MIRROR}/software/scm/git/git-manpages-${PV}.tar.gz;name=manpages \ + file://fixsort.patch" S = "${WORKDIR}/git-${PV}" diff --git a/meta/recipes-devtools/git/git/fixsort.patch b/meta/recipes-devtools/git/git/fixsort.patch new file mode 100644 index 0000000000..07a487e8ca --- /dev/null +++ b/meta/recipes-devtools/git/git/fixsort.patch @@ -0,0 +1,31 @@ +[PATCH] generate-configlist.sh: Fix determinism issue + +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..*", + +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 +Upstream-Status: Submitted [https://public-inbox.org/git/f029a942dd3d50d85e60bd37d8e454524987842f.camel@linuxfoundation.org/T/#u] + +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 <