Compare commits

...

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

4 changed files with 239 additions and 8 deletions

View File

@ -1,14 +1,73 @@
From cddde2dbcbb4d78a32c342c7416aef9a5c5eb7cd Mon Sep 17 00:00:00 2001
From c38e925eba2b1f7af39696e2f64ec1eaea94b00b Mon Sep 17 00:00:00 2001
From: Takao Fujiwara <fujiwara@redhat.com>
Date: Thu, 8 Jul 2021 03:58:09 -0400
Date: Thu, 30 Sep 2021 09:36:12 -0400
Subject: [PATCH] Backport IBus Unicode feature
---
ui/gtk3/emojier.vala | 37 ++++++++++++++--------
ui/gtk3/emojierapp.vala | 66 +++++++++++++++++++++++++++------------
configure.ac | 10 +++++++
ui/gtk3/Makefile.am | 5 +++-
ui/gtk3/emojier.vala | 37 +++++++++++++++--------
ui/gtk3/emojierapp.vala | 63 ++++++++++++++++++++++++++++-----------
ui/gtk3/panelbinding.vala | 13 ++++++--
3 files changed, 80 insertions(+), 36 deletions(-)
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
@ -133,7 +192,7 @@ index 3eac2f2..9e6e926 100644
if (start_index >= 0) {
var attr = new IBus.Attribute(
diff --git a/ui/gtk3/emojierapp.vala b/ui/gtk3/emojierapp.vala
index fab99d9..783c611 100644
index fab99d9..7bc7b42 100644
--- a/ui/gtk3/emojierapp.vala
+++ b/ui/gtk3/emojierapp.vala
@@ -3,6 +3,7 @@
@ -284,5 +343,5 @@ index cfedb2d..861255b 100644
m_preedit.append_text(str);
string annotation = m_preedit.get_text();
--
2.18.2
2.27.0

View File

@ -0,0 +1,153 @@
--- ibus-1.5.19/src/tests/ibus-desktop-testing-runner.in.orig 2025-04-11 13:28:17.764620101 +0900
+++ ibus-1.5.19/src/tests/ibus-desktop-testing-runner.in 2025-04-15 01:02:05.501785740 +0900
@@ -4,7 +4,7 @@
#
# ibus - The Input Bus
#
-# Copyright (c) 2018-2020 Takao Fujiwara <takao.fujiwara1@gmail.com>
+# Copyright (c) 2018-2021 Takao Fujiwara <takao.fujiwara1@gmail.com>
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -36,7 +36,7 @@
PROGNAME=`basename $0`
-VERSION=0.1
+VERSION=0.2
DISPLAY=:99.0
BUILDDIR="."
SRCDIR="."
@@ -44,7 +44,7 @@ TEST_LOG="test-suite.log"
TEST_LOG_STDOUT=0
RESULT_LOG=""
HAVE_GRAPHICS=1
-DESKTOP_COMMAND="dbus-launch --exit-with-session gnome-session"
+DESKTOP_COMMAND="dbus-launch --exit-with-session mutter"
PID_XORG=0
PID_GNOME_SESSION=0
TESTING_RUNNER="default"
@@ -80,7 +80,9 @@ usage()
"-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" \
+"-d, --desktop=DESKTOP Run DESTKTOP. The default is mutter.\n" \
+" Suffix '-with-dbus' can run DESKTOP with dbus session." \
+" E.g. --desktop=gnome-session-with-dbus" \
"-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" \
@@ -115,6 +117,13 @@ parse_args()
* ) usage; exit 1;;
esac
done
+ DL='$'
+ echo "$DESKTOP_COMMAND" | grep "\-with\-dbus$DL" > /dev/null
+ HAS_DBUS_SUFFIX=$?
+ if [ $HAS_DBUS_SUFFIX -eq 0 ] ; then
+ DESKTOP_COMMAND=`echo "$DESKTOP_COMMAND" | sed -e 's/-with-dbus$//'`
+ DESKTOP_COMMAND="dbus-launch --exit-with-session $DESKTOP_COMMAND"
+ fi
}
init_desktop()
@@ -124,8 +133,9 @@ init_desktop()
rm $RESULT_LOG
fi
fi
- HAS_STDOUT=`echo "$TEST_LOG" | grep ':stdout'`
- if [ x"$HAS_STDOUT" != x ] ; then
+ echo "$TEST_LOG" | grep ':stdout' > /dev/null
+ HAS_STDOUT=$?
+ if [ $HAS_STDOUT -eq 0 ] ; then
TEST_LOG=`echo "$TEST_LOG" | sed -e 's|:stdout||'`
TEST_LOG_STDOUT=1
fi
@@ -203,8 +213,52 @@ run_dbus_daemon()
export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$UID/bus"
}
+init_gnome()
+{
+ # gsettings set command needs dconf-service with the same $DISPLAY
+ pkill dconf-service
+ # G_MESSAGES_DEBUG=all or G_MESSAGES_DEBUG=GLib-GIO-DEBUG would append
+ # debug messages to gsettings output and could not get the result correctly.
+ backup_G_MESSAGES_DEBUG="$G_MESSAGES_DEBUG"
+ unset G_MESSAGES_DEBUG
+ # Disable Tour dialog to get focus
+ V=`gsettings get org.gnome.shell welcome-dialog-last-shown-version`
+ if [ x"$V" = x"''" ] ; then
+ gsettings set org.gnome.shell welcome-dialog-last-shown-version '100'
+ fi
+ # gnome-shell now starts overview mode by login.
+ # https://extensions.gnome.org/extension/4099/no-overview/
+ NO_SYS_DIR=/usr/share/gnome-shell/extensions/no-overview@fthx
+ NO_USER_DIR=$HOME/.local/share/gnome-shell/extensions/no-overview@fthx
+ if [ ! -d $NO_SYS_DIR ] && [ ! -d $NO_USER_DIR ] ; then
+ mkdir -p "`dirname $NO_USER_DIR`"
+ cp -R "no-overview@fthx" "`dirname $NO_USER_DIR`"
+ fi
+ V=`gsettings get org.gnome.shell disable-user-extensions`
+ if [ x"$V" = x"true" ] ; then
+ gsettings set org.gnome.shell disable-user-extensions false
+ fi
+ V=`gsettings get org.gnome.shell enabled-extensions`
+ echo "$V" | grep "no-overview" > /dev/null
+ V2=$?
+ if [ $V2 -ne 0 ] ; then
+ V3=`echo "$V" | sed -e 's/@as //' -e 's/\[//' -e 's/\]//'`
+ if [ x"$V3" = x"''" ] || [ x"$V3" = x"" ]; then
+ V4="['no-overview@fthx']"
+ else
+ V4="[$V3, 'no-overview@fthx']"
+ fi
+ gsettings set org.gnome.shell enabled-extensions "$V4"
+ fi
+ if [ x"$backup_G_MESSAGES_DEBUG" != x ] ; then
+ export G_MESSAGES_DEBUG="$backup_G_MESSAGES_DEBUG"
+ fi
+}
+
run_desktop()
{
+ echo "$DESKTOP_COMMAND" | grep gnome-session > /dev/null
+ HAS_GNOME=$?
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
@@ -213,12 +267,15 @@ run_desktop()
PID_XORG=$!
sleep 1
export DISPLAY=$DISPLAY
+ # init_gnome need to be called with $DISPLAY before gnome-session is called
+ if [ $HAS_GNOME -eq 0 ] ; then
+ init_gnome
+ fi
echo "Running $DESKTOP_COMMAND with $USER in `tty`"
$DESKTOP_COMMAND &
PID_GNOME_SESSION=$!
sleep 30
- HAS_GNOME=`echo $DESKTOP_COMMAND | grep gnome-session`
- if [ x"$HAS_GNOME" = x ] ; then
+ if [ $HAS_GNOME -ne 0 ] ; then
ibus-daemon --daemonize --verbose
sleep 3
fi
@@ -360,8 +417,13 @@ EOF_RUNNER
;;
esac
echo ""
- print_log -e "${GREEN}PASS${NC}: $pass"
- print_log -e "${RED}FAIL${NC}: $fail"
+ # Fedora CI assumes the test is failed even if $fail is 0.
+ 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 ""
if [ $TEST_LOG_STDOUT -eq 1 ] ; then
cat $TEST_LOG

View File

@ -0,0 +1,8 @@
--- ibus-1.5.19/src/tests/ibus-compose.env.orig 2025-04-11 20:19:32.894033452 +0900
+++ ibus-1.5.19/src/tests/ibus-compose.env 2025-04-11 20:20:36.995690581 +0900
@@ -1,4 +1,4 @@
-LANG=el_GR.UTF-8
+#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

View File

@ -31,7 +31,7 @@
Name: ibus
Version: 1.5.19
Release: 13%{?dist}
Release: 15%{?dist}
Summary: Intelligent Input Bus for Linux OS
License: LGPLv2+
Group: System Environment/Libraries
@ -59,6 +59,11 @@ Patch6: %{name}-1682157-ci.patch
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.10 Backport CI from RHEL 9
Patch9: %{name}-xx-tests-desktop-el9.patch
# RHEL 8.10 Disable el-GR compose test since the latest includes multiple
# outputs and IBus requires to backport lots of patches to support it.
Patch10: %{name}-xx-tests-disable-el-gr.patch
# RHEL 8.0 Under testing #1349148 #1385349 #1350291 #1406699 #1432252 #1601577
Patch100: %{name}-1385349-segv-bus-proxy.patch
@ -501,6 +506,12 @@ dconf update || :
%{_datadir}/installed-tests/ibus
%changelog
* Sat Apr 19 2025 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.19-15
- Resolves: RHEL-87876 Backport desktop-testing from RHEL 9
* Thu Sep 30 2021 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.19-14
- Resolves: #2008074 - 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