From patchwork Thu Jul 5 16:03:26 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: 141199 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2138115ljj; Thu, 5 Jul 2018 09:24:42 -0700 (PDT) X-Google-Smtp-Source: AAOMgpce+zRwkPjgndJBvc6QKE72EDaiknGY5wWpa0pX26o7dfxXoOCSd1g3VIiof/fJLc8EHEqk X-Received: by 2002:a37:5a47:: with SMTP id o68-v6mr5884126qkb.226.1530807882602; Thu, 05 Jul 2018 09:24:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530807882; cv=none; d=google.com; s=arc-20160816; b=bEDOHLeokYeWpnDZXGtUasNEWMwSB4FVRcycjDVJ3cu7U3vxLRH3XXioeFy8STVPtN a7UaxSw0vmVjXVzCdoqum9cMpVLeo7Jr8qM6n8Zz7NNiPjJha86NEeBvGPtvLgu4itV4 amU/1umxsFFuFMNuW8DRT9qHJUJsXDo1ADq9/CqT3587KTosPNf3KIokXT+cJqRdeNNF N/bbGdqMwsTpVHtaoYxDKg4uUHrbRjsJgMFcq0an6AqdthM1QyIiTqNJ7J4hzxmgHtDC NpUuWw4N/auCeFRFHXhLznPB3n40xLMLAX9s+FlwML9XUlQjz4bF+74kQAQpEaNBNInQ dsQA== 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=7JwlLzZv1CYp13jC2STPkaY0Vw0VaJx1WLbx+yFrznU=; b=cOTR8y/1ZJOU1fs6sEypTctwsb7sybxbMbZYop3snL8B0/tjTqZpa7dXzHjXcV9Beg 3GSDy7Mb+eHRMpxuhj+GtxPw9mqFIkmZN/ZVo6X4RPuUM3YqLhyjdI0RCxJUhzT2jPf0 4Aq4ySOfs1w6/7uUillFR5XvDN3BeK7muBIJv8IzkXpnMfHjfHPiXW9SS8PtT321iYeH YmHnnQiS4KJlM5h5GDYmBduQG96HKiZrydz264KTN7urDE4fPS+ZiyYw+quYXMlGIdLX 6LErzch5DuGEsXYC1rClj+k9Y8oPpISZzbv7rU7rBLQy51iGXQce5RezNMOFRbNXvpMY wLkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=aiV8TkfB; 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 n20-v6si5991491qtp.123.2018.07.05.09.24.42 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 05 Jul 2018 09:24:42 -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=aiV8TkfB; 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]:53655 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fb73h-0007l1-PL for patch@linaro.org; Thu, 05 Jul 2018 12:24:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57580) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fb6sr-0008On-8C for qemu-devel@nongnu.org; Thu, 05 Jul 2018 12:13:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fb6sm-0007VB-Ve for qemu-devel@nongnu.org; Thu, 05 Jul 2018 12:13:29 -0400 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:53581) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fb6sm-0007Uh-Ou for qemu-devel@nongnu.org; Thu, 05 Jul 2018 12:13:24 -0400 Received: by mail-wm0-x241.google.com with SMTP id b188-v6so12183805wme.3 for ; Thu, 05 Jul 2018 09:13:24 -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=7JwlLzZv1CYp13jC2STPkaY0Vw0VaJx1WLbx+yFrznU=; b=aiV8TkfB+QvWEjrVEvVvsxgJzW/8yAU55gAMfRy27L9PDsqj3/2LYOUUR1o0ho9g3n dTcrG/tQSaoLcr2v6HcEJlfCYrv/DAenMW8pK6TAB16EW7bgusjo+ubuhxyzD8Q5s5JS G7Lz4HpkEjl/XznYqqfv3Jn/NKcdEEt3DzlsI= 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=7JwlLzZv1CYp13jC2STPkaY0Vw0VaJx1WLbx+yFrznU=; b=SzDPSy+FqzjBAxdRfdya0dAFc3XD9/dY3e+EnAWwMQVGx2D5C45gkxq/Mqqrv9qA+s LkYcYNxZA+3uQi63Oz/t+1JpJAXFmMuzjluu5bTlxgzxLEHyx354C2+AwpZgXAROf2PJ 49KspQQquko7a8K2Rw6HwtnBGMyScH8jJdW2lR/m+lAmk+dEAQneNCaWnzwml3H7K0Xr Asx8VRUekbGJBrlT6SgN0bZJTRKuZmxikMsUXyb845HKhtZlaVpOfJ/meV1v+YuX8/nh 1BXZ+zCK8sM7aZ8vWmfu/jSKEBkexA+MqeddRdn0IIwxSsttZYcagawpyzmKhVwI4DS4 gGlA== X-Gm-Message-State: APt69E2dCPXo++sM8ETMreShwFjbiod1SZtfPfnOGJqsJ+npt+QzU9rg Il+lgw1wiGMXHVgUYV0vsqxaOw== X-Received: by 2002:a1c:8010:: with SMTP id b16-v6mr4851745wmd.41.1530807203750; Thu, 05 Jul 2018 09:13:23 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id 77-v6sm6696152wmq.22.2018.07.05.09.13.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Jul 2018 09:13:22 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id A8F483E0CEF; Thu, 5 Jul 2018 17:03:30 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Thu, 5 Jul 2018 17:03:26 +0100 Message-Id: <20180705160329.30386-18-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180705160329.30386-1-alex.bennee@linaro.org> References: <20180705160329.30386-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::241 Subject: [Qemu-devel] [PULL v3 17/20] docker: debian-bootstrap.pre allow customising of variant/url 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: Fam Zheng , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We default to the buildd variant as most of our images are for building. However lets give the user the ability to specify "minbase" if they want to create a simple base image for experimentation. Allowing the tweaking of DEB_URL means we can also bootstrap other Debian based OS's. For example: make docker-binfmt-image-debian-ubuntu-bionic-arm64 \ DEB_ARCH=arm64 DEB_TYPE=bionic \ DEB_VARIANT=minbase DEB_URL=http://ports.ubuntu.com/ \ EXECUTABLE=./aarch64-linux-user/qemu-aarch64 Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé -- 2.17.1 diff --git a/tests/docker/dockerfiles/debian-bootstrap.pre b/tests/docker/dockerfiles/debian-bootstrap.pre index 7c76dce663..56e1aa7a21 100755 --- a/tests/docker/dockerfiles/debian-bootstrap.pre +++ b/tests/docker/dockerfiles/debian-bootstrap.pre @@ -32,6 +32,15 @@ if [ -z "${DEB_TYPE}" ]; then fi +# The following allow finer grain control over the defaults +if [ -z "${DEB_VARIANT}" ]; then + DEB_VARIANT=buildd +fi + +if [ -z "${DEB_URL}" ]; then + DEB_URL="http://httpredir.debian.org/debian" +fi + # We check in order for # # - DEBOOTSTRAP_DIR pointing at a development checkout @@ -107,5 +116,5 @@ fi echo "Building a rootfs using ${FAKEROOT} and ${DEBOOTSTRAP} ${DEB_ARCH}/${DEB_TYPE}" -${FAKEROOT} ${DEBOOTSTRAP} --variant=buildd --foreign --arch=$DEB_ARCH $DEB_TYPE . http://httpredir.debian.org/debian || exit 1 +${FAKEROOT} ${DEBOOTSTRAP} --variant=$DEB_VARIANT --foreign --arch=$DEB_ARCH $DEB_TYPE . $DEB_URL || exit 1 exit 0