]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
ci: conditionally add tgt to Gentoo container
authorLaszlo Gombos <laszlo.gombos@gmail.com>
Thu, 18 May 2023 19:04:24 +0000 (19:04 +0000)
committerAntonio Álvarez Feijoo <antonio.feijoo@suse.com>
Mon, 19 Jun 2023 08:15:22 +0000 (10:15 +0200)
This commit allows to run test 30 and test 35 on a Gentoo.

Use the newly introduced conditional for nfs4 support as well.

test/container/Dockerfile-Gentoo

index 96370abb2189651baabe8c311195c28c77fc71dc..5a07580f6a031776d05125d72194686364028b20 100644 (file)
@@ -1,3 +1,4 @@
+ARG TAG=musl
 FROM docker.io/gentoo/portage:latest as portage
 
 # uefi stub in a separate builder
@@ -11,17 +12,18 @@ RUN mkdir -p /etc/portage/package.accept_keywords && \
     emerge -qv sys-boot/systemd-boot
 
 # kernel and its dependencies in a separate builder
-FROM docker.io/gentoo/stage3:musl as kernel
+FROM docker.io/gentoo/stage3:$TAG as kernel
 COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo
 # disable initramfs generation, only need the kernel image itself
 RUN echo 'sys-kernel/gentoo-kernel-bin -initramfs' > /etc/portage/package.use/kernel
 RUN emerge -qv sys-kernel/gentoo-kernel-bin
 
-FROM docker.io/gentoo/stage3:musl
+FROM docker.io/gentoo/stage3:$TAG
 COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo
 COPY --from=kernel /boot /boot
 COPY --from=kernel /lib/modules /lib/modules
 COPY --from=efistub /usr/lib/systemd/boot/efi /usr/lib/systemd/boot/efi
+ARG TAG
 
 MAINTAINER https://github.com/dracutdevs/dracut
 
@@ -29,7 +31,10 @@ MAINTAINER https://github.com/dracutdevs/dracut
 RUN echo '>=sys-fs/lvm2-2.03.20 lvm thin' > /etc/portage/package.use/lvm2
 
 # workaround for https://bugs.gentoo.org/734022 whereby Gentoo does not support NFS4 with musl
-RUN echo 'net-fs/nfs-utils -nfsv4' > /etc/portage/package.use/nfs-utils
+RUN if [[ "$TAG" == 'musl' ]]; then echo 'net-fs/nfs-utils -nfsv4' > /etc/portage/package.use/nfs-utils ; fi
+
+# workaround for https://bugs.gentoo.org/713490 whereby Gentoo does not support tgt with musl
+RUN if [[ "$TAG" != 'musl' ]]; then emerge -qv sys-block/tgt ; fi
 
 # Install needed packages for the dracut CI container
 RUN emerge -qv \