mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: "Sven Püschel" <s.pueschel@pengutronix.de>
Cc: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH v2] xkeyboard-config: version bump 2.42 -> 2.46
Date: Wed, 22 Oct 2025 17:26:18 +0200	[thread overview]
Message-ID: <aPj3migMiqAGab6w@pengutronix.de> (raw)
In-Reply-To: <20251021151917.2311394-1-s.pueschel@pengutronix.de>

On Tue, Oct 21, 2025 at 05:19:16PM +0200, Sven Püschel wrote:
> 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)

Please make the symlink relative.

Michael

>  
>  	@$(call install_finish, xkeyboard-config)
>  
> -- 
> 2.47.3
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



      reply	other threads:[~2025-10-22 15:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-21 15:19 Sven Püschel
2025-10-22 15:26 ` Michael Olbrich [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aPj3migMiqAGab6w@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    --cc=s.pueschel@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox