From patchwork Tue Jul 3 10:14:41 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: 140941 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp982621ljj; Tue, 3 Jul 2018 03:23:59 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdDRXoFn78EcgIsh/7Sxp/QXZhBD0wA4Q2Qv6qN9ASCntLHM6jnypauck15Xoxt1k+4gfqn X-Received: by 2002:aed:3b08:: with SMTP id p8-v6mr27062644qte.103.1530613439354; Tue, 03 Jul 2018 03:23:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530613439; cv=none; d=google.com; s=arc-20160816; b=sWvaD1tWCknauuKpBq0in07st/16L0rKejalise7xDFrgQNDxV4AUFS36NZHZUd3vl a0lodIU9l8jJQfVAY+S4x5kJmSewxmTV1i92wZ7GczIUxslSLCqmWL4UYVpE6ubUJvbc KiA3nN9sbuTVUY/uI4NLvPDiTUQCgWrkFAIf13XUA3WcB1zpuCp5q4/W3RrbbApovpdW gamsHp5km+zr1YlQjxpUfaifpz9DWbAEP/XEnYZ2s5KRPZIfBhsBqOzjokEFcfKfBKyr bDVga17ZJg53L+tDE7Qoxb4wfRgJan7EPsqYQk96xPnEKjVmY/U1EZQjTezUaooRF5sU LT4Q== 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=d5fh0HYbBLhnTQ0XI77AOwcq9LFsi8r+Xt2dvMzouDK5KYKw9IBS7JhEz4c0VzSSGh N23YN6/JWIZMe1+zMKMQewRAji98P/UJ0G4lLMVaHHz+gM5gKskw22XB/vkvhhwEG9sO GLyNIZebD3PyXx09K5EXEMxlXNp07KAhyWXekbjHlnlj91JwRJlVAKxv7ndPwcXSCNmB EquhtyS0ZjeGDehkoRydorsx1Mlou+Iiv8y/rHj9cLXvfrHrXUTML1ggm7pzIBwJbf0t E0e0dF2c5D3JLRA9G8ZWyzPpgDi7h0AhqzibsBpVzfcqnlPFvqOOZJvfGSj0bnWeHXac VjQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=AVItRWto; 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 e6-v6si701381qvj.61.2018.07.03.03.23.59 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 03 Jul 2018 03:23:59 -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=AVItRWto; 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]:39400 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1faITW-0004s8-PL for patch@linaro.org; Tue, 03 Jul 2018 06:23:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43549) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1faIKq-0006ry-4J for qemu-devel@nongnu.org; Tue, 03 Jul 2018 06:15:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1faIKo-0008Ug-VV for qemu-devel@nongnu.org; Tue, 03 Jul 2018 06:15:00 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:52681) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1faIKo-0008UC-Q2 for qemu-devel@nongnu.org; Tue, 03 Jul 2018 06:14:58 -0400 Received: by mail-wm0-x244.google.com with SMTP id w16-v6so1696814wmc.2 for ; Tue, 03 Jul 2018 03:14:58 -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=AVItRWtoVMejOxkPiLWYzVdtQQ0OjbpQpI5en+KutecULt0CDAbftT7n+QxswVtbqe uim3Omc9NUlcCvCPB4mjmNOKeuorinOmbdJzzC1Ot/rsySdL1TIKcra0PmucAyelbwt4 4a7Cu6bSJecY1pdjf6ktn8o3o0TgfI+pBv8eU= 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=q1axzAlHPbsX4leuXTYdkrrdV8BMIaEGQBpwh0SMPkTy6I8guWSE1XDi8gM2QEnlKy abiCGlc0jvwhaJoinitDFEW9z4CgQ+h+LpYnA4omOHLwoDCeNoWj0GS54Dci2An9JkqZ fbdDGR2rTqe8xMIrFfI7Cn5RZBfHs4cz71ElEn6LEUZ5auLuoncZ3MrSGCNgRW8rSuuZ V15075L3iWYDcVZpJA0zwQg+p7A4iY695lDfk1yuJSX+T+EFRlJ9KE3Nxqijg2a5Ifoh XjVtHczRXiGTdx/iyckwab9gyEpmE4BU4U78PJL2rYrepg50hIlm7eCzN4pxfVFlXb+J yDlA== X-Gm-Message-State: APt69E1CFIT1pHmZU48dHsfEQRXZ4e/tFgpGbvFmvD2mTsHGCPieNhLQ KooKkI+9bPiIoMcL/MJ76Kihkg== X-Received: by 2002:a7b:c01a:: with SMTP id c26-v6mr10724505wmb.33.1530612897576; Tue, 03 Jul 2018 03:14:57 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id p124-v6sm1524323wmb.28.2018.07.03.03.14.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Jul 2018 03:14:51 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id DEE753E0178; Tue, 3 Jul 2018 11:14:45 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Tue, 3 Jul 2018 11:14:41 +0100 Message-Id: <20180703101444.23778-18-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180703101444.23778-1-alex.bennee@linaro.org> References: <20180703101444.23778-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::244 Subject: [Qemu-devel] [PULL 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: agraf@suse.de, =?utf-8?q?Alex_Benn=C3=A9e?= , richard.henderson@linaro.org, qemu-devel@nongnu.org, f4bug@amsat.org, cota@braap.org, famz@redhat.com, aurelien@aurel32.net 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