public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/ibus] autotool: Fix some downstream and upstream bugs
@ 2026-05-31  2:09 Takao Fujiwara
  0 siblings, 0 replies; only message in thread
From: Takao Fujiwara @ 2026-05-31  2:09 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/ibus
            Branch : autotool
            Commit : be5c7195f3c24d55c2ba44b6450368ea28f6bfb6
            Author : Takao Fujiwara <tfujiwar@redhat.com>
            Date   : 2025-12-21T23:42:06+09:00
            Stats  : +642/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/ibus/c/be5c7195f3c24d55c2ba44b6450368ea28f6bfb6?branch=autotool

            Log:
            Fix some downstream and upstream bugs

- Resolves: #2321990#c10 Keep xinit postun in ibus for back compatibility
- Resolves: #2418564 Do not install ibus-xinit in COSMIC desktop
- Resolves: #2418670 Disable X11 display in GTK3 Wayland with hibernation
- Fix GTK3 build in src/tests/ibus-keypress
- Add warning to clean VALA files in configure
- Order locale compose and user compose

---
diff --git a/ibus-HEAD.patch b/ibus-HEAD.patch
index d0f51e5..3fd2b32 100644
--- a/ibus-HEAD.patch
+++ b/ibus-HEAD.patch
@@ -1999,3 +1999,632 @@ index 6379c51d..7e9274e4 100644
 -- 
 2.51.1
 
