From c8535e40e3aab31ac10d0cb9edcf5dab2ccc9477 Mon Sep 17 00:00:00 2001 From: Alfredo Moralejo Date: Wed, 19 May 2021 13:08:45 +0200 Subject: [PATCH] Stable-only: Pin semantic_puppet in CentOS 8 semantic_puppet >= 1.1.0 requires ruby >= 2.7.0 so can no longer be installed in ruby 2.6.0 in CentOS 8. Backport note: This backport removes the version check, because we run no tests in CentOS 9 in this branch. In addition, distro check is also removed, because the same pin is required in Ubuntu Bionic Also, this backport includes the following two changes present in victoria and later. - Clean r10k installation I16436d23a7853afe029920b3ea2f61058c133010 - Stable-only: Pin ruby packages in CentOS 8 I1b5ebe109b7d0647f324e84b465ed4960f8749f1 Closes-Bug: #2016056 Change-Id: Iadff3de808a012c42c2c9a7edb24385c64c7ae78 (cherry picked from commit e3ababb6498e65d1e2ef1d27d1e39a981935463b) (cherry picked from commit e3ababb6498e65d1e2ef1d27d1e39a981935463b) (cherry picked from commit 3f6b89c64b4b996f21d66d92669b4bdb8042efa7) (cherry picked from commit 2995e953f448421da1a4263213c9887e953cd4e8) --- install_modules.sh | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/install_modules.sh b/install_modules.sh index 2e6e53905..62889560a 100755 --- a/install_modules.sh +++ b/install_modules.sh @@ -1,7 +1,8 @@ #!/bin/bash set -ex - +source /etc/os-release +export OS_NAME_VERS=${ID}${VERSION_ID} GEM_INSTALL_CMD="gem install --no-user-install --minimal-dep --verbose --no-document" if [ -n "${GEM_HOME}" ]; then @@ -27,14 +28,18 @@ source $SCRIPT_DIR/functions print_header 'Start (install_modules.sh)' print_header 'Install r10k' -# fast_gettext 1.2.0+ requires ruby 2.1.0 -$GEM_INSTALL_CMD fast_gettext -v '< 1.2.0' -# gettext 3.3.0+ requires ruby 2.5.0 -$GEM_INSTALL_CMD gettext -v '< 3.3.0' -# puppet_forge 2.2.7 has a dependency on semantic_puppet ~> 1.0 -# which is not compatible with dependency of latest r10k on semantic_puppet ~> 0.1.0 -$GEM_INSTALL_CMD puppet_forge -v '= 2.2.6' -$GEM_INSTALL_CMD r10k -v 2.6.4 + +# faraday-net_http >= 3.0.0 requires Ruby >= 2.6.0 +# semantic_puppet >= 1.1.0 requires Ruby >= 2.7.0 +cat </tmp/Gemfile +source 'http://rubygems.org' + +gem 'faraday-net_http', '<3.0.0' +gem 'faraday', '<2.0.0' +gem 'semantic_puppet', '<1.1.0' +gem 'r10k', '<3.15.0' +EOF +$GEM_INSTALL_CMD -g /tmp/Gemfile # make sure there is no puppet module pre-installed rm -rf "${PUPPETFILE_DIR:?}/"*