From 8f96a5d7423905f5971485310536959de7a5b306 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Tue, 9 Jan 2024 13:41:25 +0100 Subject: [PATCH 1/4] Drop OracleLinux support While running acceptance tests it proved that it couldn't install. --- metadata.json | 7 ------- 1 file changed, 7 deletions(-) diff --git a/metadata.json b/metadata.json index 8f40c11..50e1c3a 100644 --- a/metadata.json +++ b/metadata.json @@ -33,13 +33,6 @@ "8" ] }, - { - "operatingsystem": "OracleLinux", - "operatingsystemrelease": [ - "7", - "8" - ] - }, { "operatingsystem": "Scientific", "operatingsystemrelease": [ From 9ff97d826fe6c53df38b1c71011de3b7d7980f19 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Tue, 9 Jan 2024 11:40:13 +0100 Subject: [PATCH 2/4] Install puppet-epel in CI on the entire Red Hat OS family --- spec/spec_helper_acceptance.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index a92f8e7..ee28fea 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -3,7 +3,7 @@ require 'voxpupuli/acceptance/spec_helper_acceptance' configure_beaker do |host| - install_module_from_forge('puppet-epel', '>= 3.0.1 < 4.0.0') if fact_on(host, 'os.name') == 'CentOS' + install_module_from_forge('puppet-epel', '>= 3.0.1 < 4.0.0') if fact_on(host, 'os.family') == 'RedHat' install_module_from_forge('puppetlabs-apache', '>= 5.7.0 < 7.0.0') install_module_from_forge('puppetlabs-java', '>= 6.3.0 < 8.0.0') end From 4025b40cdb9a86ca4215feb3a1b3bfad141b5b2f Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 18 Aug 2023 08:40:55 +0200 Subject: [PATCH 3/4] rubocop: autofix --- .rubocop.yml | 1 + .rubocop_todo.yml | 23 +++++++++++++++++++ lib/puppet/provider/rvm_alias/alias.rb | 2 +- lib/puppet/provider/rvm_gem/gem.rb | 2 +- lib/puppet/provider/rvm_gemset/gemset.rb | 2 +- .../rvm_system_ruby/rvm_system_ruby.rb | 2 +- lib/puppet/provider/rvm_wrapper/wrapper.rb | 2 +- 7 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 .rubocop_todo.yml diff --git a/.rubocop.yml b/.rubocop.yml index 53ac189..fded90c 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -2,5 +2,6 @@ # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ +inherit_from: .rubocop_todo.yml inherit_gem: voxpupuli-test: rubocop.yml diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml new file mode 100644 index 0000000..7a294a9 --- /dev/null +++ b/.rubocop_todo.yml @@ -0,0 +1,23 @@ +# This configuration was generated by +# `rubocop --auto-gen-config` +# on 2024-01-08 18:55:36 UTC using RuboCop version 1.50.2. +# The point is for the user to remove these configuration records +# one by one as the offenses are removed from the code base. +# Note that changes in the inspected code, or installation of new +# versions of RuboCop, may require this file to be generated again. + +# Offense count: 12 +# Configuration parameters: Max. +RSpec/IndexedLet: + Exclude: + - 'spec/acceptance/rvm_system_spec.rb' + +# Offense count: 5 +# This cop supports unsafe autocorrection (--autocorrect-all). +Style/EnvHome: + Exclude: + - 'lib/puppet/provider/rvm_alias/alias.rb' + - 'lib/puppet/provider/rvm_gem/gem.rb' + - 'lib/puppet/provider/rvm_gemset/gemset.rb' + - 'lib/puppet/provider/rvm_system_ruby/rvm_system_ruby.rb' + - 'lib/puppet/provider/rvm_wrapper/wrapper.rb' diff --git a/lib/puppet/provider/rvm_alias/alias.rb b/lib/puppet/provider/rvm_alias/alias.rb index 4990ceb..6bff27b 100644 --- a/lib/puppet/provider/rvm_alias/alias.rb +++ b/lib/puppet/provider/rvm_alias/alias.rb @@ -5,7 +5,7 @@ desc 'RVM alias support.' has_command(:rvmcmd, '/usr/local/rvm/bin/rvm') do - environment HOME: ENV['HOME'] + environment HOME: ENV.fetch('HOME', nil) end def target_ruby diff --git a/lib/puppet/provider/rvm_gem/gem.rb b/lib/puppet/provider/rvm_gem/gem.rb index 343a737..027dcbc 100644 --- a/lib/puppet/provider/rvm_gem/gem.rb +++ b/lib/puppet/provider/rvm_gem/gem.rb @@ -9,7 +9,7 @@ has_feature :versionable has_command(:rvmcmd, '/usr/local/rvm/bin/rvm') do - environment HOME: ENV['HOME'] + environment HOME: ENV.fetch('HOME', nil) end def ruby_version diff --git a/lib/puppet/provider/rvm_gemset/gemset.rb b/lib/puppet/provider/rvm_gemset/gemset.rb index 78fa326..e54a668 100644 --- a/lib/puppet/provider/rvm_gemset/gemset.rb +++ b/lib/puppet/provider/rvm_gemset/gemset.rb @@ -5,7 +5,7 @@ desc 'RVM gemset support.' has_command(:rvmcmd, '/usr/local/rvm/bin/rvm') do - environment HOME: ENV['HOME'] + environment HOME: ENV.fetch('HOME', nil) end def ruby_version diff --git a/lib/puppet/provider/rvm_system_ruby/rvm_system_ruby.rb b/lib/puppet/provider/rvm_system_ruby/rvm_system_ruby.rb index 7eaf96c..f354531 100644 --- a/lib/puppet/provider/rvm_system_ruby/rvm_system_ruby.rb +++ b/lib/puppet/provider/rvm_system_ruby/rvm_system_ruby.rb @@ -4,7 +4,7 @@ desc 'Ruby RVM support.' has_command(:rvmcmd, '/usr/local/rvm/bin/rvm') do - environment HOME: ENV['HOME'] + environment HOME: ENV.fetch('HOME', nil) end def create diff --git a/lib/puppet/provider/rvm_wrapper/wrapper.rb b/lib/puppet/provider/rvm_wrapper/wrapper.rb index c5e0d16..fd46c55 100644 --- a/lib/puppet/provider/rvm_wrapper/wrapper.rb +++ b/lib/puppet/provider/rvm_wrapper/wrapper.rb @@ -5,7 +5,7 @@ desc 'RVM wrapper support.' has_command(:rvmcmd, '/usr/local/rvm/bin/rvm') do - environment HOME: ENV['HOME'] + environment HOME: ENV.fetch('HOME', nil) end def target_ruby From 552a96131ed2342582213974199a5aa0e867425c Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Mon, 8 Jan 2024 19:57:40 +0100 Subject: [PATCH 4/4] Modulesync 7.2.0 --- .github/CONTRIBUTING.md | 11 +++++++---- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 2 +- .msync.yml | 2 +- .pmtignore | 1 + Gemfile | 11 +++++------ spec/spec_helper.rb | 1 + spec/spec_helper_acceptance.rb | 6 +++--- 8 files changed, 20 insertions(+), 16 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 8b466cf..6aaa603 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -232,18 +232,21 @@ simple tests against it after applying the module. You can run this with: ```sh -BEAKER_setfile=debian11-64 bundle exec rake beaker +BEAKER_PUPPET_COLLECTION=puppet7 BEAKER_setfile=debian11-64 bundle exec rake beaker ``` -You can replace the string `debian10` with any common operating system. +You can replace the string `debian11` with any common operating system. The following strings are known to work: -* ubuntu1804 * ubuntu2004 -* debian10 +* ubuntu2204 * debian11 * centos7 * centos8 +* centos9 +* almalinux8 +* almalinux9 +* fedora36 For more information and tips & tricks, see [voxpupuli-acceptance's documentation](https://github.com/voxpupuli/voxpupuli-acceptance#running-tests). diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8a07791..b66d8ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,6 @@ concurrency: jobs: puppet: name: Puppet - uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v1 + uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v2 with: pidfile_workaround: 'false' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 15f1721..55324aa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ on: jobs: release: name: Release - uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v1 + uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v2 with: allowed_owner: 'voxpupuli' secrets: diff --git a/.msync.yml b/.msync.yml index a4b0069..f818344 100644 --- a/.msync.yml +++ b/.msync.yml @@ -2,4 +2,4 @@ # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -modulesync_config_version: '5.5.0' +modulesync_config_version: '7.2.0' diff --git a/.pmtignore b/.pmtignore index 58a0408..10b9830 100644 --- a/.pmtignore +++ b/.pmtignore @@ -35,3 +35,4 @@ /.yardoc/ /.yardopts /Dockerfile +/HISTORY.md diff --git a/Gemfile b/Gemfile index 15313c3..a4a3b20 100644 --- a/Gemfile +++ b/Gemfile @@ -4,10 +4,10 @@ source ENV['GEM_SOURCE'] || 'https://rubygems.org' group :test do - gem 'voxpupuli-test', '~> 5.4', :require => false + gem 'voxpupuli-test', '~> 7.0', :require => false gem 'coveralls', :require => false gem 'simplecov-console', :require => false - gem 'puppet_metadata', '~> 2.0', :require => false + gem 'puppet_metadata', '~> 3.5', :require => false end group :development do @@ -16,18 +16,17 @@ group :development do end group :system_tests do - gem 'voxpupuli-acceptance', '~> 1.0', :require => false + gem 'voxpupuli-acceptance', '~> 3.0', :require => false end group :release do - gem 'github_changelog_generator', '>= 1.16.1', :require => false if RUBY_VERSION >= '2.5' - gem 'voxpupuli-release', '~> 2.0', :require => false + gem 'voxpupuli-release', '~> 3.0', :require => false end gem 'rake', :require => false gem 'facter', ENV['FACTER_GEM_VERSION'], :require => false, :groups => [:test] -puppetversion = ENV['PUPPET_GEM_VERSION'] || '>= 6.0' +puppetversion = ENV['PUPPET_GEM_VERSION'] || '~> 7.24' gem 'puppet', puppetversion, :require => false, :groups => [:test] # vim: syntax=ruby diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index e2c3cc6..46d4c7f 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -19,3 +19,4 @@ end require 'spec_helper_methods' +Dir['./spec/support/spec/**/*.rb'].sort.each { |f| require f } diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index ee28fea..5b17c7d 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -3,7 +3,7 @@ require 'voxpupuli/acceptance/spec_helper_acceptance' configure_beaker do |host| - install_module_from_forge('puppet-epel', '>= 3.0.1 < 4.0.0') if fact_on(host, 'os.family') == 'RedHat' - install_module_from_forge('puppetlabs-apache', '>= 5.7.0 < 7.0.0') - install_module_from_forge('puppetlabs-java', '>= 6.3.0 < 8.0.0') + install_puppet_module_via_pmt_on(host, 'puppet-epel', '>= 3.0.1 < 4.0.0') if fact_on(host, 'os.family') == 'RedHat' + install_puppet_module_via_pmt_on(host, 'puppetlabs-apache', '>= 5.7.0 < 7.0.0') + install_puppet_module_via_pmt_on(host, 'puppetlabs-java', '>= 6.3.0 < 8.0.0') end