From patchwork Mon Jul 2 14:30:18 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: 140794 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp42160ljj; Mon, 2 Jul 2018 07:48:36 -0700 (PDT) X-Google-Smtp-Source: AAOMgpevHyUcEJXYGEXp5trxAErybB2Xp8fya4n/w9B8k521aC5oGKh5CV9dH6J8WulpAWqxBYhu X-Received: by 2002:ac8:530d:: with SMTP id t13-v6mr4918880qtn.396.1530542915921; Mon, 02 Jul 2018 07:48:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530542915; cv=none; d=google.com; s=arc-20160816; b=JOnz+4PVW6Lbu53/4/6+BWw4fKW7Jw4wO+g7YVNpB01sD+QjiqZoWvvexK66FT2zpq zXMoiwJ13fVrVnZqJMl43GvZt7LIcdF/yzQd9hIwmgPdjCaQ63RhN8fD6BRi67l6Fizr dEcd9Gvt2f0PFtpuBe+krUvcO1bozBUhsw6fqEppmY04z0g32nlljnKlTpifjKbDVFe+ kb3iW59CN0ASR/I/HvgYhXpnYlwezPs8nMTwo4s+z9g6cMMK60PoQ+v8foLt3q05JpNs hPjC1wr1DfPfJ+g3Iy72w2P09gaTxhMUalllJsxrq1UylY4Ulrw+BGkejUpUPBeGfGw2 CmGQ== 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=yz6i5tqzWoXvLEggjJPEYg+DnnCR4zEmF2RbxVVKK2I=; b=aVwm351Zxdmc8JODwekQeVPjpbvSYXZjDJd7wHzwutHch+vgg3mi6AkwQybAhMe+k4 d2R5orAN4OHBJzHwOjNkz9catnR665fV/tP4x6qGrKhFcuBQLJet3hmj7W6vxHkfyHeg L1TuxMiYJcCr6H9YsDU4ZBS5eNqxRnTh7THkI2G3UY3twwQsBUm+Iyz+aDGpnpYLBR2N ucIgsggbfH1XAUNEThbH7tMaILrvsJIXAgJ6QPXAD4AR0TF4FgdoEg28Ytl0Nvga5LoZ OSocqf1CeJuQRtJiuA5NLawVsLLoL3IvAT2WsAPIN6UE9koQ1gMr4brJRqchFXCiixvr s45g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=dg9NWlbi; 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 m54-v6si1624667qvh.220.2018.07.02.07.48.35 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 02 Jul 2018 07:48:35 -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=dg9NWlbi; 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]:33241 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fa083-0002Ff-Cw for patch@linaro.org; Mon, 02 Jul 2018 10:48:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58301) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZzxw-00035J-Pj for qemu-devel@nongnu.org; Mon, 02 Jul 2018 10:38:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fZzxv-0005FI-7x for qemu-devel@nongnu.org; Mon, 02 Jul 2018 10:38:08 -0400 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:36884) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fZzxv-0005EI-0d for qemu-devel@nongnu.org; Mon, 02 Jul 2018 10:38:07 -0400 Received: by mail-wm0-x243.google.com with SMTP id n17-v6so9010616wmh.2 for ; Mon, 02 Jul 2018 07:38:06 -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=yz6i5tqzWoXvLEggjJPEYg+DnnCR4zEmF2RbxVVKK2I=; b=dg9NWlbirBxdH7sou+N+kJ5J/+sbwTreDwnSLtFyNenSmAXS0LOHOIElRtkMTggCwu p7k1xQBtFziJkDsxM3+r0uIAj8AtsBEQv4nFsFJFmDNfj+nrrEdrl4kgvqmkHwIM0iHW pm58RiNJRqRbJl1u91q/d40TroS9XwpqKflQo= 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=yz6i5tqzWoXvLEggjJPEYg+DnnCR4zEmF2RbxVVKK2I=; b=Rjpmqa1vxgF07+ivbIcqdYbYOIjzP85EyHIK466br3pyifnHCdpjNW5VUkrHZWEiV6 lzjLsJJbTdOmXE02fCGI7XVqU1u0oKjS/SGVwIgxf5USnxrwMeWuqTm5AUiyVCmIbDr5 yUyD99/BIqFkDbCbXDaTaGQLmrdvzQGy4X++xH44Xt2QUnAzQdlsDZV0ucOxL+DRNYDn qlfviRUcbK+9559iR0i6OZBxP9g7vp8K+Y52l8IwXJNYa43x3VsGurkJbIAKp9epHTs8 YMOJ76ESu+9iuawlJVlf63NgTtkHpQavtn02d1wopbQzPB3ioArr3lAMQjQv7/Kv82Is PkmA== X-Gm-Message-State: APt69E27tSOtxBzoyqPwbX9hr2x5IEfPdtgGSj8B/FR4orFoh+N5umNy wpASy39Mj4THKo3GaKK0082ubw== X-Received: by 2002:a1c:c90:: with SMTP id 138-v6mr8054187wmm.110.1530542285841; Mon, 02 Jul 2018 07:38:05 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id 131-v6sm20364866wmm.31.2018.07.02.07.38.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 02 Jul 2018 07:38:02 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 249FF3E0B6C; Mon, 2 Jul 2018 15:30:23 +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: Mon, 2 Jul 2018 15:30:18 +0100 Message-Id: <20180702143021.18864-18-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180702143021.18864-1-alex.bennee@linaro.org> References: <20180702143021.18864-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::243 Subject: [Qemu-devel] [PATCH 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: pbonzini@redhat.com, =?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 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 --- tests/docker/dockerfiles/debian-bootstrap.pre | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) -- 2.17.1 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