From patchwork Wed Sep 22 15:15:27 2021 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: 514512 Delivered-To: patch@linaro.org Received: by 2002:a17:906:f46:0:0:0:0 with SMTP id h6csp612377ejj; Wed, 22 Sep 2021 08:16:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5s2ySAr1ChzibN1MfYkSSqhsQhe//Pz0wlHNW9BflCVgeyXyojw/9S3xo8Jqa9+/mRA3q X-Received: by 2002:a37:6841:: with SMTP id d62mr323045qkc.107.1632323788981; Wed, 22 Sep 2021 08:16:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632323788; cv=none; d=google.com; s=arc-20160816; b=ajCph9IxuPgv1SM3Jteidf6lrozVsZ19bDvxsWIgsdA/DQ0khp2hVEJXGMgta02SAq 2wj+/dqxSogGX/y5QWgLFQKdFPqOmCcq1X41gmVT/ykMylupHoip7vVr8AYefAx5dj/L M21yXcnugm8XHRGxox8UyUVaUwPI+ket1UIyLnWAC4Hwoi9gVp3cVaH3A4KIqMYFLVKm dOiCnxRqIm9nd1C+E8K+k3Ee3E/CgcO05ssg6KCD+NG2j0WHr/jMyLZQLO2VA+EKrs1O t9YifcamHJlRvulsO/zdgYWim9DVTaRiXLsWBhvuw2/o6IGRbWIwbPXe8knwUYA/cB99 U5pA== 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:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature; bh=LWlwonPv52RW4xdQ6KuhV9HP9phCb3hl23YysT8XHdM=; b=Qvmwb6To4cAvnwHRGfczjEAl0PGtBlTNhti4vXRHzs1CdvQv4uWd0PJ1Ynxysrmm3Z RTzfvGjKYuT8YWzQ38VVji+flmfe5wZaYX/J00RyNVI5eFORMAJgcQZQxA5oCGFx1LB8 vHe3oAhSgXNudjAsQCxp9dhuIL0KhXHvcevZRhWfvkUBTqaiYbXrid/BuLKImLvLAISL HayLKxfz+/v9SSLRsPh+Xz9UlVIY/9CYRTuJ1Bei6fXMC71+fluyKBFiZgBjKl5hiKe1 qyHkIRq87rHBUxsQYjl+hWvrOv64iHA0Za2UYgwhIVAz7H/55TzvP61HdhidOUGIPtLT SuNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Ei5VbExm; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id d9si2236630qty.328.2021.09.22.08.16.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 22 Sep 2021 08:16:28 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Ei5VbExm; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:55084 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mT3z2-0007tx-Ea for patch@linaro.org; Wed, 22 Sep 2021 11:16:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59810) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mT3yO-0007to-NN for qemu-devel@nongnu.org; Wed, 22 Sep 2021 11:15:49 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:34369) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mT3yH-0005aW-A9 for qemu-devel@nongnu.org; Wed, 22 Sep 2021 11:15:47 -0400 Received: by mail-wr1-x430.google.com with SMTP id t8so8015808wri.1 for ; Wed, 22 Sep 2021 08:15:38 -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:mime-version :content-transfer-encoding; bh=LWlwonPv52RW4xdQ6KuhV9HP9phCb3hl23YysT8XHdM=; b=Ei5VbExmn+6wJN8QI51tHYFMgtZ6AWnWg35xt3BFvg9ZlyyjKeRpaC7h/UwihurP9V McAzilIo0/2j2Zpm0FjI7oLyKYSjWWvK608v8nQJtlwkI6cxm/EHEIgXKvguKIPfEIf3 5/M9FEjZssLFsVYkeNKo2SuIHgRwMFK0TX8wAnJauIYLDrsoheveRwHPxlGvpYblSgHy 3v1matpzQyrwH3fCnWREONtGZkx/yaXAHxleb15lpIcMLvVBq3SluBMnSoK5RYupg5yi obos2ny4gVUiyTx5BczWRGW7P+guLcjTmNUa6jpMhNkmMp4LBzexmTfI4/zXl+a9SQXM t9VA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=LWlwonPv52RW4xdQ6KuhV9HP9phCb3hl23YysT8XHdM=; b=KJW50lp6sRfZOc7BUKlsnh4DHahGi80VgSvtttuBbOhubYaN8Z4U2UDMxf3OQeNsyY 5hxHjOFgcWO8/NNYn9Fzw3YsvoDHWBc7ug4MyeZQ306DKmNrDgXh7AIwgF4tlqhgWfR6 E08WAbqxUh5zrsDs5Sv6C6eQHexetCzflC/P0WwFa6BudZbE2G6HTroz0+ShlNjWBl4m I0uOiAjNkPKbB6H3tMCNKGnmGtciNWbUyvWTCRr1yx6EfcnFtpeb+ggaLCcm0/NEIyY4 pnn02OBVCV1W/CS8P/enVHCoW/p14Q7NCCacp5/+Ftd5/KqY+Tm7Ag8nI6UYpFdgSa7Q bvGQ== X-Gm-Message-State: AOAM531OeRFLQ4Zg22vyWraqhqLZfcRAp6JfjBmibhNqAhgpD+z5lQLi waqHWFwAhRKbqE8JkGrMZId4yw== X-Received: by 2002:a1c:4e11:: with SMTP id g17mr10768727wmh.130.1632323737003; Wed, 22 Sep 2021 08:15:37 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id z5sm6857058wmp.26.2021.09.22.08.15.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Sep 2021 08:15:35 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 611461FF96; Wed, 22 Sep 2021 16:15:34 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [RFC PATCH] tests/docker: add a debian-native image and make available Date: Wed, 22 Sep 2021 16:15:27 +0100 Message-Id: <20210922151528.2192966-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , Anders Roxell , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Willian Rampazzo , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This image is intended for building whatever the native versions of QEMU are for the host architecture. This will hopefully be an aid for 3rd parties who want to be able to build QEMU themselves without redoing all the dependencies themselves. We disable the registry because we currently don't have multi-arch support there. Signed-off-by: Alex Bennée Cc: Anders Roxell --- tests/docker/Makefile.include | 4 ++ tests/docker/common.rc | 10 +++- tests/docker/dockerfiles/debian-native.docker | 49 +++++++++++++++++++ 3 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 tests/docker/dockerfiles/debian-native.docker -- 2.30.2 Acked-by: Willian Rampazzo Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Tested-by: Anders Roxell diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 3b03763186..2f276cc4b2 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -145,6 +145,10 @@ docker-image-debian-s390x-cross: docker-image-debian10 docker-image-debian-sh4-cross: docker-image-debian10 docker-image-debian-sparc64-cross: docker-image-debian10 +# The native build should never use the registry +docker-image-debian-native: DOCKER_REGISTRY= + + # # The build rule for hexagon-cross is special in so far for most of # the time we don't want to build it. While dockers caching does avoid diff --git a/tests/docker/common.rc b/tests/docker/common.rc index c5cc33d366..e6f8cee0d6 100755 --- a/tests/docker/common.rc +++ b/tests/docker/common.rc @@ -12,8 +12,14 @@ # the top-level directory. # This might be set by ENV of a docker container... it is always -# overriden by TARGET_LIST if the user sets it. -DEF_TARGET_LIST=${DEF_TARGET_LIST:-"x86_64-softmmu,aarch64-softmmu"} +# overriden by TARGET_LIST if the user sets it. We special case +# "none" to allow for other options like --disable-tcg to restrict the +# builds we eventually do. +if test "$DEF_TARGET_LIST" = "none"; then + DEF_TARGET_LIST="" +else + DEF_TARGET_LIST=${DEF_TARGET_LIST:-"x86_64-softmmu,aarch64-softmmu"} +fi requires_binary() { diff --git a/tests/docker/dockerfiles/debian-native.docker b/tests/docker/dockerfiles/debian-native.docker new file mode 100644 index 0000000000..efd55cb6e0 --- /dev/null +++ b/tests/docker/dockerfiles/debian-native.docker @@ -0,0 +1,49 @@ +# +# Docker Debian Native +# +# This this intended to build QEMU on native host systems. Debian is +# chosen due to the broadest range on supported host systems for QEMU. +# +# This docker target is based on the docker.io Debian Bullseye base +# image rather than QEMU's base because we would otherwise confuse the +# build grabbing stuff from the registry built for other +# architectures. +# +FROM docker.io/library/debian:bullseye-slim +MAINTAINER Alex Bennée + +# Duplicate deb line as deb-src +RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list + +# Install common build utilities +RUN apt update && \ + DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata + +RUN apt update && \ + DEBIAN_FRONTEND=noninteractive eatmydata \ + apt build-dep -yy --arch-only qemu + +RUN apt update && \ + DEBIAN_FRONTEND=noninteractive eatmydata \ + apt install -y --no-install-recommends \ + cscope \ + genisoimage \ + exuberant-ctags \ + global \ + libbz2-dev \ + liblzo2-dev \ + libgcrypt20-dev \ + libfdt-dev \ + librdmacm-dev \ + libsasl2-dev \ + libsnappy-dev \ + libvte-dev \ + netcat-openbsd \ + ninja-build \ + openssh-client \ + python3-numpy \ + python3-opencv \ + python3-venv + +ENV QEMU_CONFIGURE_OPTS $QEMU_CONFIGURE_OPTS +ENV DEF_TARGET_LIST "none"