diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-02-17 17:57:13 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-11-03 11:18:56 +0000 |
commit | 2ff0494ae9306deb4f392c007833228219ab6e82 (patch) | |
tree | 77d5d4a39f3c03a70c7e62731f8482e9e0c3ffcc | |
parent | 7de484c47a3af1de1fefc0a326327c90d89cbbe2 (diff) | |
download | poky-2ff0494ae9306deb4f392c007833228219ab6e82.tar.gz |
git: Fix determinism issue
(From OE-Core rev: 3b517d9e05d95c4a2ceb50f4bc07205f1b8f1e14)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 9ae740939f8315c64fe7571f912404127a29dc89)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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\"," | ||