vm_setup: Add arg for disabling use of tsocks
This mainly concerns QEMU compilation. For system which have installed tsocks, vm_setup.sh always tries to pass --with-git to QEMU's configure even when tsocks is not really used (it determines that based on $CONF which by default has tsocks enabled and presence of the tsocks binary). Since in that scenario qemu compilation would simply fail, allow user to force vm_setup.sh into simply ignoring tsocks alltogether. This is an alternative for a change which potentially could break the compatibility by removing tsocks from default $CONF list (I guess there may be some systems out there that relay on tsocks and its default setup in the $CONF). Change-Id: Id3583357878002c79e1a554df664c297a0e39cb3 Signed-off-by: Michal Berger <michalx.berger@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2787 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Karol Latecki <karol.latecki@intel.com>
This commit is contained in:
parent
a66c52fd5c
commit
4892b9353d
@ -176,7 +176,7 @@ function install_qemu() {
|
|||||||
|
|
||||||
# Most tsocks proxies rely on a configuration file in /etc/tsocks.conf.
|
# Most tsocks proxies rely on a configuration file in /etc/tsocks.conf.
|
||||||
# If using tsocks, please make sure to complete this config before trying to build qemu.
|
# If using tsocks, please make sure to complete this config before trying to build qemu.
|
||||||
if [[ $INSTALL_TSOCKS == true ]]; then
|
if [[ $INSTALL_TSOCKS == true && $NO_TSOCKS != true ]]; then
|
||||||
if hash tsocks 2> /dev/null; then
|
if hash tsocks 2> /dev/null; then
|
||||||
opt_params+=("--with-git='tsocks git'")
|
opt_params+=("--with-git='tsocks git'")
|
||||||
fi
|
fi
|
||||||
|
@ -55,6 +55,7 @@ function usage() {
|
|||||||
echo " -t --test-conf List of test configurations to enable (${CONF})"
|
echo " -t --test-conf List of test configurations to enable (${CONF})"
|
||||||
echo " -c --conf-path Path to configuration file"
|
echo " -c --conf-path Path to configuration file"
|
||||||
echo " -d --dir-git Path to where git sources should be saved"
|
echo " -d --dir-git Path to where git sources should be saved"
|
||||||
|
echo " -s --disable-tsocks Disable use of tsocks"
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,7 +80,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Parse input arguments #
|
# Parse input arguments #
|
||||||
while getopts 'd:iuht:c:-:' optchar; do
|
while getopts 'd:siuht:c:-:' optchar; do
|
||||||
case "$optchar" in
|
case "$optchar" in
|
||||||
-)
|
-)
|
||||||
case "$OPTARG" in
|
case "$OPTARG" in
|
||||||
@ -89,6 +90,7 @@ while getopts 'd:iuht:c:-:' optchar; do
|
|||||||
test-conf=*) CONF="${OPTARG#*=}" ;;
|
test-conf=*) CONF="${OPTARG#*=}" ;;
|
||||||
conf-path=*) CONF_PATH="${OPTARG#*=}" ;;
|
conf-path=*) CONF_PATH="${OPTARG#*=}" ;;
|
||||||
dir-git=*) GIT_REPOS="${OPTARG#*=}" ;;
|
dir-git=*) GIT_REPOS="${OPTARG#*=}" ;;
|
||||||
|
disable-tsocks) NO_TSOCKS=true ;;
|
||||||
*)
|
*)
|
||||||
echo "Invalid argument '$OPTARG'"
|
echo "Invalid argument '$OPTARG'"
|
||||||
usage
|
usage
|
||||||
@ -101,6 +103,7 @@ while getopts 'd:iuht:c:-:' optchar; do
|
|||||||
t) CONF="$OPTARG" ;;
|
t) CONF="$OPTARG" ;;
|
||||||
c) CONF_PATH="$OPTARG" ;;
|
c) CONF_PATH="$OPTARG" ;;
|
||||||
d) GIT_REPOS="$OPTARG" ;;
|
d) GIT_REPOS="$OPTARG" ;;
|
||||||
|
s) NO_TSOCKS=true ;;
|
||||||
*)
|
*)
|
||||||
echo "Invalid argument '$OPTARG'"
|
echo "Invalid argument '$OPTARG'"
|
||||||
usage
|
usage
|
||||||
|
Loading…
Reference in New Issue
Block a user