66e30c11fa62ded16075eb1893f8a40707092024 — Conrad Hoffmann 1 year, 2 months ago 25ab18b
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).
1 files changed, 4 insertions(+), 4 deletions(-)

M images/qemu/Dockerfile
M images/qemu/Dockerfile => images/qemu/Dockerfile +4 -4
@@ 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"]