View Issue Details

IDProjectCategoryView StatusLast Update
0017013Buildsyscommunity buildsyspublic2020-02-18 10:16
Reporteramoralej 
PriorityhighSeveritymajorReproducibilityalways
Status newResolutionopen 
Summary0017013: CBS: Packages with BuildRequires in Ruby are getting it from ruby:2.6 instead of default ruby:2.5
DescriptionIn CloudSIG we are building some ruby packages in CBS. While building them we've observed that ruby 2.6 is pulled instead of 2.5, while 2.5 is the default one:

https://cbs.centos.org/kojifiles/packages/rubygem-ruby-shadow/2.5.0/11.el8/data/logs/x86_64/root.log

DEBUG util.py:439: Installing:
DEBUG util.py:439: ruby-devel x86_64 2.6.3-106.module_el8.1.0+249+93480f15 build 243 k
DEBUG util.py:439: ruby-libs x86_64 2.6.3-106.module_el8.1.0+249+93480f15 build 3.0 M

This is a big problem because some ruby bindings included in CentOS repos are using 2.5 (as libselinux-ruby), and ruby 2.5 and 2.6 are not coinstallable so, any package that requires both libselinux-ruby (or other ruby libs out of the module) and some of the libraries built in cbs fails to install whether enabling 2.5 or 2.6.

Note that building the same srpm using mock with centos8 config does the expected thing (uses 2.5). My guess is that the problem may be in how the repos used in the CBS buildroot are created or some option in mock config leading to use non-default modules when several can resolve a BR.

Example of installation failure:

[root@packstack8 ~]# dnf module list ruby
Last metadata expiration check: 0:04:10 ago on Thu 06 Feb 2020 02:18:21 PM UTC.
CentOS-8 - AppStream
Name Stream Profiles Summary
ruby 2.5 [d] common [d] An interpreter of object-oriented scripting language
ruby 2.6 [e] common An interpreter of object-oriented scripting language

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
[root@packstack8 ~]#
[root@packstack8 ~]#
[root@packstack8 ~]# dnf install puppet
Last metadata expiration check: 0:04:17 ago on Thu 06 Feb 2020 02:18:21 PM UTC.
Error:
 Problem: package puppet-headless-5.5.10-9.el8.noarch requires ruby(selinux), but none of the providers can be installed
  - package puppet-5.5.10-9.el8.noarch requires puppet-headless = 5.5.10-9.el8, but none of the providers can be installed
  - package libselinux-ruby-2.9-2.1.el8.x86_64 requires libruby.so.2.5()(64bit), but none of the providers can be installed
  - conflicting requests
  - package ruby-libs-2.5.5-105.module_el8.1.0+214+9be47fd7.x86_64 is excluded
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
[root@packstack8 ~]# dnf module disable ruby:2.6
Last metadata expiration check: 0:04:27 ago on Thu 06 Feb 2020 02:18:21 PM UTC.
Only module name is required. Ignoring unneeded information in argument: 'ruby:2.6'
Dependencies resolved.
========================================================================================================
 Package Architecture Version Repository Size
========================================================================================================
Disabling modules:
 ruby

Transaction Summary
========================================================================================================

Is this ok [y/N]: y
Complete!
[root@packstack8 ~]# dnf module enable ruby:2.5
Last metadata expiration check: 0:04:36 ago on Thu 06 Feb 2020 02:18:21 PM UTC.
Dependencies resolved.
========================================================================================================
 Package Architecture Version Repository Size
========================================================================================================
Enabling module streams:
 ruby 2.5

Transaction Summary
========================================================================================================

Is this ok [y/N]: y
Complete!
[root@packstack8 ~]# dnf install puppet
Last metadata expiration check: 0:04:42 ago on Thu 06 Feb 2020 02:18:21 PM UTC.
Error:
 Problem: package puppet-headless-5.5.10-9.el8.noarch requires ruby(shadow), but none of the providers can be installed
  - package puppet-5.5.10-9.el8.noarch requires puppet-headless = 5.5.10-9.el8, but none of the providers can be installed
  - package rubygem-ruby-shadow-2.5.0-11.el8.x86_64 requires libruby.so.2.6()(64bit), but none of the providers can be installed
  - conflicting requests
  - package ruby-libs-2.6.3-106.module_el8.1.0+249+93480f15.x86_64 is excluded
  - package rubygem-ruby-shadow-2.5.0-10.el8.x86_64 is excluded
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
TagsNo tags attached.

Activities

apevec

apevec

2020-02-07 12:17

reporter   ~0036224

from IRC
<alphacc> amoralej: I'll have a look, thanks. No idea at this stage how we could mitigate without grobbisplitter
amoralej

amoralej

2020-02-18 10:16

reporter   ~0036308

I've workarounded this by setting ruby BRs to < 2.6. It's working fine but looks like a fragile solution, we should look for a fix in build environment.

@alphacc any idea about how this could be fixed?

Issue History

Date Modified Username Field Change
2020-02-06 14:25 amoralej New Issue
2020-02-07 12:17 apevec Note Added: 0036224
2020-02-18 10:16 amoralej Note Added: 0036308