diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-12-19 14:35:40 +0000 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2020-12-22 08:09:20 -1000 |
commit | 351651925d854a130cfa2d04d4d3f18caa08c873 (patch) | |
tree | 7c46a5aacb37d8645f9c879195857f167143a93e /meta/recipes-bsp/grub | |
parent | 02870c7fbaaa1c3869ecb439f5c58fcf40a533be (diff) | |
download | openembedded-core-contrib-351651925d854a130cfa2d04d4d3f18caa08c873.tar.gz |
grub: Fix build reproducibility issue
We're seeing reproducibility issue on the autobuilder due to changing
module dependency ordering. Add some sorting to an awk script to fix this.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 925ddd5edccbfec52ff45c1b54ab2ae1bfe0d57c)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/recipes-bsp/grub')
-rw-r--r-- | meta/recipes-bsp/grub/files/determinism.patch | 24 | ||||
-rw-r--r-- | meta/recipes-bsp/grub/grub2.inc | 1 |
2 files changed, 25 insertions, 0 deletions
diff --git a/meta/recipes-bsp/grub/files/determinism.patch b/meta/recipes-bsp/grub/files/determinism.patch new file mode 100644 index 0000000000..c4b1d3a2a8 --- /dev/null +++ b/meta/recipes-bsp/grub/files/determinism.patch @@ -0,0 +1,24 @@ +The output in moddep.lst generated from syminfo.lst using genmoddep.awk is +not deterministic since the order of the dependencies on each line can vary +depending on how awk sorts the values in the array. + +Be deterministic in the output by sorting the dependencies on each line. + +Upstream-Status: Pending +Richard Purdie <richard.purdie@linuxfoundation.org> + +Index: grub-2.04/grub-core/genmoddep.awk +=================================================================== +--- grub-2.04.orig/grub-core/genmoddep.awk ++++ grub-2.04/grub-core/genmoddep.awk +@@ -59,7 +59,9 @@ END { + } + modlist = "" + depcount[mod] = 0 +- for (depmod in uniqmods) { ++ n = asorti(uniqmods, w) ++ for (i = 1; i <= n; i++) { ++ depmod = w[i] + modlist = modlist " " depmod; + inverse_dependencies[depmod] = inverse_dependencies[depmod] " " mod + depcount[mod]++ diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc index 4ec7d0b0fc..2c55852ef0 100644 --- a/meta/recipes-bsp/grub/grub2.inc +++ b/meta/recipes-bsp/grub/grub2.inc @@ -27,6 +27,7 @@ SRC_URI = "${GNU_MIRROR}/grub/grub-${PV}.tar.gz \ file://script-Remove-unused-fields-from-grub_script_functio.patch \ file://CVE-2020-15706-script-Avoid-a-use-after-free-when-redefining-a-func.patch \ file://CVE-2020-15707-linux-Fix-integer-overflows-in-initrd-size-handling.patch \ + file://determinism.patch \ " SRC_URI[md5sum] = "5ce674ca6b2612d8939b9e6abed32934" SRC_URI[sha256sum] = "f10c85ae3e204dbaec39ae22fa3c5e99f0665417e91c2cb49b7e5031658ba6ea" |