diff --git a/.gitignore b/.gitignore index c0c99c6..0252c7f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,33 +1 @@ -xkeyboard-config-1.8.tar.bz2 -xkeyboard-config-1.9.tar.bz2 -/xkeyboard-config-2.0.tar.bz2 -/xkeyboard-config-2.1.tar.bz2 -/xkeyboard-config-20110311.tar.bz2 -/xkeyboard-config-2.2.tar.bz2 -/xkeyboard-config-2.2.1.tar.bz2 -/xkeyboard-config-20110415.tar.bz2 -/xkeyboard-config-2.3.tar.bz2 -/xkeyboard-config-2.4.tar.bz2 -/xkeyboard-config-2.4.1.tar.bz2 -/xkeyboard-config-2.5.tar.bz2 -/xkeyboard-config-2.5.1.tar.bz2 -/xkeyboard-config-2.6.tar.bz2 -/xkeyboard-config-2.7.tar.bz2 -/xkeyboard-config-2.8.tar.bz2 -/xkeyboard-config-2.9.tar.bz2 -/xkeyboard-config-2.10.1.tar.bz2 -/xkeyboard-config-2.11.tar.bz2 -/xkeyboard-config-2.12.tar.bz2 -/xkeyboard-config-2.13.tar.bz2 -/xkeyboard-config-2.14.tar.bz2 -/xkeyboard-config-2.15.tar.bz2 -/xkeyboard-config-2.16.tar.bz2 -/xkeyboard-config-2.17.tar.bz2 -/xkeyboard-config-2.18.tar.bz2 -/xkeyboard-config-2.19.tar.bz2 -/xkeyboard-config-2.20.tar.bz2 -/xkeyboard-config-2.21.tar.bz2 -/xkeyboard-config-2.22.tar.bz2 -/xkeyboard-config-2.23.tar.bz2 -/xkeyboard-config-2.23.1.tar.bz2 -/xkeyboard-config-2.24.tar.bz2 +/xkeyboard-config-*.tar.xz diff --git a/0001-Critical-typos-in-symbols-am.patch b/0001-Critical-typos-in-symbols-am.patch deleted file mode 100644 index 16365be..0000000 --- a/0001-Critical-typos-in-symbols-am.patch +++ /dev/null @@ -1,28 +0,0 @@ -From d5d0726eca1d789ac2dad2bd1933dc5e80fc289a Mon Sep 17 00:00:00 2001 -From: Sergey Udaltsov -Date: Thu, 3 Jan 2019 23:32:30 +0000 -Subject: [PATCH xkeyboard-config] Critical typos in symbols/am - -https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/issues/47 ---- - symbols/am | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/symbols/am b/symbols/am -index 7b11a82..b6ef8ea 100644 ---- a/symbols/am -+++ b/symbols/am -@@ -80,8 +80,8 @@ xkb_symbols "phonetic" { - key { [ Armenian_vyun, Armenian_VYUN ] }; - key { [ Armenian_ligature_ew, 0x100058f ] }; - key { [ Armenian_ra, Armenian_RA ] }; -- key { [ Armenian_cha, rmenian_CHA ] }; -- key { [ Armenian_tche, rmenian_TCHE ] }; -+ key { [ Armenian_cha, Armenian_CHA ] }; -+ key { [ Armenian_tche, Armenian_TCHE ] }; - key { [ Armenian_hyphen, 0x1002015 ] }; - key { [ Armenian_zhe, Armenian_ZHE ] }; - --- -2.21.0 - diff --git a/0001-meson.build-add-option-to-install-the-legacy-xorg-sy.patch b/0001-meson.build-add-option-to-install-the-legacy-xorg-sy.patch new file mode 100644 index 0000000..baf5142 --- /dev/null +++ b/0001-meson.build-add-option-to-install-the-legacy-xorg-sy.patch @@ -0,0 +1,56 @@ +From 25fae9378d893ecf13f1054f8efa324fe2c3781a Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Tue, 20 Apr 2021 17:39:50 +1000 +Subject: [PATCH xkeyboard-config] 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 +--- + 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 + diff --git a/0001-rules-add-a-custom-layout-to-the-XML-file.patch b/0001-rules-add-a-custom-layout-to-the-XML-file.patch new file mode 100644 index 0000000..bfc2178 --- /dev/null +++ b/0001-rules-add-a-custom-layout-to-the-XML-file.patch @@ -0,0 +1,50 @@ +From 0c371033f1c18123701860803dd6039ea260ab20 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Wed, 17 Feb 2021 12:42:49 +1000 +Subject: [PATCH xkeyboard-config] 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. + +Signed-off-by: Peter Hutterer +--- + rules/base.xml | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/rules/base.xml b/rules/base.xml +index 882278a..e291361 100644 +--- a/rules/base.xml ++++ b/rules/base.xml +@@ -6321,6 +6321,14 @@ + + + ++ ++ ++ custom ++ custom ++ A user-defined custom Layout ++ ++ ++ + + + +-- +2.29.2 + diff --git a/sources b/sources index a3d65da..14a13cb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xkeyboard-config-2.24.tar.bz2) = 96b65d18a85443a9bf93d65a4423da6e2b3d44882dae6a03bf46768a92017e9762cf3721361ba399c2873d53782944d0292eb673484f1cd8a8bdbf643e7a1dc0 +SHA512 (xkeyboard-config-2.46.tar.xz) = c58ce438ec109e80ff601ad07aea13f0ccdd096720b574838673925ec2a745b9210df6ef2ecfab3911909b492b560fb9af1d4f6bce60bd329e575f1db16b6dfb diff --git a/xkeyboard-config.spec b/xkeyboard-config.spec index fea3d7f..483cda0 100644 --- a/xkeyboard-config.spec +++ b/xkeyboard-config.spec @@ -1,14 +1,18 @@ # INFO: Package contains data-only, no binaries, so no debuginfo is needed %global debug_package %{nil} +# Installed destination is now xkeyboard-config-2, but upstream package +# name is the same +%global pkgconfig_name xkeyboard-config-2 + #global gitdate 20110415 #global gitversion 19a0026b5 Summary: X Keyboard Extension configuration data Name: xkeyboard-config -Version: 2.24 -Release: 5%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} -License: MIT +Version: 2.46 +Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +License: HPND AND HPND-sell-variant AND X11 AND X11-distribute-modifications-variant AND MIT AND MIT-open-group AND xkeyboard-config-Zinoviev URL: http://www.freedesktop.org/wiki/Software/XKeyboardConfig %if 0%{?gitdate} @@ -16,16 +20,13 @@ Source0: %{name}-%{gitdate}.tar.bz2 Source1: make-git-snapshot.sh Source2: commitid %else -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.xz %endif -Patch01: 0001-Critical-typos-in-symbols-am.patch - BuildArch: noarch -BuildRequires: gettext -BuildRequires: intltool -BuildRequires: libtool +BuildRequires: gettext gettext-devel +BuildRequires: meson BuildRequires: libxslt BuildRequires: perl(XML::Parser) BuildRequires: pkgconfig(glib-2.0) @@ -33,11 +34,7 @@ BuildRequires: pkgconfig(x11) >= 1.4.3 BuildRequires: pkgconfig(xorg-macros) >= 1.12 BuildRequires: pkgconfig(xproto) >= 7.0.20 BuildRequires: xkbcomp -BuildRequires: git - -%if 0%{?gitdate} BuildRequires: git-core -%endif %description This package contains configuration data used by the X Keyboard Extension (XKB), @@ -55,43 +52,192 @@ Development files for %{name}. %autosetup -S git %build -AUTOPOINT="intltoolize --automake --copy" autoreconf -v --force --install || exit 1 -%configure \ - --enable-compat-rules \ - --with-xkb-base=%{_datadir}/X11/xkb \ - --with-xkb-rules-symlink=xorg - -make %{?_smp_mflags} +%meson -Dcompat-rules=true -Dxorg-rules-symlinks=true +%meson_build %install -make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" +%meson_install -# Remove unnecessary symlink -rm -f $RPM_BUILD_ROOT%{_datadir}/X11/xkb/compiled -%find_lang %{name} +# Replace with relative symlink +rm $RPM_BUILD_ROOT%{_datadir}/X11/xkb +ln -srf $RPM_BUILD_ROOT%{_datadir}/%{pkgconfig_name} $RPM_BUILD_ROOT%{_datadir}/X11/xkb -# Create filelist -{ - FILESLIST=${PWD}/files.list - pushd $RPM_BUILD_ROOT - find .%{_datadir}/X11/xkb -type d | sed -e "s/^\./%dir /g" > $FILESLIST - find .%{_datadir}/X11/xkb -type f | sed -e "s/^\.//g" >> $FILESLIST - popd -} +%find_lang %{pkgconfig_name} +%find_lang %{name} -%files -f files.list -f %{name}.lang -%doc AUTHORS README NEWS TODO COPYING docs/README.* docs/HOWTO.* -%{_datadir}/X11/xkb/rules/xorg -%{_datadir}/X11/xkb/rules/xorg.lst -%{_datadir}/X11/xkb/rules/xorg.xml -%{_mandir}/man7/xkeyboard-config.* +# Note: 2.45 changed the install location from the decades-old /usr/share/X11/xkb +# to a package-specific /usr/share/xkeyboard-config-2. Upstream installs a symlink +# for /usr/share/X11/xkb since those two dirctories are guaranteed to be the same. +# +# The "official" script [1] is buggy if an .rpmmoved directory already exists so +# this is an approximation taken from OpenSuSE [2] +# [1] https://fedoraproject.org/wiki/Packaging:Directory_Replacement#Replacing_a_symlink_with_a_directory_or_a_directory_with_any_type_of_file +# [2] https://build.opensuse.org/request/show/1294803 +%pretrans -p +-- Define the path to directory being replaced below. +-- DO NOT add a trailing slash at the end. +local path = "%{_datadir}/X11/xkb" +local st = posix.stat(path) + +if st and st.type == "directory" then + local target = path .. ".rpmmoved" + local suffix = 1 + + while posix.stat(target) do + suffix = suffix + 1 + target = path .. ".rpmmoved" .. suffix + end + + os.rename(path, target) +end + +%files -f %{pkgconfig_name}.lang -f %{name}.lang +%doc AUTHORS README.md COPYING docs/README.* docs/HOWTO.* +%{_mandir}/man7/%{name}.* +%{_mandir}/man7/%{pkgconfig_name}.* +%{_datadir}/X11/xkb +%{_datadir}/%{pkgconfig_name}/ +%ghost %attr(0755, root, root) %dir %{_datadir}/X11/xkb.rpmmoved %files devel -%{_datadir}/pkgconfig/xkeyboard-config.pc +%{_datadir}/pkgconfig/%{pkgconfig_name}.pc +%{_datadir}/pkgconfig/%{name}.pc %changelog -* Mon May 27 2019 Peter Hutterer 2.24-5 -- Fix typos in Armenian layout (#1714045) +* Thu Oct 09 2025 Peter Hutterer - 2.46-1 +- xkeyboard-config 2.46 + +* Thu Aug 07 2025 Peter Hutterer - 2.45-1 +- xkeyboard-config 2.45 + xkeyboard-config changed from /usr/share/X11/xkb to /usr/share/xkeyboard-config-2/, + with the same contents and the old location symlinked to the new one. + Add a pretrans script to move the old location to the new one to stick with the + upstream packaging approach. + +* Thu Aug 07 2025 Peter Hutterer - 2.44-3 +- Remove packaging hacks, with meson now have a clean build + +* Fri Jul 25 2025 Fedora Release Engineering - 2.44-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Mon Feb 10 2025 Peter Hutterer 2.44-1 +- xkeyboard-config 2.44 + +* Sun Jan 19 2025 Fedora Release Engineering - 2.43-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Thu Oct 03 2024 Peter Hutterer - 2.43-1git} +- xkeyboard-config 2.43 + +* Sat Jul 20 2024 Fedora Release Engineering - 2.42-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Wed Jun 12 2024 Peter Hutterer 2.42-1 +- xkeyboard-config 2.42 + +* Wed Feb 07 2024 Peter Hutterer - 2.41-1 +- xkeyboard-config 2.41 + +* Sat Jan 27 2024 Fedora Release Engineering - 2.40-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Wed Nov 29 2023 Peter Hutterer - 2.40-2 +- SPDX migration + +* Fri Oct 13 2023 Peter Hutterer - 2.40-1 +- xkeyboard-config 2.40 + +* Sat Jul 22 2023 Fedora Release Engineering - 2.39-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Mon Jun 12 2023 Peter Hutterer - 2.39-1 +- xkeyboard-config 2.39 + +* Tue Feb 07 2023 Peter Hutterer - 2.38-1 +- xkeyboard-config 2.38 + +* Sat Jan 21 2023 Fedora Release Engineering - 2.36-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Sat Nov 26 2022 Davide Cavalca - 2.36-3 +- Backport upstream MR to allow Apple MacBook keyboards to type \ properly + +* Sat Jul 23 2022 Fedora Release Engineering - 2.36-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Thu Jun 16 2022 Peter Hutterer - 2.36-1 +- xkeyboard-config 2.36 + +* Wed Feb 09 2022 Peter Hutterer - 2.35.1-1 +- xkeyboard-config 2.35.1 + +* Sat Jan 22 2022 Fedora Release Engineering - 2.34-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Oct 07 2021 Peter Hutterer - 2.34-1 +- xkeyboard-config 2.34 + +* Fri Jul 23 2021 Fedora Release Engineering - 2.33-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Jun 22 2021 Peter Hutterer 2.33-3 +- xkeyboard-config 2.33 + +* Tue Apr 20 2021 Peter Hutterer 2.32-3 +- Restore the xorg ruleset, console-setup and possibly others are still + using those (#1951459) + +* Fri Apr 09 2021 Peter Hutterer 2.32-2 +- Allow for a "custom" layout + +* Tue Feb 16 2021 Peter Hutterer 2.32-1 +- xkeyboard-config 2.32 +- build with meson now +- drop the xorg ruleset, no longer in use. Everything is hardcoded to evdev + these days. + +* Thu Jan 28 2021 Fedora Release Engineering - 2.31-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Dec 01 2020 Peter Hutterer 2.31-3 +- Add make to BuildRequires + +* Wed Nov 04 2020 Peter Hutterer 2.31-2 +- Fix BuildRequires for git, we only need git-core + +* Wed Oct 07 2020 Peter Hutterer 2.31-1 +- xkeyboard-config 2.31 + +* Wed Jul 29 2020 Fedora Release Engineering - 2.30-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Jun 19 2020 Peter Hutterer 2.30-2 +- Fix a syntax error in the indian symbols file + +* Wed Jun 03 2020 Peter Hutterer 2.30-1 +- xkeyboard-config 2.30 + +* Fri Jan 31 2020 Peter Hutterer 2.29-1 +- xkeyboard-config 2.29 + +* Fri Oct 25 2019 Peter Hutterer 2.28-1 +- xkeyboard-config 2.28 + +* Sat Jul 27 2019 Fedora Release Engineering - 2.27-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Thu Jun 13 2019 Peter Hutterer 2.27-1 +- xkeyboard-config 2.27 +- drop intltool, no longer needed, see upstream commit e8026f673e + +* Mon May 27 2019 Peter Hutterer 2.26-2 +- xkeyboard-config 2.26, with sources this time + +* Mon May 27 2019 Peter Hutterer 2.26-1 +- xkeyboard-config 2.26 + +* Sun Feb 03 2019 Fedora Release Engineering - 2.24-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Sat Jul 14 2018 Fedora Release Engineering - 2.24-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild