mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH v2] xkeyboard-config: version bump 2.42 -> 2.46
@ 2025-10-21 15:19 Sven Püschel
  0 siblings, 0 replies; only message in thread
From: Sven Püschel @ 2025-10-21 15:19 UTC (permalink / raw)
  To: ptxdist; +Cc: Sven Püschel

xkeyboard-config now uses a versioned directory to allow having
breaking change updates [1]. The /X11/xkb directory is now just a
symlink to the current version.

The xkb-base parameter wasn't used and therefore removed [2].
Instead the meson datadir was overwritten with the XORD_DATADIR to
match the variable usage in the targetinstall step.
Also the other meson options were added to the option list
with their default values.

The license file changed due to a license error fix [3].
As the COPYING file contains multiple licenses, each of them were
evaluated with the SPDX Online Tool [4] and added to the list of
licenses. The fixed license previously had the
xkeyboard-config-Zinoviev SPDX Identifier. As the fixed version doesn't
match any license and the SPDX identifier is very specific to
xkeyboard-config the old SPDX identifier is used.

The patch is not necessary anymore, as the 2.43 includes a fallback for
the Python 3.11 specific import [5].

[1] https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/commit/fd1d8d2d4f07ac494109b1a9e72d7fe777f6757a
[2] https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/commit/7f4bfd3af1b6448cc0e37a56a8f9a929c1219696
[3] https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/commit/8d42430f6498ceb1f9ca31f2fb9d0419c682912b
[4] https://tools.spdx.org/app/check_license/
[5] https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/commit/6993e6953deb5ce00647553b18e5273f15596b0b

Signed-off-by: Sven Püschel <s.pueschel@pengutronix.de>
---
 ...nor-improvement-to-generation-script.patch | 127 ------------------
 patches/xkeyboard-config-2.42/series          |   4 -
 rules/xkeyboard-config.make                   |  16 ++-
 3 files changed, 10 insertions(+), 137 deletions(-)
 delete mode 100644 patches/xkeyboard-config-2.42/0001-revert-rules-minor-improvement-to-generation-script.patch
 delete mode 100644 patches/xkeyboard-config-2.42/series

