diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 03:35:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 03:35:58 +0000 |
commit | 4e41457eeb3c8a265f2f603a0986ec11d9d6038a (patch) | |
tree | 19b9839653e65e69444c3ecad64438b1c27125c6 /debian | |
parent | Adding debian version 3.4-1. (diff) | |
download | tmux-4e41457eeb3c8a265f2f603a0986ec11d9d6038a.tar.xz tmux-4e41457eeb3c8a265f2f603a0986ec11d9d6038a.zip |
Adding debian version 3.4-2.debian/3.4-2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | debian/changelog | 16 | ||||
-rw-r--r-- | debian/control | 6 | ||||
-rw-r--r-- | debian/patches/series | 2 | ||||
-rw-r--r-- | debian/patches/upstream-PR-3860.diff | 140 | ||||
-rw-r--r-- | debian/patches/upstream-bd29a48b56.diff | 24 | ||||
-rwxr-xr-x | debian/rules | 6 |
6 files changed, 190 insertions, 4 deletions
diff --git a/debian/changelog b/debian/changelog index 9cb8635..2279b7d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,19 @@ +tmux (3.4-2) unstable; urgency=medium + + [ Sven Joachim ] + * Only enable systemd support on Linux architectures. + + [ Romain Francoise ] + * Disable Sixel support for now due to possible server crash on invalid + input (GitHub issue #3839). + * Cherry-pick commit bd29a48b56 from upstream to fix split-window -p + flag confusion. + * Cherry-pick changes from upstream PR #3860 fixing a use-after-free + when manipulating zoomed windows. + * Drop obsolete build-depends (lintian warning). + + -- Romain Francoise <rfrancoise@debian.org> Sat, 09 Mar 2024 12:16:21 +0100 + tmux (3.4-1) unstable; urgency=low * New upstream release (closes: #1063838). diff --git a/debian/control b/debian/control index dc046b3..279c980 100644 --- a/debian/control +++ b/debian/control @@ -7,11 +7,11 @@ Build-Depends: bison, debianutils (>= 5.3-1~), dpkg-dev (>= 1.16.1~), libevent-dev (>> 2.0.10), - libncurses-dev | libncurses5-dev, - libsystemd-dev, + libncurses-dev, + libsystemd-dev [linux-any], libutempter-dev, libutil-freebsd-dev [kfreebsd-any], - pkg-config + pkgconf Standards-Version: 4.6.2 Rules-Requires-Root: no Homepage: https://tmux.github.io/ diff --git a/debian/patches/series b/debian/patches/series index ac55c0e..30716db 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,3 @@ platform-quirks.diff +upstream-bd29a48b56.diff +upstream-PR-3860.diff diff --git a/debian/patches/upstream-PR-3860.diff b/debian/patches/upstream-PR-3860.diff new file mode 100644 index 0000000..4711745 --- /dev/null +++ b/debian/patches/upstream-PR-3860.diff @@ -0,0 +1,140 @@ +From 5363a5475a1dd4158c1ddb23de2da34e88738673 Mon Sep 17 00:00:00 2001 +From: Romain Francoise <romain@rfr.io> +Date: Sun, 25 Feb 2024 15:53:25 +0100 +Subject: [PATCH] Don't notify when unzooming windows from window_destroy() + +Since commit 36e1ac65560, window_destroy() calls window_unzoom() +but the latter emits a 'window-layout-changed' notification with +the window which is about to be freed. This results in the +callback later dereferencing a freed window, or a double-free. + +Closes: #3857. +--- + cmd-display-panes.c | 2 +- + cmd-resize-pane.c | 2 +- + popup.c | 2 +- + resize.c | 2 +- + server-fn.c | 2 +- + tmux.h | 2 +- + window.c | 10 ++++++---- + 7 files changed, 12 insertions(+), 10 deletions(-) + +diff --git a/cmd-display-panes.c b/cmd-display-panes.c +index 06f6dc277a..25556f3d58 100644 +--- a/cmd-display-panes.c ++++ b/cmd-display-panes.c +@@ -246,7 +246,7 @@ cmd_display_panes_key(struct client *c, void *data, struct key_event *event) + wp = window_pane_at_index(w, index); + if (wp == NULL) + return (1); +- window_unzoom(w); ++ window_unzoom(w, 1); + + xasprintf(&expanded, "%%%u", wp->id); + +diff --git a/cmd-resize-pane.c b/cmd-resize-pane.c +index c9439441f6..b2c167f59f 100644 +--- a/cmd-resize-pane.c ++++ b/cmd-resize-pane.c +@@ -87,7 +87,7 @@ cmd_resize_pane_exec(struct cmd *self, struct cmdq_item *item) + + if (args_has(args, 'Z')) { + if (w->flags & WINDOW_ZOOMED) +- window_unzoom(w); ++ window_unzoom(w, 1); + else + window_zoom(wp); + server_redraw_window(w); +diff --git a/popup.c b/popup.c +index 4742733932..01b95e27b8 100644 +--- a/popup.c ++++ b/popup.c +@@ -345,7 +345,7 @@ popup_make_pane(struct popup_data *pd, enum layout_type type) + u_int hlimit; + const char *shell; + +- window_unzoom(w); ++ window_unzoom(w, 1); + + lc = layout_split_pane(wp, type, -1, 0); + hlimit = options_get_number(s->options, "history-limit"); +diff --git a/resize.c b/resize.c +index 457fee0a7b..dff9571270 100644 +--- a/resize.c ++++ b/resize.c +@@ -40,7 +40,7 @@ resize_window(struct window *w, u_int sx, u_int sy, int xpixel, int ypixel) + /* If the window is zoomed, unzoom. */ + zoomed = w->flags & WINDOW_ZOOMED; + if (zoomed) +- window_unzoom(w); ++ window_unzoom(w, 1); + + /* Resize the layout first. */ + layout_resize(w, sx, sy); +diff --git a/server-fn.c b/server-fn.c +index 2f649329cb..00d0e37843 100644 +--- a/server-fn.c ++++ b/server-fn.c +@@ -488,6 +488,6 @@ server_check_unattached(void) + void + server_unzoom_window(struct window *w) + { +- if (window_unzoom(w) == 0) ++ if (window_unzoom(w, 1) == 0) + server_redraw_window(w); + } +diff --git a/tmux.h b/tmux.h +index a50adbfae0..7671cca097 100644 +--- a/tmux.h ++++ b/tmux.h +@@ -3070,7 +3070,7 @@ struct window_pane *window_add_pane(struct window *, struct window_pane *, + void window_resize(struct window *, u_int, u_int, int, int); + void window_pane_send_resize(struct window_pane *, u_int, u_int); + int window_zoom(struct window_pane *); +-int window_unzoom(struct window *); ++int window_unzoom(struct window *, int); + int window_push_zoom(struct window *, int, int); + int window_pop_zoom(struct window *); + void window_lost_pane(struct window *, struct window_pane *); +diff --git a/window.c b/window.c +index 77ce41d8f7..69a42ab7e6 100644 +--- a/window.c ++++ b/window.c +@@ -338,7 +338,7 @@ window_destroy(struct window *w) + { + log_debug("window @%u destroyed (%d references)", w->id, w->references); + +- window_unzoom(w); ++ window_unzoom(w, 0); + RB_REMOVE(windows, &windows, w); + + if (w->layout_root != NULL) +@@ -673,7 +673,7 @@ window_zoom(struct window_pane *wp) + } + + int +-window_unzoom(struct window *w) ++window_unzoom(struct window *w, int notify) + { + struct window_pane *wp; + +@@ -690,7 +690,9 @@ window_unzoom(struct window *w) + wp->saved_layout_cell = NULL; + } + layout_fix_panes(w, NULL); +- notify_window("window-layout-changed", w); ++ ++ if (notify) ++ notify_window("window-layout-changed", w); + + return (0); + } +@@ -704,7 +706,7 @@ window_push_zoom(struct window *w, int always, int flag) + w->flags |= WINDOW_WASZOOMED; + else + w->flags &= ~WINDOW_WASZOOMED; +- return (window_unzoom(w) == 0); ++ return (window_unzoom(w, 1) == 0); + } + + int diff --git a/debian/patches/upstream-bd29a48b56.diff b/debian/patches/upstream-bd29a48b56.diff new file mode 100644 index 0000000..49f34be --- /dev/null +++ b/debian/patches/upstream-bd29a48b56.diff @@ -0,0 +1,24 @@ +commit bd29a48b56ae649d425fd6939d60f75d79d767da +Author: Nicholas Marriott <nicholas.marriott@gmail.com> +Date: Wed Mar 6 21:32:39 2024 +0000 + + Check for the right flag to fix split-window -p, from Bryan Childs. + +diff --git a/cmd-split-window.c b/cmd-split-window.c +index 18df715ef0..82ff22aff0 100644 +--- a/cmd-split-window.c ++++ b/cmd-split-window.c +@@ -94,10 +94,10 @@ cmd_split_window_exec(struct cmd *self, struct cmdq_item *item) + size = -1; + if (args_has(args, 'l')) { + size = args_percentage_and_expand(args, 'l', 0, INT_MAX, curval, +- item, &cause); ++ item, &cause); + } else if (args_has(args, 'p')) { +- size = args_strtonum_and_expand(args, 'l', 0, 100, item, +- &cause); ++ size = args_strtonum_and_expand(args, 'p', 0, 100, item, ++ &cause); + if (cause == NULL) + size = curval * size / 100; + } diff --git a/debian/rules b/debian/rules index 6c76020..6a14e40 100755 --- a/debian/rules +++ b/debian/rules @@ -2,11 +2,15 @@ export DEB_BUILD_MAINT_OPTIONS=hardening=+all +ifeq ($(DEB_HOST_ARCH_OS),linux) +enable_systemd = --enable-systemd +endif + %: dh $@ override_dh_auto_configure: - dh_auto_configure -- --enable-utempter --enable-systemd --enable-sixel + dh_auto_configure -- --enable-utempter $(enable_systemd) execute_after_dh_auto_install: install -D -m 644 debian/shells \ |