Skip to content

fix RPM conflicts in UBI builds and verification - #574

Merged
thaJeztah merged 1 commit into
docker:mainfrom
crazy-max:fix-rhel-ubi-rpm-mismatch
Nov 11, 2026
Merged

thaJeztah merged 1 commit into
docker:mainfrom
crazy-max:fix-rhel-ubi-rpm-mismatch

Conversation

@crazy-max

Copy link
Copy Markdown
Member

relates to https://github.com/docker/packaging/actions/runs/42988937125/job/130417004174#step:19:583

#25 [linux/amd64 builder-rpm 3/7] RUN --mount=type=bind,from=scripts,source=rpm-init.sh,target=/usr/local/bin/rpm-init     --mount=type=secret,id=RH_USER,env=RH_USER     --mount=type=secret,id=RH_PASS,env=RH_PASS     rpm-init rhel10
#25 0.424 Updating Subscription Management repositories.
#25 0.424 Unable to read consumer identity
#25 0.428 
#25 0.428 This system is not registered with an entitlement server. You can use subscription-manager to register.
#25 0.428 
#25 0.639 Red Hat Universal Base Image 10 (RPMs) - BaseOS 1.0 MB/s | 179 kB     00:00    
#25 0.709 Red Hat Universal Base Image 10 (RPMs) - AppStr 9.7 MB/s | 409 kB     00:00    
#25 0.843 Red Hat Universal Base Image 10 (RPMs) - CodeRe 509 kB/s |  27 kB     00:00    
#25 0.928 Error: 
#25 0.928  Problem: cannot install both rpm-4.19.1.1-23.el10.x86_64 from ubi-10-for-x86_64-baseos-rpms and rpm-4.19.1.1-25.el10.x86_64 from @System
#25 0.928   - package rpm-libs-4.19.1.1-25.el10.x86_64 from @System requires rpm = 4.19.1.1-25.el10, but none of the providers can be installed
#25 0.928   - package rpm-build-4.19.1.1-23.el10.x86_64 from ubi-10-for-x86_64-appstream-rpms requires rpm = 4.19.1.1-23.el10, but none of the providers can be installed
#25 0.928   - package rpm-plugin-syslog-4.19.1.1-25.el10.x86_64 from @System requires rpm-libs(x86-64) = 4.19.1.1-25.el10, but none of the providers can be installed
#25 0.928   - conflicting requests
#25 0.928   - problem with installed package rpm-plugin-syslog-4.19.1.1-25.el10.x86_64
#25 0.928 (try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

UBI 10 currently ships newer RPM packages than its repositories provide, breaking installation of rpm-build during builds and rpm-plugin-selinux during package verification. Allow DNF to remove conflicting packages when installing build dependencies, and synchronize the RPM package family in the separate verification image before installing packages.

UBI images can ship newer RPM packages than their repositories provide,
preventing rpm-build and rpm-plugin-selinux from installing their
exact-version dependencies.

Allow DNF to remove conflicting packages during RHEL build initialization
so RPM can match rpm-build. Synchronize the RPM package family in the
separate verification image before installing packages that depend on
SELinux. On UBI 10, this removes rpm-plugin-syslog and downgrades RPM to
the version available in the repositories.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
@thaJeztah

Copy link
Copy Markdown
Member

Opened a fix / workaround for the failure;

@thaJeztah

Copy link
Copy Markdown
Member

Testing both fixes combined here; #577

@thaJeztah

Copy link
Copy Markdown
Member

Testing both fixes combined here; #577

Other PR was green, I'll bring this one in 👍

@thaJeztah thaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah
thaJeztah merged commit e5ccd01 into docker:main Nov 11, 2026
1842 of 1853 checks passed
@crazy-max
crazy-max deleted the fix-rhel-ubi-rpm-mismatch branch November 11, 2026 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants