qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v1 11/33] tests/docker: update debian-amd64 with lcitool


From: Daniel P . Berrangé
Subject: Re: [PATCH v1 11/33] tests/docker: update debian-amd64 with lcitool
Date: Fri, 27 May 2022 16:51:17 +0100
User-agent: Mutt/2.2.1 (2022-02-19)

On Fri, May 27, 2022 at 04:35:41PM +0100, Alex Bennée wrote:
> The one minor wrinkle we need to account for is the netmap support
> still requires building from source. We also include cscope and GNU
> global as they are used in one of the builds.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Cc: Luigi Rizzo <rizzo@iet.unipi.it>
> Cc: Giuseppe Lettieri <g.lettieri@iet.unipi.it>
> Cc: Vincenzo Maffione <v.maffione@gmail.com>
> ---
>  .gitlab-ci.d/containers.yml                  |   3 +-
>  tests/docker/dockerfiles/debian-amd64.docker | 194 ++++++++++++++-----
>  tests/lcitool/refresh                        |  19 ++
>  3 files changed, 164 insertions(+), 52 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


> +# Netmap still needs to be manually built as it is yet to be packaged
> +# into a distro. We also add cscope and gtags which are used in the CI
> +# test
> +debian11_extras = [
> +    "# netmap/cscope/global\n",
> +    "RUN DEBIAN_FRONTEND=noninteractive eatmydata \\\n",
> +    "  apt install -y --no-install-recommends \\\n",
> +    "  cscope\\\n",
> +    "  global\\\n",
> +    "  linux-headers-amd64\n",
> +    "RUN git clone https://github.com/luigirizzo/netmap.git 
> /usr/src/netmap\n",
> +    "RUN cd /usr/src/netmap && git checkout v11.3\n",
> +    "RUN cd /usr/src/netmap/LINUX && ./configure --no-drivers --no-apps 
> --kernel-dir=$(ls -d /usr/src/linux-headers-*-amd64) && make install\n",

This will result in many layers bloating the image a little.

We could optimize it with approximately
[
  RUN export DEBIAN_FRONTEND=noninteractive && \
  eatmydata apt install -y --no-install-recommends \
    cscope \
    global \
    linux-headers-amd64 &&
  git clone https://github.com/luigirizzo/netmap.git /usr/src/netmap && \
  cd /usr/src/netmap && \
  git checkout v11.3 && \0
  cd LINUX && \
  ./configure --no-drivers --no-apps --kernel-dir=$(ls -d 
/usr/src/linux-headers-*-amd64) && \
  make install && \
  cd / && \
  rm -rf /usr/src/netmap &&
  eatmydata apt remove cscope global linux-headers-amd64

(untested)

Essentially this means we only add 1 layer to the docker image
and it only contains the final binary bits

Still, what you have is what already exists in tree, so on
that basis

  Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
  

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




reply via email to

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