File tree Expand file tree Collapse file tree 2 files changed +20
-4
lines changed
Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -37,14 +37,20 @@ ENV UPPER_CONSTRAINTS_FILE=${UPPER_CONSTRAINTS_FILE} \
3737 SETUPTOOLS_VERSION=${SETUPTOOLS_VERSION}
3838
3939RUN --mount=type=cache,sharing=locked,target=/var/cache/dnf \
40- echo "install_weak_deps=False" >> /etc/dnf/dnf.conf && \
41- echo "tsflags=nodocs" >> /etc/dnf/dnf.conf && \
42- echo "keepcache=1" >> /etc/dnf/dnf.conf && \
40+ # Remove the specific key files that cause the parsing crash
41+ rm -f /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Extras /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial-PQC && \
42+ # Use the stable 'rpm' tool to import the official key
43+ # This avoids the microdnf/GLib bug while keeping GPG checks ENABLED
44+ rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial && \
45+ # Configure DNF behavior
46+ printf "[main]\n install_weak_deps=0\n tsflags=nodocs\n keepcache=1\n " > /etc/dnf/dnf.conf && \
47+ # Proceed with installation (GPG check remains on by default)
4348 microdnf install -y \
4449 gcc \
4550 python3.12-devel \
4651 python3.12-pip \
47- python3.12-setuptools
52+ python3.12-setuptools && \
53+ microdnf clean all
4854
4955COPY ${UPPER_CONSTRAINTS_FILE} ironic-deps-list /tmp/
5056COPY build-wheels.sh /bin/
Original file line number Diff line number Diff line change 22
33set -euxo pipefail
44
5+ # --- GPG Bug Workaround ---
6+ # 1. Clear out the problematic key files to prevent microdnf memory corruption
7+ rm -f /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Extras /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial-PQC
8+
9+ # 2. Re-import the primary official key using the stable RPM tool
10+ # This populates the RPM database so microdnf doesn't have to parse them
11+ if [ -f /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial ]; then
12+ rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
13+ fi
14+
515cat >> /etc/dnf/dnf.conf<< EOF
616install_weak_deps=False
717tsflags=nodocs
You can’t perform that action at this time.
0 commit comments