[XEN PATCH] automation: Rework archlinux container

Anthony PERARD posted 1 patch 1 year, 2 months ago
Test gitlab-ci failed
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20230228181649.51066-1-anthony.perard@citrix.com
automation/build/archlinux/current.dockerfile | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
[XEN PATCH] automation: Rework archlinux container
Posted by Anthony PERARD 1 year, 2 months ago
Base image "archlinux/base" isn't available anymore,
    https://lists.archlinux.org/pipermail/arch-dev-public/2020-November/030181.html

But instead of switching to archlinux/archlinux, we will use the
official image from Docker. Main difference is that the first one is
updated daily while the second is updated weekly.

Also, as we will install the packages from "base-devel" anyway, switch
to the "base-devel" tag.

"dev86" package is now available from the main repo, no need for
multilib repo anymore.

It is recommended to initialise local signing key used by pacman, so
let's do that.

Replace "markdown" by "discount" as the former isn't available anymore
and has been replaced by the later.

Also, clean pacman's cache.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---

Notes:
    Testing done here:
    https://gitlab.com/xen-project/people/anthonyper/xen/-/pipelines/791402512

 automation/build/archlinux/current.dockerfile | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/automation/build/archlinux/current.dockerfile b/automation/build/archlinux/current.dockerfile
index d46fc9d9ca..13fb472d9e 100644
--- a/automation/build/archlinux/current.dockerfile
+++ b/automation/build/archlinux/current.dockerfile
@@ -1,16 +1,15 @@
-FROM archlinux/base
+FROM archlinux:base-devel
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="xen-devel@lists.xenproject.org"
 
-# Enable multilib repo, for dev86 package
-RUN echo $'[multilib]\nInclude = /etc/pacman.d/mirrorlist' >> /etc/pacman.conf
+RUN pacman-key --init
 
 RUN pacman -S --refresh --sysupgrade --noconfirm --noprogressbar --needed \
-        base-devel \
         bin86 \
         bridge-utils \
         bzip2 \
         dev86 \
+        discount \
         dtc \
         e2fsprogs \
         ghostscript \
@@ -29,7 +28,6 @@ RUN pacman -S --refresh --sysupgrade --noconfirm --noprogressbar --needed \
         libnl \
         libpng \
         libseccomp \
-        markdown \
         net-tools \
         nss \
         perl \
@@ -46,7 +44,8 @@ RUN pacman -S --refresh --sysupgrade --noconfirm --noprogressbar --needed \
         wget \
         xz \
         yajl \
-        zlib
+        zlib \
+    && yes | pacman -S --clean --clean
 
 ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
 
-- 
Anthony PERARD
Re: [XEN PATCH] automation: Rework archlinux container
Posted by Stefano Stabellini 1 year, 2 months ago
On Tue, 28 Feb 2023, Anthony PERARD wrote:
> Base image "archlinux/base" isn't available anymore,
>     https://lists.archlinux.org/pipermail/arch-dev-public/2020-November/030181.html
> 
> But instead of switching to archlinux/archlinux, we will use the
> official image from Docker. Main difference is that the first one is
> updated daily while the second is updated weekly.
> 
> Also, as we will install the packages from "base-devel" anyway, switch
> to the "base-devel" tag.
> 
> "dev86" package is now available from the main repo, no need for
> multilib repo anymore.
> 
> It is recommended to initialise local signing key used by pacman, so
> let's do that.
> 
> Replace "markdown" by "discount" as the former isn't available anymore
> and has been replaced by the later.
> 
> Also, clean pacman's cache.
> 
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>

Acked-by: Stefano Stabellini <sstabellini@kernel.org>


> ---
> 
> Notes:
>     Testing done here:
>     https://gitlab.com/xen-project/people/anthonyper/xen/-/pipelines/791402512
> 
>  automation/build/archlinux/current.dockerfile | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/automation/build/archlinux/current.dockerfile b/automation/build/archlinux/current.dockerfile
> index d46fc9d9ca..13fb472d9e 100644
> --- a/automation/build/archlinux/current.dockerfile
> +++ b/automation/build/archlinux/current.dockerfile
> @@ -1,16 +1,15 @@
> -FROM archlinux/base
> +FROM archlinux:base-devel
>  LABEL maintainer.name="The Xen Project" \
>        maintainer.email="xen-devel@lists.xenproject.org"
>  
> -# Enable multilib repo, for dev86 package
> -RUN echo $'[multilib]\nInclude = /etc/pacman.d/mirrorlist' >> /etc/pacman.conf
> +RUN pacman-key --init
>  
>  RUN pacman -S --refresh --sysupgrade --noconfirm --noprogressbar --needed \
> -        base-devel \
>          bin86 \
>          bridge-utils \
>          bzip2 \
>          dev86 \
> +        discount \
>          dtc \
>          e2fsprogs \
>          ghostscript \
> @@ -29,7 +28,6 @@ RUN pacman -S --refresh --sysupgrade --noconfirm --noprogressbar --needed \
>          libnl \
>          libpng \
>          libseccomp \
> -        markdown \
>          net-tools \
>          nss \
>          perl \
> @@ -46,7 +44,8 @@ RUN pacman -S --refresh --sysupgrade --noconfirm --noprogressbar --needed \
>          wget \
>          xz \
>          yajl \
> -        zlib
> +        zlib \
> +    && yes | pacman -S --clean --clean
>  
>  ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
>  
> -- 
> Anthony PERARD
>
Re: [XEN PATCH] automation: Rework archlinux container
Posted by Andrew Cooper 1 year, 2 months ago
On 28/02/2023 6:16 pm, Anthony PERARD wrote:
> Base image "archlinux/base" isn't available anymore,
>     https://lists.archlinux.org/pipermail/arch-dev-public/2020-November/030181.html
>
> But instead of switching to archlinux/archlinux, we will use the
> official image from Docker. Main difference is that the first one is
> updated daily while the second is updated weekly.
>
> Also, as we will install the packages from "base-devel" anyway, switch
> to the "base-devel" tag.
>
> "dev86" package is now available from the main repo, no need for
> multilib repo anymore.
>
> It is recommended to initialise local signing key used by pacman, so
> let's do that.
>
> Replace "markdown" by "discount" as the former isn't available anymore
> and has been replaced by the later.
>
> Also, clean pacman's cache.
>
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Re: [XEN PATCH] automation: Rework archlinux container
Posted by Anthony PERARD 1 year, 2 months ago
On Tue, Feb 28, 2023 at 06:48:26PM +0000, Andrew Cooper wrote:
> On 28/02/2023 6:16 pm, Anthony PERARD wrote:
> > Base image "archlinux/base" isn't available anymore,
> >     https://lists.archlinux.org/pipermail/arch-dev-public/2020-November/030181.html
> >
> > But instead of switching to archlinux/archlinux, we will use the
> > official image from Docker. Main difference is that the first one is
> > updated daily while the second is updated weekly.
> >
> > Also, as we will install the packages from "base-devel" anyway, switch
> > to the "base-devel" tag.
> >
> > "dev86" package is now available from the main repo, no need for
> > multilib repo anymore.
> >
> > It is recommended to initialise local signing key used by pacman, so
> > let's do that.
> >
> > Replace "markdown" by "discount" as the former isn't available anymore
> > and has been replaced by the later.
> >
> > Also, clean pacman's cache.
> >
> > Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> 
> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>

Thanks, I've rebuild the container with my prototype:
    https://gitlab.com/xen-project/people/anthonyper/xen/-/pipelines/791711467

I'll send a patch series for this prototype soon.

Cheers,

-- 
Anthony PERARD