Sync from SUSE:SLFO:Main vte revision 809f35d9c998f4bff2e2d908effd2891

This commit is contained in:
Adrian Schröter 2024-11-12 12:20:14 +01:00
parent eecddaba85
commit 6115e5b85f
9 changed files with 349 additions and 164 deletions

View File

@ -4,8 +4,8 @@
<param name="url">https://gitlab.gnome.org/GNOME/vte.git</param>
<param name="scm">git</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="changesgenerate">enable</param>
<param name="revision">refs/tags/0.74.2</param>
<!-- <param name="changesgenerate">enable</param> -->
<param name="revision">0.78.1</param>
<param name="exclude">doc/vttest.*</param>
</service>
<service name="tar" mode="buildtime" />

View File

@ -1,4 +0,0 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://gitlab.gnome.org/GNOME/vte.git</param>
<param name="changesrevision">3f66edbf598129bafde3baa91ccfb345056418c3</param></service></servicedata>

BIN
vte-0.74.2.obscpio (Stored with Git LFS)

Binary file not shown.

BIN
vte-0.78.1.obscpio (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,58 +0,0 @@
From fd5511f24b7269195a7083f409244e9787c705dc Mon Sep 17 00:00:00 2001
From: Christian Persch <chpe@src.gnome.org>
Date: Sun, 2 Jun 2024 19:13:15 +0200
Subject: [PATCH] emulation: Restrict resize request to sane numbers
Fixes: https://gitlab.gnome.org/GNOME/vte/-/issues/2786
---
src/vteseq.cc | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/src/vteseq.cc b/src/vteseq.cc
index 2430054c..225c6a59 100644
--- a/src/vteseq.cc
+++ b/src/vteseq.cc
@@ -216,9 +216,18 @@ Terminal::emit_bell()
/* Emit a "resize-window" signal. (Grid size.) */
void
Terminal::emit_resize_window(guint columns,
- guint rows)
-{
- _vte_debug_print(VTE_DEBUG_SIGNALS, "Emitting `resize-window'.\n");
+ guint rows)
+{
+ // Ignore resizes with excessive number of rows or columns,
+ // see https://gitlab.gnome.org/GNOME/vte/-/issues/2786
+ if (columns < VTE_MIN_GRID_WIDTH ||
+ columns > 511 ||
+ rows < VTE_MIN_GRID_HEIGHT ||
+ rows > 511)
+ return;
+
+ _vte_debug_print(VTE_DEBUG_SIGNALS, "Emitting `resize-window' %d columns %d rows.\n",
+ columns, rows);
g_signal_emit(m_terminal, signals[SIGNAL_RESIZE_WINDOW], 0, columns, rows);
}
@@ -4702,8 +4711,6 @@ Terminal::DECSLPP(vte::parser::Sequence const& seq)
else if (param < 24)
return;
- _vte_debug_print(VTE_DEBUG_EMULATION, "Resizing to %d rows.\n", param);
-
emit_resize_window(m_column_count, param);
}
@@ -9312,9 +9319,6 @@ Terminal::XTERM_WM(vte::parser::Sequence const& seq)
seq.collect(1, {&height, &width});
if (width != -1 && height != -1) {
- _vte_debug_print(VTE_DEBUG_EMULATION,
- "Resizing window to %d columns, %d rows.\n",
- width, height);
emit_resize_window(width, height);
}
break;
--
2.45.0

View File

