summary refs log tree commit diff stats
path: root/scripts/git-submodule.sh
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2023-05-25 12:36:28 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2023-06-06 16:30:01 +0200
commit50cfed80ecc01ea4300ed4b0ea5b567f381b9421 (patch)
tree1715b487efdf206b34131df59a7dae45325b2404 /scripts/git-submodule.sh
parent47a90a51a9c24ba10c58c0cd09d2117cf9e3fde2 (diff)
downloadfocaccia-qemu-50cfed80ecc01ea4300ed4b0ea5b567f381b9421.tar.gz
focaccia-qemu-50cfed80ecc01ea4300ed4b0ea5b567f381b9421.zip
configure: remove --with-git= option
The scenario for which --with-git= was introduced was to use a SOCKS proxy
such as tsocks.  However, this was back in 2017 when QEMU's submodules
used the git:// protocol, and it is not as important when using the
"smart HTTP" backend; for example, neither "meson subprojects download"
nor scripts/checkpatch.pl obey the GIT environment variable.

So remove the knob, but test for the presence of git in the configure and
git-submodule.sh scripts, and suggest using --with-git-submodules=validate
+ a manual invocation of git-submodule.sh when git does not work.  Hopefully
in the future the GIT environment variable will be supported by Meson.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'scripts/git-submodule.sh')
-rwxr-xr-xscripts/git-submodule.sh19
1 files changed, 10 insertions, 9 deletions
diff --git a/scripts/git-submodule.sh b/scripts/git-submodule.sh
index 7be41f5948..0ce1efc44e 100755
--- a/scripts/git-submodule.sh
+++ b/scripts/git-submodule.sh
@@ -12,7 +12,7 @@ maybe_modules="$@"
 # if --with-git-submodules=ignore, do nothing
 test "$command" = "ignore" && exit 0
 
-test -z "$GIT" && GIT=git
+test -z "$GIT" && GIT=$(command -v git)
 
 cd "$(dirname "$0")/.."
 
@@ -21,19 +21,14 @@ update_error() {
     echo
     echo "Unable to automatically checkout GIT submodules '$modules'."
     echo "If you require use of an alternative GIT binary (for example to"
-    echo "enable use of a transparent proxy), then please specify it by"
-    echo "running configure by with the '--with-git' argument. e.g."
-    echo
-    echo " $ ./configure --with-git='tsocks git'"
-    echo
-    echo "Alternatively you may disable automatic GIT submodule checkout"
-    echo "with:"
+    echo "enable use of a transparent proxy), please disable automatic"
+    echo "GIT submodule checkout with:"
     echo
     echo " $ ./configure --with-git-submodules=validate"
     echo
     echo "and then manually update submodules prior to running make, with:"
     echo
-    echo " $ scripts/git-submodule.sh update $modules"
+    echo " $ GIT='tsocks git' scripts/git-submodule.sh update $modules"
     echo
     exit 1
 }
@@ -57,6 +52,12 @@ then
     exit 1
 fi
 
+if test -n "$maybe_modules" && test -z "$GIT"
+then
+    echo "$0: unexpectedly called with submodules but git binary not found"
+    exit 1
+fi
+
 modules=""
 for m in $maybe_modules
 do