1
0
mirror of https://github.com/systemd/systemd synced 2026-04-26 00:45:09 +02:00

Compare commits

...

3 Commits

Author SHA1 Message Date
Daan De Meyer
b626f6959b nspawn: Set LANG to C.UTF-8
Let's default to a UTF-8 locale when running commands using nspawn.
2022-05-02 22:55:32 +01:00
Yu Watanabe
0b6bf4b674 shared/install: use correct cleanup function
Fixes #23250.
2022-05-02 22:17:56 +01:00
Lennart Poettering
ba4b74cbc7 man: document that systemd-fstab-generator actually cares about roothash=/usrhash= on the kernel cmdline
It doesn't really care about the hash value passed (which is processed
by systemd-veritysetup-generator), but it does care about the fact that
it is set (and mounts the DM nodes /dev/mapper/usr + /dev/mapper/root in
that case).
2022-05-02 20:49:16 +01:00
3 changed files with 24 additions and 1 deletions

View File

@ -171,6 +171,18 @@
initrd.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>roothash=</varname></term>
<term><varname>usrhash=</varname></term>
<listitem><para>These options are primarily read by
<citerefentry><refentrytitle>systemd-veritysetup-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>. When
set this indicates that the root file system (or <filename>/usr/</filename>) shall be mounted from
Verity volumes with the specified hashes. If these kernel command line options are set the root (or
<filename>/usr/</filename>) file system is thus mounted from a device mapper volume
<filename>/dev/mapper/root</filename> (or <filename>/dev/mapper/usr</filename>).</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>systemd.volatile=</varname></term>

View File

@ -3218,6 +3218,7 @@ static int inner_child(
NULL, /* LISTEN_PID */
NULL, /* NOTIFY_SOCKET */
NULL, /* CREDENTIALS_DIRECTORY */
NULL, /* LANG */
NULL
};
const char *exec_target;
@ -3486,6 +3487,16 @@ static int inner_child(
n_env++;
}
if (arg_start_mode != START_BOOT) {
/* If we're running a command in the container, let's default to the C.UTF-8 locale as it's
* part of glibc these days and was backported to most distros a long time before it got
* added to upstream glibc. */
envp[n_env] = strdup("LANG=C.UTF-8");
if (!envp[n_env])
return log_oom();
n_env++;
}
env_use = strv_env_merge(envp, os_release_pairs, arg_setenv);
if (!env_use)
return log_oom();

View File

@ -2799,7 +2799,7 @@ static int normalize_linked_files(
* but operates on real unit names. For each argument we we look up the actual path
* where the unit is found. This way linked units can be re-enabled successfully. */
_cleanup_free_ char **files = NULL, **names = NULL;
_cleanup_strv_free_ char **files = NULL, **names = NULL;
int r;
STRV_FOREACH(a, names_or_paths) {