From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Sat, 15 Jun 2024 17:01:13 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sIUu1-006X1f-2U for lore@lore.pengutronix.de; Sat, 15 Jun 2024 17:01:13 +0200 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1sIUu1-00030C-2T; Sat, 15 Jun 2024 17:01:13 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sIUri-0000E8-So; Sat, 15 Jun 2024 16:58:50 +0200 Received: from [2a0a:edc0:0:1101:1d::54] (helo=dude05.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sIUri-002WfL-Fr; Sat, 15 Jun 2024 16:58:50 +0200 Received: from mol by dude05.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1sIUri-00HM3o-1S; Sat, 15 Jun 2024 16:58:50 +0200 From: Michael Olbrich To: ptxdist@pengutronix.de Date: Sat, 15 Jun 2024 16:58:50 +0200 Message-Id: <20240615145850.4136369-1-m.olbrich@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240611164434.435702-1-christian.melki@t2data.com> References: <20240611164434.435702-1-christian.melki@t2data.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [ptxdist] [APPLIED] xkeyboard-config: Version bump. 2.41 -> 2.42 X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: Christian Melki Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Thanks, applied as 604c6b5abe108a6989b41ca38980781ceff25ff7. Michael [sent from post-receive hook] On Sat, 15 Jun 2024 16:58:50 +0200, Christian Melki wrote: > Minor changes. > https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/commits/xkeyboard-config-2.42 > > * Add patch to remove changes in python script that would > require python 3.11 which isn't default in even Ubuntu 22.04. > Ie, revert: > https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/commit/809b7ad3003863476eb76a16e27ff7d00519f199 > > Signed-off-by: Christian Melki > Message-Id: <20240611164434.435702-1-christian.melki@t2data.com> > Signed-off-by: Michael Olbrich > > 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 > new file mode 100644 > index 000000000000..9d14240da000 > --- /dev/null > +++ b/patches/xkeyboard-config-2.42/0001-revert-rules-minor-improvement-to-generation-script.patch > @@ -0,0 +1,127 @@ > +From: Christian Melki > +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 > +--- > + 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 > new file mode 100644 > index 000000000000..e909ad068369 > --- /dev/null > +++ b/patches/xkeyboard-config-2.42/series > @@ -0,0 +1,4 @@ > +# 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 50899f7153ff..19e732e2499f 100644 > --- a/rules/xkeyboard-config.make > +++ b/rules/xkeyboard-config.make > @@ -14,8 +14,8 @@ PACKAGES-$(PTXCONF_XKEYBOARD_CONFIG) += xkeyboard-config > # > # Paths and names > # > -XKEYBOARD_CONFIG_VERSION := 2.41 > -XKEYBOARD_CONFIG_MD5 := 2f0b843b5283b82cae0402cbc4f374b4 > +XKEYBOARD_CONFIG_VERSION := 2.42 > +XKEYBOARD_CONFIG_MD5 := 2d3b7e43e597f4c607ad6261e2b3d77f > 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))