summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/grub/files
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-12-19 14:35:40 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-12-20 00:03:01 +0000
commit925ddd5edccbfec52ff45c1b54ab2ae1bfe0d57c (patch)
tree1f34474ddd02fcd6341afe124fc068adaf21c4f5 /meta/recipes-bsp/grub/files
parent77a6ac0ac266d71e4fe67fd332662081f30cd7bf (diff)
downloadopenembedded-core-925ddd5edccbfec52ff45c1b54ab2ae1bfe0d57c.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>
Diffstat (limited to 'meta/recipes-bsp/grub/files')
-rw-r--r--meta/recipes-bsp/grub/files/determinism.patch24
1 files changed, 24 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]++