aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-10-04 12:52:36 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-10-04 12:53:09 -0400
commit0a03ba76be8a59a6869dc4cd573c0760fa765a10 (patch)
treebd6ca4e99629d339fce86e07c6c27a819194ad84
parent5d91a09bb3b61e0cff3dca1f0f9168803c01ea76 (diff)
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.
-rw-r--r--Build/LinuxMkLibs.hs16
-rw-r--r--CHANGELOG6
-rw-r--r--doc/forum/git-annex_add_out_of_memory_error/comment_4_ef913a45e3d865d088cf11460cd88020._comment14
-rwxr-xr-xstandalone/linux/skel/runshell5
4 files changed, 27 insertions, 14 deletions
diff --git a/Build/LinuxMkLibs.hs b/Build/LinuxMkLibs.hs
index 3bc79fed4..780cdea25 100644
--- a/Build/LinuxMkLibs.hs
+++ b/Build/LinuxMkLibs.hs
@@ -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
diff --git a/CHANGELOG b/CHANGELOG
index 6f2627c98..edc018b06 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -14,6 +14,12 @@ git-annex (6.20160924) UNRELEASED; urgency=medium
external special remotes, because running multiple git-annex commands
at the same time could already start multiple processes for the same
external special remotes.
+ * 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, reverting back to pre-6.20160419
+ behavior.
-- Joey Hess <id@joeyh.name> Mon, 26 Sep 2016 16:46:19 -0400
diff --git a/doc/forum/git-annex_add_out_of_memory_error/comment_4_ef913a45e3d865d088cf11460cd88020._comment b/doc/forum/git-annex_add_out_of_memory_error/comment_4_ef913a45e3d865d088cf11460cd88020._comment
new file mode 100644
index 000000000..e9b52c3c2
--- /dev/null
+++ b/doc/forum/git-annex_add_out_of_memory_error/comment_4_ef913a45e3d865d088cf11460cd88020._comment
@@ -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.
+"""]]
diff --git a/standalone/linux/skel/runshell b/standalone/linux/skel/runshell
index 874dc75f1..d15aacbc8 100755
--- a/standalone/linux/skel/runshell
+++ b/standalone/linux/skel/runshell
@@ -100,6 +100,11 @@ export ORIG_GCONV_PATH
GCONV_PATH="$base/$(cat "$base/gconvdir")"
export GCONV_PATH
+ORIG_LOCPATH="$LOCPATH"
+export ORIG_LOCPATH
+LOCPATH=/dev/null
+export LOCPATH
+
ORIG_GIT_EXEC_PATH="$GIT_EXEC_PATH"
export ORIG_GIT_EXEC_PATH
GIT_EXEC_PATH="$base/git-core"