From a97ef366fa30bc19b6f0257a581ca9dbbb897bca Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 10 Oct 2018 16:02:25 -0400 Subject: [PATCH] Linux standalone: Avoid using bundled cp before envionment is fully set up. On android arm64, I saw the cp fail with "Bad system call", because proot has not run yet. runshell only recently started using cp, and it's bundled with git-annex, so this fixes a reversion. This commit was sponsored by Nick Piper on Patreon. --- CHANGELOG | 2 ++ standalone/linux/skel/runshell | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index bba8caa8f0..78a011ac3b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -15,6 +15,8 @@ git-annex (6.20180927) UNRELEASED; urgency=medium * Fix potential crash in exporttree database due to failure to honor uniqueness constraint. * Fix crash when exporttree is set to a bad value. + * Linux standalone: Avoid using bundled cp before envionment is fully set + up. -- Joey Hess Thu, 27 Sep 2018 15:27:20 -0400 diff --git a/standalone/linux/skel/runshell b/standalone/linux/skel/runshell index da0cd550ff..3a4229997a 100755 --- a/standalone/linux/skel/runshell +++ b/standalone/linux/skel/runshell @@ -147,7 +147,9 @@ if [ -z "${LOCPATH+set}" ]; then exit 1 fi echo "$base" > "$LOCPATH/base" - cp "$base/buildid" "$LOCPATH/buildid" + # Not using cp to avoid using the one bundled with git-annex before + # the environment is set up to run it. + cat < "$base/buildid" > "$LOCPATH/buildid" # Generate locale definition files for the locales in use, # using the localedef and locale files from the bundle.