From 320c1fd0ace54dfcf94a34f1009bf597963c3ea5 Mon Sep 17 00:00:00 2001 From: Evangelos Foutras Date: Wed, 15 Feb 2023 22:48:43 +0200 Subject: [PATCH] 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 --- src/mkarchroot.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mkarchroot.in b/src/mkarchroot.in index 45ad19c..ff3426e 100644 --- a/src/mkarchroot.in +++ b/src/mkarchroot.in @@ -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"