Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Puppet 8 compatibility #178

Merged
merged 32 commits into from
Jun 10, 2024
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
ba0b5e0
Puppet 8 compatibility
tuxmea Feb 16, 2024
589677c
use Gemfile from voxpupuli
tuxmea May 22, 2024
a111ad3
Update github workflows (based on puppet-gitlab)
tuxmea Jun 3, 2024
8bca4a8
Ad dmore test files from puppet-gitlab
tuxmea Jun 3, 2024
de188b8
lint fixes
tuxmea Jun 3, 2024
2a66dc4
lint updates
tuxmea Jun 3, 2024
160f6e5
MD fixes
tuxmea Jun 3, 2024
4c1733a
refactor spec tests
tuxmea Jun 3, 2024
ff1f4b9
update REFERENCE
tuxmea Jun 3, 2024
875241b
use on_supported_os instead of self assigen os names
tuxmea Jun 3, 2024
99eee5b
rubocop
tuxmea Jun 3, 2024
f892695
revert new os tests to allow merge of puppet 8
tuxmea Jun 7, 2024
22e46d0
enable puppet 8 tests
tuxmea Jun 7, 2024
a929f74
Merge remote-tracking branch 'voxpupuli/master' into puppet8
tuxmea Jun 7, 2024
35fa0a6
rebase after modulesync
tuxmea Jun 7, 2024
e1fd394
remove ruby-lsp artefact
tuxmea Jun 7, 2024
c821684
rubocop cleanup
tuxmea Jun 7, 2024
2aa5800
remove outdated os add migrastion note, add badges
tuxmea Jun 7, 2024
e03dec5
remove old test suite
tuxmea Jun 7, 2024
3a75a20
no need to install modules on your own
tuxmea Jun 7, 2024
6b6cd7e
add missing configure_beaker
tuxmea Jun 7, 2024
e4c6eac
rubocop
tuxmea Jun 7, 2024
8636f3e
update module dependencies
tuxmea Jun 7, 2024
f453425
update module dependencies
tuxmea Jun 7, 2024
ba2e4f8
add missing directories to acceptance test
tuxmea Jun 7, 2024
e79827c
typo in dir name
tuxmea Jun 7, 2024
f830987
nfs::server::export needs strict dependenc to nfs::server:servcie class
tuxmea Jun 7, 2024
137bfc9
adopt acceptance test to local tests
tuxmea Jun 8, 2024
e8c8f95
disable serverspec tests for services
tuxmea Jun 9, 2024
8592a2f
rubocop
tuxmea Jun 9, 2024
9a7607c
remove unneeded files
tuxmea Jun 9, 2024
013b898
Merge branch 'master' into puppet8
tuxmea Jun 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'voxpupuli/master' into puppet8
  • Loading branch information
tuxmea committed Jun 7, 2024

Verified

This commit was signed with the committer’s verified signature.
codebytere Shelley Vohr
commit a929f74a24ec21e812cf29e10a9444c06dc6a846
16 changes: 13 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -131,19 +131,29 @@ You can install all needed gems for spec tests into the modules directory by
running:

```sh
bundle install --path .vendor/ --without development system_tests release --jobs "$(nproc)"
bundle config set --local path '.vendor/'
bundle config set --local without 'development system_tests release'
bundle install --jobs "$(nproc)"
```

If you also want to run acceptance tests:

```sh
bundle install --path .vendor/ --with system_tests --without development release --jobs "$(nproc)"
bundle config set --local path '.vendor/'
bundle config set --local without 'development release'
bundle config set --local with 'system_tests'
bundle install --jobs "$(nproc)"
```

Our all in one solution if you don't know if you need to install or update gems:

```sh
bundle install --path .vendor/ --with system_tests --without development release --jobs "$(nproc)"; bundle update; bundle clean
bundle config set --local path '.vendor/'
bundle config set --local without 'development release'
bundle config set --local with 'system_tests'
bundle install --jobs "$(nproc)"
bundle update
bundle clean
```

As an alternative to the `--jobs "$(nproc)` parameter, you can set an
26 changes: 0 additions & 26 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

20 changes: 0 additions & 20 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -19,5 +19,3 @@ jobs:
puppet:
name: Puppet
uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v2
with:
pidfile_workaround: 'false'
22 changes: 0 additions & 22 deletions .github/workflows/release.yml

