diff --git a/ibus-1.5.27.tar.gz b/ibus-1.5.28.tar.gz similarity index 35% rename from ibus-1.5.27.tar.gz rename to ibus-1.5.28.tar.gz index 0a782176bdb29114c884e1f2fb5ad973c3fcf691..585d2fb26d876d02b4ada0a00cf18a428a6fcc98 100644 Binary files a/ibus-1.5.27.tar.gz and b/ibus-1.5.28.tar.gz differ diff --git a/ibus-1385349-segv-bus-proxy.patch b/ibus-1385349-segv-bus-proxy.patch index 0f8006dc279650576c10bc9f5ce65d05b0f5d258..098ae58ee4f1c23d77300ca09c9646bc9b6f8dd5 100644 --- a/ibus-1385349-segv-bus-proxy.patch +++ b/ibus-1385349-segv-bus-proxy.patch @@ -1,6 +1,6 @@ -From f6d31621404dc8716bddd0588402fbdde4f5fb73 Mon Sep 17 00:00:00 2001 +From 5749b4861ffcaf8083d97c6bf9858257373596ce Mon Sep 17 00:00:00 2001 From: fujiwarat -Date: Thu, 3 Nov 2022 08:59:41 +0900 +Date: Wed, 25 Jan 2023 17:26:47 +0900 Subject: [PATCH] Fix SEGV in bus_panel_proxy_focus_in() rhbz#1350291 SEGV in BUS_IS_CONNECTION(skip_connection) in @@ -32,6 +32,9 @@ events and m_loop was not released. rhbz#1797120 SEGV in assert(bus.is_connected()) in panel_binding_construct() Check m_ibus in extension.vala:bus_name_acquired_cb() +rhbz#2151344 SEGV with portal_context->owner in name_owner_changed() +Maybe g_object_unref() is called but not finalzed yet. + BUG=rhbz#1350291 BUG=rhbz#1601577 BUG=rhbz#1663528 @@ -40,14 +43,16 @@ BUG=rhbz#1795499 BUG=rhbz#1771238 BUG=rhbz#1767976 BUG=rhbz#1797120 +BUG=rhbz#2151344 --- bus/dbusimpl.c | 47 ++++++++++++++++++++++++--- bus/engineproxy.c | 44 +++++++++++++++++++------ client/x11/main.c | 8 ++++- + portal/portal.c | 11 +++++++ src/ibusbus.c | 6 ++++ ui/gtk3/extension.vala | 4 +++ ui/gtk3/switcher.vala | 73 +++++++++++++++++++++++++----------------- - 6 files changed, 137 insertions(+), 45 deletions(-) + 7 files changed, 148 insertions(+), 45 deletions(-) diff --git a/bus/dbusimpl.c b/bus/dbusimpl.c index 59787a80..af2fbde2 100644 @@ -138,10 +143,10 @@ index 59787a80..af2fbde2 100644 if (incoming) { /* is incoming message */ diff --git a/bus/engineproxy.c b/bus/engineproxy.c -index fd1f34fb..57c061ba 100644 +index b3e16066..ba479b59 100644 --- a/bus/engineproxy.c +++ b/bus/engineproxy.c -@@ -690,10 +690,12 @@ bus_engine_proxy_g_signal (GDBusProxy *proxy, +@@ -693,10 +693,12 @@ bus_engine_proxy_g_signal (GDBusProxy *proxy, g_return_if_reached (); } @@ -155,7 +160,7 @@ index fd1f34fb..57c061ba 100644 { GDBusProxyFlags flags; BusEngineProxy *engine; -@@ -704,12 +706,20 @@ bus_engine_proxy_new_internal (const gchar *path, +@@ -706,12 +708,20 @@ bus_engine_proxy_new_internal (const gchar *path, g_assert (path); g_assert (IBUS_IS_ENGINE_DESC (desc)); g_assert (G_IS_DBUS_CONNECTION (connection)); @@ -177,7 +182,7 @@ index fd1f34fb..57c061ba 100644 "desc", desc, "g-connection", connection, "g-interface-name", IBUS_INTERFACE_ENGINE, -@@ -717,6 +727,12 @@ bus_engine_proxy_new_internal (const gchar *path, +@@ -719,6 +729,12 @@ bus_engine_proxy_new_internal (const gchar *path, "g-default-timeout", g_gdbus_timeout, "g-flags", flags, NULL); @@ -190,15 +195,15 @@ index fd1f34fb..57c061ba 100644 const gchar *layout = ibus_engine_desc_get_layout (desc); if (layout != NULL && layout[0] != '\0') { engine->keymap = ibus_keymap_get (layout); -@@ -736,6 +752,7 @@ bus_engine_proxy_new_internal (const gchar *path, - } +@@ -756,6 +772,7 @@ bus_engine_proxy_new_internal (const gchar *path, + return engine; } +#pragma GCC reset_options typedef struct { GTask *task; -@@ -798,23 +815,30 @@ create_engine_ready_cb (BusFactoryProxy *factory, +@@ -818,23 +835,30 @@ create_engine_ready_cb (BusFactoryProxy *factory, GAsyncResult *res, EngineProxyNewData *data) { @@ -238,7 +243,7 @@ index fd1f34fb..57c061ba 100644 /* FIXME: set destroy callback ? */ g_task_return_pointer (data->task, engine, NULL); diff --git a/client/x11/main.c b/client/x11/main.c -index 6057cc03..12e9012c 100644 +index 905fd251..1abea0af 100644 --- a/client/x11/main.c +++ b/client/x11/main.c @@ -45,6 +45,7 @@ @@ -249,7 +254,7 @@ index 6057cc03..12e9012c 100644 #include -@@ -1148,7 +1149,12 @@ _atexit_cb () +@@ -1269,7 +1270,12 @@ _atexit_cb () static void _sighandler (int sig) { @@ -263,6 +268,35 @@ index 6057cc03..12e9012c 100644 } static void +diff --git a/portal/portal.c b/portal/portal.c +index c2e4fc7f..a347fe6a 100644 +--- a/portal/portal.c ++++ b/portal/portal.c +@@ -90,6 +90,11 @@ static void portal_context_g_signal (GDBusProxy *proxy, + GVariant *parameters, + IBusPortalContext *portal_context); + ++#define IBUS_TYPE_PORTAL_CONTEXT \ ++ (ibus_portal_context_get_type ()) ++#define IBUS_IS_PORTAL_CONTEXT(obj) \ ++ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_TYPE_PORTAL_CONTEXT)) ++ + G_DEFINE_TYPE_WITH_CODE (IBusPortalContext, + ibus_portal_context, + IBUS_DBUS_TYPE_INPUT_CONTEXT_SKELETON, +@@ -624,6 +629,12 @@ name_owner_changed (GDBusConnection *connection, + IBusPortalContext *portal_context = l->data; + next = l->next; + ++ /* rhbz#2151344 portal_context might not be finalized? */ ++ if (!G_LIKELY (IBUS_IS_PORTAL_CONTEXT (portal_context))) { ++ g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, ++ "portal_context is not IBusPortalContext"); ++ continue; ++ } + if (g_strcmp0 (portal_context->owner, name) == 0) { + g_object_unref (portal_context); + } diff --git a/src/ibusbus.c b/src/ibusbus.c index 47400cb8..c9fbe492 100644 --- a/src/ibusbus.c @@ -400,5 +434,5 @@ index 9400e9ba..2ecbdac1 100644 #if VALA_0_34 seat.ungrab(); -- -2.37.3 +2.38.1 diff --git a/ibus-HEAD.patch b/ibus-HEAD.patch deleted file mode 100644 index 9f57a0d9ca13d84d863fde14dc0a65751527abc2..0000000000000000000000000000000000000000 --- a/ibus-HEAD.patch +++ /dev/null @@ -1,320 +0,0 @@ -From babad7839ba6d72609c717d647bb2928724b4cc3 Mon Sep 17 00:00:00 2001 -From: Izumi Tsutsui -Date: Tue, 6 Sep 2022 17:08:43 +0900 -Subject: [PATCH] tools: Check libdl for dlclose() properly in configure - -BUG=https://github.com/ibus/ibus/pull/2442 ---- - configure.ac | 4 ++++ - tools/Makefile.am | 2 +- - 2 files changed, 5 insertions(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 0868d6c9..2344523a 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -147,6 +147,10 @@ AC_CHECK_HEADERS([sys/prctl.h]) - # Check functions. - AC_CHECK_FUNCS(daemon) - -+# Check dlclose() in libc.so. -+AC_CHECK_LIB(c, dlclose, LIBDL="", [AC_CHECK_LIB(dl, dlclose, LIBDL="-ldl")]) -+AC_SUBST(LIBDL) -+ - # Check packages. - # Check glib2. - AM_PATH_GLIB_2_0 -diff --git a/tools/Makefile.am b/tools/Makefile.am -index b82395da..e300f9f3 100644 ---- a/tools/Makefile.am -+++ b/tools/Makefile.am -@@ -63,7 +63,7 @@ AM_LDADD = \ - @GTHREAD2_LIBS@ \ - $(libibus) \ - $(libibusimmodule) \ -- -ldl \ -+ $(LIBDL) \ - $(NULL) - - AM_VALAFLAGS = \ --- -2.37.3 - -From 39b69073ad34ab89a3e5aa012ff740c84f69eb8f Mon Sep 17 00:00:00 2001 -From: fujiwarat -Date: Fri, 16 Sep 2022 14:30:35 +0900 -Subject: [PATCH] client/gtk2: Stop many warnings of surrounding text - -Surrounding text is requested by ibus_im_context_filter_keypress() -and the no supported warning could be output many times. -Now the warning is output one time by input context but -brower applicaations do not use GtkWidget for the input context -so the warning is output by instance but not input context. - -BUG=https://github.com/ibus/ibus/issues/2418 ---- - client/gtk2/ibusimcontext.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c -index bc14df00..3fc9c0f2 100644 ---- a/client/gtk2/ibusimcontext.c -+++ b/client/gtk2/ibusimcontext.c -@@ -567,6 +567,7 @@ _process_key_event (IBusInputContext *context, - static void - _request_surrounding_text (IBusIMContext *context) - { -+ static gboolean warned = FALSE; - if (context && - (context->caps & IBUS_CAP_SURROUNDING_TEXT) != 0 && - context->ibuscontext != NULL && -@@ -580,8 +581,11 @@ _request_surrounding_text (IBusIMContext *context) - * fail with the first typing on firefox but it succeeds with - * the second typing. - */ -- g_warning ("%s has no capability of surrounding-text feature", -- g_get_prgname ()); -+ if (!warned) { -+ g_warning ("%s has no capability of surrounding-text feature", -+ g_get_prgname ()); -+ warned = TRUE; -+ } - } - } - } --- -2.37.3 - -From 50f8d8b79bc8eac1bae80116fe669d7314a44663 Mon Sep 17 00:00:00 2001 -From: fujiwarat -Date: Fri, 16 Sep 2022 14:34:54 +0900 -Subject: [PATCH] client/gtk2: Update capabilities if "retrieve-surrounding" is - failed - -Some engine developers wish to update the capabilities if emitting -"retrieve-surrounding" signal is failed so that engines disable the -surrounding text feature but I had deleted the logic with #2054 since -the second typing could be succeeded. -Asking all applications the second typing would not be a good condition -and the special issue should be fixed in firefox. - -Fixes: https://github.com/ibus/ibus/commit/7b3b8c8b0c - -BUG=https://github.com/ibus/ibus/issues/2054 -BUG=https://github.com/ibus/ibus/issues/2354 ---- - client/gtk2/ibusimcontext.c | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) - -diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c -index 3fc9c0f2..eaf7eb90 100644 ---- a/client/gtk2/ibusimcontext.c -+++ b/client/gtk2/ibusimcontext.c -@@ -577,10 +577,14 @@ _request_surrounding_text (IBusIMContext *context) - g_signal_emit (context, _signal_retrieve_surrounding_id, 0, - &return_value); - if (!return_value) { -- /* #2054 firefox::IMContextWrapper::GetCurrentParagraph() could -- * fail with the first typing on firefox but it succeeds with -- * the second typing. -+ /* Engines can disable the surrounding text feature with -+ * the updated capabilities. - */ -+ if (context->caps & IBUS_CAP_SURROUNDING_TEXT) { -+ context->caps &= ~IBUS_CAP_SURROUNDING_TEXT; -+ ibus_input_context_set_capabilities (context->ibuscontext, -+ context->caps); -+ } - if (!warned) { - g_warning ("%s has no capability of surrounding-text feature", - g_get_prgname ()); --- -2.37.3 - -From 7bbcce66e1ca694b7a62553327161290bf4ee283 Mon Sep 17 00:00:00 2001 -From: fujiwarat -Date: Mon, 19 Sep 2022 11:52:14 +0900 -Subject: [PATCH] client/gtk2: Update surrounding text properties by focus in - -ibus_input_context_set_surrounding_text() should be succeeded -if input contexts are different so that ibus engines can -update surrounding text properties with focus in event. - -When an input context is created newly, RequireSurroundingText D-Bus -signal could not be received yet and set_surrounding_text() is failed. -Now "require-surrounding-text" signal is added to IBusInputContext -and clients can call set_surrounding_text() later. - -BUG=https://github.com/ibus/ibus/issues/2423 ---- - client/gtk2/ibusimcontext.c | 25 +++++++++++++++++++++++++ - src/ibusinputcontext.c | 29 ++++++++++++++++++++++++++++- - 2 files changed, 53 insertions(+), 1 deletion(-) - -diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c -index eaf7eb90..6e338157 100644 ---- a/client/gtk2/ibusimcontext.c -+++ b/client/gtk2/ibusimcontext.c -@@ -70,6 +70,7 @@ struct _IBusIMContext { - #endif - - IBusInputContext *ibuscontext; -+ IBusInputContext *ibuscontext_needs_surrounding; - - /* preedit status */ - gchar *preedit_string; -@@ -985,6 +986,7 @@ ibus_im_context_init (GObject *obj) - ibusimcontext->cursor_area.height = 0; - - ibusimcontext->ibuscontext = NULL; -+ ibusimcontext->ibuscontext_needs_surrounding = NULL; - ibusimcontext->has_focus = FALSE; - ibusimcontext->time = GDK_CURRENT_TIME; - #ifdef ENABLE_SURROUNDING -@@ -2183,6 +2185,18 @@ _ibus_context_hide_preedit_text_cb (IBusInputContext *ibuscontext, - g_signal_emit (ibusimcontext, _signal_preedit_end_id, 0); - } - -+static void -+_ibus_context_require_surrounding_text_cb (IBusInputContext *ibuscontext, -+ IBusIMContext *ibusimcontext) -+{ -+ IDEBUG ("%s", __FUNCTION__); -+ g_assert (ibusimcontext->ibuscontext == ibuscontext); -+ if (ibusimcontext->ibuscontext_needs_surrounding == ibuscontext) { -+ _request_surrounding_text (ibusimcontext); -+ ibusimcontext->ibuscontext_needs_surrounding = NULL; -+ } -+} -+ - static void - _ibus_context_destroy_cb (IBusInputContext *ibuscontext, - IBusIMContext *ibusimcontext) -@@ -2249,6 +2263,11 @@ _create_input_context_done (IBusBus *bus, - "hide-preedit-text", - G_CALLBACK (_ibus_context_hide_preedit_text_cb), - ibusimcontext); -+ g_signal_connect ( -+ ibusimcontext->ibuscontext, -+ "require-surrounding-text", -+ G_CALLBACK (_ibus_context_require_surrounding_text_cb), -+ ibusimcontext); - g_signal_connect (ibusimcontext->ibuscontext, "destroy", - G_CALLBACK (_ibus_context_destroy_cb), - ibusimcontext); -@@ -2265,6 +2284,12 @@ _create_input_context_done (IBusBus *bus, - - ibus_input_context_focus_in (ibusimcontext->ibuscontext); - _set_cursor_location_internal (ibusimcontext); -+ if (ibus_input_context_needs_surrounding_text ( -+ ibusimcontext->ibuscontext)) { -+ _request_surrounding_text (ibusimcontext); -+ } else { -+ ibusimcontext->ibuscontext_needs_surrounding = ibusimcontext->ibuscontext; -+ } - } - - if (!g_queue_is_empty (ibusimcontext->events_queue)) { -diff --git a/src/ibusinputcontext.c b/src/ibusinputcontext.c -index 7981de38..28ae04ad 100644 ---- a/src/ibusinputcontext.c -+++ b/src/ibusinputcontext.c -@@ -2,7 +2,7 @@ - /* vim:set et sts=4: */ - /* ibus - The Input Bus - * Copyright (C) 2008-2013 Peng Huang -- * Copyright (C) 2018-2019 Takao Fujiwara -+ * Copyright (C) 2018-2022 Takao Fujiwara - * Copyright (C) 2008-2019 Red Hat, Inc. - * - * This library is free software; you can redistribute it and/or -@@ -55,6 +55,7 @@ enum { - CURSOR_DOWN_LOOKUP_TABLE, - REGISTER_PROPERTIES, - UPDATE_PROPERTY, -+ REQUIRE_SURROUNDING_TEXT, - LAST_SIGNAL, - }; - -@@ -488,6 +489,21 @@ ibus_input_context_class_init (IBusInputContextClass *class) - 1, - IBUS_TYPE_PROPERTY); - -+ /** -+ * IBusInputContext::require-surrounding-text: -+ * @context: An IBusInputContext. -+ * -+ * Emitted to receive the RequireSurroundingText signal from the daemon. -+ */ -+ context_signals[REQUIRE_SURROUNDING_TEXT] = -+ g_signal_new (I_("require-surrounding-text"), -+ G_TYPE_FROM_CLASS (class), -+ G_SIGNAL_RUN_LAST, -+ 0, -+ NULL, NULL, -+ _ibus_marshal_VOID__VOID, -+ G_TYPE_NONE, 0); -+ - text_empty = ibus_text_new_from_static_string (""); - g_object_ref_sink (text_empty); - } -@@ -735,6 +751,7 @@ ibus_input_context_g_signal (GDBusProxy *proxy, - - if (g_strcmp0 (signal_name, "RequireSurroundingText") == 0) { - priv->needs_surrounding_text = TRUE; -+ g_signal_emit (context, context_signals[REQUIRE_SURROUNDING_TEXT], 0); - return; - } - -@@ -1116,9 +1133,19 @@ ibus_input_context_set_surrounding_text (IBusInputContext *context, - - priv = IBUS_INPUT_CONTEXT_GET_PRIVATE (context); - -+ /* This API should send "SetSurroundingText" D-Bus method when -+ * input contexts are switched between tabs in a text application -+ * so that engines can receive the updated surrounding texts after -+ * focus-in events happen. -+ * -+ * GNOME shell uses a single input context and the address of the input -+ * contexts are always same. So check the address of texts if the input -+ * contexts on applications are switched. -+ */ - if (cursor_pos != priv->surrounding_cursor_pos || - anchor_pos != priv->selection_anchor_pos || - priv->surrounding_text == NULL || -+ text != priv->surrounding_text || - g_strcmp0 (text->text, priv->surrounding_text->text) != 0) { - if (priv->surrounding_text) - g_object_unref (priv->surrounding_text); --- -2.37.3 - -From cd621f8b82c80a174cd880cb27f27d7ccb9cb4d4 Mon Sep 17 00:00:00 2001 -From: fujiwarat -Date: Thu, 3 Nov 2022 08:36:17 +0900 -Subject: [PATCH] ui/gtk3/switcher: Avoid to unref m_engines with double run - -m_engines could be a buffer overflow if switcher.run() is called -again and m_engines is unrefed durling showing the swicher popup. - -BUG=rhbz#2081055 ---- - ui/gtk3/switcher.vala | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/ui/gtk3/switcher.vala b/ui/gtk3/switcher.vala -index a4529c88..9400e9ba 100644 ---- a/ui/gtk3/switcher.vala -+++ b/ui/gtk3/switcher.vala -@@ -143,6 +143,8 @@ class Switcher : Gtk.Window { - assert (m_loop == null); - assert (index < engines.length); - -+ if (m_is_running) -+ return index; - m_is_running = true; - m_keyval = keyval; - m_modifiers = state; --- -2.37.3 - diff --git a/ibus.spec b/ibus.spec index d1d02106eaec9b58f1b070013e8cef50cc4c520e..0ab2f94ac39df5e0a032f6acae1dc8d9ae17e567 100644 --- a/ibus.spec +++ b/ibus.spec @@ -28,7 +28,7 @@ %global dbus_python_version 0.83.0 Name: ibus -Version: 1.5.27 +Version: 1.5.28 Release: %{anolis_release}%{?dist} Summary: Intelligent Input Bus for Linux OS License: LGPLv2+ @@ -36,7 +36,6 @@ URL: https://github.com/ibus/%name/wiki Source0: https://github.com/ibus/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz Source1: %{name}-xinput Source2: %{name}.conf.5 -Patch0: %{name}-HEAD.patch # Under testing #1349148 #1385349 #1350291 #1406699 #1432252 #1601577 Patch1: %{name}-1385349-segv-bus-proxy.patch @@ -364,6 +363,9 @@ dconf update || : %{_datadir}/installed-tests/ibus %changelog +* Tue Feb 21 2023 Funda Wang - 1.5.28-1 +- New version 1.5.28 + * Sat Nov 12 2022 Funda Wang - 1.5.27-1 - New version 1.5.27