REQ package update - rubygem-openscap

Problem:
Dependency failure on package updates - request tweak to rubygem-openscap package if suitable. I totally accept this is a self-inflicted issue but hoping rubygem-openscap can be repackaged accordingly.

On my CentOS 8 / foreman 2.1.3 install I have update the openscap engine from OS repo with later versions provided at https://copr.fedorainfracloud.org/coprs/openscapmaint/openscap-latest/

Seems there is a very recent update to openscap https://github.com/OpenSCAP/openscap/releases with some useful bugfixes.

However updating from the repo fails due to dependency on rubygem-openscap:

 Problem: package rubygem-openscap-0.4.9-3.el8.noarch requires openscap < 1.3.4, but none of the providers can be installed
  - openscap-1.3.2-6.el8.i686 has inferior architecture
  - cannot install both openscap-1.3.4-1.el8.x86_64 and openscap-1.3.3-1.el8.x86_64
  - cannot install both openscap-1.3.4-1.el8.x86_64 and openscap-1.3.2-6.el8.x86_64
  - cannot install the best update candidate for package rubygem-openscap-0.4.9-3.el8.noarch
  - cannot install the best update candidate for package openscap-1.3.3-1.el8.x86_64
(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)

Expected outcome:
Package openscap-1.3.4-1.el8.x86_64 from other repo to update correctly.

I believe that the rubygem-openscap package constraints could be updated to cater for this later openscap version. I would be grateful for a second opinion if this is not possible!

Foreman and Proxy versions:
foreman v 2.2
Foreman and Proxy plugin versions:
plugin rubygem-openscap-0.4.9-3.el8.noarch

Distribution and version:
CentOS 8.2.2004

Other relevant data:

I suspect a suitable fix could be incrementing max_openscap_version in rubygem-openscap.spec file

%global gem_name openscap
%global min_openscap_version 1.2.9
%global max_openscap_version 1.3.4

Grateful for thoughts, thank you for the foreman!

I bumped the version in packaging:

https://github.com/theforeman/foreman-packaging/pull/5869

2 Likes

Thanks, updated package seen in nightly.

Installed https://yum.theforeman.org/plugins/nightly/el8/x86_64/rubygem-openscap-0.4.9-4.el8.noarch.rpm.

Upgraded correctly and newer openscap rpm installed correctly with no further dependecy errors, openscap runs with all the profiles I have configured execute correctly.

2 Likes

Hi,

it looks like your change somehow got lost? Or, maybe the require-clause in the RPM spec file needs a “<=” operator instead of “<” for the max_openscap_version variable?

On my CentOS 8 installation, rubygem-openscap-0.4.9-5.el8 still has a requirement of openscap < 1.3.5:

# dnf info rubygem-openscap
Last metadata expiration check: 0:20:31 ago on Mon 18 Oct 2021 08:25:52 AM CEST.
Installed Packages
Name         : rubygem-openscap
Version      : 0.4.9
Release      : 5.el8
Architecture : noarch
Size         : 51 k
Source       : rubygem-openscap-0.4.9-5.el8.src.rpm
Repository   : @System
From repo    : foreman-plugins
...
# rpm -q --requires rubygem-openscap
openscap >= 1.2.9
openscap < 1.3.5

Kind Regards
Florian

Interesting, thanks for reporting it. I’ll take a look at what is going on there.