This file was deleted.

36 changes: 25 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
.idea
Gemfile.lock
.bundle
fixtures/manifests/*
fixtures/modules/*
vendor/
.vendor/
spec/fixtures/
pkg/
log/
.yardoc
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

/pkg/
/Gemfile.lock
/Gemfile.local
/vendor/
/.vendor/
/spec/fixtures/manifests/
/spec/fixtures/modules/
/.vagrant/
/.bundle/
/.ruby-version
/coverage/
/log/
/.idea/
/.dependencies/
/.librarian/
/Puppetfile.lock
*.iml
.*.sw?
/.yardoc/
/Guardfile
bolt-debug.log
.rerun.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
current directory: /Users/mea/Documents/github/puppet/derdanne-nfs/.ruby-lsp/vendor/ruby/3.2.0/gems/ed25519-1.3.0/ext/ed25519_ref10
/Users/mea/.rvm/rubies/ruby-3.2.2/bin/ruby extconf.rb
/Users/mea/.rvm/rubies/ruby-3.2.2/bin/ruby: warning: Ruby was built without YJIT support. You may need to install rustc to build Ruby with YJIT.
creating Makefile

current directory: /Users/mea/Documents/github/puppet/derdanne-nfs/.ruby-lsp/vendor/ruby/3.2.0/gems/ed25519-1.3.0/ext/ed25519_ref10
make DESTDIR\= sitearchdir\=./.gem.20240603-98069-nm1ndb sitelibdir\=./.gem.20240603-98069-nm1ndb clean

current directory: /Users/mea/Documents/github/puppet/derdanne-nfs/.ruby-lsp/vendor/ruby/3.2.0/gems/ed25519-1.3.0/ext/ed25519_ref10
make DESTDIR\= sitearchdir\=./.gem.20240603-98069-nm1ndb sitelibdir\=./.gem.20240603-98069-nm1ndb
compiling ed25519_ref10.c
In file included from ed25519_ref10.c:1:
In file included from /Users/mea/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0/ruby.h:38:
In file included from /Users/mea/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0/ruby/ruby.h:27:
In file included from /Users/mea/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0/ruby/internal/anyargs.h:76:
/Users/mea/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0/ruby/internal/intern/class.h:301:60: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
void rb_define_method_id(VALUE klass, ID mid, VALUE (*func)(ANYARGS), int arity);
^
void
/Users/mea/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0/ruby/internal/intern/class.h:339:76: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
void rb_define_protected_method(VALUE klass, const char *mid, VALUE (*func)(ANYARGS), int arity);
^
void
/Users/mea/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0/ruby/internal/intern/class.h:352:74: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
void rb_define_private_method(VALUE klass, const char *mid, VALUE (*func)(ANYARGS), int arity);
^
void
/Users/mea/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0/ruby/internal/intern/class.h:365:73: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
void rb_define_singleton_method(VALUE obj, const char *mid, VALUE(*func)(ANYARGS), int arity);
^
void
In file included from ed25519_ref10.c:1:
In file included from /Users/mea/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0/ruby.h:38:
In file included from /Users/mea/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0/ruby/ruby.h:27:
In file included from /Users/mea/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0/ruby/internal/anyargs.h:78:
/Users/mea/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0/ruby/internal/method.h:99:66: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
void rb_define_method(VALUE klass, const char *mid, VALUE (*func)(ANYARGS), int arity);
^
void
/Users/mea/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0/ruby/internal/method.h:112:75: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
void rb_define_module_function(VALUE klass, const char *mid, VALUE (*func)(ANYARGS), int arity);
^
void
/Users/mea/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0/ruby/internal/method.h:124:62: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
void rb_define_global_function(const char *mid, VALUE (*func)(ANYARGS), int arity);
^
void
In file included from ed25519_ref10.c:1:
In file included from /Users/mea/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0/ruby.h:38:
In file included from /Users/mea/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0/ruby/ruby.h:27:
/Users/mea/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0/ruby/internal/anyargs.h:271:1: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
RBIMPL_ANYARGS_DECL(rb_define_singleton_method, VALUE, const char *)
^
/Users/mea/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0/ruby/internal/anyargs.h:252:73: note: expanded from macro 'RBIMPL_ANYARGS_DECL'
RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m3(__VA_ARGS__, VALUE(*)(ANYARGS), int); \
^
/Users/mea/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0/ruby/internal/anyargs.h:272:1: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
RBIMPL_ANYARGS_DECL(rb_define_protected_method, VALUE, const char *)
^
/Users/mea/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0/ruby/internal/anyargs.h:252:73: note: expanded from macro 'RBIMPL_ANYARGS_DECL'
RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m3(__VA_ARGS__, VALUE(*)(ANYARGS), int); \
^
/Users/mea/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0/ruby/internal/anyargs.h:273:1: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
RBIMPL_ANYARGS_DECL(rb_define_private_method, VALUE, const char *)
^
/Users/mea/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0/ruby/internal/anyargs.h:252:73: note: expanded from macro 'RBIMPL_ANYARGS_DECL'
RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m3(__VA_ARGS__, VALUE(*)(ANYARGS), int); \
^
/Users/mea/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0/ruby/internal/anyargs.h:274:1: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
RBIMPL_ANYARGS_DECL(rb_define_module_function, VALUE, const char *)
^
/Users/mea/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0/ruby/internal/anyargs.h:252:73: note: expanded from macro 'RBIMPL_ANYARGS_DECL'
RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m3(__VA_ARGS__, VALUE(*)(ANYARGS), int); \
^
/Users/mea/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0/ruby/internal/anyargs.h:275:1: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
RBIMPL_ANYARGS_DECL(rb_define_global_function, const char *)
^
/Users/mea/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0/ruby/internal/anyargs.h:252:73: note: expanded from macro 'RBIMPL_ANYARGS_DECL'
RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m3(__VA_ARGS__, VALUE(*)(ANYARGS), int); \
^
/Users/mea/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0/ruby/internal/anyargs.h:276:1: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
RBIMPL_ANYARGS_DECL(rb_define_method_id, VALUE, ID)
^
/Users/mea/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0/ruby/internal/anyargs.h:252:73: note: expanded from macro 'RBIMPL_ANYARGS_DECL'
RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m3(__VA_ARGS__, VALUE(*)(ANYARGS), int); \
^
/Users/mea/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0/ruby/internal/anyargs.h:277:1: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
RBIMPL_ANYARGS_DECL(rb_define_method, VALUE, const char *)
^
/Users/mea/.rvm/rubies/ruby-3.2.2/include/ruby-3.2.0/ruby/internal/anyargs.h:252:73: note: expanded from macro 'RBIMPL_ANYARGS_DECL'
RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m3(__VA_ARGS__, VALUE(*)(ANYARGS), int); \
^
ed25519_ref10.c:12:24: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
void Init_ed25519_ref10()
^
void
15 warnings generated.
compiling fe.c
compiling ge.c
compiling keypair.c
compiling open.c
compiling sc_muladd.c
compiling sc_reduce.c
compiling sha512.c
Rename failed: /Users/mea/Documents/github/puppet/derdanne-nfs/.ruby-lsp/vendor/ruby/3.2.0/gems/ed25519-1.3.0/ext/ed25519_ref10/sha512-5119834e.o.tmp -> /Users/mea/Documents/github/puppet/derdanne-nfs/.ruby-lsp/vendor/ruby/3.2.0/gems/ed25519-1.3.0/ext/ed25519_ref10/sha512.o: No such file or directory
error: unable to rename temporary '/Users/mea/Documents/github/puppet/derdanne-nfs/.ruby-lsp/vendor/ruby/3.2.0/gems/ed25519-1.3.0/ext/ed25519_ref10/sha512-5119834e.o.tmp' to output file '/Users/mea/Documents/github/puppet/derdanne-nfs/.ruby-lsp/vendor/ruby/3.2.0/gems/ed25519-1.3.0/ext/ed25519_ref10/sha512.o': 'No such file or directory'
1 error generated.
make: *** [sha512.o] Error 1

make failed, exit code 2
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -4,10 +4,10 @@
source ENV['GEM_SOURCE'] || 'https://rubygems.org'

group :test do
gem 'voxpupuli-test', '~> 7.0', :require => false
gem 'voxpupuli-test', '~> 7.2', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
gem 'puppet_metadata', '~> 3.5', :require => false
gem 'puppet_metadata', '~> 4.0', :require => false
end

group :development do
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ rescue LoadError
# voxpupuli-release not present
else
GCGConfig.user = 'voxpupuli'
GCGConfig.project = 'puppet-gitlab'
GCGConfig.project = 'puppet-nfs'
end

desc "Run main 'test' task and report merged results to coveralls"
12 changes: 6 additions & 6 deletions spec/acceptance/class_spec.rb
Original file line number Diff line number Diff line change
@@ -3,10 +3,10 @@
require 'spec_helper_acceptance'

describe 'nfs class' do
case fact('osfamily')
case fact('os.family')

when 'Debian'
case fact('lsbdistcodename')
case fact('os.distro.codename')
when 'jessie', 'wheezy'
server_service = 'nfs-kernel-server'
server_servicehelpers = %w[nfs-common]
@@ -28,7 +28,7 @@
client_packages = %w[nfs-common nfs4-acl-tools rpcbind]

when 'RedHat'
case fact('operatingsystemmajrelease')
case fact('os.release.major')
when '6'
server_service = 'nfs'
server_servicehelpers = %w[rpcidmapd rpcbind]
@@ -80,7 +80,7 @@ class { '::nfs':

client_services.each do |service|
# puppet reports wrong status for nfs-common on wheezy
if service == 'nfs-common' && fact('lsbdistcodename') == 'wheezy'
if service == 'nfs-common' && fact('os.distro.codename') == 'wheezy'
puts 'puppet reports wrong status for nfs-common on wheezy'
else
describe service(service) do
@@ -141,7 +141,7 @@ class { '::nfs':
end

# Buggy nfs-kernel-server does not run in docker with Ubuntu 14.04, Debian wheezy and CentOs 6 images
if fact('lsbdistcodename') == 'trusty' || fact('lsbdistcodename') == 'wheezy' || (fact('osfamily') == 'RedHat' && fact('operatingsystemmajrelease') == '6')
if fact('os.distro.codename') == 'trusty' || fact('os.distro.codename') == 'wheezy' || (fact('os.family') == 'RedHat' && fact('os.release.major') == '6')
puts 'Buggy nfs-kernel-server does not run in docker with Ubuntu 14.04, Debian wheezy and CentOs 6 images'
else
describe service(server_service) do
@@ -152,7 +152,7 @@ class { '::nfs':
if server_servicehelpers != ''
server_servicehelpers.each do |server_servicehelper|
# puppet reports wrong status for nfs-common on wheezy
if server_servicehelper == 'nfs-common' && fact('lsbdistcodename') == 'wheezy'
if server_servicehelper == 'nfs-common' && fact('os.distro.codename') == 'wheezy'
puts 'puppet reports wrong status for nfs-common on wheezy'
else
describe service(server_servicehelper) do
41 changes: 23 additions & 18 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
@@ -3,25 +3,30 @@
RSpec.configure do |c|
c.mock_with :rspec
end
require 'voxpupuli/acceptance/spec_helper_acceptance'
#require 'beaker-rspec/spec_helper'
#require 'beaker/puppet_install_helper'

require 'beaker-rspec/spec_helper'
require 'beaker/puppet_install_helper'
#run_puppet_install_helper

run_puppet_install_helper
#RSpec.configure do |c|
# module_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
#
# c.formatter = :documentation
#
# c.before :suite do
# puppet_module_install(
# source: module_root,
# module_name: 'nfs'
# )
# hosts.each do |host|
# on host, puppet('module', 'install', 'puppetlabs-stdlib'), acceptable_exit_codes: [0, 1]
# on host, puppet('module', 'install', 'puppetlabs-concat'), acceptable_exit_codes: [0, 1]
# end
# end
#end

RSpec.configure do |c|
module_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))

c.formatter = :documentation

c.before :suite do
puppet_module_install(
source: module_root,
module_name: 'nfs'
)
hosts.each do |host|
on host, puppet('module', 'install', 'puppetlabs-stdlib'), acceptable_exit_codes: [0, 1]
on host, puppet('module', 'install', 'puppetlabs-concat'), acceptable_exit_codes: [0, 1]
end
end
configure_beaker do |host|
on host, puppet('module', 'install', 'puppetlabs-stdlib'), acceptable_exit_codes: [0, 1]
on host, puppet('module', 'install', 'puppetlabs-concat'), acceptable_exit_codes: [0, 1]
end
You are viewing a condensed version of this merge commit. You can view the full changes here.