From 7ad3013efd89b2437709862380fbb0fdd0137585 Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Mon, 20 Nov 2023 13:51:16 +0200 Subject: [PATCH] debian: configure default locale Closes https://github.com/termux/proot-distro/issues/357 --- distro-build/debian.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/distro-build/debian.sh b/distro-build/debian.sh index 3ca3eba0d..4d4e8ba01 100644 --- a/distro-build/debian.sh +++ b/distro-build/debian.sh @@ -7,7 +7,7 @@ bootstrap_distribution() { --architectures=${arch} \ --variant=minbase \ --components="main,contrib" \ - --include="ca-certificates" \ + --include="ca-certificates,locales" \ --format=tar \ "${dist_version}" \ "${ROOTFS_DIR}/debian-$(translate_arch "$arch")-pd-${CURRENT_VERSION}.tar" @@ -33,5 +33,12 @@ write_plugin() { TARBALL_SHA256['i686']="$(sha256sum "${ROOTFS_DIR}/debian-i686-pd-${CURRENT_VERSION}.tar.xz" | awk '{ print $1}')" TARBALL_URL['x86_64']="${GIT_RELEASE_URL}/debian-x86_64-pd-${CURRENT_VERSION}.tar.xz" TARBALL_SHA256['x86_64']="$(sha256sum "${ROOTFS_DIR}/debian-x86_64-pd-${CURRENT_VERSION}.tar.xz" | awk '{ print $1}')" + + distro_setup() { + ${TAB}# Configure en_US.UTF-8 locale. + ${TAB}run_proot_cmd sed -i -E 's/# (en_US.UTF-8)/\1/g' /etc/locale.gen + ${TAB}run_proot_cmd DEBIAN_FRONTEND=noninteractive dpkg-reconfigure locales + } + EOF }