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:
parent
9c35905bbe
commit
c079811226
4 changed files with 27 additions and 14 deletions
|
@ -5,8 +5,6 @@
|
|||
- Licensed under the GNU GPL version 3 or higher.
|
||||
-}
|
||||
|
||||
{-# LANGUAGE CPP #-}
|
||||
|
||||
module Main where
|
||||
|
||||
import System.Environment
|
||||
|
@ -48,6 +46,8 @@ mklibs top = do
|
|||
writeFile (top </> "libdirs") (unlines libdirs)
|
||||
writeFile (top </> "gconvdir")
|
||||
(parentDir $ Prelude.head $ filter ("/gconv/" `isInfixOf`) glibclibs)
|
||||
writeFile (top </> "localedir")
|
||||
(parentDir $ Prelude.head $ filter ("/locale/" `isInfixOf`) glibclibs)
|
||||
|
||||
let linker = Prelude.head $ filter ("ld-linux" `isInfixOf`) libs'
|
||||
mapM_ (installLinkerShim top linker) exes
|
||||
|
@ -73,18 +73,6 @@ installLinkerShim top linker exe = do
|
|||
[ "#!/bin/sh"
|
||||
, "GIT_ANNEX_PROGRAMPATH=\"$0\""
|
||||
, "export GIT_ANNEX_PROGRAMPATH"
|
||||
#ifdef MIN_VERSION_GLASGOW_HASKELL
|
||||
#if ! MIN_VERSION_GLASGOW_HASKELL(7,10,0,0)
|
||||
#define NEED_LOCPATH_WORKAROUND
|
||||
#endif
|
||||
#else
|
||||
#define NEED_LOCPATH_WORKAROUND
|
||||
#endif
|
||||
#ifdef NEED_LOCPATH_WORKAROUND
|
||||
-- workaround for https://ghc.haskell.org/trac/ghc/ticket/7695
|
||||
, "LOCPATH=/dev/null"
|
||||
, "export LOCPATH"
|
||||
#endif
|
||||
, "exec \"$GIT_ANNEX_DIR/" ++ exelink ++ "\" --library-path \"$GIT_ANNEX_LD_LIBRARY_PATH\" \"$GIT_ANNEX_DIR/shimmed/" ++ base ++ "/" ++ base ++ "\" \"$@\""
|
||||
]
|
||||
modifyFileMode exe $ addModes executeModes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue