diff --git a/tests/Dockerfile.fedora b/tests/Dockerfile.fedora index c65ad98f7b..dc12be49ee 100644 --- a/tests/Dockerfile.fedora +++ b/tests/Dockerfile.fedora @@ -1,3 +1,4 @@ +# Supported Fedora releases: 39 40 41 FROM registry.fedoraproject.org/fedora:40 AS base MAINTAINER rpm-maint@lists.rpm.org @@ -46,14 +47,13 @@ RUN dnf -y install \ tar unzip gzip bzip2 cpio xz p7zip \ pkgconfig \ /usr/bin/systemd-sysusers \ - "gdb-headless < 15" \ dwz \ fsverity-utils fsverity-utils-devel \ pandoc \ sequoia-sq \ libasan \ - libubsan \ - && dnf clean all + libubsan + RUN echo "%_dbpath $(rpm --eval '%_dbpath')" > /root/.rpmmacros # Workaround for pkgconf(1)'s unlisted dependency on rpm. @@ -61,12 +61,20 @@ RUN echo "%_dbpath $(rpm --eval '%_dbpath')" > /root/.rpmmacros RUN ln -sf $(rpm --eval '%{_target_platform}%{?_gnu}')-pkg-config \ /usr/bin/pkg-config +# F40 and older (no dnf5) require special handling +RUN if which dnf5; then \ + dnf -y install gdb-headless; \ + dnf clean all; \ + else \ + dnf -y install "gdb-headless < 15"; \ + dnf clean all; \ + rpm -e --nodeps --nodb rpm-sign-libs python3-rpm; \ + fi + RUN rpm -e --nodeps --nodb \ rpm \ rpm-libs \ - rpm-build-libs \ - rpm-sign-libs \ - python3-rpm + rpm-build-libs WORKDIR / CMD /bin/bash