[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 12/21] configure: remove --with-git= option
From: |
Paolo Bonzini |
Subject: |
[PULL 12/21] configure: remove --with-git= option |
Date: |
Tue, 6 Jun 2023 16:31:07 +0200 |
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>
---
Makefile | 2 +-
configure | 8 ++------
meson.build | 1 -
.../ci/org.centos/stream/8/x86_64/configure | 2 --
scripts/git-submodule.sh | 19 ++++++++++---------
5 files changed, 13 insertions(+), 19 deletions(-)
diff --git a/Makefile b/Makefile
index 08fb6a3b058..8005f1cc53e 100644
--- a/Makefile
+++ b/Makefile
@@ -53,7 +53,7 @@ Makefile: .git-submodule-status
git-submodule-update:
ifneq ($(GIT_SUBMODULES_ACTION),ignore)
$(call quiet-command, \
- (GIT="$(GIT)" "$(SRC_PATH)/scripts/git-submodule.sh"
$(GIT_SUBMODULES_ACTION) $(GIT_SUBMODULES)), \
+ (GIT=git "$(SRC_PATH)/scripts/git-submodule.sh"
$(GIT_SUBMODULES_ACTION) $(GIT_SUBMODULES)), \
"GIT","$(GIT_SUBMODULES)")
endif
diff --git a/configure b/configure
index d674a966731..92bacc756c0 100755
--- a/configure
+++ b/configure
@@ -751,8 +751,6 @@ for opt do
;;
--enable-fdt=*) fdt="$optarg"
;;
- --with-git=*) git="$optarg"
- ;;
--with-git-submodules=*)
git_submodules_action="$optarg"
;;
@@ -791,7 +789,7 @@ fi
case $git_submodules_action in
update|validate)
- if test ! -e "$source_path/.git"; then
+ if test ! -e "$source_path/.git" || ! has git; then
echo "ERROR: cannot $git_submodules_action git submodules without
.git"
exit 1
fi
@@ -892,7 +890,6 @@ Advanced options (experts only):
--python=PYTHON use specified python [$python]
--ninja=NINJA use specified ninja [$ninja]
--smbd=SMBD use specified smbd [$smbd]
- --with-git=GIT use specified git [$git]
--with-git-submodules=update update git submodules (default if .git dir
exists)
--with-git-submodules=validate fail if git submodules are not up to date
--with-git-submodules=ignore do not update or check git submodules
(default if no .git dir)
@@ -1699,7 +1696,7 @@ fi
#######################################
# generate config-host.mak
-if ! (GIT="$git" "$source_path/scripts/git-submodule.sh"
"$git_submodules_action" "$git_submodules"); then
+if ! (GIT=git "$source_path/scripts/git-submodule.sh" "$git_submodules_action"
"$git_submodules"); then
exit 1
fi
@@ -1709,7 +1706,6 @@ echo "# Automatically generated by configure - do not
modify" > $config_host_mak
echo >> $config_host_mak
echo all: >> $config_host_mak
-echo "GIT=$git" >> $config_host_mak
echo "GIT_SUBMODULES=$git_submodules" >> $config_host_mak
echo "GIT_SUBMODULES_ACTION=$git_submodules_action" >> $config_host_mak
diff --git a/meson.build b/meson.build
index 6767a0d3faa..4302c019237 100644
--- a/meson.build
+++ b/meson.build
@@ -4011,7 +4011,6 @@ summary(summary_info, bool_yn: true, section:
'Directories')
# Host binaries
summary_info = {}
-summary_info += {'git': config_host['GIT']}
summary_info += {'python': '@0@ (version:
@1@)'.format(python.full_path(), python.language_version())}
summary_info += {'sphinx-build': sphinx_build}
if config_host.has_key('HAVE_GDB_BIN')
diff --git a/scripts/ci/org.centos/stream/8/x86_64/configure
b/scripts/ci/org.centos/stream/8/x86_64/configure
index 6e8983f39cd..de76510978f 100755
--- a/scripts/ci/org.centos/stream/8/x86_64/configure
+++ b/scripts/ci/org.centos/stream/8/x86_64/configure
@@ -29,14 +29,12 @@
--extra-cflags="-O2 -g -pipe -Wall -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions
-fstack-protector-strong -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection" \
--with-suffix="qemu-kvm" \
--firmwarepath=/usr/share/qemu-firmware \
---with-git=meson \
--with-git-submodules=update \
--target-list="x86_64-softmmu" \
--block-drv-rw-whitelist="qcow2,raw,file,host_device,nbd,iscsi,rbd,blkdebug,luks,null-co,nvme,copy-on-read,throttle,gluster"
\
--audio-drv-list="" \
--block-drv-ro-whitelist="vmdk,vhdx,vpc,https,ssh" \
--with-coroutine=ucontext \
---with-git=git \
--tls-priority=@QEMU,SYSTEM \
--disable-attr \
--disable-auth-pam \
diff --git a/scripts/git-submodule.sh b/scripts/git-submodule.sh
index 7be41f59483..0ce1efc44e5 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
--
2.40.1
- [PULL 01/21] meson: Avoid implicit declaration of absent functions, (continued)
- [PULL 01/21] meson: Avoid implicit declaration of absent functions, Paolo Bonzini, 2023/06/06
- [PULL 03/21] scripts: remove dead file, Paolo Bonzini, 2023/06/06
- [PULL 02/21] atomics: eliminate mb_read/mb_set, Paolo Bonzini, 2023/06/06
- [PULL 04/21] meson.build: Group the UI entries in a separate summary section, Paolo Bonzini, 2023/06/06
- [PULL 05/21] meson.build: Group the network backend entries in a separate summary section, Paolo Bonzini, 2023/06/06
- [PULL 06/21] meson.build: Group the audio backend entries in a separate summary section, Paolo Bonzini, 2023/06/06
- [PULL 08/21] scsi/qemu-pr-helper: Drop support for 'old' libmultipath API, Paolo Bonzini, 2023/06/06
- [PULL 07/21] meson.build: Use -Wno-undef only for SDL2 versions that need it, Paolo Bonzini, 2023/06/06
- [PULL 09/21] Revert "tests/requirements.txt: bump up avocado-framework version to 101.0", Paolo Bonzini, 2023/06/06
- [PULL 10/21] tests: Use separate virtual environment for avocado, Paolo Bonzini, 2023/06/06
- [PULL 12/21] configure: remove --with-git= option,
Paolo Bonzini <=
- [PULL 13/21] configure: rename --enable-pypi to --enable-download, control subprojects too, Paolo Bonzini, 2023/06/06
- [PULL 11/21] mkvenv: always pass locally-installed packages to pip, Paolo Bonzini, 2023/06/06
- [PULL 14/21] git-submodule: allow partial update of .git-submodule-status, Paolo Bonzini, 2023/06/06
- [PULL 15/21] build: log submodule update from git-submodule.sh, Paolo Bonzini, 2023/06/06
- [PULL 16/21] meson: subprojects: replace submodules with wrap files, Paolo Bonzini, 2023/06/06
- [PULL 17/21] configure: move SLOF submodule handling to pc-bios/s390-ccw, Paolo Bonzini, 2023/06/06
- [PULL 18/21] pc-bios/s390-ccw: always build network bootloader, Paolo Bonzini, 2023/06/06
- [PULL 21/21] configure: remove --with-git-submodules=, Paolo Bonzini, 2023/06/06
- [PULL 20/21] build: remove git submodule handling from main makefile, Paolo Bonzini, 2023/06/06