diff --git a/patches/xkeyboard-config-2.42/0001-revert-rules-minor-improvement-to-generation-script.patch b/patches/xkeyboard-config-2.42/0001-revert-rules-minor-improvement-to-generation-script.patch
deleted file mode 100644
index 9d14240da..000000000
--- a/patches/xkeyboard-config-2.42/0001-revert-rules-minor-improvement-to-generation-script.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-From: Christian Melki <christian.melki@t2data.com>
-Date: Tue, 11 Jun 2024 18:23:54 +0200
-Subject: [PATCH] revert rules: minor improvement to generation script
-
-Revert 809b7ad3003863476eb76a16e27ff7d00519f199
-
-This delta needs python 3.11 but adds nothing in term
-of functionality.
-
-Signed-off-by: Christian Melki <christian.melki@t2data.com>
----
- rules/generate-options-symbols.py | 30 ++++++++++++++----------------
- 1 file changed, 14 insertions(+), 16 deletions(-)
-
-diff --git a/rules/generate-options-symbols.py b/rules/generate-options-symbols.py
-index b29b9253fe1f..1ac3be2cff29 100755
---- a/rules/generate-options-symbols.py
-+++ b/rules/generate-options-symbols.py
-@@ -7,7 +7,7 @@
- 
- from __future__ import annotations
- import argparse
--from enum import StrEnum, unique
-+from enum import Enum, unique
- import sys
- import xml.etree.ElementTree as ET
- 
-@@ -23,7 +23,7 @@ def error(msg):
- 
- 
- @unique
--class Section(StrEnum):
-+class Section(Enum):
-     """
-     XKB sections.
-     Name correspond to the header (`xkb_XXX`), value to the subdir/rules header.
-@@ -37,9 +37,6 @@ class Section(StrEnum):
- 
-     @classmethod
-     def parse(cls, raw: str) -> Section:
--        # Note: in order to display a nice message, argparse requires the error
--        # to be one of: ArgumentTypeError, TypeError, or ValueError
--        # See: https://docs.python.org/3/library/argparse.html#type
-         try:
-             return cls[raw]
-         except KeyError:
-@@ -62,7 +59,7 @@ class Directive:
- 
- @dataclass
- class DirectiveSet:
--    option: Option
-+    option: "Option"
-     keycodes: Directive | None
-     compatibility: Directive | None
-     geometry: Directive | None
-@@ -108,7 +105,7 @@ def resolve_option(xkb_root: Path, option: Option) -> DirectiveSet:
-     directive = option.directive
-     filename, section_name = directive.filename, directive.section
-     for section in Section:
--        subdir = xkb_root / section
-+        subdir = xkb_root / section.value
-         if not (subdir / filename).exists():
-             # Some of our foo:bar entries map to a baz_vndr/foo file
-             for vndr in subdir.glob("*_vndr"):
-@@ -128,8 +125,8 @@ def resolve_option(xkb_root: Path, option: Option) -> DirectiveSet:
-         # Now check if the target file actually has that section
-         f = subdir / resolved_filename
-         with f.open("rt", encoding="utf-8") as fd:
--            section_header = f'xkb_{section.name} "{section_name}"'
--            if any(section_header in line for line in fd):
-+            found = any(f'xkb_{section.name} "{section_name}"' in line for line in fd)
-+            if found:
-                 directives[section] = Directive(option, resolved_filename, section_name)
- 
-     return DirectiveSet(
-@@ -142,7 +139,7 @@ def resolve_option(xkb_root: Path, option: Option) -> DirectiveSet:
-     )
- 
- 
--def options(rules_xml: Path) -> Iterable[Option]:
-+def options(rules_xml) -> Iterable[Option]:
-     """
-     Yields all Options from the given XML file
-     """
-@@ -229,10 +226,9 @@ def main():
-         default=Section.symbols,
-     )
-     parser.add_argument(
--        "files", nargs="+", help="The base.xml and base.extras.xml files", type=Path
-+        "files", nargs="+", help="The base.xml and base.extras.xml files"
-     )
-     ns = parser.parse_args()
--    rules_section: Section = ns.rules_section
- 
-     all_options = (opt for f in ns.files for opt in options(f))
- 
-@@ -244,24 +240,26 @@ def main():
-         if o.name not in skip and not o.name.startswith("custom:")
-     )
- 
--    def check_and_map(directive: DirectiveSet) -> Directive:
-+    def check_and_map(directive: DirectiveSet):
-         assert (
-             not directive.is_empty
-         ), f"Option {directive.option} does not resolve to any section"
- 
--        return getattr(directive, rules_section.name)
-+        return getattr(directive, ns.rules_section.name)
- 
-     filtered = filter(
-         lambda y: y is not None,
-         map(check_and_map, directives),
-     )
- 
--    print(f"! option                         = {rules_section}")
-+    header = ns.rules_section.value
-+
-+    print(f"! option                         = {header}")
-     for d in filtered:
-         assert d is not None
-         print(f"  {d.name:30s} = +{d}")
- 
--    if rules_section is Section.types:
-+    if ns.rules_section is Section.types:
-         print(f"  {'custom:types':30s} = +custom")
- 
- 
diff --git a/patches/xkeyboard-config-2.42/series b/patches/xkeyboard-config-2.42/series
deleted file mode 100644
index e909ad068..000000000
--- a/patches/xkeyboard-config-2.42/series
+++ /dev/null
@@ -1,4 +0,0 @@
-# generated by git-ptx-patches
-#tag:base --start-number 1
-0001-revert-rules-minor-improvement-to-generation-script.patch
-# 2bf998cd0fca5a75f9109f7b885eb737  - git-ptx-patches magic
diff --git a/rules/xkeyboard-config.make b/rules/xkeyboard-config.make
index 19e732e24..3a964615d 100644
--- a/rules/xkeyboard-config.make
+++ b/rules/xkeyboard-config.make
@@ -14,16 +14,16 @@ PACKAGES-$(PTXCONF_XKEYBOARD_CONFIG) += xkeyboard-config
 #
 # Paths and names
 #
-XKEYBOARD_CONFIG_VERSION	:= 2.42
-XKEYBOARD_CONFIG_MD5		:= 2d3b7e43e597f4c607ad6261e2b3d77f
+XKEYBOARD_CONFIG_VERSION	:= 2.46
+XKEYBOARD_CONFIG_MD5		:= ca851f0e5bc0f52f2fb4629babc344c1
 XKEYBOARD_CONFIG		:= xkeyboard-config-$(XKEYBOARD_CONFIG_VERSION)
 XKEYBOARD_CONFIG_SUFFIX		:= tar.xz
 XKEYBOARD_CONFIG_URL		:= $(call ptx/mirror, XORG, individual/data/xkeyboard-config/$(XKEYBOARD_CONFIG).$(XKEYBOARD_CONFIG_SUFFIX))
 XKEYBOARD_CONFIG_SOURCE		:= $(SRCDIR)/$(XKEYBOARD_CONFIG).$(XKEYBOARD_CONFIG_SUFFIX)
 XKEYBOARD_CONFIG_DIR		:= $(BUILDDIR)/$(XKEYBOARD_CONFIG)
-XKEYBOARD_CONFIG_LICENSE	:= MIT
+XKEYBOARD_CONFIG_LICENSE	:= HPND-sell-variant AND X11-distribute-modifications-variant AND MIT-open-group AND MIT AND X11 AND xkeyboard-config-Zinoviev
 XKEYBOARD_CONFIG_LICENSE_FILES	:= \
-	file://COPYING;md5=8fc8ae699974c360e2e2e883a63ce264
+	file://COPYING;md5=faa756e04053029ddc602caf99e5ef1d
 
 # ----------------------------------------------------------------------------
 # Prepare
@@ -36,7 +36,10 @@ XKEYBOARD_CONFIG_CONF_TOOL	:= meson
 XKEYBOARD_CONFIG_CONF_OPT	:= \
 	$(CROSS_MESON_USR) \
 	-Dcompat-rules=true \
-	-Dxkb-base=$(XORG_DATADIR)/X11/xkb
+	-Dxorg-rules-symlinks=false \
+	-Dnls=true \
+	-Dnon-latin-layouts-list=false \
+	-Ddatadir=$(XORG_DATADIR)
 
 # ----------------------------------------------------------------------------
 # Target-Install
@@ -51,7 +54,8 @@ $(STATEDIR)/xkeyboard-config.targetinstall:
 	@$(call install_fixup, xkeyboard-config,AUTHOR,"Michael Olbrich <m.olbrich@pengutronix.de>")
 	@$(call install_fixup, xkeyboard-config,DESCRIPTION,missing)
 
-	@$(call install_tree, xkeyboard-config, 0, 0, -, $(XORG_DATADIR)/X11/xkb)
+	@$(call install_tree, xkeyboard-config, 0, 0, -, $(XORG_DATADIR)/xkeyboard-config-$(basename $(XKEYBOARD_CONFIG_VERSION)))
+	@$(call install_link, xkeyboard-config, $(XORG_DATADIR)/xkeyboard-config-$(basename $(XKEYBOARD_CONFIG_VERSION)), $(XORG_DATADIR)/X11/xkb)
 
 	@$(call install_finish, xkeyboard-config)
 
-- 
2.47.3




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

only message in thread, other threads:[~2025-10-21 15:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-21 15:19 [ptxdist] [PATCH v2] xkeyboard-config: version bump 2.42 -> 2.46 Sven Püschel

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