+From 2f7a74ebef5aac2ed529304beacff25591d29044 Mon Sep 17 00:00:00 2001
+From: fujiwarat <takao.fujiwara1@gmail.com>
+Date: Thu, 4 Dec 2025 19:41:59 +0900
+Subject: [PATCH] src/tests/ibus-keypress: Fix GTK3 build
+
+BUG=https://github.com/ibus/ibus/issues/2829
+---
+ src/tests/ibus-keypress.c | 16 ++++++++++++----
+ 1 file changed, 12 insertions(+), 4 deletions(-)
+
+diff --git a/src/tests/ibus-keypress.c b/src/tests/ibus-keypress.c
+index cd8afe83..17029512 100644
+--- a/src/tests/ibus-keypress.c
++++ b/src/tests/ibus-keypress.c
+@@ -431,8 +431,11 @@ destroy_window (gpointer user_data)
+     data->source = 0;
+ 
+     g_info ("Destroying window after timeout");
++#if GTK_CHECK_VERSION (4, 0, 0)
+     gtk_window_destroy (GTK_WINDOW (data->window));
+-
++#else
++    gtk_widget_destroy (data->window);
++#endif
+     data->window = NULL;
+ 
+     return G_SOURCE_REMOVE;
+@@ -470,8 +473,9 @@ create_keypress (void)
+ #endif
+ 
+     if (!m_replay) {
+-        g_test_fail_printf ("Failed to create uinput device: %s",
+-                            error->message);
++        g_test_fail_printf ("Failed to create uinput device: %s: %s",
++                            error->message,
++                            "Probably you should run `chmod a+rw /dev/uinput`");
+         g_error_free (error);
+         return FALSE;
+     }
+@@ -741,7 +745,7 @@ test_keypress (gconstpointer user_data)
+ #if GTK_CHECK_VERSION (4, 0, 0)
+     gtk_init ();
+ #else
+-    gtk_init (data->argc, data->argv);
++    gtk_init (&data->argc, &data->argv);
+ #endif
+ 
+     g_assert ((channel =  g_io_channel_unix_new (m_pipe_engine[0])));
+@@ -770,7 +774,11 @@ test_keypress (gconstpointer user_data)
+     if (destroy_data.source)
+ 	g_source_remove (destroy_data.source);
+     if (destroy_data.window)
++#if GTK_CHECK_VERSION (4, 0, 0)
+ 	gtk_window_destroy (GTK_WINDOW (destroy_data.window));
++#else
++        gtk_widget_destroy (destroy_data.window);
++#endif
+     close (m_pipe_engine[0]);
+     close (m_pipe_engine[1]);
+ }
+-- 
+2.52.0
+
+From 7f5b5c59c9631292d41bb272b7716f5cdb356db5 Mon Sep 17 00:00:00 2001
+From: fujiwarat <takao.fujiwara1@gmail.com>
+Date: Wed, 10 Dec 2025 10:18:49 +0900
+Subject: [PATCH] ui/gtk3/propertypanel: Disable X11 display in Wayland
+
+Add a workaround until IBus panel is migrated to GTK4.
+GTK3 causes a SEGV when the session is switched to the console
+in Wayland with Ctrl-Alt-F3 because it calls
+gdk_display_get_default() by
+gdk_x11_get_xatom_by_name("Wacom Serial IDs") and the display
+is not X11.
+
+BUG=rhbz#2418670
+---
+ ui/gtk3/propertypanel.vala | 13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/ui/gtk3/propertypanel.vala b/ui/gtk3/propertypanel.vala
+index f1ecd7f7..1ba1681f 100644
+--- a/ui/gtk3/propertypanel.vala
++++ b/ui/gtk3/propertypanel.vala
+@@ -54,7 +54,18 @@ public class PropertyPanel : Gtk.Box {
+         set_visible(true);
+ 
+ #if ENABLE_XIM
+-        var display = BindingCommon.get_xdisplay();
++        Gdk.X11.Display? display = null;
++        // Disable X11 display in Wayland as a workaround.
++        // GTK3 causes a SEGV when the session is switched to the console
++        // in Wayland with Ctrl-Alt-F3 because it calls
++        // gdk_display_get_default() by
++        // gdk_x11_get_xatom_by_name("Wacom Serial IDs") and the display
++        // is not X11.
++        // Need to backport the fix to GTK3:
++        // https://gitlab.gnome.org/GNOME/gtk/-/commit/920259c2
++        // or need to migrate IBus panel to GTK4.
++        if (BindingCommon.default_is_xdisplay())
++            display = BindingCommon.get_xdisplay();
+         if (display != null) {
+             m_xdisplay = display.get_xdisplay();
+             var screen = display.get_default_screen();
+-- 
+2.52.0
+
+From b67624c79ad6c26a50194b626b329894b32367f9 Mon Sep 17 00:00:00 2001
+From: fujiwarat <takao.fujiwara1@gmail.com>
+Date: Fri, 19 Dec 2025 20:56:27 +0900
+Subject: [PATCH] configure: Add warning to run `make -C tools maintainer-clean-generic`
+
+When users specify --disable-wayland option for configure,
+the behavior effects VALA files in tools and need to
+regenerate C files but many users don't know the steps so added
+a warning in the configure output to inform to run
+`make -C tools maintainer-clean-generic` of the users.
+
+Fixes: https://github.com/ibus/ibus/commit/2bc23ed
+BUG=https://github.com/ibus/ibus/issues/2836
+---
+ configure.ac | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 401fcd27..401e5f27 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -931,6 +931,17 @@ AC_SUBST([GDBUS_CODEGEN], [`$PKG_CONFIG --variable gdbus_codegen gio-2.0`])
+ 
+ OUTPUT_TAIL=''
+ HAS_OUTPUT_TAIL=0
++AS_IF([test x"$enable_wayland" = x"no"],
++      [OUTPUT_TAIL="$OUTPUT_TAIL
++You invoked the \`configure\` script with disabled wayland option
++so you have to run
++\`make -C tools maintainer-clean-generic\` to regenerate C files with VALA
++before run \`make\`.
++"
++       HAS_OUTPUT_TAIL=1
++      ],
++      []
++)
+ AS_IF([test x"$enable_ui" != x"no" &&
+        test -f "$ac_confdir/ui/gtk3/application.c"
+       ],
+-- 
+2.52.0
+
+From 9c5ae2194e5db84c74cfc894a046f26c318dab4d Mon Sep 17 00:00:00 2001
+From: fujiwarat <takao.fujiwara1@gmail.com>
+Date: Thu, 4 Dec 2025 09:03:37 +0900
+Subject: [PATCH] src/ibuscomposetable: Order locale compose and user compose
+
+Also make CI of US compose with locale compose
+
+BUG=https://github.com/ibus/ibus/pull/2832
+---
+ src/ibuscomposetable.c        |  30 +++++-
+ src/tests/Makefile.am         |   6 ++
+ src/tests/ibus-compose.basic2 |   5 +
+ src/tests/ibus-compose.c      | 176 +++++++++++++++++++++-------------
+ src/tests/ibus-compose.env    |   7 +-
+ src/tests/ibus-compose.usmin  |   8 ++
+ src/tests/ibus-compose.usmin2 |   6 ++
+ 7 files changed, 167 insertions(+), 71 deletions(-)
+ create mode 100644 src/tests/ibus-compose.basic2
+ create mode 100644 src/tests/ibus-compose.usmin
+ create mode 100644 src/tests/ibus-compose.usmin2
+
+diff --git a/src/ibuscomposetable.c b/src/ibuscomposetable.c
+index 3c5bc51f..116d0131 100644
+--- a/src/ibuscomposetable.c
++++ b/src/ibuscomposetable.c
+@@ -1741,6 +1741,27 @@ out:
+ }
+ 
+ 
++gint
++find_system_comopse_table (gconstpointer  a,
++                           gconstpointer  b)
++{
++    IBusComposeTableEx *table_a = (IBusComposeTableEx *)a;
++    IBusComposeTableEx *table_b = (IBusComposeTableEx *)b;
++
++    if (a == b)
++        return 0;
++    else if (!a)
++        return -1;
++    g_assert (b);
++    if (table_a->is_system == table_b->is_system)
++        return 0;
++    if (table_a->is_system)
++        return 1;
++    else
++        return -1;
++}
++
++
+ /* if ibus_compose_seqs[N - 1] is an outputed compose character,
+  * ibus_compose_seqs[N * 2 - 1] is also an outputed compose character.
+  * and ibus_compose_seqs[0] to ibus_compose_seqs[0 + N - 3] are the
+@@ -1784,7 +1805,8 @@ ibus_compose_table_list_add_array (GSList        *compose_tables,
+     compose_table->n_seqs = n_seqs;
+     compose_table->id = hash;
+ 
+-    return g_slist_prepend (compose_tables, compose_table);
++    return g_slist_insert_sorted (compose_tables, compose_table,
++                                  find_system_comopse_table);
+ }
+ 
+ 
+@@ -1812,7 +1834,8 @@ ibus_compose_table_list_add_file (GSList      *compose_tables,
+                                                    &saved_version);
+     if (compose_table != NULL) {
+         compose_table->is_system = _datafile_is_system (compose_file);
+-        return g_slist_prepend (compose_tables, compose_table);
++        return g_slist_insert_sorted (compose_tables, compose_table,
++                                      find_system_comopse_table);
+     }
+ 
+ parse:
+@@ -1867,7 +1890,8 @@ parse:
+     }
+ 
+     ibus_compose_table_save_cache (compose_table);
+-    return g_slist_prepend (compose_tables, compose_table);
++    return g_slist_insert_sorted (compose_tables, compose_table,
++                                  find_system_comopse_table);
+ }
+ 
+ 
+diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
+index 19c1f14c..1a63917f 100644
+--- a/src/tests/Makefile.am
++++ b/src/tests/Makefile.am
+@@ -107,8 +107,11 @@ test_metas = $(addsuffix .test, $(_test_execs))
+ test_sources_DATA = \
+     $(test_metas) \
+     ibus-compose.basic \
++    ibus-compose.basic2 \
+     ibus-compose.emoji \
+     ibus-compose.env \
++    ibus-compose.usmin \
++    ibus-compose.usmin2 \
+     libinput-test.yml \
+     $(NULL)
+ test_sourcesdir = $(datadir)/installed-tests/ibus
+@@ -193,8 +196,11 @@ EXTRA_DIST = \
+     $(TESTS_SCRIPT) \
+     runtest \
+     ibus-compose.basic \
++    ibus-compose.basic2 \
+     ibus-compose.emoji \
+     ibus-compose.env \
++    ibus-compose.usmin \
++    ibus-compose.usmin2 \
+     ibus-compose-locales.in \
+     ibus-desktop-testing.desktop.in \
+     ibus-desktop-testing-autostart.in \
+diff --git a/src/tests/ibus-compose.basic2 b/src/tests/ibus-compose.basic2
+new file mode 100644
+index 00000000..27db9889
+--- /dev/null
++++ b/src/tests/ibus-compose.basic2
+@@ -0,0 +1,5 @@
++include "%L"
++# Symbol tests of Multi_key, quotedbl Cyrillic_zhe
++# This case swaps U04DC and U04DD in en-US
++<Multi_key> <quotedbl> <Cyrillic_zhe>   : "Ӝ"   U04DC
++<Multi_key> <quotedbl> <Cyrillic_ZHE>   : "ӝ"   U04DD
+diff --git a/src/tests/ibus-compose.c b/src/tests/ibus-compose.c
+index ed0876df..69f844b2 100644
+--- a/src/tests/ibus-compose.c
++++ b/src/tests/ibus-compose.c
+@@ -7,12 +7,15 @@
+ #define RED   "\033[0;31m"
+ #define NC    "\033[0m"
+ 
++static gchar *m_test_locale;
+ static gchar *m_test_name;
+ static gchar *m_session_name;
+ static IBusBus *m_bus;
+ static IBusComponent *m_component;
+ static gchar *m_compose_file;
++static gchar *m_no_load_compose_file;
+ static IBusComposeTableEx *m_compose_table;
++static IBusComposeTableEx *m_no_load_compose_table;
+ static IBusEngine *m_engine;
+ static gchar *m_srcdir;
+ static gboolean m_is_gtk_32bit_compose_error;
+@@ -83,7 +86,7 @@ get_compose_path ()
+     gchar *compose_path = NULL;
+ 
+     if (m_is_gtk_32bit_compose_error)
+-        g_assert (g_setenv ("LANG", m_test_name, TRUE));
++        g_assert (g_setenv ("LANG", m_test_locale, TRUE));
+ #if GLIB_CHECK_VERSION (2, 58, 0)
+     langs = g_get_language_names_with_category ("LC_CTYPE");
+ #else
+@@ -250,7 +253,17 @@ create_engine_cb (IBusFactory *factory,
+         if (m_compose_table)
+             g_assert (saved_version);
+     }
+-    g_free (compose_path);
++    g_clear_pointer (&compose_path, g_free);
++    if (m_no_load_compose_file) {
++        compose_path = g_build_filename (m_srcdir,
++                                         m_no_load_compose_file,
++                                         NULL);
++    }
++    if (compose_path) {
++        m_no_load_compose_table =
++                ibus_compose_table_new_with_file (compose_path, NULL);
++    }
++    g_clear_pointer (&compose_path, g_free);
+     return m_engine;
+ }
+ 
+@@ -313,57 +326,20 @@ window_destroy_cb (void)
+ 
+ 
+ static void
+-set_engine_cb (GObject      *object,
+-               GAsyncResult *res,
+-               gpointer      user_data)
++send_key_event (IBusComposeTableEx *compose_table)
+ {
+-    IBusBus *bus = IBUS_BUS (object);
+-#if GTK_CHECK_VERSION (4, 0, 0)
+-    GtkEventController *controller = GTK_EVENT_CONTROLLER (user_data);
+-#else
+-    GtkWidget *entry = GTK_WIDGET (user_data);
+-#endif
+-    GError *error = NULL;
+     static TestIdleData data = { .category = TEST_COMMIT_TEXT, .idle_id = 0 };
+     int i, j;
+     int index_stride;
+     IBusComposeTablePrivate *priv;
+ 
+-    if (!ibus_bus_set_global_engine_async_finish (bus, res, &error)) {
+-        g_test_fail_printf ("set engine failed: %s", error->message);
+-        g_error_free (error);
+-        return;
+-    }
+-
+-    /* ibus_im_context_focus_in() is called after GlboalEngine is set.
+-     * The focus-in/out events happen more slowly in a busy system
+-     * likes with a TMT tool.
+-     */
+-    if (is_integrated_desktop () && g_getenv ("IBUS_DAEMON_WITH_SYSTEMD")) {
+-        g_test_message ("Start tiny \"focus-in\" signal test");
+-        for (i = 0; i < 3; i++) {
+-            data.category = TEST_DELAYED_FOCUS_IN;
+-            data.idle_id = g_timeout_add_seconds (1, idle_cb, &data);
+-            g_main_loop_run (m_loop);
+-            if (data.idle_id != 0)
+-                return;
+-        }
+-        g_test_message ("End tiny \"focus-in\" signal test");
+-        data.category = TEST_COMMIT_TEXT;
+-    }
+-    if (m_compose_table == NULL) {
+-        g_test_skip ("Your locale uses en_US compose table.");
+-        idle_cb (&data);
+-        return;
+-    }
+-
+-    index_stride = m_compose_table->max_seq_len + 2;
++    index_stride = compose_table->max_seq_len + 2;
+     for (i = 0;
+-         i < (m_compose_table->n_seqs * index_stride);
++         i < (compose_table->n_seqs * index_stride);
+          i += index_stride) {
+         data.idle_id = g_timeout_add_seconds (20, idle_cb, &data);
+         for (j = i; j < i + (index_stride - 2); j++) {
+-            guint keyval = m_compose_table->data[j];
++            guint keyval = compose_table->data[j];
+             guint keycode = 0;
+             guint modifiers = 0;
+             gboolean retval;
+@@ -387,7 +363,7 @@ set_engine_cb (GObject      *object,
+             data.idle_id = 0;
+         }
+     }
+-    priv = m_compose_table->priv;
++    priv = compose_table->priv;
+     if (priv) {
+         for (i = 0;
+              i < (priv->first_n_seqs * index_stride);
+@@ -415,6 +391,54 @@ set_engine_cb (GObject      *object,
+             }
+         }
+     }
++}
++
++static void
++set_engine_cb (GObject      *object,
++               GAsyncResult *res,
++               gpointer      user_data)
++{
++    IBusBus *bus = IBUS_BUS (object);
++#if GTK_CHECK_VERSION (4, 0, 0)
++    GtkEventController *controller = GTK_EVENT_CONTROLLER (user_data);
++#else
++    GtkWidget *entry = GTK_WIDGET (user_data);
++#endif
++    GError *error = NULL;
++    static TestIdleData data = { .category = TEST_COMMIT_TEXT, .idle_id = 0 };
++    int i;
++
++    if (!ibus_bus_set_global_engine_async_finish (bus, res, &error)) {
++        g_test_fail_printf ("set engine failed: %s", error->message);
++        g_error_free (error);
++        return;
++    }
++
++    /* ibus_im_context_focus_in() is called after GlboalEngine is set.
++     * The focus-in/out events happen more slowly in a busy system
++     * likes with a TMT tool.
++     */
++    if (is_integrated_desktop () && g_getenv ("IBUS_DAEMON_WITH_SYSTEMD")) {
++        g_test_message ("Start tiny \"focus-in\" signal test");
++        for (i = 0; i < 3; i++) {
++            data.category = TEST_DELAYED_FOCUS_IN;
++            data.idle_id = g_timeout_add_seconds (1, idle_cb, &data);
++            g_main_loop_run (m_loop);
++            if (data.idle_id != 0)
++                return;
++        }
++        g_test_message ("End tiny \"focus-in\" signal test");
++        data.category = TEST_COMMIT_TEXT;
++    }
++    if (m_compose_table == NULL) {
++        g_test_skip ("Your locale uses en_US compose table.");
++        idle_cb (&data);
++        return;
++    }
++
++    send_key_event (m_compose_table);
++    if (m_no_load_compose_table)
++        send_key_event (m_no_load_compose_table);
+ 
+ #if GTK_CHECK_VERSION (4, 0, 0)
+     g_signal_handlers_disconnect_by_func (
+@@ -547,6 +571,7 @@ window_inserted_text_cb (GtkEntryBuffer *buffer,
+     static int n_loop = 0;
+ #endif
+     static guint stride = 0;
++    static gboolean start_no_load_compose = FALSE;
+     static gboolean enable_32bit = FALSE;
+     guint i;
+     int seq;
+@@ -555,12 +580,17 @@ window_inserted_text_cb (GtkEntryBuffer *buffer,
+ #if ! GTK_CHECK_VERSION (4, 0, 0)
+     GtkEntry *entry = GTK_ENTRY (user_data);
+ #endif
++    IBusComposeTableEx *compose_table = NULL;
+     IBusComposeTablePrivate *priv;
+     static TestIdleData data = { .category = TEST_COMMIT_TEXT, .idle_id = 0 };
+ 
+     g_assert (m_compose_table != NULL);
+ 
+-    priv = m_compose_table->priv;
++    if (!start_no_load_compose)
++        compose_table = m_compose_table;
++    else
++        compose_table = m_no_load_compose_table;
++    priv = compose_table->priv;
+ 
+ #if !GTK_CHECK_VERSION (3, 22, 16)
+     if (n_loop % 2 == 1) {
+@@ -572,12 +602,12 @@ window_inserted_text_cb (GtkEntryBuffer *buffer,
+     if (code == 0)
+         return;
+ #endif
+-    i = stride + (m_compose_table->max_seq_len + 2) - 2;
+-    seq = (i + 2) / (m_compose_table->max_seq_len + 2);
+-    if (!enable_32bit && !m_compose_table->n_seqs && priv)
++    i = stride + (compose_table->max_seq_len + 2) - 2;
++    seq = (i + 2) / (compose_table->max_seq_len + 2);
++    if (!enable_32bit && !compose_table->n_seqs && priv)
+         enable_32bit = TRUE;
+     if (!enable_32bit) {
+-        if (m_compose_table->data[i] == code) {
++        if (compose_table->data[i] == code) {
+             test = GREEN "PASS" NC;
+         } else {
+             test = RED "FAIL" NC;
+@@ -585,9 +615,9 @@ window_inserted_text_cb (GtkEntryBuffer *buffer,
+         }
+         g_test_message ("%05d/%05d %s expected: %04X typed: %04X",
+                         seq,
+-                        m_compose_table->n_seqs,
++                        compose_table->n_seqs,
+                         test,
+-                        m_compose_table->data[i],
++                        compose_table->data[i],
+                         code);
+     } else {
+         const gchar *p = chars;
+@@ -619,13 +649,18 @@ window_inserted_text_cb (GtkEntryBuffer *buffer,
+                         valid_output ? g_utf8_get_char (chars) : code);
+     }
+ 
+-    stride += m_compose_table->max_seq_len + 2;
++    stride += compose_table->max_seq_len + 2;
+ 
+-    if (!enable_32bit && seq == m_compose_table->n_seqs) {
++    if (!enable_32bit && seq == compose_table->n_seqs) {
+         if (priv) {
+             enable_32bit = TRUE;
+             stride = 0;
+             seq = 0;
++        } else if (!start_no_load_compose && m_no_load_compose_table) {
++            start_no_load_compose = TRUE;
++            enable_32bit = FALSE;
++            stride = 0;
++            seq = 0;
+         } else {
+             /* Finish tests */
+             idle_cb (&data);
+@@ -633,9 +668,16 @@ window_inserted_text_cb (GtkEntryBuffer *buffer,
+         }
+     }
+     if (enable_32bit && seq == priv->first_n_seqs) {
+-        /* Finish tests */
+-        idle_cb (&data);
+-        return;
++        if (!start_no_load_compose && m_no_load_compose_table) {
++            start_no_load_compose = TRUE;
++            enable_32bit = FALSE;
++            stride = 0;
++            seq = 0;
++        } else {
++            /* Finish tests */
++            idle_cb (&data);
++            return;
++        }
+     }
+ 
+ #if !GTK_CHECK_VERSION (3, 22, 16)
+@@ -777,24 +819,25 @@ main (int argc, char *argv[])
+     m_srcdir = (argc > 1 && strlen (argv[1]) < FILENAME_MAX)
+             ? g_strdup (argv[1]) : g_strdup (".");
+     m_compose_file = g_strdup (g_getenv ("COMPOSE_FILE"));
++    m_no_load_compose_file = g_strdup (g_getenv ("NO_LOAD_COMPOSE_FILE"));
+ #if GLIB_CHECK_VERSION (2, 58, 0)
+-    m_test_name = g_strdup (g_get_language_names_with_category ("LC_CTYPE")[0]);
++    m_test_locale = g_strdup (
++            g_get_language_names_with_category ("LC_CTYPE")[0]);
+ #else
+-    m_test_name = g_strdup (g_getenv ("LANG"));
++    m_test_locale = g_strdup (g_getenv ("LANG"));
+ #endif
+-    if (m_compose_file &&
+-        (!m_test_name || !g_ascii_strncasecmp (m_test_name, "en_US", 5))) {
+-        g_free (m_test_name);
+-        m_test_name = g_path_get_basename (m_compose_file);
+-    }
++    m_test_name = g_strdup_printf ("%s:%s:%s",
++            m_test_locale ? m_test_locale : "",
++            m_compose_file ? m_compose_file : "",
++            m_no_load_compose_file ? m_no_load_compose_file : "");
+     /* The parent of GtkIMContextWayland is GtkIMContextSimple and
+      * it outputs a warning of "Can't handle >16bit keyvals" in
+      * gtk/gtkcomposetable.c:parse_compose_sequence() in pt-BR locales
+      * and any warnings are treated as errors with g_test_run()
+      * So export LANG=en_US.UTF-8 for GNOME Wayland as a workaround.
+      */
+-    if (m_test_name && (!g_ascii_strncasecmp (m_test_name, "pt_BR", 5) ||
+-                        !g_ascii_strncasecmp (m_test_name, "fi_FI", 5)
++    if (m_test_locale && (!g_ascii_strncasecmp (m_test_locale, "pt_BR", 5) ||
++                          !g_ascii_strncasecmp (m_test_locale, "fi_FI", 5)
+                        )) {
+         m_is_gtk_32bit_compose_error = TRUE;
+     }
+@@ -815,5 +858,8 @@ main (int argc, char *argv[])
+ 
+     retval = g_test_run ();
+     g_free (m_test_name);
++    g_free (m_test_locale);
++    g_free (m_compose_file);
++    g_free (m_no_load_compose_file);
+     return retval;
+ }
+diff --git a/src/tests/ibus-compose.env b/src/tests/ibus-compose.env
+index 2ae99439..e2e08939 100644
+--- a/src/tests/ibus-compose.env
++++ b/src/tests/ibus-compose.env
+@@ -1,5 +1,6 @@
+-LANG=el_GR.UTF-8
+-LANG=fi_FI.UTF-8
+-LANG=pt_BR.UTF-8
++LANG=el_GR.UTF-8 NO_LOAD_COMPOSE_FILE=ibus-compose.usmin2
++LANG=fi_FI.UTF-8 NO_LOAD_COMPOSE_FILE=ibus-compose.usmin
++LANG=pt_BR.UTF-8 NO_LOAD_COMPOSE_FILE=ibus-compose.usmin
+ LANG=en_US.UTF-8 COMPOSE_FILE=ibus-compose.basic
++LANG=en_US.UTF-8 NO_LOAD_COMPOSE_FILE=ibus-compose.usmin COMPOSE_FILE=ibus-compose.basic2
+ LANG=en_US.UTF-8 COMPOSE_FILE=ibus-compose.emoji
+diff --git a/src/tests/ibus-compose.usmin b/src/tests/ibus-compose.usmin
+new file mode 100644
+index 00000000..0a2db541
+--- /dev/null
++++ b/src/tests/ibus-compose.usmin
+@@ -0,0 +1,8 @@
++<dead_tilde> <space>                    : "~"   asciitilde # TILDE
++<dead_tilde> <dead_tilde>               : "~"   asciitilde # TILDE
++<dead_tilde> <a>                        : "ã"   atilde # LATIN SMALL LETTER A WITH TILDE
++<Multi_key> <asciitilde> <a>            : "ã"   atilde # LATIN SMALL LETTER A WITH TILDE
++<dead_circumflex> <space>               : "^"   asciicircum # CIRCUMFLEX ACCENT
++<dead_circumflex> <dead_circumflex>     : "^"   asciicircum # CIRCUMFLEX ACCENT
++<dead_circumflex> <a>                   : "â"   acircumflex # LATIN SMALL LETTER A WITH CIRCUMFLEX
++<Multi_key> <asciicircum> <a>           : "â"   acircumflex # LATIN SMALL LETTER A WITH CIRCUMFLEX
+diff --git a/src/tests/ibus-compose.usmin2 b/src/tests/ibus-compose.usmin2
+new file mode 100644
+index 00000000..71f530da
+--- /dev/null
++++ b/src/tests/ibus-compose.usmin2
+@@ -0,0 +1,6 @@
++<dead_tilde> <a>                        : "ã"   atilde # LATIN SMALL LETTER A WITH TILDE
++<Multi_key> <asciitilde> <a>            : "ã"   atilde # LATIN SMALL LETTER A WITH TILDE
++<dead_circumflex> <space>               : "^"   asciicircum # CIRCUMFLEX ACCENT
++<dead_circumflex> <dead_circumflex>     : "^"   asciicircum # CIRCUMFLEX ACCENT
++<dead_circumflex> <a>                   : "â"   acircumflex # LATIN SMALL LETTER A WITH CIRCUMFLEX
++<Multi_key> <asciicircum> <a>           : "â"   acircumflex # LATIN SMALL LETTER A WITH CIRCUMFLEX
+-- 
+2.52.0
+

diff --git a/ibus.spec b/ibus.spec
index cb6d405..bc9a1f8 100644
--- a/ibus.spec
+++ b/ibus.spec
@@ -20,7 +20,7 @@
 %bcond_with    gtk4
 %endif
 
-%global ibus_xinit_condition %ibus_panel_condition
+%global ibus_xinit_condition (%pcd1 or %pcd2 or %pcd3)
 # FIXME: How to write a condition with multiple lines
 %global ibus_panel_condition (%pcd1 or %pcd2 or %pcd3 or %pcd4)
 %global pcd1 budgie-desktop or cinnamon or deepin-desktop or i3
@@ -423,6 +423,12 @@ make check \
 
 %postun
 if [ "$1" -eq 0 ]; then
+  # ibus 1.5.31 has no ibus-xinit and need to delete %%_xinputconf here
+  # for the back compatiblity for a year.
+  %{_sbindir}/alternatives --remove xinputrc %{_xinputconf} || :
+  # if alternative was set to manual, reset to auto
+  [ -L %{_sysconfdir}/alternatives/xinputrc -a "`readlink %{_sysconfdir}/alternatives/xinputrc`" = "%{_xinputconf}" ] && %{_sbindir}/alternatives --auto xinputrc || :
+
   # 'dconf update' sometimes does not update the db...
   dconf update || :
   [ -f %{_sysconfdir}/dconf/db/ibus ] && \
@@ -574,7 +580,13 @@ dconf update || :
 
 %changelog
 * Sun Dec 21 2025 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.34~alpha1-3
+- Resolves: #2321990#c10 Keep xinit postun in ibus for back compatibility
+- Resolves: #2418564 Do not install ibus-xinit in COSMIC desktop
+- Resolves: #2418670 Disable X11 display in GTK3 Wayland with hibernation
 - Resolves: #2418908 Delete Python2 and subpackage python3-ibus
+- Fix GTK3 build in src/tests/ibus-keypress
+- Add warning to clean VALA files in configure
+- Order locale compose and user compose
 
 * Wed Nov 26 2025 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.34~alpha1-2
 - Resolves: #2237664 Fix mouse position in Emojier category list

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-05-31  2:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-31  2:09 [rpms/ibus] autotool: Fix some downstream and upstream bugs Takao Fujiwara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox