All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Cc: qemu-devel@nongnu.org,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>
Subject: Re: [PATCH 3/7] tests/lci/refresh: add parameter to override container registry
Date: Tue, 22 Sep 2026 18:55:18 +0100	[thread overview]
Message-ID: <arLBBjS_T40wBa3X@redhat.com> (raw)
In-Reply-To: <20260921231458.3369-4-pierrick.bouvier@oss.qualcomm.com>

On Mon, Sep 21, 2026 at 11:14:54PM +0000, Pierrick Bouvier wrote:
> We'll use this in next patch to switch FROM docker.io/library to
> docker.io/amd64. It would not make sense to add a new target to
> libvirt-ci for this, since it's just a variant of an existing target.
> Simply replace container registry with arch specific one.

We shouldn't need to add new targets to lcitool for this,
rather it would be enhanced to include a list of arch
specific container images.

eg in

https://gitlab.com/libvirt/libvirt-ci/-/blob/master/lcitool/facts/targets/debian-13.yml?ref_type=heads

We would extend:

  containers:
    base: docker.io/library/debian:13-slim

to allow for

  containers:
    base: docker.io/library/debian:13-slim
    aarch64:  docker.io/amd64/debian:13-slim
    ...more...

such that we default to the 'base' image name, unless
there is an arch specific name defined. That would be
a fairly quick extension to impl in lcitool.

