qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 4/7] tests/docker: add USER stanzas to non-lci images


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 4/7] tests/docker: add USER stanzas to non-lci images
Date: Tue, 28 Feb 2023 13:21:31 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.8.0

On 28/2/23 13:18, Alex Bennée wrote:

Philippe Mathieu-Daudé <philmd@linaro.org> writes:

On 24/2/23 19:08, Alex Bennée wrote:
These are flat but not generated by lcitool so we need to manually
update them with the `useradd` stanza.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
   tests/docker/dockerfiles/debian-all-test-cross.docker     | 5 +++++
   tests/docker/dockerfiles/debian-alpha-cross.docker        | 5 +++++
   tests/docker/dockerfiles/debian-hexagon-cross.docker      | 5 +++++
   tests/docker/dockerfiles/debian-hppa-cross.docker         | 5 +++++
   tests/docker/dockerfiles/debian-loongarch-cross.docker    | 5 +++++
   tests/docker/dockerfiles/debian-m68k-cross.docker         | 5 +++++
   tests/docker/dockerfiles/debian-mips-cross.docker         | 5 +++++
   tests/docker/dockerfiles/debian-mips64-cross.docker       | 5 +++++
   tests/docker/dockerfiles/debian-native.docker             | 5 +++++
   tests/docker/dockerfiles/debian-powerpc-test-cross.docker | 6 +++++-
   tests/docker/dockerfiles/debian-riscv64-cross.docker      | 5 +++++
   tests/docker/dockerfiles/debian-riscv64-test-cross.docker | 5 +++++
   tests/docker/dockerfiles/debian-sh4-cross.docker          | 5 +++++
   tests/docker/dockerfiles/debian-sparc64-cross.docker      | 5 +++++
   tests/docker/dockerfiles/debian-toolchain.docker          | 5 +++++
   tests/docker/dockerfiles/debian-tricore-cross.docker      | 5 +++++
   tests/docker/dockerfiles/debian-xtensa-cross.docker       | 5 +++++
   tests/docker/dockerfiles/fedora-cris-cross.docker         | 5 +++++
   tests/docker/dockerfiles/fedora-i386-cross.docker         | 5 +++++
   tests/docker/dockerfiles/python.docker                    | 5 +++++
   20 files changed, 100 insertions(+), 1 deletion(-)
diff --git a/tests/docker/dockerfiles/debian-all-test-cross.docker
b/tests/docker/dockerfiles/debian-all-test-cross.docker
index 8dc5e1b5de..981e9bdc7b 100644
--- a/tests/docker/dockerfiles/debian-all-test-cross.docker
+++ b/tests/docker/dockerfiles/debian-all-test-cross.docker
@@ -61,3 +61,8 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \
     ENV QEMU_CONFIGURE_OPTS --disable-system --disable-docs
--disable-tools
   ENV DEF_TARGET_LIST 
aarch64-linux-user,alpha-linux-user,arm-linux-user,hppa-linux-user,i386-linux-user,m68k-linux-user,mips-linux-user,mips64-linux-user,mips64el-linux-user,mipsel-linux-user,ppc-linux-user,ppc64-linux-user,ppc64le-linux-user,riscv64-linux-user,s390x-linux-user,sh4-linux-user,sparc64-linux-user
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi

Is that intended for local image building?

For building tests. When we run the compilers inside the docker
container we want to ensure the final binary is visible and accessible
outside the container.

Personally I only use the image built by gitlab and mount the containers
with -u $UID -v $HOME/.ccache -v $HOME/source/qemu. Would that still
keep working, or do I have to map from gitlab user to mine?

Its only added on for local builds so in theory you should cache all the
layers apart from the last one.

OK.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]