ci(fedora41): use dnf.conf
for options and simplify dnf install
CLI
This commit is contained in:
parent
b5a36e1efc
commit
5eb8f47b67
@ -4,25 +4,21 @@ ARG BASE_IMAGE=fedora:41
|
|||||||
|
|
||||||
FROM ${BASE_IMAGE} AS dnf-cache
|
FROM ${BASE_IMAGE} AS dnf-cache
|
||||||
# Populate DNF cache w/ the fresh metadata and prefetch packages.
|
# Populate DNF cache w/ the fresh metadata and prefetch packages.
|
||||||
RUN --mount=type=bind,source=deps_packages.lst,target=/root/deps_packages.lst \
|
RUN --mount=type=bind,source=dnf.conf,target=/etc/dnf/dnf.conf \
|
||||||
|
--mount=type=bind,source=deps_packages.lst,target=/root/deps_packages.lst \
|
||||||
--mount=type=bind,source=iwyu_packages.lst,target=/root/iwyu_packages.lst \
|
--mount=type=bind,source=iwyu_packages.lst,target=/root/iwyu_packages.lst \
|
||||||
--mount=type=bind,source=rust_packages.lst,target=/root/rust_packages.lst \
|
--mount=type=bind,source=rust_packages.lst,target=/root/rust_packages.lst \
|
||||||
--mount=type=bind,source=rvm_packages.lst,target=/root/rvm_packages.lst \
|
--mount=type=bind,source=rvm_packages.lst,target=/root/rvm_packages.lst \
|
||||||
--mount=type=tmpfs,target=/var/log \
|
--mount=type=tmpfs,target=/var/log \
|
||||||
--mount=type=tmpfs,target=/tmp \
|
--mount=type=tmpfs,target=/tmp \
|
||||||
dnf install \
|
dnf install --downloadonly -y $(grep -h '^[^#]\+$' /root/*.lst)
|
||||||
--setopt=install_weak_deps=False \
|
|
||||||
--setopt=fastestmirror=True \
|
|
||||||
--setopt=max_parallel_downloads=10 \
|
|
||||||
--downloadonly \
|
|
||||||
-y \
|
|
||||||
$(grep -h '^[^#]\+$' /root/*.lst)
|
|
||||||
|
|
||||||
|
|
||||||
FROM ${BASE_IMAGE} AS rust-build
|
FROM ${BASE_IMAGE} AS rust-build
|
||||||
LABEL maintainer="Ben Boeckel <ben.boeckel@kitware.com>"
|
LABEL maintainer="Ben Boeckel <ben.boeckel@kitware.com>"
|
||||||
|
|
||||||
RUN --mount=type=bind,source=install_rust.sh,target=/root/install_rust.sh \
|
RUN --mount=type=bind,source=dnf.conf,target=/etc/dnf/dnf.conf \
|
||||||
|
--mount=type=bind,source=install_rust.sh,target=/root/install_rust.sh \
|
||||||
--mount=type=bind,source=rust_packages.lst,target=/root/rust_packages.lst \
|
--mount=type=bind,source=rust_packages.lst,target=/root/rust_packages.lst \
|
||||||
--mount=type=cache,from=dnf-cache,source=/var/lib/dnf,target=/var/lib/dnf,sharing=private \
|
--mount=type=cache,from=dnf-cache,source=/var/lib/dnf,target=/var/lib/dnf,sharing=private \
|
||||||
--mount=type=tmpfs,target=/var/log \
|
--mount=type=tmpfs,target=/var/log \
|
||||||
@ -32,7 +28,8 @@ RUN --mount=type=bind,source=install_rust.sh,target=/root/install_rust.sh \
|
|||||||
FROM ${BASE_IMAGE} AS rvm-build
|
FROM ${BASE_IMAGE} AS rvm-build
|
||||||
LABEL maintainer="Ben Boeckel <ben.boeckel@kitware.com>"
|
LABEL maintainer="Ben Boeckel <ben.boeckel@kitware.com>"
|
||||||
|
|
||||||
RUN --mount=type=bind,source=install_rvm.sh,target=/root/install_rvm.sh \
|
RUN --mount=type=bind,source=dnf.conf,target=/etc/dnf/dnf.conf \
|
||||||
|
--mount=type=bind,source=install_rvm.sh,target=/root/install_rvm.sh \
|
||||||
--mount=type=bind,source=rvm_packages.lst,target=/root/rvm_packages.lst \
|
--mount=type=bind,source=rvm_packages.lst,target=/root/rvm_packages.lst \
|
||||||
--mount=type=cache,from=dnf-cache,source=/var/lib/dnf,target=/var/lib/dnf,sharing=private \
|
--mount=type=cache,from=dnf-cache,source=/var/lib/dnf,target=/var/lib/dnf,sharing=private \
|
||||||
--mount=type=tmpfs,target=/var/log \
|
--mount=type=tmpfs,target=/var/log \
|
||||||
@ -43,7 +40,8 @@ RUN --mount=type=bind,source=install_rvm.sh,target=/root/install_rvm.sh \
|
|||||||
FROM ${BASE_IMAGE} AS iwyu-build
|
FROM ${BASE_IMAGE} AS iwyu-build
|
||||||
LABEL maintainer="Kyle Edwards <kyle.edwards@kitware.com>"
|
LABEL maintainer="Kyle Edwards <kyle.edwards@kitware.com>"
|
||||||
|
|
||||||
RUN --mount=type=bind,source=install_iwyu.sh,target=/root/install_iwyu.sh \
|
RUN --mount=type=bind,source=dnf.conf,target=/etc/dnf/dnf.conf \
|
||||||
|
--mount=type=bind,source=install_iwyu.sh,target=/root/install_iwyu.sh \
|
||||||
--mount=type=bind,source=iwyu_packages.lst,target=/root/iwyu_packages.lst \
|
--mount=type=bind,source=iwyu_packages.lst,target=/root/iwyu_packages.lst \
|
||||||
--mount=type=cache,from=dnf-cache,source=/var/lib/dnf,target=/var/lib/dnf,sharing=private \
|
--mount=type=cache,from=dnf-cache,source=/var/lib/dnf,target=/var/lib/dnf,sharing=private \
|
||||||
--mount=type=tmpfs,target=/var/log \
|
--mount=type=tmpfs,target=/var/log \
|
||||||
@ -56,7 +54,8 @@ LABEL maintainer="Ben Boeckel <ben.boeckel@kitware.com>"
|
|||||||
|
|
||||||
ENV RBENV_ROOT=/opt/rbenv
|
ENV RBENV_ROOT=/opt/rbenv
|
||||||
|
|
||||||
RUN --mount=type=bind,source=install_deps.sh,target=/root/install_deps.sh \
|
RUN --mount=type=bind,source=dnf.conf,target=/etc/dnf/dnf.conf \
|
||||||
|
--mount=type=bind,source=install_deps.sh,target=/root/install_deps.sh \
|
||||||
--mount=type=bind,source=deps_packages.lst,target=/root/deps_packages.lst \
|
--mount=type=bind,source=deps_packages.lst,target=/root/deps_packages.lst \
|
||||||
--mount=type=cache,from=dnf-cache,source=/var/lib/dnf,target=/var/lib/dnf,sharing=private \
|
--mount=type=cache,from=dnf-cache,source=/var/lib/dnf,target=/var/lib/dnf,sharing=private \
|
||||||
--mount=type=cache,target=/var/cache/pip \
|
--mount=type=cache,target=/var/cache/pip \
|
||||||
|
32
.gitlab/ci/docker/fedora41/dnf.conf
Normal file
32
.gitlab/ci/docker/fedora41/dnf.conf
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
[main]
|
||||||
|
autocheck_running_kernel=0
|
||||||
|
debuglevel=2
|
||||||
|
diskspacecheck=0
|
||||||
|
fastestmirror=1
|
||||||
|
gpgcheck=1
|
||||||
|
installonly_limit=5
|
||||||
|
install_weak_deps=0
|
||||||
|
keepcache=1
|
||||||
|
log_rotate=0
|
||||||
|
max_parallel_downloads=10
|
||||||
|
metadata_expire=90m
|
||||||
|
multilib_policy=best
|
||||||
|
plugins=1
|
||||||
|
tsflags=nodocs
|
||||||
|
|
||||||
|
# Enable color for all output
|
||||||
|
color=always
|
||||||
|
|
||||||
|
# Default color options according to yum.conf(5)
|
||||||
|
color_list_installed_older=bold,black
|
||||||
|
color_list_installed_newer=bold,yellow
|
||||||
|
color_list_installed_reinstall=normal
|
||||||
|
color_list_installed_extra=bold,red
|
||||||
|
color_list_available_upgrade=bold,blue
|
||||||
|
color_list_available_downgrade=dim,yellow
|
||||||
|
color_list_available_install=normal
|
||||||
|
color_list_available_reinstall =bold,underline,green
|
||||||
|
color_search_match=bold,magenta
|
||||||
|
color_update_installed=green
|
||||||
|
color_update_local=cyan
|
||||||
|
color_update_remote=yellow
|
@ -2,12 +2,7 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
dnf install \
|
dnf install -y $(grep '^[^#]\+$' /root/deps_packages.lst)
|
||||||
--setopt=install_weak_deps=False \
|
|
||||||
--setopt=fastestmirror=True \
|
|
||||||
--setopt=max_parallel_downloads=10 \
|
|
||||||
-y \
|
|
||||||
$(grep '^[^#]\+$' /root/deps_packages.lst)
|
|
||||||
|
|
||||||
# Remove tests for numpy
|
# Remove tests for numpy
|
||||||
for v in 3.13; do
|
for v in 3.13; do
|
||||||
|
@ -3,12 +3,7 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Install development tools.
|
# Install development tools.
|
||||||
dnf install \
|
dnf install -y $(grep '^[^#]\+$' /root/iwyu_packages.lst)
|
||||||
--setopt=install_weak_deps=False \
|
|
||||||
--setopt=fastestmirror=True \
|
|
||||||
--setopt=max_parallel_downloads=10 \
|
|
||||||
-y \
|
|
||||||
$(grep '^[^#]\+$' /root/iwyu_packages.lst)
|
|
||||||
|
|
||||||
cd /root
|
cd /root
|
||||||
git clone "https://github.com/include-what-you-use/include-what-you-use.git"
|
git clone "https://github.com/include-what-you-use/include-what-you-use.git"
|
||||||
|
@ -2,12 +2,7 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
dnf install \
|
dnf install -y $(grep '^[^#]\+$' /root/rust_packages.lst)
|
||||||
--setopt=install_weak_deps=False \
|
|
||||||
--setopt=fastestmirror=True \
|
|
||||||
--setopt=max_parallel_downloads=10 \
|
|
||||||
-y \
|
|
||||||
$(grep '^[^#]\+$' /root/rust_packages.lst)
|
|
||||||
|
|
||||||
typos_version=1.29.4
|
typos_version=1.29.4
|
||||||
cargo install --root /usr/local --version "$typos_version" typos-cli
|
cargo install --root /usr/local --version "$typos_version" typos-cli
|
||||||
|
@ -2,12 +2,7 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
dnf install \
|
dnf install -y $(grep '^[^#]\+$' /root/rvm_packages.lst)
|
||||||
--setopt=install_weak_deps=False \
|
|
||||||
--setopt=fastestmirror=True \
|
|
||||||
--setopt=max_parallel_downloads=10 \
|
|
||||||
-y \
|
|
||||||
$(grep '^[^#]\+$' /root/rvm_packages.lst)
|
|
||||||
|
|
||||||
gpg2 --keyserver hkps://keyserver.ubuntu.com \
|
gpg2 --keyserver hkps://keyserver.ubuntu.com \
|
||||||
--recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 \
|
--recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 \
|
||||||
|
Loading…
Reference in New Issue
Block a user