Restore the xorg ruleset, console-setup and possibly others are still

using those (#1951875)

Allow for a "custom" layout
Don't mark the DTD document as XML document (#1952283)
Remove a duplicate keyboard layout to prevent a crash in gnome-desktop's
xkbinfo

Resolves: rhbz#1951875
Resolves: rhbz#1952283
This commit is contained in:
Peter Hutterer 2021-04-21 12:57:04 +10:00
parent e5ef15b063
commit 071f86386e
5 changed files with 201 additions and 2 deletions

View File

@ -0,0 +1,55 @@
From c32612612141fe400d646a865dafd29d50c2930f Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed, 17 Feb 2021 12:42:49 +1000
Subject: [PATCH xkeyboard-config 1/4] rules: add a "custom" layout to the XML
file
This layout does not exist and we will never provide it.
However, having it in the XML file means it will show up in GUI
configuration mechansism that parse the XML file directly (instead of using
libxbkcommon's libxkbregistry).
Our rulesets fall back to the file "symbols/layout", section "variant"
for any layout(variant) that's not explicitly covered. This enables users to
create a symbols/custom file with their layout and have it
available.
As there are no variants, the GUI tools will only be able to use the default
section. Commandline tools can use variants as well.
This is papering over the whole issue only, but it does provide for some
convenience. It will still require adding a file in /usr/share in most cases,
but since we do not provide this file, it will be safe from being overwritten.
Fixes #257
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 5ca9f8aea2876fe6926fc27f564d36eaf5ca5c8d)
---
.gitlab-ci.yml | 2 ++
rules/base.xml | 8 ++++++++
2 files changed, 10 insertions(+)
diff --git a/rules/base.xml b/rules/base.xml
index 3b76e2b..b9df076 100644
--- a/rules/base.xml
+++ b/rules/base.xml
@@ -6303,6 +6303,14 @@
</variant>
</variantList>
</layout>
+ <layout>
+ <configItem>
+ <name>custom</name>
+ <shortDescription>custom</shortDescription>
+ <description>A user-defined custom Layout</description>
+ </configItem>
+ <variantList/>
+ </layout>
</layoutList>
<optionList>
<group allowMultipleSelection="true">
--
2.31.1

View File

@ -0,0 +1,57 @@
From ccd072ef77759ac3ed84e870b23e989ba14f8940 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue, 20 Apr 2021 17:39:50 +1000
Subject: [PATCH xkeyboard-config 2/4] meson.build: add option to install the
legacy xorg symlinks
console-setup still relies on the xorg ruleset [1] and there may be other tools
out there. Let's provide an equivalent option to our autotools build to
install the xorg symlinks.
Note that unlike the autotools approach, only the "xorg" symlinks are
provided, not the well and truly legacy "xfree86" ones.
[1] https://salsa.debian.org/installer-team/console-setup/-/merge_requests/7/
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit ff3dcb932024ed13341938cded04142eda94600e)
---
meson_options.txt | 4 ++++
rules/meson.build | 7 +++++++
2 files changed, 11 insertions(+)
diff --git a/meson_options.txt b/meson_options.txt
index 1bee74b..912d21d 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -6,3 +6,7 @@ option('compat-rules',
type: 'boolean',
value: true,
description: 'create compatibility rules [default=true]')
+option('xorg-rules-symlinks',
+ type: 'boolean',
+ value: true,
+ description: 'create "xorg" symlinks to the "base" rules files [default=false]')
diff --git a/rules/meson.build b/rules/meson.build
index c992f2e..7280560 100644
--- a/rules/meson.build
+++ b/rules/meson.build
@@ -164,8 +164,15 @@ foreach ruleset: ['base', 'evdev']
output: lst_file,
install: true,
install_dir: dir_xkb_rules)
+
endforeach
+if get_option('xorg-rules-symlinks')
+ foreach suffix: ['', '.lst', '.xml']
+ meson.add_install_script('sh', '-c',
+ 'ln -s base@0@ $DESTDIR@1@/xorg@0@'.format(suffix, dir_xkb_rules))
+ endforeach
+endif
# Copy the DTD to the build directory, the man page generation expects it in
# the same directory as the input XML file.
configure_file(output: 'xkb.dtd',
--
2.31.1

View File

@ -0,0 +1,27 @@
From 1d0d23b4e2f6a8d40a004aba0dcb7e542babde10 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu, 22 Apr 2021 09:50:39 +1000
Subject: [PATCH xkeyboard-config 3/4] rules: the xkb.dtd file is not an XML
document
It's just the DTD file, not an XML document itself.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 543acb277426bbaeb316922d1380ad2746d4a662)
---
rules/xkb.dtd | 2 --
1 file changed, 2 deletions(-)
diff --git a/rules/xkb.dtd b/rules/xkb.dtd
index fa41ec0..fce9b19 100644
--- a/rules/xkb.dtd
+++ b/rules/xkb.dtd
@@ -1,5 +1,3 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
<!--
Description: XKB configuration file DTD
--
2.31.1

View File

@ -0,0 +1,40 @@
From e917bba3c06598ef33e0a1d142d3cf5b15cd8ef0 Mon Sep 17 00:00:00 2001
From: Jason Francis <zxzax@protonmail.com>
Date: Wed, 21 Apr 2021 11:10:23 -0400
Subject: [PATCH xkeyboard-config 4/4] rules: remove duplicate cm(mmuock) from
base.extras.xml
(cherry picked from commit 3a880f047e5cface9ff77f4d59fd91369d19e6f4)
---
rules/base.extras.xml | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/rules/base.extras.xml b/rules/base.extras.xml
index 08a28b1..fca1c1e 100644
--- a/rules/base.extras.xml
+++ b/rules/base.extras.xml
@@ -1382,21 +1382,6 @@
</languageList>
</configItem>
</layout>
- <layout>
- <configItem popularity="exotic">
- <name>cm</name>
- <shortDescription>cm</shortDescription>
- <description>English (Cameroon)</description>
- </configItem>
- <variantList>
- <variant>
- <configItem popularity="exotic">
- <name>mmuock</name>
- <description>Mmuock</description>
- </configItem>
- </variant>
- </variantList>
- </layout>
<layout>
<configItem popularity="exotic">
<name>trans</name>
--
2.31.1

View File

@ -7,7 +7,7 @@
Summary: X Keyboard Extension configuration data Summary: X Keyboard Extension configuration data
Name: xkeyboard-config Name: xkeyboard-config
Version: 2.32 Version: 2.32
Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist}
License: MIT License: MIT
URL: http://www.freedesktop.org/wiki/Software/XKeyboardConfig URL: http://www.freedesktop.org/wiki/Software/XKeyboardConfig
@ -19,6 +19,15 @@ Source2: commitid
Source0: http://xorg.freedesktop.org/archive/individual/data/%{name}/%{name}-%{version}.tar.bz2 Source0: http://xorg.freedesktop.org/archive/individual/data/%{name}/%{name}-%{version}.tar.bz2
%endif %endif
# Add an empty "custom" layout for user-specific configuration
Patch0001: 0001-rules-add-a-custom-layout-to-the-XML-file.patch
# Restore the rules/xorg symlinks (#1951875)
Patch0003: 0002-meson.build-add-option-to-install-the-legacy-xorg-sy.patch
# DTD files aren't xml files (#=1952283)
Patch0004: 0003-rules-the-xkb.dtd-file-is-not-an-XML-document.patch
# Fixes a crasher in gnome-desktop3 (see commits aa7e344 and bab2698)
Patch0005: 0004-rules-remove-duplicate-cm-mmuock-from-base.extras.xm.patch
BuildArch: noarch BuildArch: noarch
BuildRequires: gettext gettext-devel BuildRequires: gettext gettext-devel
@ -48,7 +57,7 @@ Development files for %{name}.
%autosetup -S git %autosetup -S git
%build %build
%meson -Dcompat-rules=true %meson -Dcompat-rules=true -Dxorg-rules-symlinks=true
%meson_build %meson_build
%install %install
@ -70,11 +79,22 @@ rm -f $RPM_BUILD_ROOT%{_datadir}/X11/xkb/compiled
%files -f files.list -f %{name}.lang %files -f files.list -f %{name}.lang
%doc AUTHORS README NEWS COPYING docs/README.* docs/HOWTO.* %doc AUTHORS README NEWS COPYING docs/README.* docs/HOWTO.*
%{_mandir}/man7/xkeyboard-config.* %{_mandir}/man7/xkeyboard-config.*
%{_datadir}/X11/xkb/rules/xorg
%{_datadir}/X11/xkb/rules/xorg.lst
%{_datadir}/X11/xkb/rules/xorg.xml
%files devel %files devel
%{_datadir}/pkgconfig/xkeyboard-config.pc %{_datadir}/pkgconfig/xkeyboard-config.pc
%changelog %changelog
* Wed Apr 21 2021 Peter Hutterer <peter.hutterer@redhat.com> 2.32-3
- Restore the xorg ruleset, console-setup and possibly others are still
using those (#1951875)
- Allow for a "custom" layout
- Don't mark the DTD document as XML document (#1952283)
- Remove a duplicate keyboard layout to prevent a crash in gnome-desktop's
xkbinfo
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.32-2 * Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.32-2
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937