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: 940035 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="aiV8TkfB"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41M36V6cGTz9s2g for ; Fri, 6 Jul 2018 02:22:26 +1000 (AEST) Received: from localhost ([::1]:53647 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fb71U-0006bt-Ij for incoming@patchwork.ozlabs.org; Thu, 05 Jul 2018 12:22:24 -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-Google-Smtp-Source: AAOMgpfaPxCSr3dpv/YCELiF45sLeaw30I4E6iI3IRONLT1DYw1wlWg+12BLy/Wu2K4TGFbPWWAE7g== 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+incoming=patchwork.ozlabs.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é 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