From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 40B2B138350 for ; Tue, 7 Apr 2020 21:26:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 73447E0958; Tue, 7 Apr 2020 21:26:06 +0000 (UTC) Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D9FF1E0958 for ; Tue, 7 Apr 2020 21:26:05 +0000 (UTC) Received: by mail-ed1-x543.google.com with SMTP id cf14so5852797edb.13 for ; Tue, 07 Apr 2020 14:26:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gentoo-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UQPrUEkXbOr7FAO91Yh5ljzHGMDzaJLNygtbBgyAEOo=; b=je63oTVynS9vxookyFMREPUODW0ICVRLCQS4nQdR2YbwbvQCvfxgGZd4+0e0SG7bw7 fleSfw6JoXeMRMLFtCqgS8+oNcZogHhfievOPy75kFnk4fubrjDy0mB47btlsUaH3pqQ cjDQ7gJG2MjSjHTZvBdUYOywCsHcQj2KygJrxcsExpjk8DctFNTlX2GnZWTsI2oo3DZD GyVUOjmsQBK22JUSAGXIQcfOj+f1pYLKjWU2qi3Ta18SOYneNNZu7nSfcmks8TbPaZ+N pFRAxc+cU3seTo/Ck+bJ5EeJUpd4nIF57bw4StdxbkdQylqh0/EWUz08v8URyJZqAYKm DItg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UQPrUEkXbOr7FAO91Yh5ljzHGMDzaJLNygtbBgyAEOo=; b=B6HpujW7bwXzI6x6nEaETZ8zG+tLhTqMKTnJeidRLvpOTKyor4JHz+C6nyK1NSqMhv rAx+ErCDu3pcYX/7z6dBMCMvr8/iKT5zROPYNaXCTYbPKHnayyveNEEIfG0DvE24spNS /aokIlXr0AMaFA4aTTK0BH+tBDDirl9jPmolCXZ8+baIqfOjJSCDyLqpnWTf6fNML9fH 0TJbNhPGYUuv1Osj+E9EMKYF3TvAJFKea7x6WMBSLT2Bubc4Q3LA2qsGunFn05AsZ6ub UQV/mglb9GYjorMiuHs4szgoPfbBeOq2Y28+RjCCqnDza32leDc+BHfEVmf9fuhIvCfb cmDg== X-Gm-Message-State: AGi0PubFck93SQ2ONdx0APXsvLgxv7BYGQKGnxR49Rt7NNw1LYcas9gT kBQbMR5jXbgcEsBSTrfpsiEMLM9O32qriGMiWjVcN6pMDow= X-Google-Smtp-Source: APiQypK82QHdMuQG1mNOFic50v3GLcZDe+v5JXmF7pe4952gQ/Bq3tI5lSEMuWuScaFFJIVsAp4kY2IbI2FsEYujKAc= X-Received: by 2002:a50:85c4:: with SMTP id q4mr3583416edh.147.1586294763879; Tue, 07 Apr 2020 14:26:03 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 References: <20200330032644.3086274-1-mattst88@gentoo.org> In-Reply-To: <20200330032644.3086274-1-mattst88@gentoo.org> From: Alec Warner Date: Tue, 7 Apr 2020 14:25:52 -0700 Message-ID: Subject: Re: [gentoo-catalyst] [PATCH 1/2] targets: Set LANG=C.UTF8 To: gentoo-catalyst@lists.gentoo.org Cc: Matt Turner Content-Type: multipart/alternative; boundary="000000000000e9136205a2ba07c2" X-Archives-Salt: d565ae81-08e6-4b8e-9eb7-3f5e8aad463d X-Archives-Hash: 919aec7f61b5b6ca02372645805aa340 --000000000000e9136205a2ba07c2 Content-Type: text/plain; charset="UTF-8" On Sun, Mar 29, 2020 at 8:26 PM Matt Turner wrote: > 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 > --- > 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 > + > if /tmp/stage1root is "${clst_root_path}" I think it might behoove you to use it here rather than hard coding it. Same as below. # 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 > > > --000000000000e9136205a2ba07c2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Sun, Mar 29, 2020 at 8:26 PM Matt = Turner <mattst88@gentoo.org&g= t; wrote:
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>
---
=C2=A0targets/stage1/chroot.sh | 12 ++++++++++++
=C2=A01 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
=C2=A0run_merge "--oneshot --nodeps sys-apps/baselayout"
=C2=A0${clst_sed} -i "/USE=3D\"${USE} -build\"/d" ${cls= t_make_conf}

+for etc in /etc /tmp/stage1root/etc; do
+=C2=A0 =C2=A0 =C2=A0 =C2=A0echo "LANG=3DC.UTF8" > ${etc}/env.= d/02locale
+done
+update_env_settings
+

if /tmp/stage1root is "${clst_root_pa= th}" I think it might behoove you to use it here rather than hard codi= ng it.
Same as below.

=C2=A0# Now, we install our packages
=C2=A0if [ -e ${clst_make_conf} ]; then
=C2=A0 =C2=A0 =C2=A0 =C2=A0 echo "CATALYST_USE=3D\"-* build ${BIN= DIST} ${clst_CATALYST_USE}\"" >> ${clst_make_conf}
@@ -71,6 +76,13 @@ fi

=C2=A0run_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 t= o run
+# locale-gen explicitly.
+locale-gen --destdir /tmp/stage1root/
+
=C2=A0# Why are we removing these? Don't we need them for final make.co= nf?
=C2=A0for useexpand in ${clst_HOSTUSEEXPAND}; do
=C2=A0 =C2=A0 =C2=A0 =C2=A0 x=3D"clst_${useexpand}"
--
2.24.1


--000000000000e9136205a2ba07c2--