Skip to content

Properly escape paths to executables. Fixes #18632. #18673

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 7, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 22 additions & 5 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,24 @@ putvar() {
printf "%-20s := %s\n" $1 "$T" >>config.tmp
}

putpathvar() {
local T
eval T=\$$1
eval TLEN=\${#$1}
if [ $TLEN -gt 35 ]
then
printf "configure: %-20s := %.35s ...\n" $1 "$T"
else
printf "configure: %-20s := %s %s\n" $1 "$T" "$2"
fi
if [ -z "$T" ]
then
printf "%-20s := \n" $1 >>config.tmp
else
printf "%-20s := \"%s\"\n" $1 "$T" >>config.tmp
fi
}

probe() {
local V=$1
shift
Expand All @@ -101,7 +119,7 @@ probe() {
fi
done
eval $V=\$T
putvar $V "$VER"
putpathvar $V "$VER"
}

probe_need() {
Expand Down Expand Up @@ -638,9 +656,9 @@ probe CFG_ADB adb

if [ ! -z "$CFG_PANDOC" ]
then
PV_MAJOR_MINOR=$(pandoc --version | grep '^pandoc ' |
PV_MAJOR_MINOR=$(pandoc --version | grep '^pandoc\(.exe\)\? ' |
# extract the first 2 version fields, ignore everything else
sed 's/pandoc \([0-9]*\)\.\([0-9]*\).*/\1 \2/')
sed 's/pandoc\(.exe\)\? \([0-9]*\)\.\([0-9]*\).*/\2 \3/')

MIN_PV_MAJOR="1"
MIN_PV_MINOR="9"
Expand Down Expand Up @@ -1330,8 +1348,7 @@ do
done

# Munge any paths that appear in config.mk back to posix-y
perl -i.bak -p -e 's@ ([a-zA-Z]):[/\\]@ /\1/@go;' \
-e 's@\\@/@go;' config.tmp
perl -i.bak -p -e 's@ ([a-zA-Z]):[/\\]@ /\1/@go;' config.tmp
rm -f config.tmp.bak

msg
Expand Down
2 changes: 1 addition & 1 deletion mk/reconfig.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ifndef CFG_DISABLE_MANAGE_SUBMODULES
# (nothing checked out at all). `./configure --{llvm,jemalloc}-root`
# will explicitly deinitialize the corresponding submodules, and we don't
# want to force constant rebuilds in that case.
NEED_GIT_RECONFIG=$(shell cd "$(CFG_SRC_DIR)" && "$(CFG_GIT)" submodule status | grep -c '^+')
NEED_GIT_RECONFIG=$(shell cd "$(CFG_SRC_DIR)" && $(CFG_GIT) submodule status | grep -c '^+')
else
NEED_GIT_RECONFIG=0
endif
Expand Down