Skip to contentSkip to conversation

gtk+3: sort resources for reproducible binaries

PATCH Superseded Ross Burton 1 participant 1 message Feb 5, 2020

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gtk+3: sort resources for reproducible binaries

From: Ross Burton <[email protected]>

The list of resources is gathered with $(wildcard) in Make, which isn't sorted. If this order changes then the generated libraries will differ.

---
 .../gtk+/gtk+3/sort-resources.patch           | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 meta/recipes-gnome/gtk+/gtk+3/sort-resources.patch
meta/recipes-gnome/gtk+/gtk+3/sort-resources.patch new file +19 -0
new file mode 100644
index 00000000000..7f87372c52d
@@ -0,0 +1,19 @@
+If the resources file isn't sorted in some way then libgdk.so will differ
+depending on the inode order of the resource files.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <[email protected]>
+
+diff --git a/gdk/Makefile.am b/gdk/Makefile.am
+index e25b57ba50..26f2d57c6e 100644
+--- a/gdk/Makefile.am
++++ b/gdk/Makefile.am
+@@ -465,7 +465,7 @@ stamp-gc-h: $(top_builddir)/config.status
+ # Resources
+ #
+ 
+-glsl_sources := $(wildcard $(srcdir)/resources/glsl/*.glsl)
++glsl_sources := $(sort $(wildcard $(srcdir)/resources/glsl/*.glsl))
+ 
+ gdk.gresource.xml: Makefile.am
+ 	$(AM_V_GEN) echo "<?xml version='1.0' encoding='UTF-8'?>" > $@; \
Signature · 1 line
2.20.1