From nobody Mon Nov 23 04:34:32 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1793048916; cv=none; d=zohomail.com; s=zohoarc; b=aU4mG0yCG81Mlq7VXj9T5qU9JaiqfL6klbjUWPEw1GagnPOhDB9VDpLpaSEoPxpQn1T/aXP6o88HwL8wJPwYip2gc/+rOuKpbiLW1ng8U965iSN1vh9P9enAZt70JQrjNhOa9tjFcVzSYh458iRJPNWyfJ2FvA8mJRFXhhYO6Ks= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793048916; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=8IebwTkS3O3332ps8Y61IJPQbHUInn5QXa6/gwP0N/0=; b=BN08GRGe+pXDq5/4han+IFm6q2xJLcmKoPoRSYgc2UO0pQTgbB3lzAZqf0J1mOO12MgcxLz3FlhOC539L/HpdSmn9v6NSoy6mvrZiOdebEznvhWnDtsLMMwrJyNuFkMGlwiaC17VX6z1a8c80tlqrmoEBf1yXMUabEunn6C2DbI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 179304891601992.9727119154627; Mon, 26 Oct 2026 14:08:36 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xLRv0-0003Mk-Ts; Mon, 26 Oct 2026 17:07:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xLRuu-0003Go-EZ for qemu-devel@nongnu.org; Mon, 26 Oct 2026 17:07:41 -0400 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xLRus-0005Nk-Cm for qemu-devel@nongnu.org; Mon, 26 Oct 2026 17:07:40 -0400 Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69QJhc8K2703209 for ; Mon, 26 Oct 2026 21:07:36 GMT Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hjb54gsy6-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 26 Oct 2026 21:07:36 +0000 (GMT) Received: by mail-pg1-f200.google.com with SMTP id 41be03b00d2f7-cd6532dbd7bso2027435a12.2 for ; Mon, 26 Oct 2026 14:07:36 -0700 (PDT) Received: from pc.taild8403c.ts.net (192-80-163-190.dyn.novuscom.net. [192.80.163.190]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3adebb0dda7sm6421185a91.4.2026.10.26.14.07.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2026 14:07:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=8IebwTkS3O3 332ps8Y61IJPQbHUInn5QXa6/gwP0N/0=; b=JmB4iTJiNgR0A39IgM4a4AVo18g n9nL0IuFtFr3MdFwo4+EcJY87aB+aDvyrxBKCP3rFWZfz2KnvgcfqY/PpUNvqhOy y1AxBHuGxsuVcADdE2ebbOO35JKH+TnkOoZdfEqP7ZEPd2QW7wHDYYL7cKIuW8am IFMmaXyyBH3GW0y0fFbgRIdPo+8vYDEJo7WeIY0TOJgJ0gXljQP1HVCMpi19ef4Q Mo/mhD7P5ndTiUfdO05KqY/kEDBBqFULoPislVofqUutnUHmcn9xD0o7mRP/U3jp e4uHv53sS/xUzZRZ8VSEe/R/S1nhIeF5Lwbu24NroReJ2MvXYlsK180jbsA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1793048856; x=1793653656; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=8IebwTkS3O3332ps8Y61IJPQbHUInn5QXa6/gwP0N/0=; b=Zk4i03E8Rv1ypEizdghFLojRHqkV/HvzLp8ofQgYVfkequwCqfy66m9TB8REkxjYH/ 7RT/vhl2MtrBlT2nRjMi7veV6jvh0kQLmC98LkMf8cH6I2pBUSmcRJrx89DuSuIWs7Pu Z2RWHnW31W5wuo1mhNxH4KtcZRtl2y/0r8FtXRWoihr1hIZvIthTRBr6iT3Kfn7uHcUD gOoXvZc8EYLKYz3Uzl8fjA1M7YOO2RduiN4DMhvd/iKuewowEW9s7mQG/5AJvZOtFrlf 9RCBbh1NM0LRKvRe7CC5bC//kqLUpWCGXnIUjo+KTMXSnHpI5TYVHLLWWrjxiYcKLaTb cPbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793048856; x=1793653656; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=8IebwTkS3O3332ps8Y61IJPQbHUInn5QXa6/gwP0N/0=; b=mA1Igy999b6uxqRv+KBAEQUuQxJk2FkadLwhV1FAGcbCAMatJVCxOKAC6+cd47LO9S 5lVjRFbxhY7mqb6JhRyXM+OTtngipikLcAqBzHF2b0iN1TvOtAzKQCYcVY8ZwSGs1QF2 Gm12ERCMdc++5RuNizFB4P1CajY/3rwjcStWLRg441aiJZTTmMsTaHvxLu2tLoxwoeBf id6Yltye7kFuPwo45RGPOI55HrQKbKwLDVeHStDL9WuWWvznGoHpVHjacFe6ga2Wyur+ /xDElHHjDSTbAR4tPhXMK5pu1/6QgG6FD/hzsgl0qB9fTCGMdPLZU6fSVg3y6Ooeert+ tgkw== X-Gm-Message-State: AFq9FYL0GZXgHbv02eGzL/LjlbM/3FXQx5ZzA0O2jy+0ZOo0BIoPSQZL rwg7lh2tqVfCBC2wdYehNsZc+X6ti3kSYzpIwSsG5fcPca/rWXFSah5GxkxhDvJQ59eT3VholT2 NB6I1Ac8b6cdzbpZP9uS3VbaswTsCLZmqhn2H9J2TtNZAH//wi8YKRwXppwLSZAMq4A== X-Gm-Gg: AYBFou3XPe27jWezsvqjzNOVGBB58TWCH9zGzmrQIEmzRropm4dyaN1zaY3M88VK20y LWvKEAwZGDMPsN6zc52mk5f0SCX0LsSPEpkMTBVPmORSCAkGg7uuUfebU1ZNUkm2SltnKjksFXB 9Z2UwT2/JVCBuMlWxF6rFkb+XXtGRbQIGa86ajZwgcdrixjQLbsYQAhqcsv1FyHhiUUgEXRPvdn MqWabeVGzViI3VWLZgOcSPG2ol8OHNeGtATlU29ZPhIGpeNP7t5oT3jKE5vmtRoeBLR/tILFs3g viQBiH+F7+y4UKGNp05WG9KxGHJVbAL1/OwYBQKtmwYA2Wf8OS0p03BBs9CFKpQbHaaebSQP63F dCJY0jKw3jzrKNWF/bwmioR7BK3VHuoQAY35/22yiyA+B3fC5j9SuHho662vFAoE= X-Received: by 2002:a17:90b:1c8f:b0:3a8:699f:959d with SMTP id 98e67ed59e1d1-3adeabe535bmr7132259a91.31.1793048855796; Mon, 26 Oct 2026 14:07:35 -0700 (PDT) X-Received: by 2002:a17:90b:1c8f:b0:3a8:699f:959d with SMTP id 98e67ed59e1d1-3adeabe535bmr7132236a91.31.1793048855270; Mon, 26 Oct 2026 14:07:35 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Alex=20Benn=C3=A9e?= , peterx@redhat.com, mjt@tls.msk.ru, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Fabiano Rosas Subject: [PATCH 1/2] tests/docker/dockerfiles: add release.docker Date: Mon, 26 Oct 2026 21:07:18 +0000 Message-ID: <20261026210719.178107-2-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261026210719.178107-1-pierrick.bouvier@oss.qualcomm.com> References: <20261026210719.178107-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Info: AW1haW4tMjYxMDI2MDA4NCBTYWx0ZWRfXwEJrVxs1uuq1 lNcQVksQA6lYByVDdZMtXxeJ4EOh1An+cu9xp+csVR0ov2G8JjLirPihsmBp595CeotIrdFAvD7 mqkV1kNqR3ScuhtWcBWQtYJ9CDzfEDU= X-Authority-Analysis: v=2.4 cv=bsnZl0ai c=1 sm=1 tr=0 ts=6adfc118 cx=c_pps a=oF/VQ+ItUULfLr/lQ2/icg==:117 a=9852oil1ID9t5xBSyQ/BEA==:17 a=660iZSQnnn4A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=p0WdMEafAAAA:8 a=EUspDBNiAAAA:8 a=DfNHnWVPAAAA:8 a=IH4dkz8bHYACMdZ4P1YA:9 a=3WC7DwWrALyhR5TkjVHa:22 a=rjTVMONInIDnV1a_A2c_:22 X-Proofpoint-ORIG-GUID: -KwzaPIizW0V0VC7JM2BSoTUDv0Nvz5w X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDI2MDA4NCBTYWx0ZWRfX2quHeoLwq9fD LLUeVDurJ1D0wrBnp0Jgbg7AOoPeRbBzswyEjDbgHDSuzws5HAfOgoRVtHr7XnpFcXJa6HviYlY qJ4aspCR7/s3Cq15quFj6H6o35SZCVCP6P+X6WXJebxgnzIjguZn0R+4f3Xnq8balC7GAPhfYAt uwqilfEIFBGzkGz/eJ5zpj/XOKDHqUtlG1PEYZB/88cFAVlh5KOK6SzCFFd6QmPKhJ6v/32Nq6x PUQ268uK9X2OwLR7moGmCR9AYQQNTVf2UXoMbX7oNeNOk5gFEq1FC39oS8snLvV42CjgAUFqVAm 5hpelLPs5bFgQ1o3FttE/dFTIfknGsGx7xiDiuPHBjiq8z92zYpHLOfHXtovwS+m23tt1+7ccZ3 xayXb2NGMCnV1v17E6gsaTJHG12q9fHxLY9EXoztMjyMN1/5J5hXIM6K9s5kekKYifpAjEzShqk 00HXFZFRBqom5kKow2A== X-Proofpoint-GUID: -KwzaPIizW0V0VC7JM2BSoTUDv0Nvz5w X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-26_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 priorityscore=1501 spamscore=0 malwarescore=0 lowpriorityscore=0 clxscore=1015 phishscore=0 suspectscore=0 adultscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610260084 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0a-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1793048917978158501 Content-Type: text/plain; charset="utf-8" This new dockerfile allows to build a distroless image containing only qemu stripped release binaries, their lib dependencies, and installed artifacts (roms, keymap, ...). There is no shell, no python, nothing else. This is achieved thanks to a multi-stage build, where we add qemu binaries, artifacts and libraries in a new scratch image. Image has the minimal size possible. This is based on Ubuntu, which has the advantage to have working containers available down to 14.04. Debian old old stable have broken apt sources for instance. This unique dockerfile works for all qemu versions >=3D 3.1.0 (2018). We could build down to v0.12.0, but it would require more tweaks in the dockerfile, so we keep it simple instead. To build the image, you need to provide a qemu and ubuntu version: $ podman build -f release.Dockerfile --build-arg QEMU_VERSION=3Dv11.1.0 --b= uild-arg UBUNTU_VERSION=3D24.04 -t qemu/v11.1.0 To run it, as there is no shell, and no defined entrypoint, you need to choose the binary you want explicitely: $ podman run -it --rm qemu/v11.1.0 qemu-system-aarch64 --version Signed-off-by: Pierrick Bouvier --- tests/docker/dockerfiles/release.docker | 48 +++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 tests/docker/dockerfiles/release.docker diff --git a/tests/docker/dockerfiles/release.docker b/tests/docker/dockerf= iles/release.docker new file mode 100644 index 00000000000..ca6babde01e --- /dev/null +++ b/tests/docker/dockerfiles/release.docker @@ -0,0 +1,48 @@ +ARG UBUNTU_VERSION=3D"UBUNTU_VERSION_build_arg_must_be_set" + +FROM ubuntu:$UBUNTU_VERSION AS build + +# add deb-src for apt build-dep +RUN sed -e 's/Types: deb/Types: deb deb-src/' -i /etc/apt/sources.list.d/*= || true +RUN sed -e 's/# deb-src/deb-src/' -i /etc/apt/sources.list +# archive.canonical.com is not reachable anymore, and cause a long timeout +RUN sed -e '/archive.canonical.com/d' -i /etc/apt/sources.list + +# build dependencies +RUN apt update && \ +env DEBIAN_FRONTEND=3Dnoninteractive apt install -y git build-essential fl= ex bison +RUN apt update && \ +env DEBIAN_FRONTEND=3Dnoninteractive apt build-dep -y --arch-only qemu + +ARG QEMU_VERSION +RUN echo "QEMU_VERSION=3D${QEMU_VERSION:?QEMU_VERSION build arg must be se= t}" +ARG QEMU_REPO=3D"https://gitlab.com/qemu-project/qemu.git" + +RUN cd /tmp && \ +mkdir qemu && cd qemu && git init && \ +git remote add origin "${QEMU_REPO}" && \ +git fetch origin "${QEMU_VERSION}" --depth 1 && \ +git checkout FETCH_HEAD && \ +./configure --prefix=3D/opt/qemu --disable-docs --disable-werror && \ +make install -j $(nproc) && \ +strip /opt/qemu/bin/* && \ +rm -rf /tmp/* + +# retrieve runtime dependencies (libs) +RUN ldd /opt/qemu/bin/* | grep '=3D>' | sed -e 's/.*=3D>//' -e 's/(.*//' |= sort -u > /opt/qemu/libs +# store them in /deps/lib +RUN mkdir -p /deps/lib && cp --preserve --dereference $(cat /opt/qemu/libs= ) /deps/lib +# copy loader (with its original path) +RUN cp --preserve --parents --dereference /lib*/ld-linux* /deps/ + +##########################################################################= ###### +FROM scratch + +COPY --from=3Dbuild /deps / +# copy qemu and all associated artifacts (roms, ...) +COPY --from=3Dbuild /opt/qemu /usr + +# build with: +# podman build -f release.docker --build-arg QEMU_VERSION=3Dv11.1.0 --buil= d-arg UBUNTU_VERSION=3D24.04 -t qemu/v11.1.0 +# run with: +# podman run -it --rm qemu/v11.1.0 qemu-system-aarch64 --version --=20 2.43.0 From nobody Mon Nov 23 04:34:32 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1793048954; cv=none; d=zohomail.com; s=zohoarc; b=GtIiafBpUWa2Xn4DnpvtWn/M9xnK+mx4+okrBBee5+QxQXK6zgH5GFNNAtdWr5+Ktkc5rIOBfCV42j6PyPjAXoDO/ZukmwTLdUsxcmwXnp9sd3mKAWBIN3JZez2RgRG0fQyDZgniqqNDmVriMEJO9v7t8niRpL+32CTSXTGv/ks= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793048954; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=w/E95QJX6jMV5a0xDDXY0X3ohkAb3KmnILiG6H/GNlk=; b=Eo+3uj+yrpuiX/RhWbkhVXF4xF/YbizaiR3imMRpqTUiHKeUzDSuX5ZWGi6B7PYs0ssCpWyPNQdyfa08wtQdEOj5ZlbDXG/J6Y6PVRZ2WcDjqGID6H6FAL8cT1y1AETqh21P0tb3IvegGVCh8uPQKCq5Tcpl806LYselFPiVPH8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 179304895409424.52026297391899; Mon, 26 Oct 2026 14:09:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xLRv1-0003Pw-SB; Mon, 26 Oct 2026 17:07:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xLRuw-0003H6-07 for qemu-devel@nongnu.org; Mon, 26 Oct 2026 17:07:43 -0400 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xLRus-0005No-OG for qemu-devel@nongnu.org; Mon, 26 Oct 2026 17:07:41 -0400 Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69QIoFPB986039 for ; Mon, 26 Oct 2026 21:07:37 GMT Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hj53q2d61-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 26 Oct 2026 21:07:37 +0000 (GMT) Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-3ad704d4760so3164430a91.3 for ; Mon, 26 Oct 2026 14:07:37 -0700 (PDT) Received: from pc.taild8403c.ts.net (192-80-163-190.dyn.novuscom.net. [192.80.163.190]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3adebb0dda7sm6421185a91.4.2026.10.26.14.07.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2026 14:07:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=w/E95QJX6jM V5a0xDDXY0X3ohkAb3KmnILiG6H/GNlk=; b=aIvCBZtxUc3d6Yu5jVf7GaAdNDy flXTXOlX6eYgMBetttcwIl9rA7lDuEnjEEV1UGesS5XT+rAVckZfU8bKM/YK0YAB 0uhyQAg3YEs0VYXI3S52bFrBlj5kSTicNhJoicT2Uu2o9AxL8U3HpC+cL5EdSt3f YTcCsSR5IFX/Z2JDs5HptwxXmTeJyPi3q9l9QlwW36XF9kR2G+wV9GLCe4ZVqlZM Vc7GEO6bcOQfsVbWVRrVOuZ2AzFWPJLLPsksvsXptITxKwM3Idg+Tli5ij4mdv3d x9ZzNufUi5nKmnR+b9C2kQQIoeW9z4bF/QpkdbSsWQvb8Jvl4rZ933Q01dg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1793048857; x=1793653657; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=w/E95QJX6jMV5a0xDDXY0X3ohkAb3KmnILiG6H/GNlk=; b=iFSUbWiG7dp+ob9ShzelWonSiyTOkXiAZ8QIs6DKpUeMuCYbi6M6scRvkyRF22AuoG Ls8BOJqUVgJwpV0sq9upmLQjKxLa5NiTDEJkIwgqHK+ORpmgEeEr0hh6t2n6yiXw+ATN /CNQtdzPg8MrnIRTUCOyqcYSoJ1bF60gDNf1tMnHOOTQsioPBWCcep0t0clzKR6kDa3Q 4lHc46xaNyvLP+P86CInviGwHzvvJYwAJuLBN2xNKsTCs6JzmVOgTlyGhOnV4NEcCDJI MeYCPG4TDPjARJXhQzkbU+2Kh8vwmbaZ0l8YJl/bwMskDeTywMYY7uCVuJ6rkYnuV8hp 6ozA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793048857; x=1793653657; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=w/E95QJX6jMV5a0xDDXY0X3ohkAb3KmnILiG6H/GNlk=; b=j6kvw3ME/D0oYuNEB0hGP6ZjPw1O9ML3K+O9zw2q4P/QSK4H5degIUm0AlJPcZnYiy e0r7qAhIwbAyPinlWQhtamNo7FFgg3fv5pmUo13nvBkfp96TeCmoijZa4a3ppsP0E6JL 3cCmheHkZbqWaWxUUb40vvt37FjStAWIN03xoGPRthw+6gT5pKXU06umYspKHa8uUbnE A0l73gk5efzSY89UNWtDP5WpptJlmvg/INAfD4j75KLOWugo2JCRUOEfmPWH07UQJ9Uu zV1sR1rgYYTbZVbmDT3LLuosBERM7PIjXpFUFNQEuaeFKUCV2B8x4pCZNmzw0zdWCc10 AIwA== X-Gm-Message-State: AFq9FYIxM8237ETmX9htYS4Fvwqh68jTflhV8wd4jj84OlbsTgRHTNsE 6NrtscCWkCbyYH4GB7If7YyZZaaYI9F/Edu28qiUUHZwaKFowhXmyO/scJGrPPtRVDyUriy3wFD zEOlKcvzSQRmFYHoGrGXHCoAMvQLQJoZsMjL9oVcF1wi8CTAm2wkCtvFgsfnELQ9OQA== X-Gm-Gg: AYBFou2295oefCeubkcK5QOuCYpJFRGvSkhUds+Fr1oA8SgMG+ZBNaEpYpOFIwxfc0H Vmq9dPhWOpnZJwwqDJerNTX3QTxgbLDo2T1Z+EDzLH36cjKPNKpzME4tm79EdSwvNB5VegkBh9n gm+oDnXmucHKYmodizkF5Z/HaWonajGYC/WX7xlT2BNQd0A46A0e4y4mdtmztVR9FqxWpkI/ZIW V9bkS+3S4ztrb72QVHSJ5DrAOyV2uqcxu1/ziRAtDLprwZ2XTgpLrlerYI3VFUX0T0+7KqcIrOM bEKGRlx+a+r1PEAw+Kc5nxJrmJ31tkfhIhvf57eIza5VAcnoBulF/3AJAPPoHhlmuZAPDPyEgyk m8urRoqRTXus2e7CJS3Y/DNmL206Zs9d1qol6unTkX3yMLjGuA/7bN75oECxML6c= X-Received: by 2002:a17:90b:3b41:b0:3ac:7c52:fb04 with SMTP id 98e67ed59e1d1-3adeae7b8f9mr6640505a91.44.1793048856487; Mon, 26 Oct 2026 14:07:36 -0700 (PDT) X-Received: by 2002:a17:90b:3b41:b0:3ac:7c52:fb04 with SMTP id 98e67ed59e1d1-3adeae7b8f9mr6640487a91.44.1793048855963; Mon, 26 Oct 2026 14:07:35 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Alex=20Benn=C3=A9e?= , peterx@redhat.com, mjt@tls.msk.ru, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Fabiano Rosas Subject: [PATCH 2/2] scripts: add build_release_container.sh Date: Mon, 26 Oct 2026 21:07:19 +0000 Message-ID: <20261026210719.178107-3-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261026210719.178107-1-pierrick.bouvier@oss.qualcomm.com> References: <20261026210719.178107-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Info: AW1haW4tMjYxMDI2MDA4NCBTYWx0ZWRfXwjq6Nfy5rejD VFiouw4Vha2fSghmQ4cXktENXvdCdwPceT95iQuzOGXGOkMdKf2k1N+DXYvloqhm6ACLmnVTHZs JJ1dXlVUhz9OnOeZsR93utJ/eRn/ciM= X-Proofpoint-ORIG-GUID: Boxs4Jm_4wtPbijYWNb3xYRd7ptuB1Uc X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDI2MDA4NCBTYWx0ZWRfXx3CKlLl075lK uI/9sNIZkWEgRE8xKux8RtogGhlT0oxNiGu+xJS2j2FAw3Qiq9bCAERY1Y1onTZJ/F6O68O+W15 M7dKkGf78Ue5RZA6iW/7q4OvHzicCvxioCy2+d4/vANlwRU5S9OAhIWlQ2xtc8CWaaUBHpj4zIa dAa53Bm+30686RFcnaT3O2wcqo7SflNtRBXfAvS+liWJmpjNurvwlZYDCU9ykSLRfQ0xJA7nESN 8uqsm+t81X7R0j6cEFYmuwgIBD9uQkvR87rJow+hP/LZXMd36r0/PUZykcMeFbr5rsm4PiusmL+ fSUrTRCBEwyaHO2rkBa6levG8QDTJz5QL5m3nOWh8zUHHZ6EPEZJq4E+h6BrE/YdU8JHGKV65O9 zxFlO0zgkrWJMEH6tFUydrkwZGugLvecvuhchOSECRLN48nV+Qur3uSGkKivBKZVQWLDLmCxmNe wY7cgeHR+DgVyD/GWGw== X-Authority-Analysis: v=2.4 cv=D93SufRj c=1 sm=1 tr=0 ts=6adfc119 cx=c_pps a=vVfyC5vLCtgYJKYeQD43oA==:117 a=9852oil1ID9t5xBSyQ/BEA==:17 a=660iZSQnnn4A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=p0WdMEafAAAA:8 a=EUspDBNiAAAA:8 a=Ab9DfM9NdPcTtTRkZkQA:9 a=rl5im9kqc5Lf4LNbBjHf:22 X-Proofpoint-GUID: Boxs4Jm_4wtPbijYWNb3xYRd7ptuB1Uc X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-26_04,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 spamscore=0 adultscore=0 lowpriorityscore=0 impostorscore=0 phishscore=0 suspectscore=0 malwarescore=0 priorityscore=1501 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610260084 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0a-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1793048956066158500 Content-Type: text/plain; charset="utf-8" This script allows to easily build a qemu release container, based on dockerfile introduced in previous commit. It names image "qemu/$version" and automatically detects which ubuntu version should be used to build it. $ ./scripts/build_release_container.sh v3.1.0 $ podman run -it --rm qemu/v3.1.0 qemu-system-arm --version QEMU emulator version 3.1.0 (-dirty) Copyright (c) 2003-2018 Fabrice Bellard and the QEMU Project developers Signed-off-by: Pierrick Bouvier --- scripts/build_release_container.sh | 63 ++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100755 scripts/build_release_container.sh diff --git a/scripts/build_release_container.sh b/scripts/build_release_con= tainer.sh new file mode 100755 index 00000000000..ae57aa21db3 --- /dev/null +++ b/scripts/build_release_container.sh @@ -0,0 +1,63 @@ +#!/usr/bin/env bash +# SPDX-License-Identifier: GPL-2.0-or-later + +set -euo pipefail + +script_dir=3D$(dirname $(readlink -f $0)) + +# The oldest buildable release we support is v3.1.0, as previous ones requ= ire +# additional tweaks in Dockerfile. +# For building previous releases (down to v0.12.0), +# see: 20261014005338.34657-1-pierrick.bouvier@oss.qualcomm.com +oldest_release=3Dv3.1.0 + +if [ $# -lt 1 ] || [ $# -gt 2 ]; then + echo "usage: version [git_repo]" + echo + echo "- version: tag or sha-1 (>=3D v3.1.0)" + echo "- git_repo: (optional) QEMU repository URL" + exit 1 +fi +version=3D$1;shift + +git_repo=3D"https://gitlab.com/qemu-project/qemu.git" +if [ $# -eq 1 ]; then + git_repo=3D$1;shift +fi + +year=3D$(date +%Y) +month=3D$(date +%m) +if git rev-parse $version >& /dev/null; then + year=3D$(git log -1 --format=3D'%cd' --date=3D'format:%Y' $version) + month=3D$(git log -1 --format=3D'%cd' --date=3D'format:%m' $version) +fi + +# Ubuntu LTS are published every (even) two years in April. +ubuntu=3D +if [ $((year % 2)) -eq 1 ]; then + # pick latest LTS from previous year + ubuntu=3D$((year - 1)) +elif [ $month -gt 6 ]; then + # LTS published this year should work + ubuntu=3D$year +else + # pick latest LTS from two years ago + ubuntu=3D$((year - 2)) +fi +if [ $ubuntu -lt 2014 ]; then + # oldest ubuntu release available with containers is 14.04 + ubuntu=3D2014 +fi +ubuntu=3D$((ubuntu - 2000)) +ubuntu_version=3D$ubuntu.04 + +dockerfile=3D$script_dir/../tests/docker/dockerfiles/release.docker +docker=3D$($script_dir/../tests/docker/docker.py probe) + +set -x +$docker build \ + -f $dockerfile \ + --build-arg QEMU_VERSION=3D$version \ + --build-arg UBUNTU_VERSION=3D$ubuntu_version \ + --build-arg QEMU_REPO=3D"$git_repo" \ + -t qemu/$version --=20 2.43.0