From d5e41a2f279d272c605c6660017e1fb1ab293b6f Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Thu, 23 Apr 2020 22:19:54 +0000 Subject: [PATCH] import ibus-1.5.19-11.el8 --- .gitignore | 2 + .ibus.metadata | 2 + SOURCES/ibus-1385349-segv-bus-proxy.patch | 214 ++ ...us-1470673-emoji-warn-instead-assert.patch | 48 + SOURCES/ibus-1682157-ci.patch | 2393 +++++++++++++++++ .../ibus-1750836-server-auth-observer.patch | 179 ++ SOURCES/ibus-2076-fix-16-candidates.patch | 26 + SOURCES/ibus-HEAD.patch | 920 +++++++ SOURCES/ibus-xinput | 18 + SOURCES/ibus-xx-emoji-compose.patch | 134 + SOURCES/ibus-xx-setup-env.patch | 60 + SOURCES/ibus.conf.5 | 73 + SPECS/ibus.spec | 1618 +++++++++++ 13 files changed, 5687 insertions(+) create mode 100644 .gitignore create mode 100644 .ibus.metadata create mode 100644 SOURCES/ibus-1385349-segv-bus-proxy.patch create mode 100644 SOURCES/ibus-1470673-emoji-warn-instead-assert.patch create mode 100644 SOURCES/ibus-1682157-ci.patch create mode 100644 SOURCES/ibus-1750836-server-auth-observer.patch create mode 100644 SOURCES/ibus-2076-fix-16-candidates.patch create mode 100644 SOURCES/ibus-HEAD.patch create mode 100644 SOURCES/ibus-xinput create mode 100644 SOURCES/ibus-xx-emoji-compose.patch create mode 100644 SOURCES/ibus-xx-setup-env.patch create mode 100644 SOURCES/ibus.conf.5 create mode 100644 SPECS/ibus.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..da491fc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +SOURCES/ibus-1.5.19.tar.gz +SOURCES/ibus-po-1.5.19-20180822.tar.gz diff --git a/.ibus.metadata b/.ibus.metadata new file mode 100644 index 0000000..9765a27 --- /dev/null +++ b/.ibus.metadata @@ -0,0 +1,2 @@ +fdda025d81247e40ad7acf953c2a0a606d18e965 SOURCES/ibus-1.5.19.tar.gz +36b017eddba8bc0dd970acaa2cab41d0053d6c9f SOURCES/ibus-po-1.5.19-20180822.tar.gz diff --git a/SOURCES/ibus-1385349-segv-bus-proxy.patch b/SOURCES/ibus-1385349-segv-bus-proxy.patch new file mode 100644 index 0000000..f206eda --- /dev/null +++ b/SOURCES/ibus-1385349-segv-bus-proxy.patch @@ -0,0 +1,214 @@ +From 865b204f1c06b782cf7b4a479b358e76f4b3dfee Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Tue, 17 Jul 2018 13:39:30 +0900 +Subject: [PATCH] bus: Fix SEGV in bus_panel_proxy_focus_in() + +BUG=rhbz#1349148 +BUG=rhbz#1385349 +BUG=rhbz#1350291 +BUG=rhbz#1406699 +BUG=rhbz#1432252 +BUG=rhbz#1601577 +--- + bus/dbusimpl.c | 38 ++++++++++++++++++++++++++++++++------ + bus/engineproxy.c | 5 ++++- + bus/ibusimpl.c | 21 ++++++++++++++++++--- + 3 files changed, 54 insertions(+), 10 deletions(-) + +diff --git a/bus/dbusimpl.c b/bus/dbusimpl.c +index b54ef817..e4dd8683 100644 +--- a/bus/dbusimpl.c ++++ b/bus/dbusimpl.c +@@ -2,7 +2,8 @@ + /* vim:set et sts=4: */ + /* ibus - The Input Bus + * Copyright (C) 2008-2013 Peng Huang +- * Copyright (C) 2008-2013 Red Hat, Inc. ++ * Copyright (C) 2015-2017 Takao Fujiwara ++ * Copyright (C) 2008-2017 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public +@@ -344,6 +345,8 @@ bus_name_service_set_primary_owner (BusNameService *service, + BusConnectionOwner *owner, + BusDBusImpl *dbus) + { ++ gboolean has_old_owner = FALSE; ++ + g_assert (service != NULL); + g_assert (owner != NULL); + g_assert (dbus != NULL); +@@ -351,6 +354,13 @@ bus_name_service_set_primary_owner (BusNameService *service, + BusConnectionOwner *old = service->owners != NULL ? + (BusConnectionOwner *)service->owners->data : NULL; + ++ /* rhbz#1432252 If bus_connection_get_unique_name() == NULL, ++ * "Hello" method is not received yet. ++ */ ++ if (old != NULL && bus_connection_get_unique_name (old->conn) != NULL) { ++ has_old_owner = TRUE; ++ } ++ + if (old != NULL) { + g_signal_emit (dbus, + dbus_signals[NAME_LOST], +@@ -370,7 +380,8 @@ bus_name_service_set_primary_owner (BusNameService *service, + 0, + owner->conn, + service->name, +- old != NULL ? bus_connection_get_unique_name (old->conn) : "", ++ has_old_owner ? bus_connection_get_unique_name (old->conn) : ++ "", + bus_connection_get_unique_name (owner->conn)); + + if (old != NULL && old->do_not_queue != 0) { +@@ -427,6 +438,7 @@ bus_name_service_remove_owner (BusNameService *service, + BusDBusImpl *dbus) + { + GSList *owners; ++ gboolean has_new_owner = FALSE; + + g_assert (service != NULL); + g_assert (owner != NULL); +@@ -439,6 +451,13 @@ bus_name_service_remove_owner (BusNameService *service, + BusConnectionOwner *_new = NULL; + if (owners->next != NULL) { + _new = (BusConnectionOwner *)owners->next->data; ++ /* rhbz#1406699 If bus_connection_get_unique_name() == NULL, ++ * "Hello" method is not received yet. ++ */ ++ if (_new != NULL && ++ bus_connection_get_unique_name (_new->conn) != NULL) { ++ has_new_owner = TRUE; ++ } + } + + if (dbus != NULL) { +@@ -447,7 +466,7 @@ bus_name_service_remove_owner (BusNameService *service, + 0, + owner->conn, + service->name); +- if (_new != NULL) { ++ if (has_new_owner) { + g_signal_emit (dbus, + dbus_signals[NAME_ACQUIRED], + 0, +@@ -460,7 +479,7 @@ bus_name_service_remove_owner (BusNameService *service, + _new != NULL ? _new->conn : NULL, + service->name, + bus_connection_get_unique_name (owner->conn), +- _new != NULL ? bus_connection_get_unique_name (_new->conn) : ""); ++ has_new_owner ? bus_connection_get_unique_name (_new->conn) : ""); + + } + } +@@ -1464,13 +1483,20 @@ bus_dbus_impl_connection_filter_cb (GDBusConnection *dbus_connection, + gboolean incoming, + gpointer user_data) + { ++ BusDBusImpl *dbus; ++ BusConnection *connection; ++ + g_assert (G_IS_DBUS_CONNECTION (dbus_connection)); + g_assert (G_IS_DBUS_MESSAGE (message)); + g_assert (BUS_IS_DBUS_IMPL (user_data)); + +- BusDBusImpl *dbus = (BusDBusImpl *) user_data; +- BusConnection *connection = bus_connection_lookup (dbus_connection); ++ if (g_dbus_connection_is_closed (dbus_connection)) ++ return NULL; ++ ++ dbus = (BusDBusImpl *) user_data; ++ connection = bus_connection_lookup (dbus_connection); + g_assert (connection != NULL); ++ g_assert (BUS_IS_CONNECTION (connection)); + + if (incoming) { + /* is incoming message */ +diff --git a/bus/engineproxy.c b/bus/engineproxy.c +index 2d98995c..d661673a 100644 +--- a/bus/engineproxy.c ++++ b/bus/engineproxy.c +@@ -665,6 +665,7 @@ bus_engine_proxy_new_internal (const gchar *path, + IBusEngineDesc *desc, + GDBusConnection *connection) + { ++ GError *error = NULL; + g_assert (path); + g_assert (IBUS_IS_ENGINE_DESC (desc)); + g_assert (G_IS_DBUS_CONNECTION (connection)); +@@ -673,7 +674,7 @@ bus_engine_proxy_new_internal (const gchar *path, + BusEngineProxy *engine = + (BusEngineProxy *) g_initable_new (BUS_TYPE_ENGINE_PROXY, + NULL, +- NULL, ++ &error, + "desc", desc, + "g-connection", connection, + "g-interface-name", IBUS_INTERFACE_ENGINE, +@@ -681,6 +682,8 @@ bus_engine_proxy_new_internal (const gchar *path, + "g-default-timeout", g_gdbus_timeout, + "g-flags", flags, + NULL); ++ /* FIXME: rhbz#1601577 */ ++ g_assert_no_error (error); + const gchar *layout = ibus_engine_desc_get_layout (desc); + if (layout != NULL && layout[0] != '\0') { + engine->keymap = ibus_keymap_get (layout); +diff --git a/bus/ibusimpl.c b/bus/ibusimpl.c +index ec1caea8..9ae3751b 100644 +--- a/bus/ibusimpl.c ++++ b/bus/ibusimpl.c +@@ -484,13 +484,16 @@ _dbus_name_owner_changed_cb (BusDBusImpl *dbus, + else if (!g_strcmp0 (name, IBUS_SERVICE_PANEL_EXTENSION_EMOJI)) + panel_type = PANEL_TYPE_EXTENSION_EMOJI; + +- if (panel_type != PANEL_TYPE_NONE) { ++ do { ++ if (panel_type == PANEL_TYPE_NONE) ++ break; + if (g_strcmp0 (new_name, "") != 0) { + /* a Panel process is started. */ + BusConnection *connection; + BusInputContext *context = NULL; + BusPanelProxy **panel = (panel_type == PANEL_TYPE_PANEL) ? + &ibus->panel : &ibus->emoji_extension; ++ GDBusConnection *dbus_connection = NULL; + + if (*panel != NULL) { + ibus_proxy_destroy ((IBusProxy *)(*panel)); +@@ -499,9 +502,21 @@ _dbus_name_owner_changed_cb (BusDBusImpl *dbus, + g_assert (*panel == NULL); + } + +- connection = bus_dbus_impl_get_connection_by_name (BUS_DEFAULT_DBUS, new_name); ++ connection = bus_dbus_impl_get_connection_by_name (BUS_DEFAULT_DBUS, ++ new_name); + g_return_if_fail (connection != NULL); + ++ dbus_connection = bus_connection_get_dbus_connection (connection); ++ /* rhbz#1349148 rhbz#1385349 ++ * Avoid SEGV of BUS_IS_PANEL_PROXY (ibus->panel) ++ * This function is called during destroying the connection ++ * in this case? */ ++ if (dbus_connection == NULL || ++ g_dbus_connection_is_closed (dbus_connection)) { ++ new_name = ""; ++ break; ++ } ++ + *panel = bus_panel_proxy_new (connection, panel_type); + if (panel_type == PANEL_TYPE_EXTENSION_EMOJI) + ibus->enable_emoji_extension = FALSE; +@@ -555,7 +570,7 @@ _dbus_name_owner_changed_cb (BusDBusImpl *dbus, + } + } + } +- } ++ } while (0); + + bus_ibus_impl_component_name_owner_changed (ibus, name, old_name, new_name); + } +-- +2.17.1 + diff --git a/SOURCES/ibus-1470673-emoji-warn-instead-assert.patch b/SOURCES/ibus-1470673-emoji-warn-instead-assert.patch new file mode 100644 index 0000000..35710f8 --- /dev/null +++ b/SOURCES/ibus-1470673-emoji-warn-instead-assert.patch @@ -0,0 +1,48 @@ +From 0f5084e07c215d74adc4eeeda40b374855cce59a Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Fri, 11 Jan 2019 12:56:42 +0900 +Subject: [PATCH] src/ibuscomposetable: Replace assert with warning for + .XCompose + +BUG=rhbz#1470673 +--- + src/ibuscomposetable.c | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/src/ibuscomposetable.c b/src/ibuscomposetable.c +index b843e7e1..1c0ece41 100644 +--- a/src/ibuscomposetable.c ++++ b/src/ibuscomposetable.c +@@ -1,7 +1,7 @@ + /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ + /* ibus - The Input Bus + * Copyright (C) 2013-2014 Peng Huang +- * Copyright (C) 2013-2018 Takao Fujiwara ++ * Copyright (C) 2013-2019 Takao Fujiwara + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public +@@ -98,14 +98,16 @@ parse_compose_value (IBusComposeData *compose_data, + uch = words[1][1]; + + /* The escaped string "\"" is separated with '\\' and '"'. */ +- if (uch == '\0' && words[2][0] == '"') ++ if (uch == '\0' && words[2][0] == '"') { + uch = '"'; + /* The escaped octal */ +- else if (uch >= '0' && uch <= '8') ++ } else if (uch >= '0' && uch <= '8') { + uch = g_ascii_strtoll(words[1] + 1, NULL, 8); + /* If we need to handle other escape sequences. */ +- else if (uch != '\\') +- g_assert_not_reached (); ++ } else if (uch != '\\') { ++ g_warning ("Invalid backslash: %s: %s", val, line); ++ goto fail; ++ } + } + + if (g_utf8_get_char (g_utf8_next_char (words[1])) > 0) { +-- +2.21.0 + diff --git a/SOURCES/ibus-1682157-ci.patch b/SOURCES/ibus-1682157-ci.patch new file mode 100644 index 0000000..28dc8ed --- /dev/null +++ b/SOURCES/ibus-1682157-ci.patch @@ -0,0 +1,2393 @@ +From c360cbd830943a4bfb0ece9cc07b99a426dc2121 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Mon, 9 Apr 2018 11:57:09 +0900 +Subject: [PATCH] src/tests: Add ibus-compose.env + +--- + src/tests/ibus-compose.env | 3 +++ + 1 file changed, 3 insertions(+) + create mode 100644 src/tests/ibus-compose.env + +diff --git a/src/tests/ibus-compose.env b/src/tests/ibus-compose.env +new file mode 100644 +index 00000000..734ab8fa +--- /dev/null ++++ b/src/tests/ibus-compose.env +@@ -0,0 +1,3 @@ ++LANG=el_GR.UTF-8 ++LANG=fi_FI.UTF-8 ++LANG=pt_BR.UTF-8 +-- +2.21.0 + +From b497de5bc6525769e03b65c73fc991d4aa006223 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Wed, 20 Mar 2019 17:44:26 +0900 +Subject: [PATCH] test: Set GTK_IM_MODULE in test-console.sh + +--- + src/tests/Makefile.am | 4 ++-- + 2 files changed, 14 insertions(+), 2 deletions(-) + +diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am +index e337a59b..e2ff5ea7 100644 +--- a/src/tests/Makefile.am ++++ b/src/tests/Makefile.am +@@ -3,7 +3,7 @@ + # ibus - The Input Bus + # + # Copyright (c) 2007-2015 Peng Huang +-# Copyright (c) 2015-2018 Takao Fujiwara ++# Copyright (c) 2015-2019 Takao Fujiwara + # Copyright (c) 2007-2018 Red Hat, Inc. + # + # This library is free software; you can redistribute it and/or +@@ -78,7 +78,7 @@ TESTS_ENVIRONMENT = \ + + LOG_COMPILER = $(srcdir)/runtest + +-EXTRA_DIST = runtest ++EXTRA_DIST = runtest ibus-compose.env + + ibus_bus_SOURCES = ibus-bus.c + ibus_bus_LDADD = $(prog_ldadd) +-- +2.21.0 + +From ac492f31b435b9464d591094d470bc94027168e8 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Fri, 28 Jun 2019 21:15:07 +0900 +Subject: [PATCH] src/tests: Fix ibus-compose for IBusComposeTableEx + +Recently IBusComposeTablEx has been integrated and the return value of +ibus_compose_table_new_with_file() is also changed and ibus-compose +needs to be updated. + +Clear IBusComposeTablePrivate in ibus_compose_table_list_add_array() +for the ibus-compose testing. + +Clear compose_buffer in IBusEngineSimple. + +Use g_get_language_names_with_category instead() of g_get_locale_variants(). + +Add ibus-compose.emoji for the tests of long compose sequences and +multiple compose output characters. + +IBUS_COMPOSE_CACHE_DIR variable is added for the temporary caches. +--- + src/ibuscomposetable.c | 15 ++-- + src/tests/Makefile.am | 2 +- + src/tests/ibus-compose.c | 10 +++ + src/tests/ibus-compose.emoji | 11 +++ + src/tests/ibus-compose.env | 1 + + src/tests/runtest | 4 +- + 9 files changed, 174 insertions(+), 47 deletions(-) + create mode 100644 src/tests/ibus-compose.emoji + +diff --git a/src/ibuscomposetable.c b/src/ibuscomposetable.c +index 4ac54e25..5fd37f10 100644 +--- a/src/ibuscomposetable.c ++++ b/src/ibuscomposetable.c +@@ -497,13 +497,18 @@ static gchar * + ibus_compose_hash_get_cache_path (guint32 hash) + { + gchar *basename = NULL; ++ const gchar *cache_dir; + gchar *dir = NULL; + gchar *path = NULL; + + basename = g_strdup_printf ("%08x.cache", hash); + +- dir = g_build_filename (g_get_user_cache_dir (), +- "ibus", "compose", NULL); ++ if ((cache_dir = g_getenv ("IBUS_COMPOSE_CACHE_DIR"))) { ++ dir = g_strdup (cache_dir); ++ } else { ++ dir = g_build_filename (g_get_user_cache_dir (), ++ "ibus", "compose", NULL); ++ } + path = g_build_filename (dir, basename, NULL); + if (g_mkdir_with_parents (dir, 0755) != 0) { + g_warning ("Failed to mkdir %s", dir); +@@ -1068,7 +1073,7 @@ ibus_compose_table_list_add_array (GSList *compose_tables, + for (i = 0; i < length; i++) + ibus_compose_seqs[i] = data[i]; + +- compose_table = g_new (IBusComposeTable, 1); ++ compose_table = g_new0 (IBusComposeTable, 1); + compose_table->data = ibus_compose_seqs; + compose_table->max_seq_len = max_seq_len; + compose_table->n_seqs = n_seqs; +diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am +index e2ff5ea7..a58504a3 100644 +--- a/src/tests/Makefile.am ++++ b/src/tests/Makefile.am +@@ -78,7 +78,7 @@ TESTS_ENVIRONMENT = \ + + LOG_COMPILER = $(srcdir)/runtest + +-EXTRA_DIST = runtest ibus-compose.env ++EXTRA_DIST = runtest ibus-compose.emoji ibus-compose.env + + ibus_bus_SOURCES = ibus-bus.c + ibus_bus_LDADD = $(prog_ldadd) +diff --git a/src/tests/ibus-compose.c b/src/tests/ibus-compose.c +index e2ff5ea7..a58504a3 100644 +--- a/src/tests/ibus-compose.c ++++ b/src/tests/ibus-compose.c +@@ -7,8 +7,10 @@ + #define NC "\033[0m" + + IBusBus *m_bus; ++gchar *m_compose_file; + IBusComposeTable *m_compose_table; + IBusEngine *m_engine; ++gchar *m_srcdir; + int m_retval; + + static gboolean window_focus_in_event_cb (GtkWidget *entry, +@@ -31,8 +33,11 @@ create_engine_cb (IBusFactory *factory, + engine_path, + ibus_bus_get_connection (m_bus)); + g_free (engine_path); +- langs = g_get_language_names (); +- for (l = langs; *l; l++) { ++ if (m_compose_file) { ++ compose_path = g_build_filename (m_srcdir, m_compose_file, NULL); ++ } else { ++ langs = g_get_language_names (); ++ for (l = langs; *l; l++) { + if (g_str_has_prefix (*l, "en_US")) + break; + if (g_strcmp0 (*l, "C") == 0) +@@ -41,10 +46,11 @@ create_engine_cb (IBusFactory *factory, + *l, + "Compose", + NULL); + if (g_file_test (compose_path, G_FILE_TEST_EXISTS)) + break; + g_free (compose_path); + compose_path = NULL; ++ } + } + if (compose_path != NULL) { + m_compose_table = ibus_compose_table_new_with_file (compose_path); +@@ -248,6 +254,9 @@ main (int argc, char *argv[]) + ibus_init (); + gtk_init (&argc, &argv); + ++ m_srcdir = argc > 1 ? g_strdup (argv[1]) : g_strdup ("."); ++ m_compose_file = g_strdup (g_getenv ("COMPOSE_FILE")); ++ + if (!register_ibus_engine ()) + return -1; + +diff --git a/src/tests/ibus-compose.emoji b/src/tests/ibus-compose.emoji +new file mode 100644 +index 00000000..7fbf82cf +--- /dev/null ++++ b/src/tests/ibus-compose.emoji +@@ -0,0 +1,2 @@ ++ : "♌" U264C # LEO ++ : "∫" +diff --git a/src/tests/ibus-compose.env b/src/tests/ibus-compose.env +index 734ab8fa..a9e289e4 100644 +--- a/src/tests/ibus-compose.env ++++ b/src/tests/ibus-compose.env +@@ -1,3 +1,4 @@ + LANG=el_GR.UTF-8 + LANG=fi_FI.UTF-8 + LANG=pt_BR.UTF-8 ++LANG=en_US.UTF-8 COMPOSE_FILE=ibus-compose.emoji +diff --git a/src/tests/runtest b/src/tests/runtest +index 4e980c71..35ccc5a0 100755 +--- a/src/tests/runtest ++++ b/src/tests/runtest +@@ -184,7 +184,9 @@ run_test_case() + export GTK_IM_MODULE=ibus + fi + +- "../$tst" ${1+"$@"} ++ export IBUS_COMPOSE_CACHE_DIR=$PWD ++ ++ "../$tst" ../$top_srcdir/src/tests ${1+"$@"} + + retval=`expr $retval \| $?` + +-- +2.21.0 + +From 76dec798d5cf6cdaa96c3373f9c0e1cd13eb31f5 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Fri, 28 Jun 2019 21:28:32 +0900 +Subject: [PATCH] src/tests: Use GTest for ibus-compose + +--- + src/tests/ibus-compose.c | 45 ++++++++++++++++++++++++++++------------ + 1 file changed, 32 insertions(+), 13 deletions(-) + +diff --git a/src/tests/ibus-compose.c b/src/tests/ibus-compose.c +index e1911b32..09c687c2 100644 +--- a/src/tests/ibus-compose.c ++++ b/src/tests/ibus-compose.c +@@ -11,7 +11,6 @@ gchar *m_compose_file; + IBusComposeTable *m_compose_table; + IBusEngine *m_engine; + gchar *m_srcdir; +-int m_retval; + + static gboolean window_focus_in_event_cb (GtkWidget *entry, + GdkEventFocus *event, +@@ -111,8 +110,7 @@ register_ibus_engine () + static gboolean + finit (gpointer data) + { +- m_retval = -1; +- g_warning ("time out"); ++ g_test_incomplete ("time out"); + gtk_main_quit (); + return FALSE; + } +@@ -127,7 +125,9 @@ set_engine_cb (GObject *object, GAsyncRe + int index_stride; + + if (!ibus_bus_set_global_engine_async_finish (bus, res, &error)) { +- g_warning ("set engine failed: %s", error->message); ++ gchar *msg = g_strdup_printf ("set engine failed: %s", error->message); ++ g_test_incomplete (msg); ++ g_free (msg); + g_error_free (error); + return; + } +@@ -210,7 +210,7 @@ window_inserted_text_cb (GtkEntryBuffer + test = GREEN "PASS" NC; + } else { + test = RED "FAIL" NC; +- m_retval = -1; ++ g_test_fail (); + } + g_print ("%05d/%05d %s expected: %04X typed: %04X\n", + seq, +@@ -249,20 +249,39 @@ create_window () + gtk_widget_show_all (window); + } + ++static void ++test_compose (void) ++{ ++ if (!register_ibus_engine ()) { ++ g_test_fail (); ++ return; ++ } ++ ++ create_window (); ++ gtk_main (); ++ ++} ++ + int + main (int argc, char *argv[]) + { ++ const gchar *test_name; ++ gchar *test_path; ++ + ibus_init (); ++ g_test_init (&argc, &argv, NULL); + gtk_init (&argc, &argv); + + m_srcdir = argc > 1 ? g_strdup (argv[1]) : g_strdup ("."); + m_compose_file = g_strdup (g_getenv ("COMPOSE_FILE")); ++#if GLIB_CHECK_VERSION (2, 58, 0) ++ test_name = g_get_language_names_with_category ("LC_CTYPE")[0]; ++#else ++ test_name = g_getenv ("LANG"); ++#endif ++ test_path = g_build_filename ("/ibus-compose", test_name, NULL); ++ g_test_add_func (test_path, test_compose); ++ g_free (test_path); + +- if (!register_ibus_engine ()) +- return -1; +- +- create_window (); +- gtk_main (); +- +- return m_retval; ++ return g_test_run (); + } +-- +2.21.0 + +From af00f4156b5c79c526eab18c49da80affd41ebee Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Fri, 12 Jul 2019 21:12:38 +0900 +Subject: [PATCH] src/tests: Install IBus tests into gnome-desktop-testing + +--- + configure.ac | 13 +++++++++++ + src/tests/Makefile.am | 39 ++++++++++++++++++++++++++++++- + src/tests/ibus-compose-locales.in | 23 ++++++++++++++++++ + src/tests/ibus-compose.c | 10 ++++++-- + src/tests/meta.test.in | 4 ++++ + src/tests/runtest | 4 ++-- + 6 files changed, 88 insertions(+), 5 deletions(-) + create mode 100755 src/tests/ibus-compose-locales.in + create mode 100644 src/tests/meta.test.in + +diff --git a/configure.ac b/configure.ac +index b5a87b56..f1df3ac1 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -595,6 +595,18 @@ PKG_CHECK_MODULES(XTEST, + ) + AM_CONDITIONAL([ENABLE_XTEST], [test x"$enable_xtest" = x"yes"]) + ++# --enable-install-tests ++AC_ARG_ENABLE(install-tests, ++ AS_HELP_STRING([--enable-install-tests], ++ [Enable to install tests]), ++ [enable_install_tests=$enableval], ++ [enable_install_tests=no] ++) ++AM_CONDITIONAL([ENABLE_INSTALL_TESTS], [test x"$enable_install_tests" = x"yes"]) ++if test x"$enable_install_tests" = x"no"; then ++ enable_install_tests="no (disabled, use --enable-install-tests to enable)" ++fi ++ + + # --disable-emoji-dict option. + AC_ARG_ENABLE(emoji-dict, +@@ -773,5 +785,6 @@ Build options: + Enable Unicode dict $enable_unicode_dict + UCD directory $UCD_DIR + Run test cases $enable_tests ++ Install tests $enable_install_tests + ]) + +diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am +index a58504a3..ff31111b 100644 +--- a/src/tests/Makefile.am ++++ b/src/tests/Makefile.am +@@ -78,7 +78,44 @@ TESTS_ENVIRONMENT = \ + + LOG_COMPILER = $(srcdir)/runtest + +-EXTRA_DIST = runtest ibus-compose.emoji ibus-compose.env ++if ENABLE_INSTALL_TESTS ++test_metas_in = meta.test.in ++test_execs = $(TESTS:ibus-compose=ibus-compose-locales) ++test_metas = $(addsuffix .test, $(test_execs)) ++test_sources_DATA = \ ++ $(test_metas) \ ++ ibus-compose.emoji \ ++ ibus-compose.env \ ++ $(NULL) ++test_sourcesdir = $(datadir)/installed-tests/ibus ++ ++test_execs_PROGRAMS = $(TESTS) ++if ENABLE_GTK3 ++test_execs_SCRIPTS = ibus-compose-locales ++endif ++test_execsdir = $(libexecdir)/installed-tests/ibus ++endif ++ ++$(test_metas): $(test_metas_in) $(test_programs) ++ f=`echo $@ | sed -e 's/\.test//'`; \ ++ TEST_EXEC=$(test_execsdir)/$$f; \ ++ sed -e "s|@TEST_EXEC[@]|$$TEST_EXEC|g" $(test_metas_in) > $@.tmp; \ ++ mv $@.tmp $@; \ ++ $(NULL) ++ ++ibus-compose-locales: ibus-compose-locales.in ++ SRCDIR=$(test_sourcesdir); \ ++ sed -e "s|@SRCDIR[@]|$$SRCDIR|g" $< > $@.tmp; \ ++ mv $@.tmp $@; \ ++ $(NULL) ++ ++EXTRA_DIST = \ ++ $(test_metas_in) \ ++ runtest \ ++ ibus-compose.emoji \ ++ ibus-compose.env \ ++ ibus-compose-locales.in \ ++ $(NULL) + + ibus_bus_SOURCES = ibus-bus.c + ibus_bus_LDADD = $(prog_ldadd) +diff --git a/src/tests/ibus-compose-locales.in b/src/tests/ibus-compose-locales.in +new file mode 100755 +index 00000000..8d2384d1 +--- /dev/null ++++ b/src/tests/ibus-compose-locales.in +@@ -0,0 +1,23 @@ ++#!/bin/sh ++ ++SRCDIR=@SRCDIR@ ++BUILDDIR=`dirname $0` ++ ++ ++export IBUS_COMPOSE_CACHE_DIR=$PWD ++ ++for var in `cat $SRCDIR/ibus-compose.env` ++do ++ IS_COMMENT=`echo "$var" | grep "^#"` ++ if [ "x$IS_COMMENT" != x ] ; then ++ continue ++ fi ++ env $var $BUILDDIR/ibus-compose $SRCDIR $@ ++ ++ CACHE_FILES=`ls *.cache` ++ if [ x"$CACHE_FILES" != x ] ; then ++ echo "Clean $CACHE_FILES" ++ rm $CACHE_FILES ++ fi ++done ++ +diff --git a/src/tests/ibus-compose.c b/src/tests/ibus-compose.c +index 09c687c2..c8d3c126 100644 +--- a/src/tests/ibus-compose.c ++++ b/src/tests/ibus-compose.c +@@ -351,6 +347,14 @@ main (int argc, char *argv[]) + + ibus_init (); + g_test_init (&argc, &argv, NULL); ++ /* FIXME: ++ * IBusIMContext opens GtkIMContextSimple as the slave and ++ * GtkIMContextSimple opens the compose table on el_GR.UTF-8, and the ++ * multiple outputs in el_GR's compose causes a warning in gtkcomposetable ++ * and the warning always causes a fatal in GTest: ++ " "GTK+ supports to output one char only: " ++ */ ++ g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL); + gtk_init (&argc, &argv); + + m_srcdir = argc > 1 ? g_strdup (argv[1]) : g_strdup ("."); +diff --git a/src/tests/meta.test.in b/src/tests/meta.test.in +new file mode 100644 +index 00000000..ae2b2991 +--- /dev/null ++++ b/src/tests/meta.test.in +@@ -0,0 +1,4 @@ ++[Test] ++Type=session ++Exec=@TEST_EXEC@ --tap ++Output=TAP +diff --git a/src/tests/runtest b/src/tests/runtest +index 35ccc5a0..1fcc9283 100755 +--- a/src/tests/runtest ++++ b/src/tests/runtest +@@ -200,7 +200,7 @@ if test -f $envfile ; then + ENVS="`cat $envfile`" + fi; + if test x"$ENVS" = x ; then +- run_test_case ++ run_test_case $@ + else + LANG_backup=$LANG + i=1 +@@ -212,7 +212,7 @@ else + export $e + echo "Run `func_basename $tst` on $e" + echo "=======================" +- run_test_case ++ run_test_case $@ + echo "" + i=`expr $i + 1` + done +-- +2.21.0 + +From 2a4f9518d42b618d8111fa5f9f885757524758a0 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Fri, 12 Jul 2019 21:12:40 +0900 +Subject: [PATCH] src/tests: Rename test-console.sh to + ibus-desktop-testing-runner + +--- + src/tests/Makefile.am | 9 +++++++++ + .../tests/ibus-desktop-testing-runner.in | 0 + 2 files changed, 9 insertions(+) + rename test/test-console.sh => src/tests/ibus-desktop-testing-runner.in (100%) + +diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am +index ff31111b..b9aad29a 100644 +--- a/src/tests/Makefile.am ++++ b/src/tests/Makefile.am +@@ -79,6 +79,7 @@ TESTS_ENVIRONMENT = \ + LOG_COMPILER = $(srcdir)/runtest + + if ENABLE_INSTALL_TESTS ++bin_SCRIPTS = ibus-desktop-testing-runner + test_metas_in = meta.test.in + test_execs = $(TESTS:ibus-compose=ibus-compose-locales) + test_metas = $(addsuffix .test, $(test_execs)) +@@ -109,12 +110,20 @@ ibus-compose-locales: ibus-compose-locales.in + mv $@.tmp $@; \ + $(NULL) + ++ ibus-desktop-testing-runner.in \ ++ibus-desktop-testing-runner: ibus-desktop-testing-runner.in ++ SRCDIR=$(test_sourcesdir); \ ++ sed -e "s|@SRCDIR[@]|$$SRCDIR|g" $< > $@.tmp; \ ++ mv $@.tmp $@; \ ++ $(NULL) ++ + EXTRA_DIST = \ + $(test_metas_in) \ + runtest \ + ibus-compose.emoji \ + ibus-compose.env \ + ibus-compose-locales.in \ ++ ibus-desktop-testing-runner.in \ + $(NULL) + + ibus_bus_SOURCES = ibus-bus.c +diff --git a/src/tests/ibus-desktop-testing-runner.in b/src/tests/ibus-desktop-testing-runner.in +new file mode 100755 +index 00000000..7fbf82cf +--- /dev/null ++++ b/src/tests/ibus-desktop-testing-runner.in +@@ -0,0 +1,255 @@ ++#!/bin/sh ++# -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- ++# vim:set noet ts=4: ++# ++# ibus-anthy - The Anthy engine for IBus ++# ++# Copyright (c) 2018-2019 Takao Fujiwara ++# Copyright (c) 2018 Red Hat, Inc. ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License along ++# with this program; if not, write to the Free Software Foundation, Inc., ++# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ++ ++# This test runs /usr/bin/ibus-daemon after install ibus ++# ++# # init 3 ++# Login as root ++# # /root/ibus/tests/test-console.sh --tests ibus-compose \ ++# --builddir /root/ibus/src/tests --srcdir /root/ibus/src/tests ++ ++PROGNAME=`basename $0` ++VERSION=0.1 ++DISPLAY=:99.0 ++BUILDDIR="." ++SRCDIR="." ++TEST_LOG=test-suite.log ++HAVE_GRAPHICS=1 ++DESKTOP_COMMAND="gnome-session" ++PID_XORG=0 ++PID_GNOME_SESSION=0 ++TESTS="" ++GREEN='\033[0;32m' ++RED='\033[0;31m' ++NC='\033[0m' ++ ++usage() ++{ ++ echo -e \ ++"This test runs /usr/bin/ibus-daemon after install ibus\n" \ ++"$PROGNAME [OPTIONS…]\n" \ ++"\n" \ ++"OPTIONS:\n" \ ++"-h, --help This help\n" \ ++"-v, --version Show version\n" \ ++"-b, --builddir=BUILDDIR Set the BUILDDIR\n" \ ++"-s, --srcdir=SOURCEDIR Set the SOURCEDIR\n" \ ++"-c, --no-graphics Use Xvfb instead of Xorg\n" \ ++"-d, --desktop=DESKTOP Run DESTKTOP. The default is gnome-session\n" \ ++"-t, --tests=\"TESTS...\" Run TESTS programs which is separated by space\n" \ ++"" ++} ++ ++parse_args() ++{ ++ # This is GNU getopt. "sudo port getopt" in BSD? ++ ARGS=`getopt -o hvb:s:cd:t: --long help,version,builddir:,srcdir:,no-graphics,desktop:,tests:\ ++ -- "$@"`; ++ eval set -- "$ARGS" ++ while [ 1 ] ; do ++ case "$1" in ++ -h | --help ) usage; exit 0;; ++ -v | --version ) echo -e "$VERSION"; exit 0;; ++ -b | --builddir ) BUILDDIR="$2"; shift 2;; ++ -s | --srcdir ) SRCDIR="$2"; shift 2;; ++ -c | --no-graphics ) HAVE_GRAPHICS=0; shift;; ++ -d | --desktop ) DESKTOP_COMMAND="$2"; shift 2;; ++ -t | --tests ) TESTS="$2"; shift 2;; ++ -- ) shift; break;; ++ * ) usage; exit 1;; ++ esac ++ done ++} ++ ++init_desktop() ++{ ++ if test x$FORCE_TEST != x ; then ++ RUN_ARGS="$RUN_ARGS --force" ++ fi ++ ++ if test ! -f $HOME/.config/gnome-initial-setup-done ; then ++ if test ! -f /var/lib/AccountsService/users/$USER ; then ++ mkdir -p /var/lib/AccountsService/users ++ cat >> /var/lib/AccountsService/users/$USER << _EOF ++[User] ++Language=ja_JP.UTF-8 ++XSession=gnome ++SystemAccount=false ++_EOF ++ fi ++ mkdir -p $HOME/.config ++ touch $HOME/.config/gnome-initial-setup-done ++ fi ++ ++ # Prevent from launching a XDG dialog ++ XDG_LOCALE_FILE="$HOME/.config/user-dirs.locale" ++ if test -f $XDG_LOCALE_FILE ; then ++ XDG_LANG_ORIG=`cat $XDG_LOCALE_FILE` ++ XDG_LANG_NEW=`echo $LANG | sed -e 's/\(.*\)\..*/\1/'` ++ if [ "$XDG_LANG_ORIG" != "$XDG_LANG_NEW" ] ; then ++ echo "Overriding XDG locale $XDG_LANG_ORIG with $XDG_LANG_NEW" ++ echo "$XDG_LANG_NEW" > $XDG_LOCALE_FILE ++ fi ++ fi ++} ++ ++run_dbus_daemon() ++{ ++ a=`ps -ef | grep dbus-daemon | grep "\-\-system" | grep -v session | grep -v grep` ++ if test x"$a" = x ; then ++ eval `dbus-launch --sh-syntax` ++ fi ++ SUSER=`echo "$USER" | cut -c 1-7` ++ a=`ps -ef | grep dbus-daemon | grep "$SUSER" | grep -v gdm | grep session | grep -v grep` ++ if test x"$a" = x ; then ++ systemctl --user start dbus ++ export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$UID/bus ++ fi ++ systemctl --user status dbus | col -b ++ ps -ef | grep dbus-daemon | grep "$SUSER" | grep -v gdm | egrep 'session|system' | grep -v grep ++ systemctl --user show-environment | col -b ++} ++ ++run_desktop() ++{ ++ if test $HAVE_GRAPHICS -eq 1 ; then ++ /usr/libexec/Xorg.wrap -noreset +extension GLX +extension RANDR +extension RENDER -logfile ./xorg.log -config ./xorg.conf -configdir . $DISPLAY & ++ else ++ /usr/bin/Xvfb $DISPLAY -noreset +extension GLX +extension RANDR +extension RENDER -screen 0 1280x1024x24 & ++ fi ++ PID_XORG=$! ++ sleep 1 ++ export DISPLAY=$DISPLAY ++ $DESKTOP_COMMAND & ++ PID_GNOME_SESSION=$! ++ sleep 30 ++ if test "$DESKTOP_COMMAND" != "gnome-session" ; then ++ ibus-daemon --daemonize --verbose ++ sleep 1 ++ fi ++} ++ ++count_case_result() ++{ ++ retval=$1 ++ pass=$2 ++ fail=$3 ++ ++ if test $retval -eq 0 ; then ++ pass=`expr $pass + 1` ++ else ++ fail=`expr $fail + 1` ++ fi ++ echo $pass $fail ++} ++ ++echo_case_result() ++{ ++ retval=$1 ++ tst=$2 ++ log=$3 ++ subtst=${4:-''} ++ ++ if test $retval -eq 0 ; then ++ echo -e "${GREEN}PASS${NC}: $tst $subtst" ++ else ++ echo -e "${RED}FAIL${NC}: $tst $subtst" ++ echo "FAIL: $tst $subtst" >> $TEST_LOG ++ echo "======================" >> $TEST_LOG ++ echo "" >> $TEST_LOG ++ cat "$log" >> $TEST_LOG ++ echo "" >> $TEST_LOG ++ fi ++} ++ ++run_test_suite() ++{ ++ cd `dirname $0` ++ pass=0 ++ fail=0 ++ ++ export GTK_IM_MODULE=ibus ++ export IBUS_COMPOSE_CACHE_DIR=$PWD ++ if test -f $TEST_LOG ; then ++ rm $TEST_LOG ++ fi ++ for tst in $TESTS; do ++ ENVS= ++ if test -f $SRCDIR/${tst}.env ; then ++ ENVS="`cat $SRCDIR/${tst}.env`" ++ fi ++ if test x"$ENVS" = x ; then ++ $BUILDDIR/$tst $SRCDIR >&${tst}.log ++ retval=$? ++ read pass fail << EOF ++ `count_case_result $retval $pass $fail` ++EOF ++ echo_case_result $retval $tst ${tst}.log ++ else ++ LANG_backup=$LANG ++ i=1 ++ for e in $ENVS; do ++ first=`echo "$e" | cut -c1-1` ++ if test x"$first" = x"#" ; then ++ continue ++ fi ++ export $e ++ $BUILDDIR/$tst $SRCDIR >&${tst}.${i}.log ++ retval=$? ++ read pass fail << EOF ++ `count_case_result $retval $pass $fail` ++EOF ++ echo_case_result $retval $tst ${tst}.${i}.log $e ++ i=`expr $i + 1` ++ done ++ export LANG=$LANG_backup ++ fi ++ done ++ echo "" ++ echo -e "# ${GREEN}PASS${NC}: $pass" ++ echo -e "# ${RED}FAIL${NC}: $fail" ++ if test -f ${TEST_LOG} ; then ++ echo "" ++ echo -e "${RED}See ${TEST_LOG}$NC" ++ fi ++} ++ ++finit() ++{ ++ if test "$DESKTOP_COMMAND" != "gnome-session" ; then ++ ibus exit ++ fi ++ kill $PID_GNOME_SESSION $PID_XORG ++} ++ ++main() ++{ ++ parse_args $@ ++ init_desktop ++ run_dbus_daemon ++ run_desktop ++ run_test_suite ++ finit ++} ++ ++main $@ +-- +2.21.0 + +From fa081ac8ea37d2feb7c7f395ad66e7381b4cb65b Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Fri, 12 Jul 2019 21:20:32 +0900 +Subject: [PATCH] src/tests: Use gnome-desktop-testing-runner + +--- + src/tests/Makefile.am | 4 +- + src/tests/ibus-desktop-testing-runner.in | 154 ++++++++++++++++++----- + 2 files changed, 123 insertions(+), 35 deletions(-) + +diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am +index b9aad29a..913e42fb 100644 +--- a/src/tests/Makefile.am ++++ b/src/tests/Makefile.am +@@ -105,8 +105,8 @@ $(test_metas): $(test_metas_in) $(test_programs) + $(NULL) + + ibus-compose-locales: ibus-compose-locales.in +- SRCDIR=$(test_sourcesdir); \ +- sed -e "s|@SRCDIR[@]|$$SRCDIR|g" $< > $@.tmp; \ ++ INSTALLEDDIR=$(datadir)/installed-tests; \ ++ sed -e "s|@INSTALLEDDIR[@]|$$INSTALLEDDIR|g" $< > $@.tmp; \ + mv $@.tmp $@; \ + $(NULL) + +diff --git a/src/tests/ibus-desktop-testing-runner.in b/src/tests/ibus-desktop-testing-runner.in +index 9e689634..a90c1378 100755 +--- a/src/tests/ibus-desktop-testing-runner.in ++++ b/src/tests/ibus-desktop-testing-runner.in +@@ -2,7 +2,7 @@ + # -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- + # vim:set noet ts=4: + # +-# ibus-anthy - The Anthy engine for IBus ++# ibus - The Input Bus + # + # Copyright (c) 2018-2019 Takao Fujiwara + # Copyright (c) 2018 Red Hat, Inc. +@@ -33,16 +33,32 @@ VERSION=0.1 + DISPLAY=:99.0 + BUILDDIR="." + SRCDIR="." +-TEST_LOG=test-suite.log ++TEST_LOG="test-suite.log" ++RESULT_LOG="" + HAVE_GRAPHICS=1 + DESKTOP_COMMAND="gnome-session" + PID_XORG=0 + PID_GNOME_SESSION=0 ++TESTING_RUNNER="default" + TESTS="" + GREEN='\033[0;32m' + RED='\033[0;31m' + NC='\033[0m' + ++print_log() ++{ ++ if [ x"$RESULT_LOG" != x ] ; then ++ # avoid 'echo -e' before call 'sed'. ++ if [ x"$1" = x'-e' ] ; then ++ shift ++ fi ++ NO_ESCAPE=`echo $@ | sed -e 's/\\\033\\[0;3.m//g' -e 's/\\\033\\[0m//g'` ++ echo $NO_ESCAPE >> $RESULT_LOG ++ else ++ echo $@ ++ fi ++} ++ + usage() + { + echo -e \ +@@ -57,13 +73,19 @@ usage() + "-c, --no-graphics Use Xvfb instead of Xorg\n" \ + "-d, --desktop=DESKTOP Run DESTKTOP. The default is gnome-session\n" \ + "-t, --tests=\"TESTS...\" Run TESTS programs which is separated by space\n" \ ++"-r, --runner=RUNNER Run TESTS programs with a test RUNNER.\n" \ ++" RUNNDER = gnome or default.\n" \ ++" default is an embedded runner.\n" \ ++"-o, --output=OUTPUT_FILE OUtput the log to OUTPUT_FILE\n" \ ++"-O, --result=RESULT_FILE OUtput the result to RESULT_FILE\n" \ + "" + } + + parse_args() + { + # This is GNU getopt. "sudo port getopt" in BSD? +- ARGS=`getopt -o hvb:s:cd:t: --long help,version,builddir:,srcdir:,no-graphics,desktop:,tests:\ ++ ARGS=`getopt -o hvb:s:cd:t:r:o:O: --long \ ++ help,version,builddir:,srcdir:,no-graphics,desktop:,tests:,runner:,output:,result:\ + -- "$@"`; + eval set -- "$ARGS" + while [ 1 ] ; do +@@ -75,6 +97,9 @@ parse_args() + -c | --no-graphics ) HAVE_GRAPHICS=0; shift;; + -d | --desktop ) DESKTOP_COMMAND="$2"; shift 2;; + -t | --tests ) TESTS="$2"; shift 2;; ++ -r | --runner ) TESTING_RUNNER="$2"; shift 2;; ++ -o | --output ) TEST_LOG="$2"; shift 2;; ++ -O | --result ) RESULT_LOG="$2"; shift 2;; + -- ) shift; break;; + * ) usage; exit 1;; + esac +@@ -83,18 +108,31 @@ parse_args() + + init_desktop() + { ++ if [ "$RESULT_LOG" != "" ] ; then ++ rm $RESULT_LOG ++ fi ++ if [ "$TEST_LOG" = "" ] ; then ++ print_log -e "${RED}FAIL${NC}: ${RED}ERROR${NC}: a log file is required to get return value with 'read' command" ++ abrt ++ else ++ rm $TEST_LOG ++ fi + if test x$FORCE_TEST != x ; then + RUN_ARGS="$RUN_ARGS --force" + fi + + if test ! -f $HOME/.config/gnome-initial-setup-done ; then ++ IS_SYSTEM_ACCOUNT=false ++ if [ "$USER" = "root" ] ; then ++ IS_SYSTEM_ACCOUNT=true ++ fi + if test ! -f /var/lib/AccountsService/users/$USER ; then + mkdir -p /var/lib/AccountsService/users + cat >> /var/lib/AccountsService/users/$USER << _EOF + [User] + Language=ja_JP.UTF-8 + XSession=gnome +-SystemAccount=false ++SystemAccount=$IS_SYSTEM_ACCOUNT + _EOF + fi + mkdir -p $HOME/.config +@@ -167,71 +205,120 @@ echo_case_result() + { + retval=$1 + tst=$2 +- log=$3 +- subtst=${4:-''} ++ subtst=${3:-''} + + if test $retval -eq 0 ; then +- echo -e "${GREEN}PASS${NC}: $tst $subtst" ++ print_log -e "${GREEN}PASS${NC}: $tst $subtst" + else +- echo -e "${RED}FAIL${NC}: $tst $subtst" +- echo "FAIL: $tst $subtst" >> $TEST_LOG +- echo "======================" >> $TEST_LOG +- echo "" >> $TEST_LOG +- cat "$log" >> $TEST_LOG +- echo "" >> $TEST_LOG ++ print_log -e "${RED}FAIL${NC}: $tst $subtst" ++ print_log "======================" ++ print_log "" + fi + } + +-run_test_suite() ++run_direct_test_cases() + { +- cd `dirname $0` + pass=0 + fail=0 +- +- export GTK_IM_MODULE=ibus +- export IBUS_COMPOSE_CACHE_DIR=$PWD +- if test -f $TEST_LOG ; then +- rm $TEST_LOG +- fi + for tst in $TESTS; do + ENVS= + if test -f $SRCDIR/${tst}.env ; then + ENVS="`cat $SRCDIR/${tst}.env`" + fi + if test x"$ENVS" = x ; then +- $BUILDDIR/$tst $SRCDIR >&${tst}.log ++ $BUILDDIR/$tst $SRCDIR 2>>$TEST_LOG 1>>$TEST_LOG + retval=$? + read pass fail << EOF + `count_case_result $retval $pass $fail` + EOF +- echo_case_result $retval $tst ${tst}.log ++ echo_case_result $retval $tst ++ CACHE_FILES=`ls *.cache` ++ if [ x"$CACHE_FILES" != x ] ; then ++ print_log "Clean $CACHE_FILES" ++ rm $CACHE_FILES ++ fi + else + LANG_backup=$LANG + i=1 + for e in $ENVS; do +- first=`echo "$e" | cut -c1-1` ++ first=`echo "$e" | grep '^#'` + if test x"$first" = x"#" ; then + continue + fi + export $e +- $BUILDDIR/$tst $SRCDIR >&${tst}.${i}.log ++ $BUILDDIR/$tst $SRCDIR 2>>$TEST_LOG 1>>$TEST_LOG + retval=$? + read pass fail << EOF + `count_case_result $retval $pass $fail` + EOF +- echo_case_result $retval $tst ${tst}.${i}.log $e ++ echo_case_result $retval $tst $e ++ CACHE_FILES=`ls *.cache` ++ if [ x"$CACHE_FILES" != x ] ; then ++ print_log "Clean $CACHE_FILES" ++ rm $CACHE_FILES ++ fi + i=`expr $i + 1` + done + export LANG=$LANG_backup + fi + done ++ echo $pass $fail ++} ++ ++run_gnome_desktop_testing_runner() ++{ ++ pass=0 ++ fail=0 ++ if [ x"$TESTS" = x ] ; then ++ TESTS='ibus' ++ fi ++ for tst in $TESTS; do ++ tst_dir="@INSTALLEDDIR@/$tst" ++ if [ ! -d "$tst_dir" ] ; then ++ print_log -e "${RED}FAIL${NC}: Not found %tst_dir" ++ fail=1 ++ continue ++ fi ++ gnome-desktop-testing-runner $tst 2>>$TEST_LOG 1>>$TEST_LOG ++ retval=$? ++ read pass fail << EOF ++ `count_case_result $retval $pass $fail` ++EOF ++ done ++ echo $pass $fail ++} ++ ++run_test_suite() ++{ ++ pass=0 ++ fail=0 ++ export GTK_IM_MODULE=ibus ++ export IBUS_COMPOSE_CACHE_DIR=$PWD ++ if [ x"$TESTING_RUNNER" = x ] ; then ++ TESTING_RUNNER="default" ++ fi ++ case $TESTING_RUNNER in ++ default) ++ # Get only the last value with do-while. ++ read pass fail << EOF_RUNNER ++ `run_direct_test_cases` ++EOF_RUNNER ++ ;; ++ gnome) ++ read pass fail << EOF_RUNNER ++ `run_gnome_desktop_testing_runner` ++EOF_RUNNER ++ ;; ++ esac + echo "" +- echo -e "# ${GREEN}PASS${NC}: $pass" +- echo -e "# ${RED}FAIL${NC}: $fail" +- if test -f ${TEST_LOG} ; then +- echo "" +- echo -e "${RED}See ${TEST_LOG}$NC" ++ if [ $pass -ne 0 ] ; then ++ print_log -e "${GREEN}PASS${NC}: $pass" + fi ++ if [ $fail -ne 0 ] ; then ++ print_log -e "${RED}FAIL${NC}: $fail" ++ fi ++ echo "" ++ echo "See ${TEST_LOG}" + } + + finit() +@@ -240,14 +327,15 @@ finit() + ibus exit + fi + kill $PID_GNOME_SESSION $PID_XORG ++ echo "Finished $PROGNAME testing" + } + + main() + { + parse_args $@ + init_desktop +- run_dbus_daemon +- run_desktop ++ run_dbus_daemon 2>>$TEST_LOG 1>>$TEST_LOG ++ run_desktop 2>>$TEST_LOG 1>>$TEST_LOG + run_test_suite + finit + } +-- +2.21.0 + +From 85b647a1c57c206779eb0b4b15a734c1b1f29c10 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Wed, 24 Jul 2019 17:27:37 +0900 +Subject: [PATCH] src/tests: Fix IBus test cases for gnome-desktop-testing + +- dconf/config.c: Replaced dconf_client_write_fast() with + dconf_client_write_sync() because + dconf_client_write_fast() does not syn the data when + ibus_config_get_values() is called immediately after + ibus_config_set_value() is called. + +- ibus-compose-locales.in returns the return value of ibus-compose + +- ibus-compose: Set $NO_AT_BRIDGE to suppress a AT_SPI warning + and call g_log_set_always_fatal() because GtkIMContextSimple + does not support multiple compose outputs yet and the API can + suppress a warning. + +- ibus-config: Delete async watch testings which causes several errors + with gnome-shell testing and the testing is now deprecated and + GSettings is recommended. + +- ibus-desktop-testing-runner.in: Support --output=log:stdout to + cat the log to stdout and Use dbus-launch --exit-with-session instead of + --sh-syntax and count PASS of test cases instead of PASS of + gnome-desktop-testing and always run ibus exit and kill + gnome-shell-calendar-server + +- ibus-engine-switch.c: Set xkb:jp::jpn if gnome-shell sets xkb:us::eng + +- ibus-inputcontext.c: Use ibus_bus_get_global_engine() instead of + ibus_bus_list_active_engines() since ibus_bus_list_active_engines() + does not work with gnome-shell and the API is now deprecated. + +- ibus-keypress.c: Set $NO_AT_BRIDGE to suppress a AT_SPI warning +--- + conf/dconf/config.c | 14 +- + src/tests/Makefile.am | 19 +- + src/tests/ibus-compose-locales.in | 4 +- + src/tests/ibus-compose.c | 10 +- + src/tests/ibus-config.c | 283 ----------------------- + src/tests/ibus-desktop-testing-runner.in | 77 +++--- + src/tests/ibus-engine-switch.c | 34 ++- + src/tests/ibus-inputcontext.c | 29 +-- + src/tests/ibus-keypress.c | 4 + + 9 files changed, 126 insertions(+), 348 deletions(-) + +diff --git a/conf/dconf/config.c b/conf/dconf/config.c +index 500ea1d8..30ac137d 100644 +--- a/conf/dconf/config.c ++++ b/conf/dconf/config.c +@@ -335,7 +335,19 @@ ibus_config_dconf_set_value (IBusConfigService *config, + } + + #ifdef DCONF_0_13_4 +- retval = dconf_client_write_fast (client, gkey, value, error); ++ /* Use dconf_client_write_sync() instead of dconf_client_write_fast() ++ * because dconf_client_write_fast() does not sync the data when ++ * ibus_config_get_values() is called immediately after ++ * ibus_config_set_value() is called. ++ * We won't add a new API for the sync only since IBusConfig is ++ * now deprecated and GSettings is recommended. ++ */ ++ retval = dconf_client_write_sync (client, ++ gkey, ++ value, ++ NULL, ++ NULL, ++ error); + #else + retval = dconf_client_write (client, + gkey, +diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am +index 913e42fb..2e75932c 100644 +--- a/src/tests/Makefile.am ++++ b/src/tests/Makefile.am +@@ -55,6 +55,8 @@ TESTS = \ + ibus-util \ + $(NULL) + ++CLEANFILES = ++ + if ENABLE_ENGINE + TESTS += ibus-engine-switch + endif +@@ -90,9 +92,17 @@ test_sources_DATA = \ + $(NULL) + test_sourcesdir = $(datadir)/installed-tests/ibus + ++CLEANFILES += \ ++ $(test_metas) \ ++ ibus-desktop-testing-runner \ ++ $(NULL) ++ + test_execs_PROGRAMS = $(TESTS) + if ENABLE_GTK3 + test_execs_SCRIPTS = ibus-compose-locales ++CLEANFILES += \ ++ ibus-compose-locales \ ++ $(NULL) + endif + test_execsdir = $(libexecdir)/installed-tests/ibus + endif +@@ -105,15 +115,14 @@ $(test_metas): $(test_metas_in) $(test_programs) + $(NULL) + + ibus-compose-locales: ibus-compose-locales.in +- INSTALLEDDIR=$(datadir)/installed-tests; \ +- sed -e "s|@INSTALLEDDIR[@]|$$INSTALLEDDIR|g" $< > $@.tmp; \ ++ SRCDIR=$(test_sourcesdir); \ ++ sed -e "s|@SRCDIR[@]|$$SRCDIR|g" $< > $@.tmp; \ + mv $@.tmp $@; \ + $(NULL) + +- ibus-desktop-testing-runner.in \ + ibus-desktop-testing-runner: ibus-desktop-testing-runner.in +- SRCDIR=$(test_sourcesdir); \ +- sed -e "s|@SRCDIR[@]|$$SRCDIR|g" $< > $@.tmp; \ ++ INSTALLEDDIR=$(datadir)/installed-tests; \ ++ sed -e "s|@INSTALLEDDIR[@]|$$INSTALLEDDIR|g" $< > $@.tmp; \ + mv $@.tmp $@; \ + $(NULL) + +diff --git a/src/tests/ibus-compose-locales.in b/src/tests/ibus-compose-locales.in +index 8d2384d1..fad02965 100755 +--- a/src/tests/ibus-compose-locales.in ++++ b/src/tests/ibus-compose-locales.in +@@ -6,6 +6,7 @@ BUILDDIR=`dirname $0` + + export IBUS_COMPOSE_CACHE_DIR=$PWD + ++retval=0 + for var in `cat $SRCDIR/ibus-compose.env` + do + IS_COMMENT=`echo "$var" | grep "^#"` +@@ -13,6 +14,7 @@ do + continue + fi + env $var $BUILDDIR/ibus-compose $SRCDIR $@ ++ retval=`expr $retval + $?` + + CACHE_FILES=`ls *.cache` + if [ x"$CACHE_FILES" != x ] ; then +@@ -20,4 +22,4 @@ do + rm $CACHE_FILES + fi + done +- ++exit $retval +diff --git a/src/tests/ibus-compose.c b/src/tests/ibus-compose.c +index c8d3c126..db359477 100644 +--- a/src/tests/ibus-compose.c ++++ b/src/tests/ibus-compose.c +@@ -344,20 +344,26 @@ test_compose (void) + int + main (int argc, char *argv[]) + { ++ GLogLevelFlags flags; + const gchar *test_name; + gchar *test_path; + + ibus_init (); ++ /* Avoid a warning of "AT-SPI: Could not obtain desktop path or name" ++ * with gtk_main(). ++ */ ++ g_setenv ("NO_AT_BRIDGE", "1", TRUE); + g_test_init (&argc, &argv, NULL); + /* FIXME: + * IBusIMContext opens GtkIMContextSimple as the slave and + * GtkIMContextSimple opens the compose table on el_GR.UTF-8, and the +- * multiple outputs in el_GR's compose causes a warning in gtkcomposetable ++ * multiple outputs in el_GR's compose causes a warning in gtkcomposetable + * and the warning always causes a fatal in GTest: + " "GTK+ supports to output one char only: " + */ +- g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL); ++ flags = g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL); + gtk_init (&argc, &argv); ++ g_log_set_always_fatal (flags); + + m_srcdir = argc > 1 ? g_strdup (argv[1]) : g_strdup ("."); + m_compose_file = g_strdup (g_getenv ("COMPOSE_FILE")); +diff --git a/src/tests/ibus-config.c b/src/tests/ibus-config.c +index c6141ab5..9b925ad9 100644 +--- a/src/tests/ibus-config.c ++++ b/src/tests/ibus-config.c +@@ -133,254 +133,6 @@ test_config_set_get (void) + g_object_unref (config); + } + +-typedef struct { +- GMainLoop *loop; +- guint timeout_id; +- gchar *section; +- gchar *name; +-} WatchData; +- +-typedef struct { +- gchar *section; +- gchar *name; +-} WatchKey; +- +-typedef struct { +- WatchKey *watched; /* watched keys (null-terminated) */ +- WatchKey *changed; /* changed keys (null-terminated) */ +- WatchKey *notified; /* notified keys (same length as +- changed, not null-terminated) */ +-} WatchTestData; +- +-static WatchKey default_watched[] = { +- { NULL } +-}; +-static WatchKey default_changed[] = { +- { "test/s1", "n1" }, +- { "test/s1", "n2" }, +- { "test/s2", "n1" }, +- { "test/s2", "n2" }, +- { NULL } +-}; +-static WatchKey default_notified[] = { +- { "test/s1", "n1" }, +- { "test/s1", "n2" }, +- { "test/s2", "n1" }, +- { "test/s2", "n2" } +-}; +-static WatchTestData default_data = { +- default_watched, +- default_changed, +- default_notified +-}; +- +-static WatchKey section_watched[] = { +- { "test/s1", NULL }, +- { NULL } +-}; +-static WatchKey section_notified[] = { +- { "test/s1", "n1" }, +- { "test/s1", "n2" }, +- { NULL, NULL }, +- { NULL, NULL }, +-}; +-static WatchTestData section_data = { +- section_watched, +- default_changed, +- section_notified +-}; +- +-static WatchKey section_multiple_watched[] = { +- { "test/s1", NULL }, +- { "test/s2", NULL }, +- { NULL } +-}; +-static WatchKey section_multiple_notified[] = { +- { "test/s1", "n1" }, +- { "test/s1", "n2" }, +- { "test/s2", "n1" }, +- { "test/s2", "n2" }, +-}; +-static WatchTestData section_multiple_data = { +- section_multiple_watched, +- default_changed, +- section_multiple_notified +-}; +- +-static WatchKey section_name_watched[] = { +- { "test/s1", "n1" }, +- { NULL } +-}; +-static WatchKey section_name_notified[] = { +- { "test/s1", "n1" }, +- { NULL, NULL }, +- { NULL, NULL }, +- { NULL, NULL }, +-}; +-static WatchTestData section_name_data = { +- section_name_watched, +- default_changed, +- section_name_notified +-}; +- +-static WatchKey section_name_multiple_watched[] = { +- { "test/s1", "n1" }, +- { "test/s2", "n2" }, +- { NULL } +-}; +-static WatchKey section_name_multiple_notified[] = { +- { "test/s1", "n1" }, +- { NULL, NULL }, +- { NULL, NULL }, +- { "test/s2", "n2" }, +-}; +-static WatchTestData section_name_multiple_data = { +- section_name_multiple_watched, +- default_changed, +- section_name_multiple_notified +-}; +- +-typedef struct { +- IBusConfig *config; +- WatchData data; +-} WatchFixture; +- +-static void +-value_changed_cb (IBusConfig *config, +- const gchar *section, +- const gchar *name, +- GVariant *value, +- gpointer user_data) +-{ +- WatchData *data = (WatchData *) user_data; +- +- data->section = g_strdup (section); +- data->name = g_strdup (name); +- +- g_main_loop_quit (data->loop); +-} +- +-static gboolean +-timeout_cb (gpointer user_data) +-{ +- WatchData *data = (WatchData *) user_data; +- g_main_loop_quit (data->loop); +- data->timeout_id = 0; +- return FALSE; +-} +- +-static void +-change_and_test (IBusConfig *config, +- const gchar *section, +- const gchar *name, +- const gchar *expected_section, +- const gchar *expected_name, +- WatchData *data) +-{ +- gboolean retval; +- GVariant *var; +- +- data->section = NULL; +- data->name = NULL; +- +- /* Unset won't notify value-changed signal. */ +- var = ibus_config_get_values (config, section); +- if (var != NULL) { +- GVariant *value = g_variant_lookup_value (var, name, +- G_VARIANT_TYPE_VARIANT); +- if (value != NULL) { +- ibus_config_unset (config, section, name); +- g_variant_unref (value); +- } +- g_variant_unref (var); +- } +- +- data->timeout_id = g_timeout_add (1, timeout_cb, data); +- g_main_loop_run (data->loop); +- if (data->timeout_id != 0) { +- g_source_remove (data->timeout_id); +- } +- +- retval = ibus_config_set_value (config, section, name, +- g_variant_new_int32 (1)); +- g_assert (retval); +- +- data->timeout_id = g_timeout_add (1, timeout_cb, data); +- g_main_loop_run (data->loop); +- if (data->timeout_id != 0) { +- g_source_remove (data->timeout_id); +- } +- +- g_assert_cmpstr (data->section, ==, expected_section); +- g_assert_cmpstr (data->name, ==, expected_name); +- +- g_free (data->section); +- g_free (data->name); +-} +- +-static void +-watch_fixture_setup (WatchFixture *fixture, gconstpointer user_data) +-{ +- fixture->config = ibus_config_new (ibus_bus_get_connection (bus), +- NULL, +- NULL); +- g_assert (fixture->config); +- +- fixture->data.loop = g_main_loop_new (NULL, FALSE); +- g_signal_connect (fixture->config, "value-changed", +- G_CALLBACK (value_changed_cb), &fixture->data); +-} +- +-static void +-watch_fixture_teardown (WatchFixture *fixture, gconstpointer user_data) +-{ +- g_main_loop_unref (fixture->data.loop); +- +- ibus_proxy_destroy (IBUS_PROXY (fixture->config)); +- g_object_unref (fixture->config); +-} +- +-static void +-test_config_watch (WatchFixture *fixture, gconstpointer user_data) +-{ +- const WatchTestData *data = user_data; +- gint i; +- +- for (i = 0; data->watched[i].section != NULL; i++) { +- ibus_config_watch (fixture->config, +- data->watched[i].section, +- data->watched[i].name); +- } +- for (i = 0; data->changed[i].section != NULL; i++) { +- change_and_test (fixture->config, +- data->changed[i].section, +- data->changed[i].name, +- data->notified[i].section, +- data->notified[i].name, +- &fixture->data); +- } +- for (i = 0; data->watched[i].section != NULL; i++) { +- ibus_config_unwatch (fixture->config, +- data->watched[i].section, +- data->watched[i].name); +- } +- if (i > 0) { +- /* Check if the above unwatch takes effect. */ +- for (i = 0; data->changed[i].section != NULL; i++) { +- change_and_test (fixture->config, +- data->changed[i].section, +- data->changed[i].name, +- NULL, +- NULL, +- &fixture->data); +- } +- } else { +- /* Since we reuse single D-Bus connection, we need to remove the +- default match rule for the next ibus_config_new() call. */ +- ibus_config_unwatch (fixture->config, NULL, NULL); +- } +-} +- + gint + main (gint argc, + gchar **argv) +@@ -390,41 +142,6 @@ main (gint argc, + g_test_init (&argc, &argv, NULL); + bus = ibus_bus_new (); + +- g_test_add ("/ibus/config-watch/default", +- WatchFixture, +- &default_data, +- watch_fixture_setup, +- test_config_watch, +- watch_fixture_teardown); +- +- g_test_add ("/ibus/config-watch/section", +- WatchFixture, +- §ion_data, +- watch_fixture_setup, +- test_config_watch, +- watch_fixture_teardown); +- +- g_test_add ("/ibus/config-watch/section-multiple", +- WatchFixture, +- §ion_multiple_data, +- watch_fixture_setup, +- test_config_watch, +- watch_fixture_teardown); +- +- g_test_add ("/ibus/config-watch/section-name", +- WatchFixture, +- §ion_name_data, +- watch_fixture_setup, +- test_config_watch, +- watch_fixture_teardown); +- +- g_test_add ("/ibus/config-watch/section-name-multiple", +- WatchFixture, +- §ion_name_multiple_data, +- watch_fixture_setup, +- test_config_watch, +- watch_fixture_teardown); +- + g_test_add_func ("/ibus/create-config-async", test_create_config_async); + g_test_add_func ("/ibus/config-set-get", test_config_set_get); + +diff --git a/src/tests/ibus-desktop-testing-runner.in b/src/tests/ibus-desktop-testing-runner.in +index a90c1378..b7a72285 100755 +--- a/src/tests/ibus-desktop-testing-runner.in ++++ b/src/tests/ibus-desktop-testing-runner.in +@@ -34,9 +34,10 @@ DISPLAY=:99.0 + BUILDDIR="." + SRCDIR="." + TEST_LOG="test-suite.log" ++TEST_LOG_STDOUT=0 + RESULT_LOG="" + HAVE_GRAPHICS=1 +-DESKTOP_COMMAND="gnome-session" ++DESKTOP_COMMAND="dbus-launch --exit-with-session gnome-session" + PID_XORG=0 + PID_GNOME_SESSION=0 + TESTING_RUNNER="default" +@@ -109,19 +110,26 @@ parse_args() + init_desktop() + { + if [ "$RESULT_LOG" != "" ] ; then +- rm $RESULT_LOG ++ if [ -f $RESULT_LOG ] ; then ++ rm $RESULT_LOG ++ fi ++ fi ++ HAS_STDOUT=`echo "$TEST_LOG" | grep ':stdout'` ++ if [ x"$HAS_STDOUT" != x ] ; then ++ TEST_LOG=`echo "$TEST_LOG" | sed -e 's|:stdout||'` ++ TEST_LOG_STDOUT=1 + fi + if [ "$TEST_LOG" = "" ] ; then + print_log -e "${RED}FAIL${NC}: ${RED}ERROR${NC}: a log file is required to get return value with 'read' command" +- abrt +- else ++ exit -1 ++ elif [ -f $TEST_LOG ] ; then + rm $TEST_LOG + fi +- if test x$FORCE_TEST != x ; then ++ if [ x$FORCE_TEST != x ] ; then + RUN_ARGS="$RUN_ARGS --force" + fi + +- if test ! -f $HOME/.config/gnome-initial-setup-done ; then ++ if [ ! -f $HOME/.config/gnome-initial-setup-done ] ; then + IS_SYSTEM_ACCOUNT=false + if [ "$USER" = "root" ] ; then + IS_SYSTEM_ACCOUNT=true +@@ -141,7 +149,7 @@ _EOF + + # Prevent from launching a XDG dialog + XDG_LOCALE_FILE="$HOME/.config/user-dirs.locale" +- if test -f $XDG_LOCALE_FILE ; then ++ if [ -f $XDG_LOCALE_FILE ] ; then + XDG_LANG_ORIG=`cat $XDG_LOCALE_FILE` + XDG_LANG_NEW=`echo $LANG | sed -e 's/\(.*\)\..*/\1/'` + if [ "$XDG_LANG_ORIG" != "$XDG_LANG_NEW" ] ; then +@@ -153,19 +161,8 @@ _EOF + + run_dbus_daemon() + { +- a=`ps -ef | grep dbus-daemon | grep "\-\-system" | grep -v session | grep -v grep` +- if test x"$a" = x ; then +- eval `dbus-launch --sh-syntax` +- fi +- SUSER=`echo "$USER" | cut -c 1-7` +- a=`ps -ef | grep dbus-daemon | grep "$SUSER" | grep -v gdm | grep session | grep -v grep` +- if test x"$a" = x ; then +- systemctl --user start dbus +- export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$UID/bus +- fi +- systemctl --user status dbus | col -b +- ps -ef | grep dbus-daemon | grep "$SUSER" | grep -v gdm | egrep 'session|system' | grep -v grep +- systemctl --user show-environment | col -b ++ # Use dbus-launch --exit-with-session later instead of --sh-syntax ++ export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$UID/bus + } + + run_desktop() +@@ -181,7 +178,8 @@ run_desktop() + $DESKTOP_COMMAND & + PID_GNOME_SESSION=$! + sleep 30 +- if test "$DESKTOP_COMMAND" != "gnome-session" ; then ++ HAS_GNOME=`echo $DESKTOP_COMMAND | grep gnome-session` ++ if [ x"$HAS_GNOME" = x ] ; then + ibus-daemon --daemonize --verbose + sleep 1 + fi +@@ -285,6 +283,16 @@ run_gnome_desktop_testing_runner() + `count_case_result $retval $pass $fail` + EOF + done ++ child_pass=`grep '^PASS:' $TEST_LOG | wc -l` ++ child_fail=`grep '^FAIL:' $TEST_LOG | wc -l` ++ if [ $child_pass -ne 0 -o $child_fail -ne 0 ] ; then ++ pass=$child_pass ++ if [ $child_fail -ne 0 ] ; then ++ fail=`expr $child_fail / 2` ++ else ++ fail=0 ++ fi ++ fi + echo $pass $fail + } + +@@ -311,22 +319,29 @@ EOF_RUNNER + ;; + esac + echo "" +- if [ $pass -ne 0 ] ; then +- print_log -e "${GREEN}PASS${NC}: $pass" +- fi +- if [ $fail -ne 0 ] ; then +- print_log -e "${RED}FAIL${NC}: $fail" +- fi ++ print_log -e "${GREEN}PASS${NC}: $pass" ++ print_log -e "${RED}FAIL${NC}: $fail" + echo "" +- echo "See ${TEST_LOG}" ++ if [ $TEST_LOG_STDOUT -eq 1 ] ; then ++ cat $TEST_LOG ++ else ++ echo "See $TEST_LOG" ++ fi + } + + finit() + { +- if test "$DESKTOP_COMMAND" != "gnome-session" ; then +- ibus exit +- fi ++ echo "Killing left gnome-session and Xorg" + kill $PID_GNOME_SESSION $PID_XORG ++ ibus exit ++ SUSER=`echo "$USER" | cut -c 1-7` ++ LEFT_CALENDAR=`ps -ef | grep gnome-shell-calendar-server | grep $SUSER | grep -v grep` ++ if [ x"$LEFT_CALENDAR" != x ] ; then ++ echo "Killing left gnome-shell-calendar-server" ++ echo "$LEFT_CALENDAR" ++ echo "$LEFT_CALENDAR" | awk '{print $2}' | xargs kill ++ fi ++ + echo "Finished $PROGNAME testing" + } + +diff --git a/src/tests/ibus-engine-switch.c b/src/tests/ibus-engine-switch.c +index 5c2bd516..a1eeba2a 100644 +--- a/src/tests/ibus-engine-switch.c ++++ b/src/tests/ibus-engine-switch.c +@@ -13,17 +13,25 @@ static const gchar *engine_names[] = { + AFTER_ENGINE + }; + ++static const gchar *engine_names2[] = { ++ AFTER_ENGINE, ++ BEFORE_ENGINE ++}; ++ + static void +-change_global_engine (void) ++change_global_engine (gboolean reverse) + { + gint i; + + for (i = 0; i < G_N_ELEMENTS (engine_names); i++) { +- ibus_bus_set_global_engine (bus, engine_names[i]); ++ const gchar *engine_name = engine_names[i]; ++ if (reverse) ++ engine_name = engine_names2[i]; ++ ibus_bus_set_global_engine (bus, engine_name); + IBusEngineDesc *engine_desc = ibus_bus_get_global_engine (bus); + g_assert_cmpstr (ibus_engine_desc_get_name (engine_desc), + ==, +- engine_names[i]); ++ engine_name); + g_object_unref (G_OBJECT (engine_desc)); + } + } +@@ -46,6 +54,7 @@ typedef struct { + gint count; + guint timeout_id; + guint idle_id; ++ gboolean reverse; + } GlobalEngineChangedData; + + static void +@@ -70,7 +79,7 @@ static gboolean + change_global_engine_cb (gpointer user_data) + { + GlobalEngineChangedData *data = (GlobalEngineChangedData *) user_data; +- change_global_engine (); ++ change_global_engine (data->reverse); + data->idle_id = 0; + return FALSE; + } +@@ -78,12 +87,25 @@ change_global_engine_cb (gpointer user_data) + static void + test_global_engine (void) + { ++ GLogLevelFlags flags; ++ IBusEngineDesc *desc; + GlobalEngineChangedData data; + guint handler_id; + + if (!ibus_bus_get_use_global_engine (bus)) + return; + ++ /* "No global engine." warning is not critical message. */ ++ flags = g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL); ++ desc = ibus_bus_get_global_engine (bus); ++ g_log_set_always_fatal (flags); ++ if (desc && ++ !g_strcmp0 (BEFORE_ENGINE, ibus_engine_desc_get_name (desc))) { ++ data.reverse = TRUE; ++ } else { ++ data.reverse = FALSE; ++ } ++ + data.count = 0; + + handler_id = g_signal_connect (bus, +@@ -141,7 +163,7 @@ test_context_engine_set_by_global (void) + /* ibus_bus_set_global_engine() changes focused context engine. */ + ibus_input_context_focus_in (context); + +- change_global_engine (); ++ change_global_engine (FALSE); + + /* ibus_input_context_set_engine() does not take effect when + global engine is used. */ +@@ -170,7 +192,7 @@ test_context_engine_set_by_focus (void) + + ibus_input_context_focus_in (context); + +- change_global_engine (); ++ change_global_engine (FALSE); + + /* When focus is lost, context engine is set to "dummy". */ + ibus_input_context_focus_in (another_context); +diff --git a/src/tests/ibus-inputcontext.c b/src/tests/ibus-inputcontext.c +index fab183aa..ed04bd64 100644 +--- a/src/tests/ibus-inputcontext.c ++++ b/src/tests/ibus-inputcontext.c +@@ -37,18 +37,6 @@ fatal_handler(const gchar *log_domain, + return TRUE; + } + +-static gchar * +-get_last_engine_id (const GList *engines) +-{ +- const char *result = NULL; +- for (; engines; engines = g_list_next (engines)) { +- IBusEngineDesc *engine_desc = IBUS_ENGINE_DESC (engines->data); +- g_assert (engine_desc); +- result = ibus_engine_desc_get_name (engine_desc); +- } +- return g_strdup (result); +-} +- + static void + call_basic_ipcs (IBusInputContext *context) + { +@@ -68,18 +56,23 @@ call_basic_ipcs (IBusInputContext *context) + static void + test_input_context (void) + { +- GList *engines; +- gchar *active_engine_name = NULL; + IBusInputContext *context; ++ GLogLevelFlags flags; + IBusEngineDesc *engine_desc; ++ gchar *active_engine_name = NULL; + gchar *current_ic; + + context = ibus_bus_create_input_context (bus, "test"); + call_basic_ipcs (context); + +- engines = ibus_bus_list_active_engines (bus); +- if (engines != NULL) { +- active_engine_name = get_last_engine_id (engines); ++ /* "No global engine." warning is not critical message. */ ++ flags = g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL); ++ engine_desc = ibus_bus_get_global_engine (bus); ++ g_log_set_always_fatal (flags); ++ if (engine_desc != NULL) { ++ active_engine_name = g_strdup (ibus_engine_desc_get_name(engine_desc)); ++ g_object_unref (engine_desc); ++ engine_desc = NULL; + } else { + active_engine_name = g_strdup ("dummy"); + } +@@ -111,8 +104,6 @@ test_input_context (void) + g_object_unref (context); + + g_free (active_engine_name); +- g_list_foreach (engines, (GFunc) g_object_unref, NULL); +- g_list_free (engines); + } + + static void +diff --git a/src/tests/ibus-keypress.c b/src/tests/ibus-keypress.c +index 17920226..dd1b0042 100644 +--- a/src/tests/ibus-keypress.c ++++ b/src/tests/ibus-keypress.c +@@ -288,6 +288,10 @@ int + main (int argc, char *argv[]) + { + ibus_init (); ++ /* Avoid a warning of "AT-SPI: Could not obtain desktop path or name" ++ * with gtk_main(). ++ */ ++ g_setenv ("NO_AT_BRIDGE", "1", TRUE); + g_test_init (&argc, &argv, NULL); + gtk_init (&argc, &argv); + +-- +2.21.0 + +From f4463c0433c5f48a4fb2830e8c2ae9619fbb18d1 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Mon, 29 Jul 2019 19:05:43 +0900 +Subject: [PATCH] src/tests: Fix a fatal error with g_warning + +I set g_log_set_always_fatal() before gtk_init() in ibus-compose for +a compose warning of GtkIMContextSimple but actually the warning is +output during gtk_main() due to GtkIMContextSimple.set_client_window() +so I moved g_log_set_always_fatal() before gtk_main() in ibus-compose.c. + +Also set IFS in ibus-compose-locales to set the delimiter to '\n' for +for-loop arguments. +--- + src/tests/ibus-compose-locales.in | 8 ++++++++ + src/tests/ibus-compose.c | 21 ++++++++++----------- + 2 files changed, 18 insertions(+), 11 deletions(-) + +diff --git a/src/tests/ibus-compose-locales.in b/src/tests/ibus-compose-locales.in +index fad02965..f650b584 100755 +--- a/src/tests/ibus-compose-locales.in ++++ b/src/tests/ibus-compose-locales.in +@@ -7,19 +7,27 @@ BUILDDIR=`dirname $0` + export IBUS_COMPOSE_CACHE_DIR=$PWD + + retval=0 ++# Let for-loop notice '\n' as a delimiter ++IFS=$'\n' + for var in `cat $SRCDIR/ibus-compose.env` + do ++ # Revert IFS to recognize env a=foo b=foo ++ IFS=' ' + IS_COMMENT=`echo "$var" | grep "^#"` + if [ "x$IS_COMMENT" != x ] ; then + continue + fi ++ echo "# Starting $var $BUILDDIR/ibus-compose $SRCDIR $@" + env $var $BUILDDIR/ibus-compose $SRCDIR $@ + retval=`expr $retval + $?` ++ echo "# Finished $var $BUILDDIR/ibus-compose $SRCDIR $@ with $retval" + + CACHE_FILES=`ls *.cache` + if [ x"$CACHE_FILES" != x ] ; then + echo "Clean $CACHE_FILES" + rm $CACHE_FILES + fi ++ IFS=$'\n' + done ++IFS=' ' + exit $retval +diff --git a/src/tests/ibus-compose.c b/src/tests/ibus-compose.c +index db359477..4b4c56e7 100644 +--- a/src/tests/ibus-compose.c ++++ b/src/tests/ibus-compose.c +@@ -331,20 +331,28 @@ create_window () + static void + test_compose (void) + { ++ GLogLevelFlags flags; + if (!register_ibus_engine ()) { + g_test_fail (); + return; + } + + create_window (); ++ /* FIXME: ++ * IBusIMContext opens GtkIMContextSimple as the slave and ++ * GtkIMContextSimple opens the compose table on el_GR.UTF-8, and the ++ * multiple outputs in el_GR's compose causes a warning in gtkcomposetable ++ * and the warning always causes a fatal in GTest: ++ " "GTK+ supports to output one char only: " ++ */ ++ flags = g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL); + gtk_main (); +- ++ g_log_set_always_fatal (flags); + } + + int + main (int argc, char *argv[]) + { +- GLogLevelFlags flags; + const gchar *test_name; + gchar *test_path; + +@@ -354,16 +362,7 @@ main (int argc, char *argv[]) + */ + g_setenv ("NO_AT_BRIDGE", "1", TRUE); + g_test_init (&argc, &argv, NULL); +- /* FIXME: +- * IBusIMContext opens GtkIMContextSimple as the slave and +- * GtkIMContextSimple opens the compose table on el_GR.UTF-8, and the +- * multiple outputs in el_GR's compose causes a warning in gtkcomposetable +- * and the warning always causes a fatal in GTest: +- " "GTK+ supports to output one char only: " +- */ +- flags = g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL); + gtk_init (&argc, &argv); +- g_log_set_always_fatal (flags); + + m_srcdir = argc > 1 ? g_strdup (argv[1]) : g_strdup ("."); + m_compose_file = g_strdup (g_getenv ("COMPOSE_FILE")); +-- +2.21.0 + +From 7dde99600777f195da614130950ecbd339439d35 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Wed, 31 Jul 2019 16:27:49 +0900 +Subject: [PATCH] src/tests: Fix wrong echo with direct runner in + ibus-desktop-testing-runner + +The wrong echo prevent from counting the test results in the direct +testing runner. +--- + src/tests/ibus-desktop-testing-runner.in | 33 +++++++++++++----------- + 1 file changed, 18 insertions(+), 15 deletions(-) + +diff --git a/src/tests/ibus-desktop-testing-runner.in b/src/tests/ibus-desktop-testing-runner.in +index b7a72285..3045d601 100755 +--- a/src/tests/ibus-desktop-testing-runner.in ++++ b/src/tests/ibus-desktop-testing-runner.in +@@ -153,7 +153,7 @@ _EOF + XDG_LANG_ORIG=`cat $XDG_LOCALE_FILE` + XDG_LANG_NEW=`echo $LANG | sed -e 's/\(.*\)\..*/\1/'` + if [ "$XDG_LANG_ORIG" != "$XDG_LANG_NEW" ] ; then +- echo "Overriding XDG locale $XDG_LANG_ORIG with $XDG_LANG_NEW" ++ echo "# Overriding XDG locale $XDG_LANG_ORIG with $XDG_LANG_NEW" + echo "$XDG_LANG_NEW" > $XDG_LOCALE_FILE + fi + fi +@@ -206,11 +206,9 @@ echo_case_result() + subtst=${3:-''} + + if test $retval -eq 0 ; then +- print_log -e "${GREEN}PASS${NC}: $tst $subtst" ++ echo "PASS: $tst $subtst" >>$TEST_LOG + else +- print_log -e "${RED}FAIL${NC}: $tst $subtst" +- print_log "======================" +- print_log "" ++ echo "FAIL: $tst $subtst" >>$TEST_LOG + fi + } + +@@ -232,32 +230,37 @@ EOF + echo_case_result $retval $tst + CACHE_FILES=`ls *.cache` + if [ x"$CACHE_FILES" != x ] ; then +- print_log "Clean $CACHE_FILES" ++ echo "# Clean $CACHE_FILES" >>$TEST_LOG + rm $CACHE_FILES + fi + else +- LANG_backup=$LANG + i=1 ++ # Let for-loop notice '\n' as a delimiter ++ IFS=$'\n' + for e in $ENVS; do ++ # Revert IFS to recognize env a=foo b=foo ++ IFS=' ' + first=`echo "$e" | grep '^#'` + if test x"$first" = x"#" ; then + continue + fi +- export $e +- $BUILDDIR/$tst $SRCDIR 2>>$TEST_LOG 1>>$TEST_LOG ++ echo "# Starting $e $BUILDDIR/$tst $SRCDIR" >>$TEST_LOG ++ env $e $BUILDDIR/$tst $SRCDIR 2>>$TEST_LOG 1>>$TEST_LOG + retval=$? ++ echo "# Finished $e $BUILDDIR/$tst $SRCDIR with $retval" >>$TEST_LOG + read pass fail << EOF + `count_case_result $retval $pass $fail` + EOF + echo_case_result $retval $tst $e + CACHE_FILES=`ls *.cache` + if [ x"$CACHE_FILES" != x ] ; then +- print_log "Clean $CACHE_FILES" ++ echo "# Clean $CACHE_FILES" >>$TEST_LOG + rm $CACHE_FILES + fi + i=`expr $i + 1` ++ IFS=$'\n' + done +- export LANG=$LANG_backup ++ IFS=' ' + fi + done + echo $pass $fail +@@ -325,24 +328,24 @@ EOF_RUNNER + if [ $TEST_LOG_STDOUT -eq 1 ] ; then + cat $TEST_LOG + else +- echo "See $TEST_LOG" ++ echo "# See $TEST_LOG" + fi + } + + finit() + { +- echo "Killing left gnome-session and Xorg" ++ echo "# Killing left gnome-session and Xorg" + kill $PID_GNOME_SESSION $PID_XORG + ibus exit + SUSER=`echo "$USER" | cut -c 1-7` + LEFT_CALENDAR=`ps -ef | grep gnome-shell-calendar-server | grep $SUSER | grep -v grep` + if [ x"$LEFT_CALENDAR" != x ] ; then +- echo "Killing left gnome-shell-calendar-server" ++ echo "# Killing left gnome-shell-calendar-server" + echo "$LEFT_CALENDAR" + echo "$LEFT_CALENDAR" | awk '{print $2}' | xargs kill + fi + +- echo "Finished $PROGNAME testing" ++ echo "# Finished $PROGNAME testing" + } + + main() +-- +2.21.0 + +From 28c10d64d282fa9fbc35a7bc44a096f6137d5e46 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Tue, 13 Aug 2019 20:06:51 +0900 +Subject: [PATCH] src/tests: Set XDG_SESSION_TYPE in + ibus-desktop-testing-runner + +mutter 3.33.90 or later exits the session without loginctl. +Now ibus-desktop-testing-runner has XDG_SESSION_TYPE forcibly +not to exit gnome-shell. +--- + src/tests/ibus-desktop-testing-runner.in | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/tests/ibus-desktop-testing-runner.in b/src/tests/ibus-desktop-testing-runner.in +index 3045d601..141e9b5b 100755 +--- a/src/tests/ibus-desktop-testing-runner.in ++++ b/src/tests/ibus-desktop-testing-runner.in +@@ -157,6 +157,8 @@ _EOF + echo "$XDG_LANG_NEW" > $XDG_LOCALE_FILE + fi + fi ++ # `su` command does not run loginctl ++ export XDG_SESSION_TYPE='x11' + } + + run_dbus_daemon() +@@ -175,6 +177,7 @@ run_desktop() + PID_XORG=$! + sleep 1 + export DISPLAY=$DISPLAY ++ echo "Running $DESKTOP_COMMAND with $USER in `tty`" + $DESKTOP_COMMAND & + PID_GNOME_SESSION=$! + sleep 30 +-- +2.21.0 + +From bccf94d5ec1c5fc80d5aeac622f2ab8007d5a28a Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Fri, 29 Nov 2019 20:28:49 +0900 +Subject: [PATCH] src/tests: RHEL codereview for ibus-desktop-testing-runner + +--- + src/tests/ibus-desktop-testing-runner.in | 16 ++++++++++------ + 1 file changed, 10 insertions(+), 6 deletions(-) + +diff --git a/src/tests/ibus-desktop-testing-runner.in b/src/tests/ibus-desktop-testing-runner.in +index 141e9b5b..72537cd4 100755 +--- a/src/tests/ibus-desktop-testing-runner.in ++++ b/src/tests/ibus-desktop-testing-runner.in +@@ -28,6 +28,10 @@ + # # /root/ibus/tests/test-console.sh --tests ibus-compose \ + # --builddir /root/ibus/src/tests --srcdir /root/ibus/src/tests + ++# POSIX sh has no 'echo -e' ++: ${ECHO:='/usr/bin/echo'} ++ ++ + PROGNAME=`basename $0` + VERSION=0.1 + DISPLAY=:99.0 +@@ -54,15 +58,15 @@ print_log() + shift + fi + NO_ESCAPE=`echo $@ | sed -e 's/\\\033\\[0;3.m//g' -e 's/\\\033\\[0m//g'` +- echo $NO_ESCAPE >> $RESULT_LOG ++ $ECHO $NO_ESCAPE >> $RESULT_LOG + else +- echo $@ ++ $ECHO $@ + fi + } + + usage() + { +- echo -e \ ++ $ECHO -e \ + "This test runs /usr/bin/ibus-daemon after install ibus\n" \ + "$PROGNAME [OPTIONS…]\n" \ + "\n" \ +@@ -92,7 +96,7 @@ parse_args() + while [ 1 ] ; do + case "$1" in + -h | --help ) usage; exit 0;; +- -v | --version ) echo -e "$VERSION"; exit 0;; ++ -v | --version ) $ECHO -e "$VERSION"; exit 0;; + -b | --builddir ) BUILDDIR="$2"; shift 2;; + -s | --srcdir ) SRCDIR="$2"; shift 2;; + -c | --no-graphics ) HAVE_GRAPHICS=0; shift;; +@@ -121,7 +125,7 @@ init_desktop() + fi + if [ "$TEST_LOG" = "" ] ; then + print_log -e "${RED}FAIL${NC}: ${RED}ERROR${NC}: a log file is required to get return value with 'read' command" +- exit -1 ++ exit 255 + elif [ -f $TEST_LOG ] ; then + rm $TEST_LOG + fi +@@ -291,7 +295,7 @@ EOF + done + child_pass=`grep '^PASS:' $TEST_LOG | wc -l` + child_fail=`grep '^FAIL:' $TEST_LOG | wc -l` +- if [ $child_pass -ne 0 -o $child_fail -ne 0 ] ; then ++ if [ $child_pass -ne 0 ] || [ $child_fail -ne 0 ] ; then + pass=$child_pass + if [ $child_fail -ne 0 ] ; then + fail=`expr $child_fail / 2` +-- +2.21.0 + +From d50627f0b7a000ee13ea6dcc02a4162be1fa853d Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Tue, 3 Dec 2019 21:42:49 +0900 +Subject: [PATCH] src/tests: RHEL codereview #2 for ibus-desktop-testing-runner + +--- + src/tests/ibus-compose-locales.in | 21 +++++++-------- + src/tests/ibus-desktop-testing-runner.in | 33 ++++++++++++------------ + 2 files changed, 27 insertions(+), 27 deletions(-) + +diff --git a/src/tests/ibus-compose-locales.in b/src/tests/ibus-compose-locales.in +index f650b584..b36165fe 100755 +--- a/src/tests/ibus-compose-locales.in ++++ b/src/tests/ibus-compose-locales.in +@@ -7,27 +7,26 @@ BUILDDIR=`dirname $0` + export IBUS_COMPOSE_CACHE_DIR=$PWD + + retval=0 +-# Let for-loop notice '\n' as a delimiter +-IFS=$'\n' +-for var in `cat $SRCDIR/ibus-compose.env` ++# Deleted for var in `cat *.env` because IFS=$'\n' is not supported in POSIX sh ++while read var + do +- # Revert IFS to recognize env a=foo b=foo +- IFS=' ' + IS_COMMENT=`echo "$var" | grep "^#"` + if [ "x$IS_COMMENT" != x ] ; then + continue + fi +- echo "# Starting $var $BUILDDIR/ibus-compose $SRCDIR $@" +- env $var $BUILDDIR/ibus-compose $SRCDIR $@ ++ # Use $* instead of $@ not to mix strings and integers ++ echo "# Starting $var $BUILDDIR/ibus-compose $SRCDIR $*" ++ # Need to enclose $@ with double quotes not to split the array. ++ env $var $BUILDDIR/ibus-compose $SRCDIR "$@" + retval=`expr $retval + $?` +- echo "# Finished $var $BUILDDIR/ibus-compose $SRCDIR $@ with $retval" ++ echo "# Finished $var $BUILDDIR/ibus-compose $SRCDIR $* with $retval" + + CACHE_FILES=`ls *.cache` + if [ x"$CACHE_FILES" != x ] ; then + echo "Clean $CACHE_FILES" + rm $CACHE_FILES + fi +- IFS=$'\n' +-done +-IFS=' ' ++done << EOF_ENVS ++`cat $SRCDIR/ibus-compose.env` ++EOF_ENVS + exit $retval +diff --git a/src/tests/ibus-desktop-testing-runner.in b/src/tests/ibus-desktop-testing-runner.in +index 72537cd4..981941d5 100755 +--- a/src/tests/ibus-desktop-testing-runner.in ++++ b/src/tests/ibus-desktop-testing-runner.in +@@ -30,6 +30,8 @@ + + # POSIX sh has no 'echo -e' + : ${ECHO:='/usr/bin/echo'} ++# POSIX sh has $UID ++: ${UID:='`id -u`'} + + + PROGNAME=`basename $0` +@@ -57,10 +59,10 @@ print_log() + if [ x"$1" = x'-e' ] ; then + shift + fi +- NO_ESCAPE=`echo $@ | sed -e 's/\\\033\\[0;3.m//g' -e 's/\\\033\\[0m//g'` ++ NO_ESCAPE=`echo "$@" | sed -e 's/\\\033\\[0;3.m//g' -e 's/\\\033\\[0m//g'` + $ECHO $NO_ESCAPE >> $RESULT_LOG + else +- $ECHO $@ ++ $ECHO "$@" + fi + } + +@@ -231,9 +233,9 @@ run_direct_test_cases() + if test x"$ENVS" = x ; then + $BUILDDIR/$tst $SRCDIR 2>>$TEST_LOG 1>>$TEST_LOG + retval=$? +- read pass fail << EOF ++ read pass fail << EOF_COUNT + `count_case_result $retval $pass $fail` +-EOF ++EOF_COUNT + echo_case_result $retval $tst + CACHE_FILES=`ls *.cache` + if [ x"$CACHE_FILES" != x ] ; then +@@ -242,11 +244,9 @@ EOF + fi + else + i=1 +- # Let for-loop notice '\n' as a delimiter +- IFS=$'\n' +- for e in $ENVS; do +- # Revert IFS to recognize env a=foo b=foo +- IFS=' ' ++ # Deleted for var in "$ENVS" because IFS=$'\n' is not supported ++ # in POSIX sh ++ while read e ; do + first=`echo "$e" | grep '^#'` + if test x"$first" = x"#" ; then + continue +@@ -255,9 +255,9 @@ EOF + env $e $BUILDDIR/$tst $SRCDIR 2>>$TEST_LOG 1>>$TEST_LOG + retval=$? + echo "# Finished $e $BUILDDIR/$tst $SRCDIR with $retval" >>$TEST_LOG +- read pass fail << EOF ++ read pass fail << EOF_COUNT + `count_case_result $retval $pass $fail` +-EOF ++EOF_COUNT + echo_case_result $retval $tst $e + CACHE_FILES=`ls *.cache` + if [ x"$CACHE_FILES" != x ] ; then +@@ -265,9 +265,9 @@ EOF + rm $CACHE_FILES + fi + i=`expr $i + 1` +- IFS=$'\n' +- done +- IFS=' ' ++ done << EOF_ENVS ++ `echo "$ENVS"` ++EOF_ENVS + fi + done + echo $pass $fail +@@ -357,7 +357,7 @@ finit() + + main() + { +- parse_args $@ ++ parse_args "$@" + init_desktop + run_dbus_daemon 2>>$TEST_LOG 1>>$TEST_LOG + run_desktop 2>>$TEST_LOG 1>>$TEST_LOG +@@ -365,4 +365,5 @@ main() + finit + } + +-main $@ ++# Need to enclose $@ with double quotes not to split the array. ++main "$@" +-- +2.21.0 + diff --git a/SOURCES/ibus-1750836-server-auth-observer.patch b/SOURCES/ibus-1750836-server-auth-observer.patch new file mode 100644 index 0000000..aa3c78b --- /dev/null +++ b/SOURCES/ibus-1750836-server-auth-observer.patch @@ -0,0 +1,179 @@ +From 3d442dbf936d197aa11ca0a71663c2bc61696151 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Fri, 13 Sep 2019 15:59:03 +0900 +Subject: [PATCH] bus: Implement GDBusAuthObserver callback + +ibus uses a GDBusServer with G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS, +and doesn't set a GDBusAuthObserver, which allows anyone who can connect +to its AF_UNIX socket to authenticate and be authorized to send method calls. +It also seems to use an abstract AF_UNIX socket, which does not have +filesystem permissions, so the practical effect might be that a local +attacker can connect to another user's ibus service and make arbitrary +method calls. + +BUGS=rhbz#1717958 +--- + bus/server.c | 89 ++++++++++++++++++++++++++++++++++++++++++---------- + 1 file changed, 73 insertions(+), 16 deletions(-) + +diff --git a/bus/server.c b/bus/server.c +index 3a626230..2439de14 100644 +--- a/bus/server.c ++++ b/bus/server.c +@@ -2,7 +2,8 @@ + /* vim:set et sts=4: */ + /* bus - The Input Bus + * Copyright (C) 2008-2010 Peng Huang +- * Copyright (C) 2008-2010 Red Hat, Inc. ++ * Copyright (C) 2011-2019 Takao Fujiwara ++ * Copyright (C) 2008-2019 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public +@@ -70,16 +71,63 @@ _restart_server (void) + } + + /** ++ * bus_allow_mechanism_cb: ++ * @observer: A #GDBusAuthObserver. ++ * @mechanism: The name of the mechanism. ++ * @user_data: always %NULL. ++ * ++ * Check if @mechanism can be used to authenticate the other peer. ++ * Returns: %TRUE if the peer's mechanism is allowed. ++ */ ++static gboolean ++bus_allow_mechanism_cb (GDBusAuthObserver *observer, ++ const gchar *mechanism, ++ G_GNUC_UNUSED gpointer user_data) ++{ ++ if (g_strcmp0 (mechanism, "EXTERNAL") == 0) ++ return TRUE; ++ return FALSE; ++} ++ ++/** ++ * bus_authorize_authenticated_peer_cb: ++ * @observer: A #GDBusAuthObserver. ++ * @stream: A #GIOStream. ++ * @credentials: A #GCredentials. ++ * @user_data: always %NULL. ++ * ++ * Check if a peer who has already authenticated should be authorized. ++ * Returns: %TRUE if the peer's credential is authorized. ++ */ ++static gboolean ++bus_authorize_authenticated_peer_cb (GDBusAuthObserver *observer, ++ GIOStream *stream, ++ GCredentials *credentials, ++ G_GNUC_UNUSED gpointer user_data) ++{ ++ gboolean authorized = FALSE; ++ if (credentials) { ++ GCredentials *own_credentials = g_credentials_new (); ++ if (g_credentials_is_same_user (credentials, own_credentials, NULL)) ++ authorized = TRUE; ++ g_object_unref (own_credentials); ++ } ++ return authorized; ++} ++ ++/** + * bus_new_connection_cb: +- * @user_data: always NULL. +- * @returns: TRUE when the function can handle the connection. ++ * @observer: A #GDBusAuthObserver. ++ * @dbus_connection: A #GDBusconnection. ++ * @user_data: always %NULL. + * + * Handle incoming connections. ++ * Returns: %TRUE when the function can handle the connection. + */ + static gboolean +-bus_new_connection_cb (GDBusServer *server, +- GDBusConnection *dbus_connection, +- gpointer user_data) ++bus_new_connection_cb (GDBusServer *server, ++ GDBusConnection *dbus_connection, ++ G_GNUC_UNUSED gpointer user_data) + { + BusConnection *connection = bus_connection_new (dbus_connection); + bus_dbus_impl_new_connection (dbus, connection); +@@ -94,9 +142,9 @@ bus_new_connection_cb (GDBusServer * + } + + static void +-_server_connect_start_portal_cb (GObject *source_object, +- GAsyncResult *res, +- gpointer user_data) ++_server_connect_start_portal_cb (GObject *source_object, ++ GAsyncResult *res, ++ G_GNUC_UNUSED gpointer user_data) + { + GVariant *result; + GError *error = NULL; +@@ -113,9 +161,9 @@ _server_connect_start_portal_cb (GObject + } + + static void +-bus_acquired_handler (GDBusConnection *connection, +- const gchar *name, +- gpointer user_data) ++bus_acquired_handler (GDBusConnection *connection, ++ const gchar *name, ++ G_GNUC_UNUSED gpointer user_data) + { + g_dbus_connection_call (connection, + IBUS_SERVICE_PORTAL, +@@ -136,22 +184,27 @@ void + bus_server_init (void) + { + GError *error = NULL; ++ GDBusServerFlags flags = G_DBUS_SERVER_FLAGS_NONE; ++ gchar *guid; ++ GDBusAuthObserver *observer; + + dbus = bus_dbus_impl_get_default (); + ibus = bus_ibus_impl_get_default (); + bus_dbus_impl_register_object (dbus, (IBusService *)ibus); + + /* init server */ +- GDBusServerFlags flags = G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS; +- gchar *guid = g_dbus_generate_guid (); +- if (!g_str_has_prefix (g_address, "unix:tmpdir=")) { +- g_error ("Your socket address does not have the format unix:tmpdir=$DIR; %s", +- g_address); ++ guid = g_dbus_generate_guid (); ++ observer = g_dbus_auth_observer_new (); ++ if (!g_str_has_prefix (g_address, "unix:tmpdir=") && ++ !g_str_has_prefix (g_address, "unix:path=")) { ++ g_error ("Your socket address does not have the format unix:tmpdir=$DIR " ++ "or unix:path=$FILE; %s", g_address); ++ + } + server = g_dbus_server_new_sync ( + g_address, /* the place where the socket file lives, e.g. /tmp, abstract namespace, etc. */ + flags, guid, +- NULL /* observer */, ++ observer, + NULL /* cancellable */, + &error); + if (server == NULL) { +@@ -161,7 +214,13 @@ bus_server_init (void) + } + g_free (guid); + +- g_signal_connect (server, "new-connection", G_CALLBACK (bus_new_connection_cb), NULL); ++ g_signal_connect (observer, "allow-mechanism", ++ G_CALLBACK (bus_allow_mechanism_cb), NULL); ++ g_signal_connect (observer, "authorize-authenticated-peer", ++ G_CALLBACK (bus_authorize_authenticated_peer_cb), NULL); ++ g_object_unref (observer); ++ g_signal_connect (server, "new-connection", ++ G_CALLBACK (bus_new_connection_cb), NULL); + + g_dbus_server_start (server); + +-- +2.21.0 + diff --git a/SOURCES/ibus-2076-fix-16-candidates.patch b/SOURCES/ibus-2076-fix-16-candidates.patch new file mode 100644 index 0000000..9e86f15 --- /dev/null +++ b/SOURCES/ibus-2076-fix-16-candidates.patch @@ -0,0 +1,26 @@ +From 6aab10f2e5a8e10dac9b007eff19b26990461790 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Thu, 14 Feb 2019 17:37:39 +0900 +Subject: [PATCH] ui/gtk3: Fix assert with 16 candidates + +BUG=https://github.com/ibus/ibus/issues/2076 +--- + ui/gtk3/candidatearea.vala | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ui/gtk3/candidatearea.vala b/ui/gtk3/candidatearea.vala +index f590cf3a..781ecd1e 100644 +--- a/ui/gtk3/candidatearea.vala ++++ b/ui/gtk3/candidatearea.vala +@@ -109,7 +109,7 @@ class CandidateArea : Gtk.Box { + m_focus_candidate = focus_candidate; + m_show_cursor = show_cursor; + +- assert(candidates.length < 16); ++ assert(candidates.length <= 16); + for (int i = 0 ; i < 16 ; i++) { + Gtk.Label label = m_candidates[i]; + bool visible = false; +-- +2.21.0 + diff --git a/SOURCES/ibus-HEAD.patch b/SOURCES/ibus-HEAD.patch new file mode 100644 index 0000000..faf929d --- /dev/null +++ b/SOURCES/ibus-HEAD.patch @@ -0,0 +1,920 @@ +From 7edaefdc1d80aefdbbc2dc52526c20715759da83 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Wed, 22 Aug 2018 17:20:53 +0900 +Subject: [PATCH] ui/gtk3: Do not clear unicode data when emoji annotation lang + is changed + +--- + ui/gtk3/emojier.vala | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/ui/gtk3/emojier.vala b/ui/gtk3/emojier.vala +index 85dcdceb..637ae049 100644 +--- a/ui/gtk3/emojier.vala ++++ b/ui/gtk3/emojier.vala +@@ -440,13 +440,17 @@ public class IBusEmojier : Gtk.ApplicationWindow { + m_emoji_to_emoji_variants_dict = + new GLib.HashTable>(GLib.str_hash, + GLib.str_equal); +- m_unicode_to_data_dict = ++ if (m_unicode_to_data_dict == null) { ++ m_unicode_to_data_dict = + new GLib.HashTable( + GLib.direct_hash, + GLib.direct_equal); +- m_name_to_unicodes_dict = ++ } ++ if (m_name_to_unicodes_dict == null) { ++ m_name_to_unicodes_dict = + new GLib.HashTable>(GLib.str_hash, + GLib.str_equal); ++ } + } + + +-- +2.17.1 + +From 28d22176aee6be97d88dd6c60fa5395c79563ec0 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Thu, 30 Aug 2018 12:57:33 +0900 +Subject: [PATCH] ui/gtk3: Fix SEGV when type ASCII on emojier + +Emojier still included Gtk.Entry, accepted key events in Wayland, +reset the lookup table and it caused SEGV because IBus.Text +is NULL in the lookup table in Emojier.get_current_candidate(). +Now Gtk.Entry is deleted completely. + +BUG=rhbz#1618682 +--- + ui/gtk3/emojier.vala | 139 +------------------------------------------ + 1 file changed, 1 insertion(+), 138 deletions(-) + +diff --git a/ui/gtk3/emojier.vala b/ui/gtk3/emojier.vala +index 637ae049..0f455800 100644 +--- a/ui/gtk3/emojier.vala ++++ b/ui/gtk3/emojier.vala +@@ -283,7 +283,6 @@ public class IBusEmojier : Gtk.ApplicationWindow { + + private ThemedRGBA m_rgba; + private Gtk.Box m_vbox; +- private EEntry m_entry; + /* If emojier is emoji category list or Unicode category list, + * m_annotation is "" and preedit is also "". + * If emojier is candidate mode, m_annotation is an annotation and +@@ -367,23 +366,6 @@ public class IBusEmojier : Gtk.ApplicationWindow { + m_vbox = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); + add(m_vbox); + +- m_entry = new EEntry(); +- m_entry.set_placeholder_text(_("Type annotation or choose emoji")); +- //m_vbox.add(m_entry); +- m_entry.changed.connect(() => { +- update_candidate_window(); +- }); +- m_entry.icon_release.connect((icon_pos, event) => { +- hide_candidate_panel(); +- }); +- +- /* Set the accessible role of the label to a status bar so it +- * will emit name changed events that can be used by screen +- * readers. +- */ +- Atk.Object obj = m_entry.get_accessible(); +- obj.set_role (Atk.Role.STATUSBAR); +- + // The constructor of IBus.LookupTable does not support more than + // 16 pages. + m_lookup_table = new IBus.LookupTable(1, 0, true, true); +@@ -1806,18 +1788,6 @@ public class IBusEmojier : Gtk.ApplicationWindow { + m_lookup_table.cursor_up(); + else if (keyval == Gdk.Key.Right) + m_lookup_table.cursor_down(); +- } else if (m_entry.get_text().length > 0) { +- int step = 0; +- if (keyval == Gdk.Key.Left) +- step = -1; +- else if (keyval == Gdk.Key.Right) +- step = 1; +- GLib.Signal.emit_by_name( +- m_entry, "move-cursor", +- Gtk.MovementStep.VISUAL_POSITIONS, +- step, +- (modifiers & Gdk.ModifierType.SHIFT_MASK) != 0 +- ? true : false); + } else { + // For Gdk.Key.f and Gdk.Key.b + if (keyval == Gdk.Key.Left) +@@ -1880,20 +1850,6 @@ public class IBusEmojier : Gtk.ApplicationWindow { + } + return true; + } +- if (m_entry.get_text().length > 0) { +- int step = 0; +- if (keyval == Gdk.Key.Home) +- step = -1; +- else if (keyval == Gdk.Key.End) +- step = 1; +- GLib.Signal.emit_by_name( +- m_entry, "move-cursor", +- Gtk.MovementStep.DISPLAY_LINE_ENDS, +- step, +- (modifiers & Gdk.ModifierType.SHIFT_MASK) != 0 +- ? true : false); +- return true; +- } + return category_list_cursor_move(keyval); + } + +@@ -1941,28 +1897,6 @@ public class IBusEmojier : Gtk.ApplicationWindow { + } + + +- private void entry_enter_keyval(uint keyval) { +- unichar ch = IBus.keyval_to_unicode(keyval); +- if (ch.iscntrl()) +- return; +- string str = ch.to_string(); +- +- // what gtk_entry_commit_cb() do +- if (m_entry.get_selection_bounds(null, null)) { +- m_entry.delete_selection(); +- } else { +- if (m_entry.get_overwrite_mode()) { +- uint text_length = m_entry.get_buffer().get_length(); +- if (m_entry.cursor_position < text_length) +- m_entry.delete_from_cursor(Gtk.DeleteType.CHARS, 1); +- } +- } +- int pos = m_entry.get_position(); +- m_entry.insert_text(str, -1, ref pos); +- m_entry.set_position(pos); +- } +- +- + private Gdk.Rectangle get_monitor_geometry() { + Gdk.Rectangle monitor_area = { 0, }; + +@@ -2245,10 +2179,7 @@ public class IBusEmojier : Gtk.ApplicationWindow { + /* Let gtk recalculate the window size. */ + resize(1, 1); + +- m_entry.set_text(""); +- + show_category_list(); +- m_entry.set_activates_default(true); + show_all(); + + /* Some window managers, e.g. MATE, GNOME, Plasma desktops, +@@ -2289,13 +2220,6 @@ public class IBusEmojier : Gtk.ApplicationWindow { + m_loop.run(); + m_loop = null; + +- // Need focus-out on Gtk.Entry to send the emoji to applications. +- Gdk.Event fevent = new Gdk.Event(Gdk.EventType.FOCUS_CHANGE); +- fevent.focus_change.in = 0; +- fevent.focus_change.window = get_window(); +- m_entry.send_focus_change(fevent); +- fevent.focus_change.window = null; +- + hide(); + // Make sure the switcher is hidden before returning from this function. + while (Gtk.events_pending()) +@@ -2357,36 +2281,9 @@ public class IBusEmojier : Gtk.ApplicationWindow { + hide(); + } + return true; +- case Gdk.Key.BackSpace: +- if (m_entry.get_text().length > 0) { +- if ((modifiers & Gdk.ModifierType.CONTROL_MASK) != 0) { +- GLib.Signal.emit_by_name(m_entry, "delete-from-cursor", +- Gtk.DeleteType.WORD_ENDS, -1); +- } else { +- GLib.Signal.emit_by_name(m_entry, "backspace"); +- } +- return true; +- } +- break; +- case Gdk.Key.Delete: +- case Gdk.Key.KP_Delete: +- if (m_entry.get_text().length > 0) { +- if ((modifiers & Gdk.ModifierType.CONTROL_MASK) != 0) { +- GLib.Signal.emit_by_name(m_entry, "delete-from-cursor", +- Gtk.DeleteType.WORD_ENDS, 1); +- } else { +- GLib.Signal.emit_by_name(m_entry, "delete-from-cursor", +- Gtk.DeleteType.CHARS, 1); +- } +- return true; +- } +- break; + case Gdk.Key.space: + case Gdk.Key.KP_Space: +- if ((modifiers & Gdk.ModifierType.SHIFT_MASK) != 0) { +- if (m_entry.get_text().length > 0) +- entry_enter_keyval(keyval); +- } else if (m_candidate_panel_is_visible) { ++ if (m_candidate_panel_is_visible) { + enter_notify_disable_with_timer(); + m_lookup_table.cursor_down(); + show_candidate_panel(); +@@ -2436,10 +2333,6 @@ public class IBusEmojier : Gtk.ApplicationWindow { + key_press_cursor_home_end(Gdk.Key.End, modifiers); + show_all(); + return true; +- case Gdk.Key.Insert: +- case Gdk.Key.KP_Insert: +- GLib.Signal.emit_by_name(m_entry, "toggle-overwrite"); +- return true; + } + + if ((modifiers & Gdk.ModifierType.CONTROL_MASK) != 0) { +@@ -2470,27 +2363,6 @@ public class IBusEmojier : Gtk.ApplicationWindow { + key_press_cursor_home_end(Gdk.Key.End, modifiers); + show_all(); + return true; +- case Gdk.Key.u: +- if (m_entry.get_text().length > 0) { +- GLib.Signal.emit_by_name(m_entry, +- "delete-from-cursor", +- Gtk.DeleteType.PARAGRAPH_ENDS, +- -1); +- return true; +- } +- break; +- case Gdk.Key.a: +- if (m_entry.get_text().length > 0) { +- m_entry.select_region(0, -1); +- return true; +- } +- break; +- case Gdk.Key.x: +- if (m_entry.get_text().length > 0) { +- GLib.Signal.emit_by_name(m_entry, "cut-clipboard"); +- return true; +- } +- break; + case Gdk.Key.C: + case Gdk.Key.c: + if ((modifiers & Gdk.ModifierType.SHIFT_MASK) != 0) { +@@ -2503,19 +2375,11 @@ public class IBusEmojier : Gtk.ApplicationWindow { + clipboard.store(); + return true; + } +- } else if (m_entry.get_text().length > 0) { +- GLib.Signal.emit_by_name(m_entry, "copy-clipboard"); +- return true; + } + break; +- case Gdk.Key.v: +- GLib.Signal.emit_by_name(m_entry, "paste-clipboard"); +- return true; + } + return false; + } +- +- entry_enter_keyval(keyval); + return true; + } + +@@ -2595,7 +2459,6 @@ public class IBusEmojier : Gtk.ApplicationWindow { + + uint32 timestamp = event.get_time(); + present_with_time(timestamp); +- m_entry.set_activates_default(true); + } + + +-- +2.17.1 + +From e6badb494e0a31b7aca3a5078a5dc5b27b83390d Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Thu, 30 Aug 2018 12:57:46 +0900 +Subject: [PATCH] ui/gtk3: Support Shift-Space to insert a Space on Emojier + preedit + +Implemented Shift-Space on preedit since Shift-Space had worked on +Emojier's GtkEntry in the previous release. +--- + ui/gtk3/panelbinding.vala | 27 ++++++++++++++++++++------- + 1 file changed, 20 insertions(+), 7 deletions(-) + +diff --git a/ui/gtk3/panelbinding.vala b/ui/gtk3/panelbinding.vala +index 981b5509..4ebff8da 100644 +--- a/ui/gtk3/panelbinding.vala ++++ b/ui/gtk3/panelbinding.vala +@@ -548,6 +548,19 @@ class PanelBinding : IBus.PanelService { + } + + ++ private bool key_press_keyval(uint keyval) { ++ unichar ch = IBus.keyval_to_unicode(keyval); ++ if (ch.iscntrl()) ++ return false; ++ string str = ch.to_string(); ++ m_preedit.append_text(str); ++ string annotation = m_preedit.get_text(); ++ m_emojier.set_annotation(annotation); ++ m_preedit.set_emoji(""); ++ return true; ++ } ++ ++ + private bool key_press_enter() { + if (m_extension_name != "unicode" && is_emoji_lookup_table()) { + // Check if variats exist +@@ -899,6 +912,12 @@ class PanelBinding : IBus.PanelService { + break; + case Gdk.Key.space: + case Gdk.Key.KP_Space: ++ if ((modifiers & Gdk.ModifierType.SHIFT_MASK) != 0) { ++ if (!key_press_keyval(keyval)) ++ return true; ++ show_candidate = is_emoji_lookup_table(); ++ break; ++ } + show_candidate = key_press_space(); + if (m_extension_name == "unicode") { + key_press_enter(); +@@ -979,14 +998,8 @@ class PanelBinding : IBus.PanelService { + show_candidate = key_press_control_keyval(keyval, modifiers); + break; + } +- unichar ch = IBus.keyval_to_unicode(keyval); +- if (ch.iscntrl()) ++ if (!key_press_keyval(keyval)) + return true; +- string str = ch.to_string(); +- m_preedit.append_text(str); +- string annotation = m_preedit.get_text(); +- m_emojier.set_annotation(annotation); +- m_preedit.set_emoji(""); + show_candidate = is_emoji_lookup_table(); + break; + } +-- +2.17.1 + +From 809d880337e75b7cee429292a238bf53899bef6a Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Thu, 30 Aug 2018 12:58:57 +0900 +Subject: [PATCH] ui/gtk3: Do not move Emojier popup with the active + candidate in Xorg + +Probably I think it's not useful to change the popup position frequently. +The popup size is always slightly changed with the emoji annotation length. +--- + ui/gtk3/emojier.vala | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/ui/gtk3/emojier.vala b/ui/gtk3/emojier.vala +index 0f455800..9811fde5 100644 +--- a/ui/gtk3/emojier.vala ++++ b/ui/gtk3/emojier.vala +@@ -1944,7 +1944,15 @@ public class IBusEmojier : Gtk.ApplicationWindow { + x = 0; + + bool changed = false; +- if (window_right_bottom.y > monitor_bottom) { ++ // Do not up side down frequently. ++ // The first pos does not show the lookup table yet but the ++ // preedit only and the second pos shows the lookup table. ++ if (m_lookup_table.get_cursor_pos() != 1) { ++ if (m_is_up_side_down) ++ y = m_cursor_location.y - allocation.height; ++ else ++ y = cursor_right_bottom.y; ++ } else if (window_right_bottom.y > monitor_bottom) { + y = m_cursor_location.y - allocation.height; + // Do not up side down in Wayland + if (m_input_context_path == "") { +-- +2.17.1 + +From 1c6565e205528a45e88a84ba2a328f9035875c8d Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Fri, 14 Sep 2018 16:15:41 +0900 +Subject: [PATCH] ui/gtk3: Fix SEGV when commit an emoji on Emojier in Wayland + +Just pressing Space key without emoji annotations can launch Emojier +popup and the popup takes a focus in Wayland and the chosen emoji is +output when the original text application gets the focus after Emojier +popup release the focus. Emojier disabled Ctrl-Shift-e after got the focus. +But currently GNOME Wayland has a bug not to send focus-in until a +key press or mouse click happens [1] and Emojier causes a SEGV. +Now Emojier disables Ctrl-Shift-e immediately when an emoji is chosen +whether focus-in comes or not and fixes the SEGV. + +[1] https://gitlab.gnome.org/GNOME/gnome-shell/issues/573 + +BUG=rhbz#1625187 +--- + ui/gtk3/emojier.vala | 63 +++++++------------------------------- + ui/gtk3/emojierapp.vala | 2 +- + ui/gtk3/panelbinding.vala | 64 ++++++++++++++++++++++++++------------- + 3 files changed, 55 insertions(+), 74 deletions(-) + +diff --git a/ui/gtk3/emojier.vala b/ui/gtk3/emojier.vala +index 9811fde5..e23ef889 100644 +--- a/ui/gtk3/emojier.vala ++++ b/ui/gtk3/emojier.vala +@@ -21,17 +21,6 @@ + */ + + public class IBusEmojier : Gtk.ApplicationWindow { +- private class EEntry : Gtk.SearchEntry { +- public EEntry() { +- GLib.Object( +- name : "IBusEmojierEntry", +- margin_start : 6, +- margin_end : 6, +- margin_top : 6, +- margin_bottom : 6 +- ); +- } +- } + private class EListBox : Gtk.ListBox { + public EListBox() { + GLib.Object( +@@ -330,6 +319,7 @@ public class IBusEmojier : Gtk.ApplicationWindow { + private uint m_redraw_window_id; + + public signal void candidate_clicked(uint index, uint button, uint state); ++ public signal void commit_text(string text); + + public IBusEmojier() { + GLib.Object( +@@ -380,12 +370,6 @@ public class IBusEmojier : Gtk.ApplicationWindow { + adjust_window_position(); + }); + +- candidate_clicked.connect((i, b, s) => { +- if (m_input_context_path != "") +- candidate_panel_select_index(i, b); +- }); +- +- + if (m_annotation_to_emojis_dict == null) { + reload_emoji_dict(); + } +@@ -1641,34 +1625,6 @@ public class IBusEmojier : Gtk.ApplicationWindow { + } + + +- private void candidate_panel_select_index(uint index, +- uint button) { +- if (button == BUTTON_CLOSE_BUTTON) { +- hide(); +- if (m_candidate_panel_mode && +- m_lookup_table.get_number_of_candidates() > 0) { +- // Call remove_all_children() instead of show_category_list() +- // so that show_category_list do not remove children with +- // PageUp/PageDown. +- remove_all_children(); +- } +- m_result = ""; +- return; +- } +- string text = m_lookup_table.get_candidate(index).text; +- unowned GLib.SList? emojis = +- m_emoji_to_emoji_variants_dict.lookup(text); +- if (m_show_emoji_variant && emojis != null && +- m_backward_index < 0) { +- show_emoji_variants(emojis); +- show_all(); +- } else { +- m_result = text; +- hide(); +- } +- } +- +- + private void candidate_panel_cursor_down() { + enter_notify_disable_with_timer(); + uint ncandidates = m_lookup_table.get_number_of_candidates(); +@@ -1762,7 +1718,8 @@ public class IBusEmojier : Gtk.ApplicationWindow { + } + + +- public bool has_variants(uint index) { ++ public bool has_variants(uint index, ++ bool need_commit_signal) { + if (index >= m_lookup_table.get_number_of_candidates()) + return false; + string text = m_lookup_table.get_candidate(index).text; +@@ -1773,6 +1730,10 @@ public class IBusEmojier : Gtk.ApplicationWindow { + show_emoji_variants(emojis); + return true; + } ++ if (m_input_context_path != "") ++ m_result = text; ++ if (need_commit_signal) ++ commit_text(text); + return false; + } + +@@ -1881,10 +1842,10 @@ public class IBusEmojier : Gtk.ApplicationWindow { + } + + +- public bool key_press_enter() { ++ public bool key_press_enter(bool need_commit_signal) { + if (m_candidate_panel_is_visible) { + uint index = m_lookup_table.get_cursor_pos(); +- return has_variants(index); ++ return has_variants(index, need_commit_signal); + } else if (m_category_active_index >= 0) { + Gtk.ListBoxRow gtkrow = m_list_box.get_selected_row(); + EBoxRow row = gtkrow as EBoxRow; +@@ -2282,12 +2243,10 @@ public class IBusEmojier : Gtk.ApplicationWindow { + return true; + case Gdk.Key.Return: + case Gdk.Key.KP_Enter: +- if (key_press_enter()) { ++ if (key_press_enter(true)) + show_all(); +- } else { +- m_result = get_current_candidate(); ++ else + hide(); +- } + return true; + case Gdk.Key.space: + case Gdk.Key.KP_Space: +diff --git a/ui/gtk3/emojierapp.vala b/ui/gtk3/emojierapp.vala +index 787d448f..fab99d9e 100644 +--- a/ui/gtk3/emojierapp.vala ++++ b/ui/gtk3/emojierapp.vala +@@ -65,7 +65,7 @@ public class EmojiApplication : Gtk.Application { + uint ncandidates = m_emojier.get_number_of_candidates(); + if (ncandidates > 0 && ncandidates >= index) { + m_emojier.set_cursor_pos(index); +- show_candidate = m_emojier.has_variants(index); ++ show_candidate = m_emojier.has_variants(index, false); + } else { + return; + } +diff --git a/ui/gtk3/panelbinding.vala b/ui/gtk3/panelbinding.vala +index 4ebff8da..01c43b0d 100644 +--- a/ui/gtk3/panelbinding.vala ++++ b/ui/gtk3/panelbinding.vala +@@ -447,13 +447,19 @@ class PanelBinding : IBus.PanelService { + } + + +- private void commit_text_update_favorites(IBus.Text text) { ++ private void commit_text_update_favorites(IBus.Text text, ++ bool disable_extension) { + commit_text(text); +- IBus.ExtensionEvent event = new IBus.ExtensionEvent( ++ ++ // If disable_extension is false, the extension event is already ++ // sent before the focus-in is received. ++ if (disable_extension) { ++ IBus.ExtensionEvent event = new IBus.ExtensionEvent( + "name", m_extension_name, + "is-enabled", false, + "is-extension", true); +- panel_extension(event); ++ panel_extension(event); ++ } + string committed_string = text.text; + string preedit_string = m_preedit.get_text(); + m_preedit.hide(); +@@ -482,7 +488,7 @@ class PanelBinding : IBus.PanelService { + prev_context_path != "" && + prev_context_path == m_current_context_path) { + IBus.Text text = new IBus.Text.from_string(selected_string); +- commit_text_update_favorites(text); ++ commit_text_update_favorites(text, false); + m_emojier.reset(); + return true; + } +@@ -564,13 +570,13 @@ class PanelBinding : IBus.PanelService { + private bool key_press_enter() { + if (m_extension_name != "unicode" && is_emoji_lookup_table()) { + // Check if variats exist +- if (m_emojier.key_press_enter()) { ++ if (m_emojier.key_press_enter(false)) { + convert_preedit_text(); + return true; + } + } + IBus.Text text = m_preedit.get_commit_text(); +- commit_text_update_favorites(text); ++ commit_text_update_favorites(text, true); + return false; + } + +@@ -712,15 +718,10 @@ class PanelBinding : IBus.PanelService { + } + + +- private bool is_visible_wayland_lookup_table() { +- return m_wayland_lookup_table_is_visible; +- } +- +- + private void hide_emoji_lookup_table() { + if (m_emojier == null) + return; +- if (m_is_wayland) ++ if (m_wayland_lookup_table_is_visible) + hide_wayland_lookup_table(); + else + m_emojier.hide(); +@@ -747,7 +748,7 @@ class PanelBinding : IBus.PanelService { + + private bool is_emoji_lookup_table() { + if (m_is_wayland) +- return is_visible_wayland_lookup_table(); ++ return m_wayland_lookup_table_is_visible; + else + return m_emojier.get_visible(); + } +@@ -788,7 +789,8 @@ class PanelBinding : IBus.PanelService { + */ + if (!input_context_path.has_suffix("InputContext_1")) { + m_real_current_context_path = m_current_context_path; +- this.emojier_focus_commit(); ++ if (m_is_wayland) ++ this.emojier_focus_commit(); + } + } + +@@ -822,8 +824,18 @@ class PanelBinding : IBus.PanelService { + // For title handling in gnome-shell + m_application.add_window(m_emojier); + m_emojier.candidate_clicked.connect((i, b, s) => { ++ candidate_clicked_lookup_table_real(i, b, s, true); ++ }); ++ m_emojier.commit_text.connect((s) => { + if (!m_is_wayland) +- candidate_clicked_lookup_table(i, b, s); ++ return; ++ // Currently emojier has a focus but the text input focus ++ // does not and commit the text later. ++ IBus.ExtensionEvent close_event = new IBus.ExtensionEvent( ++ "name", m_extension_name, ++ "is-enabled", false, ++ "is-extension", true); ++ panel_extension(close_event); + }); + } + m_emojier.reset(); +@@ -1041,9 +1053,10 @@ class PanelBinding : IBus.PanelService { + show_preedit_and_candidate(show_candidate); + } + +- public override void candidate_clicked_lookup_table(uint index, +- uint button, +- uint state) { ++ private void candidate_clicked_lookup_table_real(uint index, ++ uint button, ++ uint state, ++ bool is_emojier) { + if (button == IBusEmojier.BUTTON_CLOSE_BUTTON) { + m_enable_extension = false; + hide_emoji_lookup_table(); +@@ -1061,17 +1074,26 @@ class PanelBinding : IBus.PanelService { + uint ncandidates = m_emojier.get_number_of_candidates(); + if (ncandidates > 0 && ncandidates >= index) { + m_emojier.set_cursor_pos(index); +- show_candidate = m_emojier.has_variants(index); +- m_preedit.set_emoji(m_emojier.get_current_candidate()); ++ bool need_commit_signal = m_is_wayland && is_emojier; ++ show_candidate = m_emojier.has_variants(index, need_commit_signal); ++ if (!m_is_wayland) ++ m_preedit.set_emoji(m_emojier.get_current_candidate()); + } else { + return; + } + if (!show_candidate) { + IBus.Text text = m_preedit.get_commit_text(); +- commit_text_update_favorites(text); + hide_emoji_lookup_table(); ++ if (!is_emojier || !m_is_wayland) ++ commit_text_update_favorites(text, true); + return; + } + show_preedit_and_candidate(show_candidate); + } ++ ++ public override void candidate_clicked_lookup_table(uint index, ++ uint button, ++ uint state) { ++ candidate_clicked_lookup_table_real(index, button, state, false); ++ } + } +-- +2.17.1 + +From c1b55431c076dfa3fc26a3a998bfcf729e9ba602 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Fri, 26 Oct 2018 18:44:35 +0900 +Subject: [PATCH] src/tests: Fix make check in Fedora 29 + +ibus-bus and ibus-compose failed in Fedora 29. + +1. In ibus-bus with runtest, ibus-daemon failed to restart in +start_exit_async() because it seems to have conflicting IO with runtest +and ibus-daemon failed to close a file descriptor in _restart_server(). +The solution is to add a sleep in start_exit_async(). +Also added ibus_get_address() in test_async_apis_finish() to check +if ibus-daemon finished to restart. + +2. In ibus-compose, the GTK application could not get the ibus module. +The solution is to export GTK_IM_MODULE=ibus. + +3. Added DISABLE_DAEMONIZE_IN_TESTS to get error messages in ibus-daemon. +% make DISABLE_DAEMONIZE_IN_TESTS=1 check +--- + bus/Makefile.am | 1 + + src/tests/Makefile.am | 1 + + src/tests/ibus-bus.c | 15 ++++++++++++++- + src/tests/runtest | 24 +++++++++++++++++------- + 4 files changed, 33 insertions(+), 8 deletions(-) + +diff --git a/bus/Makefile.am b/bus/Makefile.am +index bdae5c92..4383a874 100644 +--- a/bus/Makefile.am ++++ b/bus/Makefile.am +@@ -124,6 +124,7 @@ TESTS_ENVIRONMENT = \ + srcdir=$(srcdir) \ + LD_LIBRARY_PATH="$(top_builddir)/src/.libs:$(top_builddir)/src" \ + DISABLE_GUI_TESTS="$(DISABLE_GUI_TESTS)" \ ++ DISABLE_DAEMONIZE_IN_TESTS="$(DISABLE_DAEMONIZE_IN_TESTS)" \ + $(NULL) + + LOG_COMPILER = $(top_srcdir)/src/tests/runtest +diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am +index c5fef3c8..e337a59b 100644 +--- a/src/tests/Makefile.am ++++ b/src/tests/Makefile.am +@@ -73,6 +73,7 @@ TESTS_ENVIRONMENT = \ + srcdir=$(srcdir) \ + LD_LIBRARY_PATH="$(top_builddir)/src/.libs:$(top_builddir)/src" \ + DISABLE_GUI_TESTS="$(DISABLE_GUI_TESTS)" \ ++ DISABLE_DAEMONIZE_IN_TESTS="$(DISABLE_DAEMONIZE_IN_TESTS)" \ + $(NULL) + + LOG_COMPILER = $(srcdir)/runtest +diff --git a/src/tests/ibus-bus.c b/src/tests/ibus-bus.c +index 7fa1bc4a..0bf9e612 100644 +--- a/src/tests/ibus-bus.c ++++ b/src/tests/ibus-bus.c +@@ -820,6 +820,14 @@ finish_exit_async (GObject *source_object, + static void + start_exit_async (void) + { ++ /* When `./runtest ibus-bus` runs, ibus-daemon sometimes failed to ++ * restart because closing a file descriptor was failed in ++ * bus/server.c:_restart_server() with a following error: ++ * "inotify read(): Bad file descriptor" ++ * Now g_usleep() is added here to write down the buffer and not to ++ * fail to restart ibus-daemon. ++ */ ++ g_usleep (G_USEC_PER_SEC); + ibus_bus_exit_async (bus, + TRUE, /* restart */ + -1, /* timeout */ +@@ -831,6 +839,9 @@ start_exit_async (void) + static gboolean + test_async_apis_finish (gpointer user_data) + { ++ /* INFO: g_warning() causes SEGV with runtest script */ ++ if (ibus_get_address () == NULL) ++ g_warning ("ibus-daemon does not restart yet from start_exit_async()."); + ibus_quit (); + return FALSE; + } +@@ -906,7 +917,9 @@ call_next_async_function (void) + }; + static guint index = 0; + +- // Use g_timeout_add to make sure test_async_apis finishes even if async_functions is empty. ++ /* Use g_timeout_add to make sure test_async_apis finishes even if ++ * async_functions is empty. ++ */ + if (index >= G_N_ELEMENTS (async_functions)) + g_timeout_add (1, test_async_apis_finish, NULL); + else +diff --git a/src/tests/runtest b/src/tests/runtest +index d7f96ea3..ab39e9f2 100755 +--- a/src/tests/runtest ++++ b/src/tests/runtest +@@ -22,6 +22,7 @@ + : ${builddir:=.} + : ${srcdir:=.} + : ${DISABLE_GUI_TESTS:=''} ++: ${DISABLE_DAEMONIZE_IN_TESTS:=''} + + BUS_REQUIRED_TESTS=" + ibus-bus +@@ -162,16 +163,25 @@ run_test_case() + export GSETTINGS_SCHEMA_DIR=$PWD + + # Start ibus-daemon. +- ../$top_builddir/bus/ibus-daemon \ +- --daemonize \ +- --cache=none \ +- --panel=disable \ +- --emoji-extension=disable \ +- --config=default \ +- --verbose; ++ DAEMON_ARGS=' ++ --cache=none ++ --panel=disable ++ --emoji-extension=disable ++ --config=default ++ --verbose ++ ' ++ if test x"$DISABLE_DAEMONIZE_IN_TESTS" = x ; then ++ ../$top_builddir/bus/ibus-daemon \ ++ $DAEMON_ARGS --daemonize; ++ else ++ ../$top_builddir/bus/ibus-daemon \ ++ $DAEMON_ARGS & ++ fi + + # Wait until all necessary components are up. + sleep 1 ++ ++ export GTK_IM_MODULE=ibus + fi + + "../$tst" ${1+"$@"} +-- +2.17.1 + +From 3172c3b23faefe76b3b7adfc75f9be34a0fb2e02 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Wed, 31 Oct 2018 17:42:38 +0900 +Subject: [PATCH] RHEL code reviews + +--- + src/ibuskeymap.c | 2 +- + src/ibuspanelservice.c | 6 +++++- + src/tests/ibus-keypress.c | 2 +- + util/IMdkit/FrameMgr.c | 1 + + 4 files changed, 8 insertions(+), 3 deletions(-) + +diff --git a/src/ibuskeymap.c b/src/ibuskeymap.c +index 27a56754..5abfb99a 100644 +--- a/src/ibuskeymap.c ++++ b/src/ibuskeymap.c +@@ -143,7 +143,7 @@ ibus_keymap_parse_line (gchar *str, + /* Do not assign *p1 to g_ascii_isalpha() directly for the syntax check */ + if (i == 0 && + strncmp (p2, "addupper", sizeof ("addupper") - 1) == 0 && +- (ch = *p1) && g_ascii_isalpha (ch)) { ++ (ch = *p1) && (ch >= 0) && g_ascii_isalpha (ch)) { + gchar buf[] = "a"; + buf[0] = g_ascii_toupper(ch); + keymap[keycode][0] = keymap[keycode][3] = keysym; +diff --git a/src/ibuspanelservice.c b/src/ibuspanelservice.c +index 9d87e19b..984cc890 100644 +--- a/src/ibuspanelservice.c ++++ b/src/ibuspanelservice.c +@@ -1615,7 +1615,11 @@ ibus_panel_service_panel_extension_register_keys (IBusPanelService *panel, + va_start (var_args, first_property_name); + do { + keys = va_arg (var_args, IBusProcessKeyEventData *); +- g_return_if_fail (keys != NULL); ++ if (keys == NULL) { ++ va_end (var_args); ++ g_warning ("Failed to va_arg for IBusProcessKeyEventData"); ++ return; ++ } + g_variant_builder_init (&child, G_VARIANT_TYPE ("av")); + for (; keys; keys++) { + if (keys->keyval == 0 && keys->keycode == 0 && keys->state == 0) +diff --git a/src/tests/ibus-keypress.c b/src/tests/ibus-keypress.c +index 3486523b..17920226 100644 +--- a/src/tests/ibus-keypress.c ++++ b/src/tests/ibus-keypress.c +@@ -173,7 +173,7 @@ set_engine_cb (GObject *object, + IBusBus *bus = IBUS_BUS (object); + GtkWidget *entry = GTK_WIDGET (data); + GdkDisplay *display; +- Display *xdisplay; ++ Display *xdisplay = NULL; + GError *error = NULL; + int i, j; + +diff --git a/util/IMdkit/FrameMgr.c b/util/IMdkit/FrameMgr.c +index 084b8810..0e91b78e 100644 +--- a/util/IMdkit/FrameMgr.c ++++ b/util/IMdkit/FrameMgr.c +@@ -1414,6 +1414,7 @@ static int FrameInstGetSize (FrameInst fi) + break; + } + /*endswitch*/ ++ assert (i >= 0); + i = _FrameInstIncrement (fi->template, i); + } + /*endwhile*/ +-- +2.17.1 + diff --git a/SOURCES/ibus-xinput b/SOURCES/ibus-xinput new file mode 100644 index 0000000..4d7f457 --- /dev/null +++ b/SOURCES/ibus-xinput @@ -0,0 +1,18 @@ +XIM=ibus +XIM_PROGRAM="/usr/bin/ibus-daemon" +ICON="ibus" +XIM_ARGS="-r --xim" +PREFERENCE_PROGRAM=/usr/bin/ibus-setup +SHORT_DESC="IBus" +GTK_IM_MODULE=ibus +NOT_RUN=gnome3 + +if test -f /usr/lib64/qt5/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so || \ + test -f /usr/lib/qt5/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so || \ + test -f /usr/lib64/qt4/plugins/inputmethods/libqtim-ibus.so || \ + test -f /usr/lib/qt4/plugins/inputmethods/libqtim-ibus.so; +then + QT_IM_MODULE=ibus +else + QT_IM_MODULE=xim +fi diff --git a/SOURCES/ibus-xx-emoji-compose.patch b/SOURCES/ibus-xx-emoji-compose.patch new file mode 100644 index 0000000..1567dde --- /dev/null +++ b/SOURCES/ibus-xx-emoji-compose.patch @@ -0,0 +1,134 @@ +From 8375f391e1b9bfc048ff14fd458f689d853064ac Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Thu, 28 Feb 2019 15:26:11 +0900 +Subject: [PATCH] ui/gtk3: Do not add emojis in compose category to emoji + variants + +Any emojis in compose category have variants and should be shown by default. +--- + bindings/vala/IBus-1.0-custom.vala | 4 ++ + ui/gtk3/emojier.vala | 74 ++++++++++++++++++++++++++---- + 2 files changed, 68 insertions(+), 10 deletions(-) + +diff --git a/bindings/vala/IBus-1.0-custom.vala b/bindings/vala/IBus-1.0-custom.vala +index 7d34a8bd..ec46fc90 100644 +--- a/bindings/vala/IBus-1.0-custom.vala ++++ b/bindings/vala/IBus-1.0-custom.vala +@@ -17,4 +17,8 @@ namespace IBus { + public class PanelService : IBus.Service { + public void panel_extension_register_keys(string first_property_name, ...); + } ++ public class EmojiData : IBus.Serializable { ++ [CCode (cname = "ibus_emoji_data_new", has_construct_function = true)] ++ public EmojiData (string first_property_name, ...); ++ } + } +diff --git a/ui/gtk3/emojier.vala b/ui/gtk3/emojier.vala +index aedeb4cb..fc15cffe 100644 +--- a/ui/gtk3/emojier.vala ++++ b/ui/gtk3/emojier.vala +@@ -389,6 +389,14 @@ public class IBusEmojier : Gtk.ApplicationWindow { + } + make_emoji_dict(m_current_lang_id); + } ++ add_variants_to_component(); ++ ++ GLib.List annotations = ++ m_annotation_to_emojis_dict.get_keys(); ++ foreach (unowned string annotation in annotations) { ++ if (m_emoji_max_seq_len < annotation.length) ++ m_emoji_max_seq_len = annotation.length; ++ } + update_favorite_emoji_dict(); + } + +@@ -430,11 +438,54 @@ public class IBusEmojier : Gtk.ApplicationWindow { + update_annotation_to_emojis_dict(data); + update_category_to_emojis_dict(data, lang); + } +- GLib.List annotations = +- m_annotation_to_emojis_dict.get_keys(); +- foreach (unowned string annotation in annotations) { +- if (m_emoji_max_seq_len < annotation.length) +- m_emoji_max_seq_len = annotation.length; ++ } ++ ++ ++ private static void add_variants_to_component() { ++ string category = "Component"; ++ unowned GLib.SList hits = ++ m_category_to_emojis_dict.lookup(category); ++ if (hits == null) { ++ category = "component"; ++ hits = m_category_to_emojis_dict.lookup(category); ++ } ++ if (hits == null) ++ return; ++ GLib.SList emoji_list = ++ new GLib.SList(); ++ GLib.SList annotations = new GLib.SList(); ++ annotations.append("zero"); ++ IBus.EmojiData _data; ++ _data = new IBus.EmojiData("emoji", "\u200d", ++ "annotations", annotations, ++ "description", ++ "ZERO WIDTH JOINER", ++ "category", category); ++ emoji_list.append(_data); ++ annotations = null; ++ annotations.append("text"); ++ annotations.append("variation"); ++ annotations.append("selector"); ++ _data = new IBus.EmojiData("emoji", "\ufe0e", ++ "annotations", annotations, ++ "description", ++ "VARIATION SELECTOR-15", ++ "category", category); ++ emoji_list.append(_data); ++ annotations = null; ++ annotations.append("emoji"); ++ annotations.append("variation"); ++ annotations.append("selector"); ++ _data = new IBus.EmojiData("emoji", "\ufe0f", ++ "annotations", annotations, ++ "description", ++ "VARIATION SELECTOR-16", ++ "category", category); ++ emoji_list.append(_data); ++ foreach (IBus.EmojiData data in emoji_list) { ++ update_emoji_to_data_dict(data, "en"); ++ update_annotation_to_emojis_dict(data); ++ update_category_to_emojis_dict(data, "en"); + } + } + +@@ -583,10 +634,12 @@ public class IBusEmojier : Gtk.ApplicationWindow { + category = EMOJI_CATEGORY_OTHERS; + if (lang == "en") { + bool has_variant = false; +- foreach (unichar ch in EMOJI_VARIANT_LIST) { +- if (emoji.index_of_char(ch) >= 0) { +- has_variant = true; +- break; ++ if (category.ascii_casecmp("component") != 0) { ++ foreach (unichar ch in EMOJI_VARIANT_LIST) { ++ if (emoji.index_of_char(ch) >= 0) { ++ has_variant = true; ++ break; ++ } + } + } + // If emoji includes variants (skin colors and items), +@@ -606,7 +659,8 @@ public class IBusEmojier : Gtk.ApplicationWindow { + if (variants.find_custom(emoji, GLib.strcmp) == null) { + if (variants == null) + variants.append(base_emoji); +- variants.append(emoji); ++ if (base_emoji != emoji) ++ variants.append(emoji); + m_emoji_to_emoji_variants_dict.replace( + base_emoji, + variants.copy_deep(GLib.strdup)); +-- +2.21.0 + diff --git a/SOURCES/ibus-xx-setup-env.patch b/SOURCES/ibus-xx-setup-env.patch new file mode 100644 index 0000000..fd68479 --- /dev/null +++ b/SOURCES/ibus-xx-setup-env.patch @@ -0,0 +1,60 @@ +From 1cb5032e85d85f496e349236d1b74f17fb8db966 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Tue, 23 Apr 2019 15:40:45 +0900 +Subject: [PATCH] configure: Move ibus-setup from configure.ac to Makefile.am + +@localedir@ can be extracted to ${datarootdir}/locale and +it needs datarootdir=/usr/share in case configure.ac is used +and deleting the datarootdir line caused a regression. +All variables can be extracted in Makefile.am with sed. +--- + configure.ac | 1 - + setup/Makefile.am | 13 +++++++++++-- + 2 files changed, 11 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 9518e808..7503f3e8 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -724,7 +724,6 @@ ibus/interface/Makefile + ui/Makefile + ui/gtk3/Makefile + setup/Makefile +-setup/ibus-setup + bindings/Makefile + bindings/pygobject/Makefile + bindings/vala/Makefile +diff --git a/setup/Makefile.am b/setup/Makefile.am +index cb4dd8d1..34c8f136 100644 +--- a/setup/Makefile.am ++++ b/setup/Makefile.am +@@ -3,8 +3,8 @@ + # ibus - The Input Bus + # + # Copyright (c) 2007-2014 Peng Huang +-# Copyright (c) 2015-2017 Takao Fujiwara +-# Copyright (c) 2007-2017 Red Hat, Inc. ++# Copyright (c) 2015-2019 Takao Fujiwara ++# Copyright (c) 2007-2019 Red Hat, Inc. + # + # This library is free software; you can redistribute it and/or + # modify it under the terms of the GNU Lesser General Public +@@ -40,6 +40,15 @@ ibussetup_DATA = \ + bin_SCRIPTS = ibus-setup + ibussetupdir = $(pkgdatadir)/setup + ++ibus-setup: ibus-setup.in ++ $(AM_V_GEN) sed -e "s|\@datarootdir\@|$(datarootdir)|g" \ ++ -e "s|\@localedir\@|$(localedir)|g" \ ++ -e "s|\@libexecdir\@|$(libexecdir)|g" \ ++ -e "s|\@prefix\@|$(prefix)|g" \ ++ -e "s|\@PYTHON\@|$(PYTHON)|g" \ ++ $< > $@.tmp && \ ++ mv $@.tmp $@ ++ + desktop_in_files = ibus-setup.desktop.in + desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) + desktopdir = $(datadir)/applications +-- +2.21.0 + diff --git a/SOURCES/ibus.conf.5 b/SOURCES/ibus.conf.5 new file mode 100644 index 0000000..c5795b3 --- /dev/null +++ b/SOURCES/ibus.conf.5 @@ -0,0 +1,73 @@ +.\" This file is distributed under the same license as the ibus +.\" package. +.\" Copyright (C) Takao Fujiwara , 2013. +.\" +.TH IBUS.CONF "5" "August 2013" "1.5.3" "User Commands" +.SH NAME +.B ibus.conf +\- X input preload/configuration file for ibus + +.SH SYNOPSIS +.B /etc/X11/xinit/xinput.d/ibus.conf + +.SH DESCRIPTION + +.PP +IBus is an Intelligent Input Bus. It is a new input framework for Linux +OS. It provides full featured and user friendly input method user +interface. It also may help developers to develop input method easily. + +.PP +.B ibus.conf +is a configuration file containing X input setting values to be read in +and set by /etc/X11/xinit/xinitrc\-common. +.I imsettings-switch(1) +is called from XDG auto\-start and invokes +xinitrc\-common. +.LP +If this file is the alias of +.I /etc/X11/xinit/xinputrc +for the system setting +or +.I [$XDG_CONFIG_HOME|$HOME/.config]/imsettings/xinputrc +for the user setting, the setting can be default. +.I im\-chooser(1) +can choose the user setting. +.LP +The configuration options are: +.TP +\fBXIM\fP +XIM name for XMODIFIERS +.TP +\fBXIM_PROGRAM\fP +XIM executable program name +.TP +\fBXIM_ARGS\fP +XIM arguments for XIM_PROGRAM +.TP +\fBSHORT_DESC\fP +XIM human readable name for +.I im\-chooser(1) +.TP +\fBICON\fP +icon file for +.I im\-chooser(1) +.TP +\fBPREFERENCE_PROGRAM\fP +XIM setup program for +.I im\-chooser(1) +.TP +\fBGTK_IM_MODULE\fP +IM environment valuable for GTK+ applications. +.TP +\fBQT_IM_MODULE\fP +IM environment valuable for QT applications. + +.SH BUGS +If you find a bug, please report it at http://code.google.com/p/ibus/issues/list + +.SH "SEE ALSO" +.BR ibus\-daemon (1) +.BR imsettings\-switch (1) +.BR im\-chooser (1) +.BR X (7) diff --git a/SPECS/ibus.spec b/SPECS/ibus.spec new file mode 100644 index 0000000..5b98784 --- /dev/null +++ b/SPECS/ibus.spec @@ -0,0 +1,1618 @@ +%if (0%{?fedora} > 29 || 0%{?rhel} > 7) +%global with_python2 0 +%else +%global with_python2 1 +%endif + +%global with_pkg_config %(pkg-config --version >/dev/null 2>&1 && echo -n "1" || echo -n "0") + +%if (0%{?fedora} > 21 || 0%{?rhel} > 7) +%global with_kde5 1 +%else +%global with_kde5 0 +%endif + +%global ibus_api_version 1.0 + +# for bytecompile in %%{_datadir}/ibus/setup +%global __python %{__python3} + +%if %with_pkg_config +%{!?gtk2_binary_version: %global gtk2_binary_version %(pkg-config --variable=gtk_binary_version gtk+-2.0)} +%{!?gtk3_binary_version: %global gtk3_binary_version %(pkg-config --variable=gtk_binary_version gtk+-3.0)} +%global glib_ver %([ -a %{_libdir}/pkgconfig/glib-2.0.pc ] && pkg-config --modversion glib-2.0 | cut -d. -f 1,2 || echo -n "999") +%else +%{!?gtk2_binary_version: %global gtk2_binary_version ?.?.?} +%{!?gtk3_binary_version: %global gtk3_binary_version ?.?.?} +%global glib_ver 0 +%endif + +%global dbus_python_version 0.83.0 + +Name: ibus +Version: 1.5.19 +Release: 11%{?dist} +Summary: Intelligent Input Bus for Linux OS +License: LGPLv2+ +Group: System Environment/Libraries +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 +Source3: https://fujiwara.fedorapeople.org/ibus/po/%{name}-po-1.5.19-20180822.tar.gz +# Patch0: %%{name}-HEAD.patch +# RHEL 8.0 From upstreamed patches +Patch0: %{name}-HEAD.patch +# RHEL 8.2 Fix not to assert with wrong compose files +Patch1: %{name}-1470673-emoji-warn-instead-assert.patch +# RHEL 8.2 Fix not to assert with 16 candidates +Patch2: %{name}-2076-fix-16-candidates.patch +# RHEL 8.2 Show emoji compose in the top category +Patch3: %{name}-xx-emoji-compose.patch +# RHEL 8.2 Extract $(datarootdir) in ibus-setup +Patch4: %{name}-xx-setup-env.patch +# RHEL 8.2 CVE 2019-14822 +Patch5: %{name}-1750836-server-auth-observer.patch +# RHEL 8.2 Bug 1682157 - Integrate ibus-desktop-testing and test cases +Patch6: %{name}-1682157-ci.patch + +# RHEL 8.0 Under testing #1349148 #1385349 #1350291 #1406699 #1432252 #1601577 +Patch100: %{name}-1385349-segv-bus-proxy.patch + +BuildRequires: gettext-devel +BuildRequires: libtool +# for gtkdoc-fixxref +BuildRequires: glib2-doc +BuildRequires: gtk2-devel +BuildRequires: gtk3-devel +BuildRequires: dbus-glib-devel +BuildRequires: dbus-python-devel >= %{dbus_python_version} +BuildRequires: desktop-file-utils +BuildRequires: gtk-doc +BuildRequires: dconf-devel +BuildRequires: dbus-x11 +BuildRequires: python3-devel +BuildRequires: python3-gobject +# https://bugzilla.gnome.org/show_bug.cgi?id=759334 +# Need python2 for gsettings-schema-convert +BuildRequires: python2-devel +BuildRequires: vala +BuildRequires: vala-devel +BuildRequires: vala-tools +# for AM_GCONF_SOURCE_2 in configure.ac +BuildRequires: GConf2-devel +BuildRequires: git +BuildRequires: intltool +BuildRequires: iso-codes-devel +BuildRequires: libnotify-devel +BuildRequires: libwayland-client-devel +%if %with_kde5 +BuildRequires: qt5-qtbase-devel +%endif +BuildRequires: cldr-emoji-annotation +BuildRequires: unicode-emoji +BuildRequires: unicode-ucd +# for ibus-keypress +BuildRequires: libXtst-devel + +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: %{name}-gtk2%{?_isa} = %{version}-%{release} +Requires: %{name}-gtk3%{?_isa} = %{version}-%{release} +Requires: %{name}-setup = %{version}-%{release} + +Requires: iso-codes +Requires: dconf +# rpmlint asks to delete librsvg2 +#Requires: librsvg2 +# Owner of %%python3_sitearch/gi/overrides +Requires: python3-gobject +# https://bugzilla.redhat.com/show_bug.cgi?id=1161871 +%{?__python3:Requires: %{__python3}} +# Owner of %%{_sysconfdir}/X11/xinit +Requires: xorg-x11-xinit +# for setxkbmap +Requires: xorg-x11-xkb-utils +%if (0%{?fedora} > 29 || 0%{?rhel} > 8) +%else +Requires: dbus-x11 +%endif + +Requires: desktop-file-utils +Requires(post): desktop-file-utils +Requires(postun): desktop-file-utils +Requires: dconf +Requires(postun): dconf +Requires(posttrans): dconf + +Requires: %{_sbindir}/alternatives +Requires(post): %{_sbindir}/alternatives +Requires(postun): %{_sbindir}/alternatives + +%global _xinputconf %{_sysconfdir}/X11/xinit/xinput.d/ibus.conf + +%description +IBus means Intelligent Input Bus. It is an input framework for Linux OS. + +%package libs +Summary: IBus libraries +Group: System Environment/Libraries + +Requires: dbus >= 1.2.4 +Requires: glib2 >= %{glib_ver} +# Owner of %%{_libdir}/girepository-1.0 +Requires: gobject-introspection +%if (0%{?fedora} > 28 || 0%{?rhel} > 7) +%else +Conflicts: %{name}%{?_isa} < %{version} +%endif + +%description libs +This package contains the libraries for IBus + +%package gtk2 +Summary: IBus IM module for GTK2 +Group: System Environment/Libraries +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: glib2 >= %{glib_ver} +Requires(post): glib2 >= %{glib_ver} +# Added for upgrade el6 to el7 +Provides: ibus-gtk = %{version}-%{release} +Obsoletes: ibus-gtk < %{version}-%{release} + +%description gtk2 +This package contains IBus IM module for GTK2 + +%package gtk3 +Summary: IBus IM module for GTK3 +Group: System Environment/Libraries +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: glib2 >= %{glib_ver} +Requires(post): glib2 >= %{glib_ver} + +%description gtk3 +This package contains IBus IM module for GTK3 + +%package setup +Summary: IBus setup utility +Group: System Environment/Libraries +Requires: %{name} = %{version}-%{release} +%{?__python3:Requires: %{__python3}} +Requires: python3-gobject +BuildRequires: gobject-introspection-devel +BuildRequires: pygobject3-devel +BuildArch: noarch + +%description setup +This is a setup utility for IBus. + +%if %with_python2 +%package pygtk2 +Summary: IBus PyGTK2 library +Group: System Environment/Libraries +%if (0%{?fedora} && 0%{?fedora} <= 27) || (0%{?rhel} && 0%{?rhel} <= 7) +Requires: dbus-python >= %{dbus_python_version} +%else +Requires: python2-dbus >= %{dbus_python_version} +%endif +Requires: python2 +Requires: pygtk2 +BuildArch: noarch + +%description pygtk2 +This is a PyGTK2 library for IBus. Now major IBus engines use PyGObject3 +and this package will be deprecated. +%endif + +%package py2override +Summary: IBus Python2 override library +Group: System Environment/Libraries +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +# Owner of %%python2_sitearch/gi/overrides +%if (0%{?fedora} && 0%{?fedora} <= 27) || (0%{?rhel} && 0%{?rhel} <= 7) +Requires: pygobject3-base +%else +Requires: python2-gobject-base +%endif +Requires: python2 + +%description py2override +This is a Python2 override library for IBus. The Python files override +some functions in GObject-Introspection. + +%package wayland +Summary: IBus IM module for Wayland +Group: System Environment/Libraries +Requires: %{name}-libs%{?_isa} = %{version}-%{release} + +%description wayland +This package contains IBus IM module for Wayland + +%package devel +Summary: Development tools for ibus +Group: Development/Libraries +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: dbus-devel +Requires: glib2-devel +# Owner of %%{_datadir}/gir-1.0 +Requires: gobject-introspection-devel +# Owner of %%{_datadir}/vala/vapi +Requires: vala + +%description devel +The ibus-devel package contains the header files and developer +docs for ibus. + +%package devel-docs +Summary: Developer documents for IBus +Group: Development/Libraries +BuildArch: noarch + +%description devel-docs +The ibus-devel-docs package contains developer documentation for IBus + +%package desktop-testing +Summary: Wrapper of InstalledTests Runner for IBus +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description desktop-testing +GNOME desktop testing runner implements the InstalledTests specification +and IBus also needs focus events to enable input contexts on text widgets. +The wrapper script runs gnome-session for the focus events and GNOME +desktop testing runner internally. + +%package tests +Summary: Tests for the %{name} package +Group: Development/Libraries +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} + +%description tests +The %{name}-tests package contains tests that can be used to verify +the functionality of the installed %{name} package. + + +%prep +%autosetup -S git +# cp client/gtk2/ibusimcontext.c client/gtk3/ibusimcontext.c || : +cp client/gtk2/ibusimcontext.c client/gtk3/ibusimcontext.c || : + +zcat %SOURCE3 | tar xfv - + +# prep test +diff client/gtk2/ibusimcontext.c client/gtk3/ibusimcontext.c +if test $? -ne 0 ; then + echo "Have to copy ibusimcontext.c into client/gtk3" + abort +fi + +%build +#autoreconf -f -i -v +#make -C ui/gtk3 maintainer-clean-generic +#make -C tools maintainer-clean-generic +autoreconf -f -i -v +%configure \ + --disable-static \ + --enable-gtk2 \ + --enable-gtk3 \ + --enable-xim \ + --enable-gtk-doc \ + --enable-surrounding-text \ + --with-python=python3 \ +%if ! %with_python2 + --disable-python2 \ +%else + --enable-python-library \ +%endif + --enable-wayland \ +%if ! %with_kde5 + --disable-appindicator \ +%endif + --enable-introspection \ + --enable-install-tests \ + %{nil} + +make -C ui/gtk3 maintainer-clean-generic +make %{?_smp_mflags} + +%install +make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p' +rm -f $RPM_BUILD_ROOT%{_libdir}/libibus-*%{ibus_api_version}.la +rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/%{gtk2_binary_version}/immodules/im-ibus.la +rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-3.0/%{gtk3_binary_version}/immodules/im-ibus.la + +# install man page +for S in %{SOURCE2} +do + cp $S . + MP=`basename $S` + gzip $MP + install -pm 644 -D ${MP}.gz $RPM_BUILD_ROOT%{_datadir}/man/man5/${MP}.gz +done + +# install xinput config file +install -pm 644 -D %{SOURCE1} $RPM_BUILD_ROOT%{_xinputconf} + +# install .desktop files +echo "NoDisplay=true" >> $RPM_BUILD_ROOT%{_datadir}/applications/ibus-setup.desktop +#echo "X-GNOME-Autostart-enabled=false" >> $RPM_BUILD_ROOT%%{_sysconfdir}/xdg/autostart/ibus.desktop + +# Delete unused prefix line in Fedora only +if test `grep '^prefix' $RPM_BUILD_ROOT%{_bindir}/ibus-setup | wc -l` = 1 ; then + sed -i -e '/^prefix/d' $RPM_BUILD_ROOT%{_bindir}/ibus-setup +fi + + +desktop-file-install --delete-original \ + --dir $RPM_BUILD_ROOT%{_datadir}/applications \ + $RPM_BUILD_ROOT%{_datadir}/applications/* + +# FIXME: no version number +%find_lang %{name}10 + +%check +make check \ + DISABLE_GUI_TESTS="ibus-compose ibus-keypress test-stress" \ + VERBOSE=1 \ + %{nil} + +%post +%{_sbindir}/alternatives --install %{_sysconfdir}/X11/xinit/xinputrc xinputrc %{_xinputconf} 83 || : + +%postun +if [ "$1" -eq 0 ]; then + %{_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 ] && \ + rm %{_sysconfdir}/dconf/db/ibus || : + # 'ibus write-cache --system' updates the system cache. + [ -f /var/cache/ibus/bus/registry ] && \ + rm /var/cache/ibus/bus/registry || : +fi + +%posttrans +dconf update || : +[ -x %{_bindir}/ibus ] && \ + %{_bindir}/ibus write-cache --system &>/dev/null || : + +%ldconfig_scriptlets libs + +%files -f %{name}10.lang +# FIXME: no version number +%doc AUTHORS COPYING README +%dir %{_datadir}/ibus/ +%{_bindir}/ibus +%{_bindir}/ibus-daemon +%{_datadir}/applications/org.freedesktop.IBus.Panel.Emojier.desktop +%{_datadir}/applications/org.freedesktop.IBus.Panel.Extension.Gtk3.desktop +%{_datadir}/bash-completion/completions/ibus.bash +%{_datadir}/dbus-1/services/*.service +%{_datadir}/GConf/gsettings/* +%{_datadir}/glib-2.0/schemas/*.xml +%{_datadir}/ibus/component +%{_datadir}/ibus/dicts +%{_datadir}/ibus/engine +%{_datadir}/ibus/keymaps +%{_datadir}/icons/hicolor/*/apps/* +%{_datadir}/man/man1/ibus.1.gz +%{_datadir}/man/man1/ibus-daemon.1.gz +%{_datadir}/man/man7/ibus-emoji.7.gz +%{_datadir}/man/man5/00-upstream-settings.5.gz +%{_datadir}/man/man5/ibus.5.gz +%{_datadir}/man/man5/ibus.conf.5.gz +%{_libexecdir}/ibus-engine-simple +%{_libexecdir}/ibus-dconf +%{_libexecdir}/ibus-portal +%{_libexecdir}/ibus-extension-gtk3 +%{_libexecdir}/ibus-ui-emojier +%{_libexecdir}/ibus-ui-gtk3 +%{_libexecdir}/ibus-x11 +%{_sysconfdir}/dconf/db/ibus.d +%{_sysconfdir}/dconf/profile/ibus +%python3_sitearch/gi/overrides/__pycache__/*.py* +%python3_sitearch/gi/overrides/IBus.py +# ibus owns xinput.d because gnome does not like to depend on imsettings. +%dir %{_sysconfdir}/X11/xinit/xinput.d +# Do not use %%config(noreplace) to always get the new keywords in _xinputconf +# For user customization, $HOME/.xinputrc can be used instead. +%config %{_xinputconf} + +%files libs +%{_libdir}/libibus-*%{ibus_api_version}.so.* +%{_libdir}/girepository-1.0/IBus*-1.0.typelib + +%files gtk2 +%{_libdir}/gtk-2.0/%{gtk2_binary_version}/immodules/im-ibus.so + +%files gtk3 +%{_libdir}/gtk-3.0/%{gtk3_binary_version}/immodules/im-ibus.so + +# The setup package won't include icon files so that +# gtk-update-icon-cache is executed in the main package only one time. +%files setup +%{_bindir}/ibus-setup +%{_datadir}/applications/ibus-setup.desktop +%{_datadir}/ibus/setup +%{_datadir}/man/man1/ibus-setup.1.gz + +%if %with_python2 +%files pygtk2 +%dir %{python2_sitelib}/ibus +%{python2_sitelib}/ibus/* +%endif + +%if %with_python2 +%files py2override +%python2_sitearch/gi/overrides/IBus.py* +%endif + +%files wayland +%{_libexecdir}/ibus-wayland + +%files devel +%{_libdir}/lib*.so +%{_libdir}/pkgconfig/* +%{_includedir}/* +%{_datadir}/gir-1.0/IBus*-1.0.gir +%{_datadir}/vala/vapi/ibus-*1.0.vapi +%{_datadir}/vala/vapi/ibus-*1.0.deps + +%files devel-docs +# Own html dir since gtk-doc is heavy. +%dir %{_datadir}/gtk-doc +%dir %{_datadir}/gtk-doc/html +%{_datadir}/gtk-doc/html/* + +%files desktop-testing +%{_bindir}/ibus-desktop-testing-runner + +%files tests +%dir %{_libexecdir}/installed-tests +%{_libexecdir}/installed-tests/ibus +%dir %{_datadir}/installed-tests +%{_datadir}/installed-tests/ibus + +%changelog +* Thu Jan 09 2020 Takao Fujiwara - 1.5.19-11 +- Resolves: #1750836 - Fix CVE-2019-14822 + +* Thu Dec 12 2019 Takao Fujiwara - 1.5.19-10 +- Resolves: #1750836 - Revert Hangul fix for 8.2 schedule + +* Tue Dec 03 2019 Takao Fujiwara - 1.5.19-9 +- Resolves: #1682157 - Fix RHEL 8.2 covscan #2 + +* Sat Nov 30 2019 Takao Fujiwara - 1.5.19-8 +- Resolves: #1682157 - Fix libibus dependency in ibus-tests with rpmdiff + +* Fri Nov 29 2019 Takao Fujiwara - 1.5.19-7 +- Resolves: #1682157 - Fix RHEL 8.2 covscan + +* Fri Nov 29 2019 Takao Fujiwara - 1.5.19-6 +- Resolves: #1682157 - Add CI + +* Fri Nov 29 2019 Takao Fujiwara - 1.5.19-5 +- Resolves: #1713606 - Fix hangul preedit commit with mouse click +- Resolves: #1682157 - Integrate ibus-desktop-testing and test cases + +* Tue Nov 06 2018 Takao Fujiwara - 1.5.19-4 +- Delete Requires ibus in ibus-gtk* for Flatpak +- Update upstreamed patches + +* Wed Oct 10 2018 Takao Fujiwara - 1.5.19-3 +- Fix Bug SEGV Choose an emoji by mouse from the emoji category list +- Fix Bug 1618682 - SEGV with ASCII on emojier in Wayland +- Support Shift-Space on emojier preedit +- Do not move Emojier popup with the active candidate in Xorg +- Do not clear Unicode data when emoji annotation lang is changed + +* Thu Sep 20 2018 Tomas Orsava - 1.5.19-2 +- Require the Python interpreter directly instead of using the package name +- Related: rhbz#1619153 + +* Wed Aug 08 2018 Takao Fujiwara - 1.5.19-1 +- Bumped to 1.5.19 + +* Mon Aug 06 2018 Takao Fujiwara - 1.5.18-14 +- Fixed Man page scan results for ibus +- Added IBUS_DISCARD_PASSWORD env variable for password dialog in firefox +- Added history annotation for previous emojis + +* Tue Jul 24 2018 Takao Fujiwara - 1.5.18-13 +- Deleted deprecated g_mem_* APIs + +* Mon Jul 23 2018 Takao Fujiwara - 1.5.18-12 +- Rebuilt with RHEL code reviews + +* Fri Jul 13 2018 Fedora Release Engineering - 1.5.18-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Mon Jul 02 2018 Miro Hrončok - 1.5.18-10 +- Rebuilt for Python 3.7 + +* Fri Jun 29 2018 Takao Fujiwara - 1.5.18-9 +- Do not use combined characters on preedit for compose keys +- Fixed an infinite loop of extension preedit with xterm + +* Wed Jun 27 2018 Takao Fujiwara - 1.5.18-8 +- Enable preedit for compose keys +- Fix SEGV in panel_binding_parse_accelerator + +* Wed Jun 20 2018 Takao Fujiwara - 1.5.18-7 +- Moved input focus on Emojier to engines' preedit +- Removed ibus-xx-emoji-harfbuzz.patch not to change session emoji font + +* Tue Jun 19 2018 Miro Hrončok - 1.5.18-6 +- Rebuilt for Python 3.7 + +* Mon May 07 2018 Takao Fujiwara - 1.5.18-5 +- Disabled python2 since RHEL8 +- Run make check in %%check except for GUI testings +- Fixed Bug 1574855 - [abrt] ibus: ibus_engine_filter_key_event() + +* Fri Mar 30 2018 Takao Fujiwara - 1.5.18-4 +- Fixed Bug 1554714 - improve order of unicode matches + +* Thu Mar 15 2018 Takao Fujiwara - 1.5.18-3 +- Fixed Bug 1554813 - Enter key on numpad in Emojier + +* Fri Mar 09 2018 Takao Fujiwara - 1.5.18-2 +- Rebuilt for cldr-emoji-annotation-32.90.0_1 and unicode-emoji-10.90.20180207 + +* Fri Mar 02 2018 Takao Fujiwara - 1.5.18-1 +- Bumped to 1.5.18 + +* Wed Feb 28 2018 Iryna Shcherbina - 1.5.17-11 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + +* Tue Feb 27 2018 Takao Fujiwara - 1.5.17-10 +- Disabled panel extension for gdm user +- Enabled panel extension in Wayland + +* Wed Feb 21 2018 Takao Fujiwara - 1.5.17-9 +- Added panel extension for emoji keybinding not to depen on desktops +- Showed Unicode code points on Unicode name list + +* Tue Feb 13 2018 Igor Gnatenko - 1.5.17-8 +- Remove useless requires + +* Tue Feb 06 2018 Takao Fujiwara - 1.5.17-7 +- Added Unicode typing on Emojier + +* Sat Feb 03 2018 Igor Gnatenko - 1.5.17-6 +- Switch to %%ldconfig_scriptlets + +* Fri Jan 19 2018 Takao Fujiwara - 1.5.17-5 +- Rebuilt for scriptlets + +* Wed Jan 17 2018 Takao Fujiwara - 1.5.17-4 +- Added DBus filtering + +* Sat Jan 06 2018 Igor Gnatenko - 1.5.17-3 +- Remove obsolete scriptlets + +* Fri Jan 05 2018 Igor Gnatenko - 1.5.17-2 +- Remove obsolete scriptlets + +* Sun Oct 22 2017 Takao Fujiwara - 1.5.17-1 +- Bumped to 1.5.17 + +* Thu Sep 21 2017 Takao Fujiwara - 1.5.16-11 +- Copy ibusimcontext.c +- Fix Super-space in Plasma after ibus exit + +* Wed Sep 20 2017 Takao Fujiwara - 1.5.16-10 +- Fix Bug 1490733 Emojier takes wrong fonts + +* Thu Sep 14 2017 Takao Fujiwara - 1.5.16-9 +- Fix scaling factor, mouse events on switcher, c-s-u on im-ibus, + propertypanel position and menu +- Add ibus-portal +- Move ibus-emoji-dialog.vapi in the build +- Fixed some SEGVs #1406699 #1432252 + +* Wed Aug 02 2017 Fedora Release Engineering - 1.5.16-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Mon Jul 31 2017 Florian Weimer - 1.5.16-7 +- Rebuild with binutils fix for ppc64le (#1475636) + +* Thu Jul 27 2017 Takao Fujiwara - 1.5.16-6 +- Fixed some SEGVs #1349148 #1385349 #1350291 #1368593 + Added 1385349-segv-bus-proxy.patch + +* Wed Jul 26 2017 Fedora Release Engineering - 1.5.16-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Jul 21 2017 Takao Fujiwara - 1.5.16-4 +- Fixed Bug 1471079 - SEGV of Emojier on de locale + +* Thu Jul 13 2017 Takao Fujiwara - 1.5.16-3 +- Enabled HarfBuzz rendering without Pango glyph calc for emoji + +* Mon May 29 2017 Takao Fujiwara - 1.5.16-2 +- Added ctrl-c,v,x for annotations and ctrl-shift-c for emoji +- Added Malay and Mongolian keymaps +- Made all emoji dicts to fully qualified + +* Mon May 15 2017 Takao Fujiwara - 1.5.16-1 +- Bumped to 1.5.16 + +* Tue May 09 2017 Takao Fujiwara - 1.5.15-8 +- Dropped nodejs-emojione-json and import unicode-emoji instead +- Created emoji tab in ibus-setup +- Set default emoji font size from gsettings in ibus emoji command +- Added an option of emoji partial match in ibus-setup +- Hid emoji variants by default +- Added ibus-emoji man page +- emoji favorites category is updated by selecting emoji + +* Thu Apr 13 2017 Takao Fujiwara - 1.5.15-7 +- Supported ibus emoji command on Wayland +- Changed modal dialog to modeless dialog + +* Wed Apr 05 2017 Takao Fujiwara - 1.5.15-6 +- Enabled unicode_alt in EmojiOne json file +- Enabled to type multiple code points on Emojier +- Fixed IBusEmojiDialog_1_0_gir_LIBS for --as-needed LDFLAGS + +* Mon Mar 27 2017 Takao Fujiwara - 1.5.15-5 +- Moved language setting on IBusEmojier to ibus-setup. +- Enabled strcasecmp to match emoji annotations. +- Added a build error message if emoji xml files are not found. + +* Wed Mar 15 2017 Takao Fujiwara - 1.5.15-4 +- Implemented Ctrl-[f|b|n|p|h|e|a|u] for cursor operations on emoji dialog +- Added XSetIOErrorHandler() for GNOME3 desktop + +* Mon Mar 13 2017 Takao Fujiwara - 1.5.15-3 +- Emoji dialog enhancements and bug fixes + Fixed ibus_emoji_dict_load() API. + Focus on emoji text entry by default + Removed internal text buffer and use Gtk.Entry buffer instead. + Implemented cursor left, right, home, end on emoji annotation preedit. + Show localized emoji description from tts in emoji xml. + +* Thu Mar 09 2017 Takao Fujiwara - 1.5.15-2 +- Added ibus-HEAD.patch to get upstream patches + Fixed ibus_emojier_run() SIGABRT with `ibus emoji` + Enhanced theme color on emoji candidates + +* Mon Mar 06 2017 Takao Fujiwara - 1.5.15-1 +- Bumped to 1.5.15 + +* Fri Feb 10 2017 Fedora Release Engineering - 1.5.14-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Wed Jan 11 2017 Takao Fujiwara - 1.5.14-5 +- support scroll event in candidates panel +- Fixed Bug 1403985 - Emoji typing is enabled during Unicode typing +- Fixed Bug 1402494 - Font settings of ibus are ignored on non-Gnome + +* Mon Dec 19 2016 Miro Hrončok - 1.5.14-4 +- Rebuild for Python 3.6 + +* Thu Oct 06 2016 Takao Fujiwara - 1.5.14-3 +- Fixed Bug 1380675 - Emoji leaves the candidates of @laugh when @laughing +- Fixed Bug 1380690 - User is not able to select emojis from digit keys +- Fixed Bug 1380691 - PageUp PageDown buttons on emoji lookup not working + +* Fri Sep 09 2016 Takao Fujiwara - 1.5.14-2 +- Fixed radio button on PropertyPanel. +- Updated translations. + +* Fri Aug 05 2016 Takao Fujiwara - 1.5.14-1 +- Bump to 1.5.14 + +* Wed Jul 27 2016 Dan Horák - 1.5.13-6 +- enable Emoji only on arches providing nodejs functionality + +* Tue Jul 26 2016 Takao Fujiwara - 1.5.13-5 +- Bug 1359753 - Implement Emoji typing + +* Tue Jul 19 2016 Fedora Release Engineering - 1.5.13-4 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Mon Jun 27 2016 Takao Fujiwara - 1.5.13-3 +- Bug 1349732 - ibus not working at all in Gnome Wayland +- Add ibus service file +- Fix CSS color format and font size + +* Mon Mar 28 2016 Takao Fujiwara - 1.5.13-2 +- Bug 1319215 - Add Requires besides Requires(post) + +* Mon Feb 22 2016 Takao Fujiwara - 1.5.13-1 +- Bumped to 1.5.13 + +* Thu Feb 04 2016 Fedora Release Engineering - 1.5.12-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jan 20 2016 Takao Fujiwara - 1.5.12-1 +- Bumped to 1.5.12 + +* Tue Nov 10 2015 Fedora Release Engineering - 1.5.11-2 +- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 + +* Thu Jul 16 2015 Takao Fujiwara - 1.5.11-1 +- Bumped to 1.5.11 +- Deleted with_python2_override_pkg macro +- Added glib2-doc BR + +* Wed Jun 17 2015 Fedora Release Engineering - 1.5.10-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Fri May 22 2015 Takao Fujiwara - 1.5.10-5 +- Updated ibus-HEAD.patch + Fixed Bug 1224025 - IBus radio menu items does not work + +* Fri Apr 24 2015 Takao Fujiwara - 1.5.10-4 +- Bug 1217410 Updated ibus-xinput for KDE5. + +* Fri Apr 24 2015 Takao Fujiwara - 1.5.10-3 +- Updated ibus-HEAD.patch from upstream + Fixed to show shortcuts on ibus-setup. + Bug 1214271 Fixed to enable IME with GTK3 applications in wayland. + +* Thu Apr 02 2015 Takao Fujiwara - 1.5.10-2 +- Updated ibus-HEAD.patch from upstream + Added Swedish svdvorak + I18N engine longnames and descriptions on ibus-setup + Moved PropertyPanel at bottom right in KDE5 + Drew gray color on Handle PropertyPanel + Enabled ibus engine full path icon in KDE5 + Updated translations + +* Wed Feb 25 2015 Takao Fujiwara - 1.5.10-1 +- Bumped to 1.5.10 + +* Sat Feb 21 2015 Till Maas - 1.5.9-11 +- Rebuilt for Fedora 23 Change + https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code + +* Mon Feb 02 2015 Petr Viktorin - 1.5.9-10 +- Remove dependency on Python 2 from main package + +* Mon Feb 02 2015 Takao Fujiwara - 1.5.9-9 +- Updated ibus-HEAD.patch to fix #1187956 IBusRegistry segv. + +* Thu Dec 18 2014 Takao Fujiwara - 1.5.9-8 +- Updated ibus-HEAD.patch to fix #1175595 ibus-x11 freeze + +* Mon Dec 08 2014 Takao Fujiwara - 1.5.9-7 +- Added ibus-1136623-lost-by-another-focus.patch to fix #1136623 + +* Mon Dec 08 2014 Takao Fujiwara - 1.5.9-6 +- Updated ibus-xx-increase-timeout.patch to fix #1163722 +- Updated ibus-HEAD.patch for upstream #1747, #1748, #1753 + and gnome #703020, gnome #730628 + +* Wed Nov 12 2014 Takao Fujiwara - 1.5.9-5 +- rhbz#1161871 Added BR of python and python3 + +* Tue Oct 28 2014 Takao Fujiwara - 1.5.9-4 +- Updated ibus-HEAD.patch for upstream #1744. + +* Fri Oct 24 2014 Takao Fujiwara - 1.5.9-3 +- Added ibus-xx-increase-timeout.patch + +* Wed Oct 01 2014 Takao Fujiwara - 1.5.9-2 +- Updated ibus-HEAD.patch for rhbz#1136623. +- Added ibus-po-1.5.9-20141001.tar.gz + +* Tue Sep 16 2014 Takao Fujiwara - 1.5.9-1 +- Bumped to 1.5.9 + +* Sat Aug 16 2014 Fedora Release Engineering - 1.5.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Thu Jul 24 2014 Takao Fujiwara - 1.5.8-1 +- Bumped to 1.5.8 +- Deleted ibus-810211-no-switch-by-no-trigger.patch +- Deleted ibus-541492-xkb.patch +- Deleted ibus-530711-preload-sys.patch +- Deleted ibus-xx-setup-frequent-lang.patch +- Deleted ibus-xx-f19-password.patch + +* Tue Jul 22 2014 Kalev Lember - 1.5.7-7 +- Rebuilt for gobject-introspection 1.41.4 + +* Mon Jul 14 2014 Takao Fujiwara - 1.5.7-6 +- Updated ibus-HEAD.patch from upstream. + Fixed ibus-setup SEGV when an engine is selected. + Fixed ibus-setup deprecated warnings with the latest python3-gobject. + Integrated the 'IBUS_SETUP_XID' environment variable for each engine setup. + Set prgname 'ibus-setup' for ibus-setup. + +* Mon Jul 07 2014 Takao Fujiwara - 1.5.7-5 +- Updated ibus-HEAD.patch from upstream. + Added pl(qwertz). + Fixed escape key with Ctrl-Shift-U. + Updated pt-br compose table from the latest xorg. + Do not sort ibus engines when they are saved by ibus-setup. + Updated jp IBusKeymap. + Added ibus reset-config and read-config sub-commands. + Update ibus(1) for read-config and reset-config. + +* Sat Jun 07 2014 Fedora Release Engineering - 1.5.7-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Tue May 27 2014 Kalev Lember - 1.5.7-3 +- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4 + +* Tue May 20 2014 Takao Fujiwara - 1.5.7-2 +- Updated ibus-HEAD.patch for width of ibus-setup. + +* Wed Apr 30 2014 Takao Fujiwara - 1.5.7-1 +- Bumped to 1.5.7 + +* Mon Apr 21 2014 Takao Fujiwara - 1.5.6-3 +- Do not require gtk-doc in ibus-devel-docs + +* Fri Mar 28 2014 Takao Fujiwara - 1.5.6-2 +- Updated ibus-HEAD.patch for Czech (qwerty) keymap. + +* Thu Mar 06 2014 Takao Fujiwara - 1.5.6-1 +- Bumped to 1.5.6 +- Deleted ibus-xx-ctrl-space.patch + +* Fri Jan 31 2014 Takao Fujiwara - 1.5.5-2 +- Enabled python3 ibus-setup + +* Tue Jan 14 2014 Takao Fujiwara - 1.5.5-1 +- Bumped to 1.5.5 +- Deleted notify-python in Requires + +* Fri Oct 04 2013 Takao Fujiwara - 1.5.4-2 +- Added ibus-HEAD.patch to sync upstream. + +* Fri Sep 20 2013 Takao Fujiwara - 1.5.4-1 +- Bumped to 1.5.4 +- Added ibus.conf.5 +- Added ibus-xkb-1.5.0.tar.gz for po files. +- Added ibus-xx-f19-password.patch for back compatibility. +- Added ibus-wayland in f20 or later. + +* Fri Jul 26 2013 Takao Fujiwara - 1.5.3-1 +- Bumped to 1.5.3 +- Deleted ibus-xx-g-s-disable-preedit.patch as EOL. +- Deleted ibus-gjs as EOL. +- Removed imsettings-gnome, im-chooser, libgnomekbd dependencies. + +* Thu Jul 11 2013 Takao Fujiwara - 1.5.2-8 +- Updated ibus-HEAD.patch to delete pyxdg dependencies. + +* Mon Jun 17 2013 Takao Fujiwara - 1.5.2-7 +- Bug 972328 - Deleted ibus-panel + +* Mon Jun 17 2013 Takao Fujiwara - 1.5.2-6 +- Bug 972328 - Bring back the dependency of ibus-setup. + +* Tue Jun 11 2013 Takao Fujiwara - 1.5.2-5 +- Removed dependencies of ibus-setup and ibus-pygtk2 + +* Wed Jun 05 2013 Takao Fujiwara - 1.5.2-4 +- Updated ibus-HEAD.patch for upstream. +- Added ibus-xx-1.5.2.patch until 1.5.3 will be released. +- Added ibus-xx-ctrl-space.patch for back compatible triggers. + +* Wed May 01 2013 Takao Fujiwara - 1.5.2-3 +- Updated ibus-HEAD.patch for upstream. +- Deleted ibus-947318-reconnect-gtk-client.patch + +* Sun Apr 21 2013 Takao Fujiwara - 1.5.2-2 +- Separate python files in f19 or later. + +* Thu Apr 18 2013 Takao Fujiwara - 1.5.2-1 +- Bumped to 1.5.2 +- Created noarch packages for python files due to .pyc and .pyo. +- Added man pages. + +* Mon Feb 18 2013 Takao Fujiwara - 1.5.1-3 +- Copied gtk2 module to gtk3 one. + +* Thu Jan 31 2013 Takao Fujiwara - 1.5.1-2 +- Updated ibus-530711-preload-sys.patch. Fixes #904799 + +* Tue Jan 08 2013 Takao Fujiwara - 1.5.1-1 +- Bumped to 1.5.1 +- Bumped to ibus-gjs 3.4.1.20130115 for f17 +- Removed ibus-xx-no-use.diff + +* Fri Dec 14 2012 Takao Fujiwara - 1.4.99.20121109-9 +- Updated ibus-xx-no-use.diff not to use variant.dup_strv() + +* Fri Dec 07 2012 Takao Fujiwara - 1.4.99.20121109-8 +- Resolves #869584 - Removed libgnomekbd dependency in f18. + +* Fri Nov 30 2012 Takao Fujiwara - 1.4.99.20121109-7 +- Set time stamp of ibus/_config.py + +* Fri Nov 30 2012 Takao Fujiwara - 1.4.99.20121109-6 +- Set time stamp of ibus/_config.py + +* Fri Nov 30 2012 Takao Fujiwara - 1.4.99.20121109-5 +- Updated spec file to work witout pkgconfig. + +* Tue Nov 27 2012 Takao Fujiwara - 1.4.99.20121109-4 +- Added comment lines for patches. + +* Tue Nov 27 2012 Takao Fujiwara - 1.4.99.20121109-3 +- Fixed misc issues. + +* Thu Oct 11 2012 Takao Fujiwara - 1.4.99.20121109-2 +- Obsoleted ibus-gnome3 + +* Thu Oct 11 2012 Takao Fujiwara - 1.4.99.20121109-1 +- Bumped to 1.4.99.20121109 +- Removed im-chooser, imsettings-gnome, gnome-icon-theme-symbolic + dependencies in f18 because ibus gnome integration is done. + Use ibus-keyboard instead of input-keyboard-symbolic. +- Disabled ibus-gjs build because of ibus gnome integration. + +* Thu Oct 11 2012 Takao Fujiwara - 1.4.99.20121006-2 +- Updated ibus-HEAD.patch to fix typo in data/dconf/profile/ibus + +* Thu Oct 11 2012 Takao Fujiwara - 1.4.99.20121006-2 +- Updated ibus-HEAD.patch to fix typo in data/dconf/profile/ibus + +* Sat Oct 06 2012 Takao Fujiwara - 1.4.99.20121006-1 +- Bumped to 1.4.99.20121006 +- Removed ibus-xx-segv-reg-prop.patch + +* Fri Sep 14 2012 Takao Fujiwara - 1.4.99.20120914-2 +- Added ibus-xx-segv-reg-prop.patch to avoid segv + +* Fri Sep 14 2012 Takao Fujiwara - 1.4.99.20120914-1 +- Bumped to 1.4.99.20120914 + +* Thu Sep 06 2012 Takao Fujiwara - 1.4.99.20120822-2 +- Updated ibus-530711-preload-sys.patch +- Updated ibus-541492-xkb.patch +- Updated ibus-xx-no-use.diff + Fixed Bug 854161 - not able to add keymap with ibus-setup + +* Wed Aug 22 2012 Takao Fujiwara - 1.4.99.20120822-1 +- Bumped to 1.4.99.20120822 +- Bumped to ibus-gjs 3.4.1.20120815 + Fixed Bug 845956 - ibus backward trigger key is not customized + Fixed Bug 844580 - ibus-dconf does not load the system gvdb +- Separated ibus-810211-no-switch-by-no-trigger.patch from ibus-HEAD.patch + +* Fri Jul 27 2012 Fedora Release Engineering - 1.4.99.20120712-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Thu Jul 19 2012 Takao Fujiwara - 1.4.99.20120712-2 +- Updated ibus-HEAD.patch + Support dconf 0.13.4 + +* Tue Jul 17 2012 Takao Fujiwara - 1.4.99.20120712-1 +- Bumped to 1.4.99.20120712 +- Removed ibus-xx-branding-switcher-ui.patch as upstreamed. + +* Fri Jun 8 2012 Matthias Clasen - 1.4.99.20120428-3 +- Rebuild against new libgnomekbd + +* Fri Apr 27 2012 Takao Fujiwara - 1.4.99.20120428-2 +- Updated ibus-HEAD.patch +- Updated ibus-541492-xkb.patch +- Updated ibus-xx-branding-switcher-ui.patch + Fixed Bug 810211 - Cancel Control + space pressing Control key. +- Updated ibus-xx-no-use.diff + Enabled to customize trigger keys with non-modifier trigger keys. + +* Fri Apr 27 2012 Takao Fujiwara - 1.4.99.20120428-1 +- Bumped to 1.4.99.20120428 + Fixed Bug 799571 - no IME list at the session login. + Fixed Bug 810415 - ibus does not handle Ctrl+space with BUTTON_PRESS. +- Bumped to ibus-gjs 3.4.1.20120428 + Fixed Bug 802052 - no modifiers trigger keys. + Fixed Bug 803244 - IME switch Ctrl+space not working on shell text entry. + +* Tue Apr 24 2012 Kalev Lember - 1.4.99.20120317-4 +- Update the dconf and icon cache rpm scriptlets + +* Wed Apr 18 2012 Takao Fujiwara - 1.4.99.20120317-3 +- Added a RHEL flag. + +* Tue Mar 27 2012 Takao Fujiwara - 1.4.99.20120317-2 +- Bumped to ibus-gjs 3.3.92.20120327 + +* Sat Mar 17 2012 Takao Fujiwara - 1.4.99.20120317-1 +- Bumped to 1.4.99.20120317 + Fixed Bug 718668 - focus move is slow with ibus-gnome3 + Fixed Bug 749497 - Enhance IME descriptions in status icon active menu +- Bumped to ibus-gjs 3.3.90.20120317 +- Added ibus-xx-no-use.diff + Fixed Bug 803260 - Disable non-global input method mode +- Updated ibus-HEAD.patch + Fixed Bug 803250 - ibus lookup window font customization + Fixed Bug 803177 - language id on ibus-ui-gtk3 switcher +- Update ibus-530711-preload-sys.patch + Fixed Bug 797023 - port preload engines + +* Thu Mar 08 2012 Takao Fujiwara - 1.4.99.20120303-3 +- Bumped to ibus-gjs 3.3.90.20120308 to work with gnome-shell 3.3.90 +- Fixed Bug 786906 - Added ifnarch ppc ppc64 s390 s390x +- Updated ibus-HEAD.patch + Fixed Bug 800897 - After doing "ctrl+space", ibus tray icon freezes + +* Mon Mar 05 2012 Takao Fujiwara - 1.4.99.20120303-2 +- Added ibus-HEAD.patch to fix python library to load libibus.so. + +* Sun Mar 04 2012 Takao Fujiwara - 1.4.99.20120303-1 +- Bumped to 1.4.99.20120303 + Fixed Bug 796070 - ibus-setup without no ibus-daemon + +* Wed Feb 08 2012 Takao Fujiwara - 1.4.99.20120203-3 +- Fixed ibus-setup on C locale +- Fixed to show no registered engines from g-c-c. +- Enabled Alt_R keybinding on ko locales for ibus gtk only. + +* Fri Feb 03 2012 Takao Fujiwara - 1.4.99.20120203-1 +- Updated to 1.4.99.20120203 +- Removed ibus-xx-bridge-hotkey.patch +- Updated ibus-541492-xkb.patch to use libgnomekbd. +- Updated ibus-xx-setup-frequent-lang.patch for 1.4.99.20120203 + +* Wed Jan 04 2012 Takao Fujiwara - 1.4.0-17 +- Added ibus-771115-property-compatible.patch for f16 + Fixed Bug 771115 - IBusProperty back compatibility. + +* Fri Dec 30 2011 Takao Fujiwara - 1.4.0-16 +- Enhanced ibus-gnome3 shell lookup window. +- Updated ibus-HEAD.patch from upstream + Fixed Bug 769135 - ibus-x11 SEGV in _process_key_event_done. +- Updated ibus-541492-xkb.patch + Fixed Bug 757889 - ibus-setup SEGV without active engine. + Fixed Bug 760213 - ibus-setup saves XKB variants correctly. + Fixed Bug 769133 - ibus-engine-xkb returns FALSE for ASCII typings. +- Updated ibus-xx-bridge-hotkey.patch for an enhancement. + +* Wed Nov 30 2011 Takao Fujiwara - 1.4.0-14 +- Enabled dconf. +- Updated ibus-HEAD.patch + Fixed Bug 618229 - engine setup buton on ibus-setup. +- Removed ibus-711632-fedora-fallback-icon.patch as upstreamed. +- Updated ibus-xx-bridge-hotkey.patch + Removed Enable/Disable buttons on ibus-setup + +* Fri Nov 18 2011 Takao Fujiwara - 1.4.0-11 +- Updated ibus-541492-xkb.patch + Fixed Bug 750484 - support reloading Xmodmap +- Updated ibus-HEAD.patch + Fixed Bug 753781 - ibus-x11 needs async for hangul ibus_commit_text. + +* Fri Nov 04 2011 Takao Fujiwara - 1.4.0-10 +- Updated ibus-xx-bridge-hotkey.patch for f16 + Fixed no XKB languages from layout only. e.g. in(eng). +- Updated ibus-541492-xkb.patch + Fixed not to show 'eng' on GUI for in(eng). + +* Wed Nov 02 2011 Takao Fujiwara - 1.4.0-9 +- Updated ibus-HEAD.patch + Fixed prev/next keys without global engine. +- Updated ibus-xx-bridge-hotkey.patch for f16 + Fixed Bug 747902 - mouse and ctrl+space not working + Fixed Bug 749770 - IME hotkey after Control + Space +- Updated ibus-711632-fedora-fallback-icon.patch + Fixed Bug 717831 - use old icon for desktops other than gnome + +* Fri Oct 28 2011 Takao Fujiwara - 1.4.0-8 +- Updated ibus-xx-bridge-hotkey.patch for f16 +- Fixed Bug 747902 - mouse and ctrl+space not working + +* Wed Oct 26 2011 Fedora Release Engineering - 1.4.0-6 +- Rebuilt for glibc bug#747377 + +* Fri Oct 21 2011 Takao Fujiwara - 1.4.0-5 +- Fixed Bug 747845 - ibus icon cannot open menu item on gnome-shell + +* Thu Oct 20 2011 Takao Fujiwara - 1.4.0-4 +- Fixed Bug 746869 - no keymaps if the XKB has no group and no variant + +* Fri Sep 30 2011 Takao Fujiwara - 1.4.0-3 +- Rebuilt for f16 gnome-shell 3.2 and gjs 1.30 + +* Wed Sep 28 2011 Takao Fujiwara - 1.4.0-2 +- Updated to 1.4.0 +- Updated ibus-gjs 3.0.2.20110928 for f15. +- Updated ibus-gjs 3.2.0.20110928 for f16. (#740588) +- Updated ibus-530711-preload-sys.patch + Fixed not to show duplicated engine names in setup treeview (#740447) +- Updated bus-gjs-xx-gnome-shell-3.1.4-build-failure.patch for f16. +- Updated ibus-xx-bridge-hotkey.patch + Fixed a XKB configuration without the input focus for f16 (#739165) + Fixed not to show null strings in case of no variants (#738130) + +* Tue Sep 13 2011 Takao Fujiwara - 1.3.99.20110817-5 +- Updated ibus-gjs 3.1.91.20110913 for f16. + +* Thu Sep 08 2011 Takao Fujiwara - 1.3.99.20110817-4 +- Updated ibus-gjs 3.1.91.20110908 and 3.0.2.20110908 for gnome-shell. + Fixed preedit active segments on gnome-shell and X11 apps. +- Added ibus-xx-g-s-disable-preedit.patch + Disabled preedit on gnome-shell for a workaround. +- Updated ibus.spec + Fixed Bug 735879 pre/postun scripts + +* Thu Sep 01 2011 Takao Fujiwara - 1.3.99.20110817-3 +- Fixed Bug 700472 Use a symbol icon instead of an image icon. +- Updated ibus-HEAD.patch for upstream. +- Removed ibus-435880-surrounding-text.patch as upstream. +- Added ibus-711632-fedora-fallback-icon.patch + Fixed SEGV with no icon in oxygen-gtk icon theme. +- Added ibus-xx-bridge-hotkey.patch + Triaged Bug 707370 SetEngine timeout + Fixed Bug 731610 Keep IM state when text input focus changes +- Added transitional ibus-gnome3 package. + Fixed Bug 718110 Use a shell icon instead of pygtk2 icon. + +* Thu May 26 2011 Takao Fujiwara - 1.3.99.20110419-1 +- Updated to 1.3.99.20110419 +- Added ibus-HEAD.patch + Fixed Bug 697471 - ibus-gconf zombie when restart ibus from ibus panel. +- Updated ibus-541492-xkb.patch + Fixed Bug 701202 - us(dvorak) does not show up in list + Updated ibus-1.0.pc for ibus-xkb + Showed XKB variant descriptions only without layout descriptions. +- Updated ibus-xx-setup-frequent-lang.patch + Updated UI strings + +* Tue Apr 19 2011 Takao Fujiwara - 1.3.99.20110408-1 +- Updated to 1.3.99.20110408 + Fixed Bug 683484 - Timed out SetEngine when select an engine from panel. + Fixed Bug 657165 - IBus for gnome-shell for Fedora 15. +- Upstreamed ibus-657165-panel-libs.patch +- Removed ibus-675503-gnome-shell-workaround.patch +- Added ibus-xx-setup-frequent-lang.patch +- Updated ibus-541492-xkb.patch + Fixed Bug 696481 - no the variant maps without language codes +- Added dependency of imsettings-gnome. + Fixed Bug 696510 - need a dependency in ibus-gtk3 for imsettings-gnome + +* Thu Mar 10 2011 Takao Fujiwara - 1.3.99.20110228-1 +- Updated to 1.3.99.20110228 +- Integrated the part of gjs in Bug 657165 ibus for gnome-shell. + Added ibus-657165-panel-libs.patch + Added gnome-shell-ibus-plugins-20110304.tar.bz2 +- Fixed Bug 675503 - a regression in sync mode + Added ibus-675503-gnome-shell-workaround.patch until gnome-shell is updated. +- Fixed Bug 677856 - left ibus snooper when im client is switched. +- Fixed Bug 673047 - abrt ibus_xkb_get_current_layout for non-XKB system + Updated ibus-541492-xkb.patch + +* Wed Feb 09 2011 Fedora Release Engineering - 1.3.99.20110127-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Fri Feb 04 2011 Takao Fujiwara - 1.3.99.20110127-1 +- Updated to 1.3.99.20110127 +- Updated ibus-HEAD.patch from upstream. + +* Wed Jan 26 2011 Takao Fujiwara - 1.3.99.20110117-1 +- Updated to 1.3.99.20110117 +- Fixed Bug 666427 - ibus requires dbus-x11 +- Fixed Bug 670137 - QT_IM_MODULE=xim in ibus.conf without ibus-qt + +* Thu Dec 09 2010 Takao Fujiwara - 1.3.99.20101202-1 +- Updated to 1.3.99.20101202 +- Added ibus-530711-preload-sys.patch + Fixed Bug 530711 - Reload preloaded engines by login + +* Fri Oct 29 2010 Takao Fujiwara - 1.3.99.20101028-1 +- Updated to 1.3.99.20101028 +- Integrated gdbus +- Merged notify.patch into ibus-HEAD.patch + +* Fri Oct 22 2010 Takao Fujiwara - 1.3.8-1 +- Updated to 1.3.8 +- Added ibus-541492-xkb.patch + Fixes Bug 541492 - ibus needs to support some xkb layout switching +- Added ibus-435880-surrounding-text.patch + Fixes Bug 435880 - ibus-gtk requires surrounding-text support +- Added ibus-xx-workaround-gtk3.patch + Workaround for f14 http://koji.fedoraproject.org/koji/taskinfo?taskID=2516604 + +* Mon Aug 23 2010 Takao Fujiwara - 1.3.7-1 +- Updated to 1.3.7 + +* Wed Jul 28 2010 Mamoru Tasaka - 1.3.6-5 +- Rebuild against python 2.7 + +* Thu Jul 22 2010 Jens Petersen - 1.3.6-4 +- keep bumping ibus-gtk obsoletes to avoid upgrade problems + +* Wed Jul 21 2010 David Malcolm - 1.3.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + +* Thu Jul 15 2010 Colin Walters - 1.3.6-2 +- Rebuild with new gobject-introspection + +* Tue Jul 06 2010 Takao Fujiwara - 1.3.6-1 +- Update to 1.3.6 + +* Wed Jun 30 2010 Jens Petersen +- version the ibus-gtk obsolete and provides +- drop the old redundant ibus-qt obsoletes + +* Mon Jun 28 2010 Matthias Clasen - 1.3.5-3 +- Rebuild against newer gtk + +* Tue Jun 22 2010 Colin Walters - 1.3.5-2 +- Bump Release to keep ahead of F-13 + +* Sat Jun 12 2010 Peng Huang - 1.3.5-1 +- Update to 1.3.5 +- Support gtk3, gobject-introspection and vala. + +* Sat May 29 2010 Peng Huang - 1.3.4-2 +- Update to 1.3.4 + +* Sat May 29 2010 Peng Huang - 1.3.4-1 +- Update to 1.3.4 + +* Tue May 04 2010 Peng Huang - 1.3.3-1 +- Update to 1.3.3 + +* Sun May 02 2010 Peng Huang - 1.3.2-3 +- Embedded language bar in menu by default. +- Fix bug 587353 - [abrt] crash in ibus-1.3.2-2.fc12 + +* Sat Apr 24 2010 Peng Huang - 1.3.2-2 +- Add requires librsvg2 +- Update ibus-HEAD.patch: Update po files and and setting + +* Wed Apr 21 2010 Peng Huang - 1.3.2-1 +- Update to 1.3.2 +- Fix bug 583446 - [abrt] crash in ibus-1.3.1-1.fc12 + +* Mon Apr 05 2010 Peng Huang - 1.3.1-1 +- Update to 1.3.1 + +* Fri Mar 26 2010 Peng Huang - 1.3.0-3 +- Update ibus-HEAD.patch +- Fix bug - some time panel does not show candidates. +- Update some po files + +* Mon Mar 22 2010 Peng Huang - 1.3.0-2 +- Does not check glib micro version in ibus im module. + +* Mon Mar 22 2010 Peng Huang - 1.3.0-1 +- Update to 1.3.0 + +* Tue Feb 02 2010 Peng Huang - 1.2.99.20100202-1 +- Update to 1.2.99.20100202 + +* Mon Jan 11 2010 Peng Huang - 1.2.0.20100111-1 +- Update to 1.2.0.20100111 + +* Fri Dec 25 2009 Peng Huang - 1.2.0.20091225-1 +- Update to 1.2.0.20091225 +- Fix bug 513895 - new IME does not show up in ibus-setup +- Fix bug 531857 - applet order should correspond with preferences order +- Fix bug 532856 - should not list already added input-methods in Add selector + +* Tue Dec 15 2009 Peng Huang - 1.2.0.20091215-1 +- Update to 1.2.0.20091215 + +* Thu Dec 10 2009 Peng Huang - 1.2.0.20091204-2 +- Fix rpmlint warnings and errors. + +* Fri Dec 04 2009 Peng Huang - 1.2.0.20091204-1 +- Update to 1.2.0.20091204 +- Fix Bug 529920 - language panel pops up on the wrong monitor +- Fix Bug 541197 - Ibus crash + +* Tue Nov 24 2009 Peng Huang - 1.2.0.20091124-1 +- Update to 1.2.0.20091124 +- Update some translations. +- Fix bug 538147 - [abrt] crash detected in firefox-3.5.5-1.fc12 + +* Sat Oct 24 2009 Peng Huang - 1.2.0.20091024-1 +- Update to 1.2.0.20091024 + +* Wed Oct 14 2009 Peng Huang - 1.2.0.20091014-2 +- Update to 1.2.0.20091014 +- Change ICON in ibus.conf + +* Sun Sep 27 2009 Peng Huang - 1.2.0.20090927-1 +- Update to 1.2.0.20090927 + +* Tue Sep 15 2009 Peng Huang - 1.2.0.20090915-1 +- Update to 1.2.0.20090915 +- Fix bug 521591 - check if the icon filename is a real file before trying to open it +- Fix bug 522310 - Memory leak on show/hide +- Fix bug 509518 - ibus-anthy should only override to jp layout for kana input + +* Fri Sep 04 2009 Peng Huang - 1.2.0.20090904-2 +- Refresh the tarball. + +* Fri Sep 04 2009 Peng Huang - 1.2.0.20090904-1 +- Update to 1.2.0.20090904 + +* Mon Aug 31 2009 Peng Huang - 1.2.0.20090828-2 +- Change icon path in ibus.conf + +* Fri Aug 28 2009 Peng Huang - 1.2.0.20090828-1 +- Update to 1.2.0.20090828 +- Change the icon on systray. +- Fix segment fault in ibus_hotkey_profile_destroy +- Fix some memory leaks. + +* Wed Aug 12 2009 Peng Huang - 1.2.0.20090812-1 +- Update to 1.2.0.20090812 + +* Mon Aug 10 2009 Peng Huang - 1.2.0.20090807-4 +- Update ibus-HEAD.patch +- Fix Numlock problem. +- Fix some memory leaks. + +* Fri Aug 07 2009 Peng Huang - 1.2.0.20090807-2 +- Update ibus-HEAD.patch +- Fix bug 516154. + +* Fri Aug 07 2009 Peng Huang - 1.2.0.20090807-1 +- Update to 1.2.0.20090807 + +* Thu Aug 06 2009 Peng Huang - 1.2.0.20090806-1 +- Update to 1.2.0.20090806 +- Fix bug 515106 - don't install duplicate files + +* Tue Jul 28 2009 Peng Huang - 1.2.0.20090723-3 +- Update xinput-ibus: setup QT_IM_MODULE if the ibus qt input method plugin exists. + +* Fri Jul 24 2009 Fedora Release Engineering - 1.2.0.20090723-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Thu Jul 23 2009 Peng Huang - 1.2.0.20090723-1 +- Update to 1.2.0.20090723 +- Fix dead loop in ibus-gconf + +* Wed Jul 22 2009 Peng Huang - 1.2.0.20090722-1 +- Update to 1.2.0.20090722 + +* Sun Jul 19 2009 Peng Huang - 1.2.0.20090719-1 +- Update to 1.2.0.20090719 + +* Mon Jun 22 2009 Peng Huang - 1.2.0.20090617-1 +- Update to 1.2.0.20090617 + +* Fri Jun 12 2009 Peng Huang - 1.1.0.20090612-1 +- Update to 1.1.0.20090612 +- Fix bug 504942 - PageUp and PageDown do not work in candidate list +- Fix bug 491040 - Implememnt mouse selection in candidate list + +* Wed Jun 10 2009 Peng Huang - 1.1.0.20090609-1 +- Update to Update to 1.1.0.20090609 +- Fix bug 502414 - Implemented on-screen help facility +- Fix bug 502561 - iBus should show keymap name on iBus panel +- Fix bug 498043 - ibus Alt-grave trigger conflicts with openoffice.org +- Implemented API for setting labels for candidates in LookupTable + +* Sun May 31 2009 Peng Huang - 1.1.0.20090531-1 +- Update to Update to 1.1.0.20090531 + +* Tue May 26 2009 Peng Huang - 1.1.0.20090508-5 +- Update ibus-HEAD.patch. +- Show the default input method with bold text +- Add information text below input methods list + +* Mon May 25 2009 Peng Huang - 1.1.0.20090508-4 +- Update ibus-HEAD.patch. +- Fix bug 501211 - ibus-setup window should be raised if running or just stay on top/grab focus +- Fix bug 501640 - ibus should adds new IMEs at end of engine list not beginning +- Fix bug 501644 - [IBus] focus-out and disabled IME should hide language panel + +* Thu May 14 2009 Peng Huang - 1.1.0.20090508-2 +- Remove requires notification-daemon +- Fix bug 500588 - Hardcoded requirement for notification-daemon + +* Fri May 08 2009 Peng Huang - 1.1.0.20090508-1 +- Update to 1.1.0.20090508 +- Fix bug 499533 - [Indic] ibus should allow input in KDE using all supported Indic locales +- Fix bug 498352 - hotkey config table should list keys in same order as on main setup page +- Fix bug 497707 - ibus French translation update + +* Fri May 08 2009 Peng Huang - 1.1.0.20090423-3 +- Fix bug 498541 - ibus-libs should not contain devel file libibus.so + +* Tue May 05 2009 Peng Huang - 1.1.0.20090423-2 +- Fix bug 498141 - new ibus install needs gtk immodules +- Separate ibus document from ibus-devel to ibus-devel-docs + +* Thu Apr 23 2009 Peng Huang - 1.1.0.20090423-1 +- Update to ibus-1.1.0.20090423. +- Fix bug 497265 - [mai_IN] Maithili language name is not correct. +- Fix bug 497279 - IBus does not works with evolution correctly. +- Enhance authentication both in daemon & clients + +* Fri Apr 17 2009 Peng Huang - 1.1.0.20090417-1 +- Update to ibus-1.1.0.20090417. +- Fix bug 496199 - cannot remove Ctrl+Space hotkey with ibus-setup + +* Fri Apr 17 2009 Peng Huang - 1.1.0.20090413-4 +- Update ibus-HEAD.patch. +- Next Engine hotkey will do nothing if the IM is not active. + +* Wed Apr 15 2009 Peng Huang - 1.1.0.20090413-3 +- Update ibus-HEAD.patch. +- Fix bug 495431 - ibus Release modifier doesn't work with Alt +- Fix bug 494445 - ibus-hangul missing Hangul Han/En mode + (and Alt_R+release hotkey) +- Update te.po + +* Tue Apr 14 2009 Peng Huang - 1.1.0.20090413-2 +- Update ibus-HEAD.patch. +- Change the mode of /tmp/ibus-$USER to 0700 to improve security +- Change the mode of /tmp/ibus-$USER/socket-address to 0600 to improve security +- Update as.po + +* Mon Apr 13 2009 Peng Huang - 1.1.0.20090413-1 +- Update to ibus-1.1.0.20090413. +- Fix crash when restart the ibus-daemon +- Add some translations. + +* Tue Apr 07 2009 Peng Huang - 1.1.0.20090407-3 +- Update the tarball. +- Fix bug 494511 - ibus-gtk makes gnome-terminal abort + when a key is pressed + +* Tue Apr 07 2009 Peng Huang - 1.1.0.20090407-2 +- Update default hotkey settings. + +* Tue Apr 07 2009 Peng Huang - 1.1.0.20090407-1 +- Update to ibus-1.1.0.20090407. +- Fix bug 491042 - ibus default trigger hotkeys +- Fix bug 492929 - ibus-hangul can cause gtk app to lockup +- Fix bug 493701 - (ibus) imsettings disconnect/reconnect kills gtk app +- Fix bug 493687 - ibus-hangul should default to vertical candidate selection +- Fix bug 493449 - ibus broke Alt-F2 command auto-completion + +* Tue Mar 31 2009 Peng Huang - 1.1.0.20090331-1 +- Update to ibus-1.1.0.20090331. +- Fix bug 492956 - screws up keyboard input in firefox +- Fix bug 490143 - ibus issue with gnome-keyring + +* Sun Mar 29 2009 Peng Huang - 1.1.0.20090311-3 +- Recreate the ibus-HEAD.patch from upstream git source tree +- Fix bug 491999 - up/down arrow keys broken in xchat + +* Sat Mar 28 2009 Peng Huang - 1.1.0.20090311-2 +- Recreate the ibus-HEAD.patch from upstream git source tree. +- Fix bug 490009 - Deleting Next Engine shortcuts doesn't work +- Fix bug 490381 - Change "Next/Previous engine" labels + +* Wed Mar 11 2009 Peng Huang - 1.1.0.20090311-1 +- Update to ibus-1.1.0.20090311. +- Update setup ui follow GNOME Human Interface Guidelines 2.2 (#489497). + +* Fri Mar 6 2009 Peng Huang - 1.1.0.20090306-1 +- Update to ibus-1.1.0.20090306. + +* Tue Mar 3 2009 Jens Petersen +- use post for ibus-gtk requires glib2 + +* Mon Mar 2 2009 Jens Petersen - 1.1.0.20090225-2 +- drop the superfluous ibus-0.1 engine obsoletes +- move glib2 requires to gtk package + +* Wed Feb 25 2009 Peng Huang - 1.1.0.20090225-1 +- Update to ibus-1.1.0.20090225. +- Fix problems in %%post and %%postun scripts. +- Hide ibus & ibus preferences menu items. + +* Tue Feb 17 2009 Peng Huang - 1.1.0.20090211-10 +- Recreate the ibus-HEAD.patch from upstream git source tree. +- Put 'Select an input method' in engine select combobox (#485861). + +* Tue Feb 17 2009 Peng Huang - 1.1.0.20090211-9 +- Add requires im-chooser >= 1.2.5. + +* Tue Feb 17 2009 Peng Huang - 1.1.0.20090211-8 +- Recreate the ibus-HEAD.patch from upstream git source tree. +- Fix ibus-hangul segfault (#485438). + +* Mon Feb 16 2009 Peng Huang - 1.1.0.20090211-6 +- Recreate the ibus-HEAD.patch from upstream git source tree. +- The new patch fixes ibus-x11 segfault (#485661). + +* Sun Feb 15 2009 Peng Huang - 1.1.0.20090211-5 +- Recreate the ibus-HEAD.patch from upstream git source tree. + +* Sun Feb 15 2009 Peng Huang - 1.1.0.20090211-4 +- Remove gnome-python2-gconf from requires. + +* Fri Feb 13 2009 Peng Huang - 1.1.0.20090211-3 +- Update ibus-HEAD.patch, to fix bug 484652. + +* Fri Feb 13 2009 Peng Huang - 1.1.0.20090211-2 +- Add patch ibus-HEAD.patch, to update ibus to HEAD version. + +* Wed Feb 11 2009 Peng Huang - 1.1.0.20090211-1 +- Add --xim argument in xinput-ibus +- Add Obsoletes: ibus-qt <= 1.1.0 +- Move libibus.so.* to ibus-libs to make ibus multilib. +- Update to 1.1.0.20090211. + +* Thu Feb 05 2009 Peng Huang - 1.1.0.20090205-1 +- Update to 1.1.0.20090205. + +* Tue Feb 03 2009 Peng Huang - 0.1.1.20090203-1 +- Update to 0.1.1.20090203. + +* Sat Nov 29 2008 Ignacio Vazquez-Abrams - 0.1.1.20081023-3 +- Rebuild for Python 2.6 + +* Wed Nov 19 2008 Peng Huang - 0.1.1.20081023-2 +- Move libibus-gtk.so from ibus.rpm to ibus-gtk.rpm to fix bug 472146. + +* Thu Oct 23 2008 Peng Huang - 0.1.1.20081023-1 +- Update to 0.1.1.20081023. + +* Thu Oct 16 2008 Peng Huang - 0.1.1.20081016-1 +- Update to 0.1.1.20081016. + +* Tue Oct 7 2008 Jens Petersen - 0.1.1.20081006-3 +- remove the empty %%doc file entries + +* Tue Oct 7 2008 Jens Petersen - 0.1.1.20081006-2 +- add xinputrc alternative when installing or uninstalling + +* Mon Oct 06 2008 Peng Huang - 0.1.1.20081006-1 +- Update to 0.1.1.20081006. + +* Sun Oct 05 2008 Peng Huang - 0.1.1.20081005-1 +- Update to 0.1.1.20081005. + +* Sat Oct 04 2008 Peng Huang - 0.1.1.20081004-1 +- Update to 0.1.1.20081004. + +* Wed Oct 01 2008 Peng Huang - 0.1.1.20081001-1 +- Update to 0.1.1.20081001. + +* Tue Sep 30 2008 Peng Huang - 0.1.1.20080930-1 +- Update to 0.1.1.20080930. + +* Tue Sep 23 2008 Peng Huang - 0.1.1.20080923-1 +- Update to 0.1.1.20080923. + +* Wed Sep 17 2008 Peng Huang - 0.1.1.20080917-1 +- Update to 0.1.1.20080917. + +* Tue Sep 16 2008 Peng Huang - 0.1.1.20080916-1 +- Update to 0.1.1.20080916. + +* Mon Sep 15 2008 Peng Huang - 0.1.1.20080914-1 +- Update to 0.1.1.20080914. + +* Mon Sep 08 2008 Peng Huang - 0.1.1.20080908-1 +- Update to 0.1.1.20080908. + +* Mon Sep 01 2008 Peng Huang - 0.1.1.20080901-1 +- Update to 0.1.1.20080901. + +* Sat Aug 30 2008 Peng Huang - 0.1.1.20080830-1 +- Update to 0.1.1.20080830. + +* Mon Aug 25 2008 Peng Huang - 0.1.1.20080825-1 +- Update to 0.1.1.20080825. + +* Sat Aug 23 2008 Peng Huang - 0.1.1.20080823-1 +- Update to 0.1.1.20080823. + +* Fri Aug 15 2008 Peng Huang - 0.1.1.20080815-1 +- Update to 0.1.1.20080815. + +* Tue Aug 12 2008 Peng Huang - 0.1.1.20080812-1 +- Update to 0.1.1.20080812. + +* Mon Aug 11 2008 Peng Huang - 0.1.0.20080810-2 +- Add gnome-python2-gconf in Requires. + +* Thu Aug 07 2008 Peng Huang - 0.1.0.20080810-1 +- The first version.