Unset IFS in shell scripts in the linux standalone build and OSX app.
This commit is contained in:
parent
2e241f92c7
commit
24125e8dc4
18 changed files with 43 additions and 0 deletions
|
@ -11,6 +11,7 @@ git-annex (8.20200720.2) UNRELEASED; urgency=medium
|
||||||
* move, copy --to: Sped up seeking files by 2x.
|
* move, copy --to: Sped up seeking files by 2x.
|
||||||
* drop: Sped up seeking files to drop by 2x, and also some performance
|
* drop: Sped up seeking files to drop by 2x, and also some performance
|
||||||
improvements to checking numcopies.
|
improvements to checking numcopies.
|
||||||
|
* Unset IFS in shell scripts in the linux standalone build and OSX app.
|
||||||
|
|
||||||
-- Joey Hess <id@joeyh.name> Tue, 21 Jul 2020 12:58:30 -0400
|
-- Joey Hess <id@joeyh.name> Tue, 21 Jul 2020 12:58:30 -0400
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
[[!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.
|
||||||
|
"""]]
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
unset IFS
|
||||||
link="$(readlink -f "$0" 2>/dev/null || readlink "$0")" || true
|
link="$(readlink -f "$0" 2>/dev/null || readlink "$0")" || true
|
||||||
if [ -n "$link" ]; then
|
if [ -n "$link" ]; then
|
||||||
base="$(dirname "$link")"
|
base="$(dirname "$link")"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
unset IFS
|
||||||
link="$(readlink -f "$0" 2>/dev/null || readlink "$0")" || true
|
link="$(readlink -f "$0" 2>/dev/null || readlink "$0")" || true
|
||||||
if [ -n "$link" ]; then
|
if [ -n "$link" ]; then
|
||||||
base="$(dirname "$link")"
|
base="$(dirname "$link")"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
unset IFS
|
||||||
link="$(readlink -f "$0" 2>/dev/null || readlink "$0")" || true
|
link="$(readlink -f "$0" 2>/dev/null || readlink "$0")" || true
|
||||||
if [ -n "$link" ]; then
|
if [ -n "$link" ]; then
|
||||||
base="$(dirname "$link")"
|
base="$(dirname "$link")"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
unset IFS
|
||||||
link="$(readlink -f "$0" 2>/dev/null || readlink "$0")" || true
|
link="$(readlink -f "$0" 2>/dev/null || readlink "$0")" || true
|
||||||
if [ -n "$link" ]; then
|
if [ -n "$link" ]; then
|
||||||
base="$(dirname "$link")"
|
base="$(dirname "$link")"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
unset IFS
|
||||||
link="$(readlink -f "$0" 2>/dev/null || readlink "$0")" || true
|
link="$(readlink -f "$0" 2>/dev/null || readlink "$0")" || true
|
||||||
if [ -n "$link" ]; then
|
if [ -n "$link" ]; then
|
||||||
base="$(dirname "$link")"
|
base="$(dirname "$link")"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
unset IFS
|
||||||
link="$(readlink -f "$0" 2>/dev/null || readlink "$0")" || true
|
link="$(readlink -f "$0" 2>/dev/null || readlink "$0")" || true
|
||||||
if [ -n "$link" ]; then
|
if [ -n "$link" ]; then
|
||||||
base="$(dirname "$link")"
|
base="$(dirname "$link")"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
unset IFS
|
||||||
link="$(readlink -f "$0" 2>/dev/null || readlink "$0")" || true
|
link="$(readlink -f "$0" 2>/dev/null || readlink "$0")" || true
|
||||||
if [ -n "$link" ]; then
|
if [ -n "$link" ]; then
|
||||||
base="$(dirname "$link")"
|
base="$(dirname "$link")"
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
# libraries bundled with this app.
|
# libraries bundled with this app.
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
unset IFS
|
||||||
|
|
||||||
os="$(uname -o 2>/dev/null || true)"
|
os="$(uname -o 2>/dev/null || true)"
|
||||||
base="$(dirname "$0")"
|
base="$(dirname "$0")"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
unset IFS
|
||||||
link="$(readlink "$0")" || true
|
link="$(readlink "$0")" || true
|
||||||
if [ -n "$link" ]; then
|
if [ -n "$link" ]; then
|
||||||
base="$(dirname "$link")"
|
base="$(dirname "$link")"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
unset IFS
|
||||||
link="$(readlink "$0")" || true
|
link="$(readlink "$0")" || true
|
||||||
if [ -n "$link" ]; then
|
if [ -n "$link" ]; then
|
||||||
base="$(dirname "$link")"
|
base="$(dirname "$link")"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
unset IFS
|
||||||
link="$(readlink "$0")" || true
|
link="$(readlink "$0")" || true
|
||||||
if [ -n "$link" ]; then
|
if [ -n "$link" ]; then
|
||||||
base="$(dirname "$link")"
|
base="$(dirname "$link")"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
unset IFS
|
||||||
link="$(readlink "$0")" || true
|
link="$(readlink "$0")" || true
|
||||||
if [ -n "$link" ]; then
|
if [ -n "$link" ]; then
|
||||||
base="$(dirname "$link")"
|
base="$(dirname "$link")"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
unset IFS
|
||||||
link="$(readlink "$0")" || true
|
link="$(readlink "$0")" || true
|
||||||
if [ -n "$link" ]; then
|
if [ -n "$link" ]; then
|
||||||
base="$(dirname "$link")"
|
base="$(dirname "$link")"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
unset IFS
|
||||||
link="$(readlink "$0")" || true
|
link="$(readlink "$0")" || true
|
||||||
if [ -n "$link" ]; then
|
if [ -n "$link" ]; then
|
||||||
base="$(dirname "$link")"
|
base="$(dirname "$link")"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
unset IFS
|
||||||
link="$(readlink "$0")" || true
|
link="$(readlink "$0")" || true
|
||||||
if [ -n "$link" ]; then
|
if [ -n "$link" ]; then
|
||||||
base="$(dirname "$link")"
|
base="$(dirname "$link")"
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
# bundled with this app.
|
# bundled with this app.
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
unset IFS
|
||||||
|
|
||||||
base="$(dirname "$0")"
|
base="$(dirname "$0")"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue