public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/ibus] autotool: Update xkb-latin-layouts gsettings
@ 2026-05-31  2:07 Takao Fujiwara
  0 siblings, 0 replies; only message in thread
From: Takao Fujiwara @ 2026-05-31  2:07 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/ibus
Branch : autotool
Commit : 6f0634e0532ded9624c1d1b8cdafef97c0cdd51f
Author : Takao Fujiwara <tfujiwar@redhat.com>
Date   : 2022-05-26T15:28:04+09:00
Stats  : +345/-2 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/ibus/c/6f0634e0532ded9624c1d1b8cdafef97c0cdd51f?branch=autotool

Log:
Update xkb-latin-layouts gsettings

---
diff --git a/ibus-HEAD.patch b/ibus-HEAD.patch
index a0b9991..f789581 100644
--- a/ibus-HEAD.patch
+++ b/ibus-HEAD.patch
@@ -754,3 +754,343 @@ index 07ce6524..bd70d7d2 100644
 -- 
 2.34.1
 
+From bca7bf0f97230806a26f53c798050408108cfb3d Mon Sep 17 00:00:00 2001
+From: Mike FABIAN <mfabian@redhat.com>
+Date: Wed, 25 May 2022 23:07:24 +0900
+Subject: [PATCH] data/dconf: Update xkb-latin-layouts in gschema
+
+Add more keyboard layouts which cannot produce ASCII to
+data/dconf/org.freedesktop.ibus.gschema.xml
+Remove "mal" and "mkd", there are no such layouts.
+
+BUG=https://github.com/ibus/ibus/issues/2404
+---
+ data/dconf/org.freedesktop.ibus.gschema.xml | 47 ++++++++++++++++++++-
+ 1 file changed, 46 insertions(+), 1 deletion(-)
+
+diff --git a/data/dconf/org.freedesktop.ibus.gschema.xml b/data/dconf/org.freedesktop.ibus.gschema.xml
+index 516f7520..8b181d76 100644
+--- a/data/dconf/org.freedesktop.ibus.gschema.xml
++++ b/data/dconf/org.freedesktop.ibus.gschema.xml
+@@ -28,7 +28,52 @@
+       <description>The saved version number will be used to check the difference between the version of the previous installed ibus and one of the current ibus.</description>
+     </key>
+     <key name="xkb-latin-layouts" type="as">
+-      <default>[ 'ara', 'bg', 'cz', 'dev', 'gr', 'gur', 'in', 'jp(kana)', 'mal', 'mkd', 'ru', 'ua' ]</default>
++      <default>
++        [ 'af', 'af(fa-olpc)', 'af(ps-olpc)', 'af(ps)', 'af(uz)',
++        'af(uz-olpc)', 'am', 'am(eastern)', 'am(eastern-alt)',
++        'am(phonetic)', 'am(phonetic-alt)', 'am(western)', 'ara',
++        'ara(azerty)', 'ara(azerty_digits)', 'ara(buckwalter)',
++        'ara(digits)', 'ara(qwerty)', 'ara(qwerty_digits)',
++        'az(cyrillic)', 'bd', 'bd(probhat)', 'bg', 'bg(bas_phonetic)',
++        'bg(phonetic)', 'brai', 'brai(left_hand)', 'brai(right_hand)',
++        'bt', 'by', 'by(legacy)', 'ca(ike)', 'ca(multi-2gr)',
++        'cn(tib)', 'cn(tib_asciinum)', 'cn(ug)', 'cz', 'cz(ucw)',
++        'de(ru)', 'dev', 'et', 'fr(geo)', 'ge', 'ge(os)', 'gr',
++        'gr(extended)', 'gr(nodeadkeys)', 'gr(polytonic)',
++        'gr(simple)', 'gur', 'il', 'il(biblical)', 'il(lyx)',
++        'il(phonetic)', 'in', 'in(ben)', 'in(ben_baishakhi)',
++        'in(ben_bornona)', 'in(ben_gitanjali)', 'in(ben_inscript)',
++        'in(ben_probhat)', 'in(bolnagri)', 'in(deva)', 'in(guj)',
++        'in(guru)', 'in(hin-kagapa)', 'in(hin-wx)', 'in(jhelum)',
++        'in(kan)', 'in(kan-kagapa)', 'in(mal)', 'in(mal_enhanced)',
++        'in(mal_lalitha)', 'in(mar-kagapa)', 'in(ori)',
++        'in(san-kagapa)', 'in(tam)', 'in(tam_tamilnet)',
++        'in(tam_tamilnet_TAB)', 'in(tam_tamilnet_TSCII)',
++        'in(tam_tamilnet_with_tam_nums)', 'in(tel)', 'in(tel-kagapa)',
++        'in(urd-phonetic)', 'in(urd-phonetic3)', 'in(urd-winkeys)',
++        'iq', 'ir', 'ir(pes_keypad)', 'jp(kana)', 'jp(mac)', 'kg',
++        'kg(phonetic)', 'kh', 'kz', 'kz(kazrus)', 'kz(ruskaz)', 'la',
++        'la(stea)', 'lk', 'lk(tam_TAB)', 'lk(tam_unicode)', 'ma',
++        'ma(tifinagh)', 'ma(tifinagh-alt)',
++        'ma(tifinagh-alt-phonetic)', 'ma(tifinagh-extended)',
++        'ma(tifinagh-extended-phonetic)', 'ma(tifinagh-phonetic)',
++        'me(cyrillic)', 'me(cyrillicalternatequotes)',
++        'me(cyrillicyz)', 'mk', 'mk(nodeadkeys)', 'mm', 'mn', 'mv',
++        'np', 'ph(capewell-dvorak-bay)', 'ph(capewell-qwerf2k6-bay)',
++        'ph(colemak-bay)', 'ph(dvorak-bay)', 'ph(qwerty-bay)', 'pk',
++        'pk(ara)', 'pk(snd)', 'pk(urd-crulp)', 'pk(urd-nla)',
++        'pl(ru_phonetic_dvorak)', 'rs', 'rs(alternatequotes)',
++        'rs(rue)', 'rs(yz)', 'ru', 'ru(bak)', 'ru(chm)', 'ru(cv)',
++        'ru(dos)', 'ru(kom)', 'ru(legacy)', 'ru(mac)',
++        'ru(os_legacy)', 'ru(os_winkeys)', 'ru(phonetic)',
++        'ru(phonetic_winkeys)', 'ru(sah)', 'ru(srp)', 'ru(tt)',
++        'ru(typewriter)', 'ru(typewriter-legacy)', 'ru(udm)',
++        'ru(xal)', 'se(rus)', 'se(rus_nodeadkeys)', 'se(swl)', 'sy',
++        'sy(syc)', 'sy(syc_phonetic)', 'th', 'th(pat)', 'th(tis)',
++        'tj', 'tj(legacy)', 'tz', 'ua', 'ua(homophonic)',
++        'ua(legacy)', 'ua(phonetic)', 'ua(rstu)', 'ua(rstu_ru)',
++        'ua(typewriter)', 'ua(winkeys)', 'us(chr)', 'us(rus)', 'uz' ]
++      </default>
+       <summary>Latin layouts which have no ASCII</summary>
+       <description>US layout is appended to the Latin layouts. variant can be omitted.</description>
+     </key>
+-- 
+2.35.3
+
+From 16df64edadc21f50906e5442b73425b9256fbf65 Mon Sep 17 00:00:00 2001
+From: fujiwarat <takao.fujiwara1@gmail.com>
+Date: Wed, 25 May 2022 23:07:33 +0900
+Subject: [PATCH] src/tests: Add xkb-latin-layouts case
+
+BUG=https://github.com/ibus/ibus/issues/2404
+---
+ src/tests/Makefile.am       |  26 ++++++--
+ src/tests/runtest           |   1 +
+ src/tests/xkb-latin-layouts | 130 ++++++++++++++++++++++++++++++++++++
+ 3 files changed, 150 insertions(+), 8 deletions(-)
+ create mode 100755 src/tests/xkb-latin-layouts
+
+diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
+index f932f18f..ca5285bd 100644
+--- a/src/tests/Makefile.am
++++ b/src/tests/Makefile.am
+@@ -41,8 +41,9 @@ prog_ldadd =\
+     $(top_builddir)/src/libibus-@IBUS_API_VERSION@.la                   \
+     $(NULL)
+ 
+-noinst_PROGRAMS = $(TESTS)
+-TESTS = \
++noinst_PROGRAMS = $(TESTS_C)
++noinst_SCRIPTS = $(TESTS_SCRIPT)
++TESTS_C = \
+     ibus-bus                        \
+     ibus-config                     \
+     ibus-configservice              \
+@@ -56,16 +57,25 @@ TESTS = \
+     ibus-util                       \
+     $(NULL)
+ 
++TESTS_SCRIPT = \
++    xkb-latin-layouts               \
++    $(NULL)
++
++TESTS = \
++    $(TESTS_C)                      \
++    $(TESTS_SCRIPT)                 \
++    $(NULL)
++
+ CLEANFILES =
+ 
+ if ENABLE_ENGINE
+-TESTS += ibus-engine-switch
++TESTS_C += ibus-engine-switch
+ endif
+ 
+ if ENABLE_GTK3
+-TESTS += ibus-compose
++TESTS_C += ibus-compose
+ if ENABLE_XTEST
+-TESTS += ibus-keypress
++TESTS_C += ibus-keypress
+ endif
+ endif
+ 
+@@ -99,9 +109,10 @@ CLEANFILES += \
+     org.freedesktop.IBus.Desktop.Testing.desktop \
+     $(NULL)
+ 
+-test_execs_PROGRAMS = $(TESTS)
++test_execs_PROGRAMS = $(TESTS_C)
++test_execs_SCRIPTS = $(TESTS_SCRIPT)
+ if ENABLE_GTK3
+-test_execs_SCRIPTS = ibus-compose-locales
++test_execs_SCRIPTS += ibus-compose-locales
+ CLEANFILES += \
+     ibus-compose-locales \
+     $(NULL)
+@@ -138,6 +149,7 @@ ibus-desktop-testing-runner: ibus-desktop-testing-runner.in
+ 
+ EXTRA_DIST = \
+     $(test_metas_in) \
++    $(TESTS_SCRIPT) \
+     runtest \
+     ibus-compose.emoji \
+     ibus-compose.env \
+diff --git a/src/tests/runtest b/src/tests/runtest
+index a6e4194b..a229140a 100755
+--- a/src/tests/runtest
++++ b/src/tests/runtest
+@@ -35,6 +35,7 @@ ibus-engine-switch
+ ibus-compose
+ ibus-keypress
+ test-stress
++xkb-latin-layouts
+ "
+ IBUS_SCHEMA_FILE='org.freedesktop.ibus.gschema.xml'
+ GTK_QUERY_MODULE=gtk-query-immodules-3.0-32
+diff --git a/src/tests/xkb-latin-layouts b/src/tests/xkb-latin-layouts
+new file mode 100755
+index 00000000..f8dced6b
+--- /dev/null
++++ b/src/tests/xkb-latin-layouts
+@@ -0,0 +1,130 @@
++#!/bin/bash
++
++PROGNAME=`basename $0`
++VERSION=0.1
++# POSIX sh has no 'echo -e'
++: ${ECHO:='/usr/bin/echo'}
++TMPDIR=
++INSTALLED_SCHEMAS_DIR=
++
++
++usage()
++{
++    $ECHO -e \
++"This test runs setxkbmap command for gsettings xkb-latin-layouts value\n"     \
++"$PROGNAME [OPTIONS…]\n"                                                       \
++"\n"                                                                           \
++"OPTIONS:\n"                                                                   \
++"-h, --help                       This help\n"                                 \
++"-v, --version                    Show version\n"                              \
++"-D, --schemasdir=DIR             Load the latest schema file in DIR\n"        \
++""
++}
++
++
++parse_args()
++{
++    # This is GNU getopt. "sudo port getopt" in BSD?
++    ARGS=`getopt -o hD:Tv --long \
++          help,schemasdir:,tap,version\
++        -- "$@"`;
++    eval set -- "$ARGS"
++    while [ 1 ] ; do
++        case "$1" in
++        -h | --help )        usage; exit 0;;
++        -D | --schemasdir )  INSTALLED_SCHEMAS_DIR="$2"; shift 2;;
++        -T | --tap )         shift;; # ignore the option
++        -v | --version )     $ECHO -e "$VERSION"; exit 0;;
++        -- )                 shift; break;;
++        * )                  shift;;
++        esac
++    done
++}
++
++
++init()
++{
++    set -e
++
++    # gnome-continuous doesn't have a machine-id set, which
++    # breaks dbus-launch.  There's dbus-run-session which is
++    # better, but not everyone has it yet.
++    export DBUS_FATAL_WARNINGS=0
++    export TMPDIR=$(mktemp -d --tmpdir="$PWD")
++    export XDG_CONFIG_HOME="$TMPDIR/config"
++    export XDG_CACHE_HOME="$TMPDIR/cache"
++    export GSETTINGS_SCHEMA_DIR="$TMPDIR/schemas"
++    mkdir -p $XDG_CONFIG_HOME $XDG_CACHE_HOME $GSETTINGS_SCHEMA_DIR
++
++    eval `dbus-launch --sh-syntax`
++
++    trap 'rm -rf $TMPDIR; kill $DBUS_SESSION_BUS_PID; setxkbmap -layout us' ERR
++
++    # in case that schema is not installed on the system
++    glib-compile-schemas --targetdir "$GSETTINGS_SCHEMA_DIR" "$INSTALLED_SCHEMAS_DIR"
++}
++
++
++finit()
++{
++    # dbus-launch and gsettings run /usr/lib*/gvfsd-fuse $TMPDIR/cache/gvfs -f
++    # via systemd since gvfs 1.45.90 in Fedora 33
++    # and rm $TMPDIR could be failed until umount would be called.
++    if [ -d $TMPDIR/cache/gvfs ] ; then
++        umount $TMPDIR/cache/gvfs
++    fi
++    rm -rf $TMPDIR
++
++    kill $DBUS_SESSION_BUS_PID
++    exit 0
++}
++
++
++test_xkb_keymaps()
++{
++    # Loop over top level schemas since "gsettings list-recursively" only
++    # looks for direct children.
++    xkb_latin_layouts=`gsettings get org.freedesktop.ibus.general xkb-latin-layouts`
++    while read keymap ; do
++        eval keymap="$keymap"
++        HAS_VARIANT=$($ECHO "$keymap" | grep '(' 2> /dev/null) ||:
++        if [ "x$HAS_VARIANT" != "x" ] ; then
++            layout=$($ECHO "$keymap" | sed -e 's/\([^(]*\)([^)]*)/\1/')
++            variant=$($ECHO "$keymap" | sed -e 's/[^(]*(\([^)]*\))/\1/')
++            $ECHO setxkbmap -layout $layout -variant $variant
++            setxkbmap -layout $layout -variant $variant
++        else
++            layout="$keymap"
++            $ECHO setxkbmap -layout $layout
++            setxkbmap -layout $layout
++        fi
++        if [ $? -ne 0 ] ; then
++            $ECHO "Error in layout $layout variant $variant"
++            setxkbmap -layout us
++            exit 1
++        fi
++    done << EOF_READ_XKB
++    `$ECHO $xkb_latin_layouts | sed -e 's/^\[//' -e 's/\]$//' | tr "," "\n"`
++EOF_READ_XKB
++
++    setxkbmap -layout us
++}
++
++
++main()
++{
++    parse_args "$@"
++
++    if [ x"$INSTALLED_SCHEMAS_DIR" != x ] ; then
++        init
++    fi
++
++    test_xkb_keymaps
++
++    if [ x"$INSTALLED_SCHEMAS_DIR" != x ] ; then
++        finit
++    fi
++}
++
++
++main "$@"
+-- 
+2.35.3
+
+From 9f2f24e615d7280b11cd244395c6b8122c47177a Mon Sep 17 00:00:00 2001
+From: fujiwarat <takao.fujiwara1@gmail.com>
+Date: Thu, 26 May 2022 14:47:49 +0900
+Subject: [PATCH] src/tests: Unset G_MESSAGES_DEBUG for gsettings in
+ xkb-latin-layouts
+
+gsettings cannot get the key value when G_MESSAGES_DEBUG is enabled.
+---
+ src/tests/xkb-latin-layouts | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/tests/xkb-latin-layouts b/src/tests/xkb-latin-layouts
+index f8dced6b..92464234 100755
+--- a/src/tests/xkb-latin-layouts
++++ b/src/tests/xkb-latin-layouts
+@@ -82,9 +82,16 @@ finit()
+ 
+ test_xkb_keymaps()
+ {
++    # G_MESSAGES_DEBUG=all or G_MESSAGES_DEBUG=GLib-GIO-DEBUG would append
++    # debug messages to gsettings output and could not get the result correctly.
++    backup_G_MESSAGES_DEBUG="$G_MESSAGES_DEBUG"
++    unset G_MESSAGES_DEBUG
+     # Loop over top level schemas since "gsettings list-recursively" only
+     # looks for direct children.
+     xkb_latin_layouts=`gsettings get org.freedesktop.ibus.general xkb-latin-layouts`
++    if [ x"$backup_G_MESSAGES_DEBUG" != x ] ; then
++        export G_MESSAGES_DEBUG=$backup_G_MESSAGES_DEBUG
++    fi
+     while read keymap ; do
+         eval keymap="$keymap"
+         HAS_VARIANT=$($ECHO "$keymap" | grep '(' 2> /dev/null) ||:
+-- 
+2.35.3
+

diff --git a/ibus.spec b/ibus.spec
index 241ab5b..38acda0 100644
--- a/ibus.spec
+++ b/ibus.spec
@@ -39,7 +39,7 @@
 
 Name:           ibus
 Version:        1.5.26
-Release:        6%{?dist}
+Release:        7%{?dist}
 Summary:        Intelligent Input Bus for Linux OS
 License:        LGPLv2+
 URL:            https://github.com/ibus/%name/wiki
@@ -369,7 +369,7 @@ desktop-file-install --delete-original          \
 
 %check
 make check \
-    DISABLE_GUI_TESTS="ibus-compose ibus-keypress test-stress" \
+    DISABLE_GUI_TESTS="ibus-compose ibus-keypress test-stress xkb-latin-layouts" \
     VERBOSE=1 \
     %{nil}
 
@@ -522,6 +522,9 @@ dconf update || :
 %{_datadir}/installed-tests/ibus
 
 %changelog
+* Wed May 25 2022 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.26-7
+- Update xkb-latin-layouts gsettings
+
 * Mon May 23 2022 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.26-6
 - Resolves: #1936777 abrt ibus_bus_connect_async(): ibus-x11
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-05-31  2:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-31  2:07 [rpms/ibus] autotool: Update xkb-latin-layouts gsettings Takao Fujiwara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox