From: Fabiano Rosas <farosas@suse.de>
To: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>,
qemu-devel@nongnu.org
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
peterx@redhat.com, mjt@tls.msk.ru,
"Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>,
"Pierrick Bouvier" <pierrick.bouvier@oss.qualcomm.com>
Subject: Re: [PATCH v5 2/2] scripts: add build_release_container.sh
Date: Thu, 29 Oct 2026 11:43:16 -0300 [thread overview]
Message-ID: <87ik2kin3v.fsf@suse.de> (raw)
In-Reply-To: <20261029000853.15166-3-pierrick.bouvier@oss.qualcomm.com>
Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com> writes:
> 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
>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
> ---
> 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_container.sh
> new file mode 100755
> index 00000000000..7dd477deea8
> --- /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=$(dirname $(readlink -f $0))
> +
> +# The oldest buildable release we support is v3.1.0, as previous ones require
> +# additional tweaks in Dockerfile.
> +# For building previous releases (down to v0.12.0),
> +# see: 20261014005338.34657-1-pierrick.bouvier@oss.qualcomm.com
> +oldest_release=v3.1.0
> +
> +if [ $# -lt 1 ] || [ $# -gt 2 ]; then
> + echo "usage: version [git_repo]"
> + echo
> + echo "- version: tag or sha-1 (>= v3.1.0)"
> + echo "- git_repo: (optional) QEMU repository URL"
> + exit 1
> +fi
> +version=$1;shift
> +
> +git_repo="https://gitlab.com/qemu-project/qemu.git"
> +if [ $# -eq 1 ]; then
> + git_repo=$1;shift
> +fi
> +
> +year=$(date +%Y)
> +month=$(date +%m)
> +if git rev-parse $version >& /dev/null; then
> + year=$(git log -1 --format='%cd' --date='format:%Y' $version)
> + month=$(git log -1 --format='%cd' --date='format:%m' $version)
> +fi
> +
> +# Ubuntu LTS are published every (even) two years in April.
> +ubuntu=
> +if [ $((year % 2)) -eq 1 ]; then
> + # pick latest LTS from previous year
> + ubuntu=$((year - 1))
> +elif [ $month -gt 6 ]; then
> + # LTS published this year should work
> + ubuntu=$year
> +else
> + # pick latest LTS from two years ago
> + ubuntu=$((year - 2))
> +fi
> +if [ $ubuntu -lt 2014 ]; then
> + # oldest ubuntu release available with containers is 14.04
> + ubuntu=2014
> +fi
> +ubuntu=$((ubuntu - 2000))
> +ubuntu_version=$ubuntu.04
> +
> +dockerfile=$script_dir/../tests/docker/dockerfiles/release.docker
> +docker=$($script_dir/../tests/docker/docker.py probe)
> +
> +set -x
> +$docker build . \
> + -f $dockerfile \
> + --build-arg QEMU_VERSION=$version \
> + --build-arg UBUNTU_VERSION=$ubuntu_version \
> + --build-arg QEMU_REPO="$git_repo" \
> + -t qemu/$version
I have successfully tested the migration-next branch with this
series. It's a great improvement over what I had before. Thank you for
this work.
Reviewed-by: Fabiano Rosas <farosas@suse.de>
prev parent reply other threads:[~2026-10-29 14:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-29 0:08 [PATCH v5 0/2] releases: build and run any QEMU release easily! Pierrick Bouvier
2026-10-29 0:08 ` [PATCH v5 1/2] tests/docker/dockerfiles: add release.docker Pierrick Bouvier
2026-10-29 14:41 ` Fabiano Rosas
2026-10-29 17:08 ` Pierrick Bouvier
2026-10-29 18:39 ` Fabiano Rosas
2026-10-29 19:15 ` Pierrick Bouvier
2026-10-29 19:35 ` Fabiano Rosas
2026-10-29 19:43 ` Pierrick Bouvier
2026-10-29 20:10 ` Fabiano Rosas
2026-10-29 20:30 ` Pierrick Bouvier
2026-10-29 0:08 ` [PATCH v5 2/2] scripts: add build_release_container.sh Pierrick Bouvier
2026-10-29 14:43 ` Fabiano Rosas [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ik2kin3v.fsf@suse.de \
--to=farosas@suse.de \
--cc=alex.bennee@linaro.org \
--cc=mjt@tls.msk.ru \
--cc=peterx@redhat.com \
--cc=philmd@oss.qualcomm.com \
--cc=pierrick.bouvier@oss.qualcomm.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.