localed: Run locale-gen if available to generate missing locale
authorMatthias Klumpp <matthias@tenstral.net>
Fri, 8 Jan 2021 22:59:38 +0000 (23:59 +0100)
committerCarlos Henrique Lima Melara <charlesmelara@riseup.net>
Thu, 26 Jun 2025 00:44:53 +0000 (21:44 -0300)
commit8c5aef4a012124ff93df8920b24b0d570c894854
tree33385b48cb8f517b34b019b3448e84024c93e6e9
parent4a391af0406111755066dd5626c1eeaae03fdd81
localed: Run locale-gen if available to generate missing locale

This change improves integration with distributions using locale-gen to
generate missing locale on-demand, like Debian-based distributions
(Debian/Ubuntu/PureOS/Tanglu/...) and Arch Linux.
We only ever enable new locales for generation, and never disable them.
Furthermore, we only generate UTF-8 locale.

This feature is only used if explicitly enabled at compile-time, and
will also be inert at runtime if the locale-gen binary is missing.

(cherry picked from commit 8f20232fcb52dbe6255f3df6101fc057af90bcfa)

Gbp-Pq: Name localed-Run-locale-gen-if-available-to-generate-missing-l.patch
meson.build
meson_options.txt
src/locale/keymap-util.c
src/locale/keymap-util.h
src/locale/localectl.c
src/locale/localed.c