From ac26811827e0b3bca84f98e29dfb88d4e594b0be Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Wed, 7 Oct 2015 05:07:43 -0700 Subject: [PATCH] install.sh: add more warnings and checks Warn about known issues with more Git versions. Complain and die if xmllint_readme enabled without xmllint. Signed-off-by: Kyle J. McKay --- install.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/install.sh b/install.sh index 69d26cf..615282a 100755 --- a/install.sh +++ b/install.sh @@ -36,6 +36,13 @@ if [ -n "$cfg_httpspushurl" -a -z "$cfg_certsdir" ]; then fi +# Check for extra required tools +if [ -n "$cfg_xmllint_readme" -a "$cfg_xmllint_readme" != "0" ] && ! command -v xmllint >/dev/null; then + echo "ERROR: \$xmllint_readme set but xmllint not in \$PATH!" >&2 + exit 1 +fi + + echo "*** Checking for compiled utilities..." if [ ! -x src/can_user_push ]; then echo "ERROR: src/can_user_push is not built! Did you _REALLY_ read INSTALL?" >&2 @@ -172,6 +179,18 @@ upgrading to GIT VERSION 2.3.10 OR LATER IS HIGHLY RECOMMENDED. EOT fi +if [ "$(vcmp "$git_vernum" 2.4.4)" -lt 0 ]; then + echo 'WARNING: $Girocco::Config::git_bin version < 2.4.4, many refs smart HTTP fetches can deadlock' +fi +if [ "$(vcmp "$git_vernum" 2.4)" -ge 0 ] && [ "$(vcmp "$git_vernum" 2.4.10)" -lt 0 ]; then + echo 'WARNING: $Girocco::Config::git_bin version >= 2.4.0 and < 2.4.10, security issues exist' +fi +if [ "$(vcmp "$git_vernum" 2.5)" -ge 0 ] && [ "$(vcmp "$git_vernum" 2.5.4)" -lt 0 ]; then + echo 'WARNING: $Girocco::Config::git_bin version >= 2.5.0 and < 2.5.4, security issues exist' +fi +if [ "$(vcmp "$git_vernum" 2.6)" -ge 0 ] && [ "$(vcmp "$git_vernum" 2.6.1)" -lt 0 ]; then + echo 'WARNING: $Girocco::Config::git_bin version >= 2.6.0 and < 2.6.1, security issues exist' +fi if [ -n "$cfg_mirror" -a "$cfg_mirror" != 0 ] && grep -q ns_parserr "$cfg_git_bin"; then cat <<'EOT' -- 2.11.4.GIT