From e2c39df16220e52c3d96fafdc9e4ae94255d6b1b Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Mar 31 2020 09:33:43 +0000 Subject: import ibus-1.5.17-10.el7 --- diff --git a/SOURCES/ibus-1686913-prctl.patch b/SOURCES/ibus-1686913-prctl.patch new file mode 100644 index 0000000..dee0822 --- /dev/null +++ b/SOURCES/ibus-1686913-prctl.patch @@ -0,0 +1,117 @@ +From 32572618cdcc36162b5769eb4c71964db9734061 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Tue, 6 Aug 2019 18:55:14 +0900 +Subject: [PATCH] bus: Exit ibus-daemon with parent's death + +ibus-daemon can be restarted unexpectedly during logging out the session +and double ibus-x11 prevent from enabling XIM in XGetSelectionOwner() +for the "ibus" atom. +ibus-daemon always will exit the process when the parent process dies +to avoid this problem. +--- + bus/main.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++- + configure.ac | 3 +++ + 2 files changed, 58 insertions(+), 1 deletion(-) + +diff --git a/bus/main.c b/bus/main.c +index 3223d541..e11a5ebd 100644 +--- a/bus/main.c ++++ b/bus/main.c +@@ -32,6 +32,10 @@ + #include + #include + ++#ifdef HAVE_SYS_PRCTL_H ++#include ++#endif ++ + #include "global.h" + #include "ibusimpl.h" + #include "server.h" +@@ -164,6 +168,15 @@ _sig_usr2_handler (int sig) + g_mem_profile (); + } + ++#ifdef HAVE_SYS_PRCTL_H ++static void ++_sig_usr1_handler (int sig) ++{ ++ g_warning ("The parent process died."); ++ bus_server_quit (FALSE); ++} ++#endif ++ + gint + main (gint argc, gchar **argv) + { +@@ -204,7 +217,7 @@ main (gint argc, gchar **argv) + /* daemonize process */ + if (daemonize) { + if (daemon (1, 0) != 0) { +- g_printerr ("Can not daemonize ibus.\n"); ++ g_printerr ("Cannot daemonize ibus.\n"); + exit (-1); + } + } +@@ -276,6 +289,47 @@ main (gint argc, gchar **argv) + exit (-1); + } + ++ if (!daemonize) { ++ if (getppid () == 1) { ++ g_warning ("The parent process died."); ++ exit (0); ++ } ++#ifdef HAVE_SYS_PRCTL_H ++ /* Currently ibus-x11 detects XIOError and assume the error as the ++ * desktop session is closed and ibus-x11 calls Exit D-Bus method to ++ * exit ibus-daemon. But a few desktop sessions cause XError before ++ * XIOError and GTK does not allow to bind XError by applications and ++ * GTK calls gdk_x_error() with XError. ++ * ++ * E.g. GdkX11Screen calls XGetSelectionOwner() for "_XSETTINGS_S?" ++ * atoms during the logout but the selection owner already becomes ++ * NULL and the NULL window causes XError with ++ * gdk_x11_window_foreign_new_for_display(). ++ * ++ * Since ibus-x11 exits with XError before XIOError, gnome-shell ++ * can detects the exit of ibus-daemon a little earlier and ++ * gnome-shell restarts ibus-daemon but gnome-shell dies soon. ++ * Then gnome-shell dies but ibus-daemon is alive, it's a problem. ++ * Because it causes double ibus-x11 of GDM and a login user ++ * and double XSetSelectionOwner() is not allowed for the unique ++ * "ibus" atom and the user cannot use XIM but not GtkIMModule. ++ * ++ * Probably we could fix the ibus process problem if we would fix ++ * XError about the X selection owner or stop to restart ibus-daemon ++ * in gonme-shell when the session is logging out. ++ * Maybe using SessionManager.LogoutRemote() or ++ * global.screen.get_display().get_xdisplay() ++ * But I assume thereare other scenarios to causes the problem. ++ * ++ * And I decided ibus-daemon always exits with the parent's death here ++ * to avoid unexpected ibus restarts during the logout. ++ */ ++ if (prctl (PR_SET_PDEATHSIG, SIGUSR1)) ++ g_printerr ("Cannot bind SIGUSR1 for parent death\n"); ++ else ++ signal (SIGUSR1, _sig_usr1_handler); ++#endif ++ } + bus_server_run (); + return 0; + } +diff --git a/configure.ac b/configure.ac +index f1df3ac1..fdd316a9 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -140,6 +140,9 @@ AC_HEADER_STDC + LT_INIT + IT_PROG_INTLTOOL([0.35.0]) + ++# Check header filess. ++AC_CHECK_HEADERS([sys/prctl.h]) ++ + # Check functions. + AC_CHECK_FUNCS(daemon) + diff --git a/SOURCES/ibus-xx-rpmdiff-po-ko.patch b/SOURCES/ibus-xx-rpmdiff-po-ko.patch new file mode 100644 index 0000000..2630711 --- /dev/null +++ b/SOURCES/ibus-xx-rpmdiff-po-ko.patch @@ -0,0 +1,26 @@ +From 2c8c1d3b3d050333f9ed06bddea9cd16479fb9b1 Mon Sep 17 00:00:00 2001 +From: root +Date: Fri, 9 Aug 2019 20:05:08 +0900 +Subject: [PATCH] po: Fix rpmdiff in po/ko.po + +BUG=https://rpmdiff.engineering.redhat.com/run/413337/31/ +--- + po/ko.po | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/po/ko.po b/po/ko.po +index 1015368..40fce85 100644 +--- a/po/ko.po ++++ b/po/ko.po +@@ -529,7 +529,7 @@ msgstr "Kbd" + + #: ../setup/ibus-setup.desktop.in.h:2 + msgid "Set IBus Preferences" +-msgstr "IBus 환경 설정" ++msgstr "IBus 환경 설정 변경" + + #: ../setup/keyboardshortcut.py:56 + msgid "Keyboard shortcuts" +-- +1.8.3.1 + diff --git a/SPECS/ibus.spec b/SPECS/ibus.spec index 01278a7..e28cd17 100644 --- a/SPECS/ibus.spec +++ b/SPECS/ibus.spec @@ -40,7 +40,7 @@ Name: ibus Version: 1.5.17 -Release: 5%{?dist} +Release: 10%{?dist} Summary: Intelligent Input Bus for Linux OS License: LGPLv2+ Group: System Environment/Libraries @@ -53,11 +53,11 @@ Source2: %{name}.conf.5 Source3: %{name}-cldr-emoji-annotation-32.0.0_1.tar.gz Source4: %{name}-emoji-test.txt %endif -# Will remove the annotation tarball once the rpm is available on Fedora -# Upstreamed patches. # Patch0: %%{name}-HEAD.patch Patch1: %{name}-1612432-commit-with-mouse.patch Patch2: %{name}-1612432-click-firefox-anywhere.patch +Patch3: %{name}-1686913-prctl.patch +Patch4: %{name}-xx-rpmdiff-po-ko.patch BuildRequires: gettext-devel @@ -275,6 +275,8 @@ cp %SOURCE4 emoji/emoji-test.txt # %%patch0 -p1 %patch1 -p1 -z .hangul %patch2 -p1 -z .click-anywhere +%patch3 -p1 -z .prctl +%patch4 -p1 -z .rpmdiff # cp client/gtk2/ibusimcontext.c client/gtk3/ibusimcontext.c || cp client/gtk2/ibusimcontext.c client/gtk3/ibusimcontext.c || @@ -492,6 +494,21 @@ gtk-query-immodules-3.0-%{__isa_bits} --update-cache &> /dev/null || : %{_datadir}/gtk-doc/html/* %changelog +* Tue Jan 14 2020 Takao Fujiwara - 1.5.17-10 +- Resolves: #1777369 - Revert ibus CVE fix because of Qt5 regression + +* Fri Oct 04 2019 Takao Fujiwara - 1.5.17-9 +- Resolves: #1750835 - Delete duplicated g_dbus_generate_guid() + +* Fri Sep 20 2019 Takao Fujiwara - 1.5.17-8 +- Resolves: #1750835 - Fix CVE-2019-14822 missing authorization allows + +* Fri Aug 09 2019 Takao Fujiwara - 1.5.17-7 +- Resolves: #1686913 - Fix rpmdiff inspection in ko.po + +* Tue Aug 06 2019 Takao Fujiwara - 1.5.17-6 +- Resolves: #1686913 - ibus-daemon always will exits with parent's death + * Tue May 07 2019 Takao Fujiwara - 1.5.17-5 - Resolves: #1693926 - Commit hangul preedit with clicking out of URL bar