Skip to content

Commit 5e80f61

Browse files
committed
Merge branch 'main' into auth
2 parents 3af2ab7 + 83db6ca commit 5e80f61

File tree

17 files changed

+91
-37
lines changed

17 files changed

+91
-37
lines changed

.puppet-lint.rc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
1+
--fail-on-warnings
12
--relative
3+
--no-80chars-check
4+
--no-140chars-check
5+
--no-class_inherits_from_params_class-check
6+
--no-autoloader_layout-check
7+
--no-documentation-check
8+
--no-single_quote_string_with_variables-check
29
--no-anchor_resource-check
10+
--ignore-paths=.vendor/**/*.pp,.bundle/**/*.pp,pkg/**/*.pp,spec/**/*.pp,tests/**/*.pp,types/**/*.pp,vendor/**/*.pp

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ require:
55
AllCops:
66
NewCops: enable
77
DisplayCopNames: true
8-
TargetRubyVersion: '2.6'
8+
TargetRubyVersion: 3.1
99
Include:
1010
- "**/*.rb"
1111
Exclude:

CHANGELOG.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,24 @@ All notable changes to this project will be documented in this file.
55

66
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).
77

8-
## [v10.0.1](https://github.com/puppetlabs/puppetlabs-apt/tree/v10.0.1) - 2025-01-24
8+
## [v11.0.0](https://github.com/puppetlabs/puppetlabs-apt/tree/v11.0.0) - 2025-09-05
9+
10+
[Full Changelog](https://github.com/puppetlabs/puppetlabs-apt/compare/v10.0.1...v11.0.0)
11+
12+
### Changed
13+
14+
- (CAT-2354) Puppetcore update [#1240](https://github.com/puppetlabs/puppetlabs-apt/pull/1240) ([LukasAud](https://github.com/LukasAud))
15+
16+
### Fixed
17+
18+
- join key dir and key filename/name with slash "/" [#1233](https://github.com/puppetlabs/puppetlabs-apt/pull/1233) ([wolfaba](https://github.com/wolfaba))
19+
- Suites with a path don't get components [#1229](https://github.com/puppetlabs/puppetlabs-apt/pull/1229) ([jstraw](https://github.com/jstraw))
20+
21+
### Other
22+
23+
- (MODULES-11617) Replace apt with apt-cache when using with grep [#1248](https://github.com/puppetlabs/puppetlabs-apt/pull/1248) ([shubhamshinde360](https://github.com/shubhamshinde360))
24+
25+
## [v10.0.1](https://github.com/puppetlabs/puppetlabs-apt/tree/v10.0.1) - 2025-01-27
926

1027
[Full Changelog](https://github.com/puppetlabs/puppetlabs-apt/compare/v10.0.0...v10.0.1)
1128

Gemfile

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,50 +14,55 @@ def location_for(place_or_version, fake_version = nil)
1414
end
1515

1616
group :development do
17-
gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
18-
gem "json", '= 2.3.0', require: false if Gem::Requirement.create(['>= 2.7.0', '< 3.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
19-
gem "json", '= 2.5.1', require: false if Gem::Requirement.create(['>= 3.0.0', '< 3.0.5']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
2017
gem "json", '= 2.6.1', require: false if Gem::Requirement.create(['>= 3.1.0', '< 3.1.3']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
2118
gem "json", '= 2.6.3', require: false if Gem::Requirement.create(['>= 3.2.0', '< 4.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
2219
gem "racc", '~> 1.4.0', require: false if Gem::Requirement.create(['>= 2.7.0', '< 3.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
2320
gem "deep_merge", '~> 1.2.2', require: false
2421
gem "voxpupuli-puppet-lint-plugins", '~> 5.0', require: false
25-
gem "facterdb", '~> 2.1', require: false
22+
gem "facterdb", '~> 2.1', require: false if Gem::Requirement.create(['< 3.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
23+
gem "facterdb", '~> 3.0', require: false if Gem::Requirement.create(['>= 3.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
2624
gem "metadata-json-lint", '~> 4.0', require: false
27-
gem "rspec-puppet-facts", '~> 4.0', require: false
25+
gem "json-schema", '< 5.1.1', require: false
26+
gem "rspec-puppet-facts", '~> 4.0', require: false if Gem::Requirement.create(['< 3.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
27+
gem "rspec-puppet-facts", '~> 5.0', require: false if Gem::Requirement.create(['>= 3.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
2828
gem "dependency_checker", '~> 1.0.0', require: false
2929
gem "parallel_tests", '= 3.12.1', require: false
3030
gem "pry", '~> 0.10', require: false
3131
gem "simplecov-console", '~> 0.9', require: false
32-
gem "puppet-debugger", '~> 1.0', require: false
32+
gem "puppet-debugger", '~> 1.6', require: false
3333
gem "rubocop", '~> 1.50.0', require: false
3434
gem "rubocop-performance", '= 1.16.0', require: false
3535
gem "rubocop-rspec", '= 2.19.0', require: false
3636
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
37-
gem "rexml", '>= 3.3.9', require: false
37+
gem "bigdecimal", '< 3.2.2', require: false, platforms: [:mswin, :mingw, :x64_mingw]
3838
end
3939
group :development, :release_prep do
4040
gem "puppet-strings", '~> 4.0', require: false
41-
gem "puppetlabs_spec_helper", '~> 7.0', require: false
41+
gem "puppetlabs_spec_helper", '~> 8.0', require: false
42+
gem "puppet-blacksmith", '~> 7.0', require: false
4243
end
4344
group :system_tests do
44-
gem "puppet_litmus", '~> 1.0', require: false, platforms: [:ruby, :x64_mingw]
45+
gem "puppet_litmus", '~> 2.0', require: false, platforms: [:ruby, :x64_mingw] if !ENV['PUPPET_FORGE_TOKEN'].to_s.empty?
46+
gem "puppet_litmus", '~> 1.0', require: false, platforms: [:ruby, :x64_mingw] if ENV['PUPPET_FORGE_TOKEN'].to_s.empty?
4547
gem "CFPropertyList", '< 3.0.7', require: false, platforms: [:mswin, :mingw, :x64_mingw]
4648
gem "serverspec", '~> 2.41', require: false
4749
end
4850

49-
puppet_version = ENV['PUPPET_GEM_VERSION']
50-
facter_version = ENV['FACTER_GEM_VERSION']
51-
hiera_version = ENV['HIERA_GEM_VERSION']
52-
5351
gems = {}
52+
puppet_version = ENV.fetch('PUPPET_GEM_VERSION', nil)
53+
facter_version = ENV.fetch('FACTER_GEM_VERSION', nil)
54+
hiera_version = ENV.fetch('HIERA_GEM_VERSION', nil)
5455

55-
gems['puppet'] = location_for(puppet_version)
56-
57-
# If facter or hiera versions have been specified via the environment
58-
# variables
56+
# If PUPPET_FORGE_TOKEN is set then use authenticated source for both puppet and facter, since facter is a transitive dependency of puppet
57+
# Otherwise, do as before and use location_for to fetch gems from the default source
58+
if !ENV['PUPPET_FORGE_TOKEN'].to_s.empty?
59+
gems['puppet'] = ['~> 8.11', { require: false, source: 'https://rubygems-puppetcore.puppet.com' }]
60+
gems['facter'] = ['~> 4.11', { require: false, source: 'https://rubygems-puppetcore.puppet.com' }]
61+
else
62+
gems['puppet'] = location_for(puppet_version)
63+
gems['facter'] = location_for(facter_version) if facter_version
64+
end
5965

60-
gems['facter'] = location_for(facter_version) if facter_version
6166
gems['hiera'] = location_for(hiera_version) if hiera_version
6267

6368
gems.each do |gem_name, gem_params|

Rakefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,13 @@ require 'puppet-syntax/tasks/puppet-syntax'
77
require 'puppet-strings/tasks' if Gem.loaded_specs.key? 'puppet-strings'
88

99
PuppetLint.configuration.send('disable_relative')
10+
PuppetLint.configuration.send('disable_80chars')
11+
PuppetLint.configuration.send('disable_140chars')
12+
PuppetLint.configuration.send('disable_class_inherits_from_params_class')
13+
PuppetLint.configuration.send('disable_autoloader_layout')
14+
PuppetLint.configuration.send('disable_documentation')
15+
PuppetLint.configuration.send('disable_single_quote_string_with_variables')
1016
PuppetLint.configuration.send('disable_anchor_resource')
17+
PuppetLint.configuration.fail_on_warnings = true
18+
PuppetLint.configuration.ignore_paths = [".vendor/**/*.pp", ".bundle/**/*.pp", "pkg/**/*.pp", "spec/**/*.pp", "tests/**/*.pp", "types/**/*.pp", "vendor/**/*.pp"]
19+

data/os/Debian/11.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
apt::backports:
2+
location: http://archive.debian.org/debian
3+
repos: main contrib non-free

lib/puppet/provider/apt_key/apt_key.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def self.instances
5454
short: line_hash[:key_short],
5555
long: line_hash[:key_long],
5656
ensure: :present,
57-
expired: expired,
57+
expired:,
5858
expiry: line_hash[:key_expiry].nil? ? nil : line_hash[:key_expiry].strftime('%Y-%m-%d'),
5959
size: line_hash[:key_size],
6060
type: line_hash[:key_type],

manifests/source.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,11 @@
217217
}
218218

219219
$_list_keyring = if $_key['dir'] and $_key['filename'] {
220-
"${_key['dir']}${_key['filename']}"
220+
"${_key['dir']}/${_key['filename']}"
221221
} elsif $_key['filename'] {
222222
"/etc/apt/keyrings/${_key['filename']}"
223223
} elsif $_key['dir'] {
224-
"${_key['dir']}${_key['name']}"
224+
"${_key['dir']}/${_key['name']}"
225225
} else {
226226
"/etc/apt/keyrings/${_key['name']}"
227227
}

metadata.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "puppetlabs-apt",
3-
"version": "10.0.1",
3+
"version": "11.0.0",
44
"author": "puppetlabs",
55
"summary": "Provides an interface for managing Apt source, key, and definitions with Puppet",
66
"license": "Apache-2.0",
@@ -33,10 +33,10 @@
3333
"requirements": [
3434
{
3535
"name": "puppet",
36-
"version_requirement": ">= 7.0.0 < 9.0.0"
36+
"version_requirement": ">= 8.0.0 < 9.0.0"
3737
}
3838
],
3939
"template-url": "https://github.com/puppetlabs/pdk-templates.git#main",
40-
"template-ref": "tags/3.2.0.4-0-g5d17ec1",
41-
"pdk-version": "3.2.0"
40+
"template-ref": "heads/main-0-g11c0f3d",
41+
"pdk-version": "3.5.0"
4242
}

spec/acceptance/apt_backports_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
end
1818

1919
it 'provides backports apt sources' do
20-
run_shell('apt policy | grep --quiet backports')
20+
run_shell('apt-cache policy | grep --quiet backports')
2121
end
2222
end
2323
end

0 commit comments

Comments
 (0)