From 1619b1ec309803c2da424015e440b6e723b6ef20 Mon Sep 17 00:00:00 2001
From: Travis Holloway <t.holloway@cpanel.net>
Date: Wed, 10 Jan 2024 11:38:07 -0600
Subject: [PATCH 1/2] Add blocker if cPanel is not running version 110

This is the last version to support c7, so we want to fix this script to
only run on this version.  This will minimize testing and risk moving
forward.

Fixes #337
---
 .github/workflows/testsuite.yml | 4 ++--
 changelog                       | 6 ++++++
 elevate-cpanel                  | 4 ++--
 lib/Elevate/Constants.pm        | 2 +-
 script/elevate-cpanel.PL        | 2 +-
 t/cpanel-setup                  | 8 ++++----
 6 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/.github/workflows/testsuite.yml b/.github/workflows/testsuite.yml
index 1b8bfbb2..f9590892 100644
--- a/.github/workflows/testsuite.yml
+++ b/.github/workflows/testsuite.yml
@@ -15,7 +15,7 @@ jobs:
     env:
       PERL_USE_UNSAFE_INC: 1
       CPANEL_BIN_PATH: /usr/local/cpanel/3rdparty/bin
-      CPANEL_PERL: /usr/local/cpanel/3rdparty/perl/532/bin/perl
+      CPANEL_PERL: /usr/local/cpanel/3rdparty/perl/536/bin/perl
 
     runs-on: ubuntu-latest
 
@@ -23,7 +23,7 @@ jobs:
       fail-fast: false
 
     container:
-      image: cpanelos/perl-compiler:perl-v5.32.0
+      image: cpanelos/perl-compiler:perl-v5.36.0
 
     steps:
       - name: Checkout
diff --git a/changelog b/changelog
index 35f18d74..650c1977 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,9 @@
+2024-01-10 - version 20
+- #337 - Add blocker if cPanel is not running version 110
+
+2024-01-10 - version 19
+- Use canonical_dump() when building JSON for repo blocker reports
+
 2024-01-09 - version 18
 - #332 - Suppress additional checks when run with --check --no-leapp
 
diff --git a/elevate-cpanel b/elevate-cpanel
index 2a04609c..f442475c 100755
--- a/elevate-cpanel
+++ b/elevate-cpanel
@@ -65,7 +65,7 @@ BEGIN {    # Suppress load of all of these at earliest point.
 
     package Elevate::Constants;
 
-    use constant MINIMUM_LTS_SUPPORTED => 102;
+    use constant MINIMUM_LTS_SUPPORTED => 110;
     use constant MAXIMUM_LTS_SUPPORTED => 110;
 
     use constant SERVICE_DIR  => '/etc/systemd/system/';
@@ -4856,7 +4856,7 @@ BEGIN {
     $Cpanel::Version::Tiny::major_version >= Elevate::Constants::MINIMUM_LTS_SUPPORTED
       or do {
         warn qq[You need to upgrade your cPanel server to version ] . Elevate::Constants::MINIMUM_LTS_SUPPORTED    #
-          . qq[or later before running this script.\n];
+          . qq[ or later before running this script.\n];
         exit 1;
       };
 }
diff --git a/lib/Elevate/Constants.pm b/lib/Elevate/Constants.pm
index 3335259a..5c9c0076 100644
--- a/lib/Elevate/Constants.pm
+++ b/lib/Elevate/Constants.pm
@@ -14,7 +14,7 @@ if their usage is self contained.
 
 =cut
 
-use constant MINIMUM_LTS_SUPPORTED => 102;
+use constant MINIMUM_LTS_SUPPORTED => 110;
 use constant MAXIMUM_LTS_SUPPORTED => 110;
 
 use constant SERVICE_DIR  => '/etc/systemd/system/';
diff --git a/script/elevate-cpanel.PL b/script/elevate-cpanel.PL
index 3685985f..0eb56577 100755
--- a/script/elevate-cpanel.PL
+++ b/script/elevate-cpanel.PL
@@ -192,7 +192,7 @@ BEGIN {
     $Cpanel::Version::Tiny::major_version >= Elevate::Constants::MINIMUM_LTS_SUPPORTED
       or do {
         warn qq[You need to upgrade your cPanel server to version ] . Elevate::Constants::MINIMUM_LTS_SUPPORTED    #
-          . qq[or later before running this script.\n];
+          . qq[ or later before running this script.\n];
         exit 1;
       };
 }
diff --git a/t/cpanel-setup b/t/cpanel-setup
index 614d2f09..45fa8c34 100755
--- a/t/cpanel-setup
+++ b/t/cpanel-setup
@@ -3,7 +3,7 @@
 set -e
 
 ULC=/usr/local/cpanel
-VERSION=11.102.0.1
+VERSION=11.110.0.17
 REPO=$(pwd)
 
 yum clean all
@@ -31,17 +31,17 @@ echo "# ............. setup symlinks"
 ln -sf usr/local/cpanel/scripts /scripts
 ln -sf /bin/true /usr/local/cpanel/bin/build_locale_databases
 ln -sf /bin/true /usr/local/cpanel/scripts/restartsrv_tailwatchd
-ln -sf /usr/local/cpanel/3rdparty/perl/532/bin/perl /usr/local/cpanel/3rdparty/bin/perl
+ln -sf /usr/local/cpanel/3rdparty/perl/536/bin/perl /usr/local/cpanel/3rdparty/bin/perl
 
 echo "CPANEL=${VERSION}" > /etc/cpupdate.conf
 
 echo "# ............. /scripts/fix-cpanel-perl"
-rm -f /usr/local/cpanel/3rdparty/perl/532/bin/perl
+rm -f /usr/local/cpanel/3rdparty/perl/536/bin/perl
 /scripts/fix-cpanel-perl ||:
 
 echo "# ............. which perl"
 which perl
-ls -l /usr/local/cpanel/3rdparty/perl/532/bin/perl
+ls -l /usr/local/cpanel/3rdparty/perl/536/bin/perl
 
 echo "# ............. cpanm round 2"
 #perl bin/cpanm -n Params::Util

From e6e353e4cd8380d9500cc149bd82fe9b5b832721 Mon Sep 17 00:00:00 2001
From: Todd Rinaldo <toddr@cpan.org>
Date: Wed, 10 Jan 2024 21:09:54 -0600
Subject: [PATCH 2/2] Update changelog

---
 changelog | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/changelog b/changelog
index 650c1977..7ae0d14a 100644
--- a/changelog
+++ b/changelog
@@ -1,7 +1,5 @@
-2024-01-10 - version 20
+2024-??-?? - version 19
 - #337 - Add blocker if cPanel is not running version 110
-
-2024-01-10 - version 19
 - Use canonical_dump() when building JSON for repo blocker reports
 
 2024-01-09 - version 18