Add patch to make the node editor reproducible
authorSimon McVittie <smcv@debian.org>
Tue, 6 Dec 2022 11:43:45 +0000 (11:43 +0000)
committerSimon McVittie <smcv@debian.org>
Tue, 6 Dec 2022 11:43:45 +0000 (11:43 +0000)
debian/patches/node-editor-Save-test-data-relative-to-current-working-di.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/node-editor-Save-test-data-relative-to-current-working-di.patch b/debian/patches/node-editor-Save-test-data-relative-to-current-working-di.patch
new file mode 100644 (file)
index 0000000..6205944
--- /dev/null
@@ -0,0 +1,31 @@
+From: Simon McVittie <smcv@debian.org>
+Date: Tue, 6 Dec 2022 11:13:59 +0000
+Subject: node-editor: Save test data relative to current working directory
+
+This avoids hard-coding the GTK source directory into the binary, which
+would make the binary non-reproducible across different source paths,
+particularly in a distro build environment where the source directory
+used by autobuilders will often not exist on end-user systems. The node
+editor can still be used to create new test-cases by running it with the
+GTK source directory as its current working directory.
+
+Bug: https://gitlab.gnome.org/GNOME/gtk/-/issues/5403
+Forwarded: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5297
+Signed-off-by: Simon McVittie <smcv@debian.org>
+---
+ demos/node-editor/meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/demos/node-editor/meson.build b/demos/node-editor/meson.build
+index 03489f3..bd0fe05 100644
+--- a/demos/node-editor/meson.build
++++ b/demos/node-editor/meson.build
+@@ -15,7 +15,7 @@ executable('gtk4-node-editor',
+   dependencies: [ libgtk_dep, demo_conf_h ],
+   include_directories: confinc,
+   c_args: [
+-    '-DNODE_EDITOR_SOURCE_DIR="@0@/../../testsuite/gsk/compare/"'.format(meson.current_source_dir())
++    '-DNODE_EDITOR_SOURCE_DIR="testsuite/gsk/compare/"'
+   ] + common_cflags,
+   win_subsystem: 'windows',
+   link_args: extra_demo_ldflags,
index 610fad4394d338b069eb4d2b2ee6b22d17d7e9ce..7dffe6c74ddf86bdac8fd667b55ada517922c435 100644 (file)
@@ -18,3 +18,4 @@ reftest_compare_surfaces-Report-how-much-the-images-diffe.patch
 reftests-Allow-minor-differences-to-be-tolerated.patch
 Disable-inscription-markup.ui-reftest.patch
 debian/Disable-clipboard-test.patch
+node-editor-Save-test-data-relative-to-current-working-di.patch