> 
> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
> ---
>  tests/lcitool/refresh | 17 +++++++++++------
>  1 file changed, 11 insertions(+), 6 deletions(-)
> 
> diff --git a/tests/lcitool/refresh b/tests/lcitool/refresh
> index 9a71af0e41d..4e3cbb81acf 100755
> --- a/tests/lcitool/refresh
> +++ b/tests/lcitool/refresh
> @@ -12,6 +12,7 @@
>  # or (at your option) any later version. See the COPYING file in
>  # the top-level directory.
>  
> +import re
>  import sys
>  import subprocess
>  
> @@ -41,7 +42,7 @@ def atomic_write(filename, content):
>          raise
>  
>  
> -def generate(filename, cmd, trailer):
> +def generate(filename, cmd, trailer, registry_path):
>      print("Generate %s" % filename)
>      lcitool = subprocess.run(cmd, capture_output=True, encoding='utf8')
>  
> @@ -49,6 +50,10 @@ def generate(filename, cmd, trailer):
>          raise Exception("Failed to generate %s: %s" % (filename, lcitool.stderr))
>  
>      content = lcitool.stdout
> +
> +    if registry_path is not None:
> +        content = re.sub("FROM.*/", "FROM " + registry_path + '/', content)
> +
>      if trailer is not None:
>          content += trailer
>      atomic_write(filename, content)
> @@ -64,7 +69,7 @@ add_user_mapping = [
>  ]
>  
>  def generate_dockerfile(host, target, project="qemu", cross=None, trailer=None,
> -                        enable_rust=True):
> +                        enable_rust=True, registry_path=None):
>      filename = Path(src_dir, "tests", "docker", "dockerfiles", host + ".docker")
>      cmd = lcitool_cmd + ["dockerfile"]
>      if cross is not None:
> @@ -79,26 +84,26 @@ def generate_dockerfile(host, target, project="qemu", cross=None, trailer=None,
>  
>      if enable_rust:
>          trailer += "\nENV ENABLE_RUST=1\n"
> -    generate(filename, cmd, trailer)
> +    generate(filename, cmd, trailer, registry_path)
>  
>  
>  def generate_vars(target, trailer=None):
>      filename = Path(src_dir, ".gitlab-ci.d", target + ".vars")
>      cmd = lcitool_cmd + ["variables", "--format", "shell", target, "qemu"]
> -    generate(filename, cmd, trailer)
> +    generate(filename, cmd, trailer, None)
>  
>  
>  def generate_pkglist(vm, target, project="qemu"):
>      filename = Path(src_dir, "tests", "vm", "generated", vm + ".json")
>      cmd = lcitool_cmd + ["variables", "--format", "json", target, project]
> -    generate(filename, cmd, None)
> +    generate(filename, cmd, None, None)
>  
>  
>  def generate_yaml(os, target, arch, trailer=None):
>      filename = Path(src_dir, "scripts", "ci", "setup", os, f"{target}-{arch}.yaml")
>      cmd = lcitool_cmd + ["variables", "--format", "yaml", "-a",
>                           arch, target, "qemu"]
> -    generate(filename, cmd, trailer)
> +    generate(filename, cmd, trailer, None)
>  
>  
>  alpine_extras = r"""
> -- 
> 2.43.0
> 
> 

With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|



  parent reply	other threads:[~2026-09-22 17:56 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-21 23:14 [PATCH 0/7] tests/tcg: use x86_64 cross containers on all host architectures Pierrick Bouvier
2026-09-21 23:14 ` [PATCH 1/7] tests/tcg/meson.build: force use of linux/amd64 platform for containers Pierrick Bouvier
2026-09-22  4:34   ` Philippe Mathieu-Daudé
2026-09-22 18:10   ` Daniel P. Berrangé
2026-09-22 18:17     ` Pierrick Bouvier
2026-09-21 23:14 ` [PATCH 2/7] tests/docker/dockerfiles: refresh images Pierrick Bouvier
2026-09-22  4:29   ` Philippe Mathieu-Daudé
2026-09-22 16:15   ` Pierrick Bouvier
2026-09-22 16:41     ` Philippe Mathieu-Daudé
2026-09-22 16:54     ` Daniel P. Berrangé
2026-09-22 17:16       ` Pierrick Bouvier
2026-09-22 17:35         ` Daniel P. Berrangé
2026-09-22 17:41           ` Philippe Mathieu-Daudé
2026-09-22 17:41           ` Pierrick Bouvier
2026-09-22 17:42             ` Pierrick Bouvier
2026-09-22 17:44             ` Daniel P. Berrangé
2026-09-22 17:46               ` Pierrick Bouvier
2026-09-22 17:54       ` Pierrick Bouvier
2026-09-21 23:14 ` [PATCH 3/7] tests/lci/refresh: add parameter to override container registry Pierrick Bouvier
2026-09-22  4:31   ` Philippe Mathieu-Daudé
2026-09-22 17:55   ` Daniel P. Berrangé [this message]
2026-09-22 18:04     ` Daniel P. Berrangé
2026-09-22 18:22       ` Pierrick Bouvier
2026-09-22 18:29         ` Daniel P. Berrangé
2026-09-22 18:33           ` Pierrick Bouvier
2026-09-22 19:01             ` Daniel P. Berrangé
2026-09-22 19:03               ` Pierrick Bouvier
2026-09-23 12:13                 ` Daniel P. Berrangé
2026-09-23 14:00                   ` Pierrick Bouvier
2026-09-21 23:14 ` [PATCH 4/7] tests/docker/dockerfiles: use docker.io/amd64 for tcg-tests containers Pierrick Bouvier
2026-09-22  4:31   ` Philippe Mathieu-Daudé
2026-09-21 23:14 ` [PATCH 5/7] tests/docker/dockerfiles/debian-all-test: remove arch specific bits Pierrick Bouvier
2026-09-21 23:14 ` [PATCH 6/7] tests/tcg/meson.build: remove cc_docker_host_arch Pierrick Bouvier
2026-09-21 23:14 ` [PATCH 7/7] tests/tcg/loongarch64/system: deactivate loongarch64-softmmu-memory (hang on aarch64 host) Pierrick Bouvier
2026-09-23 18:59 ` [PATCH 0/7] tests/tcg: use x86_64 cross containers on all host architectures Pierrick Bouvier

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=arLBBjS_T40wBa3X@redhat.com \
    --to=berrange@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=philmd@oss.qualcomm.com \
    --cc=pierrick.bouvier@oss.qualcomm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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.