public inbox for gentoo-catalyst@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-catalyst] [PATCH 1/2] targets: Set LANG=C.UTF8
@ 2020-03-30  3:26 Matt Turner
  2020-03-30  3:26 ` [gentoo-catalyst] [PATCH 2/2] targets: Reduce locales to C.UTF8 in stage builds Matt Turner
  2020-04-07 21:25 ` [gentoo-catalyst] [PATCH 1/2] targets: Set LANG=C.UTF8 Alec Warner
  0 siblings, 2 replies; 5+ messages in thread
From: Matt Turner @ 2020-03-30  3:26 UTC (permalink / raw
  To: gentoo-catalyst; +Cc: Matt Turner

Stable glibc now always provides a UTF-8 capable locale, which many
packages require. Set this as the default LANG.

Running locale-gen in stage1 should also solve bug #536938.

Bug: https://bugs.gentoo.org/536938
Bug: https://bugs.gentoo.org/710762
Bug: https://bugs.gentoo.org/714906
Signed-off-by: Matt Turner <mattst88@gentoo.org>
---
 targets/stage1/chroot.sh | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/targets/stage1/chroot.sh b/targets/stage1/chroot.sh
index 0caf49ee..88a36481 100755
--- a/targets/stage1/chroot.sh
+++ b/targets/stage1/chroot.sh
@@ -57,6 +57,11 @@ make_destpath /tmp/stage1root
 run_merge "--oneshot --nodeps sys-apps/baselayout"
 ${clst_sed} -i "/USE=\"${USE} -build\"/d" ${clst_make_conf}
 
+for etc in /etc /tmp/stage1root/etc; do
+	echo "LANG=C.UTF8" > ${etc}/env.d/02locale
+done
+update_env_settings
+
 # Now, we install our packages
 if [ -e ${clst_make_conf} ]; then
 	echo "CATALYST_USE=\"-* build ${BINDIST} ${clst_CATALYST_USE}\"" >> ${clst_make_conf}
@@ -71,6 +76,13 @@ fi
 
 run_merge "--oneshot ${clst_buildpkgs}"
 
+# TODO: Drop this when locale-gen in stable glibc supports ROOT.
+#
+# locale-gen does not support the ROOT variable, and as such glibc simply does
+# not run locale-gen when ROOT is set. Since we've set LANG, we need to run
+# locale-gen explicitly.
+locale-gen --destdir /tmp/stage1root/
+
 # Why are we removing these? Don't we need them for final make.conf?
 for useexpand in ${clst_HOSTUSEEXPAND}; do
 	x="clst_${useexpand}"
-- 
2.24.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-04-08  2:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-30  3:26 [gentoo-catalyst] [PATCH 1/2] targets: Set LANG=C.UTF8 Matt Turner
2020-03-30  3:26 ` [gentoo-catalyst] [PATCH 2/2] targets: Reduce locales to C.UTF8 in stage builds Matt Turner
2020-04-07 21:25 ` [gentoo-catalyst] [PATCH 1/2] targets: Set LANG=C.UTF8 Alec Warner
2020-04-08  0:25   ` Matt Turner
2020-04-08  2:10     ` Brian Dolbec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox