Compare commits

...

No commits in common. "imports/c8-beta/ibus-1.5.19-9.el8" and "c8" have entirely different histories.

7 changed files with 1141 additions and 22 deletions

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
SOURCES/ibus-1.5.19.tar.gz
SOURCES/ibus-po-1.5.19-20180822.tar.gz
SOURCES/ibus-po-1.5.19-20210706.tar.gz

View File

@ -1,2 +1,2 @@
fdda025d81247e40ad7acf953c2a0a606d18e965 SOURCES/ibus-1.5.19.tar.gz
36b017eddba8bc0dd970acaa2cab41d0053d6c9f SOURCES/ibus-po-1.5.19-20180822.tar.gz
236f5dc3c072d0587e107ae75084454c791bbf73 SOURCES/ibus-po-1.5.19-20210706.tar.gz

View File

@ -2391,3 +2391,249 @@ index 72537cd4..981941d5 100755
--
2.21.0
From 74863851e83972e86a5bdb3da3d99784fc8d4955 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Tue, 28 Jan 2020 18:46:13 +0900
Subject: [PATCH] src/tests: Increase sleep to 3 waiting for IBusConfig
Sleep 1 would be too short for ibus-daemon which could run all components.
ibus-config test requires the running IBusConfig and the test could fail
in some slow systems.
Sleep time will be increased to 3 to run all components.
BUG=https://github.com/ibus/ibus/issues/2170
---
src/tests/ibus-config.c | 4 ++++
src/tests/ibus-desktop-testing-runner.in | 2 +-
src/tests/runtest | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/tests/ibus-config.c b/src/tests/ibus-config.c
index 5e845f10..0d9812a3 100644
--- a/src/tests/ibus-config.c
+++ b/src/tests/ibus-config.c
@@ -16,6 +16,10 @@ finish_create_config_async_success (GObject *source_object,
IBusConfig *config =
ibus_config_new_async_finish (res, &error);
+ if (error) {
+ g_message ("Failed to generate IBusConfig: %s", error->message);
+ g_error_free (error);
+ }
g_assert (IBUS_IS_CONFIG (config));
/* Since we reuse single D-Bus connection, we need to remove the
diff --git a/src/tests/ibus-desktop-testing-runner.in b/src/tests/ibus-desktop-testing-runner.in
index 981941d5..0d9a847c 100755
--- a/src/tests/ibus-desktop-testing-runner.in
+++ b/src/tests/ibus-desktop-testing-runner.in
@@ -190,7 +190,7 @@ run_desktop()
HAS_GNOME=`echo $DESKTOP_COMMAND | grep gnome-session`
if [ x"$HAS_GNOME" = x ] ; then
ibus-daemon --daemonize --verbose
- sleep 1
+ sleep 3
fi
}
diff --git a/src/tests/runtest b/src/tests/runtest
index ed38992f..a6e4194b 100755
--- a/src/tests/runtest
+++ b/src/tests/runtest
@@ -180,7 +180,7 @@ run_test_case()
fi
# Wait until all necessary components are up.
- sleep 1
+ sleep 3
export GTK_IM_MODULE=ibus
fi
--
2.24.1
From 7b0d091839a4f1315ba216175fb2787e86f7fa31 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Tue, 3 Mar 2020 17:08:30 +0900
Subject: [PATCH] src/tests: Delete graves in substitution in
ibus-desktop-testing-runner
Delete the single quotations to enclose grave chracters because
DASH saves the single quoted '`id -u`' as the raw string in the command
substitution not to be extracted.
BUG=https://github.com/ibus/ibus/issues/2189
---
src/tests/ibus-desktop-testing-runner.in | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/tests/ibus-desktop-testing-runner.in b/src/tests/ibus-desktop-testing-runner.in
index 0d9a847c..f9238e69 100755
--- a/src/tests/ibus-desktop-testing-runner.in
+++ b/src/tests/ibus-desktop-testing-runner.in
@@ -4,7 +4,7 @@
#
# ibus - The Input Bus
#
-# Copyright (c) 2018-2019 Takao Fujiwara <takao.fujiwara1@gmail.com>
+# Copyright (c) 2018-2020 Takao Fujiwara <takao.fujiwara1@gmail.com>
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -31,7 +31,8 @@
# POSIX sh has no 'echo -e'
: ${ECHO:='/usr/bin/echo'}
# POSIX sh has $UID
-: ${UID:='`id -u`'}
+# DASH saves the graves in '``' as characters not to be extracted
+: ${UID:=`id -u`}
PROGNAME=`basename $0`
@@ -170,7 +171,7 @@ _EOF
run_dbus_daemon()
{
# Use dbus-launch --exit-with-session later instead of --sh-syntax
- export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$UID/bus
+ export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$UID/bus"
}
run_desktop()
--
2.24.1
From 8da016764cee9616cca4658d1fb311d6b3bfc0df Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Wed, 15 Apr 2020 17:55:03 +0900
Subject: [PATCH] src/tests: Fix to get focus events with su in
ibus-desktop-testing-runner
GtkWindow haven't received focus events in any test cases since Fedora 31
whenever Ansible runs ibus-desktop-testing-runner after `su root`.
Seems su command does not run systemd automatically and now systemd
requires XDG_RUNTIME_DIR and Ansible requires root access with ssh.
This fix requires to restart sshd with modified /etc/ssh/sshd_config
with "PermitRootLogin yes" in order to run with su command.
Ansible with ibus-desktop-testin-runner has worked fine if root console
login is used without this patch because PAM runs systemd by login.
---
src/tests/ibus-desktop-testing-runner.in | 36 ++++++++++++++++++++++--
1 file changed, 33 insertions(+), 3 deletions(-)
diff --git a/src/tests/ibus-desktop-testing-runner.in b/src/tests/ibus-desktop-testing-runner.in
index f9238e69..f760fd5b 100755
--- a/src/tests/ibus-desktop-testing-runner.in
+++ b/src/tests/ibus-desktop-testing-runner.in
@@ -49,6 +49,7 @@ PID_XORG=0
PID_GNOME_SESSION=0
TESTING_RUNNER="default"
TESTS=""
+TIMEOUT=300
GREEN='\033[0;32m'
RED='\033[0;31m'
NC='\033[0m'
@@ -84,6 +85,7 @@ usage()
"-r, --runner=RUNNER Run TESTS programs with a test RUNNER.\n" \
" RUNNDER = gnome or default.\n" \
" default is an embedded runner.\n" \
+"-T, --timeout=TIMEOUT Set timeout (default TIMEOUT is 300 sec).\n" \
"-o, --output=OUTPUT_FILE OUtput the log to OUTPUT_FILE\n" \
"-O, --result=RESULT_FILE OUtput the result to RESULT_FILE\n" \
""
@@ -92,8 +94,8 @@ usage()
parse_args()
{
# This is GNU getopt. "sudo port getopt" in BSD?
- ARGS=`getopt -o hvb:s:cd:t:r:o:O: --long \
- help,version,builddir:,srcdir:,no-graphics,desktop:,tests:,runner:,output:,result:\
+ ARGS=`getopt -o hvb:s:cd:t:r:T:o:O: --long \
+ help,version,builddir:,srcdir:,no-graphics,desktop:,tests:,runner:,timeout:,output:,result:\
-- "$@"`;
eval set -- "$ARGS"
while [ 1 ] ; do
@@ -106,6 +108,7 @@ parse_args()
-d | --desktop ) DESKTOP_COMMAND="$2"; shift 2;;
-t | --tests ) TESTS="$2"; shift 2;;
-r | --runner ) TESTING_RUNNER="$2"; shift 2;;
+ -T | --timeout ) TIMEOUT="$2"; shift 2;;
-o | --output ) TEST_LOG="$2"; shift 2;;
-O | --result ) RESULT_LOG="$2"; shift 2;;
-- ) shift; break;;
@@ -166,11 +169,37 @@ _EOF
fi
# `su` command does not run loginctl
export XDG_SESSION_TYPE='x11'
+ export XDG_SESSION_CLASS=user
+ # `su` command does not get focus in events without this variable.
+ # Need to restart sshd after set "PermitRootLogin yes" in sshd_config
+ if [ "x$XDG_RUNTIME_DIR" = x ] ; then
+ export XDG_RUNTIME_DIR=/run/user/$UID
+ is_root_login=`grep "^PermitRootLogin" /etc/ssh/sshd_config | grep yes`
+ if [ "x$ANSIBLE" != x ] && [ "x$is_root_login" = x ] ; then
+ print_log -e "${RED}FAIL${NC}: No permission to get focus-in events in GtkWindow with ansible"
+ echo "su command does not configure necessary login info " \
+ "with systemd and GtkWindow cannot receive focus-events " \
+ "when ibus-desktop-testing-runner is executed by " \
+ "ansible-playbook." >> $TEST_LOG
+ echo "Enabling root login via sshd, restarting sshd, set " \
+ "XDG_RUNTIME_DIR can resolve the problem under " \
+ "ansible-playbook." >> $TEST_LOG
+ exit 255
+ fi
+ fi
+ # Do we need XDG_SESSION_ID and XDG_SEAT?
+ #export XDG_CONFIG_DIRS=/etc/xdg
+ #export XDG_SESSION_ID=10
+ #export XDG_SESSION_DESKTOP=gnome
+ #export XDG_SEAT=seat0
}
run_dbus_daemon()
{
# Use dbus-launch --exit-with-session later instead of --sh-syntax
+ # GNOME uses a unix:abstract address and it effects gsettings set values
+ # in each test case.
+ # TODO: Should we comment out this line?
export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$UID/bus"
}
@@ -288,7 +317,8 @@ run_gnome_desktop_testing_runner()
fail=1
continue
fi
- gnome-desktop-testing-runner $tst 2>>$TEST_LOG 1>>$TEST_LOG
+ gnome-desktop-testing-runner --timeout=$TIMEOUT $tst \
+ 2>>$TEST_LOG 1>>$TEST_LOG
retval=$?
read pass fail << EOF
`count_case_result $retval $pass $fail`
--
2.24.1
From 0b9d9365988a96a2bc31c48624f9c2b8081601b6 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Wed, 22 Apr 2020 20:17:12 +0900
Subject: [PATCH] client/gtk2: Fix typo
---
client/gtk2/ibusim.c | 4 ++--
src/tests/ibus-desktop-testing-runner.in | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/tests/ibus-desktop-testing-runner.in b/src/tests/ibus-desktop-testing-runner.in
index f760fd5b..4232c549 100755
--- a/src/tests/ibus-desktop-testing-runner.in
+++ b/src/tests/ibus-desktop-testing-runner.in
@@ -173,7 +173,7 @@ _EOF
# `su` command does not get focus in events without this variable.
# Need to restart sshd after set "PermitRootLogin yes" in sshd_config
if [ "x$XDG_RUNTIME_DIR" = x ] ; then
- export XDG_RUNTIME_DIR=/run/user/$UID
+ export XDG_RUNTIME_DIR="/run/user/$UID"
is_root_login=`grep "^PermitRootLogin" /etc/ssh/sshd_config | grep yes`
if [ "x$ANSIBLE" != x ] && [ "x$is_root_login" = x ] ; then
print_log -e "${RED}FAIL${NC}: No permission to get focus-in events in GtkWindow with ansible"
--
2.24.1

View File

@ -739,7 +739,7 @@ index a77cf92f..09992148 100644
G_END_DECLS
#endif
--
2.21.0
2.24.1
From 7b3b8c8b0c6a41ab524e0be9474825da9cba96ac Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
@ -794,7 +794,7 @@ index 73a0eaec..82af51a1 100644
}
--
2.21.0
2.24.1
From 4c40afba9c862b4f6651b1b971553e5e89e83343 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
@ -859,7 +859,7 @@ index 82af51a1..ed7fea6e 100644
}
--
2.21.0
2.24.1
From c7d8771cb9fc652cb638aa7cb8e10ea6b889509e Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
@ -889,7 +889,7 @@ index ed7fea6e..ab7ff88a 100644
}
--
2.21.0
2.24.1
From 9ae2d4658fff3d1e7262fb4fb7ca9ce1af0a27ec Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
@ -1019,7 +1019,7 @@ index ab7ff88a..f9310867 100644
ibusimcontext->preedit_string = g_strdup (str);
if (text->attrs) {
--
2.21.0
2.24.1
From 0fd043c3b4c90855bfb4fceed4bf2f3c3635a041 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
@ -1116,5 +1116,309 @@ index cb24d257..e78bc92f 100644
break;
default:
--
2.21.0
2.24.1
From be7fb813e530442897a9f9130b8a26380e5a12a1 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Tue, 8 Jan 2019 12:02:37 +0900
Subject: [PATCH] client/gtk2: Fix Atom and Slack for Flatpak
Seems Atom, slack, com.visualstudio.code does not enable
gtk_key_snooper_install() and this issue causes to call
gtk_im_context_filter_keypress instead of calling ibus APIs.
BUG=https://github.com/ibus/ibus/issues/1991
---
client/gtk2/ibusimcontext.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c
index f9310867..264a747a 100644
--- a/client/gtk2/ibusimcontext.c
+++ b/client/gtk2/ibusimcontext.c
@@ -565,6 +565,10 @@ daemon_name_appeared (GDBusConnection *connection,
const gchar *owner,
gpointer data)
{
+ if (!g_strcmp0 (ibus_bus_get_service_name (_bus), IBUS_SERVICE_PORTAL)) {
+ _daemon_is_running = TRUE;
+ return;
+ }
/* If ibus-daemon is running and run ssh -X localhost,
* daemon_name_appeared() is called but ibus_get_address() == NULL
* because the hostname and display number are different between
--
2.24.1
From cebe7a9553de69943b955ec99285f74961c9ee4e Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Thu, 9 May 2019 15:49:21 +0900
Subject: [PATCH] client/gtk2: Keep preedit cursor_pos and visible in clearing
preedit text
Clear the preedit_string but keep the preedit_cursor_pos and
preedit_visible because a time lag could happen, firefox commit
the preedit text before the preedit text is cleared and it cause
a double commits of the Hangul preedit in firefox if the preedit
would be located on the URL bar and click on anywhere of firefox
out of the URL bar.
---
client/gtk2/ibusimcontext.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c
index 264a747a..5e3457ba 100644
--- a/client/gtk2/ibusimcontext.c
+++ b/client/gtk2/ibusimcontext.c
@@ -881,10 +881,18 @@ ibus_im_context_clear_preedit_text (IBusIMContext *ibusimcontext)
ibusimcontext->preedit_mode == IBUS_ENGINE_PREEDIT_COMMIT) {
preedit_string = g_strdup (ibusimcontext->preedit_string);
}
+
+ /* Clear the preedit_string but keep the preedit_cursor_pos and
+ * preedit_visible because a time lag could happen, firefox commit
+ * the preedit text before the preedit text is cleared and it cause
+ * a double commits of the Hangul preedit in firefox if the preedit
+ * would be located on the URL bar and click on anywhere of firefox
+ * out of the URL bar.
+ */
_ibus_context_update_preedit_text_cb (ibusimcontext->ibuscontext,
ibus_text_new_from_string (""),
- 0,
- FALSE,
+ ibusimcontext->preedit_cursor_pos,
+ ibusimcontext->preedit_visible,
IBUS_ENGINE_PREEDIT_CLEAR,
ibusimcontext);
if (preedit_string) {
--
2.24.1
From 25d11f5cfd4c39e53be11a1348da29a61593cc4c Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Wed, 11 Dec 2019 16:28:22 +0900
Subject: [PATCH] client/gtk2: Fix to set use_button_press_event after signals
are connected
_ibus_context_update_preedit_text_cb() can be called with reset signals
before ibus_im_context_set_client_window() is called. Then
use_button_press_event needs to be set only when the signals are connected.
BUG=https://github.com/ibus/ibus/issues/1980
---
client/gtk2/ibusimcontext.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c
index 5e3457ba..ac5de809 100644
--- a/client/gtk2/ibusimcontext.c
+++ b/client/gtk2/ibusimcontext.c
@@ -1074,8 +1074,9 @@ ibus_im_context_reset (GtkIMContext *context)
/* Commented out ibus_im_context_clear_preedit_text().
* Hangul needs to receive the reset callback with button press
* but other IMEs should avoid to receive the reset callback
- * so the signal would need to be customized with GtkSetting.
- * IBus uses button-press-event instead.
+ * by themselves.
+ * IBus uses button-press-event instead until GTK is fixed.
+ * https://gitlab.gnome.org/GNOME/gtk/issues/1534
*/
ibus_input_context_reset (ibusimcontext->ibuscontext);
}
@@ -1657,10 +1658,13 @@ _ibus_context_update_preedit_text_cb (IBusInputContext *ibuscontext,
if (!ibusimcontext->use_button_press_event &&
mode == IBUS_ENGINE_PREEDIT_COMMIT) {
#if !GTK_CHECK_VERSION (3, 93, 0)
- if (ibusimcontext->client_window)
+ if (ibusimcontext->client_window) {
_connect_button_press_event (ibusimcontext, TRUE);
-#endif
+ ibusimcontext->use_button_press_event = TRUE;
+ }
+#else
ibusimcontext->use_button_press_event = TRUE;
+#endif
}
str = text->text;
--
2.24.1
From c662a02bf3b50914c697af12fc152ee97e2df961 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Wed, 25 Dec 2019 17:30:56 +0900
Subject: [PATCH] client/gtk2: Fix to connect button-press-event signal
IBus clients do not connect button-press-event in some conditions
and it will be fixed.
BUG=https://github.com/ibus/ibus/issues/1980
---
client/gtk2/ibusimcontext.c | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c
index ac5de809..30585403 100644
--- a/client/gtk2/ibusimcontext.c
+++ b/client/gtk2/ibusimcontext.c
@@ -2,8 +2,8 @@
/* vim:set et sts=4: */
/* ibus - The Input Bus
* Copyright (C) 2008-2013 Peng Huang <shawn.p.huang@gmail.com>
- * Copyright (C) 2015-2018 Takao Fujiwara <takao.fujiwara1@gmail.com>
- * Copyright (C) 2008-2018 Red Hat, Inc.
+ * Copyright (C) 2015-2019 Takao Fujiwara <takao.fujiwara1@gmail.com>
+ * 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
@@ -73,7 +73,7 @@ struct _IBusIMContext {
GCancellable *cancellable;
GQueue *events_queue;
- gboolean use_button_press_event;
+ gboolean use_button_press_event;
};
struct _IBusIMContextClass {
@@ -1125,6 +1125,10 @@ ibus_im_context_get_preedit_string (GtkIMContext *context,
#if !GTK_CHECK_VERSION (3, 93, 0)
+/* Use the button-press-event signal until GtkIMContext always emits the reset
+ * signal.
+ * https://gitlab.gnome.org/GNOME/gtk/merge_requests/460
+ */
static gboolean
ibus_im_context_button_press_event_cb (GtkWidget *widget,
GdkEventButton *event,
@@ -1157,11 +1161,13 @@ _connect_button_press_event (IBusIMContext *ibusimcontext,
"button-press-event",
G_CALLBACK (ibus_im_context_button_press_event_cb),
ibusimcontext);
+ ibusimcontext->use_button_press_event = TRUE;
} else {
g_signal_handlers_disconnect_by_func (
widget,
G_CALLBACK (ibus_im_context_button_press_event_cb),
ibusimcontext);
+ ibusimcontext->use_button_press_event = FALSE;
}
}
}
@@ -1188,7 +1194,7 @@ ibus_im_context_set_client_window (GtkIMContext *context, GdkWindow *client)
if (client != NULL) {
ibusimcontext->client_window = g_object_ref (client);
#if !GTK_CHECK_VERSION (3, 93, 0)
- if (ibusimcontext->use_button_press_event)
+ if (!ibusimcontext->use_button_press_event)
_connect_button_press_event (ibusimcontext, TRUE);
#endif
}
@@ -1655,17 +1661,14 @@ _ibus_context_update_preedit_text_cb (IBusInputContext *ibuscontext,
ibusimcontext->preedit_attrs = NULL;
}
+#if !GTK_CHECK_VERSION (3, 93, 0)
if (!ibusimcontext->use_button_press_event &&
mode == IBUS_ENGINE_PREEDIT_COMMIT) {
-#if !GTK_CHECK_VERSION (3, 93, 0)
if (ibusimcontext->client_window) {
_connect_button_press_event (ibusimcontext, TRUE);
- ibusimcontext->use_button_press_event = TRUE;
}
-#else
- ibusimcontext->use_button_press_event = TRUE;
-#endif
}
+#endif
str = text->text;
ibusimcontext->preedit_string = g_strdup (str);
--
2.24.1
From ecc3465a585448486b2ce68bcefc11d6aebae755 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Thu, 23 Jan 2020 16:13:05 +0900
Subject: [PATCH] client/gtk2: Fix some format sentences
---
client/gtk2/ibusimcontext.c | 23 +++++++++++------------
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c
index 30585403..50290c55 100644
--- a/client/gtk2/ibusimcontext.c
+++ b/client/gtk2/ibusimcontext.c
@@ -73,7 +73,9 @@ struct _IBusIMContext {
GCancellable *cancellable;
GQueue *events_queue;
+#if !GTK_CHECK_VERSION (3, 93, 0)
gboolean use_button_press_event;
+#endif
};
struct _IBusIMContextClass {
@@ -137,12 +139,12 @@ static void ibus_im_context_set_surrounding
/* static methods*/
static void _ibus_context_update_preedit_text_cb
- (IBusInputContext *ibuscontext,
- IBusText *text,
- gint cursor_pos,
- gboolean visible,
- guint mode,
- IBusIMContext *ibusimcontext);
+ (IBusInputContext *ibuscontext,
+ IBusText *text,
+ gint cursor_pos,
+ gboolean visible,
+ guint mode,
+ IBusIMContext *ibusimcontext);
static void _create_input_context (IBusIMContext *context);
static gboolean _set_cursor_location_internal
(IBusIMContext *context);
@@ -172,7 +174,6 @@ static void _create_fake_input_context (void);
static gboolean _set_content_type (IBusIMContext *context);
-
static GType _ibus_type_im_context = 0;
static GtkIMContextClass *parent_class = NULL;
@@ -313,7 +314,6 @@ _process_key_event_done (GObject *object,
{
IBusInputContext *context = (IBusInputContext *)object;
GdkEventKey *event = (GdkEventKey *) user_data;
-
GError *error = NULL;
gboolean retval = ibus_input_context_process_key_event_async_finish (
context,
@@ -362,12 +362,10 @@ _process_key_event (IBusInputContext *context,
retval = TRUE;
}
- if (retval) {
+ if (retval)
event->state |= IBUS_HANDLED_MASK;
- }
- else {
+ else
event->state |= IBUS_IGNORED_MASK;
- }
return retval;
}
@@ -1508,6 +1506,7 @@ _key_is_modifier (guint keyval)
return FALSE;
}
}
+
/* Copy from gdk */
static GdkEventKey *
_create_gdk_event (IBusIMContext *ibusimcontext,
--
2.24.1

View File

@ -0,0 +1,179 @@
From 3d442dbf936d197aa11ca0a71663c2bc61696151 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
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 <shawn.p.huang@gmail.com>
- * Copyright (C) 2008-2010 Red Hat, Inc.
+ * Copyright (C) 2011-2019 Takao Fujiwara <takao.fujiwara1@gmail.com>
+ * 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

View File

@ -0,0 +1,347 @@
From c38e925eba2b1f7af39696e2f64ec1eaea94b00b Mon Sep 17 00:00:00 2001
From: Takao Fujiwara <fujiwara@redhat.com>
Date: Thu, 30 Sep 2021 09:36:12 -0400
Subject: [PATCH] Backport IBus Unicode feature
---
configure.ac | 10 +++++++
ui/gtk3/Makefile.am | 5 +++-
ui/gtk3/emojier.vala | 37 +++++++++++++++--------
ui/gtk3/emojierapp.vala | 63 ++++++++++++++++++++++++++++-----------
ui/gtk3/panelbinding.vala | 13 ++++++--
5 files changed, 93 insertions(+), 35 deletions(-)
diff --git a/configure.ac b/configure.ac
index 46ab7a9..26bb357 100644
--- a/configure.ac
+++ b/configure.ac
@@ -237,12 +237,21 @@ if test x"$enable_gtk3" = x"yes"; then
PKG_CHECK_MODULES(GTK3, [
gtk+-3.0
])
+ PKG_CHECK_EXISTS([gdk-wayland-3.0],
+ [enable_gdk3_wayland=yes],
+ [enable_gdk3_wayland=no]
+ )
gtk3_binary_version=`$PKG_CONFIG --variable=gtk_binary_version gtk+-3.0`
GTK3_IM_MODULEDIR="$libdir"/gtk-3.0/$gtk3_binary_version/immodules
else
enable_gtk3="no (disabled, use --enable-gtk3 to enable)"
+ enable_gdk3_wayland=no
+fi
+if test x"$enable_gdk3_wayland" != x"yes"; then
+ enable_gdk3_wayland="no (disabled, need to install gdk-wayland-3.0.pc)"
fi
+AM_CONDITIONAL([ENABLE_GDK3_WAYLAND], [test x"$enable_gdk3_wayland" = x"yes"])
if test x"$enable_xim" = x"yes"; then
# Check for x11
@@ -796,6 +805,7 @@ Build options:
Build gtk3 immodule $enable_gtk3
Build XIM agent server $enable_xim
Build wayland support $enable_wayland
+ Build gdk3 wayland support $enable_gdk3_wayland
Build appindicator support $enable_appindicator
Build appindicator engine icon $enable_appindicator_engine_icon
Build python library $enable_python_library
diff --git a/ui/gtk3/Makefile.am b/ui/gtk3/Makefile.am
index aaba7a4..6ebc96c 100644
--- a/ui/gtk3/Makefile.am
+++ b/ui/gtk3/Makefile.am
@@ -78,7 +78,6 @@ AM_VALAFLAGS = \
--pkg=ibus-1.0 \
--pkg=config \
--pkg=xi \
- --pkg=gdk-wayland \
--target-glib="$(VALA_TARGET_GLIB_VERSION)" \
$(NULL)
@@ -105,6 +104,10 @@ if ENABLE_APPINDICATOR_ENGINE_ICON
AM_VALAFLAGS += --define=INDICATOR_ENGINE_ICON
endif
+if ENABLE_GDK3_WAYLAND
+AM_VALAFLAGS += --pkg=gdk-wayland --define=USE_GDK_WAYLAND
+endif
+
libexec_PROGRAMS = ibus-ui-gtk3
ibus_ui_gtk3_SOURCES = \
diff --git a/ui/gtk3/emojier.vala b/ui/gtk3/emojier.vala
index 3eac2f2..9e6e926 100644
--- a/ui/gtk3/emojier.vala
+++ b/ui/gtk3/emojier.vala
@@ -2,7 +2,7 @@
*
* ibus - The Input Bus
*
- * Copyright (c) 2017-2018 Takao Fujiwara <takao.fujiwara1@gmail.com>
+ * Copyright (c) 2017-2019 Takao Fujiwara <takao.fujiwara1@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -320,6 +320,7 @@ public class IBusEmojier : Gtk.ApplicationWindow {
public signal void candidate_clicked(uint index, uint button, uint state);
public signal void commit_text(string text);
+ public signal void cancel();
public IBusEmojier() {
GLib.Object(
@@ -864,7 +865,7 @@ public class IBusEmojier : Gtk.ApplicationWindow {
row.get_allocation(out alloc);
var adjustment = m_scrolled_window.get_vadjustment();
adjustment.clamp_page(alloc.y, alloc.y + alloc.height);
- return_val_if_fail(m_category_active_index >= 0, false);
+ return_if_fail(m_category_active_index >= 0);
m_lookup_table.set_cursor_pos((uint)m_category_active_index);
}
@@ -936,8 +937,13 @@ public class IBusEmojier : Gtk.ApplicationWindow {
update_unicode_blocks();
return;
} else {
- unowned GLib.SList<unowned string> emojis =
- m_category_to_emojis_dict.lookup(category);
+ // Use copy_deep() since vala 0.43.4 does not allow to assign
+ // a weak pointer to the full one in SList:
+ // emojier.vala:885.48-886.62: error: Assignment: Cannot convert
+ // from `GLib.SList<string>' to `GLib.SList<weak string>?'
+ GLib.SList<string> emojis =
+ m_category_to_emojis_dict.lookup(category).copy_deep(
+ GLib.strdup);
m_lookup_table.clear();
m_candidate_panel_mode = true;
foreach (unowned string emoji in emojis) {
@@ -1601,8 +1607,8 @@ public class IBusEmojier : Gtk.ApplicationWindow {
m_vbox.add(widget);
widget.show_all();
}
- unowned GLib.SList<unowned string>? annotations =
- data.get_annotations();
+ GLib.SList<string> annotations =
+ data.get_annotations().copy_deep(GLib.strdup);
var buff = new GLib.StringBuilder();
int i = 0;
foreach (unowned string annotation in annotations) {
@@ -1784,8 +1790,7 @@ public class IBusEmojier : Gtk.ApplicationWindow {
show_emoji_variants(emojis);
return true;
}
- if (m_input_context_path != "")
- m_result = text;
+ m_result = text;
if (need_commit_signal)
commit_text(text);
return false;
@@ -1892,6 +1897,7 @@ public class IBusEmojier : Gtk.ApplicationWindow {
// PageUp/PageDown.
remove_all_children();
}
+ cancel();
return false;
}
@@ -2055,17 +2061,20 @@ public class IBusEmojier : Gtk.ApplicationWindow {
) as IBus.EmojiData;
m_emoji_to_data_dict.insert(favorite, new_data);
} else {
- unowned GLib.SList<string> annotations = data.get_annotations();
+ GLib.SList<string> annotations =
+ data.get_annotations().copy_deep(GLib.strdup);
if (annotations.find_custom(annotation, GLib.strcmp) == null) {
annotations.append(annotation);
- data.set_annotations(annotations.copy());
+ data.set_annotations(annotations.copy_deep(GLib.strdup));
}
}
unowned GLib.SList<string> emojis =
m_annotation_to_emojis_dict.lookup(annotation);
if (emojis.find_custom(favorite, GLib.strcmp) == null) {
emojis.append(favorite);
- m_annotation_to_emojis_dict.replace(annotation, emojis.copy());
+ m_annotation_to_emojis_dict.replace(
+ annotation,
+ emojis.copy_deep(GLib.strdup));
}
}
}
@@ -2117,7 +2126,7 @@ public class IBusEmojier : Gtk.ApplicationWindow {
public string get_current_candidate() {
// If category_list mode, do not show the category name on preedit.
// If candidate_panel mode, the first space key does not show the
- // lookup table but the first candidate is avaiable on preedit.
+ // lookup table but the first candidate is available on preedit.
if (!m_candidate_panel_mode)
return "";
uint cursor = m_lookup_table.get_cursor_pos();
@@ -2139,11 +2148,13 @@ public class IBusEmojier : Gtk.ApplicationWindow {
ncandidates));
int char_count = text.text.char_count();
int start_index = -1;
+ unowned string title = text.text;
for (int i = 0; i < char_count; i++) {
- if (text.text.utf8_offset(i).has_prefix(language)) {
+ if (title.has_prefix(language)) {
start_index = i;
break;
}
+ title = title.next_char();
}
if (start_index >= 0) {
var attr = new IBus.Attribute(
diff --git a/ui/gtk3/emojierapp.vala b/ui/gtk3/emojierapp.vala
index fab99d9..7bc7b42 100644
--- a/ui/gtk3/emojierapp.vala
+++ b/ui/gtk3/emojierapp.vala
@@ -3,6 +3,7 @@
* ibus - The Input Bus
*
* Copyright (c) 2017 Peng Wu <alexepico@gmail.com>
+ * Copyright (c) 2017-2019 Takao Fujiwara <takao.fujiwara1@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -40,6 +41,33 @@ public class EmojiApplication : Gtk.Application {
}
+ private void save_selected_string(string? selected_string,
+ bool cancelled) {
+ if (cancelled) {
+ m_command_line.print("%s\n", _("Canceled to choose an emoji."));
+ return;
+ }
+ GLib.return_if_fail(selected_string != null);
+ Gtk.Clipboard clipboard = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD);
+ clipboard.set_text(selected_string, -1);
+ clipboard.store();
+
+ var emojier_favorites = m_settings_emoji.get_strv("favorites");
+ bool has_favorite = false;
+ foreach (unowned string favorite in emojier_favorites) {
+ if (favorite == selected_string) {
+ has_favorite = true;
+ break;
+ }
+ }
+ if (!has_favorite) {
+ emojier_favorites += selected_string;
+ m_settings_emoji.set_strv("favorites", emojier_favorites);
+ }
+ m_command_line.print("%s\n", _("Copied an emoji to your clipboard."));
+ }
+
+
private void show_dialog(ApplicationCommandLine command_line) {
m_command_line = command_line;
m_emojier.reset();
@@ -55,7 +83,7 @@ public class EmojiApplication : Gtk.Application {
return;
if (button == IBusEmojier.BUTTON_CLOSE_BUTTON) {
m_emojier.hide();
- m_command_line.print("%s\n", _("Canceled to choose an emoji."));
+ save_selected_string(null, true);
m_command_line = null;
return;
}
@@ -74,23 +102,7 @@ public class EmojiApplication : Gtk.Application {
}
string emoji = m_emojier.get_current_candidate();
m_emojier.hide();
- Gtk.Clipboard clipboard = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD);
- clipboard.set_text(emoji, -1);
- clipboard.store();
-
- var emojier_favorites = m_settings_emoji.get_strv("favorites");
- bool has_favorite = false;
- foreach (unowned string favorite in emojier_favorites) {
- if (favorite == emoji) {
- has_favorite = true;
- break;
- }
- }
- if (!has_favorite) {
- emojier_favorites += emoji;
- m_settings_emoji.set_strv("favorites", emojier_favorites);
- }
- m_command_line.print("%s\n", _("Copied an emoji to your clipboard."));
+ save_selected_string(emoji, false);
m_command_line = null;
}
@@ -202,6 +214,21 @@ public class EmojiApplication : Gtk.Application {
m_emojier.candidate_clicked.connect((i, b, s) => {
candidate_clicked_lookup_table(i, b, s);
});
+ m_emojier.cancel.connect(() => {
+ if (m_command_line == null)
+ return;
+ m_emojier.hide();
+ save_selected_string(null, true);
+ m_command_line = null;
+ });
+ m_emojier.commit_text.connect(() => {
+ if (m_command_line == null)
+ return;
+ m_emojier.hide();
+ string selected_string = m_emojier.get_selected_string();
+ save_selected_string(selected_string, false);
+ m_command_line = null;
+ });
}
activate_dialog(command_line);
diff --git a/ui/gtk3/panelbinding.vala b/ui/gtk3/panelbinding.vala
index cfedb2d..861255b 100644
--- a/ui/gtk3/panelbinding.vala
+++ b/ui/gtk3/panelbinding.vala
@@ -3,7 +3,7 @@
* ibus - The Input Bus
*
* Copyright(c) 2018 Peng Huang <shawn.p.huang@gmail.com>
- * Copyright(c) 2018 Takao Fujwiara <takao.fujiwara1@gmail.com>
+ * Copyright(c) 2018-2020 Takao Fujwiara <takao.fujiwara1@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -190,7 +190,7 @@ class Preedit : Gtk.Window {
public IBus.Text get_commit_text() {
string extension_text = m_extension_preedit_emoji.get_text();
- if (extension_text.length == 0)
+ if (extension_text.length == 0 && m_prefix != "u")
extension_text = m_extension_preedit_text.get_text();
return new IBus.Text.from_string(extension_text);
}
@@ -237,9 +237,14 @@ class PanelBinding : IBus.PanelService {
GLib.Object(connection : bus.get_connection(),
object_path : IBus.PATH_PANEL_EXTENSION_EMOJI);
+#if USE_GDK_WAYLAND
Type instance_type = Gdk.Display.get_default().get_type();
Type wayland_type = typeof(GdkWayland.Display);
m_is_wayland = instance_type.is_a(wayland_type);
+#else
+ m_is_wayland = false;
+ warning("Checking Wayland is disabled");
+#endif
m_bus = bus;
m_application = application;
@@ -551,8 +556,10 @@ class PanelBinding : IBus.PanelService {
private bool key_press_keyval(uint keyval) {
unichar ch = IBus.keyval_to_unicode(keyval);
+ if (m_extension_name == "unicode" && !ch.isxdigit())
+ return false;
if (ch.iscntrl())
- return false;
+ return false;
string str = ch.to_string();
m_preedit.append_text(str);
string annotation = m_preedit.get_text();
--
2.27.0

View File

@ -31,7 +31,7 @@
Name: ibus
Version: 1.5.19
Release: 9%{?dist}
Release: 14%{?dist}
Summary: Intelligent Input Bus for Linux OS
License: LGPLv2+
Group: System Environment/Libraries
@ -39,22 +39,26 @@ 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
Source3: https://fujiwara.fedorapeople.org/ibus/po/%{name}-po-1.5.19-20210706.tar.gz
# Patch0: %%{name}-HEAD.patch
# RHEL 8.0 From upstreamed patches
Patch0: %{name}-HEAD.patch
# RHEL 8.2 Bug 1713606 - Fix hangul preedit commit with mouse click
Patch1: %{name}-1713606-hangul-with-mouse.patch
# RHEL 8.2 Fix not to assert with wrong compose files
Patch2: %{name}-1470673-emoji-warn-instead-assert.patch
Patch1: %{name}-1470673-emoji-warn-instead-assert.patch
# RHEL 8.2 Fix not to assert with 16 candidates
Patch3: %{name}-2076-fix-16-candidates.patch
Patch2: %{name}-2076-fix-16-candidates.patch
# RHEL 8.2 Show emoji compose in the top category
Patch4: %{name}-xx-emoji-compose.patch
Patch3: %{name}-xx-emoji-compose.patch
# RHEL 8.2 Extract $(datarootdir) in ibus-setup
Patch5: %{name}-xx-setup-env.patch
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.2 Bug 1713606 - Fix hangul preedit commit with mouse click
Patch7: %{name}-1713606-hangul-with-mouse.patch
# RHEL 8.5 Bug 1897548 - Enable to lookup Unicode names
Patch8: %{name}-1897548-emoji-unicode.patch
# RHEL 8.0 Under testing #1349148 #1385349 #1350291 #1406699 #1432252 #1601577
Patch100: %{name}-1385349-segv-bus-proxy.patch
@ -66,16 +70,19 @@ 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
%if %with_python2
# http://pkgs.devel.redhat.com/cgit/rpms/GConf2/commit/?h=rhel-8.3.0&id=82fe51c3
# https://bugzilla.gnome.org/show_bug.cgi?id=759334
# Need python2 for gsettings-schema-convert
BuildRequires: python2-devel
BuildRequires: dbus-python-devel >= %{dbus_python_version}
%endif
BuildRequires: vala
BuildRequires: vala-devel
BuildRequires: vala-tools
@ -280,12 +287,24 @@ cp client/gtk2/ibusimcontext.c client/gtk3/ibusimcontext.c || :
zcat %SOURCE3 | tar xfv -
cp /usr/share/unicode/ucd/Blocks.txt .
NL=/usr/share/unicode/ucd/NamesList.txt
sed -e '/^@@.*3300.*CJK Compatibility/i\
@ Japanese era name\
32FF SQUARE ERA NAME REIWA\
# <square> 4EE4 548C' $NL > NamesList.txt
diff $NL NamesList.txt || :
# 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
for f in ibusimcontext.c ibusim.c
do
diff client/gtk2/$f client/gtk3/$f
if test $? -ne 0 ; then
echo "Have to copy $f into client/gtk3"
abort
fi
done
%build
#autoreconf -f -i -v
@ -311,11 +330,15 @@ autoreconf -f -i -v
%endif
--enable-introspection \
--enable-install-tests \
--with-ucd-dir=$PWD \
%{nil}
make -C ui/gtk3 maintainer-clean-generic
make %{?_smp_mflags}
env PAGER=: git diff src/ibusemojigen.h
env PAGER=: git diff src/ibusunicodegen.h
%install
make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
rm -f $RPM_BUILD_ROOT%{_libdir}/libibus-*%{ibus_api_version}.la
@ -478,6 +501,26 @@ dconf update || :
%{_datadir}/installed-tests/ibus
%changelog
* Mon Oct 18 2021 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.19-14
- Resolves: #2014064 - Fix regression of Emoji typing in Wayland
* Tue Jul 06 2021 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.19-13
- Resolves: #1897548 - Rebuild IBus emoji with unicode-emoji-13.0-4 and cldr-emoji-annotation-39-2
- Rebuild ibusemojigen.h and ibusunicodegen.h
- Add ibus-1897548-emoji-unicode.patch to lookup Unicode names
- Add U+32FF to IBusUnicodeData
- Add ibus-po-1.5.19-20210706.tar.gz
* Thu Jun 04 2020 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.19-12
- Resolves: #1713606 - Fix hangul preedit commit with mouse click
- Update 1682157-ci.patch
* Thu Jan 09 2020 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.19-11
- Resolves: #1750836 - Fix CVE-2019-14822
* Thu Dec 12 2019 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.19-10
- Resolves: #1750836 - Revert Hangul fix for 8.2 schedule
* Tue Dec 03 2019 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.19-9
- Resolves: #1682157 - Fix RHEL 8.2 covscan #2