All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] tests/docker: add a debian-native image and make available
@ 2021-09-22 15:15 Alex Bennée
  2021-09-22 17:04 ` Willian Rampazzo
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Alex Bennée @ 2021-09-22 15:15 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Anders Roxell, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Willian Rampazzo, Alex Bennée

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 <alex.bennee@linaro.org>
Cc: Anders Roxell <anders.roxell@linaro.org>
---
 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

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 <alex.bennee@linaro.org>
+
+# 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"
-- 
2.30.2



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [RFC PATCH] tests/docker: add a debian-native image and make available
  2021-09-22 15:15 [RFC PATCH] tests/docker: add a debian-native image and make available Alex Bennée
@ 2021-09-22 17:04 ` Willian Rampazzo
  2021-09-22 17:33 ` Philippe Mathieu-Daudé
  2021-10-07 12:31 ` Anders Roxell
  2 siblings, 0 replies; 4+ messages in thread
From: Willian Rampazzo @ 2021-09-22 17:04 UTC (permalink / raw)
  To: Alex Bennée
  Cc: Thomas Huth, Anders Roxell, qemu-devel,
	Wainer dos Santos Moschetta, Philippe Mathieu-Daudé

On Wed, Sep 22, 2021 at 12:15 PM Alex Bennée <alex.bennee@linaro.org> wrote:
>
> 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 <alex.bennee@linaro.org>
> Cc: Anders Roxell <anders.roxell@linaro.org>
> ---
>  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
>
> 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

if this is overridden when the user sets it, maybe remove the "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

s/overriden/overridden/
Also, is there some word missing after "We"? Or you meant "With"?

> +# "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

s/This this/This/ or you meant "This 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 <alex.bennee@linaro.org>
> +
> +# 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"
> --
> 2.30.2
>

Overall, looks good to me,

Acked-by: Willian Rampazzo <willianr@redhat.com>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC PATCH] tests/docker: add a debian-native image and make available
  2021-09-22 15:15 [RFC PATCH] tests/docker: add a debian-native image and make available Alex Bennée
  2021-09-22 17:04 ` Willian Rampazzo
@ 2021-09-22 17:33 ` Philippe Mathieu-Daudé
  2021-10-07 12:31 ` Anders Roxell
  2 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-09-22 17:33 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: Willian Rampazzo, Thomas Huth, Anders Roxell,
	Wainer dos Santos Moschetta

On 9/22/21 17:15, Alex Bennée wrote:
> 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.

Appreciated!

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> Cc: Anders Roxell <anders.roxell@linaro.org>
> ---
>   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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC PATCH] tests/docker: add a debian-native image and make available
  2021-09-22 15:15 [RFC PATCH] tests/docker: add a debian-native image and make available Alex Bennée
  2021-09-22 17:04 ` Willian Rampazzo
  2021-09-22 17:33 ` Philippe Mathieu-Daudé
@ 2021-10-07 12:31 ` Anders Roxell
  2 siblings, 0 replies; 4+ messages in thread
From: Anders Roxell @ 2021-10-07 12:31 UTC (permalink / raw)
  To: Alex Bennée
  Cc: Willian Rampazzo, Thomas Huth, qemu-devel,
	Wainer dos Santos Moschetta, Philippe Mathieu-Daudé

On Wed, 22 Sept 2021 at 17:15, Alex Bennée <alex.bennee@linaro.org> wrote:
>
> 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 <alex.bennee@linaro.org>
> Cc: Anders Roxell <anders.roxell@linaro.org>

Thank you for doing this Alex,

Tested-by: Anders Roxell <anders.roxell@linaro.org>

Cheers,
Anders

> ---
>  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
>
> 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 <alex.bennee@linaro.org>
> +
> +# 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"
> --
> 2.30.2
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-07 14:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-22 15:15 [RFC PATCH] tests/docker: add a debian-native image and make available Alex Bennée
2021-09-22 17:04 ` Willian Rampazzo
2021-09-22 17:33 ` Philippe Mathieu-Daudé
2021-10-07 12:31 ` Anders Roxell

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.