From 191b2ee267ab850dcd6b9261d65ba58a60954ee9 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 13 Jun 2022 10:50:49 +0900 Subject: [PATCH] Unpin modulesync ... to use the recent modulesync which is compatible with Ruby 3.0. This also fixes the failing unit tests, which were broken by recent change in puppet-postgresql. Depends-on: https://review.opendev.org/853222 Change-Id: Idca10381dc8204e2c35491b92d0f60b3566d4375 --- contrib/bootstrap.sh | 21 +++++++++++++------ functions | 2 +- ...utter.project_name}}_db_postgresql_spec.rb | 11 +++++----- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/contrib/bootstrap.sh b/contrib/bootstrap.sh index 1c0e8c0..1b9f987 100644 --- a/contrib/bootstrap.sh +++ b/contrib/bootstrap.sh @@ -145,10 +145,18 @@ else git clone https://opendev.org/x/puppet-modulesync-configs x/puppet-modulesync-configs fi pushd x/puppet-modulesync-configs/ -#TODO(aschultz): fixme after we unstick the gate -# 0.8.x doesn't seem to work with out configs so we need to pin this but the -# this script is unhappy. -sed -i "s/'>=0.6.0'/['>=0.6.0','<0.8.0']/" Gemfile + +# TODO(tkajinam): Remove this once we remove pinning from +# puppet-modulesync-configs +if grep -q "gem 'modulesync', " ./Gemfile ; then + sed -i "s/^gem 'modulesync', .*/gem 'modulesync'/" ./Gemfile + find moduleroot/ -type f -exec git mv {} {}.erb \; +fi + +# Purge .git to make sure the git command in the subdirectory does not look up +# the git infomation at the top directory. +rm -rf .git + [ -z "${testing}" ] || ${GEM_HOME}/bin/bundle install cat > managed_modules.yml < '/var/lib/puppet/concat' })) + facts.merge!(OSDefaults.get_facts({ + # puppet-postgresql requires the service_provider fact provided by + # puppetlabs-postgresql. + :service_provider => 'systemd' + })) end - # TODO(tkajinam): Remove this once puppet-postgresql supports CentOS 9 - unless facts[:osfamily] == 'RedHat' and facts[:operatingsystemmajrelease].to_i >= 9 - it_behaves_like '{{cookiecutter.project_name}}::db::postgresql' - end + it_behaves_like '{{cookiecutter.project_name}}::db::postgresql' end end end