[PATCH 1/1] Dockerfile: provide kernel for libguestfs-tools

Tom Rini trini at konsulko.com
Tue Jul 14 01:47:27 CEST 2020


On Tue, Jul 14, 2020 at 01:08:24AM +0200, Heinrich Schuchardt wrote:
> Am 14. Juli 2020 00:50:56 MESZ schrieb Tom Rini <trini at konsulko.com>:
> >On Tue, Jul 14, 2020 at 12:09:37AM +0200, Heinrich Schuchardt wrote:
> >
> >> The libguestfs-tools use QEMU to mount an image file. This requires a
> >Linux
> >> kernel.
> >> 
> >> Install a kernel and make vmlinuz readable.
> >> 
> >> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> >> ---
> >>  Dockerfile | 4 ++++
> >>  1 file changed, 4 insertions(+)
> >> 
> >> diff --git a/Dockerfile b/Dockerfile
> >> index bc3cdee..aac7f01 100644
> >> --- a/Dockerfile
> >> +++ b/Dockerfile
> >> @@ -68,6 +68,7 @@ RUN apt-get update && apt-get install -y \
> >>  	libssl-dev \
> >>  	libudev-dev \
> >>  	libusb-1.0-0-dev \
> >> +	linux-image-kvm \
> >>  	lzma-alone \
> >>  	lzop \
> >>  	mount \
> >> @@ -94,6 +95,9 @@ RUN apt-get update && apt-get install -y \
> >>  	zip \
> >>  	&& rm -rf /var/lib/apt/lists/*
> >> 
> >> +# libguestfs-tools runs the kernel via QEMU. Give normal users
> >access.
> >> +RUN chmod 644 /boot/vmlinu*
> >> +
> >>  # Manually install libmpfr4 for the toolchains
> >>  RUN wget
> >http://mirrors.kernel.org/ubuntu/pool/main/m/mpfr4/libmpfr4_3.1.4-1_amd64.deb
> >&& dpkg -i libmpfr4_3.1.4-1_amd64.deb && rm libmpfr4_3.1.4-1_amd64.deb
> >
> >I'm not super happy with having to work-around Ubuntu's breakage here.
> >I assume we can't just write the tools to do sudo ... in the case of
> >this silliness?
> 
> I do not want any sudo in scripts I run on my personal machine. The very idea of libguestfs-tools is to work in user space.
> 
> The kernel is used to run QEMU.

Right.

> >At least we need to reference the Ubuntu bug I posted about the other
> >day in the commit message.
> 
> It is not a bug, it is a (questionable) feature of Ubuntu. I described the reason for chmod in the code. What are you missing there?

I want a link to
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/759725 because yes,
it's a WONTFIX bug in Ubuntu, but it's also Wrong, in the commit
message.  Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200713/bba8fcf2/attachment.sig>


More information about the U-Boot mailing list