[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openembedded-core
Subject:    [OE-core] [PATCH] grub: Further reproducibility fix
From:       "Richard Purdie" <richard.purdie () linuxfoundation ! org>
Date:       2020-12-31 17:15:25
Message-ID: 20201231171525.257958-1-richard.purdie () linuxfoundation ! org
[Download RAW message or body]

Content-Transfer-Encoding: 8bit

Fix the ordering in the generated unidata.c file to aid reproducibility.

[YOCTO #14167]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/recipes-bsp/grub/files/determinism.patch | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/meta/recipes-bsp/grub/files/determinism.patch \
b/meta/recipes-bsp/grub/files/determinism.patch index fac80e7b544..3c1f562c717 100644
--- a/meta/recipes-bsp/grub/files/determinism.patch
+++ b/meta/recipes-bsp/grub/files/determinism.patch
@@ -8,6 +8,9 @@ Also, the output of the SOURCES lines in grub-core/Makefile.core.am, \
generated  from grub-core/Makefile.core.def with gentpl.py is not deterministic due \
to  missing sorting of the list used to generate it. Add such a sort.
 
+Also ensure the generated unidata.c file is deterministic by sorting the
+keys of the dict.
+
 Upstream-Status: Pending
 Richard Purdie <richard.purdie@linuxfoundation.org>
 
@@ -38,3 +41,16 @@ Index: grub-2.04/gentpl.py
      return ''.join(r)
  
  def platform_conditional(platform, closure):
+Index: grub-2.04/util/import_unicode.py
+===================================================================
+--- grub-2.04.orig/util/import_unicode.py
++++ grub-2.04/util/import_unicode.py
+@@ -174,7 +174,7 @@ infile.close ()
+ 
+ outfile.write ("struct grub_unicode_arabic_shape grub_unicode_arabic_shapes[] = {\n \
") + 
+-for x in arabicsubst:
++for x in sorted(arabicsubst):
+     try:
+         if arabicsubst[x]['join'] == "DUAL":
+             outfile.write ("{0x%x, 0x%x, 0x%x, 0x%x, 0x%x},\n " % \
(arabicsubst[x][0], arabicsubst[x][1], arabicsubst[x][2], arabicsubst[x][3], \
                arabicsubst[x][4]))
-- 
2.27.0



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#146325): https://lists.openembedded.org/g/openembedded-core/message/146325
Mute This Topic: https://lists.openembedded.org/mt/79339228/4454766
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [openembedded-core@marc.info]
-=-=-=-=-=-=-=-=-=-=-=-



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic