Linux standalone: Add back the LOCPATH=/dev/null hack to avoid the system locale-archive being read.

Version mismatches between the system locale-archive and the glibc in the
bundle have been observed to cause git crashes.

Unfortunately, this causes locales to not be used in the linux standalone
bundle, as was the case until version 6.20160419.

glibc hardcodes the path to /usr/lib/locale/locale-archive and does not
let an environment variable cause a different locale-archive file to be used.

The only other option to include locales in the bundle would be to include
exploded locale definition directories in the bundle for a number of
locales, generated by localedef. But these take at least 300 kb per locale,
and there are a great many locales; it would be hundreds of megabytes to
include them all.

(Hmm, we could include localdef in the bundle, and check LANG in runshell
and compile the locale directories on the fly. This would need
/usr/share/i18n/ and /usr/lib/locale-archive to be included in the bundle.
It's.. doable.)

I know this is going to once again cause users of the bundle to complain
that eg, ls doesn't show their unicode filenames right. Better than strange
crashes though.
This commit is contained in:
Joey Hess 2016-10-04 12:52:36 -04:00
parent 9c35905bbe
commit c079811226
No known key found for this signature in database
GPG key ID: C910D9222512E3C7
4 changed files with 27 additions and 14 deletions

View file

@ -0,0 +1,14 @@
[[!comment format=mdwn
username="joey"
subject="""comment 4"""
date="2016-10-04T16:23:12Z"
content="""
NFS was a red herring.
We've tracked this down to the linux standalone tarball not including
locale-archive, so it uses the system one, which may have a different
format and so breaks glibc.
I'm committing a fix that adds locale-archive to the linux standalone
tarball.
"""]]