From fd725a0bb1557c32b7f918ff7098eaa3bf769cfd Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 23 May 2018 22:15:25 -0400 Subject: [PATCH] NF: a standalone-no-LOCPATH patch for the Debian standalone build --- debian/patches/series.standalone-build | 1 + debian/patches/standalone-no-LOCPATH | 53 ++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 debian/patches/standalone-no-LOCPATH diff --git a/debian/patches/series.standalone-build b/debian/patches/series.standalone-build index 9dc994164d..d70ec8b86a 100644 --- a/debian/patches/series.standalone-build +++ b/debian/patches/series.standalone-build @@ -1 +1,2 @@ standalone-build +standalone-no-LOCPATH diff --git a/debian/patches/standalone-no-LOCPATH b/debian/patches/standalone-no-LOCPATH new file mode 100644 index 0000000000..fde005d3aa --- /dev/null +++ b/debian/patches/standalone-no-LOCPATH @@ -0,0 +1,53 @@ +From 71cbc1012941495ec20a7cb11dad3da638aae2cf Mon Sep 17 00:00:00 2001 +From: Yaroslav Halchenko +Date: Tue, 22 May 2018 22:57:26 -0400 +Subject: BF: do not bother changing/setting LOCPATH + +Some of the initial reasoning and discussion is at + + https://github.com/datalad/datalad/pull/1921 + +but overall summary is that a typical standalone build relies on +user having RW permissions into its installation so locales are +generated upon initial use. For NeuroDebian standalone: + - built/installed by root + - locales are likely to be installed and be compatible +thus patching of LOCPATH seems to resolve some issues, primarily +with custom remotes which are ran by annex, thus provided with +LOCPATH + +--- + standalone/linux/skel/runshell | 10 ++-------- + 1 file changed, 2 insertions(+), 8 deletions(-) + +--- a/standalone/linux/skel/runshell ++++ b/standalone/linux/skel/runshell +@@ -118,12 +118,6 @@ export ORIG_MANPATH + MANPATH="$base/usr/share/man:$MANPATH" + export MANPATH + +-# Avoid using system locales, which may interact badly with bundled libc. +-ORIG_LOCPATH="$LOCPATH" +-export ORIG_LOCPATH +-LOCPATH="$base/locales" +-export LOCPATH +- + # LD_PRELOAD may interact badly with the bundled libc and other libraries, + # which may have a different subarchitecture than the preloaded library. + unset LD_PRELOAD +@@ -180,13 +174,13 @@ case "$os" in + GIT_ANNEX_TMP_DIR="$TMPDIR" + export GIT_ANNEX_TMP_DIR + +- GIT_ANNEX_STANDLONE_ENV="PATH GCONV_PATH MANPATH LOCPATH" ++ GIT_ANNEX_STANDLONE_ENV="PATH GCONV_PATH MANPATH" + export GIT_ANNEX_STANDLONE_ENV + ;; + *) + # Indicate which variables were exported above and should be cleaned + # when running non-bundled programs. +- GIT_ANNEX_STANDLONE_ENV="PATH GCONV_PATH GIT_EXEC_PATH GIT_TEMPLATE_DIR MANPATH LOCPATH" ++ GIT_ANNEX_STANDLONE_ENV="PATH GCONV_PATH GIT_EXEC_PATH GIT_TEMPLATE_DIR MANPATH" + export GIT_ANNEX_STANDLONE_ENV + ;; + esac