From 5c0ef67ac406b6373b2d32f901752cd0f28e0f61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Wed, 18 Apr 2018 18:11:51 +0100 Subject: [PATCH] configure: add sanity check to catch builds from "git archive" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The "git archive" feature creates tarballs which are missing all submodule content. GitHub unhelpfully provides users with "Download" links that claim to give them valid source release tarballs. These GitHub archives will not be buildable as they are created by the "git archive" feature and so are missing content. The user gets unhelpful messages from make such as: fatal error: ui/input-keymap-atset1-to-qcode.c: No such file or directory By adding a sanity check we can give users an informative message about what they've done wrong. Signed-off-by: Daniel P. Berrangé Message-Id: <20180418171151.5263-1-berrange@redhat.com> Reviewed-by: Cornelia Huck Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- configure | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/configure b/configure index 65548df1fc..dcb605d7a2 100755 --- a/configure +++ b/configure @@ -300,6 +300,24 @@ then else git_update=no git_submodules="" + + if ! test -f "$source_path/ui/keycodemapdb/README" + then + echo + echo "ERROR: missing file $source_path/ui/keycodemapdb/README" + echo + echo "This is not a GIT checkout but module content appears to" + echo "be missing. Do not use 'git archive' or GitHub download links" + echo "to acquire QEMU source archives. Non-GIT builds are only" + echo "supported with source archives linked from:" + echo + echo " https://www.qemu.org/download/" + echo + echo "Developers working with GIT can use scripts/archive-source.sh" + echo "if they need to create valid source archives." + echo + exit 1 + fi fi git="git"