From b0c78b631074ce23f914721d5cfa18a70b6efa5e Mon Sep 17 00:00:00 2001 From: eabdullin Date: Wed, 27 Mar 2024 19:53:53 +0000 Subject: [PATCH] import CS ibus-typing-booster-2.1.0-7.el8 --- ...-formatting-characters-in-the-source.patch | 48 +++++++++++++++++++ SPECS/ibus-typing-booster.spec | 26 ++++++---- 2 files changed, 66 insertions(+), 8 deletions(-) create mode 100644 SOURCES/avoid-verbatim-bidi-formatting-characters-in-the-source.patch diff --git a/SOURCES/avoid-verbatim-bidi-formatting-characters-in-the-source.patch b/SOURCES/avoid-verbatim-bidi-formatting-characters-in-the-source.patch new file mode 100644 index 0000000..3d428a0 --- /dev/null +++ b/SOURCES/avoid-verbatim-bidi-formatting-characters-in-the-source.patch @@ -0,0 +1,48 @@ +diff -ru ibus-typing-booster-2.1.0.orig/engine/itb_util.py ibus-typing-booster-2.1.0/engine/itb_util.py +--- ibus-typing-booster-2.1.0.orig/engine/itb_util.py 2018-07-24 08:43:58.000000000 +0200 ++++ ibus-typing-booster-2.1.0/engine/itb_util.py 2023-10-09 18:24:53.617131025 +0200 +@@ -1757,6 +1757,9 @@ + TR9> and its matching PDI or, if it has no matching PDI, the end of the + TR9> paragraph + ++ U+2069 POP DIRECTIONAL ISOLATE ++ U+2068 FIRST STRONG ISOLATE ++ + Examples: + + >>> is_right_to_left('Hallo!') +@@ -1765,16 +1768,16 @@ + >>> is_right_to_left('﷼') + True + +- >>> is_right_to_left('⁨﷼⁩') ++ >>> is_right_to_left('\u2068﷼\u2069') + False + +- >>> is_right_to_left('⁨﷼⁩﷼') ++ >>> is_right_to_left('\u2068﷼\u2069﷼') + True + +- >>> is_right_to_left('a⁨﷼⁩﷼') ++ >>> is_right_to_left('a\u2068﷼\u2069﷼') + False + +- >>> is_right_to_left('⁨a⁩⁨﷼⁩﷼') ++ >>> is_right_to_left('\u2068a\u2069⁨\u2068﷼\u2069﷼') + True + ''' + skip = False +@@ -1806,10 +1809,10 @@ + Examples: + + >>> bidi_embed('a') +- '‪a‬' ++ '\u202Aa\u202C' + + >>> bidi_embed('﷼') +- '‫﷼‬' ++ '\u202B﷼\u202C' + ''' + if is_right_to_left(text): + return chr(0x202B) + text + chr(0x202C) # RLE + text + PDF +ibus-typing-booster-2.1.0/engine のみに存在: itb_util.py.orig diff --git a/SPECS/ibus-typing-booster.spec b/SPECS/ibus-typing-booster.spec index 6bce647..71305ba 100644 --- a/SPECS/ibus-typing-booster.spec +++ b/SPECS/ibus-typing-booster.spec @@ -1,6 +1,6 @@ Name: ibus-typing-booster Version: 2.1.0 -Release: 5%{?dist} +Release: 7%{?dist} Summary: A completion input method License: GPLv3+ Group: System Environment/Libraries @@ -8,9 +8,9 @@ URL: https://mike-fabian.github.io/ibus-typing-booster/ Source0: https://github.com/mike-fabian/ibus-typing-booster/releases/download/%{version}/ibus-typing-booster-%{version}.tar.gz Patch0: gating.patch Patch1: Prevent-also-BackSpace-from-reopening-a-preedit-when.patch +Patch2: avoid-verbatim-bidi-formatting-characters-in-the-source.patch Requires: ibus >= 1.5.3 Requires: m17n-lib -Requires: python(abi) >= 3.3 %{?__python3:Requires: %{__python3}} Requires: python3-dbus Requires: python3-enchant @@ -80,8 +80,9 @@ Unicode symbols. %prep %setup -q -%patch0 -p1 -b .gating -%patch1 -p1 -b .backspace +%patch -P 0 -p1 -b .gating +%patch -P 1 -p1 -b .backspace +%patch -P 2 -p1 -b .avoid-bidi-formatting-characters-in-source %build export PYTHON=%{__python3} @@ -132,10 +133,10 @@ desktop-file-validate \ $RPM_BUILD_ROOT%{_datadir}/applications/emoji-picker.desktop pushd engine # run doctests - python3 hunspell_suggest.py - python3 m17n_translit.py - python3 itb_emoji.py - python3 itb_util.py + %{__python3} hunspell_suggest.py + %{__python3} m17n_translit.py + %{__python3} itb_emoji.py + %{__python3} itb_util.py popd mkdir -p /tmp/glib-2.0/schemas/ cp org.freedesktop.ibus.engine.typing-booster.gschema.xml \ @@ -199,6 +200,15 @@ make check || cat ./tests/test-suite.log %changelog +* Mon Oct 09 2023 Mike FABIAN - 2.1.0-7 +- Avoid verbatim bidi formatting characters in source comments + to make rpminspect complain less. +- Resolves: RHEL-2237 + +* Tue Sep 19 2023 Lumír Balhar - 2.1.0-6 +- Fix requirements of Python 3 +- Resolves: RHEL-2237 + * Thu Feb 04 2021 Mike FABIAN - 2.1.0-5 - Prevent also BackSpace from reopening a preedit when the option “Arrow keys can reopen a preedit” is off