sanoid icon indicating copy to clipboard operation
sanoid copied to clipboard

Perl Dependency resolution on Alma/Rocky/Cent 9 requires documentation change

Open furicle opened this issue 11 months ago • 4 comments

There are getting to be lots of changes on the Red Hat side

  • RHEL is wandering away from being the same as Cent/Alma/Rocky
  • 8 is different than 9
  • the name of the powertools repository has changed
  • the swap from yum to dnf

So I think it's time to restructure a bit.

Currently it reads

# Install and enable EPEL if we don't already have it, and git too:
# (Note that on RHEL we cannot enable EPEL with the epel-release
# package, so you should follow the instructions on the main EPEL site.)
sudo yum install -y epel-release git
# On CentOS, we also need to enable the PowerTools repo:
sudo yum config-manager --set-enabled powertools
# For Centos 8 you need to enable the PowerTools repo to make all the needed Perl modules available (Recommended)
sudo dnf config-manager --set-enabled powertools
# On RHEL, instead of PowerTools, we need to enable the CodeReady Builder repo:
sudo subscription-manager repos --enable=codeready-builder-for-rhel-8-x86_64-rpms

Maybe something like this would be better

# For RHEL 7
subscription-manager repos --enable rhel-*-optional-rpms \
                           --enable rhel-*-extras-rpms \
                           --enable rhel-ha-for-rhel-*-server-rpms
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install -y perl-Config-IniFiles perl-Data-Dumper perl-Capture-Tiny perl-Getopt-Long lzop mbuffer mhash pv

# For Cent/Alma/Rocky/Oracle et al version 7 and 8
yum install -y epel-release git
yum config-manager --set-enabled powertools
yum install -y perl-Config-IniFiles perl-Data-Dumper perl-Capture-Tiny perl-Getopt-Long lzop mbuffer mhash pv

# For RHEL 8
subscription-manager repos --enable codeready-builder-for-rhel-8-$(arch)-rpms
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm 
dnf install -y perl-Config-IniFiles perl-Data-Dumper perl-Capture-Tiny perl-Getopt-Long lzop mbuffer mhash pv

# For Alma/Rocky/Oracle et al version 9 powertools has been renamed
dnf install -y epel-release git
dnf config-manager --enable crb
dnf install -y perl-Config-IniFiles perl-Data-Dumper perl-Capture-Tiny perl-Getopt-Long lzop mbuffer mhash pv

# For RHEL 9
subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
dnf install -y perl-Config-IniFiles perl-Data-Dumper perl-Capture-Tiny perl-Getopt-Long lzop mbuffer mhash pv

# For Cent OS Stream 9
dnf config-manager --set-enabled crb
dnf install epel-release epel-next-release
dnf install -y perl-Config-IniFiles perl-Data-Dumper perl-Capture-Tiny perl-Getopt-Long lzop mbuffer mhash pv

# The repositories above should contain all the relevant Perl modules, but if you
# still cannot find them then you can install them from CPAN manually:
dnf install perl-CPAN perl-CPAN  # or yum if dnf not available
cpan # answer the questions and paste the following lines:
# install Capture::Tiny
# install Config::IniFiles
# install Getopt::Long

I'm pretty sure all the above is correct, but I don't have access to RHEL machines to test...

furicle avatar Feb 29 '24 21:02 furicle