From nobody Wed Nov 5 01:50:31 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 1531858781228955.1937613673458; Tue, 17 Jul 2018 13:19:41 -0700 (PDT) Received: from localhost ([::1]:33033 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffWOo-00017x-EL for importer@patchew.org; Tue, 17 Jul 2018 16:16:42 -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) 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) 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-Google-Smtp-Source: AAOMgpdJHAtaVYPBH9NqD27AqK9rN29+cP5Tr/WCnkKy+Bqx+cTqiO0q86YQ51gYibu3ZhKeLHHKYA== X-Received: by 2002:adf:9086:: with SMTP id i6-v6mr2262649wri.271.1531857774416; Tue, 17 Jul 2018 13:02:54 -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: 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 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: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=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