Support Fedora 41 in Dockerfile
This is needed for "make check" to work on a Fedora 41 host where the FROM directive is overridden to fedora:41. - Drop the workaround for gdb-headless on F41, it's no longer available there and the bug is fixed on F40+: https://bugzilla.redhat.com/show_bug.cgi?id=2310156 - Don't try to remove rpm-sign-libs and python3-rpm on F41 since dnf5 no longer pulls them in. - Make sure to call "dnf clean all" before "rpm -e" as python3-rpm is needed by dnf4 to function (hence the duplicated call). - Add a comment at the top saying which Fedora versions are supported by the Dockerfile. This could be checked automatically during cmake config but let's leave that for later. - Detect F41 vs. older by looking for the dnf5 binary, it's the easiest way.
This commit is contained in:
parent
bf2c1c3cc9
commit
78cecdc3ab
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue