From 79187a6eafae57eda090b58c074801a09d457d0f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 24 Jul 2020 14:33:13 -0400 Subject: [PATCH] Revert "Unset IFS in shell scripts in the linux standalone build and OSX app." This reverts commit 24125e8dc40ce68091e33473d39c6968d2de6365. yoh has a better patch I see --- CHANGELOG | 1 - ..._7836dffec8167c51c91b96fba90bde27._comment | 26 ------------------- standalone/linux/skel/git | 1 - standalone/linux/skel/git-annex | 1 - standalone/linux/skel/git-annex-shell | 1 - standalone/linux/skel/git-annex-webapp | 1 - standalone/linux/skel/git-receive-pack | 1 - standalone/linux/skel/git-shell | 1 - standalone/linux/skel/git-upload-pack | 1 - standalone/linux/skel/runshell | 1 - .../osx/git-annex.app/Contents/MacOS/git | 1 - .../git-annex.app/Contents/MacOS/git-annex | 1 - .../Contents/MacOS/git-annex-shell | 1 - .../Contents/MacOS/git-annex-webapp | 1 - .../Contents/MacOS/git-receive-pack | 1 - .../git-annex.app/Contents/MacOS/git-shell | 1 - .../Contents/MacOS/git-upload-pack | 1 - .../osx/git-annex.app/Contents/MacOS/runshell | 1 - 18 files changed, 43 deletions(-) delete mode 100644 doc/bugs/standalone_shim_is_segfaulting_if_IFS__61____36____39____92__013__39__/comment_2_7836dffec8167c51c91b96fba90bde27._comment diff --git a/CHANGELOG b/CHANGELOG index e56fac6c2a..4b1665c6ee 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -11,7 +11,6 @@ git-annex (8.20200720.2) UNRELEASED; urgency=medium * move, copy --to: Sped up seeking files by 2x. * drop: Sped up seeking files to drop by 2x, and also some performance improvements to checking numcopies. - * Unset IFS in shell scripts in the linux standalone build and OSX app. -- Joey Hess Tue, 21 Jul 2020 12:58:30 -0400 diff --git a/doc/bugs/standalone_shim_is_segfaulting_if_IFS__61____36____39____92__013__39__/comment_2_7836dffec8167c51c91b96fba90bde27._comment b/doc/bugs/standalone_shim_is_segfaulting_if_IFS__61____36____39____92__013__39__/comment_2_7836dffec8167c51c91b96fba90bde27._comment deleted file mode 100644 index fc550f3f44..0000000000 --- a/doc/bugs/standalone_shim_is_segfaulting_if_IFS__61____36____39____92__013__39__/comment_2_7836dffec8167c51c91b96fba90bde27._comment +++ /dev/null @@ -1,26 +0,0 @@ -[[!comment format=mdwn - username="joey" - subject="""comment 2""" - date="2020-07-24T18:17:12Z" - content=""" -Hmm, so runshell has some things like - - for lib in $(cat "$base/libdirs"); do - GIT_ANNEX_LD_LIBRARY_PATH=... - -Which, with an unusual IFS, probably set the environment variable to -something bogus. Which seems the kind of thing that could break things -badly enough to segfault. - -I have so far not been able to reproduce it, I tried: - - tar zxvf ~/src/git-annex/tmp/git-annex-standalone-amd64.tar.gz - cd git-annex.linux/ - IFS=$'\013' ./git-annex version - -But this may involve the system the standalone build is used in, if the -problem is this is breaking its isolation from that system. So might need a -particular version skew between the two. - -I've applied the obvious changes, so please verify the fix. -"""]] diff --git a/standalone/linux/skel/git b/standalone/linux/skel/git index b2b09d9c98..8a6860f43a 100755 --- a/standalone/linux/skel/git +++ b/standalone/linux/skel/git @@ -1,5 +1,4 @@ #!/bin/sh -unset IFS link="$(readlink -f "$0" 2>/dev/null || readlink "$0")" || true if [ -n "$link" ]; then base="$(dirname "$link")" diff --git a/standalone/linux/skel/git-annex b/standalone/linux/skel/git-annex index 668eb8ad27..ec9739a8bc 100755 --- a/standalone/linux/skel/git-annex +++ b/standalone/linux/skel/git-annex @@ -1,5 +1,4 @@ #!/bin/sh -unset IFS link="$(readlink -f "$0" 2>/dev/null || readlink "$0")" || true if [ -n "$link" ]; then base="$(dirname "$link")" diff --git a/standalone/linux/skel/git-annex-shell b/standalone/linux/skel/git-annex-shell index 9414b20919..d663384915 100755 --- a/standalone/linux/skel/git-annex-shell +++ b/standalone/linux/skel/git-annex-shell @@ -1,5 +1,4 @@ #!/bin/sh -unset IFS link="$(readlink -f "$0" 2>/dev/null || readlink "$0")" || true if [ -n "$link" ]; then base="$(dirname "$link")" diff --git a/standalone/linux/skel/git-annex-webapp b/standalone/linux/skel/git-annex-webapp index 710f49634a..914c5923c1 100755 --- a/standalone/linux/skel/git-annex-webapp +++ b/standalone/linux/skel/git-annex-webapp @@ -1,5 +1,4 @@ #!/bin/sh -unset IFS link="$(readlink -f "$0" 2>/dev/null || readlink "$0")" || true if [ -n "$link" ]; then base="$(dirname "$link")" diff --git a/standalone/linux/skel/git-receive-pack b/standalone/linux/skel/git-receive-pack index 01d1f5925e..f4f9f262aa 100755 --- a/standalone/linux/skel/git-receive-pack +++ b/standalone/linux/skel/git-receive-pack @@ -1,5 +1,4 @@ #!/bin/sh -unset IFS link="$(readlink -f "$0" 2>/dev/null || readlink "$0")" || true if [ -n "$link" ]; then base="$(dirname "$link")" diff --git a/standalone/linux/skel/git-shell b/standalone/linux/skel/git-shell index 4947e47ed4..0fc5cd7bdf 100755 --- a/standalone/linux/skel/git-shell +++ b/standalone/linux/skel/git-shell @@ -1,5 +1,4 @@ #!/bin/sh -unset IFS link="$(readlink -f "$0" 2>/dev/null || readlink "$0")" || true if [ -n "$link" ]; then base="$(dirname "$link")" diff --git a/standalone/linux/skel/git-upload-pack b/standalone/linux/skel/git-upload-pack index 11dc9a98df..312996cec5 100755 --- a/standalone/linux/skel/git-upload-pack +++ b/standalone/linux/skel/git-upload-pack @@ -1,5 +1,4 @@ #!/bin/sh -unset IFS link="$(readlink -f "$0" 2>/dev/null || readlink "$0")" || true if [ -n "$link" ]; then base="$(dirname "$link")" diff --git a/standalone/linux/skel/runshell b/standalone/linux/skel/runshell index ec44d33647..d442627594 100755 --- a/standalone/linux/skel/runshell +++ b/standalone/linux/skel/runshell @@ -3,7 +3,6 @@ # libraries bundled with this app. set -e -unset IFS os="$(uname -o 2>/dev/null || true)" base="$(dirname "$0")" diff --git a/standalone/osx/git-annex.app/Contents/MacOS/git b/standalone/osx/git-annex.app/Contents/MacOS/git index 69ff306a94..ccf2cd7411 100755 --- a/standalone/osx/git-annex.app/Contents/MacOS/git +++ b/standalone/osx/git-annex.app/Contents/MacOS/git @@ -1,5 +1,4 @@ #!/bin/sh -unset IFS link="$(readlink "$0")" || true if [ -n "$link" ]; then base="$(dirname "$link")" diff --git a/standalone/osx/git-annex.app/Contents/MacOS/git-annex b/standalone/osx/git-annex.app/Contents/MacOS/git-annex index 761630c08b..bb82a2bd9f 100755 --- a/standalone/osx/git-annex.app/Contents/MacOS/git-annex +++ b/standalone/osx/git-annex.app/Contents/MacOS/git-annex @@ -1,5 +1,4 @@ #!/bin/sh -unset IFS link="$(readlink "$0")" || true if [ -n "$link" ]; then base="$(dirname "$link")" diff --git a/standalone/osx/git-annex.app/Contents/MacOS/git-annex-shell b/standalone/osx/git-annex.app/Contents/MacOS/git-annex-shell index 6fa8a649ab..29ebc25887 100755 --- a/standalone/osx/git-annex.app/Contents/MacOS/git-annex-shell +++ b/standalone/osx/git-annex.app/Contents/MacOS/git-annex-shell @@ -1,5 +1,4 @@ #!/bin/sh -unset IFS link="$(readlink "$0")" || true if [ -n "$link" ]; then base="$(dirname "$link")" diff --git a/standalone/osx/git-annex.app/Contents/MacOS/git-annex-webapp b/standalone/osx/git-annex.app/Contents/MacOS/git-annex-webapp index 55d56ce688..7ff18bada3 100755 --- a/standalone/osx/git-annex.app/Contents/MacOS/git-annex-webapp +++ b/standalone/osx/git-annex.app/Contents/MacOS/git-annex-webapp @@ -1,5 +1,4 @@ #!/bin/sh -unset IFS link="$(readlink "$0")" || true if [ -n "$link" ]; then base="$(dirname "$link")" diff --git a/standalone/osx/git-annex.app/Contents/MacOS/git-receive-pack b/standalone/osx/git-annex.app/Contents/MacOS/git-receive-pack index e3099f0f24..efbbf2bb30 100755 --- a/standalone/osx/git-annex.app/Contents/MacOS/git-receive-pack +++ b/standalone/osx/git-annex.app/Contents/MacOS/git-receive-pack @@ -1,5 +1,4 @@ #!/bin/sh -unset IFS link="$(readlink "$0")" || true if [ -n "$link" ]; then base="$(dirname "$link")" diff --git a/standalone/osx/git-annex.app/Contents/MacOS/git-shell b/standalone/osx/git-annex.app/Contents/MacOS/git-shell index a9317e3649..7a74904f28 100755 --- a/standalone/osx/git-annex.app/Contents/MacOS/git-shell +++ b/standalone/osx/git-annex.app/Contents/MacOS/git-shell @@ -1,5 +1,4 @@ #!/bin/sh -unset IFS link="$(readlink "$0")" || true if [ -n "$link" ]; then base="$(dirname "$link")" diff --git a/standalone/osx/git-annex.app/Contents/MacOS/git-upload-pack b/standalone/osx/git-annex.app/Contents/MacOS/git-upload-pack index 66ed2dc639..5049371c9e 100755 --- a/standalone/osx/git-annex.app/Contents/MacOS/git-upload-pack +++ b/standalone/osx/git-annex.app/Contents/MacOS/git-upload-pack @@ -1,5 +1,4 @@ #!/bin/sh -unset IFS link="$(readlink "$0")" || true if [ -n "$link" ]; then base="$(dirname "$link")" diff --git a/standalone/osx/git-annex.app/Contents/MacOS/runshell b/standalone/osx/git-annex.app/Contents/MacOS/runshell index f02a02e6b6..557c59e224 100755 --- a/standalone/osx/git-annex.app/Contents/MacOS/runshell +++ b/standalone/osx/git-annex.app/Contents/MacOS/runshell @@ -3,7 +3,6 @@ # bundled with this app. set -e -unset IFS base="$(dirname "$0")"