Use transfiletriggerin and transfiletriggerpostun
- Change mutter to no-overview gnome-shell in CI
This commit is contained in:
parent
6ef6b11829
commit
afcf69bc3f
194
ibus-HEAD.patch
194
ibus-HEAD.patch
@ -1,11 +1,12 @@
|
||||
From b3b90f0e467ade81165d67638ca7c2541963a879 Mon Sep 17 00:00:00 2001
|
||||
From 214b60a3af67b6e8dafdb8edba666a369f18be12 Mon Sep 17 00:00:00 2001
|
||||
From: fujiwarat <takao.fujiwara1@gmail.com>
|
||||
Date: Sat, 20 Mar 2021 20:28:42 +0900
|
||||
Subject: [PATCH] src/tests: Change default session gnome-session to mutter
|
||||
Date: Fri, 26 Mar 2021 22:48:08 +0900
|
||||
Subject: [PATCH] src/tests: Run gnome-session with no-overview mode
|
||||
|
||||
gnome-shell 40 now shows the overview mode by login and
|
||||
gnome-desktop-testing-runner cannot get the focus.
|
||||
Now the default session is changed to mutter from gnome-session.
|
||||
gnome-desktop-testing-runner cannot get the input focus.
|
||||
Running gnome-session with no-overview shell extension can
|
||||
get the input focus or mutter is another option.
|
||||
The default may be changed to twm if mutter also will be changed
|
||||
not to accept the application focus in the future.
|
||||
|
||||
@ -16,11 +17,11 @@ Don't output FAIL if the actual failure is 0 for Fedora CI.
|
||||
|
||||
BUG=https://discourse.gnome.org/t/focus-on-autostart-application-by-login/5863
|
||||
---
|
||||
src/tests/ibus-desktop-testing-runner.in | 31 +++++++++++++++++++-----
|
||||
1 file changed, 25 insertions(+), 6 deletions(-)
|
||||
src/tests/ibus-desktop-testing-runner.in | 69 ++++++++++++++++++++----
|
||||
1 file changed, 60 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/src/tests/ibus-desktop-testing-runner.in b/src/tests/ibus-desktop-testing-runner.in
|
||||
index 4232c549..23e3411e 100755
|
||||
index 4232c549..15b2369d 100755
|
||||
--- a/src/tests/ibus-desktop-testing-runner.in
|
||||
+++ b/src/tests/ibus-desktop-testing-runner.in
|
||||
@@ -4,7 +4,7 @@
|
||||
@ -41,53 +42,98 @@ index 4232c549..23e3411e 100755
|
||||
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" \
|
||||
+"-d, --desktop=DESKTOP Run DESTKTOP. The default is gnome-session.\n" \
|
||||
+" Suffix '-with-dbus' can run DESKTOP with dbus session." \
|
||||
+" E.g. --desktop=gnome-session-with-dbus" \
|
||||
+" E.g. --desktop=mutter-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,12 @@ parse_args()
|
||||
@@ -115,6 +117,13 @@ parse_args()
|
||||
* ) usage; exit 1;;
|
||||
esac
|
||||
done
|
||||
+ DL='$'
|
||||
+ HAS_DBUS_SUFFIX=`echo "$DESKTOP_COMMAND" | grep "\-with\-dbus$DL"`
|
||||
+ if [ x"$HAS_DBUS_SUFFIX" != x ] ; then
|
||||
+ 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()
|
||||
@@ -221,6 +229,12 @@ run_desktop()
|
||||
if [ x"$HAS_GNOME" = x ] ; then
|
||||
ibus-daemon --daemonize --verbose
|
||||
sleep 3
|
||||
+ else
|
||||
+ # 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
|
||||
@@ -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,6 +213,39 @@ run_dbus_daemon()
|
||||
export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$UID/bus"
|
||||
}
|
||||
|
||||
@@ -360,8 +374,13 @@ EOF_RUNNER
|
||||
+init_gnome()
|
||||
+{
|
||||
+ # 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/\[//' -e 's/\]//'`
|
||||
+ if [ x"$V3" = x ] ; then
|
||||
+ V4="['no-overview@fthx']"
|
||||
+ else
|
||||
+ V4="[$V3, 'no-overview@fthx']"
|
||||
+ fi
|
||||
+ gsettings set org.gnome.shell enabled-extensions "$V4"
|
||||
+ fi
|
||||
+}
|
||||
+
|
||||
run_desktop()
|
||||
{
|
||||
if test $HAVE_GRAPHICS -eq 1 ; then
|
||||
@@ -217,8 +260,11 @@ run_desktop()
|
||||
$DESKTOP_COMMAND &
|
||||
PID_GNOME_SESSION=$!
|
||||
sleep 30
|
||||
- HAS_GNOME=`echo $DESKTOP_COMMAND | grep gnome-session`
|
||||
- if [ x"$HAS_GNOME" = x ] ; then
|
||||
+ echo "$DESKTOP_COMMAND" | grep gnome-session > /dev/null
|
||||
+ HAS_GNOME=$?
|
||||
+ if [ $HAS_GNOME -eq 0 ] ; then
|
||||
+ init_gnome
|
||||
+ else
|
||||
ibus-daemon --daemonize --verbose
|
||||
sleep 3
|
||||
fi
|
||||
@@ -360,8 +406,13 @@ EOF_RUNNER
|
||||
;;
|
||||
esac
|
||||
echo ""
|
||||
@ -230,9 +276,9 @@ index e153081d..61194816 100644
|
||||
--
|
||||
2.28.0
|
||||
|
||||
From c3c224770a9db120713f86ce836cacbfcb178484 Mon Sep 17 00:00:00 2001
|
||||
From e9e1642870994abfdbd06b0138524ac231c159b8 Mon Sep 17 00:00:00 2001
|
||||
From: fujiwarat <takao.fujiwara1@gmail.com>
|
||||
Date: Wed, 26 May 2021 17:46:42 +0900
|
||||
Date: Wed, 16 Jun 2021 18:00:31 +0900
|
||||
Subject: [PATCH] Fix code reviews
|
||||
|
||||
---
|
||||
@ -505,7 +551,7 @@ index c9ee174d..ffd776fd 100644
|
||||
}
|
||||
|
||||
diff --git a/conf/dconf/main.c b/conf/dconf/main.c
|
||||
index e6878424..0d78b97d 100644
|
||||
index e6878424..c8250f68 100644
|
||||
--- a/conf/dconf/main.c
|
||||
+++ b/conf/dconf/main.c
|
||||
@@ -2,7 +2,8 @@
|
||||
@ -525,12 +571,12 @@ index e6878424..0d78b97d 100644
|
||||
- g_setenv ("DCONF_PROFILE", "ibus", FALSE);
|
||||
+ errno = 0;
|
||||
+ if (!g_setenv ("DCONF_PROFILE", "ibus", FALSE))
|
||||
+ g_warning ("Failed setenv %s", errno ? strerror (errno) : "(null)");
|
||||
+ g_warning ("Failed setenv %s", strerror (errno));
|
||||
|
||||
context = g_option_context_new ("- ibus dconf component");
|
||||
|
||||
diff --git a/portal/portal.c b/portal/portal.c
|
||||
index e78bc92f..213e2ba6 100644
|
||||
index e78bc92f..c2e4fc7f 100644
|
||||
--- a/portal/portal.c
|
||||
+++ b/portal/portal.c
|
||||
@@ -1,7 +1,7 @@
|
||||
@ -558,7 +604,7 @@ index e78bc92f..213e2ba6 100644
|
||||
/* Avoid even loading gvfs to avoid accidental confusion */
|
||||
- g_setenv ("GIO_USE_VFS", "local", TRUE);
|
||||
+ if (!g_setenv ("GIO_USE_VFS", "local", TRUE))
|
||||
+ g_warning ("Failed setenv %s", errno ? strerror (errno) : "(null)");
|
||||
+ g_warning ("Failed setenv %s", strerror (errno));
|
||||
|
||||
ibus_init ();
|
||||
|
||||
@ -2048,3 +2094,73 @@ index 5e5c15fa..152fc4e8 100644
|
||||
--
|
||||
2.28.0
|
||||
|
||||
From bc7811c6247b7bb8eba2f9f80c4f9f1510cd6b65 Mon Sep 17 00:00:00 2001
|
||||
From: fujiwarat <takao.fujiwara1@gmail.com>
|
||||
Date: Wed, 16 Jun 2021 20:39:35 +0900
|
||||
Subject: [PATCH] src/tests: Fix ibus-desktop-testing-runner to get gsettings result
|
||||
|
||||
gsettings null string is '' and the quote mark needs to be parsed.
|
||||
Also no-overview gsetting should be changed before run gnome-session.
|
||||
---
|
||||
src/tests/ibus-desktop-testing-runner.in | 18 +++++++++++-------
|
||||
1 file changed, 11 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/tests/ibus-desktop-testing-runner.in b/src/tests/ibus-desktop-testing-runner.in
|
||||
index 15b2369d..54b7e0d7 100755
|
||||
--- a/src/tests/ibus-desktop-testing-runner.in
|
||||
+++ b/src/tests/ibus-desktop-testing-runner.in
|
||||
@@ -215,9 +215,11 @@ run_dbus_daemon()
|
||||
|
||||
init_gnome()
|
||||
{
|
||||
+ # gsettings set command needs dconf-service with the same $DISPLAY
|
||||
+ pkill dconf-service
|
||||
# Disable Tour dialog to get focus
|
||||
V=`gsettings get org.gnome.shell welcome-dialog-last-shown-version`
|
||||
- if [ x"$V" = x ] ; then
|
||||
+ 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.
|
||||
@@ -237,7 +239,7 @@ init_gnome()
|
||||
V2=$?
|
||||
if [ $V2 -ne 0 ] ; then
|
||||
V3=`echo "$V" | sed -e 's/\[//' -e 's/\]//'`
|
||||
- if [ x"$V3" = x ] ; then
|
||||
+ if [ x"$V3" = x"''" ] ; then
|
||||
V4="['no-overview@fthx']"
|
||||
else
|
||||
V4="[$V3, 'no-overview@fthx']"
|
||||
@@ -248,6 +250,8 @@ init_gnome()
|
||||
|
||||
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
|
||||
@@ -256,15 +260,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
|
||||
- echo "$DESKTOP_COMMAND" | grep gnome-session > /dev/null
|
||||
- HAS_GNOME=$?
|
||||
- if [ $HAS_GNOME -eq 0 ] ; then
|
||||
- init_gnome
|
||||
- else
|
||||
+ if [ $HAS_GNOME -ne 0 ] ; then
|
||||
ibus-daemon --daemonize --verbose
|
||||
sleep 3
|
||||
fi
|
||||
--
|
||||
2.28.0
|
||||
|
||||
|
37
ibus-xx-desktop-testing-mutter.patch
Normal file
37
ibus-xx-desktop-testing-mutter.patch
Normal file
@ -0,0 +1,37 @@
|
||||
From d63da885f8f4e3764b8b572347b70a0cefadc335 Mon Sep 17 00:00:00 2001
|
||||
From: fujiwarat <takao.fujiwara1@gmail.com>
|
||||
Date: Wed, 16 Jun 2021 20:55:20 +0900
|
||||
Subject: [PATCH] src/tests: Change window manager to mutter for RHEL
|
||||
|
||||
---
|
||||
src/tests/ibus-desktop-testing-runner.in | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/tests/ibus-desktop-testing-runner.in b/src/tests/ibus-desktop-testing-runner.in
|
||||
index 54b7e0d7..211e0da5 100755
|
||||
--- a/src/tests/ibus-desktop-testing-runner.in
|
||||
+++ b/src/tests/ibus-desktop-testing-runner.in
|
||||
@@ -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,9 +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=mutter-with-dbus" \
|
||||
+" 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" \
|
||||
--
|
||||
2.28.0
|
||||
|
17
ibus.spec
17
ibus.spec
@ -38,7 +38,7 @@
|
||||
|
||||
Name: ibus
|
||||
Version: 1.5.24
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
Summary: Intelligent Input Bus for Linux OS
|
||||
License: LGPLv2+
|
||||
URL: https://github.com/ibus/%name/wiki
|
||||
@ -49,6 +49,10 @@ Source2: %{name}.conf.5
|
||||
Patch0: %{name}-HEAD.patch
|
||||
# Under testing #1349148 #1385349 #1350291 #1406699 #1432252 #1601577
|
||||
Patch1: %{name}-1385349-segv-bus-proxy.patch
|
||||
%if 0%{?fedora:0}%{?rhel:1}
|
||||
# Use mutter window manager in RHEL CI
|
||||
Patch2: %{name}-xx-desktop-testing-mutter.patch
|
||||
%endif
|
||||
|
||||
BuildRequires: gettext-devel
|
||||
BuildRequires: libtool
|
||||
@ -379,9 +383,16 @@ fi
|
||||
|
||||
%posttrans
|
||||
dconf update || :
|
||||
|
||||
%transfiletriggerin -- %{_datadir}/ibus/component
|
||||
[ -x %{_bindir}/ibus ] && \
|
||||
%{_bindir}/ibus write-cache --system &>/dev/null || :
|
||||
|
||||
%transfiletriggerpostun -- %{_datadir}/ibus/component
|
||||
[ -x %{_bindir}/ibus ] && \
|
||||
%{_bindir}/ibus write-cache --system &>/dev/null || :
|
||||
|
||||
|
||||
%ldconfig_scriptlets libs
|
||||
|
||||
%files -f %{name}10.lang
|
||||
@ -494,6 +505,10 @@ dconf update || :
|
||||
%{_datadir}/installed-tests/ibus
|
||||
|
||||
%changelog
|
||||
* Thu Jun 17 2021 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.24-7
|
||||
- Use transfiletriggerin and transfiletriggerpostun
|
||||
- Change mutter to no-overview gnome-shell in CI
|
||||
|
||||
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.5.24-6
|
||||
- Rebuilt for Python 3.10
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user