PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, August 23, 2022

[FIXED] How do I specify ruby 2.6 module in my spec file. ruby 2.6 is required for my rpm

 August 23, 2022     centos, dependencies, module, rhel, rpm-spec     No comments   

Issue

I can manually install ruby with the commands:

sudo dnf module enable ruby:2.6
sudo dnf module -y update ruby:2.6

How do I go about making the ruby:2.6 module a requirement in an rpm? This is in CentOS


Solution

Modules are essentially "virtual repositories" that the system administrator can enable or disable (see Redhat documentation), which means it's not really something the spec file should specify. As suggested by @Aaron, the spec file should only declare Requries: ruby >= 2.6, and it is the responsibility of the user to ensure that they have the correct repositories (in this case, modules) installed and enabled to fulfil this dependency requirement.

In practice, this simply means that you should inform the user that they need to enable this module before installing your package. Maybe in your "Installation Instructions" section of your documentation.


On a related note, if you need to enable a module to satisfy a build dependency to build on Fedora Copr (which is my use case), you should go into "project setting" > "edit chroot", where you can specify the list of modules to enable (and/or disable).

P.s. thanks to @FrostyX over on #fedora-buildsys@libera.chat for the timely help!



Answered By - cyqsimon
Answer Checked By - Mary Flores (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing