Merge pull request #21868 from lucab/ups/factory-locale-conf

factory: populate /etc/locale.conf with systemd build-time setting
This commit is contained in:
Yu Watanabe 2021-12-25 15:09:35 +09:00 committed by GitHub
commit 2588920059
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 23 additions and 4 deletions

View file

@ -0,0 +1,3 @@
# This is the fallback locale configuration provided by systemd.
LANG="{{ SYSTEMD_DEFAULT_LOCALE }}"

View file

@ -0,0 +1,11 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
factory_etc_dir = factorydir / 'etc'
custom_target(
'locale.conf',
input : 'locale.conf.in',
output : 'locale.conf',
command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
install : true,
install_dir : factory_etc_dir)

View file

@ -32,7 +32,8 @@
<para>The basic file format of <filename>locale.conf</filename> is
a newline-separated list of environment-like shell-compatible
variable assignments. It is possible to source the configuration
variable assignments, ignoring comments and empty lines.
It is possible to source the configuration
from shell scripts, however, beyond mere variable assignments, no
shell features are supported, allowing applications to read the
file without implementing a shell compatible execution
@ -64,14 +65,14 @@
might be checked for locale configuration as well, however only as
fallback.</para>
<para><filename>/etc/locale.conf</filename> is usually created and updated
<para><filename>/etc/locale.conf</filename> can be updated
using
<citerefentry><refentrytitle>systemd-localed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
<citerefentry project='man-pages'><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
may be used to alter the settings in this file during runtime from
the command line. Use
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
to initialize them on mounted (but not booted) system images.</para>
to customize them on mounted (but not booted) system images.</para>
</refsect1>
<refsect1>
@ -107,7 +108,9 @@
<para><filename>/etc/locale.conf</filename>:</para>
<programlisting>LANG=de_DE.UTF-8
<programlisting># Custom settings
LANG=de_DE.UTF-8
LC_MESSAGES=en_US.UTF-8</programlisting>
</example>

View file

@ -3711,6 +3711,7 @@ subdir('docs/var-log')
install_subdir('factory/etc',
install_dir : factorydir)
subdir('factory/templates')
if install_sysconfdir
install_data('xorg/50-systemd-user.sh',

View file

@ -12,6 +12,7 @@ L+ /etc/mtab - - - - ../proc/self/mounts
{% if HAVE_SMACK_RUN_LABEL %}
t /etc/mtab - - - - security.SMACK64=_
{% endif %}
C! /etc/locale.conf - - - -
C! /etc/nsswitch.conf - - - -
{% if HAVE_PAM %}
C! /etc/pam.d - - - -