Re: [RFC PATCH] tests/docker: merge debian-native with debian-amd64

2023-11-08 Thread Anders Roxell
On Wed, 8 Nov 2023 at 17:56, Alex Bennée  wrote:
>
> debian-native isn't really needed and suffers from the problem of
> tracking a distros dependencies rather than the projects. With a
> little surgery we can make the debian-amd64 container architecture
> neutral and allow people to use it to build a native QEMU.
>
> Rename it so it follows the same non-arch pattern of the other distro
> containers.
>
> Signed-off-by: Alex Bennée 
> Cc: Anders Roxell 

I tried it on my arm machine and it worked as expected.
And this should work for me

Tested-by: Anders Roxell 

Cheers,
Anders

> ---
>  .gitlab-ci.d/buildtest.yml| 12 ++---
>  .gitlab-ci.d/containers.yml   |  2 +-
>  tests/docker/Makefile.include |  3 --
>  tests/docker/dockerfiles/debian-native.docker | 54 ---
>  .../{debian-amd64.docker => debian.docker}|  7 ++-
>  tests/lcitool/refresh |  9 ++--
>  6 files changed, 18 insertions(+), 69 deletions(-)
>  delete mode 100644 tests/docker/dockerfiles/debian-native.docker
>  rename tests/docker/dockerfiles/{debian-amd64.docker => debian.docker} (96%)
>
> diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml
> index da72f7c690..7f9af83b10 100644
> --- a/.gitlab-ci.d/buildtest.yml
> +++ b/.gitlab-ci.d/buildtest.yml
> @@ -70,7 +70,7 @@ build-system-debian:
>needs:
>  job: amd64-debian-container
>variables:
> -IMAGE: debian-amd64
> +IMAGE: debian
>  CONFIGURE_ARGS: --with-coroutine=sigaltstack
>  TARGETS: arm-softmmu i386-softmmu riscv64-softmmu sh4eb-softmmu
>sparc-softmmu xtensa-softmmu
> @@ -82,7 +82,7 @@ check-system-debian:
>  - job: build-system-debian
>artifacts: true
>variables:
> -IMAGE: debian-amd64
> +IMAGE: debian
>  MAKE_CHECK_ARGS: check
>
>  avocado-system-debian:
> @@ -91,7 +91,7 @@ avocado-system-debian:
>  - job: build-system-debian
>artifacts: true
>variables:
> -IMAGE: debian-amd64
> +IMAGE: debian
>  MAKE_CHECK_ARGS: check-avocado
>  AVOCADO_TAGS: arch:arm arch:i386 arch:riscv64 arch:sh4 arch:sparc 
> arch:xtensa
>
> @@ -101,7 +101,7 @@ crash-test-debian:
>  - job: build-system-debian
>artifacts: true
>variables:
> -IMAGE: debian-amd64
> +IMAGE: debian
>script:
>  - cd build
>  - make NINJA=":" check-venv
> @@ -589,7 +589,7 @@ build-tools-and-docs-debian:
>  # when running on 'master' we use pre-existing container
>  optional: true
>variables:
> -IMAGE: debian-amd64
> +IMAGE: debian
>  MAKE_CHECK_ARGS: check-unit ctags TAGS cscope
>  CONFIGURE_ARGS: --disable-system --disable-user --enable-docs 
> --enable-tools
>  QEMU_JOB_PUBLISH: 1
> @@ -609,7 +609,7 @@ build-tools-and-docs-debian:
>  # of what topic branch they're currently using
>  pages:
>extends: .base_job_template
> -  image: $CI_REGISTRY_IMAGE/qemu/debian-amd64:$QEMU_CI_CONTAINER_TAG
> +  image: $CI_REGISTRY_IMAGE/qemu/debian:$QEMU_CI_CONTAINER_TAG
>stage: test
>needs:
>  - job: build-tools-and-docs-debian
> diff --git a/.gitlab-ci.d/containers.yml b/.gitlab-ci.d/containers.yml
> index 8637a13d86..ae79d4c58b 100644
> --- a/.gitlab-ci.d/containers.yml
> +++ b/.gitlab-ci.d/containers.yml
> @@ -11,7 +11,7 @@ amd64-debian-container:
>extends: .container_job_template
>stage: containers
>variables:
> -NAME: debian-amd64
> +NAME: debian
>
>  amd64-ubuntu2204-container:
>extends: .container_job_template
> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
> index cd4688bf07..5ba5b50ab9 100644
> --- a/tests/docker/Makefile.include
> +++ b/tests/docker/Makefile.include
> @@ -88,9 +88,6 @@ DOCKER_PARTIAL_IMAGES += debian-s390x-cross
>  DOCKER_PARTIAL_IMAGES += fedora
>  endif
>
> -# The native build should never use the registry
> -docker-image-debian-native: DOCKER_REGISTRY=
> -
>  # alpine has no adduser
>  docker-image-alpine: NOUSER=1
>
> diff --git a/tests/docker/dockerfiles/debian-native.docker 
> b/tests/docker/dockerfiles/debian-native.docker
> deleted file mode 100644
> index abac7d7cd7..00
> --- a/tests/docker/dockerfiles/debian-native.docker
> +++ /dev/null
> @@ -1,54 +0,0 @@
> -#
> -# Docker Debian Native
> -#
> -# This is 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

