From patchwork Fri Jul 13 12:17:41 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: 141875 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp740432ljj; Fri, 13 Jul 2018 05:27:47 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdS538MwlaOskph3BfZ/NNjK0J7jXiioeZTBh87ncmkHgXxmJCl++jy9eo1ktmMrJ8M7tGb X-Received: by 2002:a37:e112:: with SMTP id c18-v6mr5172908qkm.65.1531484867735; Fri, 13 Jul 2018 05:27:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531484867; cv=none; d=google.com; s=arc-20160816; b=GpvS43zXg3ayR1A9fqjlnfCl7+/pfb3BMqdq1CFhl7Ey2Uqdz83y43+K9SEjgMR6Ka 1ha845p4vOvzpETzYku6CS1xAx31Db07+vZQAvssrmnAARE0wdKHu3+hHEqdLnrFBHfo S1pvW2mYhoz21/LjNL7u399vvHzZ1MFoI9m3+FwQmChTxMCBgO2/CL4gAhl0a/wVKZd3 lbW175Y5UeBW3hIpYJfKY6OrQuBb8GpGzvdWKmuSEO3mDAXFuHDpH+ZnDN8Rg5xaJZsW spLVmiNa+xoC3ZWbmVxzTKywJKB//7OpKSk/X8I8x+qkU92hxgl63Rbjl8rPOZ9Oq/KZ d3XQ== 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=Wk0/gw3LtEHx/P7dGN1Ku+ZavBi7dRcefqJI6nV3CnY=; b=zk12ASFLchPCIDFYP2uX032z5rVXXHyuuHynsp8v77CLSnblFRLOXaeQPpFZTMEJ/z OMTIfslCUDCgLO9cQj8VKGB/XG8tMT3AKB2zixFOMqxAJ3CEQxZi6sMsQfCjeDNU6pV7 rKO66v1AgGMMnDLbuUiDGnjZ0W2vFW1u5EsioOmOai+46mmJdmKSZfdH4l8iR5l7UcP+ fOwd2R+2iNo6M+mSSo3A9/mMMIRZbkiueyKSUUmDFjWiiFttx6yeX87rsEIVrnYZsIgI dihO1AR09yaQ8p1Bc6ujYzgiIOePjxoWHZAblQ3lPvvuS0/xqvKhmEMhB/Bmnaxz2vTs ltWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Ytt5h3Yk; 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 r24-v6si4620106qtn.77.2018.07.13.05.27.47 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 13 Jul 2018 05:27:47 -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=Ytt5h3Yk; 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]:37024 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fdxAp-0004Kq-5l for patch@linaro.org; Fri, 13 Jul 2018 08:27:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59923) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fdxAS-0004Ic-B0 for qemu-devel@nongnu.org; Fri, 13 Jul 2018 08:27:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fdxAR-00026n-4G for qemu-devel@nongnu.org; Fri, 13 Jul 2018 08:27:24 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:37088) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fdxAQ-00025t-Tb for qemu-devel@nongnu.org; Fri, 13 Jul 2018 08:27:23 -0400 Received: by mail-wm0-x242.google.com with SMTP id n17-v6so9264634wmh.2 for ; Fri, 13 Jul 2018 05:27:22 -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=Wk0/gw3LtEHx/P7dGN1Ku+ZavBi7dRcefqJI6nV3CnY=; b=Ytt5h3YkzBSpRHA4lpQ3qal4zI99d04aAK6XwTo9OMONTDNAH9cjM9WFciuNCa3vXM TNBfndZ3/j3nAP5DXU6EQbrHZfpr/4D1urNfv0tLrU07huPXC9AQ8dC35x/Mf78mLlbh k0bIIw+Rv0zbo2Z+9rO7RR+DznS/a35rCrAGo= 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=Wk0/gw3LtEHx/P7dGN1Ku+ZavBi7dRcefqJI6nV3CnY=; b=YJBOgjQy5aYbLBoSWyzKY40xlAm8lO9hzXFGZcEtC3FUjtUt2ECnSpfQBTmMShJpE7 x2eIbBv+WlQKhh/ny2EBHHdKI01hmvQH4D5YmKmQwhMwuMriboQjPR2as7kdcd2IokiB UoHdaKwak3XNkPgiB4xVNXHtF8DGi198PHkucva3z1UY9uQsI66JrboJUW8rHTM4uJjG sm5/ZAMvbPjuotG3jkRXQGX2Oo4RbIT/oZ1KJ+2b5qp17TjLJr5oPbVR31G17d1ODIJ4 wbp2FiKRv6X36j1tVZstSdhsXARrfrS6yxEZVYhK5ec4ZOrDszwvt6jNr4JCpMr1rVEf pWSw== X-Gm-Message-State: AOUpUlFhWerheJDxZLSUYxcISwyihCyguaPvnO7hk2DkC1aW71Pzl8Zl U1iocOblP3JB5i6msB5Xz81f7w== X-Received: by 2002:a1c:6546:: with SMTP id z67-v6mr3585540wmb.130.1531484841825; Fri, 13 Jul 2018 05:27:21 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id o10-v6sm24716877wrw.79.2018.07.13.05.27.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 13 Jul 2018 05:27:18 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 330683E0969; Fri, 13 Jul 2018 13:17:43 +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: Fri, 13 Jul 2018 13:17:41 +0100 Message-Id: <20180713121741.19262-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180713121741.19262-1-alex.bennee@linaro.org> References: <20180713121741.19262-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:400c:c09::242 Subject: [Qemu-devel] [PATCH v2 for 3.0 16/16] 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 --- tests/docker/dockerfiles/debian-bootstrap.pre | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) -- 2.17.1 Tested-by: Philippe Mathieu-Daudé 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