From c68416fc79be5aa041228a2215badf66ddccb996 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jan 2020 05:07:25 +0000 Subject: [PATCH 01/75] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ibus-anthy.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 4a9a94f..1917005 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -32,7 +32,7 @@ Name: ibus-anthy Version: 1.5.11 -Release: 5%{?dist} +Release: 6%{?dist} Summary: The Anthy engine for IBus input platform License: GPLv2+ URL: https://github.com/ibus/ibus/wiki @@ -205,6 +205,9 @@ touch --no-create %{_datadir}/icons/hicolor || : %{_datadir}/installed-tests/%{name} %changelog +* Wed Jan 29 2020 Fedora Release Engineering - 1.5.11-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Wed Dec 04 2019 Takao Fujiwara - 1.5.11-5 - Bug 1779129- Fix to install zipcode dict with anthy-unicode From 2bce534c0c2f648f76fee167189b6c4b7fda66ae Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Thu, 9 Jul 2020 22:57:02 +0900 Subject: [PATCH 02/75] Use pycotap instead of tappy in CI - Revise CI from ibus-typing-booster - Delete _python_bytecompile_extra --- ibus-anthy-HEAD.patch | 170 ++++++++++++++++++ ibus-anthy.spec | 13 +- .../ibus-desktop-testing-role/tasks/main.yml | 18 +- 3 files changed, 186 insertions(+), 15 deletions(-) diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch index 879456d..c15bb68 100644 --- a/ibus-anthy-HEAD.patch +++ b/ibus-anthy-HEAD.patch @@ -444,3 +444,173 @@ index 5fd3040..340e8ef 100644 -- 2.21.0 +From 390d6273096fe0e435a0d145e6a785f38372ba67 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Thu, 2 Jul 2020 14:47:39 +0900 +Subject: [PATCH] tests: Enable pycotap + +--- + tests/anthytest.py | 20 +++++++++++++++++--- + 1 file changed, 17 insertions(+), 3 deletions(-) + +diff --git a/tests/anthytest.py b/tests/anthytest.py +index 11d0e2b..03a7c31 100755 +--- a/tests/anthytest.py ++++ b/tests/anthytest.py +@@ -20,10 +20,23 @@ import sys + import subprocess + import unittest + ++TAP_MODULE_NONE, \ ++TAP_MODULE_TAPPY, \ ++TAP_MODULE_PYCOTAP = list(range(3)) ++ ++tap_module = TAP_MODULE_NONE ++ + try: + from tap import TAPTestRunner +-except ModuleNotFoundError as err: +- print('Ignore tap module: %s' % str(err)) ++ tap_module = TAP_MODULE_TAPPY ++ print('Load tappy') ++except ModuleNotFoundError: ++ try: ++ from pycotap import TAPTestRunner ++ tap_module = TAP_MODULE_PYCOTAP ++ print('Load pycotap') ++ except ModuleNotFoundError as err: ++ print('Ignore tap module: %s' % str(err)) + + PY3K = sys.version_info >= (3, 0) + DONE_EXIT = True +@@ -344,7 +357,8 @@ def main(): + if args.tap: + loader = unittest.TestLoader() + runner = TAPTestRunner() +- runner.set_stream(True) ++ if tap_module == TAP_MODULE_TAPPY: ++ runner.set_stream(True) + unittest.main(testRunner=runner, testLoader=loader) + else: + unittest.main() +-- +2.24.1 + +From f4f35c32942a649d67fb52730d7a5d4f2ef5058a Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Thu, 9 Jul 2020 20:20:57 +0900 +Subject: [PATCH] tests: Use unittest.fail and unittest.skipIf + +--- + tests/anthytest.py | 39 +++++++++++++++++++++++++++------------ + 1 file changed, 27 insertions(+), 12 deletions(-) + +diff --git a/tests/anthytest.py b/tests/anthytest.py +index 03a7c31..bff3078 100755 +--- a/tests/anthytest.py ++++ b/tests/anthytest.py +@@ -5,10 +5,12 @@ from __future__ import print_function + + from gi import require_version as gi_require_version + gi_require_version('GLib', '2.0') ++gi_require_version('Gdk', '3.0') + gi_require_version('Gio', '2.0') + gi_require_version('Gtk', '3.0') + gi_require_version('IBus', '1.0') + from gi.repository import GLib ++from gi.repository import Gdk + from gi.repository import Gio + from gi.repository import Gtk + from gi.repository import IBus +@@ -66,6 +68,7 @@ def printerr(sentence): + except IOError: + pass + ++@unittest.skipIf(Gdk.Display.open('') == None, 'Display cannot be open.') + class AnthyTest(unittest.TestCase): + global DONE_EXIT + ENGINE_PATH = '/com/redhat/IBus/engines/Anthy/Test/Engine' +@@ -84,7 +87,7 @@ class AnthyTest(unittest.TestCase): + def register_ibus_engine(self): + self.__bus = IBus.Bus() + if not self.__bus.is_connected(): +- error('ibus-daemon is not running') ++ self.fail('ibus-daemon is not running') + return False; + self.__bus.get_connection().signal_subscribe('org.freedesktop.DBus', + 'org.freedesktop.DBus', +@@ -130,12 +133,24 @@ class AnthyTest(unittest.TestCase): + interface_name, signal_name, parameters, + user_data): + if signal_name == 'NameOwnerChanged': +- import engine ++ try: ++ import engine ++ except ModuleNotFoundError as e: ++ with self.subTest(i = 'name-owner-changed'): ++ self.fail('NG: Not installed ibus-anthy %s' % str(e)) ++ Gtk.main_quit() ++ return + engine.Engine.CONFIG_RELOADED() + + def __create_engine_cb(self, factory, engine_name): + if engine_name == 'testanthy': +- import engine ++ try: ++ import engine ++ except ModuleNotFoundError as e: ++ with self.subTest(i = 'create-engine'): ++ self.fail('NG: Not installed ibus-anthy %s' % str(e)) ++ Gtk.main_quit() ++ return + self.__id += 1 + self.__engine = engine.Engine(self.__bus, '%s/%d' % (self.ENGINE_PATH, self.__id)) + self.__engine.connect('focus-in', self.__engine_focus_in) +@@ -178,7 +193,8 @@ class AnthyTest(unittest.TestCase): + + def __set_engine_cb(self, object, res): + if not self.__bus.set_global_engine_async_finish(res): +- warning('set engine failed: ' + error.message) ++ with self.subTest(i = self.__test_index): ++ self.fail('set engine failed: ' + error.message) + return + self.__enable_hiragana() + self.__main_test() +@@ -238,18 +254,14 @@ class AnthyTest(unittest.TestCase): + type = list(cases.keys())[0] + i = 0 + if type == 'string': +- if start == -1 and end == -1: +- printflush('test step: %s sequences: "%s"' \ +- % (tag, str(cases['string']))) ++ printflush('test step: %s sequences: "%s"' \ ++ % (tag, str(cases['string']))) + for a in cases['string']: + if start >= 0 and i < start: + i += 1 + continue + if end >= 0 and i >= end: + break; +- if start != -1 or end != -1: +- printflush('test step: %s sequences: "%s"' \ +- % (tag, str(cases['string']))) + self.__typing(ord(a), 0, 0) + i += 1 + if type == 'keys': +@@ -279,8 +291,11 @@ class AnthyTest(unittest.TestCase): + if cases['string'] == chars: + printflush('OK: %d %s' % (self.__test_index, chars)) + else: +- printflush('NG: %d %s %s' \ +- % (self.__test_index, str(cases['string']), chars)) ++ with self.subTest(i = self.__test_index): ++ self.fail('NG: %d %s %s' \ ++ % (self.__test_index, str(cases['string']), chars)) ++ if DONE_EXIT: ++ Gtk.main_quit() + self.__test_index += 1 + if self.__test_index == len(TestCases['tests']): + if DONE_EXIT: +-- +2.24.1 + diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 1917005..0290ecf 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -1,7 +1,4 @@ -# This package depends on automagic byte compilation -# https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2 -%global _python_bytecompile_extra 1 - +# https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_3 %global sub_version 1.0 %global require_ibus_version 1.5.3 %global have_default_layout 1 @@ -32,7 +29,7 @@ Name: ibus-anthy Version: 1.5.11 -Release: 6%{?dist} +Release: 7%{?dist} Summary: The Anthy engine for IBus input platform License: GPLv2+ URL: https://github.com/ibus/ibus/wiki @@ -107,6 +104,7 @@ for developers. %package tests Summary: Tests for the %{name} package Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: python3-pycotap %description tests The %{name}-tests package contains tests that can be used to verify @@ -205,6 +203,11 @@ touch --no-create %{_datadir}/icons/hicolor || : %{_datadir}/installed-tests/%{name} %changelog +* Thu Jul 09 2020 Takao Fujiwara - 1.5.11-7 +- Use pycotap instead of tappy in CI +- Revise CI from ibus-typing-booster +- Delete _python_bytecompile_extra + * Wed Jan 29 2020 Fedora Release Engineering - 1.5.11-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild diff --git a/tests/roles/ibus-desktop-testing-role/tasks/main.yml b/tests/roles/ibus-desktop-testing-role/tasks/main.yml index 5d1d8cc..5844d5a 100644 --- a/tests/roles/ibus-desktop-testing-role/tasks/main.yml +++ b/tests/roles/ibus-desktop-testing-role/tasks/main.yml @@ -53,15 +53,11 @@ args: chdir: gnome-desktop-testing - - name: Install tap.py - shell: | - TAP_DIR=`python -m site --user-site`/tap - if [ x"$TAP_DIR" != x -a ! -d "$TAP_DIR" ] ; then - echo "pip install tap.py --user" - pip install tap.py --user - fi - - name: Start IBus installed-tests testing harness + environment: + ANSIBLE: 1 + TMPDIR: '{{ remote_artifacts }}' + G_MESSAGES_DEBUG: 'all' block: - name: Execute IBus tests shell: | @@ -73,10 +69,10 @@ if [ -f $HOME/.anthy/last-record2_default.utf8 ] ; then \ rm $HOME/.anthy/last-record2_default.utf8 fi - env TMPDIR='{{ remote_artifacts }}' G_MESSAGES_DEBUG='all' \ - ibus-desktop-testing-runner \ + ibus-desktop-testing-runner \ --no-graphics \ --runner=gnome \ + --timeout=1200 \ --tests='{{ installed_test_name }}' \ --output='{{ remote_artifacts }}/{{ installed_test_name }}.log' \ --result='{{ remote_artifacts }}/test.log' \ @@ -92,10 +88,12 @@ log="{{ remote_artifacts }}/test.log" if [ ! -f $log ] ; then echo ERROR + exit 1 else FAIL=`grep "^FAIL: " {{ remote_artifacts }}/test.log | grep -v 'FAIL: 0$'` if [ x"$FAIL" != x ] ; then echo ERROR + exit 1 else echo PASS fi From 546a0fd4a4f4867a55c30bed8f1367b71e80b137 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 28 Jul 2020 01:32:14 +0000 Subject: [PATCH 03/75] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ibus-anthy.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 0290ecf..2f0c43e 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -29,7 +29,7 @@ Name: ibus-anthy Version: 1.5.11 -Release: 7%{?dist} +Release: 8%{?dist} Summary: The Anthy engine for IBus input platform License: GPLv2+ URL: https://github.com/ibus/ibus/wiki @@ -203,6 +203,9 @@ touch --no-create %{_datadir}/icons/hicolor || : %{_datadir}/installed-tests/%{name} %changelog +* Tue Jul 28 2020 Fedora Release Engineering - 1.5.11-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Thu Jul 09 2020 Takao Fujiwara - 1.5.11-7 - Use pycotap instead of tappy in CI - Revise CI from ibus-typing-booster From 392779f98bd14291f602e7ffc04694208db1e063 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 5 Jan 2021 06:14:57 +0000 Subject: [PATCH 04/75] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- ibus-anthy.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 2f0c43e..3eee8d4 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -49,6 +49,7 @@ BuildRequires: ibus BuildRequires: intltool BuildRequires: libtool BuildRequires: pkgconfig +BuildRequires: make %if %with_python3 BuildRequires: python3-devel BuildRequires: python3-gobject From a8e8d33fdc7d11b29b7bb24c4e2b5095bfdafc99 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 26 Jan 2021 14:06:35 +0000 Subject: [PATCH 05/75] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ibus-anthy.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 3eee8d4..23af2b6 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -29,7 +29,7 @@ Name: ibus-anthy Version: 1.5.11 -Release: 8%{?dist} +Release: 9%{?dist} Summary: The Anthy engine for IBus input platform License: GPLv2+ URL: https://github.com/ibus/ibus/wiki @@ -204,6 +204,9 @@ touch --no-create %{_datadir}/icons/hicolor || : %{_datadir}/installed-tests/%{name} %changelog +* Tue Jan 26 2021 Fedora Release Engineering - 1.5.11-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Tue Jul 28 2020 Fedora Release Engineering - 1.5.11-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From a2e3ccd8ee70e7c068774dbb698e17dcc6d9e010 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Wed, 10 Feb 2021 21:14:59 +0900 Subject: [PATCH 06/75] Replace kasumi with kausmi-unicode - Delete to require intltool - Delete to call gettext.bind_textdomain_codeset() --- ibus-anthy-HEAD.patch | 119 ++++++++++++++++++++++++++++++++++++++++++ ibus-anthy.spec | 75 ++++++-------------------- 2 files changed, 136 insertions(+), 58 deletions(-) diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch index c15bb68..e5246ca 100644 --- a/ibus-anthy-HEAD.patch +++ b/ibus-anthy-HEAD.patch @@ -614,3 +614,122 @@ index 03a7c31..bff3078 100755 -- 2.24.1 +From c744be610dff270f1c0f0367f809b9df95aeea2d Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Wed, 10 Feb 2021 20:50:11 +0900 +Subject: [PATCH] setup: Set ANTHY_PC in _config.py + +Forgot to update setup/Makefile besides engine/Makefile +Also delete deprecated gettext.bind_textdomain_codeset() +--- + setup/python3/Makefile.am | 3 ++- + setup/python3/main.py | 3 +-- + 2 files changed, 5 insertions(+), 4 deletions(-) + +diff --git a/setup/python3/Makefile.am b/setup/python3/Makefile.am +index 90b3aa1..1eb3747 100644 +--- a/setup/python3/Makefile.am ++++ b/setup/python3/Makefile.am +@@ -4,7 +4,7 @@ + # + # Copyright (c) 2007-2008 Peng Huang + # Copyright (c) 2009 Hideaki ABE +-# Copyright (c) 2010-2017 Takao Fujiwara ++# Copyright (c) 2010-2021 Takao Fujiwara + # Copyright (c) 2007-2017 Red Hat, Inc. + # + # This program is free software; you can redistribute it and/or modify +@@ -86,6 +86,7 @@ _config.py: _config.py.in + sed -e "s|\@pkgdatadir\@|$(pkgdatadir)|g" \ + -e "s|\@libexecdir\@|$(libexecdir)|g" \ + -e "s|\@datadir\@|$(datadir)|g" \ ++ -e "s|\@ANTHY_PC\@|$(ANTHY_PC)|g" \ + -e "s|\@LAYOUT\@|$(LAYOUT)|g" \ + -e "s|\@SYMBOL_CHAR_INT\@|$(SYMBOL_CHAR_INT)|g" \ + -e "s|\@ICON_PREFERENCE\@|$(ICON_PREFERENCE)|g" \ +diff --git a/setup/python3/main.py b/setup/python3/main.py +index 340e8ef..7e16093 100644 +--- a/setup/python3/main.py ++++ b/setup/python3/main.py +@@ -4,7 +4,7 @@ + # + # Copyright (c) 2007-2008 Peng Huang + # Copyright (c) 2009 Hideaki ABE +-# Copyright (c) 2010-2019 Takao Fujiwara ++# Copyright (c) 2010-2021 Takao Fujiwara + # Copyright (c) 2007-2019 Red Hat, Inc. + # + # This program is free software; you can redistribute it and/or modify +@@ -76,7 +76,6 @@ class AnthySetup(object): + except AttributeError: + pass + gettext.bindtextdomain(DOMAINNAME, config.LOCALEDIR) +- gettext.bind_textdomain_codeset(DOMAINNAME, 'UTF-8') + + self.__prefs = AnthyPrefs() + +-- +2.28.0 + +From 00bab0ac26dfcd635f559b68ef76cc662a51f35b Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Wed, 10 Feb 2021 20:52:30 +0900 +Subject: [PATCH] data: Enable to configure kasumi-unicode in gschema + +kasumi-unicode can be generated from kasumi source codes +with anthy-unicode but not anthy. +kasumi-unicode can save the dicts in XDG config dir but not +$HOME/.anthy + +% ./configure --with-kasumi-exec=/usr/bin/kasumi-unicode +--- + data/Makefile.am | 4 +++- + data/org.freedesktop.ibus.engine.anthy.gschema.xml.in | 4 ++-- + 2 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/data/Makefile.am b/data/Makefile.am +index da86209..5e45c39 100644 +--- a/data/Makefile.am ++++ b/data/Makefile.am +@@ -2,7 +2,7 @@ + # + # ibus-anthy - The Anthy engine for IBus + # +-# Copyright (c) 2010-2018 Takao Fujiwara ++# Copyright (c) 2010-2021 Takao Fujiwara + # Copyright (c) 2010-2018 Red Hat, Inc. + # + # This program is free software; you can redistribute it and/or modify +@@ -49,8 +49,10 @@ $(metainfo_DATA): $(metainfo_in_files) Makefile + $(AM_V_GEN)$(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@ + + $(schemas_DATA): $(schemas_in_files) ++ KASUMI_EXEC_BASENAME=`basename $(KASUMI_EXEC_FILE)`; \ + $(SED) -e "s|\@ANTHY_ZIPCODE_FILE\@|$(ANTHY_ZIPCODE_FILE)|g" \ + -e "s|\@KASUMI_EXEC_FILE\@|$(KASUMI_EXEC_FILE)|g" \ ++ -e "s|\@KASUMI_EXEC_BASENAME\@|$$KASUMI_EXEC_BASENAME|g" \ + -e "s|\@KASUMI_ICON_FILE\@|$(KASUMI_ICON_FILE)|g" \ + -e "s|\@ON_OFF_KEYS\@|$(ON_OFF_KEYS)|g" \ + -e "s|\@pkgdatadir\@|$(pkgdatadir)|g" \ +diff --git a/data/org.freedesktop.ibus.engine.anthy.gschema.xml.in b/data/org.freedesktop.ibus.engine.anthy.gschema.xml.in +index 3b68b4b..773be09 100644 +--- a/data/org.freedesktop.ibus.engine.anthy.gschema.xml.in ++++ b/data/org.freedesktop.ibus.engine.anthy.gschema.xml.in +@@ -108,12 +108,12 @@ + + + +- ['@KASUMI_EXEC_FILE@', 'kasumi'] ++ ['@KASUMI_EXEC_FILE@', '@KASUMI_EXEC_BASENAME@'] + Dictionary Administration Command + + + +- ['@KASUMI_EXEC_FILE@', 'kasumi', '-a'] ++ ['@KASUMI_EXEC_FILE@', '@KASUMI_EXEC_BASENAME@', '-a'] + Add Word Command + + +-- +2.28.0 + diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 23af2b6..0ce8199 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -3,23 +3,12 @@ %global require_ibus_version 1.5.3 %global have_default_layout 1 %global have_bridge_hotkey 1 - -%if (0%{?fedora} > 19 || 0%{?rhel} > 7) %global with_python3 1 -%else -%global with_python3 0 -%endif -%if (0%{?fedora} > 22 || 0%{?rhel} > 7) -%global with_metainfo 1 +%if (0%{?fedora} > 33 || 0%{?rhel} > 8) +%bcond_without kasumi_unicode %else -%global with_metainfo 0 -%endif - -%if (0%{?fedora} > 27 || 0%{?rhel} > 7) -%global with_gtk_script 0 -%else -%global with_gtk_script 1 +%bcond_with kasumi_unicode %endif %if %with_python3 @@ -29,7 +18,7 @@ Name: ibus-anthy Version: 1.5.11 -Release: 9%{?dist} +Release: 10%{?dist} Summary: The Anthy engine for IBus input platform License: GPLv2+ URL: https://github.com/ibus/ibus/wiki @@ -46,24 +35,17 @@ BuildRequires: git BuildRequires: glib2-devel BuildRequires: gobject-introspection-devel BuildRequires: ibus -BuildRequires: intltool BuildRequires: libtool BuildRequires: pkgconfig -BuildRequires: make -%if %with_python3 BuildRequires: python3-devel BuildRequires: python3-gobject -%else -BuildRequires: python2-devel -% if (0%{?fedora} && 0%{?fedora} <= 27) || (0%{?rhel} && 0%{?rhel} <= 7) -BuildRequires: pygobject3-base -% else -BuildRequires: python2-gobject-base -% endif -%endif Requires: ibus >= %{require_ibus_version} +%if %{with kasumi_unicode} +Requires: kasumi-unicode +%else Requires: kasumi +%endif Requires: anthy-unicode Requires: %{name}-python = %{version}-%{release} @@ -76,18 +58,8 @@ Summary: Anthy Python files for IBus BuildArch: noarch Requires: %{name} = %{version}-%{release} Requires: gtk3 -%if %with_python3 Requires: python3-cairo Requires: python3-gobject -%else -% if (0%{?fedora} && 0%{?fedora} <= 27) || (0%{?rhel} && 0%{?rhel} <= 7) -Requires: pycairo -Requires: pygobject3 -% else -Requires: python2-cairo -Requires: python2-gobject -% endif -%endif %description python This package contains the Anthy Python files for IBus @@ -125,10 +97,11 @@ autoreconf -f -i -v %if %have_bridge_hotkey --with-hotkeys \ %endif - --with-on-off-keys="'Zenkaku_Hankaku', 'Ctrl+space', 'Ctrl+J'" \ -%if %with_python3 - --with-python=python3 \ +%if %{with kasumi_unicode} + --with-kasumi-exec=/usr/bin/kasumi-unicode \ %endif + --with-on-off-keys="'Zenkaku_Hankaku', 'Ctrl+space', 'Ctrl+J'" \ + --with-python=python3 \ --enable-installed-tests \ --disable-static # make -C po update-gmo @@ -138,9 +111,6 @@ make %{?_smp_mflags} make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p' rm -f $RPM_BUILD_ROOT%{_libdir}/libanthygobject-%{sub_version}.la -%if ! %with_metainfo -rm $RPM_BUILD_ROOT%{_datadir}/metainfo/*.metainfo.xml -%endif %find_lang %{name} @@ -150,25 +120,11 @@ desktop-file-validate \ %post /sbin/ldconfig -%if %with_gtk_script -glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || : -# recreate icon cache -touch --no-create %{_datadir}/icons/hicolor || : -[ -x %{_bindir}/gtk-update-icon-cache ] && \ - %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : -%endif [ -x %{_bindir}/ibus ] && \ %{_bindir}/ibus write-cache --system &>/dev/null || : %postun /sbin/ldconfig -%if %with_gtk_script -glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || : -# recreate icon cache -touch --no-create %{_datadir}/icons/hicolor || : -[ -x %{_bindir}/gtk-update-icon-cache ] && \ - %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : -%endif [ -x %{_bindir}/ibus ] && \ %{_bindir}/ibus write-cache --system &>/dev/null || : @@ -184,9 +140,7 @@ touch --no-create %{_datadir}/icons/hicolor || : %files python %{_libexecdir}/ibus-*-anthy -%if %with_metainfo %{_datadir}/metainfo/*.metainfo.xml -%endif %{_datadir}/applications/ibus-setup-anthy.desktop %{_datadir}/ibus-anthy/engine %{_datadir}/ibus-anthy/setup @@ -204,6 +158,11 @@ touch --no-create %{_datadir}/icons/hicolor || : %{_datadir}/installed-tests/%{name} %changelog +* Wed Feb 10 2021 Takao Fujiwara - 1.5.11-10 +- Replace kasumi with kausmi-unicode +- Delete to require intltool +- Delete to call gettext.bind_textdomain_codeset() + * Tue Jan 26 2021 Fedora Release Engineering - 1.5.11-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From a2b39e9ca7fab050e1277e5ed55e41114457d982 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Mon, 22 Feb 2021 10:51:45 +0900 Subject: [PATCH 07/75] Delete upstream patches --- ibus-anthy-HEAD.patch | 735 ------------------------------------------ 1 file changed, 735 deletions(-) delete mode 100644 ibus-anthy-HEAD.patch diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch deleted file mode 100644 index e5246ca..0000000 --- a/ibus-anthy-HEAD.patch +++ /dev/null @@ -1,735 +0,0 @@ -From 5a9e4858f1a2b6cad02ef1d272fc5bed959ec0bf Mon Sep 17 00:00:00 2001 -From: fujiwarat -Date: Wed, 16 Oct 2019 17:58:55 +0900 -Subject: [PATCH] Integrate anthy automation tests to - ibus-desktop-testing-runner - -The test cases can be run with ibus-desktop-testing-runner: -% ibus-desktop-testing-runner \ - --no-graphics \ - --runner=gnome \ - --tests='ibus-anthy' \ - --output='./ibus-anthy.log' \ - --result='./test.log' -ibus-desktop-testing-runner requires gnome-desktop-testing-runner -in case --runner option is given. ---- - configure.ac | 14 +++++ - tests/Makefile.am | 46 +++++++++++++-- - tests/anthycases.py | 0 - tests/anthytest.py | 135 +++++++++++++++++++++++++++----------------- - tests/meta.test.in | 4 ++ - 5 files changed, 142 insertions(+), 57 deletions(-) - mode change 100644 => 100755 tests/anthycases.py - mode change 100644 => 100755 tests/anthytest.py - create mode 100644 tests/meta.test.in - -diff --git a/configure.ac b/configure.ac -index 06c4521..64afcc6 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -398,6 +398,20 @@ LAYOUT_XML="${LAYOUT}" - AC_SUBST(LAYOUT) - AC_SUBST(LAYOUT_XML) - -+dnl --enable-installed-tests -+AC_ARG_ENABLE(installed-tests, -+ AS_HELP_STRING([--enable-installed-tests], -+ [Enable to installed tests]), -+ [enable_installed_tests=$enableval], -+ [enable_installed_tests=no] -+) -+AM_CONDITIONAL([ENABLE_INSTALLED_TESTS], -+ [test x"$enable_installed_tests" = x"yes"]) -+if test x"$enable_installed_tests" = x"no"; then -+ enable_installed_tests="no (disabled, use --enable-installed-tests to enable)" -+fi -+ -+ - dnl libtool versioning - dnl - dnl If LT_VERSION_INFO="lt_current:lt_revision:lt_age", libibus is -diff --git a/tests/Makefile.am b/tests/Makefile.am -index b2d35d6..d891ff2 100644 ---- a/tests/Makefile.am -+++ b/tests/Makefile.am -@@ -19,12 +19,48 @@ - # with this program; if not, write to the Free Software Foundation, Inc., - # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -+ -+CLEANFILES = -+ - check: -+ @TAP_DIR=`python -m site --user-site`/tap; \ -+ if test x"$$TAP_DIR" != x -a ! -d "$$TAP_DIR" ; then \ -+ echo "pip install tap.py --user"; \ -+ pip install tap.py --user; \ -+ fi; \ - bash -x $(srcdir)/test-build.sh --builddir=$(builddir) --srcdir=$(srcdir) - -+if ENABLE_INSTALLED_TESTS -+test_execsdir = $(libexecdir)/installed-tests/ibus-anthy -+test_execs = anthytest -+test_execs_SCRIPTS = \ -+ anthycases.py \ -+ anthytest.py \ -+ $(NULL) -+ -+test_metas_in = meta.test.in -+test_metas = $(addsuffix .test, $(test_execs)) -+test_sources_DATA = \ -+ $(test_metas) \ -+ $(NULL) -+test_sourcesdir = $(datadir)/installed-tests/ibus-anthy -+ -+CLEANFILES += \ -+ $(test_metas) \ -+ $(NULL) -+endif -+ -+$(test_metas): $(test_metas_in) -+ f=`echo $@ | sed -e 's/\.test//'`; \ -+ TEST_EXEC=$(test_execsdir)/$${f}.py; \ -+ sed -e "s|@TEST_EXEC[@]|$$TEST_EXEC|g" $(test_metas_in) > $@.tmp; \ -+ mv $@.tmp $@; \ -+ $(NULL) -+ - EXTRA_DIST = \ -- anthycases.py \ -- anthytest.py \ -- test-build.sh \ -- test-console.sh \ -- $(NULL) -+ anthycases.py \ -+ anthytest.py \ -+ meta.test.in \ -+ test-build.sh \ -+ test-console.sh \ -+ $(NULL) -diff --git a/tests/anthycases.py b/tests/anthycases.py -old mode 100644 -new mode 100755 -diff --git a/tests/anthytest.py b/tests/anthytest.py -old mode 100644 -new mode 100755 -index 377576c..11d0e2b ---- a/tests/anthytest.py -+++ b/tests/anthytest.py -@@ -5,19 +5,28 @@ from __future__ import print_function - - from gi import require_version as gi_require_version - gi_require_version('GLib', '2.0') -+gi_require_version('Gio', '2.0') - gi_require_version('Gtk', '3.0') - gi_require_version('IBus', '1.0') - from gi.repository import GLib -+from gi.repository import Gio - from gi.repository import Gtk - from gi.repository import IBus - -+import argparse - import getopt - import os - import sys - import subprocess -+import unittest -+ -+try: -+ from tap import TAPTestRunner -+except ModuleNotFoundError as err: -+ print('Ignore tap module: %s' % str(err)) - - PY3K = sys.version_info >= (3, 0) --DONE_EXIT = False -+DONE_EXIT = True - - if 'IBUS_ANTHY_ENGINE_PATH' in os.environ: - engine_path = os.environ['IBUS_ANTHY_ENGINE_PATH'] -@@ -31,11 +40,28 @@ sys.path.append('/usr/share/ibus-anthy/engine') - - from anthycases import TestCases - --class AnthyTest: -+# Need to flush the output against Gtk.main() -+def printflush(sentence): -+ try: -+ print(sentence, flush=True) -+ except IOError: -+ pass -+ -+def printerr(sentence): -+ try: -+ print(sentence, flush=True, file=sys.stderr) -+ except IOError: -+ pass -+ -+class AnthyTest(unittest.TestCase): - global DONE_EXIT - ENGINE_PATH = '/com/redhat/IBus/engines/Anthy/Test/Engine' -- def __init__(self): -+ -+ @classmethod -+ def setUpClass(cls): - IBus.init() -+ -+ def setUp(self): - self.__id = 0 - self.__rerun = False - self.__test_index = 0 -@@ -141,7 +167,6 @@ class AnthyTest: - if not self.__bus.set_global_engine_async_finish(res): - warning('set engine failed: ' + error.message) - return -- print('enabled engine') - self.__enable_hiragana() - self.__main_test() - -@@ -173,28 +198,15 @@ class AnthyTest: - self.__run_cases('commit') - - def __enable_hiragana(self): -- commands = ['gsettings', 'get', -- 'org.freedesktop.ibus.engine.anthy.common', -- 'input-mode' -- ] -- if PY3K: -- py3result = subprocess.run(commands, stdout=subprocess.PIPE) -- try: -- result = int(py3result.stdout) -- except ValueError: -- # No user data -- result = 0 -- else: -- py2result = subprocess.check_output(commands) -- result = py2result -- if result == '': -- result = 0 -+ settings = Gio.Settings( -+ schema = "org.freedesktop.ibus.engine.anthy.common"); -+ result = settings.get_int('input-mode') - if result != 0: -- print('Enable hiragana', result) -+ printflush('Enable hiragana %d' % result) - key = TestCases['init'] - self.__typing(key[0], key[1], key[2]) - else: -- print('Already hiragana') -+ printflush('Already hiragana') - - def __main_test(self): - self.__conversion_index = 0 -@@ -214,7 +226,8 @@ class AnthyTest: - i = 0 - if type == 'string': - if start == -1 and end == -1: -- print('test step:', tag, 'sequences: "' + cases['string'] + '"') -+ printflush('test step: %s sequences: "%s"' \ -+ % (tag, str(cases['string']))) - for a in cases['string']: - if start >= 0 and i < start: - i += 1 -@@ -222,12 +235,14 @@ class AnthyTest: - if end >= 0 and i >= end: - break; - if start != -1 or end != -1: -- print('test step:', tag, 'sequences: "' + cases['string'][i] + '"') -+ printflush('test step: %s sequences: "%s"' \ -+ % (tag, str(cases['string']))) - self.__typing(ord(a), 0, 0) - i += 1 - if type == 'keys': - if start == -1 and end == -1: -- print('test step:', tag, 'sequences:', cases['keys']) -+ printflush('test step: %s sequences: %s' \ -+ % (tag, str(cases['keys']))) - for key in cases['keys']: - if start >= 0 and i < start: - i += 1 -@@ -235,7 +250,8 @@ class AnthyTest: - if end >= 0 and i >= end: - break; - if start != -1 or end != -1: -- print('test step: %s sequences: [0x%X, 0x%X, 0x%X]' % (tag, key[0], key[1], key[2])) -+ printflush('test step: %s sequences: [0x%X, 0x%X, 0x%X]' \ -+ % (tag, key[0], key[1], key[2])) - self.__typing(key[0], key[1], key[2]) - i += 1 - -@@ -248,9 +264,10 @@ class AnthyTest: - tests = TestCases['tests'][self.__test_index] - cases = tests['result'] - if cases['string'] == chars: -- print("OK: ", chars) -+ printflush('OK: %d %s' % (self.__test_index, chars)) - else: -- print("NG: ", cases['string'], chars) -+ printflush('NG: %d %s %s' \ -+ % (self.__test_index, str(cases['string']), chars)) - self.__test_index += 1 - if self.__test_index == len(TestCases['tests']): - if DONE_EXIT: -@@ -259,9 +276,15 @@ class AnthyTest: - self.__entry.set_text('') - self.__main_test() - -- def run(self): -+ def main(self): - Gtk.main() - -+ def test_typing(self): -+ if not self.register_ibus_engine(): -+ sys.exit(-1) -+ self.create_window() -+ self.main() -+ - def print_help(out, v = 0): - print('-e, --exit Exit this program after test is done.', - file=out) -@@ -285,25 +308,30 @@ def get_userhome(): - return userhome - - def main(): -- shortopt = 'efh' -- longopt = ['exit', 'force', 'help'] - force_run = False -- try: -- opts, args = getopt.getopt(sys.argv[1:], shortopt, longopt) -- except getopt.GetoptError as err: -- print_help(sys.stderr, 1) -- -- for o, a in opts: -- if o in ('-e', '--exit'): -- global DONE_EXIT -- DONE_EXIT = True -- elif o in ('-f', '--force'): -- force_run = True -- elif o in ('-h', '--help'): -- print_help(sys.stderr) -- else: -- print('Unknown argument: %s' % o, file=sys.stderr) -- print_help(sys.stderr, 1) -+ parser = argparse.ArgumentParser() -+ parser.add_argument('-k', '--keep', action='store_true', -+ help='keep this GtkWindow after test is done') -+ parser.add_argument('-f', '--force', action='store_true', -+ help='run this program forcibly with .anthy') -+ parser.add_argument('-t', '--tap', action='store_true', -+ help='enable TAP') -+ parser.add_argument('-F', '--unittest-failfast', action='store_true', -+ help='stop on first fail or error in unittest') -+ parser.add_argument('-H', '--unittest-help', action='store_true', -+ help='show unittest help message and exit') -+ args, unittest_args = parser.parse_known_args() -+ sys.argv[1:] = unittest_args -+ if args.keep: -+ global DONE_EXIT -+ DONE_EXIT = False -+ if args.force: -+ force_run = True -+ if args.unittest_failfast: -+ sys.argv.append('-f') -+ if args.unittest_help: -+ sys.argv.append('-h') -+ unittest.main() - - for anthy_config in ['/.config/anthy', '/.anthy']: - anthy_user_dir = get_userhome() + anthy_config -@@ -312,11 +340,14 @@ def main(): - print('Please remove %s before the test' % anthy_last_file, - file=sys.stderr) - sys.exit(-1) -- EngineTest = AnthyTest() -- if not EngineTest.register_ibus_engine(): -- sys.exit(-1) -- EngineTest.create_window() -- EngineTest.run() -+ -+ if args.tap: -+ loader = unittest.TestLoader() -+ runner = TAPTestRunner() -+ runner.set_stream(True) -+ unittest.main(testRunner=runner, testLoader=loader) -+ else: -+ unittest.main() - - if __name__ == '__main__': - main() -diff --git a/tests/meta.test.in b/tests/meta.test.in -new file mode 100644 -index 0000000..ae2b299 ---- /dev/null -+++ b/tests/meta.test.in -@@ -0,0 +1,4 @@ -+[Test] -+Type=session -+Exec=@TEST_EXEC@ --tap -+Output=TAP --- -2.21.0 - -From a2e418003b3733c5792fbab62a2e364a343a6e49 Mon Sep 17 00:00:00 2001 -From: fujiwarat -Date: Wed, 4 Dec 2019 16:58:52 +0900 -Subject: [PATCH] configure: Fix to install zipcode dict with anthy-unicode - (#1779129) - ---- - configure.ac | 2 +- - setup/python2/main.py | 6 +++--- - setup/python3/main.py | 6 +++--- - 3 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 64afcc6..3fecd12 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -236,7 +236,7 @@ AC_ARG_WITH(anthy-zipcode, - [AC_HELP_STRING([--with-anthy-zipcode=FILE], - [file path of Anty zipcode.t])], - [ANTHY_ZIPCODE_FILE="$withval"], -- [ANTHY_ZIPCODE_FILE="$datadir/anthy/zipcode.t"]) -+ [ANTHY_ZIPCODE_FILE="$datadir/$ANTHY_PC/zipcode.t"]) - test "x$prefix" = xNONE && prefix=$ac_default_prefix - eval ANTHY_ZIPCODE_FILE=$ANTHY_ZIPCODE_FILE - eval ANTHY_ZIPCODE_FILE=$ANTHY_ZIPCODE_FILE -diff --git a/setup/python2/main.py b/setup/python2/main.py -index 1fb5a67..4e6b15b 100644 ---- a/setup/python2/main.py -+++ b/setup/python2/main.py -@@ -4,8 +4,8 @@ - # - # Copyright (c) 2007-2008 Peng Huang - # Copyright (c) 2009 Hideaki ABE --# Copyright (c) 2010-2017 Takao Fujiwara --# Copyright (c) 2007-2017 Red Hat, Inc. -+# Copyright (c) 2010-2019 Takao Fujiwara -+# Copyright (c) 2007-2019 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 -@@ -1460,7 +1460,7 @@ class AnthySetup(object): - Gtk.MessageType.ERROR) - return - if not path.exists(dict_file[0]): -- self.__run_message_dialog(_("Your file does not exist: ") + dict_file, -+ self.__run_message_dialog(_("Your file does not exist: ") + dict_file[0], - Gtk.MessageType.ERROR) - return - -diff --git a/setup/python3/main.py b/setup/python3/main.py -index 5fd3040..340e8ef 100644 ---- a/setup/python3/main.py -+++ b/setup/python3/main.py -@@ -4,8 +4,8 @@ - # - # Copyright (c) 2007-2008 Peng Huang - # Copyright (c) 2009 Hideaki ABE --# Copyright (c) 2010-2017 Takao Fujiwara --# Copyright (c) 2007-2017 Red Hat, Inc. -+# Copyright (c) 2010-2019 Takao Fujiwara -+# Copyright (c) 2007-2019 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 -@@ -1454,7 +1454,7 @@ class AnthySetup(object): - Gtk.MessageType.ERROR) - return - if not path.exists(dict_file[0]): -- self.__run_message_dialog(_("Your file does not exist: ") + dict_file, -+ self.__run_message_dialog(_("Your file does not exist: ") + dict_file[0], - Gtk.MessageType.ERROR) - return - --- -2.21.0 - -From 390d6273096fe0e435a0d145e6a785f38372ba67 Mon Sep 17 00:00:00 2001 -From: fujiwarat -Date: Thu, 2 Jul 2020 14:47:39 +0900 -Subject: [PATCH] tests: Enable pycotap - ---- - tests/anthytest.py | 20 +++++++++++++++++--- - 1 file changed, 17 insertions(+), 3 deletions(-) - -diff --git a/tests/anthytest.py b/tests/anthytest.py -index 11d0e2b..03a7c31 100755 ---- a/tests/anthytest.py -+++ b/tests/anthytest.py -@@ -20,10 +20,23 @@ import sys - import subprocess - import unittest - -+TAP_MODULE_NONE, \ -+TAP_MODULE_TAPPY, \ -+TAP_MODULE_PYCOTAP = list(range(3)) -+ -+tap_module = TAP_MODULE_NONE -+ - try: - from tap import TAPTestRunner --except ModuleNotFoundError as err: -- print('Ignore tap module: %s' % str(err)) -+ tap_module = TAP_MODULE_TAPPY -+ print('Load tappy') -+except ModuleNotFoundError: -+ try: -+ from pycotap import TAPTestRunner -+ tap_module = TAP_MODULE_PYCOTAP -+ print('Load pycotap') -+ except ModuleNotFoundError as err: -+ print('Ignore tap module: %s' % str(err)) - - PY3K = sys.version_info >= (3, 0) - DONE_EXIT = True -@@ -344,7 +357,8 @@ def main(): - if args.tap: - loader = unittest.TestLoader() - runner = TAPTestRunner() -- runner.set_stream(True) -+ if tap_module == TAP_MODULE_TAPPY: -+ runner.set_stream(True) - unittest.main(testRunner=runner, testLoader=loader) - else: - unittest.main() --- -2.24.1 - -From f4f35c32942a649d67fb52730d7a5d4f2ef5058a Mon Sep 17 00:00:00 2001 -From: fujiwarat -Date: Thu, 9 Jul 2020 20:20:57 +0900 -Subject: [PATCH] tests: Use unittest.fail and unittest.skipIf - ---- - tests/anthytest.py | 39 +++++++++++++++++++++++++++------------ - 1 file changed, 27 insertions(+), 12 deletions(-) - -diff --git a/tests/anthytest.py b/tests/anthytest.py -index 03a7c31..bff3078 100755 ---- a/tests/anthytest.py -+++ b/tests/anthytest.py -@@ -5,10 +5,12 @@ from __future__ import print_function - - from gi import require_version as gi_require_version - gi_require_version('GLib', '2.0') -+gi_require_version('Gdk', '3.0') - gi_require_version('Gio', '2.0') - gi_require_version('Gtk', '3.0') - gi_require_version('IBus', '1.0') - from gi.repository import GLib -+from gi.repository import Gdk - from gi.repository import Gio - from gi.repository import Gtk - from gi.repository import IBus -@@ -66,6 +68,7 @@ def printerr(sentence): - except IOError: - pass - -+@unittest.skipIf(Gdk.Display.open('') == None, 'Display cannot be open.') - class AnthyTest(unittest.TestCase): - global DONE_EXIT - ENGINE_PATH = '/com/redhat/IBus/engines/Anthy/Test/Engine' -@@ -84,7 +87,7 @@ class AnthyTest(unittest.TestCase): - def register_ibus_engine(self): - self.__bus = IBus.Bus() - if not self.__bus.is_connected(): -- error('ibus-daemon is not running') -+ self.fail('ibus-daemon is not running') - return False; - self.__bus.get_connection().signal_subscribe('org.freedesktop.DBus', - 'org.freedesktop.DBus', -@@ -130,12 +133,24 @@ class AnthyTest(unittest.TestCase): - interface_name, signal_name, parameters, - user_data): - if signal_name == 'NameOwnerChanged': -- import engine -+ try: -+ import engine -+ except ModuleNotFoundError as e: -+ with self.subTest(i = 'name-owner-changed'): -+ self.fail('NG: Not installed ibus-anthy %s' % str(e)) -+ Gtk.main_quit() -+ return - engine.Engine.CONFIG_RELOADED() - - def __create_engine_cb(self, factory, engine_name): - if engine_name == 'testanthy': -- import engine -+ try: -+ import engine -+ except ModuleNotFoundError as e: -+ with self.subTest(i = 'create-engine'): -+ self.fail('NG: Not installed ibus-anthy %s' % str(e)) -+ Gtk.main_quit() -+ return - self.__id += 1 - self.__engine = engine.Engine(self.__bus, '%s/%d' % (self.ENGINE_PATH, self.__id)) - self.__engine.connect('focus-in', self.__engine_focus_in) -@@ -178,7 +193,8 @@ class AnthyTest(unittest.TestCase): - - def __set_engine_cb(self, object, res): - if not self.__bus.set_global_engine_async_finish(res): -- warning('set engine failed: ' + error.message) -+ with self.subTest(i = self.__test_index): -+ self.fail('set engine failed: ' + error.message) - return - self.__enable_hiragana() - self.__main_test() -@@ -238,18 +254,14 @@ class AnthyTest(unittest.TestCase): - type = list(cases.keys())[0] - i = 0 - if type == 'string': -- if start == -1 and end == -1: -- printflush('test step: %s sequences: "%s"' \ -- % (tag, str(cases['string']))) -+ printflush('test step: %s sequences: "%s"' \ -+ % (tag, str(cases['string']))) - for a in cases['string']: - if start >= 0 and i < start: - i += 1 - continue - if end >= 0 and i >= end: - break; -- if start != -1 or end != -1: -- printflush('test step: %s sequences: "%s"' \ -- % (tag, str(cases['string']))) - self.__typing(ord(a), 0, 0) - i += 1 - if type == 'keys': -@@ -279,8 +291,11 @@ class AnthyTest(unittest.TestCase): - if cases['string'] == chars: - printflush('OK: %d %s' % (self.__test_index, chars)) - else: -- printflush('NG: %d %s %s' \ -- % (self.__test_index, str(cases['string']), chars)) -+ with self.subTest(i = self.__test_index): -+ self.fail('NG: %d %s %s' \ -+ % (self.__test_index, str(cases['string']), chars)) -+ if DONE_EXIT: -+ Gtk.main_quit() - self.__test_index += 1 - if self.__test_index == len(TestCases['tests']): - if DONE_EXIT: --- -2.24.1 - -From c744be610dff270f1c0f0367f809b9df95aeea2d Mon Sep 17 00:00:00 2001 -From: fujiwarat -Date: Wed, 10 Feb 2021 20:50:11 +0900 -Subject: [PATCH] setup: Set ANTHY_PC in _config.py - -Forgot to update setup/Makefile besides engine/Makefile -Also delete deprecated gettext.bind_textdomain_codeset() ---- - setup/python3/Makefile.am | 3 ++- - setup/python3/main.py | 3 +-- - 2 files changed, 5 insertions(+), 4 deletions(-) - -diff --git a/setup/python3/Makefile.am b/setup/python3/Makefile.am -index 90b3aa1..1eb3747 100644 ---- a/setup/python3/Makefile.am -+++ b/setup/python3/Makefile.am -@@ -4,7 +4,7 @@ - # - # Copyright (c) 2007-2008 Peng Huang - # Copyright (c) 2009 Hideaki ABE --# Copyright (c) 2010-2017 Takao Fujiwara -+# Copyright (c) 2010-2021 Takao Fujiwara - # Copyright (c) 2007-2017 Red Hat, Inc. - # - # This program is free software; you can redistribute it and/or modify -@@ -86,6 +86,7 @@ _config.py: _config.py.in - sed -e "s|\@pkgdatadir\@|$(pkgdatadir)|g" \ - -e "s|\@libexecdir\@|$(libexecdir)|g" \ - -e "s|\@datadir\@|$(datadir)|g" \ -+ -e "s|\@ANTHY_PC\@|$(ANTHY_PC)|g" \ - -e "s|\@LAYOUT\@|$(LAYOUT)|g" \ - -e "s|\@SYMBOL_CHAR_INT\@|$(SYMBOL_CHAR_INT)|g" \ - -e "s|\@ICON_PREFERENCE\@|$(ICON_PREFERENCE)|g" \ -diff --git a/setup/python3/main.py b/setup/python3/main.py -index 340e8ef..7e16093 100644 ---- a/setup/python3/main.py -+++ b/setup/python3/main.py -@@ -4,7 +4,7 @@ - # - # Copyright (c) 2007-2008 Peng Huang - # Copyright (c) 2009 Hideaki ABE --# Copyright (c) 2010-2019 Takao Fujiwara -+# Copyright (c) 2010-2021 Takao Fujiwara - # Copyright (c) 2007-2019 Red Hat, Inc. - # - # This program is free software; you can redistribute it and/or modify -@@ -76,7 +76,6 @@ class AnthySetup(object): - except AttributeError: - pass - gettext.bindtextdomain(DOMAINNAME, config.LOCALEDIR) -- gettext.bind_textdomain_codeset(DOMAINNAME, 'UTF-8') - - self.__prefs = AnthyPrefs() - --- -2.28.0 - -From 00bab0ac26dfcd635f559b68ef76cc662a51f35b Mon Sep 17 00:00:00 2001 -From: fujiwarat -Date: Wed, 10 Feb 2021 20:52:30 +0900 -Subject: [PATCH] data: Enable to configure kasumi-unicode in gschema - -kasumi-unicode can be generated from kasumi source codes -with anthy-unicode but not anthy. -kasumi-unicode can save the dicts in XDG config dir but not -$HOME/.anthy - -% ./configure --with-kasumi-exec=/usr/bin/kasumi-unicode ---- - data/Makefile.am | 4 +++- - data/org.freedesktop.ibus.engine.anthy.gschema.xml.in | 4 ++-- - 2 files changed, 5 insertions(+), 3 deletions(-) - -diff --git a/data/Makefile.am b/data/Makefile.am -index da86209..5e45c39 100644 ---- a/data/Makefile.am -+++ b/data/Makefile.am -@@ -2,7 +2,7 @@ - # - # ibus-anthy - The Anthy engine for IBus - # --# Copyright (c) 2010-2018 Takao Fujiwara -+# Copyright (c) 2010-2021 Takao Fujiwara - # Copyright (c) 2010-2018 Red Hat, Inc. - # - # This program is free software; you can redistribute it and/or modify -@@ -49,8 +49,10 @@ $(metainfo_DATA): $(metainfo_in_files) Makefile - $(AM_V_GEN)$(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@ - - $(schemas_DATA): $(schemas_in_files) -+ KASUMI_EXEC_BASENAME=`basename $(KASUMI_EXEC_FILE)`; \ - $(SED) -e "s|\@ANTHY_ZIPCODE_FILE\@|$(ANTHY_ZIPCODE_FILE)|g" \ - -e "s|\@KASUMI_EXEC_FILE\@|$(KASUMI_EXEC_FILE)|g" \ -+ -e "s|\@KASUMI_EXEC_BASENAME\@|$$KASUMI_EXEC_BASENAME|g" \ - -e "s|\@KASUMI_ICON_FILE\@|$(KASUMI_ICON_FILE)|g" \ - -e "s|\@ON_OFF_KEYS\@|$(ON_OFF_KEYS)|g" \ - -e "s|\@pkgdatadir\@|$(pkgdatadir)|g" \ -diff --git a/data/org.freedesktop.ibus.engine.anthy.gschema.xml.in b/data/org.freedesktop.ibus.engine.anthy.gschema.xml.in -index 3b68b4b..773be09 100644 ---- a/data/org.freedesktop.ibus.engine.anthy.gschema.xml.in -+++ b/data/org.freedesktop.ibus.engine.anthy.gschema.xml.in -@@ -108,12 +108,12 @@ - - - -- ['@KASUMI_EXEC_FILE@', 'kasumi'] -+ ['@KASUMI_EXEC_FILE@', '@KASUMI_EXEC_BASENAME@'] - Dictionary Administration Command - - - -- ['@KASUMI_EXEC_FILE@', 'kasumi', '-a'] -+ ['@KASUMI_EXEC_FILE@', '@KASUMI_EXEC_BASENAME@', '-a'] - Add Word Command - - --- -2.28.0 - From 3ae4d6f22d4d1f8afa5be9517de3df7f36d08df5 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Mon, 22 Feb 2021 13:35:00 +0900 Subject: [PATCH 08/75] Bump to 1.5.12 --- .gitignore | 1 + ibus-anthy-HEAD.patch | 0 ibus-anthy.spec | 8 +++++--- sources | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 ibus-anthy-HEAD.patch diff --git a/.gitignore b/.gitignore index b265bd5..00d1574 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ ibus-anthy.png /ibus-anthy-1.5.9.tar.gz /ibus-anthy-1.5.10.tar.gz /ibus-anthy-1.5.11.tar.gz +/ibus-anthy-1.5.12.tar.gz diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch new file mode 100644 index 0000000..e69de29 diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 0ce8199..aa1c357 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -17,8 +17,8 @@ %endif Name: ibus-anthy -Version: 1.5.11 -Release: 10%{?dist} +Version: 1.5.12 +Release: 1%{?dist} Summary: The Anthy engine for IBus input platform License: GPLv2+ URL: https://github.com/ibus/ibus/wiki @@ -26,7 +26,6 @@ Source0: https://github.com/ibus/ibus-anthy/releases/download/%{version}/ # Upstreamed patches. # Patch0: %%{name}-HEAD.patch -Patch0: %{name}-HEAD.patch BuildRequires: anthy-unicode-devel BuildRequires: desktop-file-utils @@ -158,6 +157,9 @@ desktop-file-validate \ %{_datadir}/installed-tests/%{name} %changelog +* Mon Feb 22 2021 Takao Fujiwara - 1.5.12-1 +- Bump to 1.5.12 + * Wed Feb 10 2021 Takao Fujiwara - 1.5.11-10 - Replace kasumi with kausmi-unicode - Delete to require intltool diff --git a/sources b/sources index 7f3b381..1c24df9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ibus-anthy-1.5.11.tar.gz) = 2ac85bf4ddba56e3f84c3732082b3b63a07175ea712aad2865de4f87b8c0967da303ee1edccbed0890095e8ddab10e58307a47b72ee11b51de3927fdb9e72418 +SHA512 (ibus-anthy-1.5.12.tar.gz) = 6950a2865e4753831f8918f4a5926571bc8304454b6368662ef56a6fb11a60f0675e3d589108ebfd38cb5d193f7b61053a10baa6dad23adad67b3b3fc58760e8 From 8cbcd7091b2bd64936fe93af32e847d6883fdf41 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Tue, 16 Mar 2021 22:31:46 +0900 Subject: [PATCH 09/75] Change default input mode to Hiragana --- ibus-anthy-1938129-default-hiragana.patch | 28 +++++++++++++++++++++++ ibus-anthy.spec | 6 ++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 ibus-anthy-1938129-default-hiragana.patch diff --git a/ibus-anthy-1938129-default-hiragana.patch b/ibus-anthy-1938129-default-hiragana.patch new file mode 100644 index 0000000..79f769a --- /dev/null +++ b/ibus-anthy-1938129-default-hiragana.patch @@ -0,0 +1,28 @@ +From e4ef13166118fe991f7590b093671f9361e9c1cc Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Tue, 16 Mar 2021 22:13:01 +0900 +Subject: [PATCH] data: Change default input mode to Hiragana (rhbz#1938129) + +GNOME desktop sets unnecessary JP keymap by default and a few newcomers +wish to use Hiragana mode directly. +This internal patch will be deleted if the default desktop would be changed. +--- + data/org.freedesktop.ibus.engine.anthy.gschema.xml.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/data/org.freedesktop.ibus.engine.anthy.gschema.xml.in b/data/org.freedesktop.ibus.engine.anthy.gschema.xml.in +index 773be09..cd5a13b 100644 +--- a/data/org.freedesktop.ibus.engine.anthy.gschema.xml.in ++++ b/data/org.freedesktop.ibus.engine.anthy.gschema.xml.in +@@ -3,7 +3,7 @@ + + +- 3 ++ 0 + Input Mode + + +-- +2.28.0 + diff --git a/ibus-anthy.spec b/ibus-anthy.spec index aa1c357..b9aff94 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -18,7 +18,7 @@ Name: ibus-anthy Version: 1.5.12 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Anthy engine for IBus input platform License: GPLv2+ URL: https://github.com/ibus/ibus/wiki @@ -26,6 +26,7 @@ Source0: https://github.com/ibus/ibus-anthy/releases/download/%{version}/ # Upstreamed patches. # Patch0: %%{name}-HEAD.patch +Patch1: %{name}-1938129-default-hiragana.patch BuildRequires: anthy-unicode-devel BuildRequires: desktop-file-utils @@ -157,6 +158,9 @@ desktop-file-validate \ %{_datadir}/installed-tests/%{name} %changelog +* Tue Mar 16 2021 Takao Fujiwara - 1.5.12-2 +- Change default input mode to Hiragana + * Mon Feb 22 2021 Takao Fujiwara - 1.5.12-1 - Bump to 1.5.12 From 84497af6b62678bb8c1a14224fd58446a2785423 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Sun, 21 Mar 2021 15:35:18 +0900 Subject: [PATCH 10/75] Output info to stderr instead of StringIO --- ibus-anthy-HEAD.patch | 137 ++++++++++++++++++ ibus-anthy.spec | 6 +- .../ibus-desktop-testing-role/tasks/main.yml | 18 ++- 3 files changed, 154 insertions(+), 7 deletions(-) diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch index e69de29..34b9127 100644 --- a/ibus-anthy-HEAD.patch +++ b/ibus-anthy-HEAD.patch @@ -0,0 +1,137 @@ +From 4d1f0b36c43780586f5d0c2622eb92d068ebe281 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Sun, 21 Mar 2021 15:25:41 +0900 +Subject: [PATCH] tests: Output info to stderr instead of StringIO + +--- + tests/anthytest.py | 51 ++++++++++++++++++++++++++++++---------------- + 1 file changed, 33 insertions(+), 18 deletions(-) + +diff --git a/tests/anthytest.py b/tests/anthytest.py +index bff3078..1d18d19 100755 +--- a/tests/anthytest.py ++++ b/tests/anthytest.py +@@ -28,17 +28,31 @@ TAP_MODULE_PYCOTAP = list(range(3)) + + tap_module = TAP_MODULE_NONE + ++# Need to flush the output against Gtk.main() ++def printflush(sentence): ++ try: ++ print(sentence, flush=True) ++ except IOError: ++ pass ++ ++def printerr(sentence): ++ try: ++ print(sentence, flush=True, file=sys.stderr) ++ except IOError: ++ pass ++ + try: + from tap import TAPTestRunner + tap_module = TAP_MODULE_TAPPY +- print('Load tappy') ++ printflush('## Load tappy') + except ModuleNotFoundError: + try: + from pycotap import TAPTestRunner ++ from pycotap import LogMode + tap_module = TAP_MODULE_PYCOTAP +- print('Load pycotap') ++ printflush('## Load pycotap') + except ModuleNotFoundError as err: +- print('Ignore tap module: %s' % str(err)) ++ printflush('## Ignore tap module: %s' % str(err)) + + PY3K = sys.version_info >= (3, 0) + DONE_EXIT = True +@@ -55,18 +69,6 @@ sys.path.append('/usr/share/ibus-anthy/engine') + + from anthycases import TestCases + +-# Need to flush the output against Gtk.main() +-def printflush(sentence): +- try: +- print(sentence, flush=True) +- except IOError: +- pass +- +-def printerr(sentence): +- try: +- print(sentence, flush=True, file=sys.stderr) +- except IOError: +- pass + + @unittest.skipIf(Gdk.Display.open('') == None, 'Display cannot be open.') + class AnthyTest(unittest.TestCase): +@@ -83,8 +85,10 @@ class AnthyTest(unittest.TestCase): + self.__test_index = 0 + self.__conversion_index = 0 + self.__commit_done = False ++ self.__engine = None + + def register_ibus_engine(self): ++ printflush('## Registering engine') + self.__bus = IBus.Bus() + if not self.__bus.is_connected(): + self.fail('ibus-daemon is not running') +@@ -144,6 +148,7 @@ class AnthyTest(unittest.TestCase): + + def __create_engine_cb(self, factory, engine_name): + if engine_name == 'testanthy': ++ printflush('## Creating engine') + try: + import engine + except ModuleNotFoundError as e: +@@ -176,14 +181,20 @@ class AnthyTest(unittest.TestCase): + window = Gtk.Window(type = Gtk.WindowType.TOPLEVEL) + self.__entry = entry = Gtk.Entry() + window.connect('destroy', Gtk.main_quit) ++ entry.connect('map', self.__entry_map_cb) + entry.connect('focus-in-event', self.__entry_focus_in_event_cb) + entry.connect('preedit-changed', self.__entry_preedit_changed_cb) + buffer = entry.get_buffer() + buffer.connect('inserted-text', self.__buffer_inserted_text_cb) + window.add(entry) + window.show_all() ++ printflush('## Build window') ++ ++ def __entry_map_cb(self, entry): ++ printflush('## Map window') + + def __entry_focus_in_event_cb(self, entry, event): ++ printflush('## Get focus') + if self.__test_index == len(TestCases['tests']): + if DONE_EXIT: + Gtk.main_quit() +@@ -231,11 +242,11 @@ class AnthyTest(unittest.TestCase): + schema = "org.freedesktop.ibus.engine.anthy.common"); + result = settings.get_int('input-mode') + if result != 0: +- printflush('Enable hiragana %d' % result) ++ printflush('## Enable hiragana %d' % result) + key = TestCases['init'] + self.__typing(key[0], key[1], key[2]) + else: +- printflush('Already hiragana') ++ printflush('## Already hiragana') + + def __main_test(self): + self.__conversion_index = 0 +@@ -371,7 +382,11 @@ def main(): + + if args.tap: + loader = unittest.TestLoader() +- runner = TAPTestRunner() ++ if tap_module == TAP_MODULE_PYCOTAP: ++ # Log should be in stderr instead of StringIO ++ runner = TAPTestRunner(test_output_log=LogMode.LogToError) ++ else: ++ runner = TAPTestRunner() + if tap_module == TAP_MODULE_TAPPY: + runner.set_stream(True) + unittest.main(testRunner=runner, testLoader=loader) +-- +2.28.0 + diff --git a/ibus-anthy.spec b/ibus-anthy.spec index b9aff94..d350e87 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -18,7 +18,7 @@ Name: ibus-anthy Version: 1.5.12 -Release: 2%{?dist} +Release: 3%{?dist} Summary: The Anthy engine for IBus input platform License: GPLv2+ URL: https://github.com/ibus/ibus/wiki @@ -76,6 +76,7 @@ for developers. %package tests Summary: Tests for the %{name} package +BuildRequires: python3-pycotap Requires: %{name}%{?_isa} = %{version}-%{release} Requires: python3-pycotap @@ -158,6 +159,9 @@ desktop-file-validate \ %{_datadir}/installed-tests/%{name} %changelog +* Sun Mar 21 2021 Takao Fujiwara - 1.5.12-3 +- Output info to stderr instead of StringIO + * Tue Mar 16 2021 Takao Fujiwara - 1.5.12-2 - Change default input mode to Hiragana diff --git a/tests/roles/ibus-desktop-testing-role/tasks/main.yml b/tests/roles/ibus-desktop-testing-role/tasks/main.yml index 5844d5a..44c70e2 100644 --- a/tests/roles/ibus-desktop-testing-role/tasks/main.yml +++ b/tests/roles/ibus-desktop-testing-role/tasks/main.yml @@ -80,7 +80,17 @@ if [ $? -eq 0 ]; then status="PASS: frame" fi - echo "${status} $TEST" >> {{ remote_artifacts }}/test.log + echo "${status}" >> {{ remote_artifacts }}/test.log + echo "#### {{ remote_artifacts }}/{{ installed_test_name }}.log" + if [ -f {{ remote_artifacts }}/{{ installed_test_name }}.log ] ; then + cat {{ remote_artifacts }}/{{ installed_test_name }}.log + fi + echo "#" + echo "#### {{ remote_artifacts }}/test.log" + if [ -f {{ remote_artifacts }}/test.log ] ; then + cat {{ remote_artifacts }}/test.log + fi + echo "#" - name: Check the results #shell: grep "^FAIL" {{ remote_artifacts }}/test.log @@ -88,18 +98,14 @@ log="{{ remote_artifacts }}/test.log" if [ ! -f $log ] ; then echo ERROR - exit 1 else FAIL=`grep "^FAIL: " {{ remote_artifacts }}/test.log | grep -v 'FAIL: 0$'` if [ x"$FAIL" != x ] ; then echo ERROR - exit 1 - else - echo PASS fi fi register: test_fails - #failed_when: False + failed_when: False - name: Set role result set_fact: From eb6aeefd5c62c302ff0fa626d829749a8ac21ee1 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Mon, 22 Mar 2021 10:03:44 +0900 Subject: [PATCH 11/75] Rebuild to get the latest ibus in CI Seems there is a time lag between koji build and CI in package versions --- ibus-anthy.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ibus-anthy.spec b/ibus-anthy.spec index d350e87..bc18d10 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -18,7 +18,7 @@ Name: ibus-anthy Version: 1.5.12 -Release: 3%{?dist} +Release: 4%{?dist} Summary: The Anthy engine for IBus input platform License: GPLv2+ URL: https://github.com/ibus/ibus/wiki @@ -26,6 +26,7 @@ Source0: https://github.com/ibus/ibus-anthy/releases/download/%{version}/ # Upstreamed patches. # Patch0: %%{name}-HEAD.patch +Patch0: %{name}-HEAD.patch Patch1: %{name}-1938129-default-hiragana.patch BuildRequires: anthy-unicode-devel @@ -159,7 +160,7 @@ desktop-file-validate \ %{_datadir}/installed-tests/%{name} %changelog -* Sun Mar 21 2021 Takao Fujiwara - 1.5.12-3 +* Sun Mar 21 2021 Takao Fujiwara - 1.5.12-4 - Output info to stderr instead of StringIO * Tue Mar 16 2021 Takao Fujiwara - 1.5.12-2 From 88c9137784aec032f3b6deaa9dc95157222946f8 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Tue, 20 Apr 2021 20:37:00 +0900 Subject: [PATCH 12/75] Delete postscripts --- ibus-anthy.spec | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/ibus-anthy.spec b/ibus-anthy.spec index bc18d10..27899eb 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -18,7 +18,7 @@ Name: ibus-anthy Version: 1.5.12 -Release: 4%{?dist} +Release: 5%{?dist} Summary: The Anthy engine for IBus input platform License: GPLv2+ URL: https://github.com/ibus/ibus/wiki @@ -120,16 +120,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libanthygobject-%{sub_version}.la desktop-file-validate \ $RPM_BUILD_ROOT%{_datadir}/applications/ibus-setup-anthy.desktop -%post -/sbin/ldconfig -[ -x %{_bindir}/ibus ] && \ - %{_bindir}/ibus write-cache --system &>/dev/null || : - -%postun -/sbin/ldconfig -[ -x %{_bindir}/ibus ] && \ - %{_bindir}/ibus write-cache --system &>/dev/null || : - %files -f %{name}.lang %doc AUTHORS COPYING README # dir {python2_sitearch}/ibus @@ -160,6 +150,9 @@ desktop-file-validate \ %{_datadir}/installed-tests/%{name} %changelog +* Tue Apr 20 2021 Takao Fujiwara - 1.5.12-5 +- Delete postscripts + * Sun Mar 21 2021 Takao Fujiwara - 1.5.12-4 - Output info to stderr instead of StringIO From ed33e17c361cb6b6b2fa6a0d138f844430042a47 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Wed, 21 Apr 2021 11:22:22 +0900 Subject: [PATCH 13/75] Move post to posttrans --- ibus-anthy.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 27899eb..6faf88b 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -18,7 +18,7 @@ Name: ibus-anthy Version: 1.5.12 -Release: 5%{?dist} +Release: 6%{?dist} Summary: The Anthy engine for IBus input platform License: GPLv2+ URL: https://github.com/ibus/ibus/wiki @@ -120,6 +120,11 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libanthygobject-%{sub_version}.la desktop-file-validate \ $RPM_BUILD_ROOT%{_datadir}/applications/ibus-setup-anthy.desktop +%posttrans +/sbin/ldconfig +[ -x %{_bindir}/ibus ] && \ + %{_bindir}/ibus write-cache --system &>/dev/null || : + %files -f %{name}.lang %doc AUTHORS COPYING README # dir {python2_sitearch}/ibus @@ -150,6 +155,9 @@ desktop-file-validate \ %{_datadir}/installed-tests/%{name} %changelog +* Wed Apr 21 2021 Takao Fujiwara - 1.5.12-6 +- Move post to posttrans + * Tue Apr 20 2021 Takao Fujiwara - 1.5.12-5 - Delete postscripts From d37061f27f9742e30ad5ea2b7b8601cf86a8fe36 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Wed, 21 Apr 2021 11:28:09 +0900 Subject: [PATCH 14/75] Resolves: #1948197 Move post to posttrans We'll migrate %posttrans to %transfiletriggerin after f34 GA --- ibus-anthy.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 6faf88b..5d65daa 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -156,7 +156,7 @@ desktop-file-validate \ %changelog * Wed Apr 21 2021 Takao Fujiwara - 1.5.12-6 -- Move post to posttrans +- Resolves: #1948197 Move post to posttrans * Tue Apr 20 2021 Takao Fujiwara - 1.5.12-5 - Delete postscripts From 51b4b380fa1f3f60c20deffc481f25bf8a50a3d5 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Tue, 27 Apr 2021 19:58:05 +0900 Subject: [PATCH 15/75] Move .desktop file from ibus-anthy-python to ibus-anthy - Fix covscan --- ibus-anthy-HEAD.patch | 205 ++++++++++++++++++++++++++++++++++++++++++ ibus-anthy.spec | 8 +- 2 files changed, 211 insertions(+), 2 deletions(-) diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch index 34b9127..778b813 100644 --- a/ibus-anthy-HEAD.patch +++ b/ibus-anthy-HEAD.patch @@ -135,3 +135,208 @@ index bff3078..1d18d19 100755 -- 2.28.0 +From 84f080278a7351a26df441429bd58e5931944c32 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Tue, 27 Apr 2021 19:56:07 +0900 +Subject: [PATCH] Fix covscan result + +- Fix double quote not to re-splitting elements +- Fix deprecated GObject private +- Fix section variable initialization +- Fix dlg variable condition assignment +--- + engine/python2/ibus-engine-anthy.in | 4 ++-- + engine/python3/ibus-engine-anthy.in | 4 ++-- + gir/anthygcontext.c | 4 ++-- + setup/python2/ibus-setup-anthy.in | 4 ++-- + setup/python2/main.py | 8 +++++--- + setup/python3/ibus-setup-anthy.in | 4 ++-- + setup/python3/main.py | 6 ++++-- + 7 files changed, 19 insertions(+), 15 deletions(-) + +diff --git a/engine/python2/ibus-engine-anthy.in b/engine/python2/ibus-engine-anthy.in +index f663165..07b99fe 100644 +--- a/engine/python2/ibus-engine-anthy.in ++++ b/engine/python2/ibus-engine-anthy.in +@@ -5,7 +5,7 @@ + # ibus-anthy - The Anthy engine for IBus + # + # Copyright (c) 2007-2008 Peng Huang +-# Copyright (c) 2010-2016 Takao Fujiwara ++# Copyright (c) 2010-2021 Takao Fujiwara + # Copyright (c) 2007-2016 Red Hat, Inc. + # + # This program is free software; you can redistribute it and/or modify +@@ -25,4 +25,4 @@ + export IBUS_PREFIX=@prefix@ + export IBUS_ANTHY_PKGDATADIR=@datarootdir@/@PACKAGE@ + export LIBEXECDIR=@libexecdir@ +-exec @ENV_IBUS_ENGINE@ @PYTHON@ @datarootdir@/@PACKAGE@/engine/main.py $@ ++exec @ENV_IBUS_ENGINE@ @PYTHON@ @datarootdir@/@PACKAGE@/engine/main.py "$@" +diff --git a/engine/python3/ibus-engine-anthy.in b/engine/python3/ibus-engine-anthy.in +index f663165..07b99fe 100644 +--- a/engine/python3/ibus-engine-anthy.in ++++ b/engine/python3/ibus-engine-anthy.in +@@ -5,7 +5,7 @@ + # ibus-anthy - The Anthy engine for IBus + # + # Copyright (c) 2007-2008 Peng Huang +-# Copyright (c) 2010-2016 Takao Fujiwara ++# Copyright (c) 2010-2021 Takao Fujiwara + # Copyright (c) 2007-2016 Red Hat, Inc. + # + # This program is free software; you can redistribute it and/or modify +@@ -25,4 +25,4 @@ + export IBUS_PREFIX=@prefix@ + export IBUS_ANTHY_PKGDATADIR=@datarootdir@/@PACKAGE@ + export LIBEXECDIR=@libexecdir@ +-exec @ENV_IBUS_ENGINE@ @PYTHON@ @datarootdir@/@PACKAGE@/engine/main.py $@ ++exec @ENV_IBUS_ENGINE@ @PYTHON@ @datarootdir@/@PACKAGE@/engine/main.py "$@" +diff --git a/gir/anthygcontext.c b/gir/anthygcontext.c +index b342579..7698d4d 100644 +--- a/gir/anthygcontext.c ++++ b/gir/anthygcontext.c +@@ -1,7 +1,7 @@ + /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ + /* vim:set et sts=4: */ + /* ibus-anthy - The Anthy engine for IBus +- * Copyright (c) 2012-2019 Takao Fujiwara ++ * Copyright (c) 2012-2021 Takao Fujiwara + * Copyright (c) 2012 Peng Huang + * Copyright (c) 2012-2013 Red Hat, Inc. + * +@@ -29,7 +29,7 @@ extern int anthy_do_set_personality (const char *id); + #include "anthygcontext.h" + + #define ANTHY_GCONTEXT_GET_PRIVATE(o) \ +- (G_TYPE_INSTANCE_GET_PRIVATE ((o), ANTHY_TYPE_GCONTEXT, AnthyGContextPrivate)) ++ ((AnthyGContextPrivate *)anthy_gcontext_get_instance_private (o)) + + struct _AnthyGContextPrivate { + anthy_context_t context; +diff --git a/setup/python2/ibus-setup-anthy.in b/setup/python2/ibus-setup-anthy.in +index b936d2c..81c9dfc 100644 +--- a/setup/python2/ibus-setup-anthy.in ++++ b/setup/python2/ibus-setup-anthy.in +@@ -4,7 +4,7 @@ + # ibus-tmpl - The Input Bus template project + # + # Copyright (c) 2007-2008 Peng Huang +-# Copyright (c) 2010-2016 Takao Fujiwara ++# Copyright (c) 2010-2021 Takao Fujiwara + # Copyright (c) 2007-2016 Red Hat, Inc. + # + # This program is free software; you can redistribute it and/or modify +@@ -22,4 +22,4 @@ + # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + export IBUS_LOCALEDIR=@localedir@ +-exec @PYTHON@ @prefix@/share/ibus-anthy/setup/main.py $@ ++exec @PYTHON@ @prefix@/share/ibus-anthy/setup/main.py "$@" +diff --git a/setup/python2/main.py b/setup/python2/main.py +index 4e6b15b..f870ee5 100644 +--- a/setup/python2/main.py ++++ b/setup/python2/main.py +@@ -4,7 +4,7 @@ + # + # Copyright (c) 2007-2008 Peng Huang + # Copyright (c) 2009 Hideaki ABE +-# Copyright (c) 2010-2019 Takao Fujiwara ++# Copyright (c) 2010-2021 Takao Fujiwara + # Copyright (c) 2007-2019 Red Hat, Inc. + # + # This program is free software; you can redistribute it and/or modify +@@ -1253,7 +1253,7 @@ class AnthySetup(object): + model_combobox = combobox.get_model() + method = model_combobox[id][1] + type = user_data +- section_base = None ++ section = None + key = input.get_text() + value = output.get_text() + left_text = left.get_text() +@@ -1308,7 +1308,7 @@ class AnthySetup(object): + l, i = tv.get_selection().get_selected() + type = l[i][0] + key = l[i][1] +- section_base = None ++ section = None + if type == 'romaji': + section = 'romaji-typing-rule' + elif type == 'kana': +@@ -1379,6 +1379,7 @@ class AnthySetup(object): + def on_btn_dict_add_clicked(self, widget): + file = None + id = None ++ dlg = None + + if Gtk.Buildable.get_name(widget) == 'dict:btn_add': + dlg = Gtk.FileChooserDialog(title=_("Open Dictionary File"), +@@ -1394,6 +1395,7 @@ class AnthySetup(object): + _("_OK"), Gtk.ResponseType.OK) + dlg.add_buttons(*buttons) + ++ assert(dlg != None), 'Button name is undefined.' + vbox = self.__builder.get_object('dict:add_extra_vbox') + if Gtk.Buildable.get_name(widget) == 'dict:btn_add': + # Need to init for the second time +diff --git a/setup/python3/ibus-setup-anthy.in b/setup/python3/ibus-setup-anthy.in +index b936d2c..81c9dfc 100644 +--- a/setup/python3/ibus-setup-anthy.in ++++ b/setup/python3/ibus-setup-anthy.in +@@ -4,7 +4,7 @@ + # ibus-tmpl - The Input Bus template project + # + # Copyright (c) 2007-2008 Peng Huang +-# Copyright (c) 2010-2016 Takao Fujiwara ++# Copyright (c) 2010-2021 Takao Fujiwara + # Copyright (c) 2007-2016 Red Hat, Inc. + # + # This program is free software; you can redistribute it and/or modify +@@ -22,4 +22,4 @@ + # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + export IBUS_LOCALEDIR=@localedir@ +-exec @PYTHON@ @prefix@/share/ibus-anthy/setup/main.py $@ ++exec @PYTHON@ @prefix@/share/ibus-anthy/setup/main.py "$@" +diff --git a/setup/python3/main.py b/setup/python3/main.py +index 7e16093..6641f7f 100644 +--- a/setup/python3/main.py ++++ b/setup/python3/main.py +@@ -1246,7 +1246,7 @@ class AnthySetup(object): + model_combobox = combobox.get_model() + method = model_combobox[id][1] + type = user_data +- section_base = None ++ section = None + key = input.get_text() + value = output.get_text() + left_text = left.get_text() +@@ -1301,7 +1301,7 @@ class AnthySetup(object): + l, i = tv.get_selection().get_selected() + type = l[i][0] + key = l[i][1] +- section_base = None ++ section = None + if type == 'romaji': + section = 'romaji-typing-rule' + elif type == 'kana': +@@ -1372,6 +1372,7 @@ class AnthySetup(object): + def on_btn_dict_add_clicked(self, widget): + file = None + id = None ++ dlg = None + + if Gtk.Buildable.get_name(widget) == 'dict:btn_add': + dlg = Gtk.FileChooserDialog(title=_("Open Dictionary File"), +@@ -1387,6 +1388,7 @@ class AnthySetup(object): + _("_OK"), Gtk.ResponseType.OK) + dlg.add_buttons(*buttons) + ++ assert (dlg != None), 'Button name is undefined.' + vbox = self.__builder.get_object('dict:add_extra_vbox') + if Gtk.Buildable.get_name(widget) == 'dict:btn_add': + # Need to init for the second time +-- +2.28.0 + diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 5d65daa..858346d 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -18,7 +18,7 @@ Name: ibus-anthy Version: 1.5.12 -Release: 6%{?dist} +Release: 7%{?dist} Summary: The Anthy engine for IBus input platform License: GPLv2+ URL: https://github.com/ibus/ibus/wiki @@ -132,13 +132,13 @@ desktop-file-validate \ %{_libdir}/girepository-1.0/Anthy*.typelib %{_datadir}/glib-2.0/schemas/org.freedesktop.ibus.engine.anthy.gschema.xml %dir %{_datadir}/ibus-anthy +%{_datadir}/applications/ibus-setup-anthy.desktop %{_datadir}/ibus-anthy/dicts %{_datadir}/icons/hicolor/scalable/apps/ibus-anthy.svg %files python %{_libexecdir}/ibus-*-anthy %{_datadir}/metainfo/*.metainfo.xml -%{_datadir}/applications/ibus-setup-anthy.desktop %{_datadir}/ibus-anthy/engine %{_datadir}/ibus-anthy/setup %{_datadir}/ibus/component/* @@ -155,6 +155,10 @@ desktop-file-validate \ %{_datadir}/installed-tests/%{name} %changelog +* Tue Apr 27 2021 Takao Fujiwara - 1.5.12-7 +- Move .desktop file from ibus-anthy-python to ibus-anthy +- Fix covscan + * Wed Apr 21 2021 Takao Fujiwara - 1.5.12-6 - Resolves: #1948197 Move post to posttrans From e3673a694138f4c4fb784821ecd55329e93cd2d7 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Thu, 17 Jun 2021 18:05:09 +0900 Subject: [PATCH 16/75] Delete postscript for ibus write-cache --- ibus-anthy.spec | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 858346d..0a6f519 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -18,7 +18,7 @@ Name: ibus-anthy Version: 1.5.12 -Release: 7%{?dist} +Release: 8%{?dist} Summary: The Anthy engine for IBus input platform License: GPLv2+ URL: https://github.com/ibus/ibus/wiki @@ -120,10 +120,8 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libanthygobject-%{sub_version}.la desktop-file-validate \ $RPM_BUILD_ROOT%{_datadir}/applications/ibus-setup-anthy.desktop -%posttrans -/sbin/ldconfig -[ -x %{_bindir}/ibus ] && \ - %{_bindir}/ibus write-cache --system &>/dev/null || : +%ldconfig_scriptlets libs + %files -f %{name}.lang %doc AUTHORS COPYING README @@ -155,6 +153,9 @@ desktop-file-validate \ %{_datadir}/installed-tests/%{name} %changelog +* Thu Jun 17 2021 Takao Fujiwara - 1.5.12-8 +- Delete postscript for ibus write-cache + * Tue Apr 27 2021 Takao Fujiwara - 1.5.12-7 - Move .desktop file from ibus-anthy-python to ibus-anthy - Fix covscan From 7c43d0721698109e777621b565e98b7356150c4f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 22 Jul 2021 08:18:16 +0000 Subject: [PATCH 17/75] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ibus-anthy.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 0a6f519..8c882eb 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -18,7 +18,7 @@ Name: ibus-anthy Version: 1.5.12 -Release: 8%{?dist} +Release: 9%{?dist} Summary: The Anthy engine for IBus input platform License: GPLv2+ URL: https://github.com/ibus/ibus/wiki @@ -153,6 +153,9 @@ desktop-file-validate \ %{_datadir}/installed-tests/%{name} %changelog +* Thu Jul 22 2021 Fedora Release Engineering - 1.5.12-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Thu Jun 17 2021 Takao Fujiwara - 1.5.12-8 - Delete postscript for ibus write-cache From d1b1f619f24302faba83ac42841b5a818eb2d42e Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Thu, 12 Aug 2021 19:05:47 +0900 Subject: [PATCH 18/75] Remove Ctrl+period in circle_kana_mode --- ibus-anthy-HEAD.patch | 33 +++++++++++++++++++++++++++++++++ ibus-anthy.spec | 5 ++++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch index 778b813..0b24991 100644 --- a/ibus-anthy-HEAD.patch +++ b/ibus-anthy-HEAD.patch @@ -340,3 +340,36 @@ index 7e16093..6641f7f 100644 -- 2.28.0 +From 39773ff8c30b4793a841c44b02ff92b52d2bdaeb Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Thu, 12 Aug 2021 18:44:51 +0900 +Subject: [PATCH] data/gschema: Remove Ctrl+period in circle_kana_mode (#23) + +Ctrl-period key is now Emoji typing on-off shortcut key in IBus core +to follow GNOME desktop. +--- + data/org.freedesktop.ibus.engine.anthy.gschema.xml.in | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/data/org.freedesktop.ibus.engine.anthy.gschema.xml.in b/data/org.freedesktop.ibus.engine.anthy.gschema.xml.in +index 773be09..75e42b3 100644 +--- a/data/org.freedesktop.ibus.engine.anthy.gschema.xml.in ++++ b/data/org.freedesktop.ibus.engine.anthy.gschema.xml.in +@@ -908,8 +908,13 @@ + 'circle_input_mode': <['Ctrl+comma', 'Ctrl+less']>, + +- 'circle_kana_mode': <['Ctrl+period', 'Ctrl+greater']>, ++ 'circle_kana_mode': <['Ctrl+greater']>, + + 'circle_typing_method': <['Alt+Romaji', 'Ctrl+slash']>, + 'circle_dict_method': <['Alt+Henkan']>, +-- +2.28.0 + diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 8c882eb..d395959 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -18,7 +18,7 @@ Name: ibus-anthy Version: 1.5.12 -Release: 9%{?dist} +Release: 10%{?dist} Summary: The Anthy engine for IBus input platform License: GPLv2+ URL: https://github.com/ibus/ibus/wiki @@ -153,6 +153,9 @@ desktop-file-validate \ %{_datadir}/installed-tests/%{name} %changelog +* Thu Aug 12 2021 Takao Fujiwara - 1.5.12-10 +- Remove Ctrl+period in circle_kana_mode + * Thu Jul 22 2021 Fedora Release Engineering - 1.5.12-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 83d527da6063d276c6e412ffcce2eec48c1bfd71 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Fri, 20 Aug 2021 18:06:44 +0900 Subject: [PATCH 19/75] Delete upstreamed patches --- ibus-anthy-HEAD.patch | 375 ------------------------------------------ 1 file changed, 375 deletions(-) delete mode 100644 ibus-anthy-HEAD.patch diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch deleted file mode 100644 index 0b24991..0000000 --- a/ibus-anthy-HEAD.patch +++ /dev/null @@ -1,375 +0,0 @@ -From 4d1f0b36c43780586f5d0c2622eb92d068ebe281 Mon Sep 17 00:00:00 2001 -From: fujiwarat -Date: Sun, 21 Mar 2021 15:25:41 +0900 -Subject: [PATCH] tests: Output info to stderr instead of StringIO - ---- - tests/anthytest.py | 51 ++++++++++++++++++++++++++++++---------------- - 1 file changed, 33 insertions(+), 18 deletions(-) - -diff --git a/tests/anthytest.py b/tests/anthytest.py -index bff3078..1d18d19 100755 ---- a/tests/anthytest.py -+++ b/tests/anthytest.py -@@ -28,17 +28,31 @@ TAP_MODULE_PYCOTAP = list(range(3)) - - tap_module = TAP_MODULE_NONE - -+# Need to flush the output against Gtk.main() -+def printflush(sentence): -+ try: -+ print(sentence, flush=True) -+ except IOError: -+ pass -+ -+def printerr(sentence): -+ try: -+ print(sentence, flush=True, file=sys.stderr) -+ except IOError: -+ pass -+ - try: - from tap import TAPTestRunner - tap_module = TAP_MODULE_TAPPY -- print('Load tappy') -+ printflush('## Load tappy') - except ModuleNotFoundError: - try: - from pycotap import TAPTestRunner -+ from pycotap import LogMode - tap_module = TAP_MODULE_PYCOTAP -- print('Load pycotap') -+ printflush('## Load pycotap') - except ModuleNotFoundError as err: -- print('Ignore tap module: %s' % str(err)) -+ printflush('## Ignore tap module: %s' % str(err)) - - PY3K = sys.version_info >= (3, 0) - DONE_EXIT = True -@@ -55,18 +69,6 @@ sys.path.append('/usr/share/ibus-anthy/engine') - - from anthycases import TestCases - --# Need to flush the output against Gtk.main() --def printflush(sentence): -- try: -- print(sentence, flush=True) -- except IOError: -- pass -- --def printerr(sentence): -- try: -- print(sentence, flush=True, file=sys.stderr) -- except IOError: -- pass - - @unittest.skipIf(Gdk.Display.open('') == None, 'Display cannot be open.') - class AnthyTest(unittest.TestCase): -@@ -83,8 +85,10 @@ class AnthyTest(unittest.TestCase): - self.__test_index = 0 - self.__conversion_index = 0 - self.__commit_done = False -+ self.__engine = None - - def register_ibus_engine(self): -+ printflush('## Registering engine') - self.__bus = IBus.Bus() - if not self.__bus.is_connected(): - self.fail('ibus-daemon is not running') -@@ -144,6 +148,7 @@ class AnthyTest(unittest.TestCase): - - def __create_engine_cb(self, factory, engine_name): - if engine_name == 'testanthy': -+ printflush('## Creating engine') - try: - import engine - except ModuleNotFoundError as e: -@@ -176,14 +181,20 @@ class AnthyTest(unittest.TestCase): - window = Gtk.Window(type = Gtk.WindowType.TOPLEVEL) - self.__entry = entry = Gtk.Entry() - window.connect('destroy', Gtk.main_quit) -+ entry.connect('map', self.__entry_map_cb) - entry.connect('focus-in-event', self.__entry_focus_in_event_cb) - entry.connect('preedit-changed', self.__entry_preedit_changed_cb) - buffer = entry.get_buffer() - buffer.connect('inserted-text', self.__buffer_inserted_text_cb) - window.add(entry) - window.show_all() -+ printflush('## Build window') -+ -+ def __entry_map_cb(self, entry): -+ printflush('## Map window') - - def __entry_focus_in_event_cb(self, entry, event): -+ printflush('## Get focus') - if self.__test_index == len(TestCases['tests']): - if DONE_EXIT: - Gtk.main_quit() -@@ -231,11 +242,11 @@ class AnthyTest(unittest.TestCase): - schema = "org.freedesktop.ibus.engine.anthy.common"); - result = settings.get_int('input-mode') - if result != 0: -- printflush('Enable hiragana %d' % result) -+ printflush('## Enable hiragana %d' % result) - key = TestCases['init'] - self.__typing(key[0], key[1], key[2]) - else: -- printflush('Already hiragana') -+ printflush('## Already hiragana') - - def __main_test(self): - self.__conversion_index = 0 -@@ -371,7 +382,11 @@ def main(): - - if args.tap: - loader = unittest.TestLoader() -- runner = TAPTestRunner() -+ if tap_module == TAP_MODULE_PYCOTAP: -+ # Log should be in stderr instead of StringIO -+ runner = TAPTestRunner(test_output_log=LogMode.LogToError) -+ else: -+ runner = TAPTestRunner() - if tap_module == TAP_MODULE_TAPPY: - runner.set_stream(True) - unittest.main(testRunner=runner, testLoader=loader) --- -2.28.0 - -From 84f080278a7351a26df441429bd58e5931944c32 Mon Sep 17 00:00:00 2001 -From: fujiwarat -Date: Tue, 27 Apr 2021 19:56:07 +0900 -Subject: [PATCH] Fix covscan result - -- Fix double quote not to re-splitting elements -- Fix deprecated GObject private -- Fix section variable initialization -- Fix dlg variable condition assignment ---- - engine/python2/ibus-engine-anthy.in | 4 ++-- - engine/python3/ibus-engine-anthy.in | 4 ++-- - gir/anthygcontext.c | 4 ++-- - setup/python2/ibus-setup-anthy.in | 4 ++-- - setup/python2/main.py | 8 +++++--- - setup/python3/ibus-setup-anthy.in | 4 ++-- - setup/python3/main.py | 6 ++++-- - 7 files changed, 19 insertions(+), 15 deletions(-) - -diff --git a/engine/python2/ibus-engine-anthy.in b/engine/python2/ibus-engine-anthy.in -index f663165..07b99fe 100644 ---- a/engine/python2/ibus-engine-anthy.in -+++ b/engine/python2/ibus-engine-anthy.in -@@ -5,7 +5,7 @@ - # ibus-anthy - The Anthy engine for IBus - # - # Copyright (c) 2007-2008 Peng Huang --# Copyright (c) 2010-2016 Takao Fujiwara -+# Copyright (c) 2010-2021 Takao Fujiwara - # Copyright (c) 2007-2016 Red Hat, Inc. - # - # This program is free software; you can redistribute it and/or modify -@@ -25,4 +25,4 @@ - export IBUS_PREFIX=@prefix@ - export IBUS_ANTHY_PKGDATADIR=@datarootdir@/@PACKAGE@ - export LIBEXECDIR=@libexecdir@ --exec @ENV_IBUS_ENGINE@ @PYTHON@ @datarootdir@/@PACKAGE@/engine/main.py $@ -+exec @ENV_IBUS_ENGINE@ @PYTHON@ @datarootdir@/@PACKAGE@/engine/main.py "$@" -diff --git a/engine/python3/ibus-engine-anthy.in b/engine/python3/ibus-engine-anthy.in -index f663165..07b99fe 100644 ---- a/engine/python3/ibus-engine-anthy.in -+++ b/engine/python3/ibus-engine-anthy.in -@@ -5,7 +5,7 @@ - # ibus-anthy - The Anthy engine for IBus - # - # Copyright (c) 2007-2008 Peng Huang --# Copyright (c) 2010-2016 Takao Fujiwara -+# Copyright (c) 2010-2021 Takao Fujiwara - # Copyright (c) 2007-2016 Red Hat, Inc. - # - # This program is free software; you can redistribute it and/or modify -@@ -25,4 +25,4 @@ - export IBUS_PREFIX=@prefix@ - export IBUS_ANTHY_PKGDATADIR=@datarootdir@/@PACKAGE@ - export LIBEXECDIR=@libexecdir@ --exec @ENV_IBUS_ENGINE@ @PYTHON@ @datarootdir@/@PACKAGE@/engine/main.py $@ -+exec @ENV_IBUS_ENGINE@ @PYTHON@ @datarootdir@/@PACKAGE@/engine/main.py "$@" -diff --git a/gir/anthygcontext.c b/gir/anthygcontext.c -index b342579..7698d4d 100644 ---- a/gir/anthygcontext.c -+++ b/gir/anthygcontext.c -@@ -1,7 +1,7 @@ - /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ - /* vim:set et sts=4: */ - /* ibus-anthy - The Anthy engine for IBus -- * Copyright (c) 2012-2019 Takao Fujiwara -+ * Copyright (c) 2012-2021 Takao Fujiwara - * Copyright (c) 2012 Peng Huang - * Copyright (c) 2012-2013 Red Hat, Inc. - * -@@ -29,7 +29,7 @@ extern int anthy_do_set_personality (const char *id); - #include "anthygcontext.h" - - #define ANTHY_GCONTEXT_GET_PRIVATE(o) \ -- (G_TYPE_INSTANCE_GET_PRIVATE ((o), ANTHY_TYPE_GCONTEXT, AnthyGContextPrivate)) -+ ((AnthyGContextPrivate *)anthy_gcontext_get_instance_private (o)) - - struct _AnthyGContextPrivate { - anthy_context_t context; -diff --git a/setup/python2/ibus-setup-anthy.in b/setup/python2/ibus-setup-anthy.in -index b936d2c..81c9dfc 100644 ---- a/setup/python2/ibus-setup-anthy.in -+++ b/setup/python2/ibus-setup-anthy.in -@@ -4,7 +4,7 @@ - # ibus-tmpl - The Input Bus template project - # - # Copyright (c) 2007-2008 Peng Huang --# Copyright (c) 2010-2016 Takao Fujiwara -+# Copyright (c) 2010-2021 Takao Fujiwara - # Copyright (c) 2007-2016 Red Hat, Inc. - # - # This program is free software; you can redistribute it and/or modify -@@ -22,4 +22,4 @@ - # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - - export IBUS_LOCALEDIR=@localedir@ --exec @PYTHON@ @prefix@/share/ibus-anthy/setup/main.py $@ -+exec @PYTHON@ @prefix@/share/ibus-anthy/setup/main.py "$@" -diff --git a/setup/python2/main.py b/setup/python2/main.py -index 4e6b15b..f870ee5 100644 ---- a/setup/python2/main.py -+++ b/setup/python2/main.py -@@ -4,7 +4,7 @@ - # - # Copyright (c) 2007-2008 Peng Huang - # Copyright (c) 2009 Hideaki ABE --# Copyright (c) 2010-2019 Takao Fujiwara -+# Copyright (c) 2010-2021 Takao Fujiwara - # Copyright (c) 2007-2019 Red Hat, Inc. - # - # This program is free software; you can redistribute it and/or modify -@@ -1253,7 +1253,7 @@ class AnthySetup(object): - model_combobox = combobox.get_model() - method = model_combobox[id][1] - type = user_data -- section_base = None -+ section = None - key = input.get_text() - value = output.get_text() - left_text = left.get_text() -@@ -1308,7 +1308,7 @@ class AnthySetup(object): - l, i = tv.get_selection().get_selected() - type = l[i][0] - key = l[i][1] -- section_base = None -+ section = None - if type == 'romaji': - section = 'romaji-typing-rule' - elif type == 'kana': -@@ -1379,6 +1379,7 @@ class AnthySetup(object): - def on_btn_dict_add_clicked(self, widget): - file = None - id = None -+ dlg = None - - if Gtk.Buildable.get_name(widget) == 'dict:btn_add': - dlg = Gtk.FileChooserDialog(title=_("Open Dictionary File"), -@@ -1394,6 +1395,7 @@ class AnthySetup(object): - _("_OK"), Gtk.ResponseType.OK) - dlg.add_buttons(*buttons) - -+ assert(dlg != None), 'Button name is undefined.' - vbox = self.__builder.get_object('dict:add_extra_vbox') - if Gtk.Buildable.get_name(widget) == 'dict:btn_add': - # Need to init for the second time -diff --git a/setup/python3/ibus-setup-anthy.in b/setup/python3/ibus-setup-anthy.in -index b936d2c..81c9dfc 100644 ---- a/setup/python3/ibus-setup-anthy.in -+++ b/setup/python3/ibus-setup-anthy.in -@@ -4,7 +4,7 @@ - # ibus-tmpl - The Input Bus template project - # - # Copyright (c) 2007-2008 Peng Huang --# Copyright (c) 2010-2016 Takao Fujiwara -+# Copyright (c) 2010-2021 Takao Fujiwara - # Copyright (c) 2007-2016 Red Hat, Inc. - # - # This program is free software; you can redistribute it and/or modify -@@ -22,4 +22,4 @@ - # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - - export IBUS_LOCALEDIR=@localedir@ --exec @PYTHON@ @prefix@/share/ibus-anthy/setup/main.py $@ -+exec @PYTHON@ @prefix@/share/ibus-anthy/setup/main.py "$@" -diff --git a/setup/python3/main.py b/setup/python3/main.py -index 7e16093..6641f7f 100644 ---- a/setup/python3/main.py -+++ b/setup/python3/main.py -@@ -1246,7 +1246,7 @@ class AnthySetup(object): - model_combobox = combobox.get_model() - method = model_combobox[id][1] - type = user_data -- section_base = None -+ section = None - key = input.get_text() - value = output.get_text() - left_text = left.get_text() -@@ -1301,7 +1301,7 @@ class AnthySetup(object): - l, i = tv.get_selection().get_selected() - type = l[i][0] - key = l[i][1] -- section_base = None -+ section = None - if type == 'romaji': - section = 'romaji-typing-rule' - elif type == 'kana': -@@ -1372,6 +1372,7 @@ class AnthySetup(object): - def on_btn_dict_add_clicked(self, widget): - file = None - id = None -+ dlg = None - - if Gtk.Buildable.get_name(widget) == 'dict:btn_add': - dlg = Gtk.FileChooserDialog(title=_("Open Dictionary File"), -@@ -1387,6 +1388,7 @@ class AnthySetup(object): - _("_OK"), Gtk.ResponseType.OK) - dlg.add_buttons(*buttons) - -+ assert (dlg != None), 'Button name is undefined.' - vbox = self.__builder.get_object('dict:add_extra_vbox') - if Gtk.Buildable.get_name(widget) == 'dict:btn_add': - # Need to init for the second time --- -2.28.0 - -From 39773ff8c30b4793a841c44b02ff92b52d2bdaeb Mon Sep 17 00:00:00 2001 -From: fujiwarat -Date: Thu, 12 Aug 2021 18:44:51 +0900 -Subject: [PATCH] data/gschema: Remove Ctrl+period in circle_kana_mode (#23) - -Ctrl-period key is now Emoji typing on-off shortcut key in IBus core -to follow GNOME desktop. ---- - data/org.freedesktop.ibus.engine.anthy.gschema.xml.in | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/data/org.freedesktop.ibus.engine.anthy.gschema.xml.in b/data/org.freedesktop.ibus.engine.anthy.gschema.xml.in -index 773be09..75e42b3 100644 ---- a/data/org.freedesktop.ibus.engine.anthy.gschema.xml.in -+++ b/data/org.freedesktop.ibus.engine.anthy.gschema.xml.in -@@ -908,8 +908,13 @@ - 'circle_input_mode': <['Ctrl+comma', 'Ctrl+less']>, - -- 'circle_kana_mode': <['Ctrl+period', 'Ctrl+greater']>, -+ 'circle_kana_mode': <['Ctrl+greater']>, - - 'circle_typing_method': <['Alt+Romaji', 'Ctrl+slash']>, - 'circle_dict_method': <['Alt+Henkan']>, --- -2.28.0 - From 461abf651f95977794c5ced32948ad381eb7f4f2 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Fri, 20 Aug 2021 18:40:54 +0900 Subject: [PATCH 20/75] Bump to 1.5.13 --- .gitignore | 1 + ibus-anthy-HEAD.patch | 0 ibus-anthy.spec | 8 +++++--- sources | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 ibus-anthy-HEAD.patch diff --git a/.gitignore b/.gitignore index 00d1574..ca31c00 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ ibus-anthy.png /ibus-anthy-1.5.10.tar.gz /ibus-anthy-1.5.11.tar.gz /ibus-anthy-1.5.12.tar.gz +/ibus-anthy-1.5.13.tar.gz diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch new file mode 100644 index 0000000..e69de29 diff --git a/ibus-anthy.spec b/ibus-anthy.spec index d395959..83187be 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -17,8 +17,8 @@ %endif Name: ibus-anthy -Version: 1.5.12 -Release: 10%{?dist} +Version: 1.5.13 +Release: 1%{?dist} Summary: The Anthy engine for IBus input platform License: GPLv2+ URL: https://github.com/ibus/ibus/wiki @@ -26,7 +26,6 @@ Source0: https://github.com/ibus/ibus-anthy/releases/download/%{version}/ # Upstreamed patches. # Patch0: %%{name}-HEAD.patch -Patch0: %{name}-HEAD.patch Patch1: %{name}-1938129-default-hiragana.patch BuildRequires: anthy-unicode-devel @@ -153,6 +152,9 @@ desktop-file-validate \ %{_datadir}/installed-tests/%{name} %changelog +* Fri Aug 20 2021 Takao Fujiwara - 1.5.13-1 +- Bump to 1.5.13 + * Thu Aug 12 2021 Takao Fujiwara - 1.5.12-10 - Remove Ctrl+period in circle_kana_mode diff --git a/sources b/sources index 1c24df9..13b5f4f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ibus-anthy-1.5.12.tar.gz) = 6950a2865e4753831f8918f4a5926571bc8304454b6368662ef56a6fb11a60f0675e3d589108ebfd38cb5d193f7b61053a10baa6dad23adad67b3b3fc58760e8 +SHA512 (ibus-anthy-1.5.13.tar.gz) = 02d63f578d0d5c099bc63dfa050b9091809b8af53a4b4372f1896f647b54f735b56ebead51b34fb9302c94afecaf439473b1df311fca640105e71ac9b80f94dd From 14af61653eb38105e20986e13612418bae98f294 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Fri, 22 Oct 2021 09:25:22 +0900 Subject: [PATCH 21/75] Update era.t with 2021 Check python3-pycotap.rpm in Fedora instead of pip --- ibus-anthy-HEAD.patch | 151 ++++++++++++++++++++++++++++++++++++++++++ ibus-anthy.spec | 7 +- 2 files changed, 157 insertions(+), 1 deletion(-) diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch index e69de29..0f8ab60 100644 --- a/ibus-anthy-HEAD.patch +++ b/ibus-anthy-HEAD.patch @@ -0,0 +1,151 @@ +From 50706f8e5fcf88f1a607ea1f977c4a8f2ebbf623 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Fri, 22 Oct 2021 00:22:09 +0900 +Subject: [PATCH] data: Update era.t with 2021 + +--- + data/Makefile.am | 9 +++++++++ + data/era.t | 15 ++++++++++++++- + 2 files changed, 23 insertions(+), 1 deletion(-) + +diff --git a/data/Makefile.am b/data/Makefile.am +index 5e45c39..d76f17a 100644 +--- a/data/Makefile.am ++++ b/data/Makefile.am +@@ -79,6 +79,15 @@ zipcode.t: $(ANTHY_ZIPCODE_FILE) + CLEANFILES += zipcode.t + endif + ++check: ++ S_YEAR=`date '+%Y'`; \ ++ M_YEAR=`echo $$S_YEAR | sed 'y/0123456789/0123456789/'`; \ ++ grep -q $$M_YEAR $(srcdir)/era.t; \ ++ if test $$? -ne 0 ; then \ ++ echo "This year $$M_YEAR is not included in era.y"; \ ++ exit 1; \ ++ fi; ++ + install-data-hook: + if test -z "$(DESTDIR)"; then \ + glib-compile-schemas $(schemasdir); \ +diff --git a/data/era.t b/data/era.t +index 8d8cd32..a6d297e 100644 +--- a/data/era.t ++++ b/data/era.t +@@ -2,7 +2,7 @@ + # + # ibus-anthy - The Anthy engine for IBus + # +-# Copyright (c) 2010-2013 Takao Fujiwara ++# Copyright (c) 2010-2021 Takao Fujiwara + # Copyright (c) 2010-2013 Red Hat, Inc. + # + # This program is free software; you can redistribute it and/or modify +@@ -226,6 +226,10 @@ + へいせい29 #T35*500 2017 + へいせい3 #T35*500 平成3 + へいせい3 #T35*500 1991 ++へいせい30 #T35*500 平成30 ++へいせい30 #T35*500 2018 ++へいせい31 #T35*500 平成31 ++へいせい31 #T35*500 2019 + へいせい4 #T35*500 平成4 + へいせい4 #T35*500 1992 + へいせい5 #T35*500 平成5 +@@ -328,6 +332,12 @@ + めいじ8 #T35*500 1875 + めいじ9 #T35*500 明治9 + めいじ9 #T35*500 1876 ++れいわ1 #T35*500 令和1 ++れいわ1 #T35*500 2019 ++れいわ2 #T35*500 令和2 ++れいわ2 #T35*500 2020 ++れいわ3 #T35*500 令和3 ++れいわ3 #T35*500 2021 + 1868 #T35*500 明治1 + 1869 #T35*500 明治2 + 1870 #T35*500 明治3 +@@ -482,4 +492,7 @@ + 2016 #T35*500 平成28 + 2017 #T35*500 平成29 + 2018 #T35*500 平成30 ++2019 #T35*500 令和1 + 2019 #T35*500 平成31 ++2020 #T35*500 令和2 ++2021 #T35*500 令和3 +-- +2.28.0 + +From 28aa550f728b3848b06a67579aca5f563e64d447 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Fri, 22 Oct 2021 00:22:41 +0900 +Subject: [PATCH] tests: Check python3-pycotap.rpm in Fedora instead of pip + +--- + tests/Makefile.am | 7 +------ + tests/test-build.sh | 17 ++++++++++++++++- + 2 files changed, 17 insertions(+), 7 deletions(-) + +diff --git a/tests/Makefile.am b/tests/Makefile.am +index d891ff2..a7a7108 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -2,7 +2,7 @@ + # + # ibus-anthy - The Anthy engine for IBus + # +-# Copyright (c) 2017-2019 Takao Fujiwara ++# Copyright (c) 2017-2021 Takao Fujiwara + # Copyright (c) 2017-2019 Red Hat, Inc. + # + # This program is free software; you can redistribute it and/or modify +@@ -23,11 +23,6 @@ + CLEANFILES = + + check: +- @TAP_DIR=`python -m site --user-site`/tap; \ +- if test x"$$TAP_DIR" != x -a ! -d "$$TAP_DIR" ; then \ +- echo "pip install tap.py --user"; \ +- pip install tap.py --user; \ +- fi; \ + bash -x $(srcdir)/test-build.sh --builddir=$(builddir) --srcdir=$(srcdir) + + if ENABLE_INSTALLED_TESTS +diff --git a/tests/test-build.sh b/tests/test-build.sh +index 4c85af7..e83b78f 100755 +--- a/tests/test-build.sh ++++ b/tests/test-build.sh +@@ -3,7 +3,7 @@ + # + # ibus-anthy - The Anthy engine for IBus + # +-# Copyright (c) 2018 Takao Fujiwara ++# Copyright (c) 2018-2021 Takao Fujiwara + # Copyright (c) 2018 Red Hat, Inc. + # + # This program is free software; you can redistribute it and/or modify +@@ -68,6 +68,21 @@ init_environment() + if test x$FORCE_TEST != x ; then + RUN_ARGS="$RUN_ARGS --force"; + fi; ++ HAS_TAP=0; ++ if test -f /etc/redhat-release ; then ++ rpm -q --quiet python3-pycotap ++ if test $? -ne 0 ; then ++ echo "Not found python3-pycotap"; ++ exit -1; ++ fi; ++ HAS_TAP=1; ++ fi; ++ TAP_DIR=`python -m site --user-site`/pycotap; ++ if test $HAS_TAP -ne 1 && \ ++ test x"$TAP_DIR" != x && test ! -d "$TAP_DIR" ; then ++ echo "pip install pycotap --user"; ++ pip install pycotap --user; ++ fi; + if test ! -f $BUILDDIR/../data/$ANTHY_SCHEMA_FILE ; then + echo "Not found $BUILDDIR/../data/$ANTHY_SCHEMA_FILE"; + exit -1; +-- +2.28.0 + diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 83187be..6cad4f4 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -18,7 +18,7 @@ Name: ibus-anthy Version: 1.5.13 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Anthy engine for IBus input platform License: GPLv2+ URL: https://github.com/ibus/ibus/wiki @@ -26,6 +26,7 @@ Source0: https://github.com/ibus/ibus-anthy/releases/download/%{version}/ # Upstreamed patches. # Patch0: %%{name}-HEAD.patch +Patch0: %{name}-HEAD.patch Patch1: %{name}-1938129-default-hiragana.patch BuildRequires: anthy-unicode-devel @@ -152,6 +153,10 @@ desktop-file-validate \ %{_datadir}/installed-tests/%{name} %changelog +* Fri Oct 22 2021 Takao Fujiwara - 1.5.13-2 +- Update era.t with 2021 +- Check python3-pycotap.rpm in Fedora instead of pip + * Fri Aug 20 2021 Takao Fujiwara - 1.5.13-1 - Bump to 1.5.13 From 56ea4a570fd065057dc0998f43ce7f13e99b375a Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Fri, 22 Oct 2021 09:34:50 +0900 Subject: [PATCH 22/75] Add make check --- ibus-anthy.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 6cad4f4..fcfa50a 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -119,6 +119,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libanthygobject-%{sub_version}.la %check desktop-file-validate \ $RPM_BUILD_ROOT%{_datadir}/applications/ibus-setup-anthy.desktop +make -C data check %ldconfig_scriptlets libs From c27a40296b557fd84263854f67acdc4d5d800ec9 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Fri, 22 Oct 2021 12:11:19 +0900 Subject: [PATCH 23/75] export C.UTF-8 for make check --- ibus-anthy.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ibus-anthy.spec b/ibus-anthy.spec index fcfa50a..3179eb2 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -18,7 +18,7 @@ Name: ibus-anthy Version: 1.5.13 -Release: 2%{?dist} +Release: 3%{?dist} Summary: The Anthy engine for IBus input platform License: GPLv2+ URL: https://github.com/ibus/ibus/wiki @@ -119,6 +119,8 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libanthygobject-%{sub_version}.la %check desktop-file-validate \ $RPM_BUILD_ROOT%{_datadir}/applications/ibus-setup-anthy.desktop +export LANG=C.UTF-8 +locale make -C data check %ldconfig_scriptlets libs @@ -154,6 +156,9 @@ make -C data check %{_datadir}/installed-tests/%{name} %changelog +* Fri Oct 22 2021 Takao Fujiwara - 1.5.13-3 +- export C.UTF-8 for make check + * Fri Oct 22 2021 Takao Fujiwara - 1.5.13-2 - Update era.t with 2021 - Check python3-pycotap.rpm in Fedora instead of pip From dc18aae5663e7154dc3673be526124c0762f7b67 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Sat, 25 Dec 2021 00:37:38 +0900 Subject: [PATCH 24/75] Delete upstreamed ibus-anthy-HEAD.patch --- ibus-anthy-HEAD.patch | 151 ------------------------------------------ 1 file changed, 151 deletions(-) delete mode 100644 ibus-anthy-HEAD.patch diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch deleted file mode 100644 index 0f8ab60..0000000 --- a/ibus-anthy-HEAD.patch +++ /dev/null @@ -1,151 +0,0 @@ -From 50706f8e5fcf88f1a607ea1f977c4a8f2ebbf623 Mon Sep 17 00:00:00 2001 -From: fujiwarat -Date: Fri, 22 Oct 2021 00:22:09 +0900 -Subject: [PATCH] data: Update era.t with 2021 - ---- - data/Makefile.am | 9 +++++++++ - data/era.t | 15 ++++++++++++++- - 2 files changed, 23 insertions(+), 1 deletion(-) - -diff --git a/data/Makefile.am b/data/Makefile.am -index 5e45c39..d76f17a 100644 ---- a/data/Makefile.am -+++ b/data/Makefile.am -@@ -79,6 +79,15 @@ zipcode.t: $(ANTHY_ZIPCODE_FILE) - CLEANFILES += zipcode.t - endif - -+check: -+ S_YEAR=`date '+%Y'`; \ -+ M_YEAR=`echo $$S_YEAR | sed 'y/0123456789/0123456789/'`; \ -+ grep -q $$M_YEAR $(srcdir)/era.t; \ -+ if test $$? -ne 0 ; then \ -+ echo "This year $$M_YEAR is not included in era.y"; \ -+ exit 1; \ -+ fi; -+ - install-data-hook: - if test -z "$(DESTDIR)"; then \ - glib-compile-schemas $(schemasdir); \ -diff --git a/data/era.t b/data/era.t -index 8d8cd32..a6d297e 100644 ---- a/data/era.t -+++ b/data/era.t -@@ -2,7 +2,7 @@ - # - # ibus-anthy - The Anthy engine for IBus - # --# Copyright (c) 2010-2013 Takao Fujiwara -+# Copyright (c) 2010-2021 Takao Fujiwara - # Copyright (c) 2010-2013 Red Hat, Inc. - # - # This program is free software; you can redistribute it and/or modify -@@ -226,6 +226,10 @@ - へいせい29 #T35*500 2017 - へいせい3 #T35*500 平成3 - へいせい3 #T35*500 1991 -+へいせい30 #T35*500 平成30 -+へいせい30 #T35*500 2018 -+へいせい31 #T35*500 平成31 -+へいせい31 #T35*500 2019 - へいせい4 #T35*500 平成4 - へいせい4 #T35*500 1992 - へいせい5 #T35*500 平成5 -@@ -328,6 +332,12 @@ - めいじ8 #T35*500 1875 - めいじ9 #T35*500 明治9 - めいじ9 #T35*500 1876 -+れいわ1 #T35*500 令和1 -+れいわ1 #T35*500 2019 -+れいわ2 #T35*500 令和2 -+れいわ2 #T35*500 2020 -+れいわ3 #T35*500 令和3 -+れいわ3 #T35*500 2021 - 1868 #T35*500 明治1 - 1869 #T35*500 明治2 - 1870 #T35*500 明治3 -@@ -482,4 +492,7 @@ - 2016 #T35*500 平成28 - 2017 #T35*500 平成29 - 2018 #T35*500 平成30 -+2019 #T35*500 令和1 - 2019 #T35*500 平成31 -+2020 #T35*500 令和2 -+2021 #T35*500 令和3 --- -2.28.0 - -From 28aa550f728b3848b06a67579aca5f563e64d447 Mon Sep 17 00:00:00 2001 -From: fujiwarat -Date: Fri, 22 Oct 2021 00:22:41 +0900 -Subject: [PATCH] tests: Check python3-pycotap.rpm in Fedora instead of pip - ---- - tests/Makefile.am | 7 +------ - tests/test-build.sh | 17 ++++++++++++++++- - 2 files changed, 17 insertions(+), 7 deletions(-) - -diff --git a/tests/Makefile.am b/tests/Makefile.am -index d891ff2..a7a7108 100644 ---- a/tests/Makefile.am -+++ b/tests/Makefile.am -@@ -2,7 +2,7 @@ - # - # ibus-anthy - The Anthy engine for IBus - # --# Copyright (c) 2017-2019 Takao Fujiwara -+# Copyright (c) 2017-2021 Takao Fujiwara - # Copyright (c) 2017-2019 Red Hat, Inc. - # - # This program is free software; you can redistribute it and/or modify -@@ -23,11 +23,6 @@ - CLEANFILES = - - check: -- @TAP_DIR=`python -m site --user-site`/tap; \ -- if test x"$$TAP_DIR" != x -a ! -d "$$TAP_DIR" ; then \ -- echo "pip install tap.py --user"; \ -- pip install tap.py --user; \ -- fi; \ - bash -x $(srcdir)/test-build.sh --builddir=$(builddir) --srcdir=$(srcdir) - - if ENABLE_INSTALLED_TESTS -diff --git a/tests/test-build.sh b/tests/test-build.sh -index 4c85af7..e83b78f 100755 ---- a/tests/test-build.sh -+++ b/tests/test-build.sh -@@ -3,7 +3,7 @@ - # - # ibus-anthy - The Anthy engine for IBus - # --# Copyright (c) 2018 Takao Fujiwara -+# Copyright (c) 2018-2021 Takao Fujiwara - # Copyright (c) 2018 Red Hat, Inc. - # - # This program is free software; you can redistribute it and/or modify -@@ -68,6 +68,21 @@ init_environment() - if test x$FORCE_TEST != x ; then - RUN_ARGS="$RUN_ARGS --force"; - fi; -+ HAS_TAP=0; -+ if test -f /etc/redhat-release ; then -+ rpm -q --quiet python3-pycotap -+ if test $? -ne 0 ; then -+ echo "Not found python3-pycotap"; -+ exit -1; -+ fi; -+ HAS_TAP=1; -+ fi; -+ TAP_DIR=`python -m site --user-site`/pycotap; -+ if test $HAS_TAP -ne 1 && \ -+ test x"$TAP_DIR" != x && test ! -d "$TAP_DIR" ; then -+ echo "pip install pycotap --user"; -+ pip install pycotap --user; -+ fi; - if test ! -f $BUILDDIR/../data/$ANTHY_SCHEMA_FILE ; then - echo "Not found $BUILDDIR/../data/$ANTHY_SCHEMA_FILE"; - exit -1; --- -2.28.0 - From d8db06fe792d83de92b015fb9f482eca5f2cdef8 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Sat, 25 Dec 2021 00:38:40 +0900 Subject: [PATCH 25/75] Bump to 1.5.14 --- .gitignore | 1 + ibus-anthy-HEAD.patch | 0 ibus-anthy.spec | 8 +++++--- sources | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 ibus-anthy-HEAD.patch diff --git a/.gitignore b/.gitignore index ca31c00..10abb26 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ ibus-anthy.png /ibus-anthy-1.5.11.tar.gz /ibus-anthy-1.5.12.tar.gz /ibus-anthy-1.5.13.tar.gz +/ibus-anthy-1.5.14.tar.gz diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch new file mode 100644 index 0000000..e69de29 diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 3179eb2..4e1d605 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -17,8 +17,8 @@ %endif Name: ibus-anthy -Version: 1.5.13 -Release: 3%{?dist} +Version: 1.5.14 +Release: 1%{?dist} Summary: The Anthy engine for IBus input platform License: GPLv2+ URL: https://github.com/ibus/ibus/wiki @@ -26,7 +26,6 @@ Source0: https://github.com/ibus/ibus-anthy/releases/download/%{version}/ # Upstreamed patches. # Patch0: %%{name}-HEAD.patch -Patch0: %{name}-HEAD.patch Patch1: %{name}-1938129-default-hiragana.patch BuildRequires: anthy-unicode-devel @@ -156,6 +155,9 @@ make -C data check %{_datadir}/installed-tests/%{name} %changelog +* Fri Dec 24 2021 Takao Fujiwara - 1.5.14-1 +- Bump to 1.5.14 + * Fri Oct 22 2021 Takao Fujiwara - 1.5.13-3 - export C.UTF-8 for make check diff --git a/sources b/sources index 13b5f4f..aad6592 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ibus-anthy-1.5.13.tar.gz) = 02d63f578d0d5c099bc63dfa050b9091809b8af53a4b4372f1896f647b54f735b56ebead51b34fb9302c94afecaf439473b1df311fca640105e71ac9b80f94dd +SHA512 (ibus-anthy-1.5.14.tar.gz) = 1c18bb18f270f52ae32720062b69d29f2005ecffe7f2418e3f0688c4c23b2d6742b5298ab2283a1937987bb2ce7e63a913107e0c079974775daa898f3619d1d9 From 13f164d787a7246f7cf3c8d6334dede3b29220c6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jan 2022 13:02:05 +0000 Subject: [PATCH 26/75] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ibus-anthy.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 4e1d605..587965b 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -18,7 +18,7 @@ Name: ibus-anthy Version: 1.5.14 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Anthy engine for IBus input platform License: GPLv2+ URL: https://github.com/ibus/ibus/wiki @@ -155,6 +155,9 @@ make -C data check %{_datadir}/installed-tests/%{name} %changelog +* Thu Jan 20 2022 Fedora Release Engineering - 1.5.14-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Fri Dec 24 2021 Takao Fujiwara - 1.5.14-1 - Bump to 1.5.14 From 03cc13ad374942b5e5b5bc0b08dc78c26e0ded20 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Thu, 27 Jan 2022 15:55:49 +0900 Subject: [PATCH 27/75] Add 2022 Era --- ibus-anthy-HEAD.patch | 39 +++++++++++++++++++++++++++++++++++++++ ibus-anthy.spec | 6 +++++- 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch index e69de29..6e07cc2 100644 --- a/ibus-anthy-HEAD.patch +++ b/ibus-anthy-HEAD.patch @@ -0,0 +1,39 @@ +From ed993538c711d817e5365630b65f372e0dfd01a7 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Thu, 27 Jan 2022 15:15:13 +0900 +Subject: [PATCH] data: Update era.t with 2022 + +--- + data/era.t | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/data/era.t b/data/era.t +index a6d297e..686271f 100644 +--- a/data/era.t ++++ b/data/era.t +@@ -2,7 +2,7 @@ + # + # ibus-anthy - The Anthy engine for IBus + # +-# Copyright (c) 2010-2021 Takao Fujiwara ++# Copyright (c) 2010-2022 Takao Fujiwara + # Copyright (c) 2010-2013 Red Hat, Inc. + # + # This program is free software; you can redistribute it and/or modify +@@ -338,6 +338,8 @@ + れいわ2 #T35*500 2020 + れいわ3 #T35*500 令和3 + れいわ3 #T35*500 2021 ++れいわ4 #T35*500 令和4 ++れいわ4 #T35*500 2022 + 1868 #T35*500 明治1 + 1869 #T35*500 明治2 + 1870 #T35*500 明治3 +@@ -496,3 +498,4 @@ + 2019 #T35*500 平成31 + 2020 #T35*500 令和2 + 2021 #T35*500 令和3 ++2022 #T35*500 令和4 +-- +2.33.1 + diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 587965b..0a06e0d 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -18,7 +18,7 @@ Name: ibus-anthy Version: 1.5.14 -Release: 2%{?dist} +Release: 3%{?dist} Summary: The Anthy engine for IBus input platform License: GPLv2+ URL: https://github.com/ibus/ibus/wiki @@ -26,6 +26,7 @@ Source0: https://github.com/ibus/ibus-anthy/releases/download/%{version}/ # Upstreamed patches. # Patch0: %%{name}-HEAD.patch +Patch0: %{name}-HEAD.patch Patch1: %{name}-1938129-default-hiragana.patch BuildRequires: anthy-unicode-devel @@ -155,6 +156,9 @@ make -C data check %{_datadir}/installed-tests/%{name} %changelog +* Thu Jan 27 2022 Takao Fujiwara - 1.5.14-3 +- Add 2022 Era + * Thu Jan 20 2022 Fedora Release Engineering - 1.5.14-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 41dac539c5603b62d35a96652e3e4db4c06f1afd Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Thu, 14 Apr 2022 15:49:58 +0900 Subject: [PATCH 28/75] Resolves #2064261 assertion error with page size 0 --- ibus-anthy-HEAD.patch | 40 ++++++++++++++++++++++++++++++++++++++++ ibus-anthy.spec | 5 ++++- 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch index 6e07cc2..04dd165 100644 --- a/ibus-anthy-HEAD.patch +++ b/ibus-anthy-HEAD.patch @@ -37,3 +37,43 @@ index a6d297e..686271f 100644 -- 2.33.1 +From 4ef5ac95e84056ebd5a446e5e21b5f2a99377363 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Thu, 14 Apr 2022 15:23:26 +0900 +Subject: [PATCH] setup: Minimum candidate window page size to 1 + +IBusLookupTable assert with page_size > 0 (rhbz#2064261) +--- + setup/python2/setup.ui | 2 +- + setup/python3/setup.ui | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/setup/python2/setup.ui b/setup/python2/setup.ui +index 88b19b8..3e82f2e 100644 +--- a/setup/python2/setup.ui ++++ b/setup/python2/setup.ui +@@ -2,7 +2,7 @@ + + + 10 +- 0 ++ 1 + 0 + 1 + 0 +diff --git a/setup/python3/setup.ui b/setup/python3/setup.ui +index 88b19b8..3e82f2e 100644 +--- a/setup/python3/setup.ui ++++ b/setup/python3/setup.ui +@@ -2,7 +2,7 @@ + + + 10 +- 0 ++ 1 + 0 + 1 + 0 +-- +2.34.1 + diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 0a06e0d..dc4f718 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -18,7 +18,7 @@ Name: ibus-anthy Version: 1.5.14 -Release: 3%{?dist} +Release: 4%{?dist} Summary: The Anthy engine for IBus input platform License: GPLv2+ URL: https://github.com/ibus/ibus/wiki @@ -156,6 +156,9 @@ make -C data check %{_datadir}/installed-tests/%{name} %changelog +* Thu Apr 14 2022 Takao Fujiwara - 1.5.14-4 +- Resolves #2064261 assertion error with page size 0 + * Thu Jan 27 2022 Takao Fujiwara - 1.5.14-3 - Add 2022 Era From d708323a126890176b8e9c5c0cf96336a6aded63 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 21 Jul 2022 14:22:53 +0000 Subject: [PATCH 29/75] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ibus-anthy.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ibus-anthy.spec b/ibus-anthy.spec index dc4f718..33b0bec 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -18,7 +18,7 @@ Name: ibus-anthy Version: 1.5.14 -Release: 4%{?dist} +Release: 5%{?dist} Summary: The Anthy engine for IBus input platform License: GPLv2+ URL: https://github.com/ibus/ibus/wiki @@ -156,6 +156,9 @@ make -C data check %{_datadir}/installed-tests/%{name} %changelog +* Thu Jul 21 2022 Fedora Release Engineering - 1.5.14-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Thu Apr 14 2022 Takao Fujiwara - 1.5.14-4 - Resolves #2064261 assertion error with page size 0 From 6431ac298a7b33901c516845c551c9ff4c49e056 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Wed, 3 Aug 2022 08:00:59 +0900 Subject: [PATCH 30/75] Add icon tag in ibus-anthy.appdata.xml.in - Enable IBus.Engine::has-focus-id property - Add the escape_to_latin command as a vi-cooperative cancel --- ibus-anthy-HEAD.patch | 289 ++++++++++++++++++++++++++++++++++++++++++ ibus-anthy.spec | 7 +- 2 files changed, 295 insertions(+), 1 deletion(-) diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch index 04dd165..30cd3e7 100644 --- a/ibus-anthy-HEAD.patch +++ b/ibus-anthy-HEAD.patch @@ -77,3 +77,292 @@ index 88b19b8..3e82f2e 100644 -- 2.34.1 +From 2e9f751c45f1002a75e44daa200a379808479e9f Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Tue, 2 Aug 2022 11:14:48 +0900 +Subject: [PATCH] data: Add icon tag in ibus-anthy.appdata.xml.in + +--- + data/ibus-anthy.appdata.xml.in | 22 +++++ + 1 files changed, 103 insertions(+), 77 deletions(-) + +diff --git a/data/ibus-anthy.appdata.xml.in b/data/ibus-anthy.appdata.xml.in +index 8f246e9..be67f9d 100644 +--- a/data/ibus-anthy.appdata.xml.in ++++ b/data/ibus-anthy.appdata.xml.in +@@ -1,10 +1,12 @@ + ++ + + org.freedesktop.ibus.engine.anthy + GFDL-1.3 + GPL-2.0 + Anthy + Japanese input method ++ /usr/share/icons/hicolor/scalable/apps/ibus-anthy.svg + +

+ The Anthy input method is designed for entering Japanese text. +@@ -15,9 +17,29 @@ + out on a traditional keyboard. +

+
++ ++ input-method ++ Japanese ++ + https://github.com/ibus/ibus/wiki + https://github.com/ibus/ibus-anthy/issues + https://github.com/ibus/ibus/wiki/FAQ ++ https://translate.fedoraproject.org/projects/ibus/ibus-anthy/ ++ ++ ++ ++

See the upstream release list.

++
++ https://github.com/ibus/ibus-anthy/releases ++
++
++ IBus ++ ++ ++ The Anthy input method is designed for entering Japanese text. ++ https://camo.githubusercontent.com/3646c511fba557137a316be913f01fc3114e0db9c990acdfa18c29f52b5a6538/687474703a2f2f696275732e6769746875622e696f2f696d616765732f322e706e67#/ibus-anthy.jpg ++ ++ + ibus-anthy + tfujiwar_AT_redhat.com +
+-- +2.35.3 + +From 8aed07707fba1b7fafed73227916718458409c29 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Wed, 3 Aug 2022 07:38:28 +0900 +Subject: [PATCH] engine: Enable IBus.Engine::has-focus-id property + +IBusEngineClass::has-focus-id propery has been available +since IBus 1.5.27 +IBusEngineClass::focus_in_id() class method is used instead of +IBusEngineClass::focus_id() one in case has-focus-id is %TRUE +and object_path and client name are available with the class method. +--- + engine/python2/engine.py | 22 +++++++++++++++++----- + engine/python3/engine.py | 22 +++++++++++++++++----- + 2 files changed, 34 insertions(+), 10 deletions(-) + +diff --git a/engine/python2/engine.py b/engine/python2/engine.py +index 2fb47b5..d97314a 100644 +--- a/engine/python2/engine.py ++++ b/engine/python2/engine.py +@@ -4,7 +4,7 @@ + # ibus-anthy - The Anthy engine for IBus + # + # Copyright (c) 2007-2008 Peng Huang +-# Copyright (c) 2010-2021 Takao Fujiwara ++# Copyright (c) 2010-2022 Takao Fujiwara + # Copyright (c) 2007-2018 Red Hat, Inc. + # + # This program is free software; you can redistribute it and/or modify +@@ -127,9 +127,15 @@ class Engine(IBus.EngineSimple): + __latin_with_shift = True + + def __init__(self, bus, object_path): +- super(Engine, self).__init__(engine_name="anthy", +- connection=bus.get_connection(), +- object_path=object_path) ++ if hasattr(IBus.Engine.props, 'has_focus_id'): ++ super(Engine, self).__init__(engine_name="anthy", ++ connection=bus.get_connection(), ++ object_path=object_path, ++ has_focus_id=True) ++ else: ++ super(Engine, self).__init__(engine_name="anthy", ++ connection=bus.get_connection(), ++ object_path=object_path) + + self.add_table_by_locale(None) + # create anthy context +@@ -1048,6 +1054,12 @@ class Engine(IBus.EngineSimple): + return self.__argb(255, r, g, b) + + def do_focus_in(self): ++ self.do_focus_in_id(None, None) ++ ++ def do_focus_out(self): ++ self.do_focus_out_id(None) ++ ++ def do_focus_in_id(self, object_path, client): + self.register_properties(self.__prop_list) + self.__refresh_typing_mode_property() + mode = self.__prefs.get_value('common', 'behavior-on-focus-out') +@@ -1059,7 +1071,7 @@ class Engine(IBus.EngineSimple): + if size != self.__lookup_table.get_page_size(): + self.__lookup_table.set_page_size(size) + +- def do_focus_out(self): ++ def do_focus_out_id(self, object_path): + if self.__has_input_purpose: + self.__input_purpose = 0 + mode = self.__prefs.get_value('common', 'behavior-on-focus-out') +diff --git a/engine/python3/engine.py b/engine/python3/engine.py +index df4e20d..34b7f9f 100644 +--- a/engine/python3/engine.py ++++ b/engine/python3/engine.py +@@ -4,7 +4,7 @@ + # ibus-anthy - The Anthy engine for IBus + # + # Copyright (c) 2007-2008 Peng Huang +-# Copyright (c) 2010-2021 Takao Fujiwara ++# Copyright (c) 2010-2022 Takao Fujiwara + # Copyright (c) 2007-2018 Red Hat, Inc. + # + # This program is free software; you can redistribute it and/or modify +@@ -128,9 +128,15 @@ class Engine(IBus.EngineSimple): + __latin_with_shift = True + + def __init__(self, bus, object_path): +- super(Engine, self).__init__(engine_name="anthy", +- connection=bus.get_connection(), +- object_path=object_path) ++ if hasattr(IBus.Engine.props, 'has_focus_id'): ++ super(Engine, self).__init__(engine_name="anthy", ++ connection=bus.get_connection(), ++ object_path=object_path, ++ has_focus_id=True) ++ else: ++ super(Engine, self).__init__(engine_name="anthy", ++ connection=bus.get_connection(), ++ object_path=object_path) + + self.add_table_by_locale(None) + # create anthy context +@@ -1043,6 +1049,12 @@ class Engine(IBus.EngineSimple): + return self.__argb(255, r, g, b) + + def do_focus_in(self): ++ self.do_focus_in_id(None, None) ++ ++ def do_focus_out(self): ++ self.do_focus_out_id(None) ++ ++ def do_focus_in_id(self, object_path, client): + self.register_properties(self.__prop_list) + self.__refresh_typing_mode_property() + mode = self.__prefs.get_value('common', 'behavior-on-focus-out') +@@ -1054,7 +1066,7 @@ class Engine(IBus.EngineSimple): + if size != self.__lookup_table.get_page_size(): + self.__lookup_table.set_page_size(size) + +- def do_focus_out(self): ++ def do_focus_out_id(self, object_path): + if self.__has_input_purpose: + self.__input_purpose = 0 + mode = self.__prefs.get_value('common', 'behavior-on-focus-out') +-- +2.35.3 + +From debc427fad513063cf251a1668584a198c692bd6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Mangano?= +Date: Wed, 3 Aug 2022 07:38:59 +0900 +Subject: [PATCH] Add the escape_to_latin command as a vi-cooperative cancel (#29) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +When writing Japanese in Vim, everytime I switch from Insert mode back to +Normal mode, I need to also switch back the IBus input mode to Latin or +else Vim won’t take any of my input. This is kind fo annoying as key +sequences like `:w` easily get wired into muscle memory. + +For comparison, uim has got a vi-cooperative mode for that use case. See + for illustration. + +Here’s a new command which, when converting, behaves like cancel, but +otherwise switches to Latin and sends the Escape key. To make IBus +vi-cooperative, a user can map the Escape key to escape_to_latin instead +of cancel. +--- + engine/python2/engine.py | 14 ++++++++++++++ + engine/python3/engine.py | 14 ++++++++++++++ + setup/python2/anthyprefs.py | 1 + + setup/python3/anthyprefs.py | 1 + + 4 files changed, 30 insertions(+) + +diff --git a/engine/python2/engine.py b/engine/python2/engine.py +index d97314a..218b485 100644 +--- a/engine/python2/engine.py ++++ b/engine/python2/engine.py +@@ -2333,6 +2333,20 @@ class Engine(IBus.EngineSimple): + self.__invalidate() + return True + ++ def __cmd_escape_to_latin(self, keyval, state): ++ """ ++ Vi-cooperative variant of cancel_all. When Vi users press Escape, they ++ expect to return to Normal mode where an IME would not make sense. This ++ command automatically switches back to Latin when sending Escape. When ++ converting, Escape will cancel the conversion instead. ++ """ ++ if self._chk_mode('0'): ++ if Engine.__input_mode != INPUT_MODE_LATIN: ++ self.__cmd_latin_mode(keyval, state) ++ return False ++ else: ++ return self.__cmd_cancel_all(keyval, state) ++ + def __cmd_reconvert(self, keyval, state): + if not self.__preedit_ja_string.is_empty(): + # if user has inputed some chars +diff --git a/engine/python3/engine.py b/engine/python3/engine.py +index 34b7f9f..abb9c02 100644 +--- a/engine/python3/engine.py ++++ b/engine/python3/engine.py +@@ -2327,6 +2327,20 @@ class Engine(IBus.EngineSimple): + self.__invalidate() + return True + ++ def __cmd_escape_to_latin(self, keyval, state): ++ """ ++ Vi-cooperative variant of cancel_all. When Vi users press Escape, they ++ expect to return to Normal mode where an IME would not make sense. This ++ command automatically switches back to Latin when sending Escape. When ++ converting, Escape will cancel the conversion instead. ++ """ ++ if self._chk_mode('0'): ++ if Engine.__input_mode != INPUT_MODE_LATIN: ++ self.__cmd_latin_mode(keyval, state) ++ return False ++ else: ++ return self.__cmd_cancel_all(keyval, state) ++ + def __cmd_reconvert(self, keyval, state): + if not self.__preedit_ja_string.is_empty(): + # if user has inputed some chars +diff --git a/setup/python2/anthyprefs.py b/setup/python2/anthyprefs.py +index 5e3bade..c614491 100644 +--- a/setup/python2/anthyprefs.py ++++ b/setup/python2/anthyprefs.py +@@ -276,6 +276,7 @@ _cmd_keys = [ + 'predict', + 'cancel', + 'cancel_all', ++ 'escape_to_latin', + 'reconvert', + # 'do_nothing', + +diff --git a/setup/python3/anthyprefs.py b/setup/python3/anthyprefs.py +index 33b2a31..404aa09 100644 +--- a/setup/python3/anthyprefs.py ++++ b/setup/python3/anthyprefs.py +@@ -269,6 +269,7 @@ _cmd_keys = [ + 'predict', + 'cancel', + 'cancel_all', ++ 'escape_to_latin', + 'reconvert', + # 'do_nothing', + +-- +2.35.3 + diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 33b0bec..85c19df 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -18,7 +18,7 @@ Name: ibus-anthy Version: 1.5.14 -Release: 5%{?dist} +Release: 6%{?dist} Summary: The Anthy engine for IBus input platform License: GPLv2+ URL: https://github.com/ibus/ibus/wiki @@ -156,6 +156,11 @@ make -C data check %{_datadir}/installed-tests/%{name} %changelog +* Wed Aug 03 2022 Takao Fujiwara - 1.5.14-6 +- Add icon tag in ibus-anthy.appdata.xml.in +- Enable IBus.Engine::has-focus-id property +- Add the escape_to_latin command as a vi-cooperative cancel + * Thu Jul 21 2022 Fedora Release Engineering - 1.5.14-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From eba07831da10188b51693e22d573e1086550b175 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Wed, 3 Aug 2022 18:12:16 +0900 Subject: [PATCH 31/75] Change metainfo icon from SVG to PNG file --- ibus-anthy-HEAD.patch | 10 +++++----- ibus-anthy.spec | 5 ++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch index 30cd3e7..9500e51 100644 --- a/ibus-anthy-HEAD.patch +++ b/ibus-anthy-HEAD.patch @@ -77,9 +77,9 @@ index 88b19b8..3e82f2e 100644 -- 2.34.1 -From 2e9f751c45f1002a75e44daa200a379808479e9f Mon Sep 17 00:00:00 2001 +From 8cfc210cccbe7324e1fbe7d7911eba33c786a520 Mon Sep 17 00:00:00 2001 From: fujiwarat -Date: Tue, 2 Aug 2022 11:14:48 +0900 +Date: Wed, 3 Aug 2022 18:02:02 +0900 Subject: [PATCH] data: Add icon tag in ibus-anthy.appdata.xml.in --- @@ -87,7 +87,7 @@ Subject: [PATCH] data: Add icon tag in ibus-anthy.appdata.xml.in 1 files changed, 103 insertions(+), 77 deletions(-) diff --git a/data/ibus-anthy.appdata.xml.in b/data/ibus-anthy.appdata.xml.in -index 8f246e9..be67f9d 100644 +index 8f246e9..af32a5a 100644 --- a/data/ibus-anthy.appdata.xml.in +++ b/data/ibus-anthy.appdata.xml.in @@ -1,10 +1,12 @@ @@ -99,7 +99,7 @@ index 8f246e9..be67f9d 100644 GPL-2.0 Anthy Japanese input method -+ /usr/share/icons/hicolor/scalable/apps/ibus-anthy.svg ++ https://raw.githubusercontent.com/ibus/ibus-anthy/main/icons/ibus-anthy.png

The Anthy input method is designed for entering Japanese text. @@ -127,7 +127,7 @@ index 8f246e9..be67f9d 100644 + + + The Anthy input method is designed for entering Japanese text. -+ https://camo.githubusercontent.com/3646c511fba557137a316be913f01fc3114e0db9c990acdfa18c29f52b5a6538/687474703a2f2f696275732e6769746875622e696f2f696d616765732f322e706e67#/ibus-anthy.jpg ++ http://ibus.github.io/images/2.png + + ibus-anthy diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 85c19df..f36deae 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -18,7 +18,7 @@ Name: ibus-anthy Version: 1.5.14 -Release: 6%{?dist} +Release: 7%{?dist} Summary: The Anthy engine for IBus input platform License: GPLv2+ URL: https://github.com/ibus/ibus/wiki @@ -156,6 +156,9 @@ make -C data check %{_datadir}/installed-tests/%{name} %changelog +* Wed Aug 03 2022 Takao Fujiwara - 1.5.14-7 +- Change metainfo icon from SVG to PNG file + * Wed Aug 03 2022 Takao Fujiwara - 1.5.14-6 - Add icon tag in ibus-anthy.appdata.xml.in - Enable IBus.Engine::has-focus-id property From c9ffefdd8ad562c12e8ede1d860066b4b81a9132 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Wed, 16 Nov 2022 15:53:56 +0900 Subject: [PATCH 32/75] Migrate license tag to SPDX --- ibus-anthy.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ibus-anthy.spec b/ibus-anthy.spec index f36deae..9cd2b8b 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -18,9 +18,9 @@ Name: ibus-anthy Version: 1.5.14 -Release: 7%{?dist} +Release: 8%{?dist} Summary: The Anthy engine for IBus input platform -License: GPLv2+ +License: GPL-2.0-or-later URL: https://github.com/ibus/ibus/wiki Source0: https://github.com/ibus/ibus-anthy/releases/download/%{version}/%{name}-%{version}.tar.gz @@ -156,6 +156,9 @@ make -C data check %{_datadir}/installed-tests/%{name} %changelog +* Wed Nov 16 2022 Takao Fujiwara - 1.5.14-8 +- Migrate license tag to SPDX + * Wed Aug 03 2022 Takao Fujiwara - 1.5.14-7 - Change metainfo icon from SVG to PNG file From 242b59bae45e19a3b04c0facff0685808b6b6ee6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 19 Jan 2023 12:52:38 +0000 Subject: [PATCH 33/75] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ibus-anthy.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 9cd2b8b..75f47b4 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -18,7 +18,7 @@ Name: ibus-anthy Version: 1.5.14 -Release: 8%{?dist} +Release: 9%{?dist} Summary: The Anthy engine for IBus input platform License: GPL-2.0-or-later URL: https://github.com/ibus/ibus/wiki @@ -156,6 +156,9 @@ make -C data check %{_datadir}/installed-tests/%{name} %changelog +* Thu Jan 19 2023 Fedora Release Engineering - 1.5.14-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Wed Nov 16 2022 Takao Fujiwara - 1.5.14-8 - Migrate license tag to SPDX From 21a2a0fda2103b35d1ad39c75a32918acc2efede Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Thu, 26 Jan 2023 20:37:23 +0900 Subject: [PATCH 34/75] Add 2023 Era - Fix PageDown/PageUp --- ibus-anthy-HEAD.patch | 112 ++++++++++++++++++++++++++++++++++++++++++ ibus-anthy.spec | 6 ++- 2 files changed, 117 insertions(+), 1 deletion(-) diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch index 9500e51..f512662 100644 --- a/ibus-anthy-HEAD.patch +++ b/ibus-anthy-HEAD.patch @@ -366,3 +366,115 @@ index 33b2a31..404aa09 100644 -- 2.35.3 +From d1e6853dc4f3cd26b5846b6e4e255bfcaf4e381a Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Thu, 26 Jan 2023 19:11:16 +0900 +Subject: [PATCH] engine: Fix page_up/page_down class methods (#27) + +--- + engine/python2/engine.py | 6 +++--- + engine/python3/engine.py | 6 +++--- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/engine/python2/engine.py b/engine/python2/engine.py +index 218b485..56c0cd5 100644 +--- a/engine/python2/engine.py ++++ b/engine/python2/engine.py +@@ -4,7 +4,7 @@ + # ibus-anthy - The Anthy engine for IBus + # + # Copyright (c) 2007-2008 Peng Huang +-# Copyright (c) 2010-2022 Takao Fujiwara ++# Copyright (c) 2010-2023 Takao Fujiwara + # Copyright (c) 2007-2018 Red Hat, Inc. + # + # This program is free software; you can redistribute it and/or modify +@@ -1536,14 +1536,14 @@ class Engine(IBus.EngineSimple): + if self.__preedit_ja_string.is_empty(): + return False + if self.__lookup_table_visible == True: +- self.do_page_up() ++ self.__page_up(self) + return True + + def __on_key_page_down(self): + if self.__preedit_ja_string.is_empty(): + return False + if self.__lookup_table_visible == True: +- self.do_page_down() ++ self.__page_down(self) + return True + + '''def __on_key_left(self): +diff --git a/engine/python3/engine.py b/engine/python3/engine.py +index abb9c02..2ebf894 100644 +--- a/engine/python3/engine.py ++++ b/engine/python3/engine.py +@@ -4,7 +4,7 @@ + # ibus-anthy - The Anthy engine for IBus + # + # Copyright (c) 2007-2008 Peng Huang +-# Copyright (c) 2010-2022 Takao Fujiwara ++# Copyright (c) 2010-2023 Takao Fujiwara + # Copyright (c) 2007-2018 Red Hat, Inc. + # + # This program is free software; you can redistribute it and/or modify +@@ -1531,14 +1531,14 @@ class Engine(IBus.EngineSimple): + if self.__preedit_ja_string.is_empty(): + return False + if self.__lookup_table_visible == True: +- self.do_page_up() ++ self.__page_up(self) + return True + + def __on_key_page_down(self): + if self.__preedit_ja_string.is_empty(): + return False + if self.__lookup_table_visible == True: +- self.do_page_down() ++ self.__page_down(self) + return True + + '''def __on_key_left(self): +-- +2.38.1 + +From 227ec140cdf4ffcc4f129f59d9ca7db2076554b2 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Thu, 26 Jan 2023 19:42:25 +0900 +Subject: [PATCH] data: Update era.t with 2023 + +--- + data/era.t | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/data/era.t b/data/era.t +index 686271f..7f7bd1b 100644 +--- a/data/era.t ++++ b/data/era.t +@@ -2,7 +2,7 @@ + # + # ibus-anthy - The Anthy engine for IBus + # +-# Copyright (c) 2010-2022 Takao Fujiwara ++# Copyright (c) 2010-2023 Takao Fujiwara + # Copyright (c) 2010-2013 Red Hat, Inc. + # + # This program is free software; you can redistribute it and/or modify +@@ -340,6 +340,8 @@ + れいわ3 #T35*500 2021 + れいわ4 #T35*500 令和4 + れいわ4 #T35*500 2022 ++れいわ5 #T35*500 令和5 ++れいわ5 #T35*500 2023 + 1868 #T35*500 明治1 + 1869 #T35*500 明治2 + 1870 #T35*500 明治3 +@@ -499,3 +501,4 @@ + 2020 #T35*500 令和2 + 2021 #T35*500 令和3 + 2022 #T35*500 令和4 ++2023 #T35*500 令和5 +-- +2.38.1 + diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 75f47b4..ce335e5 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -18,7 +18,7 @@ Name: ibus-anthy Version: 1.5.14 -Release: 9%{?dist} +Release: 10%{?dist} Summary: The Anthy engine for IBus input platform License: GPL-2.0-or-later URL: https://github.com/ibus/ibus/wiki @@ -156,6 +156,10 @@ make -C data check %{_datadir}/installed-tests/%{name} %changelog +* Thu Jan 26 2023 Takao Fujiwara - 1.5.14-10 +- Add 2023 Era +- Fix PageDown/PageUp + * Thu Jan 19 2023 Fedora Release Engineering - 1.5.14-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 8b5be26fa8438b515232e3c006b7c94bf93d5626 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Fri, 17 Feb 2023 19:30:03 +0900 Subject: [PATCH 35/75] Fix to load EN compose table --- ibus-anthy-HEAD.patch | 57 +++++++++++++++++++++++++++++++++++++++++++ ibus-anthy.spec | 5 +++- 2 files changed, 61 insertions(+), 1 deletion(-) diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch index f512662..d701cd7 100644 --- a/ibus-anthy-HEAD.patch +++ b/ibus-anthy-HEAD.patch @@ -478,3 +478,60 @@ index 686271f..7f7bd1b 100644 -- 2.38.1 +From 56629c6f9d5e289fdd16388965516fe5ebf5c8dc Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Fri, 17 Feb 2023 15:52:58 +0900 +Subject: [PATCH 8/8] engine: Fix to find compose resource in IBus core + +IBus.init() has been required since 1.5.28 after the EN compose +table was moved to GResource. +--- + engine/python2/main.py | 3 ++- + engine/python3/main.py | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/engine/python2/main.py b/engine/python2/main.py +index 096cd41..c366293 100644 +--- a/engine/python2/main.py ++++ b/engine/python2/main.py +@@ -4,7 +4,7 @@ + # ibus-anthy - The Anthy engine for IBus + # + # Copyright (c) 2007-2008 Peng Huang +-# Copyright (c) 2010-2016 Takao Fujiwara ++# Copyright (c) 2010-2023 Takao Fujiwara + # Copyright (c) 2007-2016 Red Hat, Inc. + # + # This program is free software; you can redistribute it and/or modify +@@ -179,6 +179,7 @@ def main(): + print >> sys.stderr, 'Unknown argument: %s' % o + print_help(sys.stderr, 1) + ++ IBus.init() + if daemonize: + if os.fork(): + sys.exit() +diff --git a/engine/python3/main.py b/engine/python3/main.py +index 1a2e6fd..8665ae0 100644 +--- a/engine/python3/main.py ++++ b/engine/python3/main.py +@@ -4,7 +4,7 @@ + # ibus-anthy - The Anthy engine for IBus + # + # Copyright (c) 2007-2008 Peng Huang +-# Copyright (c) 2010-2016 Takao Fujiwara ++# Copyright (c) 2010-2023 Takao Fujiwara + # Copyright (c) 2007-2016 Red Hat, Inc. + # + # This program is free software; you can redistribute it and/or modify +@@ -177,6 +177,7 @@ def main(): + print('Unknown argument: %s' % o, file=sys.stderr) + print_help(sys.stderr, 1) + ++ IBus.init() + if daemonize: + if os.fork(): + sys.exit() +-- +2.38.1 + diff --git a/ibus-anthy.spec b/ibus-anthy.spec index ce335e5..e6fb533 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -18,7 +18,7 @@ Name: ibus-anthy Version: 1.5.14 -Release: 10%{?dist} +Release: 11%{?dist} Summary: The Anthy engine for IBus input platform License: GPL-2.0-or-later URL: https://github.com/ibus/ibus/wiki @@ -156,6 +156,9 @@ make -C data check %{_datadir}/installed-tests/%{name} %changelog +* Fri Feb 17 2023 Takao Fujiwara - 1.5.14-11 +- Fix to load EN compose table + * Thu Jan 26 2023 Takao Fujiwara - 1.5.14-10 - Add 2023 Era - Fix PageDown/PageUp From 7496ad9bc3df7dcd4f6155b2320011ebec3120e7 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Thu, 13 Jul 2023 15:35:37 +0900 Subject: [PATCH 36/75] Resolves #2015149 Commit candidate text with clicking on candidate list in OSK --- ibus-anthy-HEAD.patch | 228 ++++++++++++++++++++++++++++++++++++++++++ ibus-anthy.spec | 5 +- 2 files changed, 232 insertions(+), 1 deletion(-) diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch index d701cd7..e9e2d58 100644 --- a/ibus-anthy-HEAD.patch +++ b/ibus-anthy-HEAD.patch @@ -535,3 +535,231 @@ index 1a2e6fd..8665ae0 100644 -- 2.38.1 +From 7f5807eaf37d0a809807c23add3964478bfbdcbe Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Thu, 13 Jul 2023 15:06:38 +0900 +Subject: [PATCH] engine: Enable OSK mode + +Currently gnome-shell sends IBUS_CAP_OSK when OSK(On-Screen Keyboard) +is enabled in GNOME Wayland only. +However users still can type characters using the physical keyboard +while OSK is enabled so the current status is not perfect. + +But ibus-anthy now commit the preedit when a candidate is clicked +on IBus lookup table instead of the selection in the OSK mode. + +BUG=https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2415 +BUG=https://gitlab.gnome.org/GNOME/mutter/-/issues/2441 +BUG=rhbz#2015149 +--- + engine/python2/engine.py | 34 ++++++++++++++++++++++++++++------ + engine/python3/engine.py | 34 ++++++++++++++++++++++++++++------ + 2 files changed, 56 insertions(+), 12 deletions(-) + +diff --git a/engine/python2/engine.py b/engine/python2/engine.py +index 56c0cd5..4266d09 100644 +--- a/engine/python2/engine.py ++++ b/engine/python2/engine.py +@@ -150,6 +150,10 @@ class Engine(IBus.EngineSimple): + self.__prop_dict = {} + self.__input_purpose = 0 + self.__has_input_purpose = False ++ # OSK mode is designed for OSK on gnome-shell, which always shows ++ # IBus lookup window prior to the preedit and selecting a candidate ++ # causes the commmit instead of the selection. ++ self.__osk_mode = False + if hasattr(IBus, 'InputPurpose'): + self.__has_input_purpose = True + try: +@@ -805,7 +809,10 @@ class Engine(IBus.EngineSimple): + keyval = IBus.KEY_0 + else: + keyval = IBus.KEY_1 + index ++ prev_cursor_pos = self.__cursor_pos + self.__on_key_number(keyval) ++ if self.__osk_mode and prev_cursor_pos == self.__cursor_pos: ++ self.__on_key_return() + + def __commit_string(self, text): + self.__reset() +@@ -1094,6 +1101,9 @@ class Engine(IBus.EngineSimple): + self.__reset() + self.__invalidate() + ++ def do_set_capabilities(self, caps): ++ self.__osk_mode = True if caps & IBus.Capabilite.OSK else False ++ + def __destroy(self, obj): + if self.__idle_id != 0: + GLib.source_remove(self.__idle_id) +@@ -1148,7 +1158,10 @@ class Engine(IBus.EngineSimple): + else: + self.__cursor_pos = 0 + self.__fill_lookup_table() +- self.__lookup_table_visible = False ++ if self.__osk_mode: ++ self.__lookup_table_visible = True ++ else: ++ self.__lookup_table_visible = False + + def __end_anthy_convert(self): + if self.__convert_mode == CONV_MODE_OFF: +@@ -1353,7 +1366,8 @@ class Engine(IBus.EngineSimple): + self.__lookup_table.set_cursor_pos(0) + candidate = UN(self.__lookup_table.get_candidate(0).get_text()) + self.__segments[self.__cursor_pos] = 0, candidate +- self.__lookup_table_visible = False ++ if not self.__osk_mode: ++ self.__lookup_table_visible = False + elif self.__segments[self.__cursor_pos][0] != \ + NTH_UNCONVERTED_CANDIDATE: + buf = self.__context.get_segment(self.__cursor_pos, +@@ -1582,7 +1596,8 @@ class Engine(IBus.EngineSimple): + return True + + self.__cursor_pos += 1 +- self.__lookup_table_visible = False ++ if not self.__osk_mode: ++ self.__lookup_table_visible = False + self.__fill_lookup_table() + self.__invalidate() + return True +@@ -2314,7 +2329,10 @@ class Engine(IBus.EngineSimple): + self.__convert_mode = CONV_MODE_PREDICTION + self.__cursor_pos = 0 + self.__fill_lookup_table() +- self.__lookup_table_visible = False ++ if self.__osk_mode: ++ self.__lookup_table_visible = True ++ else: ++ self.__lookup_table_visible = False + self.__invalidate() + + return True +@@ -2393,7 +2411,10 @@ class Engine(IBus.EngineSimple): + self.__convert_mode = CONV_MODE_ANTHY + self.__cursor_pos = 0 + self.__fill_lookup_table() +- self.__lookup_table_visible = False ++ lf self.__osk_mode: ++ self.__lookup_table_visible = True ++ else: ++ self.__lookup_table_visible = False + self.__invalidate() + + return True +@@ -2549,7 +2570,8 @@ class Engine(IBus.EngineSimple): + index = self.__lookup_table.get_cursor_pos() + candidate = UN(self.__lookup_table.get_candidate(index).get_text()) + self.__segments[self.__cursor_pos] = index, candidate +- self.__lookup_table_visible = False ++ if not self.__osk_mode: ++ self.__lookup_table_visible = False + self.__on_key_right() + self.__invalidate() + return True +diff --git a/engine/python3/engine.py b/engine/python3/engine.py +index 2ebf894..d9013e6 100644 +--- a/engine/python3/engine.py ++++ b/engine/python3/engine.py +@@ -151,6 +151,10 @@ class Engine(IBus.EngineSimple): + self.__prop_dict = {} + self.__input_purpose = 0 + self.__has_input_purpose = False ++ # OSK mode is designed for OSK on gnome-shell, which always shows ++ # IBus lookup window prior to the preedit and selecting a candidate ++ # causes the commmit instead of the selection. ++ self.__osk_mode = False + if hasattr(IBus, 'InputPurpose'): + self.__has_input_purpose = True + try: +@@ -800,7 +804,10 @@ class Engine(IBus.EngineSimple): + keyval = IBus.KEY_0 + else: + keyval = IBus.KEY_1 + index ++ prev_cursor_pos = self.__cursor_pos + self.__on_key_number(keyval) ++ if self.__osk_mode and prev_cursor_pos == self.__cursor_pos: ++ self.__on_key_return() + + def __commit_string(self, text): + self.__reset() +@@ -1089,6 +1096,9 @@ class Engine(IBus.EngineSimple): + self.__reset() + self.__invalidate() + ++ def do_set_capabilities(self, caps): ++ self.__osk_mode = True if caps & IBus.Capabilite.OSK else False ++ + def __destroy(self, obj): + if self.__idle_id != 0: + GLib.source_remove(self.__idle_id) +@@ -1143,7 +1153,10 @@ class Engine(IBus.EngineSimple): + else: + self.__cursor_pos = 0 + self.__fill_lookup_table() +- self.__lookup_table_visible = False ++ if self.__osk_mode: ++ self.__lookup_table_visible = True ++ else: ++ self.__lookup_table_visible = False + + def __end_anthy_convert(self): + if self.__convert_mode == CONV_MODE_OFF: +@@ -1348,7 +1361,8 @@ class Engine(IBus.EngineSimple): + self.__lookup_table.set_cursor_pos(0) + candidate = self.__lookup_table.get_candidate(0).get_text() + self.__segments[self.__cursor_pos] = 0, candidate +- self.__lookup_table_visible = False ++ if not self.__osk_mode: ++ self.__lookup_table_visible = False + elif self.__segments[self.__cursor_pos][0] != \ + NTH_UNCONVERTED_CANDIDATE: + buf = self.__context.get_segment(self.__cursor_pos, +@@ -1577,7 +1591,8 @@ class Engine(IBus.EngineSimple): + return True + + self.__cursor_pos += 1 +- self.__lookup_table_visible = False ++ if not self.__osk_mode: ++ self.__lookup_table_visible = False + self.__fill_lookup_table() + self.__invalidate() + return True +@@ -2308,7 +2323,10 @@ class Engine(IBus.EngineSimple): + self.__convert_mode = CONV_MODE_PREDICTION + self.__cursor_pos = 0 + self.__fill_lookup_table() +- self.__lookup_table_visible = False ++ if self.__osk_mode: ++ self.__lookup_table_visible = True ++ else: ++ self.__lookup_table_visible = False + self.__invalidate() + + return True +@@ -2387,7 +2405,10 @@ class Engine(IBus.EngineSimple): + self.__convert_mode = CONV_MODE_ANTHY + self.__cursor_pos = 0 + self.__fill_lookup_table() +- self.__lookup_table_visible = False ++ lf self.__osk_mode: ++ self.__lookup_table_visible = True ++ else: ++ self.__lookup_table_visible = False + self.__invalidate() + + return True +@@ -2543,7 +2564,8 @@ class Engine(IBus.EngineSimple): + index = self.__lookup_table.get_cursor_pos() + candidate = self.__lookup_table.get_candidate(index).get_text() + self.__segments[self.__cursor_pos] = index, candidate +- self.__lookup_table_visible = False ++ if not self.__osk_mode: ++ self.__lookup_table_visible = False + self.__on_key_right() + self.__invalidate() + return True +-- +2.41.0 + diff --git a/ibus-anthy.spec b/ibus-anthy.spec index e6fb533..bad2c5c 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -18,7 +18,7 @@ Name: ibus-anthy Version: 1.5.14 -Release: 11%{?dist} +Release: 12%{?dist} Summary: The Anthy engine for IBus input platform License: GPL-2.0-or-later URL: https://github.com/ibus/ibus/wiki @@ -156,6 +156,9 @@ make -C data check %{_datadir}/installed-tests/%{name} %changelog +* Thu Jul 13 2023 Takao Fujiwara - 1.5.14-12 +- Resolves #2015149 Commit candidate text with clicking on candidate list in OSK + * Fri Feb 17 2023 Takao Fujiwara - 1.5.14-11 - Fix to load EN compose table From 2e13014b1a0c8d25022e888658e7b13b8c376db8 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Thu, 13 Jul 2023 17:52:57 +0900 Subject: [PATCH 37/75] Fix typo --- ibus-anthy-HEAD.patch | 12 ++++++------ ibus-anthy.spec | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch index e9e2d58..fb0f978 100644 --- a/ibus-anthy-HEAD.patch +++ b/ibus-anthy-HEAD.patch @@ -535,9 +535,9 @@ index 1a2e6fd..8665ae0 100644 -- 2.38.1 -From 7f5807eaf37d0a809807c23add3964478bfbdcbe Mon Sep 17 00:00:00 2001 +From ddb7d64007f25aa0108ae9bf65b96aa063157c0a Mon Sep 17 00:00:00 2001 From: fujiwarat -Date: Thu, 13 Jul 2023 15:06:38 +0900 +Date: Thu, 13 Jul 2023 17:49:57 +0900 Subject: [PATCH] engine: Enable OSK mode Currently gnome-shell sends IBUS_CAP_OSK when OSK(On-Screen Keyboard) @@ -557,7 +557,7 @@ BUG=rhbz#2015149 2 files changed, 56 insertions(+), 12 deletions(-) diff --git a/engine/python2/engine.py b/engine/python2/engine.py -index 56c0cd5..4266d09 100644 +index 56c0cd5..4b3da97 100644 --- a/engine/python2/engine.py +++ b/engine/python2/engine.py @@ -150,6 +150,10 @@ class Engine(IBus.EngineSimple): @@ -641,7 +641,7 @@ index 56c0cd5..4266d09 100644 self.__cursor_pos = 0 self.__fill_lookup_table() - self.__lookup_table_visible = False -+ lf self.__osk_mode: ++ if self.__osk_mode: + self.__lookup_table_visible = True + else: + self.__lookup_table_visible = False @@ -659,7 +659,7 @@ index 56c0cd5..4266d09 100644 self.__invalidate() return True diff --git a/engine/python3/engine.py b/engine/python3/engine.py -index 2ebf894..d9013e6 100644 +index 2ebf894..20786f2 100644 --- a/engine/python3/engine.py +++ b/engine/python3/engine.py @@ -151,6 +151,10 @@ class Engine(IBus.EngineSimple): @@ -743,7 +743,7 @@ index 2ebf894..d9013e6 100644 self.__cursor_pos = 0 self.__fill_lookup_table() - self.__lookup_table_visible = False -+ lf self.__osk_mode: ++ if self.__osk_mode: + self.__lookup_table_visible = True + else: + self.__lookup_table_visible = False diff --git a/ibus-anthy.spec b/ibus-anthy.spec index bad2c5c..fb99ddc 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -18,7 +18,7 @@ Name: ibus-anthy Version: 1.5.14 -Release: 12%{?dist} +Release: 13%{?dist} Summary: The Anthy engine for IBus input platform License: GPL-2.0-or-later URL: https://github.com/ibus/ibus/wiki @@ -156,7 +156,7 @@ make -C data check %{_datadir}/installed-tests/%{name} %changelog -* Thu Jul 13 2023 Takao Fujiwara - 1.5.14-12 +* Thu Jul 13 2023 Takao Fujiwara - 1.5.14-13 - Resolves #2015149 Commit candidate text with clicking on candidate list in OSK * Fri Feb 17 2023 Takao Fujiwara - 1.5.14-11 From 8ebcd4ba97e5b5c2c40e0f8a2f1b0b5bd4b818ba Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jul 2023 07:07:14 +0000 Subject: [PATCH 38/75] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ibus-anthy.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ibus-anthy.spec b/ibus-anthy.spec index fb99ddc..83a4872 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -18,7 +18,7 @@ Name: ibus-anthy Version: 1.5.14 -Release: 13%{?dist} +Release: 14%{?dist} Summary: The Anthy engine for IBus input platform License: GPL-2.0-or-later URL: https://github.com/ibus/ibus/wiki @@ -156,6 +156,9 @@ make -C data check %{_datadir}/installed-tests/%{name} %changelog +* Thu Jul 20 2023 Fedora Release Engineering - 1.5.14-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Thu Jul 13 2023 Takao Fujiwara - 1.5.14-13 - Resolves #2015149 Commit candidate text with clicking on candidate list in OSK From a6fcc88d3c28accfc524c38e765842af0f731def Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Fri, 18 Aug 2023 19:08:21 +0900 Subject: [PATCH 39/75] Resolves #2232532 converting Super+Space to wide space character --- ibus-anthy-HEAD.patch | 42 ++++++++++++++++++++++++++++++++++++++++++ ibus-anthy.spec | 5 ++++- 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch index fb0f978..34ecce5 100644 --- a/ibus-anthy-HEAD.patch +++ b/ibus-anthy-HEAD.patch @@ -763,3 +763,45 @@ index 2ebf894..20786f2 100644 -- 2.41.0 +From c1ffc2bfcedab68ce79c2fa9a7f2bfe6cec17595 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Fri, 18 Aug 2023 18:52:58 +0900 +Subject: [PATCH] engine: Distinguish Super-space and space shortcut keys + +BUG=rhbz#2232532 +--- + engine/python2/engine.py | 3 ++- + engine/python3/engine.py | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/engine/python2/engine.py b/engine/python2/engine.py +index 4b3da97..80cfa86 100644 +--- a/engine/python2/engine.py ++++ b/engine/python2/engine.py +@@ -1940,7 +1940,8 @@ class Engine(IBus.EngineSimple): + + state = state & (IBus.ModifierType.SHIFT_MASK | + IBus.ModifierType.CONTROL_MASK | +- IBus.ModifierType.MOD1_MASK) ++ IBus.ModifierType.MOD1_MASK | ++ IBus.ModifierType.MOD4_MASK) + + # ignore key release events + if not is_press: +diff --git a/engine/python3/engine.py b/engine/python3/engine.py +index 20786f2..7c0d283 100644 +--- a/engine/python3/engine.py ++++ b/engine/python3/engine.py +@@ -1935,7 +1935,8 @@ class Engine(IBus.EngineSimple): + + state = state & (IBus.ModifierType.SHIFT_MASK | + IBus.ModifierType.CONTROL_MASK | +- IBus.ModifierType.MOD1_MASK) ++ IBus.ModifierType.MOD1_MASK | ++ IBus.ModifierType.MOD4_MASK) + + # ignore key release events + if not is_press: +-- +2.41.0 + diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 83a4872..6936f98 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -18,7 +18,7 @@ Name: ibus-anthy Version: 1.5.14 -Release: 14%{?dist} +Release: 15%{?dist} Summary: The Anthy engine for IBus input platform License: GPL-2.0-or-later URL: https://github.com/ibus/ibus/wiki @@ -156,6 +156,9 @@ make -C data check %{_datadir}/installed-tests/%{name} %changelog +* Fri Aug 18 2023 Takao Fujiwara - 1.5.14-15 +- Resolves #2232532 converting Super+Space to wide space character + * Thu Jul 20 2023 Fedora Release Engineering - 1.5.14-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 5f35456328f8fef135836a4cc130a6f54ce79905 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Tue, 22 Aug 2023 13:18:49 +0900 Subject: [PATCH 40/75] Delete upstreamed ibus-anthy-HEAD.patch --- ibus-anthy-HEAD.patch | 807 ------------------------------------------ 1 file changed, 807 deletions(-) delete mode 100644 ibus-anthy-HEAD.patch diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch deleted file mode 100644 index 34ecce5..0000000 --- a/ibus-anthy-HEAD.patch +++ /dev/null @@ -1,807 +0,0 @@ -From ed993538c711d817e5365630b65f372e0dfd01a7 Mon Sep 17 00:00:00 2001 -From: fujiwarat -Date: Thu, 27 Jan 2022 15:15:13 +0900 -Subject: [PATCH] data: Update era.t with 2022 - ---- - data/era.t | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/data/era.t b/data/era.t -index a6d297e..686271f 100644 ---- a/data/era.t -+++ b/data/era.t -@@ -2,7 +2,7 @@ - # - # ibus-anthy - The Anthy engine for IBus - # --# Copyright (c) 2010-2021 Takao Fujiwara -+# Copyright (c) 2010-2022 Takao Fujiwara - # Copyright (c) 2010-2013 Red Hat, Inc. - # - # This program is free software; you can redistribute it and/or modify -@@ -338,6 +338,8 @@ - れいわ2 #T35*500 2020 - れいわ3 #T35*500 令和3 - れいわ3 #T35*500 2021 -+れいわ4 #T35*500 令和4 -+れいわ4 #T35*500 2022 - 1868 #T35*500 明治1 - 1869 #T35*500 明治2 - 1870 #T35*500 明治3 -@@ -496,3 +498,4 @@ - 2019 #T35*500 平成31 - 2020 #T35*500 令和2 - 2021 #T35*500 令和3 -+2022 #T35*500 令和4 --- -2.33.1 - -From 4ef5ac95e84056ebd5a446e5e21b5f2a99377363 Mon Sep 17 00:00:00 2001 -From: fujiwarat -Date: Thu, 14 Apr 2022 15:23:26 +0900 -Subject: [PATCH] setup: Minimum candidate window page size to 1 - -IBusLookupTable assert with page_size > 0 (rhbz#2064261) ---- - setup/python2/setup.ui | 2 +- - setup/python3/setup.ui | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/setup/python2/setup.ui b/setup/python2/setup.ui -index 88b19b8..3e82f2e 100644 ---- a/setup/python2/setup.ui -+++ b/setup/python2/setup.ui -@@ -2,7 +2,7 @@ - - - 10 -- 0 -+ 1 - 0 - 1 - 0 -diff --git a/setup/python3/setup.ui b/setup/python3/setup.ui -index 88b19b8..3e82f2e 100644 ---- a/setup/python3/setup.ui -+++ b/setup/python3/setup.ui -@@ -2,7 +2,7 @@ - - - 10 -- 0 -+ 1 - 0 - 1 - 0 --- -2.34.1 - -From 8cfc210cccbe7324e1fbe7d7911eba33c786a520 Mon Sep 17 00:00:00 2001 -From: fujiwarat -Date: Wed, 3 Aug 2022 18:02:02 +0900 -Subject: [PATCH] data: Add icon tag in ibus-anthy.appdata.xml.in - ---- - data/ibus-anthy.appdata.xml.in | 22 +++++ - 1 files changed, 103 insertions(+), 77 deletions(-) - -diff --git a/data/ibus-anthy.appdata.xml.in b/data/ibus-anthy.appdata.xml.in -index 8f246e9..af32a5a 100644 ---- a/data/ibus-anthy.appdata.xml.in -+++ b/data/ibus-anthy.appdata.xml.in -@@ -1,10 +1,12 @@ - -+ - - org.freedesktop.ibus.engine.anthy - GFDL-1.3 - GPL-2.0 - Anthy - Japanese input method -+ https://raw.githubusercontent.com/ibus/ibus-anthy/main/icons/ibus-anthy.png - -

- The Anthy input method is designed for entering Japanese text. -@@ -15,9 +17,29 @@ - out on a traditional keyboard. -

-
-+ -+ input-method -+ Japanese -+ - https://github.com/ibus/ibus/wiki - https://github.com/ibus/ibus-anthy/issues - https://github.com/ibus/ibus/wiki/FAQ -+ https://translate.fedoraproject.org/projects/ibus/ibus-anthy/ -+ -+ -+ -+

See the upstream release list.

-+
-+ https://github.com/ibus/ibus-anthy/releases -+
-+
-+ IBus -+ -+ -+ The Anthy input method is designed for entering Japanese text. -+ http://ibus.github.io/images/2.png -+ -+ - ibus-anthy - tfujiwar_AT_redhat.com -
--- -2.35.3 - -From 8aed07707fba1b7fafed73227916718458409c29 Mon Sep 17 00:00:00 2001 -From: fujiwarat -Date: Wed, 3 Aug 2022 07:38:28 +0900 -Subject: [PATCH] engine: Enable IBus.Engine::has-focus-id property - -IBusEngineClass::has-focus-id propery has been available -since IBus 1.5.27 -IBusEngineClass::focus_in_id() class method is used instead of -IBusEngineClass::focus_id() one in case has-focus-id is %TRUE -and object_path and client name are available with the class method. ---- - engine/python2/engine.py | 22 +++++++++++++++++----- - engine/python3/engine.py | 22 +++++++++++++++++----- - 2 files changed, 34 insertions(+), 10 deletions(-) - -diff --git a/engine/python2/engine.py b/engine/python2/engine.py -index 2fb47b5..d97314a 100644 ---- a/engine/python2/engine.py -+++ b/engine/python2/engine.py -@@ -4,7 +4,7 @@ - # ibus-anthy - The Anthy engine for IBus - # - # Copyright (c) 2007-2008 Peng Huang --# Copyright (c) 2010-2021 Takao Fujiwara -+# Copyright (c) 2010-2022 Takao Fujiwara - # Copyright (c) 2007-2018 Red Hat, Inc. - # - # This program is free software; you can redistribute it and/or modify -@@ -127,9 +127,15 @@ class Engine(IBus.EngineSimple): - __latin_with_shift = True - - def __init__(self, bus, object_path): -- super(Engine, self).__init__(engine_name="anthy", -- connection=bus.get_connection(), -- object_path=object_path) -+ if hasattr(IBus.Engine.props, 'has_focus_id'): -+ super(Engine, self).__init__(engine_name="anthy", -+ connection=bus.get_connection(), -+ object_path=object_path, -+ has_focus_id=True) -+ else: -+ super(Engine, self).__init__(engine_name="anthy", -+ connection=bus.get_connection(), -+ object_path=object_path) - - self.add_table_by_locale(None) - # create anthy context -@@ -1048,6 +1054,12 @@ class Engine(IBus.EngineSimple): - return self.__argb(255, r, g, b) - - def do_focus_in(self): -+ self.do_focus_in_id(None, None) -+ -+ def do_focus_out(self): -+ self.do_focus_out_id(None) -+ -+ def do_focus_in_id(self, object_path, client): - self.register_properties(self.__prop_list) - self.__refresh_typing_mode_property() - mode = self.__prefs.get_value('common', 'behavior-on-focus-out') -@@ -1059,7 +1071,7 @@ class Engine(IBus.EngineSimple): - if size != self.__lookup_table.get_page_size(): - self.__lookup_table.set_page_size(size) - -- def do_focus_out(self): -+ def do_focus_out_id(self, object_path): - if self.__has_input_purpose: - self.__input_purpose = 0 - mode = self.__prefs.get_value('common', 'behavior-on-focus-out') -diff --git a/engine/python3/engine.py b/engine/python3/engine.py -index df4e20d..34b7f9f 100644 ---- a/engine/python3/engine.py -+++ b/engine/python3/engine.py -@@ -4,7 +4,7 @@ - # ibus-anthy - The Anthy engine for IBus - # - # Copyright (c) 2007-2008 Peng Huang --# Copyright (c) 2010-2021 Takao Fujiwara -+# Copyright (c) 2010-2022 Takao Fujiwara - # Copyright (c) 2007-2018 Red Hat, Inc. - # - # This program is free software; you can redistribute it and/or modify -@@ -128,9 +128,15 @@ class Engine(IBus.EngineSimple): - __latin_with_shift = True - - def __init__(self, bus, object_path): -- super(Engine, self).__init__(engine_name="anthy", -- connection=bus.get_connection(), -- object_path=object_path) -+ if hasattr(IBus.Engine.props, 'has_focus_id'): -+ super(Engine, self).__init__(engine_name="anthy", -+ connection=bus.get_connection(), -+ object_path=object_path, -+ has_focus_id=True) -+ else: -+ super(Engine, self).__init__(engine_name="anthy", -+ connection=bus.get_connection(), -+ object_path=object_path) - - self.add_table_by_locale(None) - # create anthy context -@@ -1043,6 +1049,12 @@ class Engine(IBus.EngineSimple): - return self.__argb(255, r, g, b) - - def do_focus_in(self): -+ self.do_focus_in_id(None, None) -+ -+ def do_focus_out(self): -+ self.do_focus_out_id(None) -+ -+ def do_focus_in_id(self, object_path, client): - self.register_properties(self.__prop_list) - self.__refresh_typing_mode_property() - mode = self.__prefs.get_value('common', 'behavior-on-focus-out') -@@ -1054,7 +1066,7 @@ class Engine(IBus.EngineSimple): - if size != self.__lookup_table.get_page_size(): - self.__lookup_table.set_page_size(size) - -- def do_focus_out(self): -+ def do_focus_out_id(self, object_path): - if self.__has_input_purpose: - self.__input_purpose = 0 - mode = self.__prefs.get_value('common', 'behavior-on-focus-out') --- -2.35.3 - -From debc427fad513063cf251a1668584a198c692bd6 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Mangano?= -Date: Wed, 3 Aug 2022 07:38:59 +0900 -Subject: [PATCH] Add the escape_to_latin command as a vi-cooperative cancel (#29) -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -When writing Japanese in Vim, everytime I switch from Insert mode back to -Normal mode, I need to also switch back the IBus input mode to Latin or -else Vim won’t take any of my input. This is kind fo annoying as key -sequences like `:w` easily get wired into muscle memory. - -For comparison, uim has got a vi-cooperative mode for that use case. See - for illustration. - -Here’s a new command which, when converting, behaves like cancel, but -otherwise switches to Latin and sends the Escape key. To make IBus -vi-cooperative, a user can map the Escape key to escape_to_latin instead -of cancel. ---- - engine/python2/engine.py | 14 ++++++++++++++ - engine/python3/engine.py | 14 ++++++++++++++ - setup/python2/anthyprefs.py | 1 + - setup/python3/anthyprefs.py | 1 + - 4 files changed, 30 insertions(+) - -diff --git a/engine/python2/engine.py b/engine/python2/engine.py -index d97314a..218b485 100644 ---- a/engine/python2/engine.py -+++ b/engine/python2/engine.py -@@ -2333,6 +2333,20 @@ class Engine(IBus.EngineSimple): - self.__invalidate() - return True - -+ def __cmd_escape_to_latin(self, keyval, state): -+ """ -+ Vi-cooperative variant of cancel_all. When Vi users press Escape, they -+ expect to return to Normal mode where an IME would not make sense. This -+ command automatically switches back to Latin when sending Escape. When -+ converting, Escape will cancel the conversion instead. -+ """ -+ if self._chk_mode('0'): -+ if Engine.__input_mode != INPUT_MODE_LATIN: -+ self.__cmd_latin_mode(keyval, state) -+ return False -+ else: -+ return self.__cmd_cancel_all(keyval, state) -+ - def __cmd_reconvert(self, keyval, state): - if not self.__preedit_ja_string.is_empty(): - # if user has inputed some chars -diff --git a/engine/python3/engine.py b/engine/python3/engine.py -index 34b7f9f..abb9c02 100644 ---- a/engine/python3/engine.py -+++ b/engine/python3/engine.py -@@ -2327,6 +2327,20 @@ class Engine(IBus.EngineSimple): - self.__invalidate() - return True - -+ def __cmd_escape_to_latin(self, keyval, state): -+ """ -+ Vi-cooperative variant of cancel_all. When Vi users press Escape, they -+ expect to return to Normal mode where an IME would not make sense. This -+ command automatically switches back to Latin when sending Escape. When -+ converting, Escape will cancel the conversion instead. -+ """ -+ if self._chk_mode('0'): -+ if Engine.__input_mode != INPUT_MODE_LATIN: -+ self.__cmd_latin_mode(keyval, state) -+ return False -+ else: -+ return self.__cmd_cancel_all(keyval, state) -+ - def __cmd_reconvert(self, keyval, state): - if not self.__preedit_ja_string.is_empty(): - # if user has inputed some chars -diff --git a/setup/python2/anthyprefs.py b/setup/python2/anthyprefs.py -index 5e3bade..c614491 100644 ---- a/setup/python2/anthyprefs.py -+++ b/setup/python2/anthyprefs.py -@@ -276,6 +276,7 @@ _cmd_keys = [ - 'predict', - 'cancel', - 'cancel_all', -+ 'escape_to_latin', - 'reconvert', - # 'do_nothing', - -diff --git a/setup/python3/anthyprefs.py b/setup/python3/anthyprefs.py -index 33b2a31..404aa09 100644 ---- a/setup/python3/anthyprefs.py -+++ b/setup/python3/anthyprefs.py -@@ -269,6 +269,7 @@ _cmd_keys = [ - 'predict', - 'cancel', - 'cancel_all', -+ 'escape_to_latin', - 'reconvert', - # 'do_nothing', - --- -2.35.3 - -From d1e6853dc4f3cd26b5846b6e4e255bfcaf4e381a Mon Sep 17 00:00:00 2001 -From: fujiwarat -Date: Thu, 26 Jan 2023 19:11:16 +0900 -Subject: [PATCH] engine: Fix page_up/page_down class methods (#27) - ---- - engine/python2/engine.py | 6 +++--- - engine/python3/engine.py | 6 +++--- - 2 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/engine/python2/engine.py b/engine/python2/engine.py -index 218b485..56c0cd5 100644 ---- a/engine/python2/engine.py -+++ b/engine/python2/engine.py -@@ -4,7 +4,7 @@ - # ibus-anthy - The Anthy engine for IBus - # - # Copyright (c) 2007-2008 Peng Huang --# Copyright (c) 2010-2022 Takao Fujiwara -+# Copyright (c) 2010-2023 Takao Fujiwara - # Copyright (c) 2007-2018 Red Hat, Inc. - # - # This program is free software; you can redistribute it and/or modify -@@ -1536,14 +1536,14 @@ class Engine(IBus.EngineSimple): - if self.__preedit_ja_string.is_empty(): - return False - if self.__lookup_table_visible == True: -- self.do_page_up() -+ self.__page_up(self) - return True - - def __on_key_page_down(self): - if self.__preedit_ja_string.is_empty(): - return False - if self.__lookup_table_visible == True: -- self.do_page_down() -+ self.__page_down(self) - return True - - '''def __on_key_left(self): -diff --git a/engine/python3/engine.py b/engine/python3/engine.py -index abb9c02..2ebf894 100644 ---- a/engine/python3/engine.py -+++ b/engine/python3/engine.py -@@ -4,7 +4,7 @@ - # ibus-anthy - The Anthy engine for IBus - # - # Copyright (c) 2007-2008 Peng Huang --# Copyright (c) 2010-2022 Takao Fujiwara -+# Copyright (c) 2010-2023 Takao Fujiwara - # Copyright (c) 2007-2018 Red Hat, Inc. - # - # This program is free software; you can redistribute it and/or modify -@@ -1531,14 +1531,14 @@ class Engine(IBus.EngineSimple): - if self.__preedit_ja_string.is_empty(): - return False - if self.__lookup_table_visible == True: -- self.do_page_up() -+ self.__page_up(self) - return True - - def __on_key_page_down(self): - if self.__preedit_ja_string.is_empty(): - return False - if self.__lookup_table_visible == True: -- self.do_page_down() -+ self.__page_down(self) - return True - - '''def __on_key_left(self): --- -2.38.1 - -From 227ec140cdf4ffcc4f129f59d9ca7db2076554b2 Mon Sep 17 00:00:00 2001 -From: fujiwarat -Date: Thu, 26 Jan 2023 19:42:25 +0900 -Subject: [PATCH] data: Update era.t with 2023 - ---- - data/era.t | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/data/era.t b/data/era.t -index 686271f..7f7bd1b 100644 ---- a/data/era.t -+++ b/data/era.t -@@ -2,7 +2,7 @@ - # - # ibus-anthy - The Anthy engine for IBus - # --# Copyright (c) 2010-2022 Takao Fujiwara -+# Copyright (c) 2010-2023 Takao Fujiwara - # Copyright (c) 2010-2013 Red Hat, Inc. - # - # This program is free software; you can redistribute it and/or modify -@@ -340,6 +340,8 @@ - れいわ3 #T35*500 2021 - れいわ4 #T35*500 令和4 - れいわ4 #T35*500 2022 -+れいわ5 #T35*500 令和5 -+れいわ5 #T35*500 2023 - 1868 #T35*500 明治1 - 1869 #T35*500 明治2 - 1870 #T35*500 明治3 -@@ -499,3 +501,4 @@ - 2020 #T35*500 令和2 - 2021 #T35*500 令和3 - 2022 #T35*500 令和4 -+2023 #T35*500 令和5 --- -2.38.1 - -From 56629c6f9d5e289fdd16388965516fe5ebf5c8dc Mon Sep 17 00:00:00 2001 -From: fujiwarat -Date: Fri, 17 Feb 2023 15:52:58 +0900 -Subject: [PATCH 8/8] engine: Fix to find compose resource in IBus core - -IBus.init() has been required since 1.5.28 after the EN compose -table was moved to GResource. ---- - engine/python2/main.py | 3 ++- - engine/python3/main.py | 3 ++- - 2 files changed, 4 insertions(+), 2 deletions(-) - -diff --git a/engine/python2/main.py b/engine/python2/main.py -index 096cd41..c366293 100644 ---- a/engine/python2/main.py -+++ b/engine/python2/main.py -@@ -4,7 +4,7 @@ - # ibus-anthy - The Anthy engine for IBus - # - # Copyright (c) 2007-2008 Peng Huang --# Copyright (c) 2010-2016 Takao Fujiwara -+# Copyright (c) 2010-2023 Takao Fujiwara - # Copyright (c) 2007-2016 Red Hat, Inc. - # - # This program is free software; you can redistribute it and/or modify -@@ -179,6 +179,7 @@ def main(): - print >> sys.stderr, 'Unknown argument: %s' % o - print_help(sys.stderr, 1) - -+ IBus.init() - if daemonize: - if os.fork(): - sys.exit() -diff --git a/engine/python3/main.py b/engine/python3/main.py -index 1a2e6fd..8665ae0 100644 ---- a/engine/python3/main.py -+++ b/engine/python3/main.py -@@ -4,7 +4,7 @@ - # ibus-anthy - The Anthy engine for IBus - # - # Copyright (c) 2007-2008 Peng Huang --# Copyright (c) 2010-2016 Takao Fujiwara -+# Copyright (c) 2010-2023 Takao Fujiwara - # Copyright (c) 2007-2016 Red Hat, Inc. - # - # This program is free software; you can redistribute it and/or modify -@@ -177,6 +177,7 @@ def main(): - print('Unknown argument: %s' % o, file=sys.stderr) - print_help(sys.stderr, 1) - -+ IBus.init() - if daemonize: - if os.fork(): - sys.exit() --- -2.38.1 - -From ddb7d64007f25aa0108ae9bf65b96aa063157c0a Mon Sep 17 00:00:00 2001 -From: fujiwarat -Date: Thu, 13 Jul 2023 17:49:57 +0900 -Subject: [PATCH] engine: Enable OSK mode - -Currently gnome-shell sends IBUS_CAP_OSK when OSK(On-Screen Keyboard) -is enabled in GNOME Wayland only. -However users still can type characters using the physical keyboard -while OSK is enabled so the current status is not perfect. - -But ibus-anthy now commit the preedit when a candidate is clicked -on IBus lookup table instead of the selection in the OSK mode. - -BUG=https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2415 -BUG=https://gitlab.gnome.org/GNOME/mutter/-/issues/2441 -BUG=rhbz#2015149 ---- - engine/python2/engine.py | 34 ++++++++++++++++++++++++++++------ - engine/python3/engine.py | 34 ++++++++++++++++++++++++++++------ - 2 files changed, 56 insertions(+), 12 deletions(-) - -diff --git a/engine/python2/engine.py b/engine/python2/engine.py -index 56c0cd5..4b3da97 100644 ---- a/engine/python2/engine.py -+++ b/engine/python2/engine.py -@@ -150,6 +150,10 @@ class Engine(IBus.EngineSimple): - self.__prop_dict = {} - self.__input_purpose = 0 - self.__has_input_purpose = False -+ # OSK mode is designed for OSK on gnome-shell, which always shows -+ # IBus lookup window prior to the preedit and selecting a candidate -+ # causes the commmit instead of the selection. -+ self.__osk_mode = False - if hasattr(IBus, 'InputPurpose'): - self.__has_input_purpose = True - try: -@@ -805,7 +809,10 @@ class Engine(IBus.EngineSimple): - keyval = IBus.KEY_0 - else: - keyval = IBus.KEY_1 + index -+ prev_cursor_pos = self.__cursor_pos - self.__on_key_number(keyval) -+ if self.__osk_mode and prev_cursor_pos == self.__cursor_pos: -+ self.__on_key_return() - - def __commit_string(self, text): - self.__reset() -@@ -1094,6 +1101,9 @@ class Engine(IBus.EngineSimple): - self.__reset() - self.__invalidate() - -+ def do_set_capabilities(self, caps): -+ self.__osk_mode = True if caps & IBus.Capabilite.OSK else False -+ - def __destroy(self, obj): - if self.__idle_id != 0: - GLib.source_remove(self.__idle_id) -@@ -1148,7 +1158,10 @@ class Engine(IBus.EngineSimple): - else: - self.__cursor_pos = 0 - self.__fill_lookup_table() -- self.__lookup_table_visible = False -+ if self.__osk_mode: -+ self.__lookup_table_visible = True -+ else: -+ self.__lookup_table_visible = False - - def __end_anthy_convert(self): - if self.__convert_mode == CONV_MODE_OFF: -@@ -1353,7 +1366,8 @@ class Engine(IBus.EngineSimple): - self.__lookup_table.set_cursor_pos(0) - candidate = UN(self.__lookup_table.get_candidate(0).get_text()) - self.__segments[self.__cursor_pos] = 0, candidate -- self.__lookup_table_visible = False -+ if not self.__osk_mode: -+ self.__lookup_table_visible = False - elif self.__segments[self.__cursor_pos][0] != \ - NTH_UNCONVERTED_CANDIDATE: - buf = self.__context.get_segment(self.__cursor_pos, -@@ -1582,7 +1596,8 @@ class Engine(IBus.EngineSimple): - return True - - self.__cursor_pos += 1 -- self.__lookup_table_visible = False -+ if not self.__osk_mode: -+ self.__lookup_table_visible = False - self.__fill_lookup_table() - self.__invalidate() - return True -@@ -2314,7 +2329,10 @@ class Engine(IBus.EngineSimple): - self.__convert_mode = CONV_MODE_PREDICTION - self.__cursor_pos = 0 - self.__fill_lookup_table() -- self.__lookup_table_visible = False -+ if self.__osk_mode: -+ self.__lookup_table_visible = True -+ else: -+ self.__lookup_table_visible = False - self.__invalidate() - - return True -@@ -2393,7 +2411,10 @@ class Engine(IBus.EngineSimple): - self.__convert_mode = CONV_MODE_ANTHY - self.__cursor_pos = 0 - self.__fill_lookup_table() -- self.__lookup_table_visible = False -+ if self.__osk_mode: -+ self.__lookup_table_visible = True -+ else: -+ self.__lookup_table_visible = False - self.__invalidate() - - return True -@@ -2549,7 +2570,8 @@ class Engine(IBus.EngineSimple): - index = self.__lookup_table.get_cursor_pos() - candidate = UN(self.__lookup_table.get_candidate(index).get_text()) - self.__segments[self.__cursor_pos] = index, candidate -- self.__lookup_table_visible = False -+ if not self.__osk_mode: -+ self.__lookup_table_visible = False - self.__on_key_right() - self.__invalidate() - return True -diff --git a/engine/python3/engine.py b/engine/python3/engine.py -index 2ebf894..20786f2 100644 ---- a/engine/python3/engine.py -+++ b/engine/python3/engine.py -@@ -151,6 +151,10 @@ class Engine(IBus.EngineSimple): - self.__prop_dict = {} - self.__input_purpose = 0 - self.__has_input_purpose = False -+ # OSK mode is designed for OSK on gnome-shell, which always shows -+ # IBus lookup window prior to the preedit and selecting a candidate -+ # causes the commmit instead of the selection. -+ self.__osk_mode = False - if hasattr(IBus, 'InputPurpose'): - self.__has_input_purpose = True - try: -@@ -800,7 +804,10 @@ class Engine(IBus.EngineSimple): - keyval = IBus.KEY_0 - else: - keyval = IBus.KEY_1 + index -+ prev_cursor_pos = self.__cursor_pos - self.__on_key_number(keyval) -+ if self.__osk_mode and prev_cursor_pos == self.__cursor_pos: -+ self.__on_key_return() - - def __commit_string(self, text): - self.__reset() -@@ -1089,6 +1096,9 @@ class Engine(IBus.EngineSimple): - self.__reset() - self.__invalidate() - -+ def do_set_capabilities(self, caps): -+ self.__osk_mode = True if caps & IBus.Capabilite.OSK else False -+ - def __destroy(self, obj): - if self.__idle_id != 0: - GLib.source_remove(self.__idle_id) -@@ -1143,7 +1153,10 @@ class Engine(IBus.EngineSimple): - else: - self.__cursor_pos = 0 - self.__fill_lookup_table() -- self.__lookup_table_visible = False -+ if self.__osk_mode: -+ self.__lookup_table_visible = True -+ else: -+ self.__lookup_table_visible = False - - def __end_anthy_convert(self): - if self.__convert_mode == CONV_MODE_OFF: -@@ -1348,7 +1361,8 @@ class Engine(IBus.EngineSimple): - self.__lookup_table.set_cursor_pos(0) - candidate = self.__lookup_table.get_candidate(0).get_text() - self.__segments[self.__cursor_pos] = 0, candidate -- self.__lookup_table_visible = False -+ if not self.__osk_mode: -+ self.__lookup_table_visible = False - elif self.__segments[self.__cursor_pos][0] != \ - NTH_UNCONVERTED_CANDIDATE: - buf = self.__context.get_segment(self.__cursor_pos, -@@ -1577,7 +1591,8 @@ class Engine(IBus.EngineSimple): - return True - - self.__cursor_pos += 1 -- self.__lookup_table_visible = False -+ if not self.__osk_mode: -+ self.__lookup_table_visible = False - self.__fill_lookup_table() - self.__invalidate() - return True -@@ -2308,7 +2323,10 @@ class Engine(IBus.EngineSimple): - self.__convert_mode = CONV_MODE_PREDICTION - self.__cursor_pos = 0 - self.__fill_lookup_table() -- self.__lookup_table_visible = False -+ if self.__osk_mode: -+ self.__lookup_table_visible = True -+ else: -+ self.__lookup_table_visible = False - self.__invalidate() - - return True -@@ -2387,7 +2405,10 @@ class Engine(IBus.EngineSimple): - self.__convert_mode = CONV_MODE_ANTHY - self.__cursor_pos = 0 - self.__fill_lookup_table() -- self.__lookup_table_visible = False -+ if self.__osk_mode: -+ self.__lookup_table_visible = True -+ else: -+ self.__lookup_table_visible = False - self.__invalidate() - - return True -@@ -2543,7 +2564,8 @@ class Engine(IBus.EngineSimple): - index = self.__lookup_table.get_cursor_pos() - candidate = self.__lookup_table.get_candidate(index).get_text() - self.__segments[self.__cursor_pos] = index, candidate -- self.__lookup_table_visible = False -+ if not self.__osk_mode: -+ self.__lookup_table_visible = False - self.__on_key_right() - self.__invalidate() - return True --- -2.41.0 - -From c1ffc2bfcedab68ce79c2fa9a7f2bfe6cec17595 Mon Sep 17 00:00:00 2001 -From: fujiwarat -Date: Fri, 18 Aug 2023 18:52:58 +0900 -Subject: [PATCH] engine: Distinguish Super-space and space shortcut keys - -BUG=rhbz#2232532 ---- - engine/python2/engine.py | 3 ++- - engine/python3/engine.py | 3 ++- - 2 files changed, 4 insertions(+), 2 deletions(-) - -diff --git a/engine/python2/engine.py b/engine/python2/engine.py -index 4b3da97..80cfa86 100644 ---- a/engine/python2/engine.py -+++ b/engine/python2/engine.py -@@ -1940,7 +1940,8 @@ class Engine(IBus.EngineSimple): - - state = state & (IBus.ModifierType.SHIFT_MASK | - IBus.ModifierType.CONTROL_MASK | -- IBus.ModifierType.MOD1_MASK) -+ IBus.ModifierType.MOD1_MASK | -+ IBus.ModifierType.MOD4_MASK) - - # ignore key release events - if not is_press: -diff --git a/engine/python3/engine.py b/engine/python3/engine.py -index 20786f2..7c0d283 100644 ---- a/engine/python3/engine.py -+++ b/engine/python3/engine.py -@@ -1935,7 +1935,8 @@ class Engine(IBus.EngineSimple): - - state = state & (IBus.ModifierType.SHIFT_MASK | - IBus.ModifierType.CONTROL_MASK | -- IBus.ModifierType.MOD1_MASK) -+ IBus.ModifierType.MOD1_MASK | -+ IBus.ModifierType.MOD4_MASK) - - # ignore key release events - if not is_press: --- -2.41.0 - From 8eceb8e421a07a93016d74634a6efda511eed8a2 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Tue, 22 Aug 2023 13:34:36 +0900 Subject: [PATCH 41/75] Bump to 1.5.15 --- .gitignore | 1 + ibus-anthy-HEAD.patch | 0 ibus-anthy.spec | 9 +++++---- sources | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 ibus-anthy-HEAD.patch diff --git a/.gitignore b/.gitignore index 10abb26..cd2030d 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ ibus-anthy.png /ibus-anthy-1.5.12.tar.gz /ibus-anthy-1.5.13.tar.gz /ibus-anthy-1.5.14.tar.gz +/ibus-anthy-1.5.15.tar.gz diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch new file mode 100644 index 0000000..e69de29 diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 6936f98..63ba817 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -17,8 +17,8 @@ %endif Name: ibus-anthy -Version: 1.5.14 -Release: 15%{?dist} +Version: 1.5.15 +Release: 1%{?dist} Summary: The Anthy engine for IBus input platform License: GPL-2.0-or-later URL: https://github.com/ibus/ibus/wiki @@ -26,7 +26,6 @@ Source0: https://github.com/ibus/ibus-anthy/releases/download/%{version}/ # Upstreamed patches. # Patch0: %%{name}-HEAD.patch -Patch0: %{name}-HEAD.patch Patch1: %{name}-1938129-default-hiragana.patch BuildRequires: anthy-unicode-devel @@ -91,7 +90,6 @@ the functionality of the installed %{name} package. %build #autoreconf -f -i -v -autoreconf -f -i -v %configure \ %if %have_default_layout --with-layout='default' \ @@ -156,6 +154,9 @@ make -C data check %{_datadir}/installed-tests/%{name} %changelog +* Tue Aug 22 2023 Takao Fujiwara - 1.5.15-1 +- Bump to 1.5.15 + * Fri Aug 18 2023 Takao Fujiwara - 1.5.14-15 - Resolves #2232532 converting Super+Space to wide space character diff --git a/sources b/sources index aad6592..7eb2667 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ibus-anthy-1.5.14.tar.gz) = 1c18bb18f270f52ae32720062b69d29f2005ecffe7f2418e3f0688c4c23b2d6742b5298ab2283a1937987bb2ce7e63a913107e0c079974775daa898f3619d1d9 +SHA512 (ibus-anthy-1.5.15.tar.gz) = 1da813167bfa610a49a3b931c7484f488e4119df22434f5b89e64161b70058b421abb37ffb6a3017602e868a744821024c9f5e7b8df31ab2931444078d8f7ffe From fe2b41f1ee741c115b22d284709e3a1ab72dd928 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Thu, 7 Sep 2023 13:23:24 +0900 Subject: [PATCH 42/75] Resolves #2237374 Fix to commit selected candidate with OSK --- ibus-anthy-HEAD.patch | 85 +++++++++++++++++++++++++++++++++++++++++++ ibus-anthy.spec | 6 ++- 2 files changed, 90 insertions(+), 1 deletion(-) diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch index e69de29..141a2e8 100644 --- a/ibus-anthy-HEAD.patch +++ b/ibus-anthy-HEAD.patch @@ -0,0 +1,85 @@ +From 137f5d7b0eff9a6e631685a567d06b992146e362 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Thu, 7 Sep 2023 12:57:47 +0900 +Subject: [PATCH] engine: Fix to commit selected candidate with OSK + +Updating preedit after clicking a candidate on IBus candidate window +has an idle time so committing the preedit has to wait for the idle time. + +BUG=rhbz#2237374 +--- + engine/python2/engine.py | 9 ++++++++- + engine/python3/engine.py | 9 ++++++++- + 2 files changed, 16 insertions(+), 2 deletions(-) + +diff --git a/engine/python2/engine.py b/engine/python2/engine.py +index 80cfa86..42d4dc1 100644 +--- a/engine/python2/engine.py ++++ b/engine/python2/engine.py +@@ -154,6 +154,7 @@ class Engine(IBus.EngineSimple): + # IBus lookup window prior to the preedit and selecting a candidate + # causes the commmit instead of the selection. + self.__osk_mode = False ++ self.__selected_preedit_commit = False + if hasattr(IBus, 'InputPurpose'): + self.__has_input_purpose = True + try: +@@ -812,7 +813,10 @@ class Engine(IBus.EngineSimple): + prev_cursor_pos = self.__cursor_pos + self.__on_key_number(keyval) + if self.__osk_mode and prev_cursor_pos == self.__cursor_pos: +- self.__on_key_return() ++ if self.__idle_id != 0: ++ self.__selected_preedit_commit = True ++ else: ++ self.__on_key_return() + + def __commit_string(self, text): + self.__reset() +@@ -1328,6 +1332,9 @@ class Engine(IBus.EngineSimple): + else: + self.__update_convert_chars() + self.__idle_id = 0 ++ if self.__osk_mode and self.__selected_preedit_commit: ++ self.__on_key_return() ++ self.__selected_preedit_commit = False + + def __on_key_return(self): + if self.__preedit_ja_string.is_empty(): +diff --git a/engine/python3/engine.py b/engine/python3/engine.py +index 7c0d283..4b50a01 100644 +--- a/engine/python3/engine.py ++++ b/engine/python3/engine.py +@@ -155,6 +155,7 @@ class Engine(IBus.EngineSimple): + # IBus lookup window prior to the preedit and selecting a candidate + # causes the commmit instead of the selection. + self.__osk_mode = False ++ self.__selected_preedit_commit = False + if hasattr(IBus, 'InputPurpose'): + self.__has_input_purpose = True + try: +@@ -807,7 +808,10 @@ class Engine(IBus.EngineSimple): + prev_cursor_pos = self.__cursor_pos + self.__on_key_number(keyval) + if self.__osk_mode and prev_cursor_pos == self.__cursor_pos: +- self.__on_key_return() ++ if self.__idle_id != 0: ++ self.__selected_preedit_commit = True ++ else: ++ self.__on_key_return() + + def __commit_string(self, text): + self.__reset() +@@ -1323,6 +1327,9 @@ class Engine(IBus.EngineSimple): + else: + self.__update_convert_chars() + self.__idle_id = 0 ++ if self.__osk_mode and self.__selected_preedit_commit: ++ self.__on_key_return() ++ self.__selected_preedit_commit = False + + def __on_key_return(self): + if self.__preedit_ja_string.is_empty(): +-- +2.41.0 + diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 63ba817..ba61d12 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -18,7 +18,7 @@ Name: ibus-anthy Version: 1.5.15 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Anthy engine for IBus input platform License: GPL-2.0-or-later URL: https://github.com/ibus/ibus/wiki @@ -26,6 +26,7 @@ Source0: https://github.com/ibus/ibus-anthy/releases/download/%{version}/ # Upstreamed patches. # Patch0: %%{name}-HEAD.patch +Patch0: %{name}-HEAD.patch Patch1: %{name}-1938129-default-hiragana.patch BuildRequires: anthy-unicode-devel @@ -154,6 +155,9 @@ make -C data check %{_datadir}/installed-tests/%{name} %changelog +* Thu Sep 07 2023 Takao Fujiwara - 1.5.15-2 +- Resolves #2237374 Fix to commit selected candidate with OSK + * Tue Aug 22 2023 Takao Fujiwara - 1.5.15-1 - Bump to 1.5.15 From f4ccb4bba383193c39cb560d5a1b5719138642e1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jan 2024 22:49:23 +0000 Subject: [PATCH 43/75] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- ibus-anthy.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ibus-anthy.spec b/ibus-anthy.spec index ba61d12..5b9bb3f 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -18,7 +18,7 @@ Name: ibus-anthy Version: 1.5.15 -Release: 2%{?dist} +Release: 3%{?dist} Summary: The Anthy engine for IBus input platform License: GPL-2.0-or-later URL: https://github.com/ibus/ibus/wiki @@ -155,6 +155,9 @@ make -C data check %{_datadir}/installed-tests/%{name} %changelog +* Sat Jan 20 2024 Fedora Release Engineering - 1.5.15-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Thu Sep 07 2023 Takao Fujiwara - 1.5.15-2 - Resolves #2237374 Fix to commit selected candidate with OSK From 63fed62ed9fc75f6bcd05aa5ae5adcb108a3b60b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 24 Jan 2024 22:26:32 +0000 Subject: [PATCH 44/75] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- ibus-anthy.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 5b9bb3f..1563415 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -18,7 +18,7 @@ Name: ibus-anthy Version: 1.5.15 -Release: 3%{?dist} +Release: 4%{?dist} Summary: The Anthy engine for IBus input platform License: GPL-2.0-or-later URL: https://github.com/ibus/ibus/wiki @@ -155,6 +155,9 @@ make -C data check %{_datadir}/installed-tests/%{name} %changelog +* Wed Jan 24 2024 Fedora Release Engineering - 1.5.15-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sat Jan 20 2024 Fedora Release Engineering - 1.5.15-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From b3293cdd26201b84737b2bfdd3c32d1391aada9a Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Tue, 30 Jan 2024 13:31:11 +0900 Subject: [PATCH 45/75] Resolves #2261242 Update era.t with 2024 - Add appstream-util validattion --- ibus-anthy-HEAD.patch | 39 +++++++++++++++++++++++++++++++++++++++ ibus-anthy.spec | 10 ++++++++-- 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch index 141a2e8..de26236 100644 --- a/ibus-anthy-HEAD.patch +++ b/ibus-anthy-HEAD.patch @@ -83,3 +83,42 @@ index 7c0d283..4b50a01 100644 -- 2.41.0 +From 0cb7776994fadb4a4edf3259133bb40e7db31936 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Tue, 30 Jan 2024 11:47:51 +0900 +Subject: [PATCH] data: Update era.t with 2024 + +--- + data/era.t | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/data/era.t b/data/era.t +index 7f7bd1b..8750bc5 100644 +--- a/data/era.t ++++ b/data/era.t +@@ -2,7 +2,7 @@ + # + # ibus-anthy - The Anthy engine for IBus + # +-# Copyright (c) 2010-2023 Takao Fujiwara ++# Copyright (c) 2010-2024 Takao Fujiwara + # Copyright (c) 2010-2013 Red Hat, Inc. + # + # This program is free software; you can redistribute it and/or modify +@@ -342,6 +342,8 @@ + れいわ4 #T35*500 2022 + れいわ5 #T35*500 令和5 + れいわ5 #T35*500 2023 ++れいわ6 #T35*500 令和6 ++れいわ6 #T35*500 2024 + 1868 #T35*500 明治1 + 1869 #T35*500 明治2 + 1870 #T35*500 明治3 +@@ -502,3 +504,4 @@ + 2021 #T35*500 令和3 + 2022 #T35*500 令和4 + 2023 #T35*500 令和5 ++2024 #T35*500 令和6 +-- +2.43.0 + diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 1563415..f7ce310 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -18,7 +18,7 @@ Name: ibus-anthy Version: 1.5.15 -Release: 4%{?dist} +Release: 5%{?dist} Summary: The Anthy engine for IBus input platform License: GPL-2.0-or-later URL: https://github.com/ibus/ibus/wiki @@ -40,6 +40,7 @@ BuildRequires: libtool BuildRequires: pkgconfig BuildRequires: python3-devel BuildRequires: python3-gobject +BuildRequires: /usr/bin/appstream-util Requires: ibus >= %{require_ibus_version} %if %{with kasumi_unicode} @@ -118,6 +119,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libanthygobject-%{sub_version}.la %check desktop-file-validate \ $RPM_BUILD_ROOT%{_datadir}/applications/ibus-setup-anthy.desktop +appstream-util validate-relax --nonet $RPM_BUILD_ROOT%{_metainfodir}/*.xml export LANG=C.UTF-8 locale make -C data check @@ -138,10 +140,10 @@ make -C data check %files python %{_libexecdir}/ibus-*-anthy -%{_datadir}/metainfo/*.metainfo.xml %{_datadir}/ibus-anthy/engine %{_datadir}/ibus-anthy/setup %{_datadir}/ibus/component/* +%{_metainfodir}/*.xml %files devel %{_datadir}/gir-1.0/Anthy*.gir @@ -155,6 +157,10 @@ make -C data check %{_datadir}/installed-tests/%{name} %changelog +* Tue Jan 30 2024 Takao Fujiwara - 1.5.15-5 +- Resolves #2261242 Update era.t with 2024 +- Add appstream-util validattion + * Wed Jan 24 2024 Fedora Release Engineering - 1.5.15-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 7bb64e22eb784daa95652cb7c5a041617c521491 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Wed, 31 Jan 2024 12:02:43 +0900 Subject: [PATCH 46/75] Fix make check with GitHub action --- ibus-anthy-HEAD.patch | 207 ++++++++++++++++++++++++++++++++++++++++++ ibus-anthy.spec | 5 +- 2 files changed, 211 insertions(+), 1 deletion(-) diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch index de26236..eea94cb 100644 --- a/ibus-anthy-HEAD.patch +++ b/ibus-anthy-HEAD.patch @@ -1,3 +1,116 @@ +From b279e156ea219833af7515ffa588c82889a1fa73 Mon Sep 17 00:00:00 2001 +From: Maxim Cournoyer +Date: Wed, 23 Aug 2023 11:17:02 +0900 +Subject: [PATCH 1/2] test-build.sh: Fix pycotap detection + +* tests/test-build.sh (init_environment): Extract pycotap checks to... +(maybe_install_pycotap): ... this new procedure. Test if it runs +successfully directly instead of looking into the Python --user-site. + +BUG=https://github.com/ibus/ibus-anthy/pull/35 +--- + tests/test-build.sh | 37 ++++++++++++++++++++++--------------- + 1 file changed, 22 insertions(+), 15 deletions(-) + +diff --git a/tests/test-build.sh b/tests/test-build.sh +index e83b78f..bbfa7e1 100755 +--- a/tests/test-build.sh ++++ b/tests/test-build.sh +@@ -63,26 +63,33 @@ parse_args() + done; + } + ++maybe_install_pycotap() { ++ # Red Hat specific hint. ++ if test -f /etc/redhat-release ; then ++ if ! rpm -q --quiet python3-pycotap; then ++ echo "Please install python3-pycotap" ++ exit -1 ++ fi ++ fi; ++ ++ # Check if pycotap is already available. ++ if ! python3 -m pycotap >/dev/null; then ++ echo "pycotap not found; installing via pip" ++ if ! pip install pycotap --user; then ++ echo "failed to install pycotap" ++ exit -1 ++ fi ++ fi ++} ++ + init_environment() + { + if test x$FORCE_TEST != x ; then + RUN_ARGS="$RUN_ARGS --force"; + fi; +- HAS_TAP=0; +- if test -f /etc/redhat-release ; then +- rpm -q --quiet python3-pycotap +- if test $? -ne 0 ; then +- echo "Not found python3-pycotap"; +- exit -1; +- fi; +- HAS_TAP=1; +- fi; +- TAP_DIR=`python -m site --user-site`/pycotap; +- if test $HAS_TAP -ne 1 && \ +- test x"$TAP_DIR" != x && test ! -d "$TAP_DIR" ; then +- echo "pip install pycotap --user"; +- pip install pycotap --user; +- fi; ++ ++ maybe_install_pycotap ++ + if test ! -f $BUILDDIR/../data/$ANTHY_SCHEMA_FILE ; then + echo "Not found $BUILDDIR/../data/$ANTHY_SCHEMA_FILE"; + exit -1; +-- +2.43.0 + +From 678e1f0f03fe2361153e58930b5339f5a04fcc70 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Wed, 23 Aug 2023 11:27:16 +0900 +Subject: [PATCH 2/2] tests: Run ibus-daemon without panel + +ibus-panel package has been separated since Fedora 39 and this test +does not need ibus-panel. +Also checks pip3. +--- + tests/test-build.sh | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/tests/test-build.sh b/tests/test-build.sh +index bbfa7e1..78c8e04 100755 +--- a/tests/test-build.sh ++++ b/tests/test-build.sh +@@ -74,8 +74,12 @@ maybe_install_pycotap() { + + # Check if pycotap is already available. + if ! python3 -m pycotap >/dev/null; then +- echo "pycotap not found; installing via pip" +- if ! pip install pycotap --user; then ++ PIP=pip3 ++ if ! command -v $PIP &> /dev/null ; then ++ PIP=pip ++ fi ++ echo "pycotap not found; installing via $PIP" ++ if ! $PIP install pycotap --user; then + echo "failed to install pycotap" + exit -1 + fi +@@ -118,7 +122,7 @@ init_environment() + + run_ibus_daemon() + { +- ibus-daemon --daemonize --verbose; ++ ibus-daemon --daemonize --verbose --panel disable; + sleep 1; + SUSER=`echo "$USER" | cut -c 1-7`; + ps -ef | grep "$SUSER" | grep ibus | grep -v grep; +-- +2.43.0 + From 137f5d7b0eff9a6e631685a567d06b992146e362 Mon Sep 17 00:00:00 2001 From: fujiwarat Date: Thu, 7 Sep 2023 12:57:47 +0900 @@ -122,3 +235,97 @@ index 7f7bd1b..8750bc5 100644 -- 2.43.0 +From 16ba437ea9e72685f9ac3bce7000c4e9b4bd2e7b Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Wed, 31 Jan 2024 10:44:48 +0900 +Subject: [PATCH] tests: Fix make check with GitHub action + +The test scripts invoke anthytest.py whose unittest can skip tests +unless Display is available and the return value has been changed +since Python 3.12.1 + +No pycotap.__main__ and cannot be directly executed with `-m` option. + +Fedora 39 Docker does not provide USER environment variable. + +Fixes: https://github.com/ibus/ibus-anthy/commit/b279e15 +--- + tests/test-build.sh | 14 ++++++++++---- + tests/test-console.sh | 8 ++++++-- + 2 files changed, 16 insertions(+), 6 deletions(-) + +diff --git a/tests/test-build.sh b/tests/test-build.sh +index 78c8e04..4f6a5f7 100755 +--- a/tests/test-build.sh ++++ b/tests/test-build.sh +@@ -28,6 +28,8 @@ ANTHY_SCHEMA_FILE=org.freedesktop.ibus.engine.anthy.gschema.xml; + SCHEMA_TMPDIR=""; + FORCE_TEST=""; + RUN_ARGS=""; ++# Fedora 39 Docker does not provide USER ++USER=${USER:-`id | sed -e "s/uid=[0-9]*(\([^)]*\)).*/\1/"`}; + + usage() + { +@@ -73,7 +75,8 @@ maybe_install_pycotap() { + fi; + + # Check if pycotap is already available. +- if ! python3 -m pycotap >/dev/null; then ++ # No pycotap.__main__ and cannot be directly executed with `-m` option ++ if ! python3 -c "import pycotap"; then + PIP=pip3 + if ! command -v $PIP &> /dev/null ; then + PIP=pip +@@ -122,7 +125,8 @@ init_environment() + + run_ibus_daemon() + { +- ibus-daemon --daemonize --verbose --panel disable; ++ # this script can run without Display ++ ibus-daemon --daemonize --verbose --panel disable --emoji-extension disable; + sleep 1; + SUSER=`echo "$USER" | cut -c 1-7`; + ps -ef | grep "$SUSER" | grep ibus | grep -v grep; +@@ -141,8 +145,10 @@ run_test_suite() + env IBUS_ANTHY_ENGINE_PATH=$SRCDIR/../engine/python$i \ + IBUS_ANTHY_SETUP_PATH=$SRCDIR/../setup/python$i \ + python$i -u $SRCDIR/anthytest.py $RUN_ARGS; +- if test $? -ne 0 ; then +- exit -1; ++ RETVAL=$? ++ # Return 5 with "NO TESTS RAN" in unittest/runner.py since python 3.12.1 ++ if test $RETVAL -ne 0 && test $RETVAL -ne 5; then ++ exit 1; + fi; + if test x$FORCE_TEST = x ; then + rm -r $HOME/.anthy; +diff --git a/tests/test-console.sh b/tests/test-console.sh +index 374afa8..0116ae2 100755 +--- a/tests/test-console.sh ++++ b/tests/test-console.sh +@@ -34,6 +34,8 @@ PID_XORG=0; + PID_GNOME_SESSION=0; + FORCE_TEST=""; + RUN_ARGS="--exit"; ++# Fedora 39 Docker does not provide USER ++USER=${USER:-`id | sed -e "s/uid=[0-9]*(\([^)]*\)).*/\1/"`}; + + usage() + { +@@ -152,8 +154,10 @@ run_test_suite() + echo "#### Starting $PYTHON API test $RUN_ARGS"; + export GTK_IM_MODULE=ibus + $PYTHON -u $SRCDIR/anthytest.py $RUN_ARGS; +- if test $? -ne 0 ; then +- exit -1; ++ RETVAL=$? ++ # Return 5 with "NO TESTS RAN" in unittest/runner.py since python 3.12.1 ++ if test $RETVAL -ne 0 && test $RETVAL -ne 5; then ++ exit 1; + fi; + if test x$FORCE_TEST = x ; then + for ANTHY_CONFIG in ".anthy" ".config/anthy" ; do +-- +2.43.0 + diff --git a/ibus-anthy.spec b/ibus-anthy.spec index f7ce310..79c1817 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -18,7 +18,7 @@ Name: ibus-anthy Version: 1.5.15 -Release: 5%{?dist} +Release: 6%{?dist} Summary: The Anthy engine for IBus input platform License: GPL-2.0-or-later URL: https://github.com/ibus/ibus/wiki @@ -157,6 +157,9 @@ make -C data check %{_datadir}/installed-tests/%{name} %changelog +* Wed Jan 31 2024 Takao Fujiwara - 1.5.15-6 +- Fix make check with GitHub action + * Tue Jan 30 2024 Takao Fujiwara - 1.5.15-5 - Resolves #2261242 Update era.t with 2024 - Add appstream-util validattion From b5b5b22db7912cf94000a79cda07c162fae169ac Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Wed, 28 Feb 2024 21:36:37 +0900 Subject: [PATCH 47/75] Delete upstreamed ibus-anthy-HEAD.patch --- ibus-anthy-HEAD.patch | 331 ------------------------------------------ 1 file changed, 331 deletions(-) delete mode 100644 ibus-anthy-HEAD.patch diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch deleted file mode 100644 index eea94cb..0000000 --- a/ibus-anthy-HEAD.patch +++ /dev/null @@ -1,331 +0,0 @@ -From b279e156ea219833af7515ffa588c82889a1fa73 Mon Sep 17 00:00:00 2001 -From: Maxim Cournoyer -Date: Wed, 23 Aug 2023 11:17:02 +0900 -Subject: [PATCH 1/2] test-build.sh: Fix pycotap detection - -* tests/test-build.sh (init_environment): Extract pycotap checks to... -(maybe_install_pycotap): ... this new procedure. Test if it runs -successfully directly instead of looking into the Python --user-site. - -BUG=https://github.com/ibus/ibus-anthy/pull/35 ---- - tests/test-build.sh | 37 ++++++++++++++++++++++--------------- - 1 file changed, 22 insertions(+), 15 deletions(-) - -diff --git a/tests/test-build.sh b/tests/test-build.sh -index e83b78f..bbfa7e1 100755 ---- a/tests/test-build.sh -+++ b/tests/test-build.sh -@@ -63,26 +63,33 @@ parse_args() - done; - } - -+maybe_install_pycotap() { -+ # Red Hat specific hint. -+ if test -f /etc/redhat-release ; then -+ if ! rpm -q --quiet python3-pycotap; then -+ echo "Please install python3-pycotap" -+ exit -1 -+ fi -+ fi; -+ -+ # Check if pycotap is already available. -+ if ! python3 -m pycotap >/dev/null; then -+ echo "pycotap not found; installing via pip" -+ if ! pip install pycotap --user; then -+ echo "failed to install pycotap" -+ exit -1 -+ fi -+ fi -+} -+ - init_environment() - { - if test x$FORCE_TEST != x ; then - RUN_ARGS="$RUN_ARGS --force"; - fi; -- HAS_TAP=0; -- if test -f /etc/redhat-release ; then -- rpm -q --quiet python3-pycotap -- if test $? -ne 0 ; then -- echo "Not found python3-pycotap"; -- exit -1; -- fi; -- HAS_TAP=1; -- fi; -- TAP_DIR=`python -m site --user-site`/pycotap; -- if test $HAS_TAP -ne 1 && \ -- test x"$TAP_DIR" != x && test ! -d "$TAP_DIR" ; then -- echo "pip install pycotap --user"; -- pip install pycotap --user; -- fi; -+ -+ maybe_install_pycotap -+ - if test ! -f $BUILDDIR/../data/$ANTHY_SCHEMA_FILE ; then - echo "Not found $BUILDDIR/../data/$ANTHY_SCHEMA_FILE"; - exit -1; --- -2.43.0 - -From 678e1f0f03fe2361153e58930b5339f5a04fcc70 Mon Sep 17 00:00:00 2001 -From: fujiwarat -Date: Wed, 23 Aug 2023 11:27:16 +0900 -Subject: [PATCH 2/2] tests: Run ibus-daemon without panel - -ibus-panel package has been separated since Fedora 39 and this test -does not need ibus-panel. -Also checks pip3. ---- - tests/test-build.sh | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) - -diff --git a/tests/test-build.sh b/tests/test-build.sh -index bbfa7e1..78c8e04 100755 ---- a/tests/test-build.sh -+++ b/tests/test-build.sh -@@ -74,8 +74,12 @@ maybe_install_pycotap() { - - # Check if pycotap is already available. - if ! python3 -m pycotap >/dev/null; then -- echo "pycotap not found; installing via pip" -- if ! pip install pycotap --user; then -+ PIP=pip3 -+ if ! command -v $PIP &> /dev/null ; then -+ PIP=pip -+ fi -+ echo "pycotap not found; installing via $PIP" -+ if ! $PIP install pycotap --user; then - echo "failed to install pycotap" - exit -1 - fi -@@ -118,7 +122,7 @@ init_environment() - - run_ibus_daemon() - { -- ibus-daemon --daemonize --verbose; -+ ibus-daemon --daemonize --verbose --panel disable; - sleep 1; - SUSER=`echo "$USER" | cut -c 1-7`; - ps -ef | grep "$SUSER" | grep ibus | grep -v grep; --- -2.43.0 - -From 137f5d7b0eff9a6e631685a567d06b992146e362 Mon Sep 17 00:00:00 2001 -From: fujiwarat -Date: Thu, 7 Sep 2023 12:57:47 +0900 -Subject: [PATCH] engine: Fix to commit selected candidate with OSK - -Updating preedit after clicking a candidate on IBus candidate window -has an idle time so committing the preedit has to wait for the idle time. - -BUG=rhbz#2237374 ---- - engine/python2/engine.py | 9 ++++++++- - engine/python3/engine.py | 9 ++++++++- - 2 files changed, 16 insertions(+), 2 deletions(-) - -diff --git a/engine/python2/engine.py b/engine/python2/engine.py -index 80cfa86..42d4dc1 100644 ---- a/engine/python2/engine.py -+++ b/engine/python2/engine.py -@@ -154,6 +154,7 @@ class Engine(IBus.EngineSimple): - # IBus lookup window prior to the preedit and selecting a candidate - # causes the commmit instead of the selection. - self.__osk_mode = False -+ self.__selected_preedit_commit = False - if hasattr(IBus, 'InputPurpose'): - self.__has_input_purpose = True - try: -@@ -812,7 +813,10 @@ class Engine(IBus.EngineSimple): - prev_cursor_pos = self.__cursor_pos - self.__on_key_number(keyval) - if self.__osk_mode and prev_cursor_pos == self.__cursor_pos: -- self.__on_key_return() -+ if self.__idle_id != 0: -+ self.__selected_preedit_commit = True -+ else: -+ self.__on_key_return() - - def __commit_string(self, text): - self.__reset() -@@ -1328,6 +1332,9 @@ class Engine(IBus.EngineSimple): - else: - self.__update_convert_chars() - self.__idle_id = 0 -+ if self.__osk_mode and self.__selected_preedit_commit: -+ self.__on_key_return() -+ self.__selected_preedit_commit = False - - def __on_key_return(self): - if self.__preedit_ja_string.is_empty(): -diff --git a/engine/python3/engine.py b/engine/python3/engine.py -index 7c0d283..4b50a01 100644 ---- a/engine/python3/engine.py -+++ b/engine/python3/engine.py -@@ -155,6 +155,7 @@ class Engine(IBus.EngineSimple): - # IBus lookup window prior to the preedit and selecting a candidate - # causes the commmit instead of the selection. - self.__osk_mode = False -+ self.__selected_preedit_commit = False - if hasattr(IBus, 'InputPurpose'): - self.__has_input_purpose = True - try: -@@ -807,7 +808,10 @@ class Engine(IBus.EngineSimple): - prev_cursor_pos = self.__cursor_pos - self.__on_key_number(keyval) - if self.__osk_mode and prev_cursor_pos == self.__cursor_pos: -- self.__on_key_return() -+ if self.__idle_id != 0: -+ self.__selected_preedit_commit = True -+ else: -+ self.__on_key_return() - - def __commit_string(self, text): - self.__reset() -@@ -1323,6 +1327,9 @@ class Engine(IBus.EngineSimple): - else: - self.__update_convert_chars() - self.__idle_id = 0 -+ if self.__osk_mode and self.__selected_preedit_commit: -+ self.__on_key_return() -+ self.__selected_preedit_commit = False - - def __on_key_return(self): - if self.__preedit_ja_string.is_empty(): --- -2.41.0 - -From 0cb7776994fadb4a4edf3259133bb40e7db31936 Mon Sep 17 00:00:00 2001 -From: fujiwarat -Date: Tue, 30 Jan 2024 11:47:51 +0900 -Subject: [PATCH] data: Update era.t with 2024 - ---- - data/era.t | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/data/era.t b/data/era.t -index 7f7bd1b..8750bc5 100644 ---- a/data/era.t -+++ b/data/era.t -@@ -2,7 +2,7 @@ - # - # ibus-anthy - The Anthy engine for IBus - # --# Copyright (c) 2010-2023 Takao Fujiwara -+# Copyright (c) 2010-2024 Takao Fujiwara - # Copyright (c) 2010-2013 Red Hat, Inc. - # - # This program is free software; you can redistribute it and/or modify -@@ -342,6 +342,8 @@ - れいわ4 #T35*500 2022 - れいわ5 #T35*500 令和5 - れいわ5 #T35*500 2023 -+れいわ6 #T35*500 令和6 -+れいわ6 #T35*500 2024 - 1868 #T35*500 明治1 - 1869 #T35*500 明治2 - 1870 #T35*500 明治3 -@@ -502,3 +504,4 @@ - 2021 #T35*500 令和3 - 2022 #T35*500 令和4 - 2023 #T35*500 令和5 -+2024 #T35*500 令和6 --- -2.43.0 - -From 16ba437ea9e72685f9ac3bce7000c4e9b4bd2e7b Mon Sep 17 00:00:00 2001 -From: fujiwarat -Date: Wed, 31 Jan 2024 10:44:48 +0900 -Subject: [PATCH] tests: Fix make check with GitHub action - -The test scripts invoke anthytest.py whose unittest can skip tests -unless Display is available and the return value has been changed -since Python 3.12.1 - -No pycotap.__main__ and cannot be directly executed with `-m` option. - -Fedora 39 Docker does not provide USER environment variable. - -Fixes: https://github.com/ibus/ibus-anthy/commit/b279e15 ---- - tests/test-build.sh | 14 ++++++++++---- - tests/test-console.sh | 8 ++++++-- - 2 files changed, 16 insertions(+), 6 deletions(-) - -diff --git a/tests/test-build.sh b/tests/test-build.sh -index 78c8e04..4f6a5f7 100755 ---- a/tests/test-build.sh -+++ b/tests/test-build.sh -@@ -28,6 +28,8 @@ ANTHY_SCHEMA_FILE=org.freedesktop.ibus.engine.anthy.gschema.xml; - SCHEMA_TMPDIR=""; - FORCE_TEST=""; - RUN_ARGS=""; -+# Fedora 39 Docker does not provide USER -+USER=${USER:-`id | sed -e "s/uid=[0-9]*(\([^)]*\)).*/\1/"`}; - - usage() - { -@@ -73,7 +75,8 @@ maybe_install_pycotap() { - fi; - - # Check if pycotap is already available. -- if ! python3 -m pycotap >/dev/null; then -+ # No pycotap.__main__ and cannot be directly executed with `-m` option -+ if ! python3 -c "import pycotap"; then - PIP=pip3 - if ! command -v $PIP &> /dev/null ; then - PIP=pip -@@ -122,7 +125,8 @@ init_environment() - - run_ibus_daemon() - { -- ibus-daemon --daemonize --verbose --panel disable; -+ # this script can run without Display -+ ibus-daemon --daemonize --verbose --panel disable --emoji-extension disable; - sleep 1; - SUSER=`echo "$USER" | cut -c 1-7`; - ps -ef | grep "$SUSER" | grep ibus | grep -v grep; -@@ -141,8 +145,10 @@ run_test_suite() - env IBUS_ANTHY_ENGINE_PATH=$SRCDIR/../engine/python$i \ - IBUS_ANTHY_SETUP_PATH=$SRCDIR/../setup/python$i \ - python$i -u $SRCDIR/anthytest.py $RUN_ARGS; -- if test $? -ne 0 ; then -- exit -1; -+ RETVAL=$? -+ # Return 5 with "NO TESTS RAN" in unittest/runner.py since python 3.12.1 -+ if test $RETVAL -ne 0 && test $RETVAL -ne 5; then -+ exit 1; - fi; - if test x$FORCE_TEST = x ; then - rm -r $HOME/.anthy; -diff --git a/tests/test-console.sh b/tests/test-console.sh -index 374afa8..0116ae2 100755 ---- a/tests/test-console.sh -+++ b/tests/test-console.sh -@@ -34,6 +34,8 @@ PID_XORG=0; - PID_GNOME_SESSION=0; - FORCE_TEST=""; - RUN_ARGS="--exit"; -+# Fedora 39 Docker does not provide USER -+USER=${USER:-`id | sed -e "s/uid=[0-9]*(\([^)]*\)).*/\1/"`}; - - usage() - { -@@ -152,8 +154,10 @@ run_test_suite() - echo "#### Starting $PYTHON API test $RUN_ARGS"; - export GTK_IM_MODULE=ibus - $PYTHON -u $SRCDIR/anthytest.py $RUN_ARGS; -- if test $? -ne 0 ; then -- exit -1; -+ RETVAL=$? -+ # Return 5 with "NO TESTS RAN" in unittest/runner.py since python 3.12.1 -+ if test $RETVAL -ne 0 && test $RETVAL -ne 5; then -+ exit 1; - fi; - if test x$FORCE_TEST = x ; then - for ANTHY_CONFIG in ".anthy" ".config/anthy" ; do --- -2.43.0 - From 9221dfea3f64bf13f64c40616ab550445cc9ba90 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Wed, 28 Feb 2024 21:38:10 +0900 Subject: [PATCH 48/75] Bump to 1.5.16 --- .gitignore | 1 + ibus-anthy-HEAD.patch | 0 ibus-anthy.spec | 8 +++++--- sources | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 ibus-anthy-HEAD.patch diff --git a/.gitignore b/.gitignore index cd2030d..b51f22e 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ ibus-anthy.png /ibus-anthy-1.5.13.tar.gz /ibus-anthy-1.5.14.tar.gz /ibus-anthy-1.5.15.tar.gz +/ibus-anthy-1.5.16.tar.gz diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch new file mode 100644 index 0000000..e69de29 diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 79c1817..3ee8e31 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -17,8 +17,8 @@ %endif Name: ibus-anthy -Version: 1.5.15 -Release: 6%{?dist} +Version: 1.5.16 +Release: 1%{?dist} Summary: The Anthy engine for IBus input platform License: GPL-2.0-or-later URL: https://github.com/ibus/ibus/wiki @@ -26,7 +26,6 @@ Source0: https://github.com/ibus/ibus-anthy/releases/download/%{version}/ # Upstreamed patches. # Patch0: %%{name}-HEAD.patch -Patch0: %{name}-HEAD.patch Patch1: %{name}-1938129-default-hiragana.patch BuildRequires: anthy-unicode-devel @@ -157,6 +156,9 @@ make -C data check %{_datadir}/installed-tests/%{name} %changelog +* Wed Feb 28 2024 Takao Fujiwara - 1.5.16-1 +- Bump to 1.5.16 + * Wed Jan 31 2024 Takao Fujiwara - 1.5.15-6 - Fix make check with GitHub action diff --git a/sources b/sources index 7eb2667..012042b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ibus-anthy-1.5.15.tar.gz) = 1da813167bfa610a49a3b931c7484f488e4119df22434f5b89e64161b70058b421abb37ffb6a3017602e868a744821024c9f5e7b8df31ab2931444078d8f7ffe +SHA512 (ibus-anthy-1.5.16.tar.gz) = d1a7b9da402d85af955f96fd8618189fb2e682763f57b5d6b54e7bcf052138ba300f4ba8130a4ac0e8e1e8821319e9b6360e57568c84c1f9845438174e51a959 From 48996d6babbd5fede568555e76eef01ce69ab9ba Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Tue, 12 Mar 2024 19:21:56 +0900 Subject: [PATCH 49/75] Disable Super-l in Hiragana mode --- ibus-anthy-HEAD.patch | 64 +++++++++++++++++++++++++++++++++++++++++++ ibus-anthy.spec | 6 +++- 2 files changed, 69 insertions(+), 1 deletion(-) diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch index e69de29..e33d0c9 100644 --- a/ibus-anthy-HEAD.patch +++ b/ibus-anthy-HEAD.patch @@ -0,0 +1,64 @@ +From 9ae92d7b8085e869d37a068a1a94815c78de6110 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Tue, 12 Mar 2024 18:25:39 +0900 +Subject: [PATCH] engine: Ignore Super modifier key + +Super-l is a shortcut key to launch a lock screen in GNOME desktop +session and now it can be sent to the engine prior to the window +manager. +--- + engine/python2/engine.py | 6 ++++-- + engine/python3/engine.py | 6 ++++-- + 2 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/engine/python2/engine.py b/engine/python2/engine.py +index 42d4dc1..c7ccd3f 100644 +--- a/engine/python2/engine.py ++++ b/engine/python2/engine.py +@@ -4,7 +4,7 @@ + # ibus-anthy - The Anthy engine for IBus + # + # Copyright (c) 2007-2008 Peng Huang +-# Copyright (c) 2010-2023 Takao Fujiwara ++# Copyright (c) 2010-2024 Takao Fujiwara + # Copyright (c) 2007-2018 Red Hat, Inc. + # + # This program is free software; you can redistribute it and/or modify +@@ -1976,7 +1976,9 @@ class Engine(IBus.EngineSimple): + state & hex_mod_mask == hex_mod_mask: + return True + +- if state & (IBus.ModifierType.CONTROL_MASK | IBus.ModifierType.MOD1_MASK): ++ if state & (IBus.ModifierType.CONTROL_MASK | \ ++ IBus.ModifierType.MOD1_MASK | \ ++ IBus.ModifierType.MOD4_MASK): + return False + + if (IBus.KEY_exclam <= keyval <= IBus.KEY_asciitilde or +diff --git a/engine/python3/engine.py b/engine/python3/engine.py +index 4b50a01..0858614 100644 +--- a/engine/python3/engine.py ++++ b/engine/python3/engine.py +@@ -4,7 +4,7 @@ + # ibus-anthy - The Anthy engine for IBus + # + # Copyright (c) 2007-2008 Peng Huang +-# Copyright (c) 2010-2023 Takao Fujiwara ++# Copyright (c) 2010-2024 Takao Fujiwara + # Copyright (c) 2007-2018 Red Hat, Inc. + # + # This program is free software; you can redistribute it and/or modify +@@ -1971,7 +1971,9 @@ class Engine(IBus.EngineSimple): + state & hex_mod_mask == hex_mod_mask: + return True + +- if state & (IBus.ModifierType.CONTROL_MASK | IBus.ModifierType.MOD1_MASK): ++ if state & (IBus.ModifierType.CONTROL_MASK | \ ++ IBus.ModifierType.MOD1_MASK | \ ++ IBus.ModifierType.MOD4_MASK): + return False + + if (IBus.KEY_exclam <= keyval <= IBus.KEY_asciitilde or +-- +2.43.0 + diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 3ee8e31..1a28874 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -18,7 +18,7 @@ Name: ibus-anthy Version: 1.5.16 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Anthy engine for IBus input platform License: GPL-2.0-or-later URL: https://github.com/ibus/ibus/wiki @@ -26,6 +26,7 @@ Source0: https://github.com/ibus/ibus-anthy/releases/download/%{version}/ # Upstreamed patches. # Patch0: %%{name}-HEAD.patch +Patch0: %{name}-HEAD.patch Patch1: %{name}-1938129-default-hiragana.patch BuildRequires: anthy-unicode-devel @@ -156,6 +157,9 @@ make -C data check %{_datadir}/installed-tests/%{name} %changelog +* Tue Mar 12 2024 Takao Fujiwara - 1.5.16-2 +- Disable Super-l in Hiragana mode + * Wed Feb 28 2024 Takao Fujiwara - 1.5.16-1 - Bump to 1.5.16 From 9486253b377cc829ca9bed3d14a1424d91f9e1e5 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Sat, 11 May 2024 18:02:36 +0900 Subject: [PATCH 50/75] Implement autochangelog --- changelog | 462 +++++++++++++++++++++++++++++++++++++++++++++++ ibus-anthy.spec | 464 +----------------------------------------------- 2 files changed, 464 insertions(+), 462 deletions(-) create mode 100644 changelog diff --git a/changelog b/changelog new file mode 100644 index 0000000..2999d16 --- /dev/null +++ b/changelog @@ -0,0 +1,462 @@ +* Tue Mar 12 2024 Takao Fujiwara - 1.5.16-2 +- Disable Super-l in Hiragana mode + +* Wed Feb 28 2024 Takao Fujiwara - 1.5.16-1 +- Bump to 1.5.16 + +* Wed Jan 31 2024 Takao Fujiwara - 1.5.15-6 +- Fix make check with GitHub action + +* Tue Jan 30 2024 Takao Fujiwara - 1.5.15-5 +- Resolves #2261242 Update era.t with 2024 +- Add appstream-util validattion + +* Wed Jan 24 2024 Fedora Release Engineering - 1.5.15-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sat Jan 20 2024 Fedora Release Engineering - 1.5.15-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Thu Sep 07 2023 Takao Fujiwara - 1.5.15-2 +- Resolves #2237374 Fix to commit selected candidate with OSK + +* Tue Aug 22 2023 Takao Fujiwara - 1.5.15-1 +- Bump to 1.5.15 + +* Fri Aug 18 2023 Takao Fujiwara - 1.5.14-15 +- Resolves #2232532 converting Super+Space to wide space character + +* Thu Jul 20 2023 Fedora Release Engineering - 1.5.14-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Thu Jul 13 2023 Takao Fujiwara - 1.5.14-13 +- Resolves #2015149 Commit candidate text with clicking on candidate list in OSK + +* Fri Feb 17 2023 Takao Fujiwara - 1.5.14-11 +- Fix to load EN compose table + +* Thu Jan 26 2023 Takao Fujiwara - 1.5.14-10 +- Add 2023 Era +- Fix PageDown/PageUp + +* Thu Jan 19 2023 Fedora Release Engineering - 1.5.14-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Wed Nov 16 2022 Takao Fujiwara - 1.5.14-8 +- Migrate license tag to SPDX + +* Wed Aug 03 2022 Takao Fujiwara - 1.5.14-7 +- Change metainfo icon from SVG to PNG file + +* Wed Aug 03 2022 Takao Fujiwara - 1.5.14-6 +- Add icon tag in ibus-anthy.appdata.xml.in +- Enable IBus.Engine::has-focus-id property +- Add the escape_to_latin command as a vi-cooperative cancel + +* Thu Jul 21 2022 Fedora Release Engineering - 1.5.14-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Thu Apr 14 2022 Takao Fujiwara - 1.5.14-4 +- Resolves #2064261 assertion error with page size 0 + +* Thu Jan 27 2022 Takao Fujiwara - 1.5.14-3 +- Add 2022 Era + +* Thu Jan 20 2022 Fedora Release Engineering - 1.5.14-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Dec 24 2021 Takao Fujiwara - 1.5.14-1 +- Bump to 1.5.14 + +* Fri Oct 22 2021 Takao Fujiwara - 1.5.13-3 +- export C.UTF-8 for make check + +* Fri Oct 22 2021 Takao Fujiwara - 1.5.13-2 +- Update era.t with 2021 +- Check python3-pycotap.rpm in Fedora instead of pip + +* Fri Aug 20 2021 Takao Fujiwara - 1.5.13-1 +- Bump to 1.5.13 + +* Thu Aug 12 2021 Takao Fujiwara - 1.5.12-10 +- Remove Ctrl+period in circle_kana_mode + +* Thu Jul 22 2021 Fedora Release Engineering - 1.5.12-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Thu Jun 17 2021 Takao Fujiwara - 1.5.12-8 +- Delete postscript for ibus write-cache + +* Tue Apr 27 2021 Takao Fujiwara - 1.5.12-7 +- Move .desktop file from ibus-anthy-python to ibus-anthy +- Fix covscan + +* Wed Apr 21 2021 Takao Fujiwara - 1.5.12-6 +- Resolves: #1948197 Move post to posttrans + +* Tue Apr 20 2021 Takao Fujiwara - 1.5.12-5 +- Delete postscripts + +* Sun Mar 21 2021 Takao Fujiwara - 1.5.12-4 +- Output info to stderr instead of StringIO + +* Tue Mar 16 2021 Takao Fujiwara - 1.5.12-2 +- Change default input mode to Hiragana + +* Mon Feb 22 2021 Takao Fujiwara - 1.5.12-1 +- Bump to 1.5.12 + +* Wed Feb 10 2021 Takao Fujiwara - 1.5.11-10 +- Replace kasumi with kausmi-unicode +- Delete to require intltool +- Delete to call gettext.bind_textdomain_codeset() + +* Tue Jan 26 2021 Fedora Release Engineering - 1.5.11-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 1.5.11-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Thu Jul 09 2020 Takao Fujiwara - 1.5.11-7 +- Use pycotap instead of tappy in CI +- Revise CI from ibus-typing-booster +- Delete _python_bytecompile_extra + +* Wed Jan 29 2020 Fedora Release Engineering - 1.5.11-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Wed Dec 04 2019 Takao Fujiwara - 1.5.11-5 +- Bug 1779129- Fix to install zipcode dict with anthy-unicode + +* Thu Oct 17 2019 Takao Fujiwara - 1.5.11-4 +- Add CI + +* Wed Oct 16 2019 Takao Fujiwara - 1.5.11-3 +- Replace anthy with anthy-unicode +- Install ibus-anthy-tests sub package + +* Thu Jul 25 2019 Fedora Release Engineering - 1.5.11-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Tue May 14 2019 Takao Fujiwara - 1.5.11-1 +- Bump to 1.5.11 + +* Fri Feb 01 2019 Fedora Release Engineering - 1.5.10-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 1.5.10-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Jun 19 2018 Miro Hrončok - 1.5.10-4 +- Rebuilt for Python 3.7 + +* Mon Mar 19 2018 Takao Fujiwara - 1.5.10-3 +- Reverted scriptlets for f27 + +* Mon Mar 19 2018 Takao Fujiwara - 1.5.10-2 +- Reverted ldconfig for f27 + +* Mon Mar 19 2018 Takao Fujiwara - 1.5.10-1 +- Bumped to 1.5.10 + +* Tue Feb 20 2018 Iryna Shcherbina - 1.5.9-7 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + +* Wed Feb 07 2018 Fedora Release Engineering - 1.5.9-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Aug 02 2017 Fedora Release Engineering - 1.5.9-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 1.5.9-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 1.5.9-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Dec 19 2016 Miro Hrončok - 1.5.9-2 +- Rebuild for Python 3.6 + +* Thu Oct 20 2016 Takao Fujiwara - 1.5.9-1 +- Bumped to 1.5.9 + +* Thu Feb 04 2016 Fedora Release Engineering - 1.5.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jan 20 2016 Takao Fujiwara - 1.5.8-1 +- Bumped to 1.5.8 + +* Tue Nov 10 2015 Fedora Release Engineering - 1.5.7-3 +- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 + +* Thu Sep 03 2015 Takao Fujiwara - 1.5.7-2 +- Fix URL in anthy.appdata.xml + +* Thu Jul 16 2015 Takao Fujiwara - 1.5.7-1 +- Bumped to 1.5.7 + +* Wed Jun 17 2015 Fedora Release Engineering - 1.5.6-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Wed Apr 22 2015 Takao Fujiwara - 1.5.6-6 +- Resolved #1214092 Updated ibus-anthy-HEAD.patch +- Added with_appdata macro and removed with_python_pkg macro + +* Wed Mar 25 2015 Richard Hughes - 1.5.6-5 +- Add the AppData file to the right built RPM, in this case we have to install + ibus-anthy-python rather than the main package in gnome-software. +- It turns out adding the AppData file to spec files is a great way to fix these + kinds of bugs. :) + +* Wed Mar 25 2015 Richard Hughes - 1.5.6-4 +- Use an AppStream file compatible with F22 also. + +* Wed Mar 25 2015 Richard Hughes - 1.5.6-3 +- Register as an AppStream component. + +* Thu Nov 13 2014 Takao Fujiwara - 1.5.6-2 +- Updated ibus-anthy-HEAD.patch to fix Enter key on setup dialog. +- Use python2 for epel7. + +* Tue Sep 16 2014 Takao Fujiwara - 1.5.6-1 +- Bumped to 1.5.6 +- Added ibus-anthy-xx-input-mode.patch from ibus-anthy-HEAD.patch. + +* Sat Aug 16 2014 Fedora Release Engineering - 1.5.5-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Tue Jul 22 2014 Kalev Lember - 1.5.5-8 +- Rebuilt for gobject-introspection 1.41.4 + +* Mon Jul 14 2014 Takao Fujiwara - 1.5.5-7 +- Updated ibus-anthy-HEAD.patch + Fixed deprecated warnings with python3-gobject 3.13.3. + +* Mon Jul 14 2014 Takao Fujiwara - 1.5.5-6 +- Updated ibus-anthy-HEAD.patch + Fixed deprecated warnings with python3-gobject 3.13.3. + Set max-width-chars in ibus-anthy-setup wrapped GtkLabel. + Set 'IBUS_SETUP_XID' environment variable in setup. + +* Sat Jun 07 2014 Fedora Release Engineering - 1.5.5-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Mon May 19 2014 Takao Fujiwara - 1.5.5-4 +- Updated ibus-anthy-HEAD.patch to fix clear() in input mode. + +* Mon Apr 21 2014 Takao Fujiwara - 1.5.5-3 +- Updated ibus-anthy-HEAD.patch to unref pixbuf on destroy. + +* Thu Feb 27 2014 Takao Fujiwara - 1.5.5-2 +- Updated ibus-anthy-HEAD.patch to enable property icon. + +* Wed Feb 05 2014 Takao Fujiwara - 1.5.5-1 +- Bumped to 1.5.5 +- Enabled python3. + +* Tue Dec 24 2013 Takao Fujiwara - 1.5.4-2 +- Required ibus-anthy by ibus-anthy-python + +* Mon Sep 09 2013 Takao Fujiwara - 1.5.4-1 +- Bumped to 1.5.4 +- Added ibus-anthy-python subpackage for noarch. +- Deleted ibus-anthy-xx-disable-prop-symbol.patch + +* Sat Aug 03 2013 Fedora Release Engineering - 1.5.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Mon May 13 2013 Takao Fujiwara - 1.5.3-1 +- Bumped to 1.5.3 + +* Mon May 13 2013 Takao Fujiwara - 1.5.2-1 +- Bumped to 1.5.2 + +* Sat May 11 2013 Takao Fujiwara - 1.5.1-1 +- Bumped to 1.5.1 + +* Thu Feb 14 2013 Fedora Release Engineering - 1.5.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Jan 16 2013 Takao Fujiwara - 1.5.0-1 +- Bumped to 1.5.0 + +* Wed Dec 12 2012 Takao Fujiwara - 1.4.99.20121006-3 +- Resolved #884031. Deleted arch depended files. + +* Thu Nov 22 2012 Takao Fujiwara - 1.4.99.20121006-2 +- Updated to save the spec update. + +* Sat Oct 06 2012 Takao Fujiwara - 1.4.99.20121006-1 +- Bumped to 1.4.99.20121006 +- Added ibus-anthy-xx-disable-prop-symbol.patch for Fedora 17 + +* Thu Jul 19 2012 Fedora Release Engineering - 1.4.99.20120327-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Tue Mar 27 2012 Takao Fujiwara - 1.4.99.20120327-1 +- Bumped to 1.4.99.20120327 + +* Sun Mar 04 2012 Takao Fujiwara - 1.3.99.20120304-1 +- Bumped to 1.3.99.20120304 + +* Mon Feb 06 2012 Takao Fujiwara - 1.2.6-5 +- Added ibus-anthy-xx-layout.patch to set 'default' layout in f17. + +* Fri Jan 13 2012 Fedora Release Engineering - 1.2.6-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Fri Jul 29 2011 Takao Fujiwara - 1.2.6-3 +- Added ibus-anthy-xx-icon-symbol.patch to enable the engine symbol & hotkeys. + +* Mon May 16 2011 Takao Fujiwara - 1.2.6-1 +- Bumped to 1.2.6 + Fixed Bug 661943 - the latest page_size for ibus.LookupTable. + +* Wed Feb 09 2011 Fedora Release Engineering - 1.2.5-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Wed Dec 01 2010 Takao Fujiwara - 1.2.5-1 +- Updated to 1.2.5 + Fixed Bug 652881 - SEGV when key tables are customized in new gconf. + Fixed Bug 654322 - new custom keys are not loaded. + +* Tue Oct 26 2010 Takao Fujiwara - 1.2.4-1 +- Updated to 1.2.4 +- Resolves #644771 ibus-anthy [F7] key cannot work with SEGV + +* Sat Oct 16 2010 Takao Fujiwara - 1.2.3-1 +- Updated to 1.2.3 +- Updated translations. + +* Fri Oct 15 2010 Takao Fujiwara - 1.2.2.20101015-1 +- Updated to 1.2.2.20101015 +- Fixed Bug 643291 - ibus-anthy commit_first_segment + +* Wed Jul 21 2010 David Malcolm - 1.2.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + +* Fri Apr 23 2010 Takao Fujiwara - 1.2.1-1 +- Update to 1.2.1 + +* Mon Apr 05 2010 Takao Fujiwara - 1.2.0.20100313-3 +- Update icon + +* Fri Mar 12 2010 Takao Fujiwara - 1.2.0.20100313-1 +- Update to 1.2.0.20100313 +- Update fr.po + +* Fri Mar 12 2010 Takao Fujiwara - 1.2.0.20100312.1-1 +- Update to 1.2.0.20100312.1 +- Minor fix for a translation + +* Fri Mar 12 2010 Takao Fujiwara - 1.2.0.20100312-1 +- Update to 1.2.0.20100312 +- Fix bug 571728 - ibus-anthy support to switch dicts +- Fix bug 572412 - ibus-anthy: Segment convertion mode + +* Fri Mar 05 2010 Takao Fujiwara - 1.2.0.20100115-2 +- Fix bug 564268 - Crash with enabled global input method +- Fix bug 570680 - Support NICOLA-F and NICOLA-A +- Fix romaji_typing_rule. #777 +- Fix Shift + char with CapsLock ON in romaji mode. +- Fix chattering bug. + +* Fri Jan 15 2010 Takao Fujiwara - 1.2.0.20100115-1 +- Update to 1.2.0.20100115 +- Fix bug 550001 - kasumi should be accessible from ibus-anthy + +* Fri Nov 27 2009 Takao Fujiwara - 1.2.0.20091127-1 +- Update to 1.2.0.20091127 +- Fix bug 520989 - ibus-anthy icon enhancement +- Fix bug 531696 - ibus-anthy KeyError is still reported by abrt +- Fix bug 536716 - ibus-anthy: Symbol type change support in ibus-anthy + +* Fri Oct 23 2009 Takao Fujiwara - 1.2.0.20090917-2 +- Fix bug 526881 - ibus-anthy backtrace is reported by the latest abrt + +* Thu Sep 17 2009 Takao Fujiwara - 1.2.0.20090917-1 +- Update to 1.2.0.20090917 +- Fix bug 523642 - ibus-anthy convert_to_char_type_{for,back}ward() + +* Mon Sep 07 2009 Takao Fujiwara - 1.2.0.20090907-2 +- Fix a build issue + +* Mon Sep 07 2009 Takao Fujiwara - 1.2.0.20090907-1 +- Update to 1.2.0.20090907 +- Fix bug 510978 - "Typing Method" configuration doesn't work +- Fix bug 518373 - ibus setup tools need to set gettext textdomain dir. + +* Thu Aug 13 2009 Takao Fujiwara - 1.2.0.20090813-1 +- Update to 1.2.0.20090813 +- Fix bug 509483 - reconversion feature doesn't work +- Fix bug 509485 - commit_first_segment feature doesn't work + +* Tue Aug 04 2009 Peng Huang - 1.2.0.20090804-1 +- Update to 1.2.0.20090804 +- Fix bug 508358 - ANTHY_HISTORY_FILE record only a single word + +* Fri Jul 24 2009 Fedora Release Engineering - 1.2.0.20090617-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Mon Jun 22 2009 Peng Huang - 1.2.0.20090617-1 +- Update to 1.2.0.20090617 + +* Wed Jun 17 2009 Jens Petersen - 1.1.0.20090603-2 +- require kasumi to pull in dictionary tool + +* Wed Jun 03 2009 Peng Huang - 1.1.0.20090603-1 +- Update to 1.1.0.20090603 +- Implement setup ui. + +* Thu Apr 30 2009 Peng Huang - 1.1.0.20090402-2 +- Update to upstream HEAD version +- Fix bug 498250 - Cannot type zenkaku-space + +* Thu Apr 02 2009 Peng Huang - 1.1.0.20090402-1 +- Update to 1.1.0.20090402. +- Fix bug 490747 - Muhenkan (no-conversion) key does not undo conversion +- Fix bug 490750 - Henkan key for candidate conversion doesn't do anything +- Fix bug 490748 - Kana key doesn't do anything + +* Tue Feb 24 2009 Fedora Release Engineering - 1.1.0.20090211-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Wed Feb 11 2009 Peng Huang - 1.1.0.20090211-1 +- 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.20080912-2 +- Rebuild for Python 2.6 + +* Fri Sep 12 2008 Peng Huang - 0.1.1.20080912-1 +- Update to 0.1.1.20080912. + +* Mon Sep 01 2008 Peng Huang - 0.1.1.20080901-1 +- Update to 0.1.1.20080901. + +* Thu Aug 28 2008 Peng Huang - 0.1.1.20080828-1 +- Update to 0.1.1.20080828. + +* Wed Aug 27 2008 Peng Huang - 0.1.1.20080827-1 +- Update to 0.1.1.20080827. + +* Tue Aug 26 2008 Peng Huang - 0.1.1.20080826-1 +- Update to 0.1.1.20080826. + +* 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. + +* Fri Aug 08 2008 Peng Huang - 0.1.0.20080810-1 +- The first version. diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 1a28874..22eee58 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -18,7 +18,7 @@ Name: ibus-anthy Version: 1.5.16 -Release: 2%{?dist} +Release: %autorelease Summary: The Anthy engine for IBus input platform License: GPL-2.0-or-later URL: https://github.com/ibus/ibus/wiki @@ -157,465 +157,5 @@ make -C data check %{_datadir}/installed-tests/%{name} %changelog -* Tue Mar 12 2024 Takao Fujiwara - 1.5.16-2 -- Disable Super-l in Hiragana mode +%autochangelog -* Wed Feb 28 2024 Takao Fujiwara - 1.5.16-1 -- Bump to 1.5.16 - -* Wed Jan 31 2024 Takao Fujiwara - 1.5.15-6 -- Fix make check with GitHub action - -* Tue Jan 30 2024 Takao Fujiwara - 1.5.15-5 -- Resolves #2261242 Update era.t with 2024 -- Add appstream-util validattion - -* Wed Jan 24 2024 Fedora Release Engineering - 1.5.15-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sat Jan 20 2024 Fedora Release Engineering - 1.5.15-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Thu Sep 07 2023 Takao Fujiwara - 1.5.15-2 -- Resolves #2237374 Fix to commit selected candidate with OSK - -* Tue Aug 22 2023 Takao Fujiwara - 1.5.15-1 -- Bump to 1.5.15 - -* Fri Aug 18 2023 Takao Fujiwara - 1.5.14-15 -- Resolves #2232532 converting Super+Space to wide space character - -* Thu Jul 20 2023 Fedora Release Engineering - 1.5.14-14 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Thu Jul 13 2023 Takao Fujiwara - 1.5.14-13 -- Resolves #2015149 Commit candidate text with clicking on candidate list in OSK - -* Fri Feb 17 2023 Takao Fujiwara - 1.5.14-11 -- Fix to load EN compose table - -* Thu Jan 26 2023 Takao Fujiwara - 1.5.14-10 -- Add 2023 Era -- Fix PageDown/PageUp - -* Thu Jan 19 2023 Fedora Release Engineering - 1.5.14-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Wed Nov 16 2022 Takao Fujiwara - 1.5.14-8 -- Migrate license tag to SPDX - -* Wed Aug 03 2022 Takao Fujiwara - 1.5.14-7 -- Change metainfo icon from SVG to PNG file - -* Wed Aug 03 2022 Takao Fujiwara - 1.5.14-6 -- Add icon tag in ibus-anthy.appdata.xml.in -- Enable IBus.Engine::has-focus-id property -- Add the escape_to_latin command as a vi-cooperative cancel - -* Thu Jul 21 2022 Fedora Release Engineering - 1.5.14-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Thu Apr 14 2022 Takao Fujiwara - 1.5.14-4 -- Resolves #2064261 assertion error with page size 0 - -* Thu Jan 27 2022 Takao Fujiwara - 1.5.14-3 -- Add 2022 Era - -* Thu Jan 20 2022 Fedora Release Engineering - 1.5.14-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Fri Dec 24 2021 Takao Fujiwara - 1.5.14-1 -- Bump to 1.5.14 - -* Fri Oct 22 2021 Takao Fujiwara - 1.5.13-3 -- export C.UTF-8 for make check - -* Fri Oct 22 2021 Takao Fujiwara - 1.5.13-2 -- Update era.t with 2021 -- Check python3-pycotap.rpm in Fedora instead of pip - -* Fri Aug 20 2021 Takao Fujiwara - 1.5.13-1 -- Bump to 1.5.13 - -* Thu Aug 12 2021 Takao Fujiwara - 1.5.12-10 -- Remove Ctrl+period in circle_kana_mode - -* Thu Jul 22 2021 Fedora Release Engineering - 1.5.12-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Thu Jun 17 2021 Takao Fujiwara - 1.5.12-8 -- Delete postscript for ibus write-cache - -* Tue Apr 27 2021 Takao Fujiwara - 1.5.12-7 -- Move .desktop file from ibus-anthy-python to ibus-anthy -- Fix covscan - -* Wed Apr 21 2021 Takao Fujiwara - 1.5.12-6 -- Resolves: #1948197 Move post to posttrans - -* Tue Apr 20 2021 Takao Fujiwara - 1.5.12-5 -- Delete postscripts - -* Sun Mar 21 2021 Takao Fujiwara - 1.5.12-4 -- Output info to stderr instead of StringIO - -* Tue Mar 16 2021 Takao Fujiwara - 1.5.12-2 -- Change default input mode to Hiragana - -* Mon Feb 22 2021 Takao Fujiwara - 1.5.12-1 -- Bump to 1.5.12 - -* Wed Feb 10 2021 Takao Fujiwara - 1.5.11-10 -- Replace kasumi with kausmi-unicode -- Delete to require intltool -- Delete to call gettext.bind_textdomain_codeset() - -* Tue Jan 26 2021 Fedora Release Engineering - 1.5.11-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Tue Jul 28 2020 Fedora Release Engineering - 1.5.11-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Thu Jul 09 2020 Takao Fujiwara - 1.5.11-7 -- Use pycotap instead of tappy in CI -- Revise CI from ibus-typing-booster -- Delete _python_bytecompile_extra - -* Wed Jan 29 2020 Fedora Release Engineering - 1.5.11-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Wed Dec 04 2019 Takao Fujiwara - 1.5.11-5 -- Bug 1779129- Fix to install zipcode dict with anthy-unicode - -* Thu Oct 17 2019 Takao Fujiwara - 1.5.11-4 -- Add CI - -* Wed Oct 16 2019 Takao Fujiwara - 1.5.11-3 -- Replace anthy with anthy-unicode -- Install ibus-anthy-tests sub package - -* Thu Jul 25 2019 Fedora Release Engineering - 1.5.11-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Tue May 14 2019 Takao Fujiwara - 1.5.11-1 -- Bump to 1.5.11 - -* Fri Feb 01 2019 Fedora Release Engineering - 1.5.10-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Fri Jul 13 2018 Fedora Release Engineering - 1.5.10-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Tue Jun 19 2018 Miro Hrončok - 1.5.10-4 -- Rebuilt for Python 3.7 - -* Mon Mar 19 2018 Takao Fujiwara - 1.5.10-3 -- Reverted scriptlets for f27 - -* Mon Mar 19 2018 Takao Fujiwara - 1.5.10-2 -- Reverted ldconfig for f27 - -* Mon Mar 19 2018 Takao Fujiwara - 1.5.10-1 -- Bumped to 1.5.10 - -* Tue Feb 20 2018 Iryna Shcherbina - 1.5.9-7 -- Update Python 2 dependency declarations to new packaging standards - (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) - -* Wed Feb 07 2018 Fedora Release Engineering - 1.5.9-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Wed Aug 02 2017 Fedora Release Engineering - 1.5.9-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 1.5.9-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Fri Feb 10 2017 Fedora Release Engineering - 1.5.9-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Mon Dec 19 2016 Miro Hrončok - 1.5.9-2 -- Rebuild for Python 3.6 - -* Thu Oct 20 2016 Takao Fujiwara - 1.5.9-1 -- Bumped to 1.5.9 - -* Thu Feb 04 2016 Fedora Release Engineering - 1.5.8-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Wed Jan 20 2016 Takao Fujiwara - 1.5.8-1 -- Bumped to 1.5.8 - -* Tue Nov 10 2015 Fedora Release Engineering - 1.5.7-3 -- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 - -* Thu Sep 03 2015 Takao Fujiwara - 1.5.7-2 -- Fix URL in anthy.appdata.xml - -* Thu Jul 16 2015 Takao Fujiwara - 1.5.7-1 -- Bumped to 1.5.7 - -* Wed Jun 17 2015 Fedora Release Engineering - 1.5.6-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Wed Apr 22 2015 Takao Fujiwara - 1.5.6-6 -- Resolved #1214092 Updated ibus-anthy-HEAD.patch -- Added with_appdata macro and removed with_python_pkg macro - -* Wed Mar 25 2015 Richard Hughes - 1.5.6-5 -- Add the AppData file to the right built RPM, in this case we have to install - ibus-anthy-python rather than the main package in gnome-software. -- It turns out adding the AppData file to spec files is a great way to fix these - kinds of bugs. :) - -* Wed Mar 25 2015 Richard Hughes - 1.5.6-4 -- Use an AppStream file compatible with F22 also. - -* Wed Mar 25 2015 Richard Hughes - 1.5.6-3 -- Register as an AppStream component. - -* Thu Nov 13 2014 Takao Fujiwara - 1.5.6-2 -- Updated ibus-anthy-HEAD.patch to fix Enter key on setup dialog. -- Use python2 for epel7. - -* Tue Sep 16 2014 Takao Fujiwara - 1.5.6-1 -- Bumped to 1.5.6 -- Added ibus-anthy-xx-input-mode.patch from ibus-anthy-HEAD.patch. - -* Sat Aug 16 2014 Fedora Release Engineering - 1.5.5-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Tue Jul 22 2014 Kalev Lember - 1.5.5-8 -- Rebuilt for gobject-introspection 1.41.4 - -* Mon Jul 14 2014 Takao Fujiwara - 1.5.5-7 -- Updated ibus-anthy-HEAD.patch - Fixed deprecated warnings with python3-gobject 3.13.3. - -* Mon Jul 14 2014 Takao Fujiwara - 1.5.5-6 -- Updated ibus-anthy-HEAD.patch - Fixed deprecated warnings with python3-gobject 3.13.3. - Set max-width-chars in ibus-anthy-setup wrapped GtkLabel. - Set 'IBUS_SETUP_XID' environment variable in setup. - -* Sat Jun 07 2014 Fedora Release Engineering - 1.5.5-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Mon May 19 2014 Takao Fujiwara - 1.5.5-4 -- Updated ibus-anthy-HEAD.patch to fix clear() in input mode. - -* Mon Apr 21 2014 Takao Fujiwara - 1.5.5-3 -- Updated ibus-anthy-HEAD.patch to unref pixbuf on destroy. - -* Thu Feb 27 2014 Takao Fujiwara - 1.5.5-2 -- Updated ibus-anthy-HEAD.patch to enable property icon. - -* Wed Feb 05 2014 Takao Fujiwara - 1.5.5-1 -- Bumped to 1.5.5 -- Enabled python3. - -* Tue Dec 24 2013 Takao Fujiwara - 1.5.4-2 -- Required ibus-anthy by ibus-anthy-python - -* Mon Sep 09 2013 Takao Fujiwara - 1.5.4-1 -- Bumped to 1.5.4 -- Added ibus-anthy-python subpackage for noarch. -- Deleted ibus-anthy-xx-disable-prop-symbol.patch - -* Sat Aug 03 2013 Fedora Release Engineering - 1.5.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Mon May 13 2013 Takao Fujiwara - 1.5.3-1 -- Bumped to 1.5.3 - -* Mon May 13 2013 Takao Fujiwara - 1.5.2-1 -- Bumped to 1.5.2 - -* Sat May 11 2013 Takao Fujiwara - 1.5.1-1 -- Bumped to 1.5.1 - -* Thu Feb 14 2013 Fedora Release Engineering - 1.5.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Wed Jan 16 2013 Takao Fujiwara - 1.5.0-1 -- Bumped to 1.5.0 - -* Wed Dec 12 2012 Takao Fujiwara - 1.4.99.20121006-3 -- Resolved #884031. Deleted arch depended files. - -* Thu Nov 22 2012 Takao Fujiwara - 1.4.99.20121006-2 -- Updated to save the spec update. - -* Sat Oct 06 2012 Takao Fujiwara - 1.4.99.20121006-1 -- Bumped to 1.4.99.20121006 -- Added ibus-anthy-xx-disable-prop-symbol.patch for Fedora 17 - -* Thu Jul 19 2012 Fedora Release Engineering - 1.4.99.20120327-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Tue Mar 27 2012 Takao Fujiwara - 1.4.99.20120327-1 -- Bumped to 1.4.99.20120327 - -* Sun Mar 04 2012 Takao Fujiwara - 1.3.99.20120304-1 -- Bumped to 1.3.99.20120304 - -* Mon Feb 06 2012 Takao Fujiwara - 1.2.6-5 -- Added ibus-anthy-xx-layout.patch to set 'default' layout in f17. - -* Fri Jan 13 2012 Fedora Release Engineering - 1.2.6-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Fri Jul 29 2011 Takao Fujiwara - 1.2.6-3 -- Added ibus-anthy-xx-icon-symbol.patch to enable the engine symbol & hotkeys. - -* Mon May 16 2011 Takao Fujiwara - 1.2.6-1 -- Bumped to 1.2.6 - Fixed Bug 661943 - the latest page_size for ibus.LookupTable. - -* Wed Feb 09 2011 Fedora Release Engineering - 1.2.5-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Wed Dec 01 2010 Takao Fujiwara - 1.2.5-1 -- Updated to 1.2.5 - Fixed Bug 652881 - SEGV when key tables are customized in new gconf. - Fixed Bug 654322 - new custom keys are not loaded. - -* Tue Oct 26 2010 Takao Fujiwara - 1.2.4-1 -- Updated to 1.2.4 -- Resolves #644771 ibus-anthy [F7] key cannot work with SEGV - -* Sat Oct 16 2010 Takao Fujiwara - 1.2.3-1 -- Updated to 1.2.3 -- Updated translations. - -* Fri Oct 15 2010 Takao Fujiwara - 1.2.2.20101015-1 -- Updated to 1.2.2.20101015 -- Fixed Bug 643291 - ibus-anthy commit_first_segment - -* Wed Jul 21 2010 David Malcolm - 1.2.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild - -* Fri Apr 23 2010 Takao Fujiwara - 1.2.1-1 -- Update to 1.2.1 - -* Mon Apr 05 2010 Takao Fujiwara - 1.2.0.20100313-3 -- Update icon - -* Fri Mar 12 2010 Takao Fujiwara - 1.2.0.20100313-1 -- Update to 1.2.0.20100313 -- Update fr.po - -* Fri Mar 12 2010 Takao Fujiwara - 1.2.0.20100312.1-1 -- Update to 1.2.0.20100312.1 -- Minor fix for a translation - -* Fri Mar 12 2010 Takao Fujiwara - 1.2.0.20100312-1 -- Update to 1.2.0.20100312 -- Fix bug 571728 - ibus-anthy support to switch dicts -- Fix bug 572412 - ibus-anthy: Segment convertion mode - -* Fri Mar 05 2010 Takao Fujiwara - 1.2.0.20100115-2 -- Fix bug 564268 - Crash with enabled global input method -- Fix bug 570680 - Support NICOLA-F and NICOLA-A -- Fix romaji_typing_rule. #777 -- Fix Shift + char with CapsLock ON in romaji mode. -- Fix chattering bug. - -* Fri Jan 15 2010 Takao Fujiwara - 1.2.0.20100115-1 -- Update to 1.2.0.20100115 -- Fix bug 550001 - kasumi should be accessible from ibus-anthy - -* Fri Nov 27 2009 Takao Fujiwara - 1.2.0.20091127-1 -- Update to 1.2.0.20091127 -- Fix bug 520989 - ibus-anthy icon enhancement -- Fix bug 531696 - ibus-anthy KeyError is still reported by abrt -- Fix bug 536716 - ibus-anthy: Symbol type change support in ibus-anthy - -* Fri Oct 23 2009 Takao Fujiwara - 1.2.0.20090917-2 -- Fix bug 526881 - ibus-anthy backtrace is reported by the latest abrt - -* Thu Sep 17 2009 Takao Fujiwara - 1.2.0.20090917-1 -- Update to 1.2.0.20090917 -- Fix bug 523642 - ibus-anthy convert_to_char_type_{for,back}ward() - -* Mon Sep 07 2009 Takao Fujiwara - 1.2.0.20090907-2 -- Fix a build issue - -* Mon Sep 07 2009 Takao Fujiwara - 1.2.0.20090907-1 -- Update to 1.2.0.20090907 -- Fix bug 510978 - "Typing Method" configuration doesn't work -- Fix bug 518373 - ibus setup tools need to set gettext textdomain dir. - -* Thu Aug 13 2009 Takao Fujiwara - 1.2.0.20090813-1 -- Update to 1.2.0.20090813 -- Fix bug 509483 - reconversion feature doesn't work -- Fix bug 509485 - commit_first_segment feature doesn't work - -* Tue Aug 04 2009 Peng Huang - 1.2.0.20090804-1 -- Update to 1.2.0.20090804 -- Fix bug 508358 - ANTHY_HISTORY_FILE record only a single word - -* Fri Jul 24 2009 Fedora Release Engineering - 1.2.0.20090617-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Mon Jun 22 2009 Peng Huang - 1.2.0.20090617-1 -- Update to 1.2.0.20090617 - -* Wed Jun 17 2009 Jens Petersen - 1.1.0.20090603-2 -- require kasumi to pull in dictionary tool - -* Wed Jun 03 2009 Peng Huang - 1.1.0.20090603-1 -- Update to 1.1.0.20090603 -- Implement setup ui. - -* Thu Apr 30 2009 Peng Huang - 1.1.0.20090402-2 -- Update to upstream HEAD version -- Fix bug 498250 - Cannot type zenkaku-space - -* Thu Apr 02 2009 Peng Huang - 1.1.0.20090402-1 -- Update to 1.1.0.20090402. -- Fix bug 490747 - Muhenkan (no-conversion) key does not undo conversion -- Fix bug 490750 - Henkan key for candidate conversion doesn't do anything -- Fix bug 490748 - Kana key doesn't do anything - -* Tue Feb 24 2009 Fedora Release Engineering - 1.1.0.20090211-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Wed Feb 11 2009 Peng Huang - 1.1.0.20090211-1 -- 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.20080912-2 -- Rebuild for Python 2.6 - -* Fri Sep 12 2008 Peng Huang - 0.1.1.20080912-1 -- Update to 0.1.1.20080912. - -* Mon Sep 01 2008 Peng Huang - 0.1.1.20080901-1 -- Update to 0.1.1.20080901. - -* Thu Aug 28 2008 Peng Huang - 0.1.1.20080828-1 -- Update to 0.1.1.20080828. - -* Wed Aug 27 2008 Peng Huang - 0.1.1.20080827-1 -- Update to 0.1.1.20080827. - -* Tue Aug 26 2008 Peng Huang - 0.1.1.20080826-1 -- Update to 0.1.1.20080826. - -* 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. - -* Fri Aug 08 2008 Peng Huang - 0.1.0.20080810-1 -- The first version. From a337fe4f3973d415e42583fe146242db7b21dd68 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Sat, 11 May 2024 18:20:59 +0900 Subject: [PATCH 51/75] Implement latest IBus CI Generate results.yml to follow the defined result format https://docs.fedoraproject.org/en-US/ci/standard-test-interface/#_results_format --- .../files/check-results.sh | 66 +++++++++++++++ .../ibus-desktop-testing-role/tasks/main.yml | 83 ++++++++----------- tests/tests.yml | 2 + 3 files changed, 102 insertions(+), 49 deletions(-) create mode 100755 tests/roles/ibus-desktop-testing-role/files/check-results.sh diff --git a/tests/roles/ibus-desktop-testing-role/files/check-results.sh b/tests/roles/ibus-desktop-testing-role/files/check-results.sh new file mode 100755 index 0000000..1160dac --- /dev/null +++ b/tests/roles/ibus-desktop-testing-role/files/check-results.sh @@ -0,0 +1,66 @@ +#!/bin/bash + +TEST_LOG="test.log" +TEST_RUN_IN_RAWHIDE="1" + +if [ $# -gt 0 ] ; then + TEST_LOG="$1" + TEST_RUN_IN_RAWHIDE="$2" +fi + +gen_results() +{ + TEST_RUNTIME="$1" + TEST_STATUS="$2" + TEST_STATUS_UPPER="$(echo "$TEST_STATUS" | tr '[:lower:]' '[:upper:]')" + cat > results.xml << _EOF +results: + +- test: results + result: $TEST_STATUS + runtime: $TEST_RUNTIME + logs: + - ${TEST_STATUS_UPPER}-str_results.log + +_EOF + + DIR=$(dirname "$TEST_LOG") + if [ x"$TEST_LOG" != x ] ; then + cp "$TEST_LOG" "$DIR/${TEST_STATUS_UPPER}-str_results.log" + else + touch "$DIR/${TEST_STATUS_UPPER}-str_results.log" + fi + if [ x"$DIR" != x. ] ; then + mv results.xml "$DIR" + fi +} + +if [ $TEST_RUN_IN_RAWHIDE -eq 0 ] ; then + IS_RAWHIDE="$(grep -i rawhide /etc/fedora-release)" + if [ x"$IS_RAWHIDE" != x ] ; then + gen_results "0" "pass" + exit 0 + fi +fi +if [ ! -f $TEST_LOG ] ; then + gen_results "0" "fail" + echo ERROR +else + FAIL="$(grep "^FAIL: " $TEST_LOG | grep -v 'FAIL: 0$')" + RUNTIME_FAIL="$(grep -v 'frame' $TEST_LOG | grep "^FAIL: " | sed -e "s/FAIL: //")" + RUNTIME_PASS="$(grep -v 'frame' $TEST_LOG | grep "^PASS: " | sed -e "s/PASS: //")" + if [ x"$RUNTIME_FAIL" = x ] ; then + RUNTIME_FAIL="0" + fi + if [ x"$RUNTIME_PASS" = x ] ; then + RUNTIME_PASS="0" + fi + RUNTIME="$(expr $RUNTIME_FAIL + $RUNTIME_PASS)" + if [ x"$FAIL" != x ] ; then + gen_results "$RUNTIME" "fail" + echo ERROR + else + gen_results "$RUNTIME" "pass" + fi +fi + diff --git a/tests/roles/ibus-desktop-testing-role/tasks/main.yml b/tests/roles/ibus-desktop-testing-role/tasks/main.yml index 44c70e2..38733f3 100644 --- a/tests/roles/ibus-desktop-testing-role/tasks/main.yml +++ b/tests/roles/ibus-desktop-testing-role/tasks/main.yml @@ -11,57 +11,46 @@ - name: Installing build dependencies for IBus and GNOME installed-tests testing harness package: name: - - git - - make - - gcc - - diffutils - - autoconf - - automake - - libtool - - glib2-devel - - systemd-devel - - gnome-session - - gnome-shell - - dbus-x11 + # IBus CI sets - xorg-x11-server-Xvfb - ibus - ibus-desktop-testing - - ibus-anthy-tests - # ibus-compose test needs locales - - glibc-langpack-el - - glibc-langpack-fi - - glibc-langpack-pt - - - name: Fetching GNOME installed-tests testing harness source from remote repository - git: - repo: 'https://gitlab.gnome.org/GNOME/gnome-desktop-testing.git' - dest: gnome-desktop-testing - force: yes - - - name: Configure GNOME installed-tests testing harness build - command: ./autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var - args: - chdir: gnome-desktop-testing - - - name: Build GNOME installed-tests testing harness - command: make - args: - chdir: gnome-desktop-testing - - - name: Install GNOME installed-tests testing harness - command: make install - args: - chdir: gnome-desktop-testing + - dbus-x11 + - gnome-desktop-testing + # dnf group info GNOME + - gnome-session-wayland-session + - gnome-session-xsession + - gnome-settings-daemon + - gnome-shell + - polkit + - NetworkManager-ssh-gnome + - PackageKit-command-not-found + - PackageKit-gtk3-module + - adobe-source-code-pro-fonts + - at-spi2-atk + - at-spi2-core + - glib-networking + - gnome-backgrounds + - gnome-classic-session + - gnome-clocks + - gnome-color-manager + - gnome-contacts + - gnome-font-viewer + - gnome-logs + - gnome-maps - name: Start IBus installed-tests testing harness environment: ANSIBLE: 1 TMPDIR: '{{ remote_artifacts }}' G_MESSAGES_DEBUG: 'all' + LANG: 'C.UTF-8' block: - name: Execute IBus tests shell: | set -e + # Delete LC_CTYPE=C.UTF-8 + export -n LC_CTYPE status="FAIL: frame" if [ -f $HOME/.config/anthy/last-record2_default.utf8 ] ; then \ rm $HOME/.config/anthy/last-record2_default.utf8 @@ -80,6 +69,12 @@ if [ $? -eq 0 ]; then status="PASS: frame" fi + if [ -f /var/tmp/ibus-ci-autostart.log ] ; then + echo "#### /var/tmp/ibus-ci-autostart.log" + cat /var/tmp/ibus-ci-autostart.log + rm /var/tmp/ibus-ci-autostart.log + echo "#" + fi echo "${status}" >> {{ remote_artifacts }}/test.log echo "#### {{ remote_artifacts }}/{{ installed_test_name }}.log" if [ -f {{ remote_artifacts }}/{{ installed_test_name }}.log ] ; then @@ -93,17 +88,7 @@ echo "#" - name: Check the results - #shell: grep "^FAIL" {{ remote_artifacts }}/test.log - shell: | - log="{{ remote_artifacts }}/test.log" - if [ ! -f $log ] ; then - echo ERROR - else - FAIL=`grep "^FAIL: " {{ remote_artifacts }}/test.log | grep -v 'FAIL: 0$'` - if [ x"$FAIL" != x ] ; then - echo ERROR - fi - fi + script: check-results.sh "{{ remote_artifacts }}/test.log" "0" register: test_fails failed_when: False diff --git a/tests/tests.yml b/tests/tests.yml index b175564..94551ce 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -5,4 +5,6 @@ tags: - classic - gating + required_packages: + - ibus-anthy-tests From e08f22e0e29bf18685271c5b4dd70444e280f04a Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Sat, 11 May 2024 18:21:51 +0900 Subject: [PATCH 52/75] Update GNOME requirements in CI main.yml - Delete broken chrome-gnome-shell in rawhide - libproxy-webkitgtk4 is no longer available in Fedora 37 --- .../ibus-desktop-testing-role/tasks/main.yml | 77 ++++++++++++++++++- 1 file changed, 74 insertions(+), 3 deletions(-) diff --git a/tests/roles/ibus-desktop-testing-role/tasks/main.yml b/tests/roles/ibus-desktop-testing-role/tasks/main.yml index 38733f3..d4af8a1 100644 --- a/tests/roles/ibus-desktop-testing-role/tasks/main.yml +++ b/tests/roles/ibus-desktop-testing-role/tasks/main.yml @@ -17,27 +17,98 @@ - ibus-desktop-testing - dbus-x11 - gnome-desktop-testing + - gnome-screenshot + # https://pagure.io/fedora-comps/blob/main/f/comps-f38.xml.in # dnf group info GNOME + # mandatory + - dconf + - gdm + - gnome-boxes + - gnome-connections + - gnome-control-center + - gnome-initial-setup - gnome-session-wayland-session - gnome-session-xsession - gnome-settings-daemon - gnome-shell + - gnome-software + - gnome-terminal + - gnome-text-editor + - nautilus - polkit - - NetworkManager-ssh-gnome - - PackageKit-command-not-found - - PackageKit-gtk3-module + - yelp + # default - adobe-source-code-pro-fonts - at-spi2-atk - at-spi2-core + - avahi + - baobab + - cheese + # Sometimes version mismatch with gnome-shell in rawhide + #- chrome-gnome-shell + - eog + - evince + - evince-djvu + - fprintd-pam - glib-networking - gnome-backgrounds + - gnome-bluetooth + - gnome-calculator + - gnome-characters - gnome-classic-session - gnome-clocks - gnome-color-manager - gnome-contacts + - gnome-disk-utility - gnome-font-viewer - gnome-logs - gnome-maps + - gnome-photos + - gnome-remote-desktop + - gnome-system-monitor + - gnome-terminal-nautilus + - gnome-themes-extra + - gnome-user-docs + - gnome-user-share + - gnome-weather + - gvfs-afc + - gvfs-afp + - gvfs-archive + - gvfs-fuse + - gvfs-goa + - gvfs-gphoto2 + - gvfs-mtp + - gvfs-smb + - libcanberra-gtk3 + - libproxy-duktape + - librsvg2 + - libsane-hpaio + - mesa-dri-drivers + - mesa-libEGL + - ModemManager + - NetworkManager-adsl + - NetworkManager-openconnect-gnome + - NetworkManager-openvpn-gnome + - NetworkManager-ppp + - NetworkManager-pptp-gnome + - NetworkManager-ssh-gnome + - NetworkManager-vpnc-gnome + - NetworkManager-wwan + - orca + - PackageKit-command-not-found + - PackageKit-gtk3-module + - rygel + - sane-backends-drivers-scanners + - simple-scan + - sushi + - systemd-oomd-defaults + - totem + - tracker + - tracker-miners + - xdg-desktop-portal + - xdg-desktop-portal-gnome + - xdg-desktop-portal-gtk + - xdg-user-dirs-gtk - name: Start IBus installed-tests testing harness environment: From 1675f64be06309465781e0d6e84bb9bc1af29d61 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Sun, 12 May 2024 13:24:22 +0900 Subject: [PATCH 53/75] Fix CI freeze --- ibus-anthy-HEAD.patch | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch index e33d0c9..e3f6c91 100644 --- a/ibus-anthy-HEAD.patch +++ b/ibus-anthy-HEAD.patch @@ -62,3 +62,40 @@ index 4b50a01..0858614 100644 -- 2.43.0 +From c89a60350b2a949306bf75d64e06a0cde3a7846c Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Sun, 12 May 2024 13:01:50 +0900 +Subject: [PATCH] tests: Fix CI freeze + +Seems infinit calling g_resources_register_unlocked() happens +in register_lazy_static_resources_unlocked() from +g_resources_lookup_data() when ibus_init() is called after +gtk_init() or gdk_display_open() is called. +It's good to delete ibus_init() here since IBus GTK IM module already +calls it. +--- + tests/anthytest.py | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/tests/anthytest.py b/tests/anthytest.py +index 1d18d19..cf2d6bc 100755 +--- a/tests/anthytest.py ++++ b/tests/anthytest.py +@@ -77,7 +77,13 @@ class AnthyTest(unittest.TestCase): + + @classmethod + def setUpClass(cls): +- IBus.init() ++ # Already called in ibus/client/gtk3/ibusim.c:im_module_init(). ++ # Otherwise infinit g_resources_register_unlocked() happens in ++ # register_lazy_static_resources_unlocked() ++ # from g_resources_lookup_data() ++ # or IBus.init() could be called before Gdk.Display.open('') is called. ++ #IBus.init() ++ pass + + def setUp(self): + self.__id = 0 +-- +2.45.0 + From 2a530132510e895e62743fad8654d080b8ab24d7 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Wed, 15 May 2024 13:54:13 +0900 Subject: [PATCH 54/75] Separate Fedora specific packages in CI Checkout gnome-desktop-testing repo until it will be available. --- .../ibus-desktop-testing-role/tasks/main.yml | 113 +++++++++++++----- 1 file changed, 80 insertions(+), 33 deletions(-) diff --git a/tests/roles/ibus-desktop-testing-role/tasks/main.yml b/tests/roles/ibus-desktop-testing-role/tasks/main.yml index d4af8a1..012d1bf 100644 --- a/tests/roles/ibus-desktop-testing-role/tasks/main.yml +++ b/tests/roles/ibus-desktop-testing-role/tasks/main.yml @@ -1,14 +1,12 @@ --- -- name: Check if GNOME installed-tests testing harness is installed - register: gnome_desktop_testing_runner - find: - paths: "{{ ansible_env.PATH.split(':') }}" - pattern: gnome-desktop-testing-runner +- name: Check if Fedora desktop + register: fedora_desktop + stat: + path: "/etc/fedora-release" - name: Build and install GNOME installed-tests testing harness - when: gnome_desktop_testing_runner.matched == 0 block: - - name: Installing build dependencies for IBus and GNOME installed-tests testing harness + - name: Installing common GNOME desktop components package: name: # IBus CI sets @@ -16,14 +14,11 @@ - ibus - ibus-desktop-testing - dbus-x11 - - gnome-desktop-testing - - gnome-screenshot # https://pagure.io/fedora-comps/blob/main/f/comps-f38.xml.in # dnf group info GNOME # mandatory - dconf - gdm - - gnome-boxes - gnome-connections - gnome-control-center - gnome-initial-setup @@ -36,44 +31,30 @@ - gnome-text-editor - nautilus - polkit - - yelp # default - adobe-source-code-pro-fonts - at-spi2-atk - at-spi2-core - avahi - baobab - - cheese # Sometimes version mismatch with gnome-shell in rawhide #- chrome-gnome-shell - - eog - evince - - evince-djvu - fprintd-pam - glib-networking - - gnome-backgrounds - gnome-bluetooth - gnome-calculator - gnome-characters - gnome-classic-session - gnome-clocks - gnome-color-manager - - gnome-contacts - gnome-disk-utility - gnome-font-viewer - gnome-logs - - gnome-maps - - gnome-photos - gnome-remote-desktop - gnome-system-monitor - gnome-terminal-nautilus - - gnome-themes-extra - gnome-user-docs - - gnome-user-share - - gnome-weather - - gvfs-afc - - gvfs-afp - - gvfs-archive - gvfs-fuse - gvfs-goa - gvfs-gphoto2 @@ -87,28 +68,94 @@ - mesa-libEGL - ModemManager - NetworkManager-adsl - - NetworkManager-openconnect-gnome - - NetworkManager-openvpn-gnome - NetworkManager-ppp - - NetworkManager-pptp-gnome - - NetworkManager-ssh-gnome - - NetworkManager-vpnc-gnome - NetworkManager-wwan - orca - PackageKit-command-not-found - PackageKit-gtk3-module - - rygel - sane-backends-drivers-scanners - - simple-scan - - sushi - systemd-oomd-defaults - - totem - tracker - tracker-miners - xdg-desktop-portal - xdg-desktop-portal-gnome - xdg-desktop-portal-gtk - xdg-user-dirs-gtk + - name: Installing Fedora specific GNOME desktop components + when: fedora_desktop.stat.exists == true + package: + name: + - gnome-screenshot + - gnome-boxes + - yelp + - cheese + - eog + - evince-djvu + - gnome-backgrounds + - gnome-contacts + - gnome-maps + - gnome-photos + - gnome-themes-extra + - gnome-user-share + - gnome-weather + - gvfs-afc + - gvfs-afp + - gvfs-archive + - NetworkManager-openconnect-gnome + - NetworkManager-openvpn-gnome + - NetworkManager-pptp-gnome + - NetworkManager-ssh-gnome + - NetworkManager-vpnc-gnome + - rygel + - simple-scan + - sushi + - totem + - name: Installing GNOME installed-tests testing harness + when: fedora_desktop.stat.exists == true + package: + name: + - gnome-desktop-testing + - name: Installing build environment + when: fedora_desktop.stat.exists == false + package: + name: + - autoconf + - automake + - make + - gcc + - git + - libtool + + - name: Fetching GNOME installed-tests testing harness source from remote repository + when: fedora_desktop.stat.exists == false + git: + repo: 'https://gitlab.gnome.org/GNOME/gnome-desktop-testing.git' + dest: gnome-desktop-testing + force: yes + + - name: Checkout v2021.1 tag in GNOME installed-tests testing harness + when: fedora_desktop.stat.exists == false + command: git checkout -b v2021.1 refs/tags/v2021.1 + args: + chdir: gnome-desktop-testing + + - name: Configure GNOME installed-tests testing harness build + when: fedora_desktop.stat.exists == false + command: ./autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var + args: + chdir: gnome-desktop-testing + + - name: Build GNOME installed-tests testing harness + when: fedora_desktop.stat.exists == false + command: make + args: + chdir: gnome-desktop-testing + + - name: Install GNOME installed-tests testing harness + when: fedora_desktop.stat.exists == false + command: make install + args: + chdir: gnome-desktop-testing - name: Start IBus installed-tests testing harness environment: From 424ea5705d6d7e317e65440d44230f8b7a076099 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Thu, 16 May 2024 22:46:26 +0900 Subject: [PATCH 55/75] Enahnce str-commit-final in CI Seems set_fact task has no fail_when or abort modules and set failed_when with register module. --- .../files/check-results.sh | 13 ++++++++----- .../roles/ibus-desktop-testing-role/tasks/main.yml | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/roles/ibus-desktop-testing-role/files/check-results.sh b/tests/roles/ibus-desktop-testing-role/files/check-results.sh index 1160dac..8a46118 100755 --- a/tests/roles/ibus-desktop-testing-role/files/check-results.sh +++ b/tests/roles/ibus-desktop-testing-role/files/check-results.sh @@ -1,11 +1,13 @@ #!/bin/bash TEST_LOG="test.log" -TEST_RUN_IN_RAWHIDE="1" +TEST_RUN_IN_RAWHIDE=1 + +declare -i TEST_RUN_IN_RAWHIDE if [ $# -gt 0 ] ; then TEST_LOG="$1" - TEST_RUN_IN_RAWHIDE="$2" + TEST_RUN_IN_RAWHIDE=$2 fi gen_results() @@ -15,7 +17,6 @@ gen_results() TEST_STATUS_UPPER="$(echo "$TEST_STATUS" | tr '[:lower:]' '[:upper:]')" cat > results.xml << _EOF results: - - test: results result: $TEST_STATUS runtime: $TEST_RUNTIME @@ -39,12 +40,13 @@ if [ $TEST_RUN_IN_RAWHIDE -eq 0 ] ; then IS_RAWHIDE="$(grep -i rawhide /etc/fedora-release)" if [ x"$IS_RAWHIDE" != x ] ; then gen_results "0" "pass" + echo -n PASS exit 0 fi fi if [ ! -f $TEST_LOG ] ; then gen_results "0" "fail" - echo ERROR + echo -n ERROR else FAIL="$(grep "^FAIL: " $TEST_LOG | grep -v 'FAIL: 0$')" RUNTIME_FAIL="$(grep -v 'frame' $TEST_LOG | grep "^FAIL: " | sed -e "s/FAIL: //")" @@ -58,9 +60,10 @@ else RUNTIME="$(expr $RUNTIME_FAIL + $RUNTIME_PASS)" if [ x"$FAIL" != x ] ; then gen_results "$RUNTIME" "fail" - echo ERROR + echo -n ERROR else gen_results "$RUNTIME" "pass" + echo -n PASS fi fi diff --git a/tests/roles/ibus-desktop-testing-role/tasks/main.yml b/tests/roles/ibus-desktop-testing-role/tasks/main.yml index 012d1bf..753384d 100644 --- a/tests/roles/ibus-desktop-testing-role/tasks/main.yml +++ b/tests/roles/ibus-desktop-testing-role/tasks/main.yml @@ -208,7 +208,7 @@ - name: Check the results script: check-results.sh "{{ remote_artifacts }}/test.log" "0" register: test_fails - failed_when: False + failed_when: '"ERROR" in test_fails.stdout' - name: Set role result set_fact: From b9a29bff65eda7aa98b72b9d2d929b4d47c96acb Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 18 Jul 2024 10:04:30 +0000 Subject: [PATCH 56/75] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 7707be173874c5cc86b7aeefe7016cdf6720ddd8 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Sat, 13 Jul 2024 11:10:27 +0900 Subject: [PATCH 57/75] Update required packages in CI - adobe-source-code-pro-fonts is no longer available in RHEL10 - dnf and git do not work after systemd-oomd-defaults is installed --- tests/roles/ibus-desktop-testing-role/tasks/main.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/roles/ibus-desktop-testing-role/tasks/main.yml b/tests/roles/ibus-desktop-testing-role/tasks/main.yml index 753384d..23984ca 100644 --- a/tests/roles/ibus-desktop-testing-role/tasks/main.yml +++ b/tests/roles/ibus-desktop-testing-role/tasks/main.yml @@ -32,7 +32,6 @@ - nautilus - polkit # default - - adobe-source-code-pro-fonts - at-spi2-atk - at-spi2-core - avahi @@ -74,7 +73,7 @@ - PackageKit-command-not-found - PackageKit-gtk3-module - sane-backends-drivers-scanners - - systemd-oomd-defaults + # Move systemd-oomd-defaults to Post-Installing section - tracker - tracker-miners - xdg-desktop-portal @@ -85,6 +84,7 @@ when: fedora_desktop.stat.exists == true package: name: + - adobe-source-code-pro-fonts - gnome-screenshot - gnome-boxes - yelp @@ -139,6 +139,13 @@ args: chdir: gnome-desktop-testing + - name: Post-Installing common GNOME desktop components + package: + name: + # TODO: DNS no longer works after install packages in this section + # so dnf and git should be done before this section + - systemd-oomd-defaults + - name: Configure GNOME installed-tests testing harness build when: fedora_desktop.stat.exists == false command: ./autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var From f308c02576f5e21fe8686d66128bde455ec47fc0 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Thu, 12 Sep 2024 09:26:12 +0900 Subject: [PATCH 58/75] Delete CI with STI CI with STI is archived in: https://src.fedoraproject.org/rpms/ibus-anthy/tree/ci-sti --- .../defaults/main.yml | 3 - .../files/check-results.sh | 69 ------ .../ibus-desktop-testing-role/meta/main.yml | 4 - .../ibus-desktop-testing-role/tasks/main.yml | 228 ------------------ tests/tests.yml | 10 - 5 files changed, 314 deletions(-) delete mode 100644 tests/roles/ibus-desktop-testing-role/defaults/main.yml delete mode 100755 tests/roles/ibus-desktop-testing-role/files/check-results.sh delete mode 100644 tests/roles/ibus-desktop-testing-role/meta/main.yml delete mode 100644 tests/roles/ibus-desktop-testing-role/tasks/main.yml delete mode 100644 tests/tests.yml diff --git a/tests/roles/ibus-desktop-testing-role/defaults/main.yml b/tests/roles/ibus-desktop-testing-role/defaults/main.yml deleted file mode 100644 index 8ff7991..0000000 --- a/tests/roles/ibus-desktop-testing-role/defaults/main.yml +++ /dev/null @@ -1,3 +0,0 @@ -role_pkgs_req: - - rsync - - xorg-x11-server-Xvfb diff --git a/tests/roles/ibus-desktop-testing-role/files/check-results.sh b/tests/roles/ibus-desktop-testing-role/files/check-results.sh deleted file mode 100755 index 8a46118..0000000 --- a/tests/roles/ibus-desktop-testing-role/files/check-results.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/bash - -TEST_LOG="test.log" -TEST_RUN_IN_RAWHIDE=1 - -declare -i TEST_RUN_IN_RAWHIDE - -if [ $# -gt 0 ] ; then - TEST_LOG="$1" - TEST_RUN_IN_RAWHIDE=$2 -fi - -gen_results() -{ - TEST_RUNTIME="$1" - TEST_STATUS="$2" - TEST_STATUS_UPPER="$(echo "$TEST_STATUS" | tr '[:lower:]' '[:upper:]')" - cat > results.xml << _EOF -results: -- test: results - result: $TEST_STATUS - runtime: $TEST_RUNTIME - logs: - - ${TEST_STATUS_UPPER}-str_results.log - -_EOF - - DIR=$(dirname "$TEST_LOG") - if [ x"$TEST_LOG" != x ] ; then - cp "$TEST_LOG" "$DIR/${TEST_STATUS_UPPER}-str_results.log" - else - touch "$DIR/${TEST_STATUS_UPPER}-str_results.log" - fi - if [ x"$DIR" != x. ] ; then - mv results.xml "$DIR" - fi -} - -if [ $TEST_RUN_IN_RAWHIDE -eq 0 ] ; then - IS_RAWHIDE="$(grep -i rawhide /etc/fedora-release)" - if [ x"$IS_RAWHIDE" != x ] ; then - gen_results "0" "pass" - echo -n PASS - exit 0 - fi -fi -if [ ! -f $TEST_LOG ] ; then - gen_results "0" "fail" - echo -n ERROR -else - FAIL="$(grep "^FAIL: " $TEST_LOG | grep -v 'FAIL: 0$')" - RUNTIME_FAIL="$(grep -v 'frame' $TEST_LOG | grep "^FAIL: " | sed -e "s/FAIL: //")" - RUNTIME_PASS="$(grep -v 'frame' $TEST_LOG | grep "^PASS: " | sed -e "s/PASS: //")" - if [ x"$RUNTIME_FAIL" = x ] ; then - RUNTIME_FAIL="0" - fi - if [ x"$RUNTIME_PASS" = x ] ; then - RUNTIME_PASS="0" - fi - RUNTIME="$(expr $RUNTIME_FAIL + $RUNTIME_PASS)" - if [ x"$FAIL" != x ] ; then - gen_results "$RUNTIME" "fail" - echo -n ERROR - else - gen_results "$RUNTIME" "pass" - echo -n PASS - fi -fi - diff --git a/tests/roles/ibus-desktop-testing-role/meta/main.yml b/tests/roles/ibus-desktop-testing-role/meta/main.yml deleted file mode 100644 index 6626402..0000000 --- a/tests/roles/ibus-desktop-testing-role/meta/main.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- - -dependencies: - - role: str-common-init diff --git a/tests/roles/ibus-desktop-testing-role/tasks/main.yml b/tests/roles/ibus-desktop-testing-role/tasks/main.yml deleted file mode 100644 index 23984ca..0000000 --- a/tests/roles/ibus-desktop-testing-role/tasks/main.yml +++ /dev/null @@ -1,228 +0,0 @@ ---- -- name: Check if Fedora desktop - register: fedora_desktop - stat: - path: "/etc/fedora-release" - -- name: Build and install GNOME installed-tests testing harness - block: - - name: Installing common GNOME desktop components - package: - name: - # IBus CI sets - - xorg-x11-server-Xvfb - - ibus - - ibus-desktop-testing - - dbus-x11 - # https://pagure.io/fedora-comps/blob/main/f/comps-f38.xml.in - # dnf group info GNOME - # mandatory - - dconf - - gdm - - gnome-connections - - gnome-control-center - - gnome-initial-setup - - gnome-session-wayland-session - - gnome-session-xsession - - gnome-settings-daemon - - gnome-shell - - gnome-software - - gnome-terminal - - gnome-text-editor - - nautilus - - polkit - # default - - at-spi2-atk - - at-spi2-core - - avahi - - baobab - # Sometimes version mismatch with gnome-shell in rawhide - #- chrome-gnome-shell - - evince - - fprintd-pam - - glib-networking - - gnome-bluetooth - - gnome-calculator - - gnome-characters - - gnome-classic-session - - gnome-clocks - - gnome-color-manager - - gnome-disk-utility - - gnome-font-viewer - - gnome-logs - - gnome-remote-desktop - - gnome-system-monitor - - gnome-terminal-nautilus - - gnome-user-docs - - gvfs-fuse - - gvfs-goa - - gvfs-gphoto2 - - gvfs-mtp - - gvfs-smb - - libcanberra-gtk3 - - libproxy-duktape - - librsvg2 - - libsane-hpaio - - mesa-dri-drivers - - mesa-libEGL - - ModemManager - - NetworkManager-adsl - - NetworkManager-ppp - - NetworkManager-wwan - - orca - - PackageKit-command-not-found - - PackageKit-gtk3-module - - sane-backends-drivers-scanners - # Move systemd-oomd-defaults to Post-Installing section - - tracker - - tracker-miners - - xdg-desktop-portal - - xdg-desktop-portal-gnome - - xdg-desktop-portal-gtk - - xdg-user-dirs-gtk - - name: Installing Fedora specific GNOME desktop components - when: fedora_desktop.stat.exists == true - package: - name: - - adobe-source-code-pro-fonts - - gnome-screenshot - - gnome-boxes - - yelp - - cheese - - eog - - evince-djvu - - gnome-backgrounds - - gnome-contacts - - gnome-maps - - gnome-photos - - gnome-themes-extra - - gnome-user-share - - gnome-weather - - gvfs-afc - - gvfs-afp - - gvfs-archive - - NetworkManager-openconnect-gnome - - NetworkManager-openvpn-gnome - - NetworkManager-pptp-gnome - - NetworkManager-ssh-gnome - - NetworkManager-vpnc-gnome - - rygel - - simple-scan - - sushi - - totem - - name: Installing GNOME installed-tests testing harness - when: fedora_desktop.stat.exists == true - package: - name: - - gnome-desktop-testing - - name: Installing build environment - when: fedora_desktop.stat.exists == false - package: - name: - - autoconf - - automake - - make - - gcc - - git - - libtool - - - name: Fetching GNOME installed-tests testing harness source from remote repository - when: fedora_desktop.stat.exists == false - git: - repo: 'https://gitlab.gnome.org/GNOME/gnome-desktop-testing.git' - dest: gnome-desktop-testing - force: yes - - - name: Checkout v2021.1 tag in GNOME installed-tests testing harness - when: fedora_desktop.stat.exists == false - command: git checkout -b v2021.1 refs/tags/v2021.1 - args: - chdir: gnome-desktop-testing - - - name: Post-Installing common GNOME desktop components - package: - name: - # TODO: DNS no longer works after install packages in this section - # so dnf and git should be done before this section - - systemd-oomd-defaults - - - name: Configure GNOME installed-tests testing harness build - when: fedora_desktop.stat.exists == false - command: ./autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var - args: - chdir: gnome-desktop-testing - - - name: Build GNOME installed-tests testing harness - when: fedora_desktop.stat.exists == false - command: make - args: - chdir: gnome-desktop-testing - - - name: Install GNOME installed-tests testing harness - when: fedora_desktop.stat.exists == false - command: make install - args: - chdir: gnome-desktop-testing - -- name: Start IBus installed-tests testing harness - environment: - ANSIBLE: 1 - TMPDIR: '{{ remote_artifacts }}' - G_MESSAGES_DEBUG: 'all' - LANG: 'C.UTF-8' - block: - - name: Execute IBus tests - shell: | - set -e - # Delete LC_CTYPE=C.UTF-8 - export -n LC_CTYPE - status="FAIL: frame" - if [ -f $HOME/.config/anthy/last-record2_default.utf8 ] ; then \ - rm $HOME/.config/anthy/last-record2_default.utf8 - fi - if [ -f $HOME/.anthy/last-record2_default.utf8 ] ; then \ - rm $HOME/.anthy/last-record2_default.utf8 - fi - ibus-desktop-testing-runner \ - --no-graphics \ - --runner=gnome \ - --timeout=1200 \ - --tests='{{ installed_test_name }}' \ - --output='{{ remote_artifacts }}/{{ installed_test_name }}.log' \ - --result='{{ remote_artifacts }}/test.log' \ - null - if [ $? -eq 0 ]; then - status="PASS: frame" - fi - if [ -f /var/tmp/ibus-ci-autostart.log ] ; then - echo "#### /var/tmp/ibus-ci-autostart.log" - cat /var/tmp/ibus-ci-autostart.log - rm /var/tmp/ibus-ci-autostart.log - echo "#" - fi - echo "${status}" >> {{ remote_artifacts }}/test.log - echo "#### {{ remote_artifacts }}/{{ installed_test_name }}.log" - if [ -f {{ remote_artifacts }}/{{ installed_test_name }}.log ] ; then - cat {{ remote_artifacts }}/{{ installed_test_name }}.log - fi - echo "#" - echo "#### {{ remote_artifacts }}/test.log" - if [ -f {{ remote_artifacts }}/test.log ] ; then - cat {{ remote_artifacts }}/test.log - fi - echo "#" - - - name: Check the results - script: check-results.sh "{{ remote_artifacts }}/test.log" "0" - register: test_fails - failed_when: '"ERROR" in test_fails.stdout' - - - name: Set role result - set_fact: - role_result: "{{ test_fails.stdout }}" - role_result_failed: "{{ (test_fails.stdout|d|length > 0) or (test_fails.stderr|d|length > 0) }}" - role_result_msg: "{{ test_fails.stdout|d('tests failed.') }}" - - - include_role: - name: str-common-final - diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index 94551ce..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,10 +0,0 @@ -- hosts: localhost - roles: - - role: ibus-desktop-testing-role - installed_test_name: ibus-anthy - tags: - - classic - - gating - required_packages: - - ibus-anthy-tests - From 0a23d31689d7c66ced6125a6d08a09982acc699b Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Thu, 12 Sep 2024 09:27:06 +0900 Subject: [PATCH 59/75] Revert change of "Fix CI freeze" (c89a603) The original issue is fixed in ibus core now. --- ibus-anthy-HEAD.patch | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch index e3f6c91..e33d0c9 100644 --- a/ibus-anthy-HEAD.patch +++ b/ibus-anthy-HEAD.patch @@ -62,40 +62,3 @@ index 4b50a01..0858614 100644 -- 2.43.0 -From c89a60350b2a949306bf75d64e06a0cde3a7846c Mon Sep 17 00:00:00 2001 -From: fujiwarat -Date: Sun, 12 May 2024 13:01:50 +0900 -Subject: [PATCH] tests: Fix CI freeze - -Seems infinit calling g_resources_register_unlocked() happens -in register_lazy_static_resources_unlocked() from -g_resources_lookup_data() when ibus_init() is called after -gtk_init() or gdk_display_open() is called. -It's good to delete ibus_init() here since IBus GTK IM module already -calls it. ---- - tests/anthytest.py | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/tests/anthytest.py b/tests/anthytest.py -index 1d18d19..cf2d6bc 100755 ---- a/tests/anthytest.py -+++ b/tests/anthytest.py -@@ -77,7 +77,13 @@ class AnthyTest(unittest.TestCase): - - @classmethod - def setUpClass(cls): -- IBus.init() -+ # Already called in ibus/client/gtk3/ibusim.c:im_module_init(). -+ # Otherwise infinit g_resources_register_unlocked() happens in -+ # register_lazy_static_resources_unlocked() -+ # from g_resources_lookup_data() -+ # or IBus.init() could be called before Gdk.Display.open('') is called. -+ #IBus.init() -+ pass - - def setUp(self): - self.__id = 0 --- -2.45.0 - From 6b87ead8a2fca57e5c8412cc9d40129288ee1708 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Sat, 14 Sep 2024 08:52:12 +0900 Subject: [PATCH 60/75] Support GNOME Wayland and GTK4 in CI --- ibus-anthy-HEAD.patch | 402 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 402 insertions(+) diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch index e33d0c9..2cebe3a 100644 --- a/ibus-anthy-HEAD.patch +++ b/ibus-anthy-HEAD.patch @@ -62,3 +62,405 @@ index 4b50a01..0858614 100644 -- 2.43.0 +From e62e75409de470d373865165b08d060a4cc73c8b Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Sat, 14 Sep 2024 08:39:56 +0900 +Subject: [PATCH] tests/anthytest: Support GNOME Wayland and GTK4 + +- Check "preedit-changed" signal is called twice in GNOME Wayland. + Maybe a mutter bug. +- Make sure the preedit is cleared before the next test case runs +- Wait for 3 seconds in GNOME Wayland before the test cases run to + get delayed focus events. +- Implement GTK4 +--- + tests/anthytest.py | 250 +++++++++++++++++++++++++++++++++++---------- + 1 file changed, 197 insertions(+), 53 deletions(-) + +diff --git a/tests/anthytest.py b/tests/anthytest.py +index 1d18d19..e9d1b42 100755 +--- a/tests/anthytest.py ++++ b/tests/anthytest.py +@@ -3,18 +3,22 @@ + + from __future__ import print_function + +-from gi import require_version as gi_require_version +-gi_require_version('GLib', '2.0') +-gi_require_version('Gdk', '3.0') +-gi_require_version('Gio', '2.0') +-gi_require_version('Gtk', '3.0') +-gi_require_version('IBus', '1.0') ++from gi import require_versions as gi_require_versions ++gi_require_versions({'GLib': '2.0', 'Gio': '2.0', 'GObject': '2.0', ++ 'IBus': '1.0'}) + from gi.repository import GLib +-from gi.repository import Gdk + from gi.repository import Gio +-from gi.repository import Gtk ++from gi.repository import GObject + from gi.repository import IBus + ++try: ++ gi_require_versions({'Gdk': '4.0', 'Gtk': '4.0'}) ++except ValueError: ++ gi_require_versions({'Gdk': '3.0', 'Gtk': '3.0'}) ++ ++from gi.repository import Gdk ++from gi.repository import Gtk ++ + import argparse + import getopt + import os +@@ -70,7 +74,7 @@ sys.path.append('/usr/share/ibus-anthy/engine') + from anthycases import TestCases + + +-@unittest.skipIf(Gdk.Display.open('') == None, 'Display cannot be open.') ++@unittest.skipIf(Gdk.Display.get_default() == None, 'Display cannot be open.') + class AnthyTest(unittest.TestCase): + global DONE_EXIT + ENGINE_PATH = '/com/redhat/IBus/engines/Anthy/Test/Engine' +@@ -81,11 +85,21 @@ class AnthyTest(unittest.TestCase): + + def setUp(self): + self.__id = 0 +- self.__rerun = False ++ self.__engine_is_focused = False ++ self.__idle_count = 0 ++ self.__idle_loop = None + self.__test_index = 0 ++ self.__preedit_changes = 0 ++ self.__preedit_prev = None + self.__conversion_index = 0 ++ self.__conversion_spaces = 0 + self.__commit_done = False + self.__engine = None ++ self.__list_toplevel = False ++ self.__is_wayland = False ++ display = Gdk.Display.get_default() ++ if GObject.type_name(display.__gtype__) == 'GdkWaylandDisplay': ++ self.__is_wayland = True + + def register_ibus_engine(self): + printflush('## Registering engine') +@@ -133,6 +147,59 @@ class AnthyTest(unittest.TestCase): + self.__bus.request_name('org.freedesktop.IBus.Anthy.Test', 0) + return True + ++ def create_window(self): ++ match Gtk.MAJOR_VERSION: ++ case 4: ++ self.create_window_gtk4() ++ case 3: ++ self.create_window_gtk3() ++ case _: ++ self.gtk_version_exception() ++ ++ def create_window_gtk4(self): ++ window = Gtk.Window() ++ self.__entry = entry = Gtk.Entry() ++ window.connect('destroy', self.__window_destroy_cb) ++ entry.connect('map', self.__entry_map_cb) ++ controller = Gtk.EventControllerFocus() ++ controller.set_propagation_phase(Gtk.PropagationPhase.BUBBLE) ++ controller.connect_after('enter', self.__controller_enter_cb) ++ text = entry.get_delegate() ++ text.add_controller(controller) ++ text.connect('preedit-changed', self.__entry_preedit_changed_cb) ++ buffer = entry.get_buffer() ++ buffer.connect('inserted-text', self.__buffer_inserted_text_cb) ++ window.set_child(entry) ++ window.set_focus(entry) ++ window.present() ++ printflush('## Build GTK4 window') ++ ++ def create_window_gtk3(self): ++ window = Gtk.Window(type = Gtk.WindowType.TOPLEVEL) ++ self.__entry = entry = Gtk.Entry() ++ window.connect('destroy', self.__window_destroy_cb) ++ entry.connect('map', self.__entry_map_cb) ++ entry.connect('focus-in-event', self.__entry_focus_in_event_cb) ++ entry.connect('preedit-changed', self.__entry_preedit_changed_cb) ++ buffer = entry.get_buffer() ++ buffer.connect('inserted-text', self.__buffer_inserted_text_cb) ++ window.add(entry) ++ window.show_all() ++ printflush('## Build GTK3 window') ++ ++ def gtk_version_exception(self): ++ raise Exception("GTK version %d is not supported" % Gtk.MAJOR_VERSION) ++ ++ def is_integrated_desktop(self): ++ session_name = None ++ if 'XDG_SESSION_DESKTOP' in os.environ: ++ session_name = os.environ['XDG_SESSION_DESKTOP'] ++ if session_name == None: ++ return False ++ if len(session_name) >= 4 and session_name[0:5] == 'gnome': ++ return True ++ return False ++ + def __name_owner_changed_cb(self, connection, sender_name, object_path, + interface_name, signal_name, parameters, + user_data): +@@ -142,7 +209,7 @@ class AnthyTest(unittest.TestCase): + except ModuleNotFoundError as e: + with self.subTest(i = 'name-owner-changed'): + self.fail('NG: Not installed ibus-anthy %s' % str(e)) +- Gtk.main_quit() ++ self.__window_destroy_cb() + return + engine.Engine.CONFIG_RELOADED() + +@@ -154,60 +221,101 @@ class AnthyTest(unittest.TestCase): + except ModuleNotFoundError as e: + with self.subTest(i = 'create-engine'): + self.fail('NG: Not installed ibus-anthy %s' % str(e)) +- Gtk.main_quit() ++ self.__window_destroy_cb() + return + self.__id += 1 + self.__engine = engine.Engine(self.__bus, '%s/%d' % (self.ENGINE_PATH, self.__id)) ++ if hasattr(self.__engine.props, 'has_focus_id'): ++ self.__engine.connect('focus-in-id', self.__engine_focus_in) ++ self.__engine.connect('focus-out-id', self.__engine_focus_out) ++ # The timing of D-Bus signal of Engine.has_focus_id can cause ++ # some 'focus-in' signals earlier and 'focus-in-id' signals later. + self.__engine.connect('focus-in', self.__engine_focus_in) + self.__engine.connect('focus-out', self.__engine_focus_out) + return self.__engine + +- def __engine_focus_in(self, engine): ++ def __engine_focus_in(self, engine, object_path=None, client=None): ++ printflush('## Focus in engine %s %s' % (object_path, client)) + if self.__test_index == len(TestCases['tests']): + if DONE_EXIT: +- Gtk.main_quit() ++ self.__window_destroy_cb() + return +- # Workaround because focus-out resets the preedit text +- # ibus_bus_set_global_engine() calls bus_input_context_set_engine() +- # twice and it causes bus_engine_proxy_focus_out() +- if self.__rerun: +- self.__main_test() ++ self.__engine_is_focused = True + pass + +- def __engine_focus_out(self, engine): +- self.__rerun = True ++ def __engine_focus_out(self, engine, object_path=None): ++ printflush('## Focus out engine %s' % object_path) ++ self.__engine_is_focused = False + +- def create_window(self): +- window = Gtk.Window(type = Gtk.WindowType.TOPLEVEL) +- self.__entry = entry = Gtk.Entry() +- window.connect('destroy', Gtk.main_quit) +- entry.connect('map', self.__entry_map_cb) +- entry.connect('focus-in-event', self.__entry_focus_in_event_cb) +- entry.connect('preedit-changed', self.__entry_preedit_changed_cb) +- buffer = entry.get_buffer() +- buffer.connect('inserted-text', self.__buffer_inserted_text_cb) +- window.add(entry) +- window.show_all() +- printflush('## Build window') ++ def __window_destroy_cb(self): ++ match Gtk.MAJOR_VERSION: ++ case 4: ++ self.__list_toplevel = False ++ case 3: ++ Gtk.main_quit() ++ case _: ++ self.gtk_version_exception() + + def __entry_map_cb(self, entry): + printflush('## Map window') + ++ def __controller_enter_cb(self, controller): ++ if self.is_integrated_desktop(): ++ # Wait for 3 seconds in GNOME Wayland because there is a long time ++ # lag between the "enter" signal on the event controller in GtkText ++ # and the "FocusIn" D-Bus signal in BusInputContext of ibus-daemon. ++ printflush('## Waiting for 3 secs') ++ GLib.timeout_add_seconds(3, ++ self.__controller_enter_delay, ++ controller) ++ else: ++ printflush('## No Wait') ++ GLib.idle_add(self.__controller_enter_delay, ++ controller) ++ ++ def __controller_enter_delay(self, controller): ++ text = controller.get_widget() ++ if not text.get_realized(): ++ return ++ self.__entry_focus_in_event_cb(None, None) ++ + def __entry_focus_in_event_cb(self, entry, event): +- printflush('## Get focus') ++ printflush('## Focus in entry') + if self.__test_index == len(TestCases['tests']): + if DONE_EXIT: +- Gtk.main_quit() ++ self.__window_destroy_cb() + return False + self.__bus.set_global_engine_async('testanthy', -1, None, self.__set_engine_cb) + return False + ++ def __idle_cb(self): ++ if self.__engine_is_focused: ++ self.__idle_loop.quit() ++ return GLib.SOURCE_REMOVE ++ elif self.__idle_count < 10: ++ self.__idle_count += 1 ++ return GLib.SOURCE_CONTINUE ++ else: ++ self.__idle_loop.quit() ++ return GLib.SOURCE_REMOVE ++ + def __set_engine_cb(self, object, res): ++ printflush('## Set engine') + if not self.__bus.set_global_engine_async_finish(res): + with self.subTest(i = self.__test_index): + self.fail('set engine failed: ' + error.message) + return + self.__enable_hiragana() ++ # ibus_im_context_focus_in() is called after GlobalEngine is set. ++ # The focus-in/out events happen more slowly in a busy system ++ # likes with a TMT tool. ++ if self.is_integrated_desktop(): ++ if 'IBUS_DAEMON_WITH_SYSTEMD' in os.environ and \ ++ os.environ['IBUS_DAEMON_WITH_SYSTEMD'] != None: ++ self.__idle_loop = GLib.MainLoop(None) ++ self.__idle_count = 0 ++ GLib.timeout_add_seconds(1, self.__idle_cb) ++ self.__idle_loop.run() + self.__main_test() + + def __get_test_condition_length(self, tag): +@@ -217,24 +325,48 @@ class AnthyTest(unittest.TestCase): + return len(cases[type]) + + def __entry_preedit_changed_cb(self, entry, preedit_str): +- if len(preedit_str) == 0: ++ # Wait for clearing the preedit before the next __main_test() is called. ++ if self.__commit_done: ++ if len(preedit_str) == 0: ++ self.__preedit_changes = 0 ++ self.__main_test() ++ else: ++ self.__preedit_changes += 1 + return ++ if self.__is_wayland: ++ # Need to fix mutter ++ # GTK calls self.__entry_preedit_changed_cb() twice by the actual ++ # preedit update in GNOME Wayland in case the lookup window is not ++ # shown yet and the preedit is changed but not the cursor position ++ # only. ++ # ++ # I.e. GTK receives the struct zwp_text_input_v3_listener.done() ++ # from Wayland text-input protocol when the preedit is updated ++ # and the "preedit-changed" signal is called at first and the ++ # zwp_text_input_v3_listener.done() also calls ++ # zwp_text_input_v3_commit() to notify IM changes to mutter and ++ # mutter receives the struct ++ # zwp_text_input_v3_interface.commit_state() from Wayland text-input ++ # protocol and it causes the zwp_text_input_v3_listener.done() and ++ # the "preedit-changed" signal in GTK. ++ if self.__preedit_changes < 1 and self.__conversion_spaces < 2 \ ++ and self.__preedit_prev != preedit_str: ++ self.__preedit_changes += 1 ++ return ++ else: ++ self.__preedit_changes = 0 + if self.__test_index == len(TestCases['tests']): + if DONE_EXIT: +- Gtk.main_quit() ++ self.__window_destroy_cb() + return ++ self.__preedit_prev = preedit_str + conversion_length = self.__get_test_condition_length('conversion') +- # Need to return again even if all the conversion is finished +- # until the final Engine.update_preedit() is called. +- if self.__conversion_index > conversion_length: +- return +- self.__run_cases('conversion', +- self.__conversion_index, +- self.__conversion_index + 1) + if self.__conversion_index < conversion_length: ++ self.__run_cases('conversion', ++ self.__conversion_index, ++ self.__conversion_index + 1) + self.__conversion_index += 1 + return +- self.__conversion_index += 1 + self.__run_cases('commit') + + def __enable_hiragana(self): +@@ -249,13 +381,12 @@ class AnthyTest(unittest.TestCase): + printflush('## Already hiragana') + + def __main_test(self): ++ printflush('## Run case %d' % self.__test_index) ++ self.__preedit_prev = None + self.__conversion_index = 0 ++ self.__conversion_spaces = 0 + self.__commit_done = False + self.__run_cases('preedit') +- self.__run_cases('conversion', +- self.__conversion_index, +- self.__conversion_index + 1) +- self.__conversion_index += 1 + + def __run_cases(self, tag, start=-1, end=-1): + tests = TestCases['tests'][self.__test_index] +@@ -288,6 +419,10 @@ class AnthyTest(unittest.TestCase): + if start != -1 or end != -1: + printflush('test step: %s sequences: [0x%X, 0x%X, 0x%X]' \ + % (tag, key[0], key[1], key[2])) ++ # Check if the lookup table is shown. ++ if tag == 'conversion' and \ ++ (key[0] == IBus.KEY_Tab or key[0] == IBus.KEY_space): ++ self.__conversion_spaces += 1 + self.__typing(key[0], key[1], key[2]) + i += 1 + +@@ -306,21 +441,30 @@ class AnthyTest(unittest.TestCase): + self.fail('NG: %d %s %s' \ + % (self.__test_index, str(cases['string']), chars)) + if DONE_EXIT: +- Gtk.main_quit() ++ self.__window_destroy_cb() + self.__test_index += 1 + if self.__test_index == len(TestCases['tests']): + if DONE_EXIT: +- Gtk.main_quit() ++ self.__window_destroy_cb() + return + self.__entry.set_text('') +- self.__main_test() ++ # ibus-anthy updates preedit after commits the text. ++ self.__commit_done = True + + def main(self): +- Gtk.main() ++ match Gtk.MAJOR_VERSION: ++ case 4: ++ while self.__list_toplevel: ++ GLib.MainContext.default().iteration(True) ++ case 3: ++ Gtk.main() ++ case _: ++ self.gtk_version_exception() + + def test_typing(self): + if not self.register_ibus_engine(): + sys.exit(-1) ++ self.__list_toplevel = True + self.create_window() + self.main() + +-- +2.45.2 + From e0a63cdb9ef4abd03c8b2f99b8f15b5d8a5b1cfa Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Sat, 14 Sep 2024 08:52:23 +0900 Subject: [PATCH 61/75] Replace STI with TMT in CI Replace GNOME Xorg with GNOME Wayland in CI --- .fmf/version | 1 + plans/test.fmf | 5 ++ .../install1-common/main.fmf | 68 +++++++++++++++++++ .../install2-fedora/main.fmf | 39 +++++++++++ .../install3-rhel/main.fmf | 13 ++++ .../install4-g-d-t/main.fmf | 6 ++ .../install5-tmt/main.fmf | 6 ++ .../install6-ibus-anthy/main.fmf | 6 ++ tests/ibus-desktop-testing/main.fmf | 3 + tests/ibus-desktop-testing/run/main.fmf | 5 ++ tests/ibus-desktop-testing/run/test.sh | 15 ++++ tests/main.fmt | 1 + 12 files changed, 168 insertions(+) create mode 100644 .fmf/version create mode 100644 plans/test.fmf create mode 100644 tests/ibus-desktop-testing/install1-common/main.fmf create mode 100644 tests/ibus-desktop-testing/install2-fedora/main.fmf create mode 100644 tests/ibus-desktop-testing/install3-rhel/main.fmf create mode 100644 tests/ibus-desktop-testing/install4-g-d-t/main.fmf create mode 100644 tests/ibus-desktop-testing/install5-tmt/main.fmf create mode 100644 tests/ibus-desktop-testing/install6-ibus-anthy/main.fmf create mode 100644 tests/ibus-desktop-testing/main.fmf create mode 100644 tests/ibus-desktop-testing/run/main.fmf create mode 100755 tests/ibus-desktop-testing/run/test.sh create mode 100644 tests/main.fmt diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/plans/test.fmf b/plans/test.fmf new file mode 100644 index 0000000..c1627f9 --- /dev/null +++ b/plans/test.fmf @@ -0,0 +1,5 @@ +summary: Basic smoke test +discover: + how: fmf +execute: + how: tmt diff --git a/tests/ibus-desktop-testing/install1-common/main.fmf b/tests/ibus-desktop-testing/install1-common/main.fmf new file mode 100644 index 0000000..d4d1a62 --- /dev/null +++ b/tests/ibus-desktop-testing/install1-common/main.fmf @@ -0,0 +1,68 @@ +summary: Install common GNOME desktop components +description: + The listed packages are installed commonly between Fedora and + RHEL GNOME desktop components. +require: + # IBus CI sets + - ibus + - ibus-desktop-testing + - dbus-x11 + # https://pagure.io/fedora-comps/blob/main/f/comps-f38.xml.in + # dnf group info GNOME + # mandatory + - dconf + - gdm + - gnome-connections + - gnome-control-center + - gnome-initial-setup + - gnome-session-wayland-session + - gnome-settings-daemon + - gnome-shell + - gnome-software + - gnome-text-editor + - nautilus + - polkit + # default + - at-spi2-atk + - at-spi2-core + - avahi + - baobab + # Sometimes version mismatch with gnome-shell in rawhide + #- chrome-gnome-shell + - fprintd-pam + - glib-networking + - gnome-bluetooth + - gnome-calculator + - gnome-characters + - gnome-classic-session + - gnome-clocks + - gnome-color-manager + - gnome-disk-utility + - gnome-font-viewer + - gnome-remote-desktop + - gnome-system-monitor + - gnome-user-docs + - gvfs-goa + - gvfs-mtp + - libcanberra-gtk3 + - libproxy-duktape + - librsvg2 + - libsane-hpaio + - mesa-dri-drivers + - mesa-libEGL + - ModemManager + - NetworkManager-adsl + - NetworkManager-ppp + - NetworkManager-wwan + - orca + - PackageKit-command-not-found + - PackageKit-gtk3-module + - ptyxis + - sane-backends-drivers-scanners + # Move systemd-oomd-defaults to Post-Installing section + - tracker + - tracker-miners + - xdg-desktop-portal + - xdg-desktop-portal-gnome + - xdg-desktop-portal-gtk + - xdg-user-dirs-gtk diff --git a/tests/ibus-desktop-testing/install2-fedora/main.fmf b/tests/ibus-desktop-testing/install2-fedora/main.fmf new file mode 100644 index 0000000..9bf4560 --- /dev/null +++ b/tests/ibus-desktop-testing/install2-fedora/main.fmf @@ -0,0 +1,39 @@ +summary: Install Fedora specific GNOME desktop components +description: + The listed packages are available in Fedora only. +enabled: false +adjust: + when: distro == fedora + enabled: true +require: + - adobe-source-code-pro-fonts + - gnome-screenshot + - gnome-boxes + - yelp + - cheese + - eog + - evince + - evince-djvu + - gnome-backgrounds + - gnome-contacts + - gnome-logs + - gnome-maps + - gnome-photos + - gnome-themes-extra + - gnome-user-share + - gnome-weather + - gvfs-afc + - gvfs-afp + - gvfs-archive + - gvfs-fuse + - gvfs-gphoto2 + - gvfs-smb + - NetworkManager-openconnect-gnome + - NetworkManager-openvpn-gnome + - NetworkManager-pptp-gnome + - NetworkManager-ssh-gnome + - NetworkManager-vpnc-gnome + - rygel + - simple-scan + - sushi + - totem diff --git a/tests/ibus-desktop-testing/install3-rhel/main.fmf b/tests/ibus-desktop-testing/install3-rhel/main.fmf new file mode 100644 index 0000000..9adf494 --- /dev/null +++ b/tests/ibus-desktop-testing/install3-rhel/main.fmf @@ -0,0 +1,13 @@ +summary: Install RHEL specific GNOME desktop components +description: + gdm-headless-login-session is not available in RHEL 10 GDM yet and + the listed packages are required by the command. +enabled: false +adjust: + when: distro != fedora + enabled: true +require: + - accountsservice + - accountsservice-libs + - pam + - python3-pam diff --git a/tests/ibus-desktop-testing/install4-g-d-t/main.fmf b/tests/ibus-desktop-testing/install4-g-d-t/main.fmf new file mode 100644 index 0000000..cfd4fd7 --- /dev/null +++ b/tests/ibus-desktop-testing/install4-g-d-t/main.fmf @@ -0,0 +1,6 @@ +summary: Install GNOME installed-tests testing harness +description: + gnome-desktop-testing package is required by IBus CI(ibus-desktop-testing) + and it's available in Fedora only at present. +require: + - gnome-desktop-testing diff --git a/tests/ibus-desktop-testing/install5-tmt/main.fmf b/tests/ibus-desktop-testing/install5-tmt/main.fmf new file mode 100644 index 0000000..966cf80 --- /dev/null +++ b/tests/ibus-desktop-testing/install5-tmt/main.fmf @@ -0,0 +1,6 @@ +summary: Install TMT packages +description: + The test script is calling the beakerlib script. +require: + - beakerlib + - tmt diff --git a/tests/ibus-desktop-testing/install6-ibus-anthy/main.fmf b/tests/ibus-desktop-testing/install6-ibus-anthy/main.fmf new file mode 100644 index 0000000..0443fd1 --- /dev/null +++ b/tests/ibus-desktop-testing/install6-ibus-anthy/main.fmf @@ -0,0 +1,6 @@ +summary: Install ibus-anthy specific packages +description: + The listed packages are required by CI of ibus-anthy. +require: + - ibus-anthy-tests + - glibc-langpack-ja diff --git a/tests/ibus-desktop-testing/main.fmf b/tests/ibus-desktop-testing/main.fmf new file mode 100644 index 0000000..b4d0642 --- /dev/null +++ b/tests/ibus-desktop-testing/main.fmf @@ -0,0 +1,3 @@ +summary: gnome-desktop-testing tests +# common test for sub tests +test: env diff --git a/tests/ibus-desktop-testing/run/main.fmf b/tests/ibus-desktop-testing/run/main.fmf new file mode 100644 index 0000000..d2434b1 --- /dev/null +++ b/tests/ibus-desktop-testing/run/main.fmf @@ -0,0 +1,5 @@ +summary: Run tests +description: + Run CI with ibus-desktop-testing-runner in GNOME Wayland. +duration: 15m +test: ./test.sh diff --git a/tests/ibus-desktop-testing/run/test.sh b/tests/ibus-desktop-testing/run/test.sh new file mode 100755 index 0000000..d53faf5 --- /dev/null +++ b/tests/ibus-desktop-testing/run/test.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +rlJournalStart + rlPhaseStartTest + rlRun -t "/usr/bin/ibus-desktop-testing-runner --runner gnome --tests ibus-anthy --no-graphics --lang ja_JP.UTF-8" + rlPhaseEnd + rlPhaseStartCleanup + rlRun "echo test-suite.log" + rlRun "cat test-suite.log" + rlRun "echo /export/home/itestuser/test-autostart.log" + rlRun "cat /export/home/itestuser/test-autostart.log" + rlPhaseEnd +rlJournalEnd diff --git a/tests/main.fmt b/tests/main.fmt new file mode 100644 index 0000000..e89cb45 --- /dev/null +++ b/tests/main.fmt @@ -0,0 +1 @@ +contact: Takao Fujiwara From 01e7c781f4e4ce6a055f887def128d054e57a056 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Sun, 15 Sep 2024 08:17:19 +0900 Subject: [PATCH 62/75] tests: Update packages with comps-f41 - Add base-graphical - Add fonts default - Delete libcanberra-gtk3, libproxy-duktape - Delete tmt for RHEL CI --- .../install1-common/main.fmf | 40 ++++++++++++++----- .../install5-tmt/main.fmf | 1 - 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/tests/ibus-desktop-testing/install1-common/main.fmf b/tests/ibus-desktop-testing/install1-common/main.fmf index d4d1a62..b920b02 100644 --- a/tests/ibus-desktop-testing/install1-common/main.fmf +++ b/tests/ibus-desktop-testing/install1-common/main.fmf @@ -7,9 +7,25 @@ require: - ibus - ibus-desktop-testing - dbus-x11 - # https://pagure.io/fedora-comps/blob/main/f/comps-f38.xml.in + # https://pagure.io/fedora-comps/blob/main/f/comps-f41.xml.in # dnf group info GNOME - # mandatory + # base-graphical mandatory + - mesa-dri-drivers + - mesa-vulkan-drivers + - plymouth-system-theme + # fonts default + - default-fonts-cjk-mono + - default-fonts-cjk-sans + - default-fonts-cjk-serif + - default-fonts-core-emoji + - default-fonts-core-math + - default-fonts-core-mono + - default-fonts-core-sans + - default-fonts-core-serif + - default-fonts-other-mono + - default-fonts-other-sans + - default-fonts-other-serif + # gnome-desktop mandatory - dconf - gdm - gnome-connections @@ -22,9 +38,8 @@ require: - gnome-text-editor - nautilus - polkit - # default - - at-spi2-atk - - at-spi2-core + - ptyxis + # gnome-desktop default - avahi - baobab # Sometimes version mismatch with gnome-shell in rawhide @@ -32,33 +47,34 @@ require: - fprintd-pam - glib-networking - gnome-bluetooth + - gnome-browser-connector - gnome-calculator + - gnome-calendar - gnome-characters - gnome-classic-session - gnome-clocks - gnome-color-manager - gnome-disk-utility + - gnome-epub-thumbnailer - gnome-font-viewer - gnome-remote-desktop - gnome-system-monitor - gnome-user-docs - gvfs-goa - gvfs-mtp - - libcanberra-gtk3 - - libproxy-duktape - librsvg2 - libsane-hpaio + - loupe - mesa-dri-drivers - mesa-libEGL - ModemManager - NetworkManager-adsl - NetworkManager-ppp - NetworkManager-wwan - - orca - PackageKit-command-not-found - PackageKit-gtk3-module - - ptyxis - sane-backends-drivers-scanners + - snapshot # Move systemd-oomd-defaults to Post-Installing section - tracker - tracker-miners @@ -66,3 +82,9 @@ require: - xdg-desktop-portal-gnome - xdg-desktop-portal-gtk - xdg-user-dirs-gtk + # desktop-accessibility default + - at-spi2-atk + - at-spi2-core + - brltty + - orca + - speech-dispatcher diff --git a/tests/ibus-desktop-testing/install5-tmt/main.fmf b/tests/ibus-desktop-testing/install5-tmt/main.fmf index 966cf80..332864f 100644 --- a/tests/ibus-desktop-testing/install5-tmt/main.fmf +++ b/tests/ibus-desktop-testing/install5-tmt/main.fmf @@ -3,4 +3,3 @@ description: The test script is calling the beakerlib script. require: - beakerlib - - tmt From 42610e2fb01300ca4e6ee8c92900060c806793e0 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Sun, 15 Sep 2024 10:43:58 +0900 Subject: [PATCH 63/75] tests: Delete RHEL specific packages gdm dependencies are updated for the headless session. --- tests/ibus-desktop-testing/install3-rhel/main.fmf | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tests/ibus-desktop-testing/install3-rhel/main.fmf b/tests/ibus-desktop-testing/install3-rhel/main.fmf index 9adf494..342507c 100644 --- a/tests/ibus-desktop-testing/install3-rhel/main.fmf +++ b/tests/ibus-desktop-testing/install3-rhel/main.fmf @@ -1,13 +1,7 @@ summary: Install RHEL specific GNOME desktop components description: - gdm-headless-login-session is not available in RHEL 10 GDM yet and - the listed packages are required by the command. + Currently no specific packages for RHEL. enabled: false adjust: when: distro != fedora enabled: true -require: - - accountsservice - - accountsservice-libs - - pam - - python3-pam From 71320e7c843b4cac36baa5eb8980763f6f13583d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jan 2025 06:49:26 +0000 Subject: [PATCH 64/75] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 5bfc0dac3b54428e70a23c218bdec518368d42fb Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Fri, 24 Jan 2025 12:26:42 +0900 Subject: [PATCH 65/75] Resolves #2340630 Update era.t with 2025 --- ibus-anthy-HEAD.patch | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch index 2cebe3a..03bdf73 100644 --- a/ibus-anthy-HEAD.patch +++ b/ibus-anthy-HEAD.patch @@ -464,3 +464,42 @@ index 1d18d19..e9d1b42 100755 -- 2.45.2 +From 923138960c929df4d57e19e12c1e8ac72090eeaa Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Fri, 24 Jan 2025 12:06:19 +0900 +Subject: [PATCH] data: Update era.t with 2025 + +--- + data/era.t | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/data/era.t b/data/era.t +index 8750bc5..76a374c 100644 +--- a/data/era.t ++++ b/data/era.t +@@ -2,7 +2,7 @@ + # + # ibus-anthy - The Anthy engine for IBus + # +-# Copyright (c) 2010-2024 Takao Fujiwara ++# Copyright (c) 2010-2025 Takao Fujiwara + # Copyright (c) 2010-2013 Red Hat, Inc. + # + # This program is free software; you can redistribute it and/or modify +@@ -344,6 +344,8 @@ + れいわ5 #T35*500 2023 + れいわ6 #T35*500 令和6 + れいわ6 #T35*500 2024 ++れいわ7 #T35*500 令和7 ++れいわ7 #T35*500 2025 + 1868 #T35*500 明治1 + 1869 #T35*500 明治2 + 1870 #T35*500 明治3 +@@ -505,3 +507,4 @@ + 2022 #T35*500 令和4 + 2023 #T35*500 令和5 + 2024 #T35*500 令和6 ++2025 #T35*500 令和7 +-- +2.47.0 + From 91398174d87d5a101a0986c5d7c5bf46f112bc99 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Tue, 18 Feb 2025 21:03:59 +0900 Subject: [PATCH 66/75] Delete upstreamed patches --- ibus-anthy-HEAD.patch | 505 ------------------------------------------ 1 file changed, 505 deletions(-) delete mode 100644 ibus-anthy-HEAD.patch diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch deleted file mode 100644 index 03bdf73..0000000 --- a/ibus-anthy-HEAD.patch +++ /dev/null @@ -1,505 +0,0 @@ -From 9ae92d7b8085e869d37a068a1a94815c78de6110 Mon Sep 17 00:00:00 2001 -From: fujiwarat -Date: Tue, 12 Mar 2024 18:25:39 +0900 -Subject: [PATCH] engine: Ignore Super modifier key - -Super-l is a shortcut key to launch a lock screen in GNOME desktop -session and now it can be sent to the engine prior to the window -manager. ---- - engine/python2/engine.py | 6 ++++-- - engine/python3/engine.py | 6 ++++-- - 2 files changed, 8 insertions(+), 4 deletions(-) - -diff --git a/engine/python2/engine.py b/engine/python2/engine.py -index 42d4dc1..c7ccd3f 100644 ---- a/engine/python2/engine.py -+++ b/engine/python2/engine.py -@@ -4,7 +4,7 @@ - # ibus-anthy - The Anthy engine for IBus - # - # Copyright (c) 2007-2008 Peng Huang --# Copyright (c) 2010-2023 Takao Fujiwara -+# Copyright (c) 2010-2024 Takao Fujiwara - # Copyright (c) 2007-2018 Red Hat, Inc. - # - # This program is free software; you can redistribute it and/or modify -@@ -1976,7 +1976,9 @@ class Engine(IBus.EngineSimple): - state & hex_mod_mask == hex_mod_mask: - return True - -- if state & (IBus.ModifierType.CONTROL_MASK | IBus.ModifierType.MOD1_MASK): -+ if state & (IBus.ModifierType.CONTROL_MASK | \ -+ IBus.ModifierType.MOD1_MASK | \ -+ IBus.ModifierType.MOD4_MASK): - return False - - if (IBus.KEY_exclam <= keyval <= IBus.KEY_asciitilde or -diff --git a/engine/python3/engine.py b/engine/python3/engine.py -index 4b50a01..0858614 100644 ---- a/engine/python3/engine.py -+++ b/engine/python3/engine.py -@@ -4,7 +4,7 @@ - # ibus-anthy - The Anthy engine for IBus - # - # Copyright (c) 2007-2008 Peng Huang --# Copyright (c) 2010-2023 Takao Fujiwara -+# Copyright (c) 2010-2024 Takao Fujiwara - # Copyright (c) 2007-2018 Red Hat, Inc. - # - # This program is free software; you can redistribute it and/or modify -@@ -1971,7 +1971,9 @@ class Engine(IBus.EngineSimple): - state & hex_mod_mask == hex_mod_mask: - return True - -- if state & (IBus.ModifierType.CONTROL_MASK | IBus.ModifierType.MOD1_MASK): -+ if state & (IBus.ModifierType.CONTROL_MASK | \ -+ IBus.ModifierType.MOD1_MASK | \ -+ IBus.ModifierType.MOD4_MASK): - return False - - if (IBus.KEY_exclam <= keyval <= IBus.KEY_asciitilde or --- -2.43.0 - -From e62e75409de470d373865165b08d060a4cc73c8b Mon Sep 17 00:00:00 2001 -From: fujiwarat -Date: Sat, 14 Sep 2024 08:39:56 +0900 -Subject: [PATCH] tests/anthytest: Support GNOME Wayland and GTK4 - -- Check "preedit-changed" signal is called twice in GNOME Wayland. - Maybe a mutter bug. -- Make sure the preedit is cleared before the next test case runs -- Wait for 3 seconds in GNOME Wayland before the test cases run to - get delayed focus events. -- Implement GTK4 ---- - tests/anthytest.py | 250 +++++++++++++++++++++++++++++++++++---------- - 1 file changed, 197 insertions(+), 53 deletions(-) - -diff --git a/tests/anthytest.py b/tests/anthytest.py -index 1d18d19..e9d1b42 100755 ---- a/tests/anthytest.py -+++ b/tests/anthytest.py -@@ -3,18 +3,22 @@ - - from __future__ import print_function - --from gi import require_version as gi_require_version --gi_require_version('GLib', '2.0') --gi_require_version('Gdk', '3.0') --gi_require_version('Gio', '2.0') --gi_require_version('Gtk', '3.0') --gi_require_version('IBus', '1.0') -+from gi import require_versions as gi_require_versions -+gi_require_versions({'GLib': '2.0', 'Gio': '2.0', 'GObject': '2.0', -+ 'IBus': '1.0'}) - from gi.repository import GLib --from gi.repository import Gdk - from gi.repository import Gio --from gi.repository import Gtk -+from gi.repository import GObject - from gi.repository import IBus - -+try: -+ gi_require_versions({'Gdk': '4.0', 'Gtk': '4.0'}) -+except ValueError: -+ gi_require_versions({'Gdk': '3.0', 'Gtk': '3.0'}) -+ -+from gi.repository import Gdk -+from gi.repository import Gtk -+ - import argparse - import getopt - import os -@@ -70,7 +74,7 @@ sys.path.append('/usr/share/ibus-anthy/engine') - from anthycases import TestCases - - --@unittest.skipIf(Gdk.Display.open('') == None, 'Display cannot be open.') -+@unittest.skipIf(Gdk.Display.get_default() == None, 'Display cannot be open.') - class AnthyTest(unittest.TestCase): - global DONE_EXIT - ENGINE_PATH = '/com/redhat/IBus/engines/Anthy/Test/Engine' -@@ -81,11 +85,21 @@ class AnthyTest(unittest.TestCase): - - def setUp(self): - self.__id = 0 -- self.__rerun = False -+ self.__engine_is_focused = False -+ self.__idle_count = 0 -+ self.__idle_loop = None - self.__test_index = 0 -+ self.__preedit_changes = 0 -+ self.__preedit_prev = None - self.__conversion_index = 0 -+ self.__conversion_spaces = 0 - self.__commit_done = False - self.__engine = None -+ self.__list_toplevel = False -+ self.__is_wayland = False -+ display = Gdk.Display.get_default() -+ if GObject.type_name(display.__gtype__) == 'GdkWaylandDisplay': -+ self.__is_wayland = True - - def register_ibus_engine(self): - printflush('## Registering engine') -@@ -133,6 +147,59 @@ class AnthyTest(unittest.TestCase): - self.__bus.request_name('org.freedesktop.IBus.Anthy.Test', 0) - return True - -+ def create_window(self): -+ match Gtk.MAJOR_VERSION: -+ case 4: -+ self.create_window_gtk4() -+ case 3: -+ self.create_window_gtk3() -+ case _: -+ self.gtk_version_exception() -+ -+ def create_window_gtk4(self): -+ window = Gtk.Window() -+ self.__entry = entry = Gtk.Entry() -+ window.connect('destroy', self.__window_destroy_cb) -+ entry.connect('map', self.__entry_map_cb) -+ controller = Gtk.EventControllerFocus() -+ controller.set_propagation_phase(Gtk.PropagationPhase.BUBBLE) -+ controller.connect_after('enter', self.__controller_enter_cb) -+ text = entry.get_delegate() -+ text.add_controller(controller) -+ text.connect('preedit-changed', self.__entry_preedit_changed_cb) -+ buffer = entry.get_buffer() -+ buffer.connect('inserted-text', self.__buffer_inserted_text_cb) -+ window.set_child(entry) -+ window.set_focus(entry) -+ window.present() -+ printflush('## Build GTK4 window') -+ -+ def create_window_gtk3(self): -+ window = Gtk.Window(type = Gtk.WindowType.TOPLEVEL) -+ self.__entry = entry = Gtk.Entry() -+ window.connect('destroy', self.__window_destroy_cb) -+ entry.connect('map', self.__entry_map_cb) -+ entry.connect('focus-in-event', self.__entry_focus_in_event_cb) -+ entry.connect('preedit-changed', self.__entry_preedit_changed_cb) -+ buffer = entry.get_buffer() -+ buffer.connect('inserted-text', self.__buffer_inserted_text_cb) -+ window.add(entry) -+ window.show_all() -+ printflush('## Build GTK3 window') -+ -+ def gtk_version_exception(self): -+ raise Exception("GTK version %d is not supported" % Gtk.MAJOR_VERSION) -+ -+ def is_integrated_desktop(self): -+ session_name = None -+ if 'XDG_SESSION_DESKTOP' in os.environ: -+ session_name = os.environ['XDG_SESSION_DESKTOP'] -+ if session_name == None: -+ return False -+ if len(session_name) >= 4 and session_name[0:5] == 'gnome': -+ return True -+ return False -+ - def __name_owner_changed_cb(self, connection, sender_name, object_path, - interface_name, signal_name, parameters, - user_data): -@@ -142,7 +209,7 @@ class AnthyTest(unittest.TestCase): - except ModuleNotFoundError as e: - with self.subTest(i = 'name-owner-changed'): - self.fail('NG: Not installed ibus-anthy %s' % str(e)) -- Gtk.main_quit() -+ self.__window_destroy_cb() - return - engine.Engine.CONFIG_RELOADED() - -@@ -154,60 +221,101 @@ class AnthyTest(unittest.TestCase): - except ModuleNotFoundError as e: - with self.subTest(i = 'create-engine'): - self.fail('NG: Not installed ibus-anthy %s' % str(e)) -- Gtk.main_quit() -+ self.__window_destroy_cb() - return - self.__id += 1 - self.__engine = engine.Engine(self.__bus, '%s/%d' % (self.ENGINE_PATH, self.__id)) -+ if hasattr(self.__engine.props, 'has_focus_id'): -+ self.__engine.connect('focus-in-id', self.__engine_focus_in) -+ self.__engine.connect('focus-out-id', self.__engine_focus_out) -+ # The timing of D-Bus signal of Engine.has_focus_id can cause -+ # some 'focus-in' signals earlier and 'focus-in-id' signals later. - self.__engine.connect('focus-in', self.__engine_focus_in) - self.__engine.connect('focus-out', self.__engine_focus_out) - return self.__engine - -- def __engine_focus_in(self, engine): -+ def __engine_focus_in(self, engine, object_path=None, client=None): -+ printflush('## Focus in engine %s %s' % (object_path, client)) - if self.__test_index == len(TestCases['tests']): - if DONE_EXIT: -- Gtk.main_quit() -+ self.__window_destroy_cb() - return -- # Workaround because focus-out resets the preedit text -- # ibus_bus_set_global_engine() calls bus_input_context_set_engine() -- # twice and it causes bus_engine_proxy_focus_out() -- if self.__rerun: -- self.__main_test() -+ self.__engine_is_focused = True - pass - -- def __engine_focus_out(self, engine): -- self.__rerun = True -+ def __engine_focus_out(self, engine, object_path=None): -+ printflush('## Focus out engine %s' % object_path) -+ self.__engine_is_focused = False - -- def create_window(self): -- window = Gtk.Window(type = Gtk.WindowType.TOPLEVEL) -- self.__entry = entry = Gtk.Entry() -- window.connect('destroy', Gtk.main_quit) -- entry.connect('map', self.__entry_map_cb) -- entry.connect('focus-in-event', self.__entry_focus_in_event_cb) -- entry.connect('preedit-changed', self.__entry_preedit_changed_cb) -- buffer = entry.get_buffer() -- buffer.connect('inserted-text', self.__buffer_inserted_text_cb) -- window.add(entry) -- window.show_all() -- printflush('## Build window') -+ def __window_destroy_cb(self): -+ match Gtk.MAJOR_VERSION: -+ case 4: -+ self.__list_toplevel = False -+ case 3: -+ Gtk.main_quit() -+ case _: -+ self.gtk_version_exception() - - def __entry_map_cb(self, entry): - printflush('## Map window') - -+ def __controller_enter_cb(self, controller): -+ if self.is_integrated_desktop(): -+ # Wait for 3 seconds in GNOME Wayland because there is a long time -+ # lag between the "enter" signal on the event controller in GtkText -+ # and the "FocusIn" D-Bus signal in BusInputContext of ibus-daemon. -+ printflush('## Waiting for 3 secs') -+ GLib.timeout_add_seconds(3, -+ self.__controller_enter_delay, -+ controller) -+ else: -+ printflush('## No Wait') -+ GLib.idle_add(self.__controller_enter_delay, -+ controller) -+ -+ def __controller_enter_delay(self, controller): -+ text = controller.get_widget() -+ if not text.get_realized(): -+ return -+ self.__entry_focus_in_event_cb(None, None) -+ - def __entry_focus_in_event_cb(self, entry, event): -- printflush('## Get focus') -+ printflush('## Focus in entry') - if self.__test_index == len(TestCases['tests']): - if DONE_EXIT: -- Gtk.main_quit() -+ self.__window_destroy_cb() - return False - self.__bus.set_global_engine_async('testanthy', -1, None, self.__set_engine_cb) - return False - -+ def __idle_cb(self): -+ if self.__engine_is_focused: -+ self.__idle_loop.quit() -+ return GLib.SOURCE_REMOVE -+ elif self.__idle_count < 10: -+ self.__idle_count += 1 -+ return GLib.SOURCE_CONTINUE -+ else: -+ self.__idle_loop.quit() -+ return GLib.SOURCE_REMOVE -+ - def __set_engine_cb(self, object, res): -+ printflush('## Set engine') - if not self.__bus.set_global_engine_async_finish(res): - with self.subTest(i = self.__test_index): - self.fail('set engine failed: ' + error.message) - return - self.__enable_hiragana() -+ # ibus_im_context_focus_in() is called after GlobalEngine is set. -+ # The focus-in/out events happen more slowly in a busy system -+ # likes with a TMT tool. -+ if self.is_integrated_desktop(): -+ if 'IBUS_DAEMON_WITH_SYSTEMD' in os.environ and \ -+ os.environ['IBUS_DAEMON_WITH_SYSTEMD'] != None: -+ self.__idle_loop = GLib.MainLoop(None) -+ self.__idle_count = 0 -+ GLib.timeout_add_seconds(1, self.__idle_cb) -+ self.__idle_loop.run() - self.__main_test() - - def __get_test_condition_length(self, tag): -@@ -217,24 +325,48 @@ class AnthyTest(unittest.TestCase): - return len(cases[type]) - - def __entry_preedit_changed_cb(self, entry, preedit_str): -- if len(preedit_str) == 0: -+ # Wait for clearing the preedit before the next __main_test() is called. -+ if self.__commit_done: -+ if len(preedit_str) == 0: -+ self.__preedit_changes = 0 -+ self.__main_test() -+ else: -+ self.__preedit_changes += 1 - return -+ if self.__is_wayland: -+ # Need to fix mutter -+ # GTK calls self.__entry_preedit_changed_cb() twice by the actual -+ # preedit update in GNOME Wayland in case the lookup window is not -+ # shown yet and the preedit is changed but not the cursor position -+ # only. -+ # -+ # I.e. GTK receives the struct zwp_text_input_v3_listener.done() -+ # from Wayland text-input protocol when the preedit is updated -+ # and the "preedit-changed" signal is called at first and the -+ # zwp_text_input_v3_listener.done() also calls -+ # zwp_text_input_v3_commit() to notify IM changes to mutter and -+ # mutter receives the struct -+ # zwp_text_input_v3_interface.commit_state() from Wayland text-input -+ # protocol and it causes the zwp_text_input_v3_listener.done() and -+ # the "preedit-changed" signal in GTK. -+ if self.__preedit_changes < 1 and self.__conversion_spaces < 2 \ -+ and self.__preedit_prev != preedit_str: -+ self.__preedit_changes += 1 -+ return -+ else: -+ self.__preedit_changes = 0 - if self.__test_index == len(TestCases['tests']): - if DONE_EXIT: -- Gtk.main_quit() -+ self.__window_destroy_cb() - return -+ self.__preedit_prev = preedit_str - conversion_length = self.__get_test_condition_length('conversion') -- # Need to return again even if all the conversion is finished -- # until the final Engine.update_preedit() is called. -- if self.__conversion_index > conversion_length: -- return -- self.__run_cases('conversion', -- self.__conversion_index, -- self.__conversion_index + 1) - if self.__conversion_index < conversion_length: -+ self.__run_cases('conversion', -+ self.__conversion_index, -+ self.__conversion_index + 1) - self.__conversion_index += 1 - return -- self.__conversion_index += 1 - self.__run_cases('commit') - - def __enable_hiragana(self): -@@ -249,13 +381,12 @@ class AnthyTest(unittest.TestCase): - printflush('## Already hiragana') - - def __main_test(self): -+ printflush('## Run case %d' % self.__test_index) -+ self.__preedit_prev = None - self.__conversion_index = 0 -+ self.__conversion_spaces = 0 - self.__commit_done = False - self.__run_cases('preedit') -- self.__run_cases('conversion', -- self.__conversion_index, -- self.__conversion_index + 1) -- self.__conversion_index += 1 - - def __run_cases(self, tag, start=-1, end=-1): - tests = TestCases['tests'][self.__test_index] -@@ -288,6 +419,10 @@ class AnthyTest(unittest.TestCase): - if start != -1 or end != -1: - printflush('test step: %s sequences: [0x%X, 0x%X, 0x%X]' \ - % (tag, key[0], key[1], key[2])) -+ # Check if the lookup table is shown. -+ if tag == 'conversion' and \ -+ (key[0] == IBus.KEY_Tab or key[0] == IBus.KEY_space): -+ self.__conversion_spaces += 1 - self.__typing(key[0], key[1], key[2]) - i += 1 - -@@ -306,21 +441,30 @@ class AnthyTest(unittest.TestCase): - self.fail('NG: %d %s %s' \ - % (self.__test_index, str(cases['string']), chars)) - if DONE_EXIT: -- Gtk.main_quit() -+ self.__window_destroy_cb() - self.__test_index += 1 - if self.__test_index == len(TestCases['tests']): - if DONE_EXIT: -- Gtk.main_quit() -+ self.__window_destroy_cb() - return - self.__entry.set_text('') -- self.__main_test() -+ # ibus-anthy updates preedit after commits the text. -+ self.__commit_done = True - - def main(self): -- Gtk.main() -+ match Gtk.MAJOR_VERSION: -+ case 4: -+ while self.__list_toplevel: -+ GLib.MainContext.default().iteration(True) -+ case 3: -+ Gtk.main() -+ case _: -+ self.gtk_version_exception() - - def test_typing(self): - if not self.register_ibus_engine(): - sys.exit(-1) -+ self.__list_toplevel = True - self.create_window() - self.main() - --- -2.45.2 - -From 923138960c929df4d57e19e12c1e8ac72090eeaa Mon Sep 17 00:00:00 2001 -From: fujiwarat -Date: Fri, 24 Jan 2025 12:06:19 +0900 -Subject: [PATCH] data: Update era.t with 2025 - ---- - data/era.t | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/data/era.t b/data/era.t -index 8750bc5..76a374c 100644 ---- a/data/era.t -+++ b/data/era.t -@@ -2,7 +2,7 @@ - # - # ibus-anthy - The Anthy engine for IBus - # --# Copyright (c) 2010-2024 Takao Fujiwara -+# Copyright (c) 2010-2025 Takao Fujiwara - # Copyright (c) 2010-2013 Red Hat, Inc. - # - # This program is free software; you can redistribute it and/or modify -@@ -344,6 +344,8 @@ - れいわ5 #T35*500 2023 - れいわ6 #T35*500 令和6 - れいわ6 #T35*500 2024 -+れいわ7 #T35*500 令和7 -+れいわ7 #T35*500 2025 - 1868 #T35*500 明治1 - 1869 #T35*500 明治2 - 1870 #T35*500 明治3 -@@ -505,3 +507,4 @@ - 2022 #T35*500 令和4 - 2023 #T35*500 令和5 - 2024 #T35*500 令和6 -+2025 #T35*500 令和7 --- -2.47.0 - From 5df253efd2f314dd7b7bfb826a0d9d4b5eabe666 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Tue, 18 Feb 2025 23:41:06 +0900 Subject: [PATCH 67/75] Bump to 1.5.17 --- .gitignore | 1 + ibus-anthy-HEAD.patch | 0 ibus-anthy.spec | 11 ++++++++--- ibus-anthy.tar.gz.sum | 4 ++++ sources | 2 +- 5 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 ibus-anthy-HEAD.patch create mode 100644 ibus-anthy.tar.gz.sum diff --git a/.gitignore b/.gitignore index b51f22e..68fd01d 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ ibus-anthy.png /ibus-anthy-1.5.14.tar.gz /ibus-anthy-1.5.15.tar.gz /ibus-anthy-1.5.16.tar.gz +/ibus-anthy-1.5.17.tar.gz diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch new file mode 100644 index 0000000..e69de29 diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 22eee58..f6ab10b 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -17,16 +17,16 @@ %endif Name: ibus-anthy -Version: 1.5.16 +Version: 1.5.17 Release: %autorelease Summary: The Anthy engine for IBus input platform License: GPL-2.0-or-later URL: https://github.com/ibus/ibus/wiki -Source0: https://github.com/ibus/ibus-anthy/releases/download/%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/ibus/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz +Source1: https://github.com/ibus/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz.sum#/%{name}.tar.gz.sum # Upstreamed patches. # Patch0: %%{name}-HEAD.patch -Patch0: %{name}-HEAD.patch Patch1: %{name}-1938129-default-hiragana.patch BuildRequires: anthy-unicode-devel @@ -88,6 +88,11 @@ the functionality of the installed %{name} package. %prep +SAVED_SUM=$(grep sha512sum %SOURCE1 | awk '{print $2}') +MY_SUM=$(sha512sum %SOURCE0 | awk '{print $1}') +if test x"$SAVED_SUM" != x"$MY_SUM" ; then + abort +fi %autosetup -S git %build diff --git a/ibus-anthy.tar.gz.sum b/ibus-anthy.tar.gz.sum new file mode 100644 index 0000000..cc21697 --- /dev/null +++ b/ibus-anthy.tar.gz.sum @@ -0,0 +1,4 @@ +cksum 1682900558 914700 ibus-anthy-1.5.17.tar.gz +sha1sum 7935a5abc2a1cb4dd59ff9295d3582bdb1f0cc83 ibus-anthy-1.5.17.tar.gz +sha256sum 9e1d28ad7da2be5e0d9c0eb0d8fb7557fc89770aa2237272debe197bd61abd40 ibus-anthy-1.5.17.tar.gz +sha512sum 34775879ea4891d2f83c5f9aa341a59bac928332ad60ec4ba8d1475783b0c50c721229e48c7671f050066da3d4053531792c3fa5e5640db2c2e8bd1bc46105a1 ibus-anthy-1.5.17.tar.gz diff --git a/sources b/sources index 012042b..6c6f368 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ibus-anthy-1.5.16.tar.gz) = d1a7b9da402d85af955f96fd8618189fb2e682763f57b5d6b54e7bcf052138ba300f4ba8130a4ac0e8e1e8821319e9b6360e57568c84c1f9845438174e51a959 +SHA512 (ibus-anthy-1.5.17.tar.gz) = 34775879ea4891d2f83c5f9aa341a59bac928332ad60ec4ba8d1475783b0c50c721229e48c7671f050066da3d4053531792c3fa5e5640db2c2e8bd1bc46105a1 From d41c6ef8b3ee71ab255ffe98d4301b0044b1edc3 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Sat, 7 Jun 2025 15:41:08 +0900 Subject: [PATCH 68/75] Enable compose error notification --- ibus-anthy-HEAD.patch | 266 ++++++++++++++++++++++++++++++++++++++++++ ibus-anthy.spec | 2 +- 2 files changed, 267 insertions(+), 1 deletion(-) diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch index e69de29..24a85f2 100644 --- a/ibus-anthy-HEAD.patch +++ b/ibus-anthy-HEAD.patch @@ -0,0 +1,266 @@ +From 7f3101f60abc0c615ec2dcf82729b554373cddcc Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Sat, 7 Jun 2025 15:33:17 +0900 +Subject: [PATCH] configure: Drop Python 2 support + +--- + configure.ac | 26 +++++++++----------------- + engine/Makefile.am | 8 ++------ + setup/Makefile.am | 8 ++------ + 3 files changed, 13 insertions(+), 29 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 8bb6733..e4090c3 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -117,12 +117,12 @@ AC_SUBST(ENV_IBUS_TEST) + dnl - define python version + AC_ARG_WITH(python, + AS_HELP_STRING([--with-python[=PATH]], +- [Select python2 or python3]), ++ [Select python3. python2 is no longer supported.]), + [PYTHON=$with_python], [] + ) + + dnl export $pyexecdir using existent $PYTHON +-AM_PATH_PYTHON([2.5]) ++AM_PATH_PYTHON([3.0]) + + dnl Decided to separate python3 directory from python2 directory here + dnl because engine/table.py includes unicode array so it's better to +@@ -142,15 +142,12 @@ dnl return gettext(a) + case "$PYTHON_VERSION" in + 3.*) + enable_python3=yes +- enable_python2=no + ;; + *) +- enable_python3=no +- enable_python2=yes ++ AC_MSG_ERROR([Not support PYTHON $PYTHON]) + ;; + esac + +-AM_CONDITIONAL([ENABLE_PYTHON2], [test x"$enable_python2" = x"yes"]) + AM_CONDITIONAL([ENABLE_PYTHON3], [test x"$enable_python3" = x"yes"]) + + dnl - check the supported ibus version +@@ -192,15 +189,14 @@ fi + AC_SUBST(ENV_IBUS_ENGINE) + + dnl - check pygtk2 +-AC_MSG_CHECKING([whether you enable pygtk2 anthy]) ++AC_MSG_NOTICE([pygtk2 does not work because python2 is no longer supported.]) + AC_ARG_ENABLE(pygtk2-anthy, + AS_HELP_STRING([--enable-pygtk2-anthy=no/yes], +- [Install pygtk2 anthy default=no]), +- [], +- enable_pygtk2_anthy=no) +-AC_MSG_RESULT($enable_pygtk2_anthy) ++ [pygtk2 is no longer supported.]), ++ enable_pygtk2=no, ++ enable_pygtk2=no) + +-if test x"$enable_pygtk2_anthy" = xyes; then ++if test x"$enable_pygtk2" = xyes; then + AM_CONDITIONAL(HAVE_PYGTK2_ANTHY, true) + + dnl - check swig +@@ -447,14 +443,10 @@ ibus-anthy.spec + data/Makefile + gir/Makefile + engine/Makefile +-engine/python2/Makefile +-engine/python2/anthy.inputMethod.xml.in +-engine/python2/default.inputMethod.xml.in + engine/python3/Makefile + engine/python3/anthy.inputMethod.xml.in + engine/python3/default.inputMethod.xml.in + setup/Makefile +-setup/python2/Makefile + setup/python3/Makefile + tests/Makefile + icons/Makefile +@@ -475,7 +467,7 @@ ANTHY_GOBJECT_GIRDIR $ANTHY_GOBJECT_GIRDIR + ANTHY_GOBJECT_TYPELIBSDIR $ANTHY_GOBJECT_TYPELIBSDIR + LT_VERSION_INFO $LT_VERSION_INFO + ENV_IBUS_ENGINE $ENV_IBUS_ENGINE +-HAVE_PYGTK2_ANTHY $enable_pygtk2_anthy ++HAVE_PYGTK2_ANTHY $enable_pygtk2 + python $PYTHON + Enable python2 $enable_python2 + Enable python3 $enable_python3 +diff --git a/engine/Makefile.am b/engine/Makefile.am +index 3c64425..991d7e3 100644 +--- a/engine/Makefile.am ++++ b/engine/Makefile.am +@@ -2,8 +2,8 @@ + # + # ibus-anthy - The Anthy engine for IBus + # +-# Copyright (c) 2014 Takao Fujiwara +-# Copyright (c) 2014 Red Hat, Inc. ++# Copyright (c) 2014-2025 Takao Fujiwara ++# Copyright (c) 2014-2025 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 +@@ -21,10 +21,6 @@ + + SUBDIRS = + +-if ENABLE_PYTHON2 +-SUBDIRS += python2 +-endif +- + if ENABLE_PYTHON3 + SUBDIRS += python3 + endif +diff --git a/setup/Makefile.am b/setup/Makefile.am +index 3c64425..991d7e3 100644 +--- a/setup/Makefile.am ++++ b/setup/Makefile.am +@@ -2,8 +2,8 @@ + # + # ibus-anthy - The Anthy engine for IBus + # +-# Copyright (c) 2014 Takao Fujiwara +-# Copyright (c) 2014 Red Hat, Inc. ++# Copyright (c) 2014-2025 Takao Fujiwara ++# Copyright (c) 2014-2025 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 +@@ -21,10 +21,6 @@ + + SUBDIRS = + +-if ENABLE_PYTHON2 +-SUBDIRS += python2 +-endif +- + if ENABLE_PYTHON3 + SUBDIRS += python3 + endif +-- +2.49.0 + +From 7dd0db48e69306d28cb033336e0e7429b2920fb1 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Sat, 7 Jun 2025 15:34:18 +0900 +Subject: [PATCH] engine: Enable compose error notification + +IBusEngimeSimple now can use focus-id feature to warn the messages +for GNOME and Wayland specific and the parent class needs to connect +the 'focus-in/out-id' signals instead overriding the class methods +to access ibus_engine_simple_focus_in_id(). + +Also define the name of GType of the Python classes. + +BUG=https://github.com/ibus/ibus/pull/2763 +--- + engine/python3/engine.py | 26 ++++++++++++++++---------- + engine/python3/factory.py | 3 ++- + 2 files changed, 18 insertions(+), 11 deletions(-) + +diff --git a/engine/python3/engine.py b/engine/python3/engine.py +index 0858614..5678d18 100644 +--- a/engine/python3/engine.py ++++ b/engine/python3/engine.py +@@ -4,7 +4,7 @@ + # ibus-anthy - The Anthy engine for IBus + # + # Copyright (c) 2007-2008 Peng Huang +-# Copyright (c) 2010-2024 Takao Fujiwara ++# Copyright (c) 2010-2025 Takao Fujiwara + # Copyright (c) 2007-2018 Red Hat, Inc. + # + # This program is free software; you can redistribute it and/or modify +@@ -116,6 +116,7 @@ for k, v in zip(['KEY_KP_Add', 'KEY_KP_Decimal', 'KEY_KP_Divide', 'KEY_KP_Enter' + KP_Table[getattr(IBus, k)] = getattr(IBus, v) + + class Engine(IBus.EngineSimple): ++ __gtype_name__ = 'IBusEngineAnthy' + __input_mode = None + __typing_mode = None + __segment_mode = None +@@ -129,12 +130,12 @@ class Engine(IBus.EngineSimple): + + def __init__(self, bus, object_path): + if hasattr(IBus.Engine.props, 'has_focus_id'): +- super(Engine, self).__init__(engine_name="anthy", ++ super(Engine, self).__init__(engine_name='anthy', + connection=bus.get_connection(), + object_path=object_path, + has_focus_id=True) + else: +- super(Engine, self).__init__(engine_name="anthy", ++ super(Engine, self).__init__(engine_name='anthy', + connection=bus.get_connection(), + object_path=object_path) + +@@ -186,6 +187,11 @@ class Engine(IBus.EngineSimple): + # loop infinitely if this class overrides it. + # self.process_key_event is not accessible too. + self.connect('process-key-event', self.__process_key_event) ++ self.connect('focus-in', self.__focus_in) ++ # flashing compose sequence in GNOME instead of system bell ++ self.connect('focus-in-id', self.__focus_in_id) ++ self.connect('focus-out', self.__focus_out) ++ self.connect('focus-out-id', self.__focus_out_id) + self.connect('destroy', self.__destroy) + self.connect('page-down', self.__page_down) + self.connect('page-up', self.__page_up) +@@ -1059,13 +1065,10 @@ class Engine(IBus.EngineSimple): + def __rgb(self, r, g, b): + return self.__argb(255, r, g, b) + +- def do_focus_in(self): +- self.do_focus_in_id(None, None) ++ def __focus_in(self, obj): ++ self.__focus_in_id(obj, None, None) + +- def do_focus_out(self): +- self.do_focus_out_id(None) +- +- def do_focus_in_id(self, object_path, client): ++ def __focus_in_id(self, obj, object_path, client): + self.register_properties(self.__prop_list) + self.__refresh_typing_mode_property() + mode = self.__prefs.get_value('common', 'behavior-on-focus-out') +@@ -1077,7 +1080,10 @@ class Engine(IBus.EngineSimple): + if size != self.__lookup_table.get_page_size(): + self.__lookup_table.set_page_size(size) + +- def do_focus_out_id(self, object_path): ++ def __focus_out(self, obj): ++ self.__focus_out_id(obj, None) ++ ++ def __focus_out_id(self, obj, object_path): + if self.__has_input_purpose: + self.__input_purpose = 0 + mode = self.__prefs.get_value('common', 'behavior-on-focus-out') +diff --git a/engine/python3/factory.py b/engine/python3/factory.py +index b7b1e89..ea1d364 100644 +--- a/engine/python3/factory.py ++++ b/engine/python3/factory.py +@@ -4,7 +4,7 @@ + # ibus-anthy - The Anthy engine for IBus + # + # Copyright (c) 2007-2008 Peng Huang +-# Copyright (c) 2010-2017 Takao Fujiwara ++# Copyright (c) 2010-2025 Takao Fujiwara + # Copyright (c) 2007-2017 Red Hat, Inc. + # + # This program is free software; you can redistribute it and/or modify +@@ -34,6 +34,7 @@ import engine + + + class EngineFactory(IBus.Factory): ++ __gtype_name__ = 'IBusFactoryAnthy' + FACTORY_PATH = '/com/redhat/IBus/engines/Anthy/Factory' + ENGINE_PATH = '/com/redhat/IBus/engines/Anthy/Engine' + NAME = 'Anthy' +-- +2.49.0 + diff --git a/ibus-anthy.spec b/ibus-anthy.spec index f6ab10b..4f94800 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -27,6 +27,7 @@ Source1: https://github.com/ibus/%{name}/releases/download/%{version}/%{n # Upstreamed patches. # Patch0: %%{name}-HEAD.patch +Patch0: %{name}-HEAD.patch Patch1: %{name}-1938129-default-hiragana.patch BuildRequires: anthy-unicode-devel @@ -108,7 +109,6 @@ fi --with-kasumi-exec=/usr/bin/kasumi-unicode \ %endif --with-on-off-keys="'Zenkaku_Hankaku', 'Ctrl+space', 'Ctrl+J'" \ - --with-python=python3 \ --enable-installed-tests \ --disable-static # make -C po update-gmo From 2b23d1b0f8aea2f3d28416dddeb0ce7e52753441 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 24 Jul 2025 17:29:19 +0000 Subject: [PATCH 69/75] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 2e507c163f69382e5df29b7131393a54e44fcee5 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Thu, 31 Jul 2025 10:53:19 +0900 Subject: [PATCH 70/75] Resolves #2385069 Remake aclocal.m4 for automake-1.18.1 --- ibus-anthy.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 4f94800..f9255d7 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -98,6 +98,7 @@ fi %build #autoreconf -f -i -v +autoreconf -f -i -v %configure \ %if %have_default_layout --with-layout='default' \ From 5db75b56487a4c1164c8062d6e853a0f348a8ea7 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 15 Aug 2025 12:52:17 +0200 Subject: [PATCH 71/75] Rebuilt for Python 3.14.0rc2 bytecode From 8d002f9de32d292923f8499a734272188b4a3fca Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Thu, 4 Sep 2025 10:35:11 +0900 Subject: [PATCH 72/75] Use preedit semantic API --- ibus-anthy-HEAD.patch | 109 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch index 24a85f2..b6d41ec 100644 --- a/ibus-anthy-HEAD.patch +++ b/ibus-anthy-HEAD.patch @@ -264,3 +264,112 @@ index b7b1e89..ea1d364 100644 -- 2.49.0 +From 7e345f89b574b746fa9e33df3504831ff7553ec9 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Wed, 3 Sep 2025 13:38:15 +0900 +Subject: [PATCH] engine/engine: Use preedit semantic API + +ibus_attr_hint_new() API is provided and other ibus_attr_underline_new(), +ibus_attr_foreground_new() and ibus_attr_foreground_new() are deprecated +so that IBus panel or the Wayland panels decide the actual preedit colors +with the current desktop theme. + +BUG=https://github.com/ibus/ibus/pull/2790 +--- + engine/python3/engine.py | 52 ++++++++++++++++++++++++++++------------ + 1 file changed, 37 insertions(+), 15 deletions(-) + +diff --git a/engine/python3/engine.py b/engine/python3/engine.py +index 5678d18..a0bbc38 100644 +--- a/engine/python3/engine.py ++++ b/engine/python3/engine.py +@@ -152,6 +152,7 @@ class Engine(IBus.EngineSimple): + self.__prop_dict = {} + self.__input_purpose = 0 + self.__has_input_purpose = False ++ self.__has_preedit_format_hint = False + # OSK mode is designed for OSK on gnome-shell, which always shows + # IBus lookup window prior to the preedit and selecting a candidate + # causes the commmit instead of the selection. +@@ -169,6 +170,8 @@ class Engine(IBus.EngineSimple): + except ValueError as e: + printerr('Disable update_preedit_text_with_mode(): %s' % str(e)) + self.__has_update_preedit_text_with_mode = False ++ if hasattr(IBus, 'attr_hint_new'): ++ self.__has_preedit_format_hint = True + + # self.__lookup_table = ibus.LookupTable.new(page_size=9, + # cursor_pos=0, +@@ -1241,9 +1244,14 @@ class Engine(IBus.EngineSimple): + def __update_input_chars(self): + text, cursor = self.__get_preedit() + attrs = IBus.AttrList() +- attrs.append(IBus.attr_underline_new( +- IBus.AttrUnderline.SINGLE, 0, +- len(text))) ++ if self.__has_preedit_format_hint: ++ attrs.append(IBus.attr_hint_new( ++ IBus.AttrPreedit.WHOLE, 0, ++ len(text))) ++ else: ++ attrs.append(IBus.attr_underline_new( ++ IBus.AttrUnderline.SINGLE, 0, ++ len(text))) + + self.update_preedit(text, + attrs, cursor, not self.__preedit_ja_string.is_empty()) +@@ -1293,12 +1301,18 @@ class Engine(IBus.EngineSimple): + text = text.capitalize() + self.__convert_chars = text + attrs = IBus.AttrList() +- attrs.append(IBus.attr_underline_new( +- IBus.AttrUnderline.SINGLE, 0, len(text))) +- attrs.append(IBus.attr_background_new(self.__rgb(200, 200, 240), +- 0, len(text))) +- attrs.append(IBus.attr_foreground_new(self.__rgb(0, 0, 0), +- 0, len(text))) ++ if self.__has_preedit_format_hint: ++ attrs.append(IBus.attr_hint_new( ++ IBus.AttrPreedit.WHOLE, 0, len(text))) ++ attrs.append(IBus.attr_hint_new( ++ IBus.AttrPreedit.SELECTION, 0, len(text))) ++ else: ++ attrs.append(IBus.attr_underline_new( ++ IBus.AttrUnderline.SINGLE, 0, len(text))) ++ attrs.append(IBus.attr_background_new(self.__rgb(200, 200, 240), ++ 0, len(text))) ++ attrs.append(IBus.attr_foreground_new(self.__rgb(0, 0, 0), ++ 0, len(text))) + self.update_preedit(text, attrs, len(text), True) + + self.update_aux_string('', +@@ -1314,12 +1328,20 @@ class Engine(IBus.EngineSimple): + if i < self.__cursor_pos: + pos += len(text) + attrs = IBus.AttrList() +- attrs.append(IBus.attr_underline_new( +- IBus.AttrUnderline.SINGLE, 0, len(self.__convert_chars))) +- attrs.append(IBus.attr_background_new(self.__rgb(200, 200, 240), +- pos, pos + len(self.__segments[self.__cursor_pos][1]))) +- attrs.append(IBus.attr_foreground_new(self.__rgb(0, 0, 0), +- pos, pos + len(self.__segments[self.__cursor_pos][1]))) ++ if self.__has_preedit_format_hint: ++ attrs.append(IBus.attr_hint_new( ++ IBus.AttrPreedit.WHOLE, 0, len(self.__convert_chars))) ++ attrs.append(IBus.attr_hint_new( ++ IBus.AttrPreedit.SELECTION, ++ pos, ++ pos + len(self.__segments[self.__cursor_pos][1]))) ++ else: ++ attrs.append(IBus.attr_underline_new( ++ IBus.AttrUnderline.SINGLE, 0, len(self.__convert_chars))) ++ attrs.append(IBus.attr_background_new(self.__rgb(200, 200, 240), ++ pos, pos + len(self.__segments[self.__cursor_pos][1]))) ++ attrs.append(IBus.attr_foreground_new(self.__rgb(0, 0, 0), ++ pos, pos + len(self.__segments[self.__cursor_pos][1]))) + self.update_preedit(self.__convert_chars, attrs, pos, True) + aux_string = '( %d / %d )' % (self.__lookup_table.get_cursor_pos() + 1, self.__lookup_table.get_number_of_candidates()) + self.update_aux_string(aux_string, +-- +2.50.1 + From eb8a7d1bf6ec16877c2e6a1c74378e757c5e413f Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 19 Sep 2025 12:22:22 +0200 Subject: [PATCH 73/75] Rebuilt for Python 3.14.0rc3 bytecode From 84ebd2f5cf753b371b94b93c8de0eaaceeb155eb Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Thu, 18 Dec 2025 18:29:33 +0900 Subject: [PATCH 74/75] Fix back compatibility with IBus.init() --- ibus-anthy-HEAD.patch | 175 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 175 insertions(+) diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch index b6d41ec..c407955 100644 --- a/ibus-anthy-HEAD.patch +++ b/ibus-anthy-HEAD.patch @@ -373,3 +373,178 @@ index 5678d18..a0bbc38 100644 -- 2.50.1 +From 646ea5d63852477bd902a971952cac777019da09 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Tue, 16 Dec 2025 17:41:21 +0900 +Subject: [PATCH] engine: Fix double IBus.init() + +Calling IBus.init() twice causes a big memory leaks in OpenIndiana +2025.10 which uses IBus 1.5.29. +I have no idea to check the parent Python stack and use inspect module +to fix the double IBus.init(). +Also move ibus_check_version() from engin.py to main.py + +BUG=https://github.com/ibus/ibus-anthy/issues/44 +Fixes: https://github.com/ibus/ibus-anthy/commit/14b2759 +--- + engine/python2/engine.py | 12 ++---------- + engine/python2/main.py | 24 +++++++++++++++++++++++- + engine/python3/engine.py | 12 ++---------- + engine/python3/main.py | 24 +++++++++++++++++++++++- + 4 files changed, 50 insertions(+), 22 deletions(-) + +diff --git a/engine/python2/engine.py b/engine/python2/engine.py +index c7ccd3f..942dd33 100644 +--- a/engine/python2/engine.py ++++ b/engine/python2/engine.py +@@ -28,7 +28,7 @@ import signal + import sys + from gettext import dgettext + +-from main import get_userhome ++from main import get_userhome, ibus_check_version + + try: + from locale import getpreferredencoding +@@ -163,7 +163,7 @@ class Engine(IBus.EngineSimple): + self.__is_utf8 = False + self.__has_update_preedit_text_with_mode = True + try: +- self.__ibus_check_version('1.3') ++ ibus_check_version('1.3') + except ValueError as e: + printerr('Disable update_preedit_text_with_mode(): %s' % str(e)) + self.__has_update_preedit_text_with_mode = False +@@ -195,14 +195,6 @@ class Engine(IBus.EngineSimple): + self.__reset() + + +- def __ibus_check_version(self, v): +- major = IBus.MAJOR_VERSION +- minor = IBus.MINOR_VERSION +- micro = IBus.MICRO_VERSION +- if (major, minor, micro) < tuple(map(int, (v.split('.')))): +- raise ValueError('Required ibus %s but version of ibus is ' \ +- '%d.%d.%d' % (v, major, minor, micro)) +- + # http://en.sourceforge.jp/ticket/browse.php?group_id=14&tid=33075 + def __verify_anthy_journal_file(self): + journal = ANTHY_CONFIG_PATH + '/last-record2_default.utf8' +diff --git a/engine/python2/main.py b/engine/python2/main.py +index c1e6a2f..bae2058 100644 +--- a/engine/python2/main.py ++++ b/engine/python2/main.py +@@ -42,11 +42,33 @@ from gi.repository import IBus + + import _config as config + ++ ++def ibus_check_version(v): ++ major = IBus.MAJOR_VERSION ++ minor = IBus.MINOR_VERSION ++ micro = IBus.MICRO_VERSION ++ if (major, minor, micro) < tuple(map(int, (v.split('.')))): ++ raise ValueError('Required ibus %s but version of ibus is ' \ ++ '%d.%d.%d' % (v, major, minor, micro)) ++ ++ + # Need to call IBus.init() before IBus.EngineSimple() is loaded. + # factory -> engine -> IBus.EngineSimple +-IBus.init() ++try: ++ # IBus.init() has not been needed here since IBus 1.5.32 ++ ibus_check_version("1.5.32") ++except ValueError: ++ import inspect ++ parent_frame = inspect.currentframe().f_back ++ # Call IBus.init() again from "from main import get_userhome" in engin.py. ++ # The twice IBus.init() issue has been fixed since IBus 1.5.31 by ++ # https://github.com/ibus/ibus/commit/9f50b46 ++ if parent_frame == None: ++ IBus.init() ++ + import factory + ++ + class IMApp: + def __init__(self, exec_by_ibus): + command_line = config.LIBEXECDIR + '/ibus-engine-anthy --ibus' +diff --git a/engine/python3/engine.py b/engine/python3/engine.py +index a0bbc38..4781d42 100644 +--- a/engine/python3/engine.py ++++ b/engine/python3/engine.py +@@ -29,7 +29,7 @@ import signal + import sys + from gettext import dgettext + +-from main import get_userhome ++from main import get_userhome, ibus_check_version + + try: + from locale import getpreferredencoding +@@ -166,7 +166,7 @@ class Engine(IBus.EngineSimple): + self.__is_utf8 = False + self.__has_update_preedit_text_with_mode = True + try: +- self.__ibus_check_version('1.3') ++ ibus_check_version('1.3') + except ValueError as e: + printerr('Disable update_preedit_text_with_mode(): %s' % str(e)) + self.__has_update_preedit_text_with_mode = False +@@ -205,14 +205,6 @@ class Engine(IBus.EngineSimple): + self.__reset() + + +- def __ibus_check_version(self, v): +- major = IBus.MAJOR_VERSION +- minor = IBus.MINOR_VERSION +- micro = IBus.MICRO_VERSION +- if (major, minor, micro) < tuple(map(int, (v.split('.')))): +- raise ValueError('Required ibus %s but version of ibus is ' \ +- '%d.%d.%d' % (v, major, minor, micro)) +- + # http://en.sourceforge.jp/ticket/browse.php?group_id=14&tid=33075 + def __verify_anthy_journal_file(self): + journal = ANTHY_CONFIG_PATH + '/last-record2_default.utf8' +diff --git a/engine/python3/main.py b/engine/python3/main.py +index 05836a6..3ab99b2 100644 +--- a/engine/python3/main.py ++++ b/engine/python3/main.py +@@ -42,11 +42,33 @@ from gi.repository import IBus + + import _config as config + ++ ++def ibus_check_version(v): ++ major = IBus.MAJOR_VERSION ++ minor = IBus.MINOR_VERSION ++ micro = IBus.MICRO_VERSION ++ if (major, minor, micro) < tuple(map(int, (v.split('.')))): ++ raise ValueError('Required ibus %s but version of ibus is ' \ ++ '%d.%d.%d' % (v, major, minor, micro)) ++ ++ + # Need to call IBus.init() before IBus.EngineSimple() is loaded. + # factory -> engine -> IBus.EngineSimple +-IBus.init() ++try: ++ # IBus.init() has not been needed here since IBus 1.5.32 ++ ibus_check_version("1.5.32") ++except ValueError: ++ import inspect ++ parent_frame = inspect.currentframe().f_back ++ # Call IBus.init() again from "from main import get_userhome" in engin.py. ++ # The twice IBus.init() issue has been fixed since IBus 1.5.31 by ++ # https://github.com/ibus/ibus/commit/9f50b46 ++ if parent_frame == None: ++ IBus.init() ++ + import factory + ++ + class IMApp: + def __init__(self, exec_by_ibus): + command_line = config.LIBEXECDIR + '/ibus-engine-anthy --ibus' +-- +2.52.0 + From 480addfde1e645a21e1436f85a4f55f9d7cb1da0 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Mon, 12 Jan 2026 10:25:03 +0900 Subject: [PATCH 75/75] Update era.t with 2026 --- ibus-anthy-HEAD.patch | 817 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 817 insertions(+) diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch index c407955..c8c77b8 100644 --- a/ibus-anthy-HEAD.patch +++ b/ibus-anthy-HEAD.patch @@ -548,3 +548,820 @@ index 05836a6..3ab99b2 100644 -- 2.52.0 +From 296cd6b8e4e79964b4956953707b315c3dc010da Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Mon, 12 Jan 2026 09:49:48 +0900 +Subject: [PATCH] data: Update era.t with 2026 + +Added era.py to update the Era automatically. +--- + data/Makefile.am | 33 +++- + data/era.py | 196 +++++++++++++++++++ + data/era.t | 5 +- + data/era.t.in | 491 +++++++++++++++++++++++++++++++++++++++++++++++ + 4 files changed, 716 insertions(+), 9 deletions(-) + create mode 100755 data/era.py + create mode 100644 data/era.t.in + +diff --git a/data/Makefile.am b/data/Makefile.am +index d76f17a..c13d273 100644 +--- a/data/Makefile.am ++++ b/data/Makefile.am +@@ -2,7 +2,7 @@ + # + # ibus-anthy - The Anthy engine for IBus + # +-# Copyright (c) 2010-2021 Takao Fujiwara ++# Copyright (c) 2010-2026 Takao Fujiwara + # Copyright (c) 2010-2018 Red Hat, Inc. + # + # This program is free software; you can redistribute it and/or modify +@@ -19,6 +19,8 @@ + # with this program; if not, write to the Free Software Foundation, Inc., + # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + ++noinst_DATA = era.stamp ++ + dicts_DATA = \ + emoji.t \ + era.t \ +@@ -43,6 +45,7 @@ CLEANFILES = \ + $(metainfo_DATA) \ + $(schemas_DATA) \ + emoji.t \ ++ era.stamp \ + $(NULL) + + $(metainfo_DATA): $(metainfo_in_files) Makefile +@@ -79,14 +82,26 @@ zipcode.t: $(ANTHY_ZIPCODE_FILE) + CLEANFILES += zipcode.t + endif + ++era.t: era.stamp ++ ++era.stamp: ++ if test -f $(srcdir)/era.t ; then \ ++ if ! $(srcdir)/era.py --check $(srcdir)/era.t ; then \ ++ rm $(srcdir)/era.t; \ ++ $(srcdir)/era.py $(srcdir)/era.t.in \ ++ --output $(builddir)/era.t; \ ++ echo "Generate era.t"; \ ++ fi; \ ++ fi; \ ++ touch era.stampT; \ ++ mv era.stampT era.stamp; ++ + check: +- S_YEAR=`date '+%Y'`; \ +- M_YEAR=`echo $$S_YEAR | sed 'y/0123456789/0123456789/'`; \ +- grep -q $$M_YEAR $(srcdir)/era.t; \ +- if test $$? -ne 0 ; then \ +- echo "This year $$M_YEAR is not included in era.y"; \ +- exit 1; \ +- fi; ++ if test -f $(srcdir)/era.t ; then \ ++ $(srcdir)/era.py --check $(srcdir)/era.t; \ ++ else \ ++ $(srcdir)/era.py --check $(builddir)/era.t; \ ++ fi + + install-data-hook: + if test -z "$(DESTDIR)"; then \ +@@ -106,6 +121,8 @@ EXTRA_DIST = \ + emoji-each.t \ + emoji-emoji.t \ + era.t \ ++ era.t.in \ ++ era.py \ + oldchar.t \ + symbol.t \ + zipcode-textdic.py \ +diff --git a/data/era.py b/data/era.py +new file mode 100755 +index 0000000..85eb55b +--- /dev/null ++++ b/data/era.py +@@ -0,0 +1,196 @@ ++#!/usr/bin/python3 ++# vim:set et sts=4 sw=4: ++# -*- coding: utf-8 -*- ++# ++# ibus-anthy - The Anthy engine for IBus ++# ++# Copyright (c) 2026 Takao Fujiwara ++# ++# 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. ++ ++from datetime import date ++from os import path ++import getopt ++import locale ++import re ++import sys ++ ++ ++_prgname = "" ++ ++class JapaneseEra(object): ++ VERSION = 1 ++ ERA_FIRST = 2019 ++ HIRAGANA_ERA = 'れいわ' ++ KANJI_ERA = '令和' ++ KANJI_ERA_PREV = '平成' ++ __S_YEAR = 0 ++ __M_YEAR = '' ++ __narrow_to_wide_map = None ++ _check = False ++ _output_file = None ++ _parse_file = None ++ _parse_contents = None ++ ++ def __init__(self): ++ if self._parse_file == None: ++ print("%s.parse_args() should be called before the instance " ++ "is generated." % str(self), file=sys.stderr) ++ sys.exit(1) ++ self.__narrow_to_wide_map = str.maketrans('0123456789', ++ '0123456789') ++ self.__S_YEAR = date.today().year ++ self.__M_YEAR = str(self.__S_YEAR).translate(self.__narrow_to_wide_map) ++ parse_file = open(self._parse_file) ++ self._parse_contents = parse_file.read() ++ parse_file.close() ++ ++ ++ ++ @classmethod ++ def parse_args(cls)->None: ++ ++ shortopt = 'cho:v' ++ longopt = ['check', 'help', 'output=', 'version'] ++ ++ try: ++ opts, args = getopt.gnu_getopt(sys.argv[1:], shortopt, longopt) ++ except getopt.GetoptError as err: ++ cls.print_help(sys.stderr, 1) ++ ++ for o, a in opts: ++ if o in ('-h', '--help'): ++ cls.print_help(sys.stdout) ++ elif o in ('-c', '--check'): ++ cls._check = True ++ elif o in ('-o', '--output'): ++ cls._output_file = a ++ elif o in ('-v', '--version'): ++ print("%s Version %d" % (_prgname, cls.VERSION)) ++ sys.exit(0) ++ else: ++ print('Unknown argument: %s' % o, file=sys.stderr) ++ cls.print_help(sys.stderr, 1) ++ ++ if len(args) == 0: ++ cls.print_help(sys.stderr, 1) ++ cls._parse_file = args[0] ++ ++ ++ @staticmethod ++ def print_help(out, v=0)->None: ++ print("%s [OPTIONS...] ERA_FILE" % _prgname, file=out) ++ print("This replaces @HIRAGANA_TO_LATEST_ERA@ with latest Japanese Era " ++ "in ERA_FILE", ++ file=out) ++ print('OPTIONS', file=out) ++ print('-c, --check Check if the latest Japanese Era in ERA_FILE.', ++ file=out) ++ print('-h, --help Show this message.', file=out) ++ print('-v, --version Show version.', file=out) ++ sys.exit(v) ++ ++ ++ def run(self)->None: ++ if self._check: ++ self.check() ++ else: ++ self.update_file_with_keywords() ++ ++ ++ def check(self)->None: ++ if self._parse_contents == None: ++ assert() ++ pat = r'{}.*'.format(self.__M_YEAR) ++ res = re.findall(pat, self._parse_contents, re.MULTILINE) ++ if res: ++ print(res) ++ else: ++ print("This year {0} is not included in {1}".format( ++ self.__M_YEAR, self._parse_file), file=sys.stderr) ++ sys.exit(1) ++ ++ def update_file_with_keywords(self)->None: ++ if self._parse_contents == None: ++ assert() ++ HIRAGANA_TO_LATEST_ERA = '' ++ YEAR_TO_LATEST_ERA = '' ++ s_n = 1 ++ s_y = self.ERA_FIRST ++ while(s_y <= self.__S_YEAR): ++ m_n = str(s_n).translate(self.__narrow_to_wide_map) ++ m_y = str(s_y).translate(self.__narrow_to_wide_map) ++ HIRAGANA_TO_LATEST_ERA = \ ++"""{0}{1}{2} #T35*500 {3}{4} ++{5}{6} #T35*500 {7} ++""".format(HIRAGANA_TO_LATEST_ERA, ++ self.HIRAGANA_ERA, m_n, ++ self.KANJI_ERA, s_n, ++ self.HIRAGANA_ERA, m_n, ++ s_y) ++ YEAR_TO_LATEST_ERA = \ ++"""{0}{1} #T35*500 {2}{3} ++""".format(YEAR_TO_LATEST_ERA, ++ m_y, ++ self.KANJI_ERA, s_n) ++ s_n = s_n + 1 ++ s_y = s_y + 1 ++ HIRAGANA_TO_LATEST_ERA = HIRAGANA_TO_LATEST_ERA.strip() ++ YEAR_TO_LATEST_ERA = YEAR_TO_LATEST_ERA.strip() ++ tmp = self._parse_contents.replace( ++ '@HIRAGANA_TO_REIWA@', ++ HIRAGANA_TO_LATEST_ERA).replace( ++ '@YEAR_TO_REIWA@', ++ YEAR_TO_LATEST_ERA) ++ s_y = self.ERA_FIRST ++ m_y = str(s_y).translate(self.__narrow_to_wide_map) ++ pat = r'({0} #T35\*500 {1}[0-9]+)\n({2} #T35\*500 {3}1)'.format( ++ m_y, self.KANJI_ERA_PREV, m_y, self.KANJI_ERA) ++ # The lest Era should be first. ++ res = re.sub(pat, r'\2\n\1', tmp) ++ if res: ++ if self._output_file: ++ f = open(self._output_file, mode='w') ++ f.write(res) ++ f.flush() ++ f.close() ++ else: ++ print(res) ++ else: ++ print('Failed to find %s in %s' % (pat, self._parse_file), ++ file=sys.stderr) ++ if self._output_file: ++ f = open(self._output_file, mode='w') ++ f.write(tmp) ++ f.flush() ++ f.close() ++ else: ++ print(tmp) ++ ++ ++def main()->None: ++ try: ++ locale.setlocale(locale.LC_ALL, '') ++ except: ++ pass ++ global _prgname ++ _prgname = path.basename(sys.argv[0]) ++ JapaneseEra.parse_args() ++ era = JapaneseEra() ++ era.run() ++ ++ ++if __name__ == '__main__': ++ main() +diff --git a/data/era.t b/data/era.t +index 76a374c..1c07e58 100644 +--- a/data/era.t ++++ b/data/era.t +@@ -2,7 +2,7 @@ + # + # ibus-anthy - The Anthy engine for IBus + # +-# Copyright (c) 2010-2025 Takao Fujiwara ++# Copyright (c) 2010-2026 Takao Fujiwara + # Copyright (c) 2010-2013 Red Hat, Inc. + # + # This program is free software; you can redistribute it and/or modify +@@ -346,6 +346,8 @@ + れいわ6 #T35*500 2024 + れいわ7 #T35*500 令和7 + れいわ7 #T35*500 2025 ++れいわ8 #T35*500 令和8 ++れいわ8 #T35*500 2026 + 1868 #T35*500 明治1 + 1869 #T35*500 明治2 + 1870 #T35*500 明治3 +@@ -508,3 +510,4 @@ + 2023 #T35*500 令和5 + 2024 #T35*500 令和6 + 2025 #T35*500 令和7 ++2026 #T35*500 令和8 +diff --git a/data/era.t.in b/data/era.t.in +new file mode 100644 +index 0000000..4881ec2 +--- /dev/null ++++ b/data/era.t.in +@@ -0,0 +1,491 @@ ++# vim:set noet ts=4: ++# ++# ibus-anthy - The Anthy engine for IBus ++# ++# Copyright (c) 2010-2026 Takao Fujiwara ++# Copyright (c) 2010-2013 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 file was imported from im-dict-ja ++# im-dict-ja - Japanese word dictionary set for input method ++# http://github.com/fujiwarat/im-dict-ja ++しょうわ1 #T35*500 昭和1 ++しょうわ1 #T35*500 1926 ++しょうわ10 #T35*500 昭和10 ++しょうわ10 #T35*500 1935 ++しょうわ11 #T35*500 昭和11 ++しょうわ11 #T35*500 1936 ++しょうわ12 #T35*500 昭和12 ++しょうわ12 #T35*500 1937 ++しょうわ13 #T35*500 昭和13 ++しょうわ13 #T35*500 1938 ++しょうわ14 #T35*500 昭和14 ++しょうわ14 #T35*500 1939 ++しょうわ15 #T35*500 昭和15 ++しょうわ15 #T35*500 1940 ++しょうわ16 #T35*500 昭和16 ++しょうわ16 #T35*500 1941 ++しょうわ17 #T35*500 昭和17 ++しょうわ17 #T35*500 1942 ++しょうわ18 #T35*500 昭和18 ++しょうわ18 #T35*500 1943 ++しょうわ19 #T35*500 昭和19 ++しょうわ19 #T35*500 1944 ++しょうわ2 #T35*500 昭和2 ++しょうわ2 #T35*500 1927 ++しょうわ20 #T35*500 昭和20 ++しょうわ20 #T35*500 1945 ++しょうわ21 #T35*500 昭和21 ++しょうわ21 #T35*500 1946 ++しょうわ22 #T35*500 昭和22 ++しょうわ22 #T35*500 1947 ++しょうわ23 #T35*500 昭和23 ++しょうわ23 #T35*500 1948 ++しょうわ24 #T35*500 昭和24 ++しょうわ24 #T35*500 1949 ++しょうわ25 #T35*500 昭和25 ++しょうわ25 #T35*500 1950 ++しょうわ26 #T35*500 昭和26 ++しょうわ26 #T35*500 1951 ++しょうわ27 #T35*500 昭和27 ++しょうわ27 #T35*500 1952 ++しょうわ28 #T35*500 昭和28 ++しょうわ28 #T35*500 1953 ++しょうわ29 #T35*500 昭和29 ++しょうわ29 #T35*500 1954 ++しょうわ3 #T35*500 昭和3 ++しょうわ3 #T35*500 1928 ++しょうわ30 #T35*500 昭和30 ++しょうわ30 #T35*500 1955 ++しょうわ31 #T35*500 昭和31 ++しょうわ31 #T35*500 1956 ++しょうわ32 #T35*500 昭和32 ++しょうわ32 #T35*500 1957 ++しょうわ33 #T35*500 昭和33 ++しょうわ33 #T35*500 1958 ++しょうわ34 #T35*500 昭和34 ++しょうわ34 #T35*500 1959 ++しょうわ35 #T35*500 昭和35 ++しょうわ35 #T35*500 1960 ++しょうわ36 #T35*500 昭和36 ++しょうわ36 #T35*500 1961 ++しょうわ37 #T35*500 昭和37 ++しょうわ37 #T35*500 1962 ++しょうわ38 #T35*500 昭和38 ++しょうわ38 #T35*500 1963 ++しょうわ39 #T35*500 昭和39 ++しょうわ39 #T35*500 1964 ++しょうわ4 #T35*500 昭和4 ++しょうわ4 #T35*500 1929 ++しょうわ40 #T35*500 昭和40 ++しょうわ40 #T35*500 1965 ++しょうわ41 #T35*500 昭和41 ++しょうわ41 #T35*500 1966 ++しょうわ42 #T35*500 昭和42 ++しょうわ42 #T35*500 1967 ++しょうわ43 #T35*500 昭和43 ++しょうわ43 #T35*500 1968 ++しょうわ44 #T35*500 昭和44 ++しょうわ44 #T35*500 1969 ++しょうわ45 #T35*500 昭和45 ++しょうわ45 #T35*500 1970 ++しょうわ46 #T35*500 昭和46 ++しょうわ46 #T35*500 1971 ++しょうわ47 #T35*500 昭和47 ++しょうわ47 #T35*500 1972 ++しょうわ48 #T35*500 昭和48 ++しょうわ48 #T35*500 1973 ++しょうわ49 #T35*500 昭和49 ++しょうわ49 #T35*500 1974 ++しょうわ5 #T35*500 昭和5 ++しょうわ5 #T35*500 1930 ++しょうわ50 #T35*500 昭和50 ++しょうわ50 #T35*500 1975 ++しょうわ51 #T35*500 昭和51 ++しょうわ51 #T35*500 1976 ++しょうわ52 #T35*500 昭和52 ++しょうわ52 #T35*500 1977 ++しょうわ53 #T35*500 昭和53 ++しょうわ53 #T35*500 1978 ++しょうわ54 #T35*500 昭和54 ++しょうわ54 #T35*500 1979 ++しょうわ55 #T35*500 昭和55 ++しょうわ55 #T35*500 1980 ++しょうわ56 #T35*500 昭和56 ++しょうわ56 #T35*500 1981 ++しょうわ57 #T35*500 昭和57 ++しょうわ57 #T35*500 1982 ++しょうわ58 #T35*500 昭和58 ++しょうわ58 #T35*500 1983 ++しょうわ59 #T35*500 昭和59 ++しょうわ59 #T35*500 1984 ++しょうわ6 #T35*500 昭和6 ++しょうわ6 #T35*500 1931 ++しょうわ60 #T35*500 昭和60 ++しょうわ60 #T35*500 1985 ++しょうわ61 #T35*500 昭和61 ++しょうわ61 #T35*500 1986 ++しょうわ62 #T35*500 昭和62 ++しょうわ62 #T35*500 1987 ++しょうわ63 #T35*500 昭和63 ++しょうわ63 #T35*500 1988 ++しょうわ64 #T35*500 昭和64 ++しょうわ64 #T35*500 1989 ++しょうわ7 #T35*500 昭和7 ++しょうわ7 #T35*500 1932 ++しょうわ8 #T35*500 昭和8 ++しょうわ8 #T35*500 1933 ++しょうわ9 #T35*500 昭和9 ++しょうわ9 #T35*500 1934 ++たいしょう1 #T35*500 大正1 ++たいしょう1 #T35*500 1912 ++たいしょう10 #T35*500 大正10 ++たいしょう10 #T35*500 1921 ++たいしょう11 #T35*500 大正11 ++たいしょう11 #T35*500 1922 ++たいしょう12 #T35*500 大正12 ++たいしょう12 #T35*500 1923 ++たいしょう13 #T35*500 大正13 ++たいしょう13 #T35*500 1924 ++たいしょう14 #T35*500 大正14 ++たいしょう14 #T35*500 1925 ++たいしょう15 #T35*500 大正15 ++たいしょう15 #T35*500 1926 ++たいしょう2 #T35*500 大正2 ++たいしょう2 #T35*500 1913 ++たいしょう3 #T35*500 大正3 ++たいしょう3 #T35*500 1914 ++たいしょう4 #T35*500 大正4 ++たいしょう4 #T35*500 1915 ++たいしょう5 #T35*500 大正5 ++たいしょう5 #T35*500 1916 ++たいしょう6 #T35*500 大正6 ++たいしょう6 #T35*500 1917 ++たいしょう7 #T35*500 大正7 ++たいしょう7 #T35*500 1918 ++たいしょう8 #T35*500 大正8 ++たいしょう8 #T35*500 1919 ++たいしょう9 #T35*500 大正9 ++たいしょう9 #T35*500 1920 ++へいせい1 #T35*500 平成1 ++へいせい1 #T35*500 1989 ++へいせい10 #T35*500 平成10 ++へいせい10 #T35*500 1998 ++へいせい11 #T35*500 平成11 ++へいせい11 #T35*500 1999 ++へいせい12 #T35*500 平成12 ++へいせい12 #T35*500 2000 ++へいせい13 #T35*500 平成13 ++へいせい13 #T35*500 2001 ++へいせい14 #T35*500 平成14 ++へいせい14 #T35*500 2002 ++へいせい15 #T35*500 平成15 ++へいせい15 #T35*500 2003 ++へいせい16 #T35*500 平成16 ++へいせい16 #T35*500 2004 ++へいせい17 #T35*500 平成17 ++へいせい17 #T35*500 2005 ++へいせい18 #T35*500 平成18 ++へいせい18 #T35*500 2006 ++へいせい19 #T35*500 平成19 ++へいせい19 #T35*500 2007 ++へいせい2 #T35*500 平成2 ++へいせい2 #T35*500 1990 ++へいせい20 #T35*500 平成20 ++へいせい20 #T35*500 2008 ++へいせい21 #T35*500 平成21 ++へいせい21 #T35*500 2009 ++へいせい22 #T35*500 平成22 ++へいせい22 #T35*500 2010 ++へいせい23 #T35*500 平成23 ++へいせい23 #T35*500 2011 ++へいせい24 #T35*500 平成24 ++へいせい24 #T35*500 2012 ++へいせい25 #T35*500 平成25 ++へいせい25 #T35*500 2013 ++へいせい26 #T35*500 平成26 ++へいせい26 #T35*500 2014 ++へいせい27 #T35*500 平成27 ++へいせい27 #T35*500 2015 ++へいせい28 #T35*500 平成28 ++へいせい28 #T35*500 2016 ++へいせい29 #T35*500 平成29 ++へいせい29 #T35*500 2017 ++へいせい3 #T35*500 平成3 ++へいせい3 #T35*500 1991 ++へいせい30 #T35*500 平成30 ++へいせい30 #T35*500 2018 ++へいせい31 #T35*500 平成31 ++へいせい31 #T35*500 2019 ++へいせい4 #T35*500 平成4 ++へいせい4 #T35*500 1992 ++へいせい5 #T35*500 平成5 ++へいせい5 #T35*500 1993 ++へいせい6 #T35*500 平成6 ++へいせい6 #T35*500 1994 ++へいせい7 #T35*500 平成7 ++へいせい7 #T35*500 1995 ++へいせい8 #T35*500 平成8 ++へいせい8 #T35*500 1996 ++へいせい9 #T35*500 平成9 ++へいせい9 #T35*500 1997 ++めいじ1 #T35*500 明治1 ++めいじ1 #T35*500 1868 ++めいじ10 #T35*500 明治10 ++めいじ10 #T35*500 1877 ++めいじ11 #T35*500 明治11 ++めいじ11 #T35*500 1878 ++めいじ12 #T35*500 明治12 ++めいじ12 #T35*500 1879 ++めいじ13 #T35*500 明治13 ++めいじ13 #T35*500 1880 ++めいじ14 #T35*500 明治14 ++めいじ14 #T35*500 1881 ++めいじ15 #T35*500 明治15 ++めいじ15 #T35*500 1882 ++めいじ16 #T35*500 明治16 ++めいじ16 #T35*500 1883 ++めいじ17 #T35*500 明治17 ++めいじ17 #T35*500 1884 ++めいじ18 #T35*500 明治18 ++めいじ18 #T35*500 1885 ++めいじ19 #T35*500 明治19 ++めいじ19 #T35*500 1886 ++めいじ2 #T35*500 明治2 ++めいじ2 #T35*500 1869 ++めいじ20 #T35*500 明治20 ++めいじ20 #T35*500 1887 ++めいじ21 #T35*500 明治21 ++めいじ21 #T35*500 1888 ++めいじ22 #T35*500 明治22 ++めいじ22 #T35*500 1889 ++めいじ23 #T35*500 明治23 ++めいじ23 #T35*500 1890 ++めいじ24 #T35*500 明治24 ++めいじ24 #T35*500 1891 ++めいじ25 #T35*500 明治25 ++めいじ25 #T35*500 1892 ++めいじ26 #T35*500 明治26 ++めいじ26 #T35*500 1893 ++めいじ27 #T35*500 明治27 ++めいじ27 #T35*500 1894 ++めいじ28 #T35*500 明治28 ++めいじ28 #T35*500 1895 ++めいじ29 #T35*500 明治29 ++めいじ29 #T35*500 1896 ++めいじ3 #T35*500 明治3 ++めいじ3 #T35*500 1870 ++めいじ30 #T35*500 明治30 ++めいじ30 #T35*500 1897 ++めいじ31 #T35*500 明治31 ++めいじ31 #T35*500 1898 ++めいじ32 #T35*500 明治32 ++めいじ32 #T35*500 1899 ++めいじ33 #T35*500 明治33 ++めいじ33 #T35*500 1900 ++めいじ34 #T35*500 明治34 ++めいじ34 #T35*500 1901 ++めいじ35 #T35*500 明治35 ++めいじ35 #T35*500 1902 ++めいじ36 #T35*500 明治36 ++めいじ36 #T35*500 1903 ++めいじ37 #T35*500 明治37 ++めいじ37 #T35*500 1904 ++めいじ38 #T35*500 明治38 ++めいじ38 #T35*500 1905 ++めいじ39 #T35*500 明治39 ++めいじ39 #T35*500 1906 ++めいじ4 #T35*500 明治4 ++めいじ4 #T35*500 1871 ++めいじ40 #T35*500 明治40 ++めいじ40 #T35*500 1907 ++めいじ41 #T35*500 明治41 ++めいじ41 #T35*500 1908 ++めいじ42 #T35*500 明治42 ++めいじ42 #T35*500 1909 ++めいじ43 #T35*500 明治43 ++めいじ43 #T35*500 1910 ++めいじ44 #T35*500 明治44 ++めいじ44 #T35*500 1911 ++めいじ45 #T35*500 明治45 ++めいじ45 #T35*500 1912 ++めいじ5 #T35*500 明治5 ++めいじ5 #T35*500 1872 ++めいじ6 #T35*500 明治6 ++めいじ6 #T35*500 1873 ++めいじ7 #T35*500 明治7 ++めいじ7 #T35*500 1874 ++めいじ8 #T35*500 明治8 ++めいじ8 #T35*500 1875 ++めいじ9 #T35*500 明治9 ++めいじ9 #T35*500 1876 ++@HIRAGANA_TO_REIWA@ ++1868 #T35*500 明治1 ++1869 #T35*500 明治2 ++1870 #T35*500 明治3 ++1871 #T35*500 明治4 ++1872 #T35*500 明治5 ++1873 #T35*500 明治6 ++1874 #T35*500 明治7 ++1875 #T35*500 明治8 ++1876 #T35*500 明治9 ++1877 #T35*500 明治10 ++1878 #T35*500 明治11 ++1879 #T35*500 明治12 ++1880 #T35*500 明治13 ++1881 #T35*500 明治14 ++1882 #T35*500 明治15 ++1883 #T35*500 明治16 ++1884 #T35*500 明治17 ++1885 #T35*500 明治18 ++1886 #T35*500 明治19 ++1887 #T35*500 明治20 ++1888 #T35*500 明治21 ++1889 #T35*500 明治22 ++1890 #T35*500 明治23 ++1891 #T35*500 明治24 ++1892 #T35*500 明治25 ++1893 #T35*500 明治26 ++1894 #T35*500 明治27 ++1895 #T35*500 明治28 ++1896 #T35*500 明治29 ++1897 #T35*500 明治30 ++1898 #T35*500 明治31 ++1899 #T35*500 明治32 ++1900 #T35*500 明治33 ++1901 #T35*500 明治34 ++1902 #T35*500 明治35 ++1903 #T35*500 明治36 ++1904 #T35*500 明治37 ++1905 #T35*500 明治38 ++1906 #T35*500 明治39 ++1907 #T35*500 明治40 ++1908 #T35*500 明治41 ++1909 #T35*500 明治42 ++1910 #T35*500 明治43 ++1911 #T35*500 明治44 ++1912 #T35*500 大正1 ++1912 #T35*500 明治45 ++1913 #T35*500 大正2 ++1914 #T35*500 大正3 ++1915 #T35*500 大正4 ++1916 #T35*500 大正5 ++1917 #T35*500 大正6 ++1918 #T35*500 大正7 ++1919 #T35*500 大正8 ++1920 #T35*500 大正9 ++1921 #T35*500 大正10 ++1922 #T35*500 大正11 ++1923 #T35*500 大正12 ++1924 #T35*500 大正13 ++1925 #T35*500 大正14 ++1926 #T35*500 昭和1 ++1926 #T35*500 大正15 ++1927 #T35*500 昭和2 ++1928 #T35*500 昭和3 ++1929 #T35*500 昭和4 ++1930 #T35*500 昭和5 ++1931 #T35*500 昭和6 ++1932 #T35*500 昭和7 ++1933 #T35*500 昭和8 ++1934 #T35*500 昭和9 ++1935 #T35*500 昭和10 ++1936 #T35*500 昭和11 ++1937 #T35*500 昭和12 ++1938 #T35*500 昭和13 ++1939 #T35*500 昭和14 ++1940 #T35*500 昭和15 ++1941 #T35*500 昭和16 ++1942 #T35*500 昭和17 ++1943 #T35*500 昭和18 ++1944 #T35*500 昭和19 ++1945 #T35*500 昭和20 ++1946 #T35*500 昭和21 ++1947 #T35*500 昭和22 ++1948 #T35*500 昭和23 ++1949 #T35*500 昭和24 ++1950 #T35*500 昭和25 ++1951 #T35*500 昭和26 ++1952 #T35*500 昭和27 ++1953 #T35*500 昭和28 ++1954 #T35*500 昭和29 ++1955 #T35*500 昭和30 ++1956 #T35*500 昭和31 ++1957 #T35*500 昭和32 ++1958 #T35*500 昭和33 ++1959 #T35*500 昭和34 ++1960 #T35*500 昭和35 ++1961 #T35*500 昭和36 ++1962 #T35*500 昭和37 ++1963 #T35*500 昭和38 ++1964 #T35*500 昭和39 ++1965 #T35*500 昭和40 ++1966 #T35*500 昭和41 ++1967 #T35*500 昭和42 ++1968 #T35*500 昭和43 ++1969 #T35*500 昭和44 ++1970 #T35*500 昭和45 ++1971 #T35*500 昭和46 ++1972 #T35*500 昭和47 ++1973 #T35*500 昭和48 ++1974 #T35*500 昭和49 ++1975 #T35*500 昭和50 ++1976 #T35*500 昭和51 ++1977 #T35*500 昭和52 ++1978 #T35*500 昭和53 ++1979 #T35*500 昭和54 ++1980 #T35*500 昭和55 ++1981 #T35*500 昭和56 ++1982 #T35*500 昭和57 ++1983 #T35*500 昭和58 ++1984 #T35*500 昭和59 ++1985 #T35*500 昭和60 ++1986 #T35*500 昭和61 ++1987 #T35*500 昭和62 ++1988 #T35*500 昭和63 ++1989 #T35*500 平成1 ++1989 #T35*500 昭和64 ++1990 #T35*500 平成2 ++1991 #T35*500 平成3 ++1992 #T35*500 平成4 ++1993 #T35*500 平成5 ++1994 #T35*500 平成6 ++1995 #T35*500 平成7 ++1996 #T35*500 平成8 ++1997 #T35*500 平成9 ++1998 #T35*500 平成10 ++1999 #T35*500 平成11 ++2000 #T35*500 平成12 ++2001 #T35*500 平成13 ++2002 #T35*500 平成14 ++2003 #T35*500 平成15 ++2004 #T35*500 平成16 ++2005 #T35*500 平成17 ++2006 #T35*500 平成18 ++2007 #T35*500 平成19 ++2008 #T35*500 平成20 ++2009 #T35*500 平成21 ++2010 #T35*500 平成22 ++2011 #T35*500 平成23 ++2012 #T35*500 平成24 ++2013 #T35*500 平成25 ++2014 #T35*500 平成26 ++2015 #T35*500 平成27 ++2016 #T35*500 平成28 ++2017 #T35*500 平成29 ++2018 #T35*500 平成30 ++2019 #T35*500 平成31 ++@YEAR_TO_REIWA@ +-- +2.52.0 +