Re: [RFC PATCH] tests/docker: merge debian-native with debian-amd64

2023-11-08 Thread Alex Bennée
Philippe Mathieu-Daudé  writes:

> On 8/11/23 17:56, Alex Bennée wrote:
>> debian-native isn't really needed and suffers from the problem of
>> tracking a distros dependencies rather than the projects. With a
>> little surgery we can make the debian-amd64 container architecture
>> neutral and allow people to use it to build a native QEMU.
>> Rename it so it follows the same non-arch pattern of the other
>> distro
>> containers.
>> Signed-off-by: Alex Bennée 
>> Cc: Anders Roxell 
>> ---
>>   .gitlab-ci.d/buildtest.yml| 12 ++---
>>   .gitlab-ci.d/containers.yml   |  2 +-
>>   tests/docker/Makefile.include |  3 --
>>   tests/docker/dockerfiles/debian-native.docker | 54 ---
>>   .../{debian-amd64.docker => debian.docker}|  7 ++-
>>   tests/lcitool/refresh |  9 ++--
>>   6 files changed, 18 insertions(+), 69 deletions(-)
>>   delete mode 100644 tests/docker/dockerfiles/debian-native.docker
>>   rename tests/docker/dockerfiles/{debian-amd64.docker => debian.docker} 
>> (96%)
>
> Good idea. Why RFC?

Well mostly to see if it is usable for Ander's as a generic build env
for QEMU builds for tuxbuild images.

>
> Reviewed-by: Philippe Mathieu-Daudé 

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro



Re: [RFC PATCH] tests/docker: merge debian-native with debian-amd64

2023-11-08 Thread Philippe Mathieu-Daudé

On 8/11/23 17:56, Alex Bennée wrote:

debian-native isn't really needed and suffers from the problem of
tracking a distros dependencies rather than the projects. With a
little surgery we can make the debian-amd64 container architecture
neutral and allow people to use it to build a native QEMU.

Rename it so it follows the same non-arch pattern of the other distro
containers.

Signed-off-by: Alex Bennée 
Cc: Anders Roxell 
---
  .gitlab-ci.d/buildtest.yml| 12 ++---
  .gitlab-ci.d/containers.yml   |  2 +-
  tests/docker/Makefile.include |  3 --
  tests/docker/dockerfiles/debian-native.docker | 54 ---
  .../{debian-amd64.docker => debian.docker}|  7 ++-
  tests/lcitool/refresh |  9 ++--
  6 files changed, 18 insertions(+), 69 deletions(-)
  delete mode 100644 tests/docker/dockerfiles/debian-native.docker
  rename tests/docker/dockerfiles/{debian-amd64.docker => debian.docker} (96%)


Good idea. Why RFC?

Reviewed-by: Philippe Mathieu-Daudé 




[RFC PATCH] tests/docker: merge debian-native with debian-amd64

2023-11-08 Thread Alex Bennée
debian-native isn't really needed and suffers from the problem of
tracking a distros dependencies rather than the projects. With a
little surgery we can make the debian-amd64 container architecture
neutral and allow people to use it to build a native QEMU.

Rename it so it follows the same non-arch pattern of the other distro
containers.

