Don't use optimized GResource processing
authorSimon McVittie <smcv@debian.org>
Mon, 3 Jan 2022 21:45:37 +0000 (21:45 +0000)
committerSimon McVittie <smcv@debian.org>
Mon, 3 Jan 2022 22:14:36 +0000 (22:14 +0000)
This results in use of an executable stack, which we can otherwise avoid.

debian/libgtk-4-1.symbols.in
debian/patches/debian/Stub-out-optimized-GResource-processing.patch [new file with mode: 0644]
debian/patches/series

index 86d820b395e1e18081f7b4ca60591bc108e52dcc..6451c974f90b9d511b6af962e914e71d39aa271b 100644 (file)
@@ -1,8 +1,5 @@
 libgtk-@APIVER@.so.@SONAME@ @SHARED_PKG@ #MINVER#
 * Build-Depends-Package: libgtk-4-dev
- (regex|optional)"^_binary_gtk_gtk_gresource_.*@Base$" @DEB_VERSION_UPSTREAM@
- (regex|optional)"^_gtk_.*_resource@Base$" @DEB_VERSION_UPSTREAM@
- (regex|optional)"^_gtk_resource_.*@Base$" @DEB_VERSION_UPSTREAM@
  gdk_anchor_hints_get_type@Base 4.0.0
  gdk_app_launch_context_get_display@Base 4.0.0
  gdk_app_launch_context_get_type@Base 4.0.0
diff --git a/debian/patches/debian/Stub-out-optimized-GResource-processing.patch b/debian/patches/debian/Stub-out-optimized-GResource-processing.patch
new file mode 100644 (file)
index 0000000..846ef72
--- /dev/null
@@ -0,0 +1,57 @@
+From: Simon McVittie <smcv@debian.org>
+Date: Mon, 3 Jan 2022 21:45:09 +0000
+Subject: Stub out optimized GResource processing
+
+This results in use of an executable stack and some unwanted symbol
+exports, which we can otherwise avoid.
+
+Bug: https://gitlab.gnome.org/GNOME/gtk/-/issues/4598
+Forwarded: no, a better solution will need discussion with upstream
+---
+ demos/gtk-demo/meson.build       | 3 ---
+ demos/widget-factory/meson.build | 3 ---
+ gtk/meson.build                  | 3 ---
+ 3 files changed, 9 deletions(-)
+
+diff --git a/demos/gtk-demo/meson.build b/demos/gtk-demo/meson.build
+index 5b79dfa..d8ef4bd 100644
+--- a/demos/gtk-demo/meson.build
++++ b/demos/gtk-demo/meson.build
+@@ -158,9 +158,6 @@ demos_h = custom_target('gtk4 demo header',
+ objcopy_supports_add_symbol = false
+ objcopy = find_program('objcopy', required : false)
+-if objcopy.found()
+-  objcopy_supports_add_symbol = run_command(objcopy, '--help').stdout().contains('--add-symbol')
+-endif
+ ld = find_program('ld', required : false)
+diff --git a/demos/widget-factory/meson.build b/demos/widget-factory/meson.build
+index 800230b..14bdf15 100644
+--- a/demos/widget-factory/meson.build
++++ b/demos/widget-factory/meson.build
+@@ -2,9 +2,6 @@
+ objcopy_supports_add_symbol = false
+ objcopy = find_program('objcopy', required : false)
+-if objcopy.found()
+-  objcopy_supports_add_symbol = run_command(objcopy, '--help').stdout().contains('--add-symbol')
+-endif
+ ld = find_program('ld', required : false)
+diff --git a/gtk/meson.build b/gtk/meson.build
+index 91aefe1..1897862 100644
+--- a/gtk/meson.build
++++ b/gtk/meson.build
+@@ -866,9 +866,6 @@ endif
+ objcopy_supports_add_symbol = false
+ objcopy = find_program('objcopy', required : false)
+-if objcopy.found()
+-  objcopy_supports_add_symbol = run_command(objcopy, '--help').stdout().contains('--add-symbol')
+-endif
+ ld = find_program('ld', required : false)
index d02e0fdcb1c71894c912a6df19fd62da3f74b3a2..e5e9cd27c2efc3819ba65cf69cbdeb5be6da949d 100644 (file)
@@ -3,3 +3,4 @@ reftests-Allow-minor-differences-to-be-tolerated.patch
 debian/Disable-web-fonts-for-now.patch
 debian/templates-Remove-html5shiv.patch
 debian/Skip-some-known-failing-tests-on-mips-family-architecture.patch
+debian/Stub-out-optimized-GResource-processing.patch