I've done an NMU to DELAYED/5. A debdiff is attached, and the changes
have been pushed to the salsa branch that the aforementioned MR refers
to.

diff -Nru imv-4.3.0/debian/changelog imv-4.3.0/debian/changelog
--- imv-4.3.0/debian/changelog	2021-10-31 17:53:45.000000000 +0100
+++ imv-4.3.0/debian/changelog	2022-04-07 09:15:36.000000000 +0200
@@ -1,3 +1,11 @@
+imv (4.3.0-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * d/patches: add 0002-Fix-segfault-with-latest-wlroots.patch to fix
+    segfault with newer wlroots (Closes: #1006543)
+
+ -- Gard Spreemann <g...@nonempty.org>  Thu, 07 Apr 2022 09:15:36 +0200
+
 imv (4.3.0-1) unstable; urgency=medium
 
   * New upstream version 4.3.0.
diff -Nru imv-4.3.0/debian/patches/0002-Fix-segfault-with-latest-wlroots.patch imv-4.3.0/debian/patches/0002-Fix-segfault-with-latest-wlroots.patch
--- imv-4.3.0/debian/patches/0002-Fix-segfault-with-latest-wlroots.patch	1970-01-01 01:00:00.000000000 +0100
+++ imv-4.3.0/debian/patches/0002-Fix-segfault-with-latest-wlroots.patch	2022-04-06 13:19:10.000000000 +0200
@@ -0,0 +1,45 @@
+From: Gard Spreemann <g...@nonempty.org>
+Date: Wed, 6 Apr 2022 13:18:10 +0200
+Subject: Fix segfault with latest wlroots
+
+For fixing #1006543.
+
+Based on upstream commit 00d07c0a103fbf685473c73ef676f73c52fd371a.
+---
+ src/wl_window.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/wl_window.c b/src/wl_window.c
+index d7025d2..5efa42f 100644
+--- a/src/wl_window.c
++++ b/src/wl_window.c
+@@ -18,6 +18,8 @@
+ #include <GL/gl.h>
+ #include "xdg-shell-client-protocol.h"
+ 
++#define imv_min(a,b) ((a) > (b) ? (b) : (a))
++
+ struct imv_window {
+   struct wl_display    *wl_display;
+   struct wl_registry   *wl_registry;
+@@ -502,16 +504,20 @@ static void on_global(void *data, struct wl_registry *registry, uint32_t id,
+   struct imv_window *window = data;
+ 
+   if (!strcmp(interface, "wl_compositor")) {
++    version = imv_min(version, 4);
+     window->wl_compositor = 
+       wl_registry_bind(registry, id, &wl_compositor_interface, version);
+   } else if (!strcmp(interface, "xdg_wm_base")) {
++    version = imv_min(version, 2);
+     window->wl_xdg =
+       wl_registry_bind(registry, id, &xdg_wm_base_interface, version);
+     xdg_wm_base_add_listener(window->wl_xdg, &shell_listener_xdg, window);
+   } else if (!strcmp(interface, "wl_seat")) {
++    version = imv_min(version, 7);
+     window->wl_seat = wl_registry_bind(registry, id, &wl_seat_interface, version);
+     wl_seat_add_listener(window->wl_seat, &seat_listener, window);
+   } else if (!strcmp(interface, "wl_output")) {
++    version = imv_min(version, 3);
+     struct output_data *output_data = calloc(1, sizeof *output_data);
+     output_data->wl_output = wl_registry_bind(registry, id, &wl_output_interface, version);
+     output_data->pending_scale = 1;
diff -Nru imv-4.3.0/debian/patches/series imv-4.3.0/debian/patches/series
--- imv-4.3.0/debian/patches/series	2021-10-31 17:53:45.000000000 +0100
+++ imv-4.3.0/debian/patches/series	2022-04-06 13:19:10.000000000 +0200
@@ -1 +1,2 @@
 call-imv-from-libexec.patch
+0002-Fix-segfault-with-latest-wlroots.patch

 Best,
 Gard
 

Reply via email to