Signed-off-by: Alex Bennée 
Cc: Anders Roxell 
---
 .gitlab-ci.d/buildtest.yml| 12 ++---
 .gitlab-ci.d/containers.yml   |  2 +-
 tests/docker/Makefile.include |  3 --
 tests/docker/dockerfiles/debian-native.docker | 54 ---
 .../{debian-amd64.docker => debian.docker}|  7 ++-
 tests/lcitool/refresh |  9 ++--
 6 files changed, 18 insertions(+), 69 deletions(-)
 delete mode 100644 tests/docker/dockerfiles/debian-native.docker
 rename tests/docker/dockerfiles/{debian-amd64.docker => debian.docker} (96%)

diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml
index da72f7c690..7f9af83b10 100644
--- a/.gitlab-ci.d/buildtest.yml
+++ b/.gitlab-ci.d/buildtest.yml
@@ -70,7 +70,7 @@ build-system-debian:
   needs:
 job: amd64-debian-container
   variables:
-IMAGE: debian-amd64
+IMAGE: debian
 CONFIGURE_ARGS: --with-coroutine=sigaltstack
 TARGETS: arm-softmmu i386-softmmu riscv64-softmmu sh4eb-softmmu
   sparc-softmmu xtensa-softmmu
@@ -82,7 +82,7 @@ check-system-debian:
 - job: build-system-debian
   artifacts: true
   variables:
-IMAGE: debian-amd64
+IMAGE: debian
 MAKE_CHECK_ARGS: check
 
 avocado-system-debian:
@@ -91,7 +91,7 @@ avocado-system-debian:
 - job: build-system-debian
   artifacts: true
   variables:
-IMAGE: debian-amd64
+IMAGE: debian
 MAKE_CHECK_ARGS: check-avocado
 AVOCADO_TAGS: arch:arm arch:i386 arch:riscv64 arch:sh4 arch:sparc 
arch:xtensa
 
@@ -101,7 +101,7 @@ crash-test-debian:
 - job: build-system-debian
   artifacts: true
   variables:
-IMAGE: debian-amd64
+IMAGE: debian
   script:
 - cd build
 - make NINJA=":" check-venv
@@ -589,7 +589,7 @@ build-tools-and-docs-debian:
 # when running on 'master' we use pre-existing container
 optional: true
   variables:
-IMAGE: debian-amd64
+IMAGE: debian
 MAKE_CHECK_ARGS: check-unit ctags TAGS cscope
 CONFIGURE_ARGS: --disable-system --disable-user --enable-docs 
--enable-tools
 QEMU_JOB_PUBLISH: 1
@@ -609,7 +609,7 @@ build-tools-and-docs-debian:
 # of what topic branch they're currently using
 pages:
   extends: .base_job_template
-  image: $CI_REGISTRY_IMAGE/qemu/debian-amd64:$QEMU_CI_CONTAINER_TAG
+  image: $CI_REGISTRY_IMAGE/qemu/debian:$QEMU_CI_CONTAINER_TAG
   stage: test
   needs:
 - job: build-tools-and-docs-debian
diff --git a/.gitlab-ci.d/containers.yml b/.gitlab-ci.d/containers.yml
index 8637a13d86..ae79d4c58b 100644
--- a/.gitlab-ci.d/containers.yml
+++ b/.gitlab-ci.d/containers.yml
@@ -11,7 +11,7 @@ amd64-debian-container:
   extends: .container_job_template
   stage: containers
   variables:
-NAME: debian-amd64
+NAME: debian
 
 amd64-ubuntu2204-container:
   extends: .container_job_template
diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index cd4688bf07..5ba5b50ab9 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -88,9 +88,6 @@ DOCKER_PARTIAL_IMAGES += debian-s390x-cross
 DOCKER_PARTIAL_IMAGES += fedora
 endif
 
-# The native build should never use the registry
-docker-image-debian-native: DOCKER_REGISTRY=
-
 # alpine has no adduser
 docker-image-alpine: NOUSER=1
 
diff --git a/tests/docker/dockerfiles/debian-native.docker 
b/tests/docker/dockerfiles/debian-native.docker
deleted file mode 100644
index abac7d7cd7..00
--- a/tests/docker/dockerfiles/debian-native.docker
+++ /dev/null
@@ -1,54 +0,0 @@
-#
-# Docker Debian Native
-#
-# This is 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-d