From patchwork Tue Jul 17 19:55:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 142218 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp4012ljj; Tue, 17 Jul 2018 13:17:07 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfw8dsKnKa14ievdPy+MqxX1q5rzSpPuPFBsjDYiDvOSsMDquAl9X1OfUAfAP7Kc4Enrv5N X-Received: by 2002:ac8:5343:: with SMTP id d3-v6mr3103055qto.141.1531858627361; Tue, 17 Jul 2018 13:17:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531858627; cv=none; d=google.com; s=arc-20160816; b=rWhNP83DJccZZStcTj01sLSMKq3h9e9PaYvTsCkj5XbmRmoADffesLr5kiK05h+V6R fX1wCzSHc83OyBGDsCFUQnUbC61Y4kWPeq88cMM2D0HgB8bEPAsx1aNE88oFe4ZtvzkR E1VvHNGfVjuHcTAqPY+Ft2o3VwzS6eOcyZjnNGua0IUDaTzAtOZrqxfdmEaRHtQnPIEr JsWG4l3tIJul9htZ0xZUyzCzeulV603a0jEgZBJvTEKv4vvhla2lx7X76VscnYWRjC8z 66kxy+ezwCo4rnTWaWDW3/538haisI15yoz9lpRHmQ0i//vqPcVjKRHhAnd64Cm4DW8q nhqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=uh+xgRKLlu0pAy51Rt97gPvvJ/mFYbA7UbcjFuIwMg4=; b=j0NFJ6HMzto9PUkZHAffw6gkiMK9+9YejNrSTEC/yvBdI61pd9v9Pzc4ikVOGrFc4P 1i0lNdLA+jHkGvd5KpZnEnZkEDuQXqdMRYGRUJz2N8CnEGT48c2EMCBOfKQMWWn4ZAks V2QcX6NhmQ5RWxDjzXgglY3shrw6Pr5FIYL2eV+r4kZnDCEp3g7UzmP4tT+K7n2bcr9U Fx5MbdvKSJPwTsuJOSuoXkOsmP6T0j6+D2VmLNmriDn9WCdl5NRnf4zCyevFe/HFoVmH Hd2mXVMl+3FVDx/ZmPjRjeu5rY5BePhi4RvHVTw1w90a2pbkedcEHIbE+TgcdAcIpExr viJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=dnQRe12w; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id p79-v6si1723570qkl.154.2018.07.17.13.17.07 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 17 Jul 2018 13:17:07 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=dnQRe12w; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:33033 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffWPC-00017x-SH for patch@linaro.org; Tue, 17 Jul 2018 16:17:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42600) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffWBX-0000cP-R9 for qemu-devel@nongnu.org; Tue, 17 Jul 2018 16:03:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ffWBT-0001gx-RX for qemu-devel@nongnu.org; Tue, 17 Jul 2018 16:02:59 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:40081) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ffWBT-0001gF-Kd for qemu-devel@nongnu.org; Tue, 17 Jul 2018 16:02:55 -0400 Received: by mail-wr1-x444.google.com with SMTP id t6-v6so2394444wrn.7 for ; Tue, 17 Jul 2018 13:02:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uh+xgRKLlu0pAy51Rt97gPvvJ/mFYbA7UbcjFuIwMg4=; b=dnQRe12wcM1a/Mb5pisJ8Oyd29ayhojr26CV70jCfrDLEDmmtVahs2NPz9D3EJA3iB QPkNSB/x1QFBnXFDHuyqsIZ4kh3oTJxquCDvItjO5QObbo03nwf/SqGo0f0XlZ/Pebq0 qvRgX/1kWRlRbG5i4Ls07KZzVj2gIAQXU11vs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uh+xgRKLlu0pAy51Rt97gPvvJ/mFYbA7UbcjFuIwMg4=; b=a75SdW8EmXS22j16GrUb9z7ooWAVYYaDatEvzkq1vsJXVbkB+Rb5dkaFzSGtBUlXCO kHSWplDQUNyQcv9WP0pOZ9d0P1cTqCDGk3fmCMFEx4OUUpSyJIVosG+l1qW+3xM1TuRZ /mgivXDaP5bMj3I+iuRNTnkKKAsGTIrxa1KEWedtQr5z4JKauXSQqQZW3ijFw9LqB4Dp Na2HF30lSNfcuQ9Xk0Wlxhnetboj0IE2pN8aT0E8PJcKQYR8uNdhRAjC41xehbCMz19b jyjjwlQ1u93UqQ2bmVtSBS2unS1npknVZDR1gF62/VoQPHNSm9tz7FmwK7QT6ff/U5Zf OMkA== X-Gm-Message-State: AOUpUlFEMD4ishPXQi6OuZiF9a6uuXbzsZLzCPznWxzIdgeuBKvseqtJ XcD5JxDQqfGuHkG2lNLwC7/QxQ== X-Received: by 2002:adf:9086:: with SMTP id i6-v6mr2262649wri.271.1531857774416; Tue, 17 Jul 2018 13:02:54 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id m144-v6sm298273wma.36.2018.07.17.13.02.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Jul 2018 13:02:52 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 1EF8C3E0D6A; Tue, 17 Jul 2018 20:55:55 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: cota@braap.org, famz@redhat.com, berrange@redhat.com, f4bug@amsat.org, richard.henderson@linaro.org, balrogg@gmail.com, aurelien@aurel32.net, agraf@suse.de Date: Tue, 17 Jul 2018 20:55:51 +0100 Message-Id: <20180717195553.9111-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180717195553.9111-1-alex.bennee@linaro.org> References: <20180717195553.9111-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::444 Subject: [Qemu-devel] [PATCH v3 for 3.0 16/18] docker: ignore distro versioning of debootstrap X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We do a minimum version check for the debootstrap but if the distro has added their own minor version tick it would fail and fall-back to the SCM version. This is sub-optimal as the latest/greatest version may be broken at any one particular time. We fix that with a little sed magic on the version string before passing to our ugly shell versioning check. Signed-off-by: Alex Bennée Tested-by: Philippe Mathieu-Daudé --- tests/docker/dockerfiles/debian-bootstrap.pre | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) -- 2.17.1 diff --git a/tests/docker/dockerfiles/debian-bootstrap.pre b/tests/docker/dockerfiles/debian-bootstrap.pre index ea324d6e4a..3b0ef95374 100755 --- a/tests/docker/dockerfiles/debian-bootstrap.pre +++ b/tests/docker/dockerfiles/debian-bootstrap.pre @@ -56,10 +56,13 @@ if [ -z $DEBOOTSTRAP_DIR ]; then if [ -z $DEBOOTSTRAP ]; then echo "No debootstrap installed, attempting to install from SCM" NEED_DEBOOTSTRAP=true - elif ! (echo "${MIN_DEBOOTSTRAP_VERSION}" ; "${DEBOOTSTRAP}" --version \ - | cut -d ' ' -f 2) | sort -t . -n -k 1,1 -k 2,2 -k 3,3 -c &>/dev/null; then - echo "debootstrap too old, attempting to install from SCM" - NEED_DEBOOTSTRAP=true + else + INSTALLED_VERSION=$(${DEBOOTSTRAP} --version | sed 's/debootstrap \([0-9\.]*\)[^0-9\.]*.*/\1/') + if ! (echo "${MIN_DEBOOTSTRAP_VERSION}" ; echo "${INSTALLED_VERSION}") \ + | sort -t . -n -k 1,1 -k 2,2 -k 3,3 -C ; then + echo "debootstrap too old, attempting to install from SCM" + NEED_DEBOOTSTRAP=true + fi fi if $NEED_DEBOOTSTRAP; then DEBOOTSTRAP_SOURCE=https://salsa.debian.org/installer-team/debootstrap.git