Compare commits

...

No commits in common. "c8" and "c9s" have entirely different histories.
c8 ... c9s

12 changed files with 261 additions and 112 deletions

13
.gitignore vendored
View File

@ -1 +1,12 @@
SOURCES/ibus-hangul-1.5.1.tar.gz
ibus-hangul-1.2.0.20100102.tar.gz
ibus-hangul-1.3.0.20100329.tar.gz
/ibus-hangul-1.3.0.20100329.tar.gz
/ibus-hangul-1.3.1.tar.gz
/ibus-hangul-1.3.2.tar.gz
/ibus-hangul-1.4.0.tar.gz
/ibus-hangul-1.4.1.tar.gz
/ibus-hangul-1.4.2.tar.gz
/ibus-hangul-1.5.0.tar.gz
/ibus-hangul-1.5.1.tar.gz
/ibus-hangul-1.5.3.tar.gz
/ibus-hangul-1.5.4.tar.gz

View File

@ -1 +0,0 @@
4257fee2e5bdf9251ef2d1d1f08f7b27ef624abb SOURCES/ibus-hangul-1.5.1.tar.gz

View File

@ -1,42 +0,0 @@
Index: ibus-hangul-1.5.1/src/engine.c
===================================================================
--- ibus-hangul-1.5.1.orig/src/engine.c
+++ ibus-hangul-1.5.1/src/engine.c
@@ -22,6 +22,7 @@
#include <config.h>
#endif
+#include <stdio.h>
#include <ibus.h>
#include <gio/gio.h>
#include <hangul.h>
@@ -217,6 +218,11 @@ static int initial_input_mode = INPUT_MO
* whether to use event forwarding workaround
*/
static gboolean use_event_forwarding = TRUE;
+/**
+ * whether to use client commit
+ * See: https://github.com/libhangul/ibus-hangul/pull/68
+ */
+static gboolean use_client_commit = TRUE;
static glong
ucschar_strlen (const ucschar* str)
@@ -1351,7 +1357,17 @@ ibus_hangul_engine_reset (IBusEngine *en
{
IBusHangulEngine *hangul = (IBusHangulEngine *) engine;
+ if (use_client_commit) {
+ // ibus-hangul uses
+ // ibus_engine_update_preedit_text_with_mode() function which makes
+ // the preedit string committed automatically when the reset is received
+ // So we don't need to commit the preedit here.
+ hangul_ic_reset (hangul->context);
+ ustring_clear (hangul->preedit);
+ }
+
ibus_hangul_engine_flush (hangul);
+
IBUS_ENGINE_CLASS (parent_class)->reset (engine);
}

7
gating.yaml Normal file
View File

@ -0,0 +1,7 @@
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
# this is the testcase identifier, which OSCI pipeline uses
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

View File

@ -0,0 +1,17 @@
Index: ibus-hangul-1.5.4/src/engine.c
===================================================================
--- ibus-hangul-1.5.4.orig/src/engine.c
+++ ibus-hangul-1.5.4/src/engine.c
@@ -1577,7 +1577,11 @@ ibus_hangul_engine_process_key_event (IB
*
* See: https://github.com/choehwanjin/ibus-hangul/issues/40
*/
- if (use_event_forwarding) {
+ if (use_event_forwarding
+#if IBUS_CHECK_VERSION(1, 5, 25)
+ && (hangul->caps & IBUS_CAP_SYNC_PROCESS_KEY_V2)
+#endif
+ ) {
if (!retval) {
ibus_engine_forward_key_event (engine, orig_keyval, keycode, modifiers);
}

View File

@ -2,18 +2,17 @@
%global require_libhangul_version 0.1.0
Name: ibus-hangul
Version: 1.5.1
Release: 6%{?dist}
Version: 1.5.4
Release: 9%{?dist}
Summary: The Hangul engine for IBus input platform
License: GPLv2+
Group: System Environment/Libraries
URL: https://github.com/libhangul/ibus-hangul
Source0: https://github.com/libhangul/ibus-hangul/releases/download/%{version}/%{name}-%{version}.tar.gz
# not upstreamed patches
Patch1: ibus-hangul-setup-abspath.patch
# patch from upstream
Patch2: ibus-hangul-fixes-reset-signal.patch
Patch2: ibus-hangul-sync-process-key.patch
BuildRequires: gettext-devel, automake, libtool
BuildRequires: intltool
@ -24,68 +23,46 @@ BuildRequires: ibus-devel >= %{require_ibus_version}
BuildRequires: desktop-file-utils
BuildRequires: python3-devel
BuildRequires: gnome-common
BuildRequires: gtk3-devel
BuildRequires: make
Requires: ibus >= %{require_ibus_version}
Requires: libhangul >= %{require_libhangul_version}
Requires: python3-gobject
Requires: %{__python3}
Requires: python3
%description
The Hangul engine for IBus platform. It provides Korean input method from
libhangul.
%package tests
Summary: Tests for the %{name} package
Requires: %{name}%{?_isa} = %{version}-%{release}
%description tests
The %{name}-tests package contains tests that can be used to verify
the functionality of the installed %{name} package.
%prep
%setup -q
%patch1 -p1 -b .setup-abspath
%patch2 -p1 -b .reset
# autopoint -f
# AUTOPOINT='intltoolize --automake --copy' autoreconf -fi
%patch2 -p1 -b .sync
%build
./autogen.sh
%configure --disable-static --with-python=python3 %{?_with_hotkeys}
# make -C po update-gmo
%configure \
--disable-static \
--with-python=python3 \
%{?_with_hotkeys} \
--enable-installed-tests \
%{nil}
make %{?_smp_mflags}
%install
make DESTDIR=${RPM_BUILD_ROOT} install INSTALL="install -p"
# Register as an AppStream component to be visible in the software center
#
# NOTE: It would be *awesome* if this file was maintained by the upstream
# project, translated and installed into the right place during `make install`.
#
# See http://www.freedesktop.org/software/appstream/docs/ for more details.
#
mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata
cat > $RPM_BUILD_ROOT%{_datadir}/appdata/hangul.appdata.xml <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<component type="inputmethod">
<id>hangul.xml</id>
<metadata_license>CC0-1.0</metadata_license>
<name>Hangul</name>
<summary>Korean input method</summary>
<description>
<p>
The Hangul input method is designed for entering Korean text.
</p>
<p>
Input methods are typing systems allowing users to input complex languages.
They are necessary because these contain too many characters to simply be laid
out on a traditional keyboard.
</p>
</description>
<url type="homepage">http://code.google.com/p/ibus/</url>
<compulsory_for_desktop>GNOME</compulsory_for_desktop>
<project_group>GNOME</project_group>
<developer_name>The GNOME Project</developer_name>
<url type="bugtracker">https://code.google.com/p/ibus/issues/list</url>
<url type="donation">http://www.gnome.org/friends/</url>
<url type="help">https://code.google.com/p/ibus/wiki/FAQ</url>
<update_contact><!-- upstream-contact_at_email.com --></update_contact>
</component>
EOF
%py_byte_compile %{python3} $RPM_BUILD_ROOT%{_datadir}/ibus-hangul/setup
rm -f ${RPM_BUILD_ROOT}%{_bindir}/ibus-setup-hangul
sed -i 's!^Exec=ibus-setup-hangul!Exec=%{_libexecdir}/ibus-setup-hangul!' ${RPM_BUILD_ROOT}%{_datadir}/applications/ibus-setup-hangul.desktop
@ -94,43 +71,89 @@ desktop-file-validate ${RPM_BUILD_ROOT}%{_datadir}/applications/ibus-setup-hangu
%find_lang %{name}
%post
[ -x %{_bindir}/ibus ] && \
%{_bindir}/ibus write-cache --system &>/dev/null || :
%postun
[ -x %{_bindir}/ibus ] && \
%{_bindir}/ibus write-cache --system &>/dev/null || :
%check
make check \
DISABLE_GUI_TESTS="ibus-hangul" \
VERBOSE=1
%files -f %{name}.lang
%doc AUTHORS COPYING README
%{_libexecdir}/ibus-engine-hangul
%{_libexecdir}/ibus-setup-hangul
%{_datadir}/appdata/*.appdata.xml
%{_datadir}/metainfo/*.metainfo.xml
%{_datadir}/glib-2.0/schemas/*.gschema.xml
%{_datadir}/ibus-hangul
%{_datadir}/ibus/component/*
%{_datadir}/applications/ibus-setup-hangul.desktop
%{_datadir}/icons/hicolor/*/apps/*
%files tests
%dir %{_libexecdir}/installed-tests
%{_libexecdir}/installed-tests/ibus-hangul
%dir %{_datadir}/installed-tests
%{_datadir}/installed-tests/ibus-hangul
%changelog
* Mon Jun 8 2020 Peng Wu <pwu@redhat.com> - 1.5.1-6
- Rebuild for RHEL 8.3
- Resolves: #1661079
* Thu Nov 23 2023 Peng Wu <pwu@redhat.com> - 1.5.4-9
- Fix CI tests
- Resolves: RHEL-14878
* Tue Dec 3 2019 Peng Wu <pwu@redhat.com> - 1.5.1-5
- Fixes reset signal
- Add ibus-hangul-fixes-reset-signal.patch
- Resolves: #1661079
* Thu Nov 16 2023 Peng Wu <pwu@redhat.com> - 1.5.4-8
- Add ibus-hangul-sync-process-key.patch
- Resolves: RHEL-14878
* Thu Sep 20 2018 Tomas Orsava <torsava@redhat.com> - 1.5.1-4
- Require the Python interpreter directly instead of using the package name
- Related: rhbz#1619153
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.5.4-7
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Mon Aug 13 2018 Troy Dawson <tdawson@redhat.com> - 1.5.1-3
- Add BuildRequest python3-devel
* Mon Jul 19 2021 Peng Wu <pwu@redhat.com> - 1.5.4-6
- Clean up ibus write-cache in scriptlet
- Resolves: #1974626
* Mon Jul 30 2018 Florian Weimer <fweimer@redhat.com> - 1.5.1-2
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.5.4-5
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Thu Sep 10 2020 Peng Wu <pwu@redhat.com> - 1.5.4-3
- Add tests sub package
* Wed Sep 2 2020 Peng Wu <pwu@redhat.com> - 1.5.4-2
- Clean up the spec file
* Mon Aug 24 2020 Peng Wu <pwu@redhat.com> - 1.5.4-1
- Update to 1.5.4
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Jul 13 2020 Peng Wu <pwu@redhat.com> - 1.5.3-3
- Switch to use py_byte_compile rpm macro
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Dec 26 2019 Peng Wu <pwu@redhat.com> - 1.5.3-1
- Update to 1.5.3
* Tue Aug 6 2019 Peng Wu <pwu@redhat.com> - 1.5.1-7
- Change default mode to latin
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Apr 19 2019 Peng Wu <pwu@redhat.com> - 1.5.1-5
- Fixes double commit issue with web browser
- Add patch ibus-hangul-fixes-reset.patch
* Fri Mar 22 2019 Peng Wu <pwu@redhat.com> - 1.5.1-4
- Change default mode to hangul
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Tue Jul 31 2018 Florian Weimer <fweimer@redhat.com> - 1.5.1-2
- Rebuild with fixed binutils
* Mon Jul 30 2018 Peng Wu <pwu@redhat.com> - 1.5.1-1

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (ibus-hangul-1.5.4.tar.gz) = dc4c755349424605de3832496a8a0cf7e8da577cbeff85d2b03da187fd5fdc9de5475eb523c69310e4f7edbb9a513f6f218de082ba32a25a477cdf5eb6f65513

View File

@ -0,0 +1,3 @@
role_pkgs_req:
- rsync
- xorg-x11-server-Xvfb

View File

@ -0,0 +1,4 @@
---
dependencies:
- role: str-common-init

View File

@ -0,0 +1,118 @@
---
- 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: 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
package:
name:
- git
- make
- gcc
- diffutils
- autoconf
- automake
- libtool
- glib2-devel
- systemd-devel
- gnome-session
- gnome-shell
- dbus-x11
- xorg-x11-server-Xvfb
- ibus
- ibus-desktop-testing
- ibus-hangul-tests
- 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: Checkout v2021.1 tag in GNOME installed-tests testing harness
command: git checkout -b v2021.1 refs/tags/v2021.1
args:
chdir: gnome-desktop-testing
- 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
- 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 hangul tests
shell: |
set -e
# Delete LC_CTYPE=C.UTF-8
export -n LC_CTYPE
status="FAIL: frame"
ibus-desktop-testing-runner \
--no-graphics \
--runner=gnome \
--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
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: |
IS_RAWHIDE=`grep -i rawhide /etc/fedora-release`
if [ x"$IS_RAWHIDE" != x ] ; then
exit 0
fi
log="{{ remote_artifacts }}/test.log"
if [ ! -f $log ] ; then
echo ERROR
else
FAIL=`grep "^FAIL: " $log | grep -v 'FAIL: 0$'`
if [ x"$FAIL" != x ] ; then
echo ERROR
fi
fi
register: test_fails
failed_when: False
- 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

8
tests/tests.yml Normal file
View File

@ -0,0 +1,8 @@
- hosts: localhost
roles:
- role: ibus-desktop-testing-role
installed_test_name: ibus-hangul
tags:
- classic
- gating