jimsalterjrs / sanoid

These are policy-driven snapshot management and replication tools which use OpenZFS for underlying next-gen storage. (Btrfs support plans are shelved unless and until btrfs becomes reliable.)
http://www.openoid.net/products/
GNU General Public License v3.0
3.12k stars 306 forks source link

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

Open furicle opened 8 months ago

furicle commented 8 months ago

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

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...

secabeen commented 8 months ago

I also noted that there are no directions for doing a systemd timer for sanoid. I hacked it together by copying from the sanoid systemd setup/timer, but it would be good to add that as well, if we're updating the docs.

Sanoid master doesn't run currently on RHEL7, per this issue I posted yesterday: https://github.com/jimsalterjrs/sanoid/issues/891

jimsalterjrs commented 8 months ago

I don't have any RHEL boxen to play with, but I'm certainly happy to accept documentation PRs. :)

furicle commented 7 months ago

I could make the above into a pull request, I'm just a bit nervous without some testing.

If the format isn't causing anyone to say no, then I might see if I can find some time to spin up a few VMs and try it, quickly.

jimsalterjrs commented 7 months ago

Well, I can't see any way that the documentation changes you propose could amount to "malice" or "additional attack surface," so I'd say yes, please, if you find some time, make sure your proposal functions as intended, then do the needful. Thanks! :)