diff mbox

[devtools] mkarchroot: Set LANG=en_US.UTF-8

Message ID 20170217185301.22193-1-jan.steffens@gmail.com
State Accepted
Headers show

Commit Message

Emil Velikov via arch-projects Feb. 17, 2017, 6:53 p.m. UTC
In order to have an UTF-8 locale in the build root. This is something
normally set on real machines but is not set from our chroots. Meson,
for example, loudly complains when the locale charset is not UTF-8.

I'd like to have C.UTF-8, as most other distributions do. Unfortunately,
it's not part of vanilla glibc; en_US.UTF-8 will have to do.

mkarchroot already creates roots with both en_US.UTF-8 and de_DE.UTF-8,
the latter because builds of gcc (perhaps used to) require it.

Bump the CHROOT_VERSION due to the setting change.
---
 arch-nspawn.in | 2 +-
 mkarchroot.in  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/arch-nspawn.in b/arch-nspawn.in
index e46b57ffcdc2cda2..b5fcc9d51e3768f3 100644
--- a/arch-nspawn.in
+++ b/arch-nspawn.in
@@ -10,7 +10,7 @@ 
 
 m4_include(lib/common.sh)
 
-CHROOT_VERSION='v3'
+CHROOT_VERSION='v4'
 
 working_dir=''
 
diff --git a/mkarchroot.in b/mkarchroot.in
index 4d8efb0d8a90f873..c4bb51a1d218a78c 100644
--- a/mkarchroot.in
+++ b/mkarchroot.in
@@ -10,7 +10,7 @@ 
 
 m4_include(lib/common.sh)
 
-CHROOT_VERSION='v3'
+CHROOT_VERSION='v4'
 
 working_dir=''
 
@@ -72,7 +72,7 @@  pacstrap -GMcd ${pac_conf:+-C "$pac_conf"} "$working_dir" \
   "${cache_dirs[@]/#/--cachedir=}" "$@" || die 'Failed to install all packages'
 
 printf '%s.UTF-8 UTF-8\n' en_US de_DE > "$working_dir/etc/locale.gen"
-echo 'LANG=C' > "$working_dir/etc/locale.conf"
+echo 'LANG=en_US.UTF-8' > "$working_dir/etc/locale.conf"
 echo "$CHROOT_VERSION" > "$working_dir/.arch-chroot"
 
 systemd-machine-id-setup --root="$working_dir"