From nobody Tue Nov 4 21:59:32 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1531484942267645.110123021384; Fri, 13 Jul 2018 05:29:02 -0700 (PDT) Received: from localhost ([::1]:37030 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fdxC1-0005DX-92 for importer@patchew.org; Fri, 13 Jul 2018 08:29:01 -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) 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) 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-Google-Smtp-Source: AAOMgpe9Z6jxTUcnCFbhj4iaqlFQWkzaAW3fgEWCMJcyWgyBPF8pLsBq3z5M6sLPqWpVqjINWWtj4Q== X-Received: by 2002:a1c:6546:: with SMTP id z67-v6mr3585540wmb.130.1531484841825; Fri, 13 Jul 2018 05:27:21 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 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=C3=A9e Tested-by: Philippe Mathieu-Daud=C3=A9 --- tests/docker/dockerfiles/debian-bootstrap.pre | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/docker/dockerfiles/debian-bootstrap.pre b/tests/docker/d= ockerfiles/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=3Dtrue - elif ! (echo "${MIN_DEBOOTSTRAP_VERSION}" ; "${DEBOOTSTRAP}" --version= \ - | cut -d ' ' -f 2) | sort -t . -n -k 1,1 -k 2,2 -k 3,3 -c &>/d= ev/null; then - echo "debootstrap too old, attempting to install from SCM" - NEED_DEBOOTSTRAP=3Dtrue + else + INSTALLED_VERSION=3D$(${DEBOOTSTRAP} --version | sed 's/debootstra= p \([0-9\.]*\)[^0-9\.]*.*/\1/') + if ! (echo "${MIN_DEBOOTSTRAP_VERSION}" ; echo "${INSTALLED_VERSIO= N}") \ + | 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=3Dtrue + fi fi if $NEED_DEBOOTSTRAP; then DEBOOTSTRAP_SOURCE=3Dhttps://salsa.debian.org/installer-team/deboo= tstrap.git --=20 2.17.1