Skip to content

Commit a6d6ecb

Browse files
authored
Merge pull request #520 from voxpupuli/modulesync
modulesync 2.9.0
2 parents ead6301 + 74eb076 commit a6d6ecb

File tree

13 files changed

+60
-26
lines changed

13 files changed

+60
-26
lines changed

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ BUNDLE_JOBS="$(nproc)"
7575

7676
### Note for OS X users
7777

78-
`nproc` isn't a valid command unter OS x. As an alternative, you can do:
78+
`nproc` isn't a valid command under OS x. As an alternative, you can do:
7979

8080
```sh
8181
--jobs "$(sysctl -n hw.ncpu)"

.travis.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
dist: xenial
2+
dist: bionic
33
language: ruby
44
cache: bundler
55
before_install:
@@ -25,43 +25,43 @@ matrix:
2525
env: PUPPET_VERSION="~> 5.0" CHECK=build DEPLOY_TO_FORGE=yes
2626
- rvm: 2.5.3
2727
bundler_args: --without development release
28-
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=ubuntu1604-64 BEAKER_HYPERVISOR=docker CHECK=beaker
28+
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=ubuntu1604-64 BEAKER_HYPERVISOR=docker CHECK=beaker
2929
services: docker
3030
- rvm: 2.5.3
3131
bundler_args: --without development release
32-
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=ubuntu1604-64 BEAKER_HYPERVISOR=docker CHECK=beaker
32+
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=ubuntu1604-64 BEAKER_HYPERVISOR=docker CHECK=beaker
3333
services: docker
3434
- rvm: 2.5.3
3535
bundler_args: --without development release
36-
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=ubuntu1804-64 BEAKER_HYPERVISOR=docker CHECK=beaker
36+
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=ubuntu1804-64 BEAKER_HYPERVISOR=docker CHECK=beaker
3737
services: docker
3838
- rvm: 2.5.3
3939
bundler_args: --without development release
40-
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=ubuntu1804-64 BEAKER_HYPERVISOR=docker CHECK=beaker
40+
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=ubuntu1804-64 BEAKER_HYPERVISOR=docker CHECK=beaker
4141
services: docker
4242
- rvm: 2.5.3
4343
bundler_args: --without development release
44-
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian8-64 BEAKER_HYPERVISOR=docker CHECK=beaker
44+
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian8-64 BEAKER_HYPERVISOR=docker CHECK=beaker
4545
services: docker
4646
- rvm: 2.5.3
4747
bundler_args: --without development release
48-
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian8-64 BEAKER_HYPERVISOR=docker CHECK=beaker
48+
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian8-64 BEAKER_HYPERVISOR=docker CHECK=beaker
4949
services: docker
5050
- rvm: 2.5.3
5151
bundler_args: --without development release
52-
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian9-64 BEAKER_HYPERVISOR=docker CHECK=beaker
52+
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian9-64 BEAKER_HYPERVISOR=docker CHECK=beaker
5353
services: docker
5454
- rvm: 2.5.3
5555
bundler_args: --without development release
56-
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian9-64 BEAKER_HYPERVISOR=docker CHECK=beaker
56+
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian9-64 BEAKER_HYPERVISOR=docker CHECK=beaker
5757
services: docker
5858
- rvm: 2.5.3
5959
bundler_args: --without development release
60-
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=centos7-64 BEAKER_HYPERVISOR=docker CHECK=beaker
60+
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=centos7-64 BEAKER_HYPERVISOR=docker CHECK=beaker
6161
services: docker
6262
- rvm: 2.5.3
6363
bundler_args: --without development release
64-
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=centos7-64 BEAKER_HYPERVISOR=docker CHECK=beaker
64+
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=centos7-64 BEAKER_HYPERVISOR=docker CHECK=beaker
6565
services: docker
6666
branches:
6767
only:

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ RUN bundle install --without system_tests development release --path=${BUNDLE_PA
1515
COPY . .
1616

1717
RUN bundle install
18-
RUN bundle exec release_checks
18+
RUN bundle exec rake release_checks
1919

2020
# Container should not saved
2121
RUN exit 1

Gemfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ end
1212

1313
group :test do
1414
gem 'puppetlabs_spec_helper', '>= 2.14.0', :require => false
15-
gem 'rspec-puppet-facts', '>= 1.8.0', :require => false
15+
gem 'rspec-puppet-facts', '>= 1.9.5', :require => false
1616
gem 'rspec-puppet-utils', :require => false
1717
gem 'puppet-lint-leading_zero-check', :require => false
1818
gem 'puppet-lint-trailing_comma-check', :require => false
@@ -22,6 +22,7 @@ group :test do
2222
gem 'puppet-lint-variable_contains_upcase', :require => false
2323
gem 'puppet-lint-absolute_classname-check', :require => false
2424
gem 'puppet-lint-topscope-variable-check', :require => false
25+
gem 'puppet-lint-legacy_facts-check', :require => false
2526
gem 'metadata-json-lint', :require => false
2627
gem 'redcarpet', :require => false
2728
gem 'rubocop', '~> 0.49.1', :require => false
@@ -65,7 +66,7 @@ end
6566
group :release do
6667
gem 'github_changelog_generator', :require => false, :git => 'https://github.com/github-changelog-generator/github-changelog-generator'
6768
gem 'puppet-blacksmith', :require => false
68-
gem 'voxpupuli-release', :require => false, :git => 'https://github.com/voxpupuli/voxpupuli-release-gem'
69+
gem 'voxpupuli-release', :require => false
6970
gem 'puppet-strings', '>= 2.2', :require => false
7071
end
7172

Rakefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,19 @@ begin
7777
metadata = JSON.load(File.read(metadata_json))
7878
config.project = metadata['name']
7979
end
80+
81+
# Workaround for https://github.com/github-changelog-generator/github-changelog-generator/issues/715
82+
require 'rbconfig'
83+
if RbConfig::CONFIG['host_os'] =~ /linux/
84+
task :changelog do
85+
puts 'Fixing line endings...'
86+
changelog_file = File.join(__dir__, 'CHANGELOG.md')
87+
changelog_txt = File.read(changelog_file)
88+
new_contents = changelog_txt.gsub(%r{\r\n}, "\n")
89+
File.open(changelog_file, "w") {|file| file.puts new_contents }
90+
end
91+
end
92+
8093
rescue LoadError
8194
end
8295
# vim: syntax=ruby

manifests/init.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
# Module compatibility check
7474
$compatible = [ 'Debian', 'RedHat', 'Suse', 'Gentoo', 'AIX' ]
7575
if ! ($facts['os']['family'] in $compatible) {
76-
fail("Module is not compatible with ${::operatingsystem}")
76+
fail("Module is not compatible with ${facts['os']['name']}")
7777
}
7878

7979
# Anchor pattern to contain dependencies

manifests/install.pp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@
145145
'rhscl': {
146146
# rhscl is RedHat SCLs from softwarecollections.org
147147
if $python::rhscl_use_public_repository {
148-
$scl_package = "rhscl-${python::version}-epel-${::operatingsystemmajrelease}-${::architecture}"
148+
$scl_package = "rhscl-${python::version}-epel-${facts['os']['release']['major']}-${facts['os']['architecture']}"
149149
package { $scl_package:
150-
source => "https://www.softwarecollections.org/en/scls/rhscl/${python::version}/epel-${::operatingsystemmajrelease}-${::architecture}/download/${scl_package}.noarch.rpm",
150+
source => "https://www.softwarecollections.org/en/scls/rhscl/${python::version}/epel-${facts['os']['release']['major']}-${facts['os']['architecture']}/download/${scl_package}.noarch.rpm",
151151
provider => 'rpm',
152152
tag => 'python-scl-repo',
153153
}
@@ -244,7 +244,7 @@
244244
Class['epel'] -> Package['pip']
245245
}
246246
}
247-
if ($venv_ensure != 'absent') and ($::operatingsystemrelease =~ /^6/) {
247+
if ($venv_ensure != 'absent') and ($facts['os']['release']['full'] =~ /^6/) {
248248
if $python::use_epel == true {
249249
include 'epel'
250250
Class['epel'] -> Package['virtualenv']
@@ -272,11 +272,11 @@
272272
$pip_category = undef
273273
$pip_package = "${python}-pip"
274274
$pip_provider = $python.regsubst(/^.*python3\.?/,'pip3.').regsubst(/\.$/,'')
275-
} elsif ($::osfamily == 'RedHat') and (versioncmp($::operatingsystemmajrelease, '7') >= 0) {
275+
} elsif ($facts['os']['family'] == 'RedHat') and (versioncmp($facts['os']['release']['major'], '7') >= 0) {
276276
$pip_category = undef
277277
$pip_package = 'python2-pip'
278278
$pip_provider = pip2
279-
} elsif $::osfamily == 'Gentoo' {
279+
} elsif $facts['os']['family'] == 'Gentoo' {
280280
$pip_category = 'dev-python'
281281
$pip_package = 'pip'
282282
$pip_provider = 'pip'

manifests/params.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
$valid_versions = undef
1616
$manage_scl = true
1717

18-
if $::osfamily == 'RedHat' {
19-
if $::operatingsystem != 'Fedora' {
18+
if $facts['os']['family'] == 'RedHat' {
19+
if $facts['os']['name'] != 'Fedora' {
2020
$use_epel = true
2121
} else {
2222
$use_epel = false

manifests/pyvenv.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
# Debian splits the venv module into a seperate package
4747
if ( $facts['os']['family'] == 'Debian'){
4848
$python3_venv_package="python${normalized_python_version}-venv"
49-
case $facts['lsbdistcodename'] {
49+
case $facts['os']['distro']['codename'] {
5050
'xenial','bionic','cosmic','disco',
5151
'jessie','stretch','buster': {
5252
ensure_packages ($python3_venv_package)

spec/classes/python_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
describe 'python', type: :class do
44
on_supported_os.each do |os, facts|
5-
context "on #{os} " do
5+
next if os == 'gentoo-3-x86_64'
6+
context "on #{os}" do
67
let :facts do
78
facts
89
end

0 commit comments

Comments
 (0)