@ -1,80 +0,0 @@
From 1803ba866053a3d7840892b9d31fe2944a183eda Mon Sep 17 00:00:00 2001
From: Christian Persch <chpe@src.gnome.org>
Date: Sun, 2 Jun 2024 19:13:15 +0200
Subject: [PATCH] widget: Add safety limit to widget size requests
https://gitlab.gnome.org/GNOME/vte/-/issues/2786
---
src/vtegtk.cc | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/src/vtegtk.cc b/src/vtegtk.cc
index 2d9fcaed..39a85a53 100644
--- a/src/vtegtk.cc
+++ b/src/vtegtk.cc
@@ -97,6 +97,38 @@ constexpr bool check_enum_value(T value) noexcept;
static constinit size_t vte_terminal_class_n_instances = 0;
+static inline void
+sanitise_widget_size_request(int* minimum,
+ int* natural) noexcept
+{
+ // Overly large size requests will make gtk happily allocate
+ // a window size over the window system's limits (see
+ // e.g. https://gitlab.gnome.org/GNOME/vte/-/issues/2786),
+ // leading to aborting the whole process.
+ // The toolkit should be in a better position to know about
+ // these limits and not exceed them (which here is certainly
+ // possible since our minimum sizes are very small), let's
+ // limit the widget's size request to some large value
+ // that hopefully is within the absolute limits of
+ // the window system (assumed here to be int16 range,
+ // and leaving some space for the widgets that contain
+ // the terminal).
+ auto const limit = (1 << 15) - (1 << 12);
+
+ if (*minimum > limit || *natural > limit) {
+ static auto warned = false;
+
+ if (!warned) {
+ g_warning("Widget size request (minimum %d, natural %d) exceeds limits\n",
+ *minimum, *natural);
+ warned = true;
+ }
+ }
+
+ *minimum = std::min(*minimum, limit);
+ *natural = std::clamp(*natural, *minimum, limit);
+}
+
struct _VteTerminalClassPrivate {
GtkStyleProvider *style_provider;
};
@@ -554,6 +586,7 @@ try
{
VteTerminal *terminal = VTE_TERMINAL(widget);
WIDGET(terminal)->get_preferred_width(minimum_width, natural_width);
+ sanitise_widget_size_request(minimum_width, natural_width);
}
catch (...)
{
@@ -568,6 +601,7 @@ try
{
VteTerminal *terminal = VTE_TERMINAL(widget);
WIDGET(terminal)->get_preferred_height(minimum_height, natural_height);
+ sanitise_widget_size_request(minimum_height, natural_height);
}
catch (...)
{
@@ -825,6 +859,7 @@ try
WIDGET(terminal)->measure(orientation, for_size,
minimum, natural,
minimum_baseline, natural_baseline);
+ sanitise_widget_size_request(minimum, natural);
}
catch (...)
{
--
2.45.0

View File

@ -1,10 +1,340 @@
-------------------------------------------------------------------
Tue Jun 11 22:26:03 UTC 2024 - Michael Gorse <mgorse@suse.com>
Tue Oct 22 07:26:43 UTC 2024 - Bjørn Lie <bjorn.lie@gmail.com>
- Add patches to fix CVE-2024-37535 (boo#1226134
glgo#GNOME/vte#2786):
- vte-widget-size-limits.patch
- vte-emulation-resize-request-limits.patch
- Update to version 0.78.1:
+ build:
- Prepend python to minifont coverage cmd
- Add missing includes
+ widget:
- Improve the robustness of ringview updating
- Make sure to update the ringview after a widget resize
- termprops: Fix for double termprops
+ draw:
- gsk:
. Use fill_n to fill background
. Draw cell background using scaled texture
- Fix background drawing offset
+ tests: Remove excessive constrexpr
-------------------------------------------------------------------
Fri Sep 20 17:08:00 UTC 2024 - Bjørn Lie <bjorn.lie@gmail.com>
- Update to version 0.78.0:
+ build: Only default to -Bsymbolic-functions on gnu linker
-------------------------------------------------------------------
Fri Sep 20 17:07:02 UTC 2024 - Bjørn Lie <bjorn.lie@gmail.com>
- Update to version 0.77.92:
* lib: Remove custom terminfo
* minifont: Fix syntax warning with python 3.12
* app: Add scroll options
* widget: Fix legacy OSC 7 notification
* widget: gtk3: a11y: Remove use of language extension
* widget: gtk3: a11y: Fix NULL title
* lib: Include stdint.h where needed
* vte.sh: Preserve exit status
* widget: termprop: Allow NULL value in
vte_terminal_get_termprop_value
* widget: termprops: Change vte.shell.postexec termprop to UINT
* vte.sh: Fix function name
* minifont: Use FAST filter for fill pattern
* minifont: Simplify drawing bitmap pattern
-------------------------------------------------------------------
Fri Sep 20 17:07:01 UTC 2024 - bjorn.lie@gmail.com
- Update to version 0.77.91:
* minifont: gtk4: Fix character alignment for U+1CC40..U+1CC47
* minifont: gtk4: Remove incorrect definition of U+1FB97
* parser: test: Remove some debug output
* parser: test: Fix glue/uchar test for zero_v and add more tests
* build: Post release version bump
* all: Remove SIXEL support from stable branch
* widget: termprops: Change color termprop variant type
* widget: termprops: Return nothing for colour termprops on gtk4
* widget: termprops: Skip value initialisation on false return
* emulation: DECERA/DECCARA/DECRARA fixes
-------------------------------------------------------------------
Fri Sep 20 12:56:58 UTC 2024 - bjorn.lie@gmail.com
- Update to version 0.76.4:
* fonts: ensure ref of font from glyph item analysis
* build: Post release version bump
-------------------------------------------------------------------
Tue Jul 30 19:08:25 UTC 2024 - Michael Gorse <mgorse@suse.com>
- Only apply vte-revert-back-to-c++17.patch for SLE <= 15.
-------------------------------------------------------------------
Mon Jun 10 06:54:32 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Update to version 0.76.3 (boo#1226134 CVE-2024-37535):
* emulation: Restrict resize request to sane numbers
* widget: Add safety limit to widget size requests
* build: Post release version bump
-------------------------------------------------------------------
Mon May 27 07:05:53 UTC 2024 - dimstar@opensuse.org
- Update to version 0.76.2:
* widget: Make CSS parse warnings non-fatal
* build: Post release version bump
-------------------------------------------------------------------
Thu May 2 06:56:12 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Update to version 0.76.1:
+ terminal: fix UTF-8 bounds check.
+ app: Don't hide scrolled-window option.
+ app: Add built-in CSS to hide scrolled-window over-scroll
indicators.
+ emulation: Fix the reported bold/etc. color if unset
+ widget: Also set tag when returning no match.
-------------------------------------------------------------------
Thu May 02 06:56:11 UTC 2024 - dimstar@opensuse.org
- Update to version 0.76.1:
* emulation: Fix the reported bold/etc. color if unset
* app: Fix the build with clang++
* app: Don't use typeof
* terminal: fix UTF-8 bounds check
* widget: Also set tag when returning no match
* app: Add built-in CSS to hide scrolled-window over-scroll indicators
* app: Don't hide scrolled-window option
* build: Post release version bump
-------------------------------------------------------------------
Mon Mar 18 16:14:26 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Update to version 0.76.0:
+ gtk3: draw: minifont: Don't do minifont caching.
+ widget: Add im_activate_osk() method.
+ widget: Activate OSK on button release.
-------------------------------------------------------------------
Mon Mar 18 16:14:24 UTC 2024 - dimstar@opensuse.org
- Update to version 0.76.0:
* build: Version 0.76.0
* build: Bump gtk4 req version
* widget: Activate OSK on button release
* widget: Add im_activate_osk() method
* gtk3: draw: minifont: Don't do minifont caching
* build: Post release version bump
-------------------------------------------------------------------
Mon Mar 4 08:54:18 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Update to version 0.75.92:
+ widget: Make backwards search find wrapped words.
+ widget: Bit of cleanup around the previous fix.
+ widget: gtk4: Fix double and triple click handling.
+ widget: Faster rewrapping on resize.
+ lib: Remember the Terminal in ProcessingContext.
+ lib: Batch handling of single-width characters.
+ ring: Only occasionally advance the stream tails.
+ widget: gtk4: Fix the look of outline block cursor in the first
column.
+ vte.sh: Avoid warning if shell is configured with 'set -u'.
+ widget: a11y: Add missing text changes on scrolling with
modifications.
-------------------------------------------------------------------
Mon Mar 04 08:54:17 UTC 2024 - dimstar@opensuse.org
- Update to version 0.75.92:
* fonts: Allow unknown coverage to silently pass through
* widget: Fix end alignment
* app: Rework argument parsing
* widget: gtk4: Fix the look of outline block cursor in the first column
* ringview: inline get_bidirow()
* bidi: inline log2vis() and vis2log()
* terminal: inline hot path of cell_is_selected_log()
* terminal: annotate unlikely paths in determine_colors()
* terminal: remove determine_colors() invisible check
* Revert "widget: Limit select-all to the writable region not including the scrollback"
* vte.sh: Avoid warning if shell is configured with 'set -u'
* widget: Set scroll-on-insert to false by default
* scheduler: add 10hz fallback scheduler
* widget: Try to fix a build failure on 32-bit archs
* ring: Only occasionally advance the stream tails
* lib: Batch handling of single-width characters
* lib: Remember the Terminal in ProcessingContext
* widget: Faster rewrapping on resize
* widget: gtk4: Fix double and triple click handling
* widget: Bit of cleanup around the previous fix
* widget: Make backwards search find wrapped words
* Revert "build: Remove extra debug compile option"
* widget: a11y: Add missing text changes on scrolling with modifications
* widget: Add type annotation to setup-context-menu signal
* build: Post release version bump
---------------------------------------------------------------
Mon Feb 12 16:07:17 UTC 2024 - dimstar@opensuse.org
- Update to version 0.75.91:
* vte.sh: Consistent indentation
* vte.sh: Set up bash and zsh for OSC 133 shell integration
* emulation: Support conditional new paragraph
* emulation: Track shell integration escape sequences
* lib: Remove pointless "maybe" in some method names
* all: Remove SIXEL support from stable branch
* widget: Remove termprops from stable branch
* widget: termprops: Reset termprops on terminal reset
* widget: termprops: Rewrite termprop documentation
* widget: termprops: Unify int types
* widget: Fix HTML CSS property "text-decoration-style: solid"
* widget,emulation: Add support for dotted and dashed underlines
* widget: termprops: Relax boolean value parsing
* widget: termprops: String value parsing fixes
* widget: termprops: Add some more tests
* widget: termprops: Allow true/false for BOOL termprops
* widget: termprops: Add DOUBLE type
* emulation: Allow default parameter value for XTVERSION
* emulation: Support XTVERSION sequence
* emulation: Reply to DECRQPSR and DECRQTSR
* emulation: More accurate DA1 and DA2 replies
* widget: Renumber VterAlign enum
* emulation: Also reply to DECRQSS on XTERM_MODKEYS
* emulation: Remove xterm alias for DSR_DEC 53
* widget: Add terminal properties
* lib: Add some colour helper classes
* lib: Add a simple UUID class
* widget: Don't throw warnings for our own header
* gsk: fix rectangle drawing using border nodes
* widget: Fix context menu event check
* widget: notify of style change upon css_changed
-------------------------------------------------------------------
Tue Jan 16 14:08:16 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Update to version 0.75.0:
* regex: Add out param for error location to the _full() APIs
* widget: Don't update the ringview before scrolling in history
* regex: Add API to set extra PCRE2 compile flags
* widget: Scroll to the bottom on preedit
* widget: Deprecate old get-text APIs
* widget: Add bindable replacement API to get the displayed text
* widget: gtk4: Delay unsetting the context menu to idle
* widget: Work around kinetic scrolling when changing the adjustment
* app: Add more scrolling options
* widget: Add scroll-on-insert property
* bidi: Use malloced workspace area
* widget: Fix initial cursor blink state
* widget: Fix selected text API with block selection mode
* draw: Remove unused alpha param from drawing methods
* widget: Add class vfunc for setup-context-menu signal
* vte: avoid creating rect/region on GTK 4
* vte: remove extra PTY read from tick callback
* vte: emit adjustment changed in tick callback
* Reapply "vte: drive updates from GdkFrameClock"
* widget: gtk4: Add long press touch gesture
* lib: Inline the Unicode character width database
* ring: Fix error handling in the rewrapping code
* stream: Add debug assertions verifying the snake's integrity
* stream: Fix a rare corruption when advancing the tail
* DOAP: Replace defunct mailing list with Discourse support forum
* Revert "vte: drive updates from GdkFrameClock"
* widget: Add context menu support
* draw: Add some constexpr to Rectangle methods
* widget: Improve yalign docs
* build: Suppress a warning about an unused variable in non-debug mode
* lib: Do not initialize cells before inserting characters
* lib: Fix lines unwrapping too far
* lib: Speed up inserting runs of ASCII characters
* lib: Simplify invalidation bounding box tracking
* emulation: Fix cursor position after an escape sequence initiated resize
* lib: Remove unnecessary "struct"s
* emulation: Save/restore along with the cursor whether wrapping will occur
* emulation: Make ED 2 and EL 2 clear the pending wrap flag
* emulation: Make DA1 report horizontal scrolling support
* emulation: Fix ECH not to expand the row beyond the terminal's width
* emulation: Make DECCOLM and DECALN reset the scrolling region
* emulation: Adjust Cursor Position Report (CPR) for left and right margins
* emulation: Implement Forward Index (DECFI) and Back Index (DECBI)
* emulation: Implement Insert Column (DECIC) and Delete Columnn (DECDC)
* emulation: Adjust IRM mode for left and right margins
* emulation: Adjust Insert Character (ICH) and Delete Character (DCH)
* emulation: Implement Scroll Left (SL) and Scroll Right (SR)
* emulation: Minor cleanup at smart tab handling
* emulation: Adjust cursor moving operations to respect left and right margins
* emulation: Shuffle a few methods to a more logical order
* emulation: Adjust vertical scrolling to respect left and right margins
* doc: Add scrolling-region.txt
* emulation: Adjust cursor tracking and autowrapping for the right margin
* emulation: Execute SCORC even when DECLRMM is enabled
* emulation: Track DECSLRM left and right margins
* emulation: Fix the behavior if invalid scrolling region is requested
* emulation: Scroll Up (SU) and Delete Line (DL) push to the scrollback
* emulation: Disregard bce in the scrolling region
* emulation: Extend vte_scrolling_region to track all four margins
* emulation: Rename start/end margins to top/bottom
* emulation: Preserve empty cells as NULs when computing DECRQCRA checksum
* widget: Remove an unused parameter of get_text()
* bindings: vala: Depend on graphene-gobject-1.0
* build: Silence deprecation warnings
* drawing-gsk: fix a potential crash with empty runs
* vte: drive updates from GdkFrameClock
* emulation: Also use invisible bit for DECRQCRA checksum
* emulation: Correct DECRQCRA negation
* emulation: make DECRQCRA behave as VT520
* parser: modes: Additions from recent xterm
* build: Fix compile in debug mode
* debug: use vte_assert_cmp* functions
* bidi: reuse char and index arrays across runs
* terminal: require caller to allocate GString for get_text()
* vteinternal: use specialized array for char attributes
* draw: minifont: Only pad character where necessary
* draw: minifont: Fix drawing of diagonals
* draw: Style fixes
* draw: Include drawing-context.hh not drawing-cairo.hh
* draw: Use a named constant
* draw: implement native GTK 4 drawing
* draw:minifont: Add comment to the LR and RL hatching patterns
* Update Greek translation
* minifont: remove unused attr parameter
* vtetypes: add GdkRGBA conversion utility
* app: avoid using Cairo fallback nodes on GTK 4
* build: bump GTK requirement to 4.12
* draw: minifont: Fix lr/rl hatching pattern to tile seamlessly
* vte: batch printable character insertion
* parser: move vte_parser_t into vte::parser::Parser
* rowdata: use std::fill_n()
* build: Fix the build with sixel enabled
* ring, fonts: use g_string_truncate() to reset string
* build: compile out assertions and cast-checks
* ring: remove VteRing C wrapper for vte::base::Ring
* ring: inline vte::base::Ring::index_writable()
* ring: inline vte::base::Ring::ensure_writable()
* unistr: fix typo in gtk-doc
* utf8: Add some more tests
* unistr: inline unichar into GString as UTF-8
* unichar: hoist common unichar width into caller
* stream: switch compression from zlib to LZ4
* unistr: hoist _vte_unistr_strlen() into caller
* unistr: hoist g_string_append_unichar() into caller
* bidi: add VteBidiIndexes array using GdkArrayImpl
* bidi: add VteBidiChars array of gunichar
* import GdkArrayImpl for fast arrays
* build-aux: add flatpak manifest for testing from Builder
* ci: Only upload docs for tags
* Revert "widget: a11y: Add missing text changes on scrolling with modifications"
* Revert "widget: a11y: Optimize text changes on scrolling with modifications"
* widget: VteTerminalSpawnAsyncCallback's error is nullable
* widget: a11y: Optimize text changes on scrolling with modifications
* widget: Fix conditional
* widget: Fix conditional
* app: Correct option value description
* Revert "widget: Do not count event as handled in more situations"
* test: Add SGR 4:4 and 4:5 underlines to test script
* emulation: Ignore unknown SGR underline subparams
* widget: Correct "Since:" annotations
* lib: Fix preallocated size
- Add pkgconfig(liblz4) BuildRequires: new dependency.
-------------------------------------------------------------------
Sun Jan 14 09:04:08 UTC 2024 - Yifan Jiang <yfjiang@suse.com>

View File

@ -1,4 +1,4 @@
name: vte
version: 0.74.2
mtime: 1702571432
commit: 3f66edbf598129bafde3baa91ccfb345056418c3
version: 0.78.1
mtime: 1729365925
commit: 9c70c63c29bdd1677f3f1fa947d015ddf5eecc76

View File

@ -27,7 +27,7 @@
%bcond_with glade_support
Name: vte
Version: 0.74.2
Version: 0.78.1
Release: 0
Summary: Terminal Emulator Library
License: CC-BY-4.0 AND LGPL-3.0-or-later AND GPL-3.0-or-later AND MIT
@ -36,10 +36,6 @@ URL: https://gitlab.gnome.org/GNOME/vte
Source: %{_name}-%{version}.tar.zst
# PATCH-FIX-OPENSUSE vte-enable-build-flag-pie.patch yfjiang@suse.com -- enable PIE flag to be compatible with gcc default linking option
Patch0: vte-enable-build-flag-pie.patch
# PATCh-FIX-UPSTREAM vte-widget-size-limits.patch boo#1226134 mgorse@suse.com -- add safety limit to widget size requests.
Patch1: vte-widget-size-limits.patch
# PATCH-FIX-UPSTREAM vte-emulation-resize-request-limits.patch boo#1226134 mgorse@suse.com -- restrict resize request to sane numbers.
Patch2: vte-emulation-resize-request-limits.patch
# PATCH-FIX-SLE vte-revert-back-to-c++17.patch yu.daike@suse.com -- revert c++20 features back to c++17
Patch100: vte-revert-back-to-c++17.patch
@ -57,15 +53,16 @@ BuildRequires: pkgconfig
BuildRequires: (python3-dataclasses if python3-base < 3.7)
BuildRequires: pkgconfig(fribidi) >= 1.0.0
BuildRequires: pkgconfig(gi-docgen)
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(gio-2.0) >= 2.72.0
BuildRequires: pkgconfig(gio-unix-2.0)
BuildRequires: pkgconfig(glib-2.0) >= 2.40.0
BuildRequires: pkgconfig(glib-2.0) >= 2.72.0
BuildRequires: pkgconfig(gnutls) >= 3.2.7
BuildRequires: pkgconfig(gobject-2.0)
BuildRequires: pkgconfig(gtk+-3.0) >= 3.16.0
%if %{with gtk4_support}
BuildRequires: pkgconfig(gtk4)
BuildRequires: pkgconfig(gtk4) >= 4.14.0
%endif
BuildRequires: pkgconfig(liblz4) >= 1.9
BuildRequires: pkgconfig(libpcre2-8) >= 10.21
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(pango) >= 1.22.0
@ -183,7 +180,7 @@ widgets in Glade.
%prep
%autosetup -n %{_name}-%{version} -N
%patch -P 0 -p1
%if 0%{?sle_version}
%if 0%{?sle_version} && 0%{?sle_version} < 160000
%patch -P 100 -p1
%endif