From 66e30c11fa62ded16075eb1893f8a40707092024 Mon Sep 17 00:00:00 2001 From: Conrad Hoffmann Date: Wed, 25 Jan 2023 16:57:41 +0100 Subject: [PATCH] Fix qemu image build on latest Debian unstable In the latest Debian unstable (bookworm), `/bin` and `/lib` are symlinks to `/usr/bin` and `/usr/lib` respectively. Hence, even though we configure with e.g. `bindir=/bin`, the files get installed to `/usr/bin` (same for the libs). Docker COPY however does not resolve symlinks, so the actual path has to be used. To avoid confusion, the arguments to `configure` have also been updated (essentially a no-op on that image). --- images/qemu/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/images/qemu/Dockerfile b/images/qemu/Dockerfile index 4aad62a..3816034 100644 --- a/images/qemu/Dockerfile +++ b/images/qemu/Dockerfile @@ -20,10 +20,10 @@ RUN apt-get install -y \ RUN cd qemu-7.0.0 && ./configure \ --prefix=/ \ - --bindir=/bin \ + --bindir=/usr/bin \ --datadir=/share \ --includedir=/include \ - --libdir=/lib \ + --libdir=/usr/lib \ --libexecdir=/libexec \ --mandir=/share/man \ --static \ @@ -51,10 +51,10 @@ RUN cd qemu-7.0.0 && ./configure \ RUN cd qemu-7.0.0 && make && make install FROM scratch -COPY --from=0 /bin/qemu-system-* /bin/ +COPY --from=0 /usr/bin/qemu-system-* /bin/ COPY --from=0 /share/qemu/ /share/qemu/ -COPY --from=0 /lib/x86_64-linux-gnu/libnss_dns*.so* /lib/x86_64-linux-gnu/ +COPY --from=0 /usr/lib/x86_64-linux-gnu/libnss_dns*.so* /lib/x86_64-linux-gnu/ COPY --from=0 /etc/nsswitch.conf /etc/ CMD ["/bin/qemu-system-x86_64"] -- 2.38.5