From 5cd01ae8f2be8b2eeede29983cf46813dc8547b4 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Thu, 17 Aug 2023 17:51:11 +0200 Subject: [PATCH 1/5] modulesync 7.0.0 --- .github/CONTRIBUTING.md | 11 +++++++---- .msync.yml | 2 +- Gemfile | 2 +- spec/spec_helper.rb | 1 + spec/spec_helper_acceptance.rb | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 8b466cfb..6aaa603f 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/.msync.yml b/.msync.yml index b929160c..dd3e9572 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: '6.0.0' +modulesync_config_version: '7.0.0' diff --git a/Gemfile b/Gemfile index 98a04cfb..db21d3b5 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,7 @@ source ENV['GEM_SOURCE'] || 'https://rubygems.org' group :test do - gem 'voxpupuli-test', '~> 6.0', :require => false + gem 'voxpupuli-test', '~> 7.0', :require => false gem 'coveralls', :require => false gem 'simplecov-console', :require => false gem 'puppet_metadata', '~> 3.0', :require => false diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 6515b7bf..9efb4ae6 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -17,3 +17,4 @@ add_custom_fact name.to_sym, value end end +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 d3a6e23c..2681792e 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -5,6 +5,6 @@ require 'voxpupuli/acceptance/spec_helper_acceptance' -configure_beaker +configure_beaker(modules: :metadata) Dir['./spec/support/acceptance/**/*.rb'].sort.each { |f| require f } From 33dbbe36a3a353f08d203b2fe5a0aa84656956f0 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 18 Aug 2023 08:51:09 +0200 Subject: [PATCH 2/5] rubocop: autofix --- .rubocop.yml | 2 ++ .rubocop_todo.yml | 13 +++++++++++++ spec/defines/copr_spec.rb | 4 ++-- 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 .rubocop_todo.yml diff --git a/.rubocop.yml b/.rubocop.yml index 53ac1898..ea22bff8 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,4 +1,6 @@ --- +inherit_from: .rubocop_todo.yml + # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml new file mode 100644 index 00000000..06f2f832 --- /dev/null +++ b/.rubocop_todo.yml @@ -0,0 +1,13 @@ +# This configuration was generated by +# `rubocop --auto-gen-config` +# on 2023-08-17 21:25:39 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: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). +Style/SlicingWithRange: + Exclude: + - 'tasks/init.rb' diff --git a/spec/defines/copr_spec.rb b/spec/defines/copr_spec.rb index ca4b05ef..9cbe1e35 100644 --- a/spec/defines/copr_spec.rb +++ b/spec/defines/copr_spec.rb @@ -81,7 +81,7 @@ it { is_expected.to contain_exec("dnf -y copr enable #{title}").with( 'path' => '/bin:/usr/bin:/sbin/:/usr/sbin', - 'unless' => "dnf copr list | egrep -q '#{title}\$'", + 'unless' => "dnf copr list | egrep -q '#{title}$'", 'require' => "Package[#{prereq_plugin}]" ) } @@ -95,7 +95,7 @@ it { is_expected.to contain_exec("dnf -y copr disable #{title}").with( 'path' => '/bin:/usr/bin:/sbin/:/usr/sbin', - 'unless' => "dnf copr list | egrep -q '#{title} (disabled)\$'", + 'unless' => "dnf copr list | egrep -q '#{title} (disabled)$'", 'require' => "Package[#{prereq_plugin}]" ) } From f4617e42a21a519e1d018f9fb951f0ccda4d0456 Mon Sep 17 00:00:00 2001 From: Steve Traylen Date: Wed, 29 Nov 2023 14:40:52 +0100 Subject: [PATCH 3/5] Drop Oracle 7 support Repos are very much broken. --- metadata.json | 1 - 1 file changed, 1 deletion(-) diff --git a/metadata.json b/metadata.json index 9bcd4f00..ecf17a60 100644 --- a/metadata.json +++ b/metadata.json @@ -57,7 +57,6 @@ { "operatingsystem": "OracleLinux", "operatingsystemrelease": [ - "7", "8" ] }, From 341f5bb6df98586a79b436c5852ead29aff01970 Mon Sep 17 00:00:00 2001 From: Steve Traylen Date: Wed, 29 Nov 2023 14:43:37 +0100 Subject: [PATCH 4/5] rubocop_todo not needed --- .rubocop.yml | 2 -- .rubocop_todo.yml | 13 ------------- 2 files changed, 15 deletions(-) delete mode 100644 .rubocop_todo.yml diff --git a/.rubocop.yml b/.rubocop.yml index ea22bff8..53ac1898 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,6 +1,4 @@ --- -inherit_from: .rubocop_todo.yml - # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml deleted file mode 100644 index 06f2f832..00000000 --- a/.rubocop_todo.yml +++ /dev/null @@ -1,13 +0,0 @@ -# This configuration was generated by -# `rubocop --auto-gen-config` -# on 2023-08-17 21:25:39 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: 1 -# This cop supports unsafe autocorrection (--autocorrect-all). -Style/SlicingWithRange: - Exclude: - - 'tasks/init.rb' From 0abb8b3f90bd6680d605c709d7af342ab2f03f97 Mon Sep 17 00:00:00 2001 From: Steve Traylen Date: Wed, 29 Nov 2023 14:48:24 +0100 Subject: [PATCH 5/5] rubocop Style/SlicingWithRange: Prefer ary[n..] over ary[n..-1] --- tasks/init.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/init.rb b/tasks/init.rb index 0ce5a7b7..4bff52a7 100755 --- a/tasks/init.rb +++ b/tasks/init.rb @@ -17,7 +17,7 @@ def yum(action, quiet) end def process_list_updates(output) - status = output[:status].lines[1..-1] + status = output[:status].lines[1..] status ||= [] result = status.map do |line|