[PATCH v22 0/9] Support translated long option names in getopt and argp
Carlos O'Donell
carlos@redhat.com
Mon Apr 27 13:59:54 GMT 2026
On 4/23/26 12:03 PM, Vivien Kraus wrote:
> Dear glibc developers,
>
> Since there is a new libc.abilist, here is an updated series.
I just want to comment here at the high-level.
The series was discussed in the Monday patch queue review where we look for reviewers.
The comments I want to make here are as follows:
* I personally believe, and have empathy for the desire to provide localized
interfacess, that we should support enabling this feature.
* That is not to say that there aren't concerns, particularly around translations
that might bee used as an attack surface with confusing localized names. The
series contains some mitigations for this.
I would like to see and will support continued review of this series in order to
make forward progress towards inclusion in glibc.
However, right now my attention and energy is being focused on the glibc security
team reviews whose rate has gone up in 2026.
My request is to please be patient with the developers as we continue to review this
series.
Thank you!
> Best regards,
>
> Vivien
>
> Vivien Kraus (9):
> posix: allow getopt_long to match translated option names
> posix: let the getopt caller set the translation context
> argp: document translated names in --help and --usage
> posix: let the getopt caller choose the textdomain for translation
> posix: do not allow option name translations for secure programs
> argp: do not display option name translations if __libc_enable_secure
> posix: check for collisions in getopt_long
> posix: Add a script for static validation of getopt_long PO files
> posix, argp: Support multiple long option name translations
>
> NEWS | 10 +
> argp/Makefile | 19 ++
> argp/argp-help.c | 142 +++++++-
> argp/argp-parse.c | 1 +
> argp/tst-argphelp-localized.c | 141 ++++++++
> argp/tst-argphelp-localized.po | 26 ++
> argp/tst-argpusage-localized.c | 82 +++++
> manual/argp.texi | 25 +-
> manual/getopt.texi | 80 ++++-
> manual/install.texi | 7 +-
> posix/Makefile | 52 ++-
> posix/Versions | 4 +
> posix/bits/getopt_ext.h | 4 +
> posix/check-getopt-translations.pl | 199 +++++++++++
> posix/getopt.c | 323 +++++++++++++++++-
> posix/getopt1.c | 114 ++++++-
> posix/getopt_int.h | 22 +-
> .../standalone-multiple-getopt-collisions.po | 45 +++
> posix/tst-check-getopt-translations.sh | 61 ++++
> posix/tst-getopt_long_collision.c | 130 +++++++
> posix/tst-getopt_long_collision.po | 32 ++
> posix/tstgetoptl.c | 183 ++++++++++
> posix/tstgetoptl.po | 26 ++
> sysdeps/mach/hurd/i386/libc.abilist | 2 +
> sysdeps/mach/hurd/x86_64/libc.abilist | 2 +
> sysdeps/unix/sysv/linux/aarch64/libc.abilist | 2 +
> sysdeps/unix/sysv/linux/alpha/libc.abilist | 2 +
> sysdeps/unix/sysv/linux/arc/libc.abilist | 2 +
> sysdeps/unix/sysv/linux/arm/be/libc.abilist | 2 +
> sysdeps/unix/sysv/linux/arm/le/libc.abilist | 2 +
> sysdeps/unix/sysv/linux/csky/libc.abilist | 2 +
> sysdeps/unix/sysv/linux/hppa/libc.abilist | 2 +
> sysdeps/unix/sysv/linux/i386/libc.abilist | 2 +
> .../sysv/linux/loongarch/ilp32/libc.abilist | 2 +
> .../sysv/linux/loongarch/lp64/libc.abilist | 2 +
> .../sysv/linux/m68k/coldfire/libc.abilist | 2 +
> .../unix/sysv/linux/m68k/m680x0/libc.abilist | 2 +
> .../sysv/linux/microblaze/be/libc.abilist | 2 +
> .../sysv/linux/microblaze/le/libc.abilist | 2 +
> .../sysv/linux/mips/mips32/fpu/libc.abilist | 2 +
> .../sysv/linux/mips/mips32/nofpu/libc.abilist | 2 +
> .../sysv/linux/mips/mips64/n32/libc.abilist | 2 +
> .../sysv/linux/mips/mips64/n64/libc.abilist | 2 +
> sysdeps/unix/sysv/linux/or1k/libc.abilist | 2 +
> .../linux/powerpc/powerpc32/fpu/libc.abilist | 2 +
> .../powerpc/powerpc32/nofpu/libc.abilist | 2 +
> .../linux/powerpc/powerpc64/be/libc.abilist | 2 +
> .../linux/powerpc/powerpc64/le/libc.abilist | 2 +
> .../unix/sysv/linux/riscv/rv32/libc.abilist | 2 +
> .../unix/sysv/linux/riscv/rv64/libc.abilist | 2 +
> sysdeps/unix/sysv/linux/s390/libc.abilist | 2 +
> sysdeps/unix/sysv/linux/sh/be/libc.abilist | 2 +
> sysdeps/unix/sysv/linux/sh/le/libc.abilist | 2 +
> .../sysv/linux/sparc/sparc32/libc.abilist | 2 +
> .../sysv/linux/sparc/sparc64/libc.abilist | 2 +
> .../unix/sysv/linux/x86_64/64/libc.abilist | 2 +
> .../unix/sysv/linux/x86_64/x32/libc.abilist | 2 +
> 57 files changed, 1744 insertions(+), 52 deletions(-)
> create mode 100644 argp/tst-argphelp-localized.c
> create mode 100644 argp/tst-argphelp-localized.po
> create mode 100644 argp/tst-argpusage-localized.c
> create mode 100644 posix/check-getopt-translations.pl
> create mode 100644 posix/standalone-multiple-getopt-collisions.po
> create mode 100644 posix/tst-check-getopt-translations.sh
> create mode 100644 posix/tst-getopt_long_collision.c
> create mode 100644 posix/tst-getopt_long_collision.po
> create mode 100644 posix/tstgetoptl.c
> create mode 100644 posix/tstgetoptl.po
>
>
> base-commit: 5880459251e74f2471a5a45c90aa6494756ac4bf
--
Cheers,
Carlos.
More information about the Libc-alpha
mailing list