Skip to content

Conversation

@henrywang
Copy link
Contributor

Fix Copr build error on CentOS Stream 9:

No matching package to install: 'pkgconfig(librepo) >= 1.18.0'
Not all dependencies satisfied
Error: Some packages could not be found.

Copr build error: Build failed

Copr build failure log: https://copr.fedorainfracloud.org/coprs/g/CoreOS/continuous/build/9853977/

librepo ≥ 1.18 is only available on Fedora, CentOS Stream 10 and RHEL 10.

Fix error on CentOS Stream 9:
No matching package to install: 'pkgconfig(librepo) >= 1.18.0'

Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request aims to fix a build failure on CentOS Stream 9 by introducing conditional logic for the librepo_version in the RPM spec file. The change correctly identifies that newer distributions like Fedora and RHEL 10 have a more recent librepo and sets the version requirement accordingly. However, the condition for Fedora is too broad and will still cause build failures on older, supported Fedora releases. I've added a specific comment with a suggestion to fix this.

%global libmodulemd_version 2.13.0
# librepo version differs across distros
# Fedora / CS10 / RHEL10: librepo ≥ 1.18 is available
%if 0%{?fedora} || 0%{?rhel} >= 10

Choose a reason for hiding this comment

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

high

The condition 0%{?fedora} is too broad. It will cause build failures on older supported Fedora releases like Fedora 39, which do not have librepo >= 1.18.0. The linked Copr build log shows failures for fedora-39-x86_64 for this reason.

According to the Fedora package database, librepo-1.18.0 is available starting from Fedora 40. To ensure builds succeed on all targeted platforms, the Fedora version check should be more specific.

%if 0%{?fedora} >= 40 || 0%{?rhel} >= 10

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.

1 participant