aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-10-01 21:32:50 +0200
committerLudovic Courtès <ludo@gnu.org>2015-10-05 22:34:50 +0200
commit85e5721421b7e8ee1cf6b76d34e892034e3c4f51 (patch)
treeb09628a5a5c3c7fedd84b4a0b7562d8f29e76dce /doc
parentf211b2af676751b66d1443e5371b92c9a98c8a0c (diff)
downloadpatches-85e5721421b7e8ee1cf6b76d34e892034e3c4f51.tar
patches-85e5721421b7e8ee1cf6b76d34e892034e3c4f51.tar.gz
gnu: glibc: Look for locale data in versioned sub-directories.
Suggested by Mark H Weaver <mhw@netris.org>. * gnu/packages/patches/glibc-versioned-locpath.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. * gnu/packages/base.scm (glibc)[source]: Use it. [arguments]: Add explicit version sub-directory to libc_cv_localedir. [native-search-paths]: Use 'GUIX_LOCPATH' instead of 'LOCPATH'. (glibc-locales, glibc-utf8-locales): Write to a VERSION sub-directory.
Diffstat (limited to 'doc')
-rw-r--r--doc/guix.texi36
1 files changed, 29 insertions, 7 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 68ee451efc..4ee4fe1ffe 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -933,24 +933,24 @@ daemons on the same machine.
@node Application Setup
@section Application Setup
-When using Guix on top of GNU/Linux distribution other than GuixSD, a
-few additional steps are needed to get everything in place. Here are
-some of them.
+When using Guix on top of GNU/Linux distribution other than GuixSD---a
+so-called @dfn{foreign distro}---a few additional steps are needed to
+get everything in place. Here are some of them.
@subsection Locales
@anchor{locales-and-locpath}
@cindex locales, when not on GuixSD
@vindex LOCPATH
+@vindex GUIX_LOCPATH
Packages installed @i{via} Guix will not use the host system's locale
data. Instead, you must first install one of the locale packages
-available with Guix and then define the @code{LOCPATH} environment
-variable (@pxref{Locale Names, @code{LOCPATH},, libc, The GNU C Library
-Reference Manual}):
+available with Guix and then define the @code{GUIX_LOCPATH} environment
+variable:
@example
$ guix package -i glibc-locales
-$ export LOCPATH=$HOME/.guix-profile/lib/locale
+$ export GUIX_LOCPATH=$HOME/.guix-profile/lib/locale
@end example
Note that the @code{glibc-locales} package contains data for all the
@@ -958,6 +958,28 @@ locales supported by the GNU@tie{}libc and weighs in at around
110@tie{}MiB. Alternately, the @code{glibc-utf8-locales} is smaller but
limited to a few UTF-8 locales.
+The @code{GUIX_LOCPATH} variable plays a role similar to @code{LOCPATH}
+(@pxref{Locale Names, @code{LOCPATH},, libc, The GNU C Library Reference
+Manual}). There are two important differences though:
+
+@enumerate
+@item
+@code{GUIX_LOCPATH} is honored only by Guix's libc, and not by the libc
+provided by foreign distros. Thus, using @code{GUIX_LOCPATH} allows you
+to make sure the the foreign distro's programs will not end up loading
+incompatible locale data.
+
+@item
+libc suffixes each entry of @code{GUIX_LOCPATH} with @code{/X.Y}, where
+@code{X.Y} is the libc version---e.g., @code{2.22}. This means that,
+should your Guix profile contain a mixture of programs linked against
+different libc version, each libc version will only try to load locale
+data in the right format.
+@end enumerate
+
+This is important because the locale data format used by different libc
+versions may be incompatible.
+
@subsection X11 Fonts
The majority of graphical applications use Fontconfig to locate and