skip to Main Content

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

2

Answers


  1. Your specfile would have Requires: ruby >= 2.6

    Login or Signup to reply.
  2. 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 #[email protected] for the timely help!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search