mkarchroot: stop adding C.UTF-8 to locale.gen

Adding such an entry is problematic as it results in locale -a showing:

  C
  C.UTF-8
  C.utf8
  POSIX
  (other locales)

In the above, C.UTF-8 is built-in whereas C.utf8 comes from locale.gen.

The duplicate locale has the potential to expose undesired behavior in
upstream software: https://github.com/sudo-project/sudo/issues/241
This commit is contained in:
Evangelos Foutras 2023-02-15 22:48:43 +02:00
parent 7b209b63a7
commit 320c1fd0ac
No known key found for this signature in database
GPG Key ID: 51E8B148A9999C34
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ done
unshare --mount pacstrap -${umode}Mc ${pac_conf:+-C "$pac_conf"} "$working_dir" \
"${cache_dirs[@]/#/--cachedir=}" "$@" || die 'Failed to install all packages'
printf '%s.UTF-8 UTF-8\n' C en_US de_DE > "$working_dir/etc/locale.gen"
printf '%s.UTF-8 UTF-8\n' en_US de_DE > "$working_dir/etc/locale.gen"
echo 'LANG=C.UTF-8' > "$working_dir/etc/locale.conf"
echo "$CHROOT_VERSION" > "$working_dir/.arch-chroot"