Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #61531

Bug#901702: Add locale and gettext support to initramfs

From Josh Triplett <josh@joshtriplett.org>
Newsgroups linux.debian.bugs.dist, linux.debian.kernel
Subject Bug#901702: Add locale and gettext support to initramfs
Date 2018-07-22 22:20 +0200
Message-ID <wesZH-6iy-1@gated-at.bofh.it> (permalink)
References <w1ucW-2Vy-1@gated-at.bofh.it> <w1ucW-2Vy-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Cross-posted to 2 groups.

Show all headers | View raw


On Sun, 17 Jun 2018 02:53:15 +0200 Jonas Meurer <jonas@freesources.org> wrote:
> That's why I'd like to add locale and gettext support to initramfs but
> make it optional. Without any prompts targeted at endusers, there's no
> real need to bloat the initramfs with locales and gettext files. But
> e.g. in the cryptsetup package, we would enable it.
> 
> I've prepared a patch that optionally adds locale and gettext support to
> initramfs (depending on a initramfs.conf variable). You can find the
> patch attached to this bugreport or as a merge request on Salsa[2].

Reading through the patch, most of it seems reasonable; however, I
noticed a few issues:

- /usr/bin/locale isn't in the locales package, it's in libc-bin, which
  is essential. So, please don't point people towards the locales
  package.
- You're filtering out LC_COLLATE from the locale output, but that just
  leads LC_COLLATE to default to the same locale specified by other
  variables. If you want to avoid referencing the collation files, you
  need to *explicitly* set LC_COLLATE=C.
- For the purposes of localized message support *only*, could you do
  without the (large) LC_CTYPE file as well? Or perhaps more generally,
  would it make sense to *only* support LC_MESSAGES and nothing else?
- For invoking find, please see how other hook scripts do so, and please
  quote the resulting filenames. Yes, files under /usr/lib/locale should
  never contain whitespace, but despite that, please don't encode such
  assumptions.
- Nit: rather than providing a function gettext_support to conditionally
  source /usr/bin/gettext.sh and otherwise provide dummy functions, have
  you considered just putting a /usr/bin/gettext.sh in the initramfs
  that defines those dummy functions, so that scripts can use it
  unconditionally?

Have you confirmed that this support works on a system with locales not
installed and only the C.UTF-8 locale configured?

Back to linux.debian.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Bug#901702: Add locale and gettext support to initramfs Jonas Meurer <jonas@freesources.org> - 2018-06-17 03:00 +0200
  Bug#901702: Add locale and gettext support to initramfs Josh Triplett <josh@joshtriplett.org> - 2018-07-22 22:20 +0200

csiph-web