* [gentoo-user] /etc/locale vs /etc/env.d/02locale? @ 2011-06-16 15:45 Mark Knecht 2011-06-16 16:22 ` [gentoo-user] " Nikos Chantziaras [not found] ` <BANLkTikP=J_NeFs-LhYb3RPANhDr74+icg@mail.gmail.com> 0 siblings, 2 replies; 13+ messages in thread From: Mark Knecht @ 2011-06-16 15:45 UTC (permalink / raw To: Gentoo User Is there a simple explanation concerning the difference between the two locales I have seen on Gentoo machines? 1) /etc/locale, as specified in the installation documents 2) /etc/env.d/02locale as has been discussed on the list recently I'm helping a Windows friend bring up his first Gentoo box. With the locale set in /etc/locale as per the install docs the locale command returns: (from the chroot) (chroot) livecd linux # cat /etc/locale.gen <SNIP> en_US ISO-8859-1 en_US.UTF-8 UTF-8 (chroot) livecd linux # locale LANG= LC_CTYPE="POSIX" LC_NUMERIC="POSIX" LC_TIME="POSIX" LC_COLLATE="POSIX" LC_MONETARY="POSIX" LC_MESSAGES="POSIX" LC_PAPER="POSIX" LC_NAME="POSIX" LC_ADDRESS="POSIX" LC_TELEPHONE="POSIX" LC_MEASUREMENT="POSIX" LC_IDENTIFICATION="POSIX" LC_ALL= (chroot) livecd linux # However on my machines it did the same thing until I set 02locale and now it returns: mark@c2stable ~ $ locale LANG=en_US.UTF8 LC_CTYPE="en_US.UTF8" LC_NUMERIC="en_US.UTF8" LC_TIME="en_US.UTF8" LC_COLLATE="en_US.UTF8" LC_MONETARY="en_US.UTF8" LC_MESSAGES="en_US.UTF8" LC_PAPER="en_US.UTF8" LC_NAME="en_US.UTF8" LC_ADDRESS="en_US.UTF8" LC_TELEPHONE="en_US.UTF8" LC_MEASUREMENT="en_US.UTF8" LC_IDENTIFICATION="en_US.UTF8" LC_ALL= mark@c2stable ~ $ It seems to me the latter is preferable but the install docs don't talk about it at all. Thanks, Mark ^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-user] Re: /etc/locale vs /etc/env.d/02locale? 2011-06-16 15:45 [gentoo-user] /etc/locale vs /etc/env.d/02locale? Mark Knecht @ 2011-06-16 16:22 ` Nikos Chantziaras 2011-06-16 16:45 ` Mark Knecht [not found] ` <BANLkTikP=J_NeFs-LhYb3RPANhDr74+icg@mail.gmail.com> 1 sibling, 1 reply; 13+ messages in thread From: Nikos Chantziaras @ 2011-06-16 16:22 UTC (permalink / raw To: gentoo-user On 06/16/2011 06:45 PM, Mark Knecht wrote: > Is there a simple explanation concerning the difference between the > two locales I have seen on Gentoo machines? > > 1) /etc/locale, as specified in the installation documents > > 2) /etc/env.d/02locale as has been discussed on the list recently There is no /etc/locale. I assume you mean /etc/locale.gen. That one only contains the locales for glibc. You should not specify env vars there. You only list raw locales. Mine for example has these contents: en_US ISO-8859-1 en_US.UTF-8 UTF-8 /etc/env.d/02locale is of a different format. It's executed as a script, so you set your locale-specific env vars there. You only need LANG actually, and possibly LC_COLLATE. The whole contents of mine: LANG="en_US.UTF-8" LC_COLLATE="C" ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Re: /etc/locale vs /etc/env.d/02locale? 2011-06-16 16:22 ` [gentoo-user] " Nikos Chantziaras @ 2011-06-16 16:45 ` Mark Knecht 2011-06-16 16:54 ` Nikos Chantziaras 0 siblings, 1 reply; 13+ messages in thread From: Mark Knecht @ 2011-06-16 16:45 UTC (permalink / raw To: gentoo-user On Thu, Jun 16, 2011 at 9:22 AM, Nikos Chantziaras <realnc@arcor.de> wrote: > On 06/16/2011 06:45 PM, Mark Knecht wrote: >> >> Is there a simple explanation concerning the difference between the >> two locales I have seen on Gentoo machines? >> >> 1) /etc/locale, as specified in the installation documents >> >> 2) /etc/env.d/02locale as has been discussed on the list recently > > There is no /etc/locale. I assume you mean /etc/locale.gen. I did. thanks. > That one only > contains the locales for glibc. You should not specify env vars there. You > only list raw locales. Mine for example has these contents: > > en_US ISO-8859-1 > en_US.UTF-8 UTF-8 > As does mine. > /etc/env.d/02locale is of a different format. It's executed as a script, so > you set your locale-specific env vars there. You only need LANG actually, > and possibly LC_COLLATE. The whole contents of mine: > > LANG="en_US.UTF-8" > LC_COLLATE="C" > I had the first line but not the second which I've added. I think the root of my question is really the (possibly) unfortunately use of the word 'locale' for the glibc stuff. I understand the concept of locales for the system and users, but why does glibc need locales which are possibly different from those in use on a system by users? I can make up reasons, like someone from Japan logs into my server to do work and needs something to use Japanese locales, but he could likely set those up in .bashrc or something. What is glibc doing with them? Thanks, Mark ^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-user] Re: /etc/locale vs /etc/env.d/02locale? 2011-06-16 16:45 ` Mark Knecht @ 2011-06-16 16:54 ` Nikos Chantziaras 0 siblings, 0 replies; 13+ messages in thread From: Nikos Chantziaras @ 2011-06-16 16:54 UTC (permalink / raw To: gentoo-user On 06/16/2011 07:45 PM, Mark Knecht wrote: > I think the root of my question is really the (possibly) unfortunately > use of the word 'locale' for the glibc stuff. locale.gen looks a bit cryptic, but the "gen" refers to generating locales. To have locales available for use, they need to be generated first. ^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <BANLkTikP=J_NeFs-LhYb3RPANhDr74+icg@mail.gmail.com>]
* Re: [gentoo-user] /etc/locale vs /etc/env.d/02locale? [not found] ` <BANLkTikP=J_NeFs-LhYb3RPANhDr74+icg@mail.gmail.com> @ 2011-06-16 16:23 ` Mark Knecht 2011-06-16 16:47 ` [gentoo-user] " Nikos Chantziaras ` (2 more replies) 0 siblings, 3 replies; 13+ messages in thread From: Mark Knecht @ 2011-06-16 16:23 UTC (permalink / raw To: gentoo-user On Thu, Jun 16, 2011 at 9:00 AM, Paul Hartman <paul.hartman+gentoo@gmail.com> wrote: > On Thu, Jun 16, 2011 at 10:45 AM, Mark Knecht <markknecht@gmail.com> wrote: >> Is there a simple explanation concerning the difference between the >> two locales I have seen on Gentoo machines? >> >> 1) /etc/locale, as specified in the installation documents >> >> 2) /etc/env.d/02locale as has been discussed on the list recently > > I'm not near a Gentoo machine right now, but off the top of my head IIRC: > > /etc/locale.gen contains a list of locales to be compiled when glibc > is emerged. These will be available to be used. > > /etc/env.d/02locale specifies which of those locales you actually want > to use for the system-wide default (the LC variables) Thanks for the response Paul. Does that mean that the /etc/locale.gen is used only by glibc and not really by the system? If so, what is glibc doing with these beyond letting me system run programs? If 02locale specifies what the system is using, then should it be 02locale that's in the install documents vs off in an optional Gentoo Localization guide? Note that the /etc/locale.gen stuff is marked optional in the guide so presumably it isn't actually needed. All I've determined about it is that it reduces the amount of time emerge spends buildingglibc/gcc. Thanks, Mark ^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-user] Re: /etc/locale vs /etc/env.d/02locale? 2011-06-16 16:23 ` [gentoo-user] " Mark Knecht @ 2011-06-16 16:47 ` Nikos Chantziaras 2011-06-16 16:56 ` [gentoo-user] " YoYo Siska [not found] ` <BANLkTimqq_f+69OMmDeZGwvBvX349xUCtg@mail.gmail.com> 2 siblings, 0 replies; 13+ messages in thread From: Nikos Chantziaras @ 2011-06-16 16:47 UTC (permalink / raw To: gentoo-user On 06/16/2011 07:23 PM, Mark Knecht wrote: > On Thu, Jun 16, 2011 at 9:00 AM, Paul Hartman > <paul.hartman+gentoo@gmail.com> wrote: >> On Thu, Jun 16, 2011 at 10:45 AM, Mark Knecht<markknecht@gmail.com> wrote: >>> Is there a simple explanation concerning the difference between the >>> two locales I have seen on Gentoo machines? >>> >>> 1) /etc/locale, as specified in the installation documents >>> >>> 2) /etc/env.d/02locale as has been discussed on the list recently >> >> I'm not near a Gentoo machine right now, but off the top of my head IIRC: >> >> /etc/locale.gen contains a list of locales to be compiled when glibc >> is emerged. These will be available to be used. >> >> /etc/env.d/02locale specifies which of those locales you actually want >> to use for the system-wide default (the LC variables) > > Thanks for the response Paul. > > Does that mean that the /etc/locale.gen is used only by glibc and not > really by the system? If so, what is glibc doing with these beyond > letting me system run programs? It allows you to have locales to use in /etc/env.d/02locale ;-) If you want to set LANG=en_US.UTF-8 in 02locale, you of course need the files for that specific locale/encoding. To get them, you need to write "en_US.UTF-8 UTF-8" in locale.gen. Not sure why you're not getting the comments in your locale.gen, but here there are, at the top of the file: # /etc/locale.gen: list all of the locales you want to have on your system # # The format of each line: # <locale> <charmap> # # Where <locale> is a locale located in /usr/share/i18n/locales/ and # where <charmap> is a charmap located in /usr/share/i18n/charmaps/. # # All blank lines and lines starting with # are ignored. # # For the default list of supported combinations, see the file: # /usr/share/i18n/SUPPORTED # # Whenever glibc is emerged, the locales listed here will be automatically # rebuilt for you. After updating this file, you can simply run `locale-gen` # yourself instead of re-emerging glibc. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] /etc/locale vs /etc/env.d/02locale? 2011-06-16 16:23 ` [gentoo-user] " Mark Knecht 2011-06-16 16:47 ` [gentoo-user] " Nikos Chantziaras @ 2011-06-16 16:56 ` YoYo Siska [not found] ` <BANLkTimqq_f+69OMmDeZGwvBvX349xUCtg@mail.gmail.com> 2 siblings, 0 replies; 13+ messages in thread From: YoYo Siska @ 2011-06-16 16:56 UTC (permalink / raw To: gentoo-user On Thu, Jun 16, 2011 at 09:23:16AM -0700, Mark Knecht wrote: > On Thu, Jun 16, 2011 at 9:00 AM, Paul Hartman > <paul.hartman+gentoo@gmail.com> wrote: > > On Thu, Jun 16, 2011 at 10:45 AM, Mark Knecht <markknecht@gmail.com> wrote: > >> Is there a simple explanation concerning the difference between the > >> two locales I have seen on Gentoo machines? > >> > >> 1) /etc/locale, as specified in the installation documents > >> > >> 2) /etc/env.d/02locale as has been discussed on the list recently > > > > I'm not near a Gentoo machine right now, but off the top of my head IIRC: > > > > /etc/locale.gen contains a list of locales to be compiled when glibc > > is emerged. These will be available to be used. > > > > /etc/env.d/02locale specifies which of those locales you actually want > > to use for the system-wide default (the LC variables) > > Thanks for the response Paul. > > Does that mean that the /etc/locale.gen is used only by glibc and not > really by the system? If so, what is glibc doing with these beyond > letting me system run programs? > > If 02locale specifies what the system is using, then should it be > 02locale that's in the install documents vs off in an optional Gentoo > Localization guide? > > Note that the /etc/locale.gen stuff is marked optional in the guide so > presumably it isn't actually needed. All I've determined about it is > that it reduces the amount of time emerge spends buildingglibc/gcc. locale.gen is in the install docs, because it allows you to choose which locales should be built, ie after emerging libc, which locales you can choose from... if you don't modify it, you get a lot of usual locales built... /etc/env.d/02locale is used to actually choose which one of the built ones will be used as the "default" locale for (almost) everything that runs... I gues it might deserve a mention in the install guide... though it actullly isn't any special file... the actuall locale is set by setting an enviroment variable (LANG or the specific LC_...), you could set it in your .bashrc / .bash_profile only for your user, or anywhere where it would apply to most programs, ie /etc/profile ... Gentoo has the mechanism, that anything that gets put into /etc/env.d is then (through env-update, which you have certainly run from time to time ;) merged together to /etc/profile.env, which is in turned sourced by /etc/profile (and posibly other things) so that it is just logical to put it there... but the actual name of the file doesn't really matter ;) yoyo ^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <BANLkTimqq_f+69OMmDeZGwvBvX349xUCtg@mail.gmail.com>]
* [gentoo-user] Re: /etc/locale vs /etc/env.d/02locale? [not found] ` <BANLkTimqq_f+69OMmDeZGwvBvX349xUCtg@mail.gmail.com> @ 2011-06-18 0:50 ` walt 2011-06-18 1:35 ` Nikos Chantziaras 2011-06-18 1:46 ` Peter Humphrey 0 siblings, 2 replies; 13+ messages in thread From: walt @ 2011-06-18 0:50 UTC (permalink / raw To: gentoo-user On 06/16/2011 12:00 PM, Paul Hartman wrote: > On my personal > system, I only install the US-English locales because I know I'm never > going to use any of the others. Me too -- or maybe I should say "moi aussi". I've tried to prevent the installation of many many unneeded megabytes of translation files in /usr/share/locale/* but I've never succeeded. ATM I have 101MB of *.mo translation files in /usr/share/locale even though I deleted all of them less than a month ago. I unset the 'nls' useflag in the hope it would solve the problem, but no joy. #env | grep L.NG LINGUAS= ALL_LINGUAS= LANG=en_US.UTF8 LANGUAGE=en_US.UTF8 #locale LANG=en_US.UTF8 LC_CTYPE="en_US.UTF8" LC_NUMERIC="en_US.UTF8" LC_TIME="en_US.UTF8" LC_COLLATE=C LC_MONETARY="en_US.UTF8" LC_MESSAGES="en_US.UTF8" LC_PAPER="en_US.UTF8" LC_NAME="en_US.UTF8" LC_ADDRESS="en_US.UTF8" LC_TELEPHONE="en_US.UTF8" LC_MEASUREMENT="en_US.UTF8" LC_IDENTIFICATION="en_US.UTF8" LC_ALL= Please apply cluestick with vigor... Thanks. ^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-user] Re: /etc/locale vs /etc/env.d/02locale? 2011-06-18 0:50 ` [gentoo-user] " walt @ 2011-06-18 1:35 ` Nikos Chantziaras 2011-06-18 1:46 ` Peter Humphrey 1 sibling, 0 replies; 13+ messages in thread From: Nikos Chantziaras @ 2011-06-18 1:35 UTC (permalink / raw To: gentoo-user On 06/18/2011 03:50 AM, walt wrote: > On 06/16/2011 12:00 PM, Paul Hartman wrote: >> On my personal >> system, I only install the US-English locales because I know I'm never >> going to use any of the others. > > Me too -- or maybe I should say "moi aussi". > > I've tried to prevent the installation of many many unneeded megabytes > of translation files in /usr/share/locale/* but I've never succeeded. > ATM I have 101MB of *.mo translation files in /usr/share/locale even > though I deleted all of them less than a month ago. > > I unset the 'nls' useflag in the hope it would solve the problem, but > no joy. Unfortunately, many ebuilds go ahead and install translation files anyway. Developers seem to ignore this if a package only installs one or two additional files. For example, see this patch I submitted once: http://bugs.gentoo.org/show_bug.cgi?id=275980 It's not the end of the world, but I guess what the devs are missing is that one file here, one there, it adds up in the end. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Re: /etc/locale vs /etc/env.d/02locale? 2011-06-18 0:50 ` [gentoo-user] " walt 2011-06-18 1:35 ` Nikos Chantziaras @ 2011-06-18 1:46 ` Peter Humphrey 2011-06-18 21:03 ` walt 2011-06-19 20:46 ` Walter Dnes 1 sibling, 2 replies; 13+ messages in thread From: Peter Humphrey @ 2011-06-18 1:46 UTC (permalink / raw To: gentoo-user On Saturday 18 June 2011 01:50:12 walt wrote: > I've tried to prevent the installation of many many unneeded megabytes > of translation files in /usr/share/locale/* but I've never succeeded. > ATM I have 101MB of *.mo translation files in /usr/share/locale even > though I deleted all of them less than a month ago. > > I unset the 'nls' useflag in the hope it would solve the problem, but > no joy. Have you tried localepurge? -- Rgds Peter ^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-user] Re: /etc/locale vs /etc/env.d/02locale? 2011-06-18 1:46 ` Peter Humphrey @ 2011-06-18 21:03 ` walt 2011-06-19 20:46 ` Walter Dnes 1 sibling, 0 replies; 13+ messages in thread From: walt @ 2011-06-18 21:03 UTC (permalink / raw To: gentoo-user On 06/17/2011 06:46 PM, Peter Humphrey wrote: > On Saturday 18 June 2011 01:50:12 walt wrote: > >> I've tried to prevent the installation of many many unneeded megabytes >> of translation files in /usr/share/locale/* but I've never succeeded. > Have you tried localepurge? I just did, and thanks for the hint :) ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Re: /etc/locale vs /etc/env.d/02locale? 2011-06-18 1:46 ` Peter Humphrey 2011-06-18 21:03 ` walt @ 2011-06-19 20:46 ` Walter Dnes 2011-06-19 21:47 ` Peter Humphrey 1 sibling, 1 reply; 13+ messages in thread From: Walter Dnes @ 2011-06-19 20:46 UTC (permalink / raw To: gentoo-user On Sat, Jun 18, 2011 at 02:46:45AM +0100, Peter Humphrey wrote > Have you tried localepurge? A couple of notes/questions... 1) localepurge deletes the contents of subfolders in /usr/share/locale but leaves the empty subfolders present. Is it OK to delete the empty subfolders? 2) I notice that localepurge did *NOT* delete the contents of LC_MESSAGES in the following subfolders... ast be@latin ca@valencia crh dz en@shaw io kg km lg mai mg my nds si sr@latin uz@cyrillic -- Walter Dnes <waltdnes@waltdnes.org> ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Re: /etc/locale vs /etc/env.d/02locale? 2011-06-19 20:46 ` Walter Dnes @ 2011-06-19 21:47 ` Peter Humphrey 0 siblings, 0 replies; 13+ messages in thread From: Peter Humphrey @ 2011-06-19 21:47 UTC (permalink / raw To: gentoo-user On Sunday 19 June 2011 21:46:05 Walter Dnes wrote: > 1) localepurge deletes the contents of subfolders in /usr/share/locale > but leaves the empty subfolders present. Is it OK to delete the empty > subfolders? I assume so, though I haven't bothered. Why not try it and see? > 2) I notice that localepurge did *NOT* delete the contents of > LC_MESSAGES in the following subfolders... > ast > be@latin > ca@valencia > crh > dz > en@shaw > io > kg > km > lg > mai > mg > my > nds > si > sr@latin > uz@cyrillic Those don't look like locale names to me: uz@cyrillic? What locale is that? Or en@shaw? Who is shaw? Those two at least don't exist on my system. -- Rgds Peter ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2011-06-19 22:11 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-06-16 15:45 [gentoo-user] /etc/locale vs /etc/env.d/02locale? Mark Knecht 2011-06-16 16:22 ` [gentoo-user] " Nikos Chantziaras 2011-06-16 16:45 ` Mark Knecht 2011-06-16 16:54 ` Nikos Chantziaras [not found] ` <BANLkTikP=J_NeFs-LhYb3RPANhDr74+icg@mail.gmail.com> 2011-06-16 16:23 ` [gentoo-user] " Mark Knecht 2011-06-16 16:47 ` [gentoo-user] " Nikos Chantziaras 2011-06-16 16:56 ` [gentoo-user] " YoYo Siska [not found] ` <BANLkTimqq_f+69OMmDeZGwvBvX349xUCtg@mail.gmail.com> 2011-06-18 0:50 ` [gentoo-user] " walt 2011-06-18 1:35 ` Nikos Chantziaras 2011-06-18 1:46 ` Peter Humphrey 2011-06-18 21:03 ` walt 2011-06-19 20:46 ` Walter Dnes 2011-06-19 21:47 ` Peter Humphrey
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox