gitlab: record installed packages in /packages.txt in containers
authorDaniel P. Berrangé <berrange@redhat.com>
Mon, 29 Jul 2024 14:44:01 +0000 (15:44 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Tue, 30 Jul 2024 10:38:34 +0000 (11:38 +0100)
The lcitool created containers save the full distro package list
details into /packages.txt. The idea is that build jobs will 'cat'
this file, so that the build log has a record of what packages
were used. This is important info, because when it comes to debug
failures, the original container is often lost.

This extends the manually written dockerfiles to also create the
/packages.txt file.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20240724095505.33544-2-berrange@redhat.com>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20240729144414.830369-2-alex.bennee@linaro.org>

tests/docker/dockerfiles/debian-all-test-cross.docker
tests/docker/dockerfiles/debian-hexagon-cross.docker
tests/docker/dockerfiles/debian-legacy-test-cross.docker
tests/docker/dockerfiles/debian-loongarch-cross.docker
tests/docker/dockerfiles/debian-tricore-cross.docker
tests/docker/dockerfiles/debian-xtensa-cross.docker

index 6cc38a3633dd641bc076bdfbc56714afb9d9ea3e..8ab244e018ab8cbdfb5ef912ee6dd6892eed1933 100644 (file)
@@ -62,7 +62,8 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \
         gcc-s390x-linux-gnu \
         libc6-dev-s390x-cross \
         gcc-sparc64-linux-gnu \
-        libc6-dev-sparc64-cross
+        libc6-dev-sparc64-cross && \
+        dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt
 
 
 ENV QEMU_CONFIGURE_OPTS --disable-system --disable-docs --disable-tools
index f2d40f2dee274384802e47416370ea7a218d6fe3..23152b4918b67c9b73a49e3aad56d8ae015ed4fb 100644 (file)
@@ -33,7 +33,8 @@ RUN apt-get update && \
     ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/c++ && \
     ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
     ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/g++ && \
-    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
+    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc && \
+    dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt
 
 RUN /usr/bin/pip3 install tomli
 
index d75e0b85e249a1eaabe6398763f9684dee34e090..5a6616b7d39393417a26abbebf3958d209596f57 100644 (file)
@@ -36,7 +36,8 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \
         python3-pip \
         python3-setuptools \
         python3-venv \
-        python3-wheel
+        python3-wheel && \
+        dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt
 
 RUN /usr/bin/pip3 install tomli
 
index 6a9197528b9ab3c3133412dfbb66fc41c102952a..79eab5621efc2ce478ad23fbaa166edeb87f18c7 100644 (file)
@@ -32,7 +32,8 @@ RUN apt-get update && \
         python3-pip \
         python3-setuptools \
         python3-venv \
-        python3-wheel
+        python3-wheel && \
+        dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt
 
 RUN /usr/bin/pip3 install tomli
 
index 16276aa21d6b87498d0aed14d7afe02d528231db..479b4d6ebab6709fcfac664e0e894511cc440818 100644 (file)
@@ -34,7 +34,8 @@ RUN apt update && \
        python3-pip \
        python3-setuptools \
        python3-wheel \
-       python3-venv
+       python3-venv && \
+       dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt
 
 RUN /usr/bin/pip3 install tomli
 
index 413881899b230ffcd9a2c83d9e47c6a6c722d701..d011eee2ad3365787e740cdbb84536786a5bc868 100644 (file)
@@ -16,7 +16,8 @@ RUN apt-get update && \
         curl \
         gettext \
         git \
-        python3-minimal
+        python3-minimal && \
+    dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt
 
 ENV CPU_LIST dc232b dc233c de233_fpu dsp3400
 ENV TOOLCHAIN_RELEASE 2020.07