lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f39d8b9b-c160-40a3-80d0-62f880122f2b@kernel.org>
Date: Wed, 16 Apr 2025 06:29:07 +0200
From: Jiri Slaby <jirislaby@...nel.org>
To: Nicolas Pitre <nico@...xnic.net>,
 Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Nicolas Pitre <npitre@...libre.com>, linux-serial@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 07/13] vt: introduce gen_ucs_recompose_table.py to
 create ucs_recompose_table.h

On 15. 04. 25, 21:17, Nicolas Pitre wrote:
> From: Nicolas Pitre <npitre@...libre.com>
> 
> The generated table maps base character + combining mark pairs to their
> precomposed equivalents using Python's unicodedata module.
> 
> The default script behavior is to create a table with most commonly used
> Latin, Greek, and Cyrillic recomposition pairs only. It is much smaller
> than the table with all possible recomposition pairs (71 entries vs 1000
> entries). But if one needs/wants the full table then simply running the
> script with the --full argument will generate it.
> 
> Signed-off-by: Nicolas Pitre <npitre@...libre.com>
> ---
>   drivers/tty/vt/gen_ucs_recompose_table.py | 255 ++++++++++++++++++++++
>   1 file changed, 255 insertions(+)
>   create mode 100755 drivers/tty/vt/gen_ucs_recompose_table.py
> 
> diff --git a/drivers/tty/vt/gen_ucs_recompose_table.py b/drivers/tty/vt/gen_ucs_recompose_table.py
> new file mode 100755
> index 0000000000..91e81fb1c9
> --- /dev/null
> +++ b/drivers/tty/vt/gen_ucs_recompose_table.py
> @@ -0,0 +1,255 @@
> +#!/usr/bin/env python3
...
> +    # Generate implementation file
> +    with open(out_file, 'w') as f:
> +        f.write(f"""\
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/*
> + * {out_file} - Unicode character recomposition
> + *
> + * Auto-generated by {this_file}{generation_mode}
> + *
> + * Unicode Version: {unicodedata.unidata_version}
> + *
> +{textwrap.fill(
> +    f"This file contains a table with {table_description_detail}. " +
> +    f"To generate a table with {alt_description_detail} instead, run:",
> +    width=75, initial_indent=" * ", subsequent_indent=" * ")}
> + *
> + *   python {this_file}{alternative_mode}

This should be python3. Or no 'python' at all -- I assume the script is 
executable given "new file mode 100755".

Reviewed-by: Jiri Slaby <jirislaby@...nel.org>

-- 
js
suse labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