puppet-modules/puppetlabs-apt.git
11 months agoFix minimum version requirement for stdlib stdlib-min-version
Romain Tartière [Mon, 5 Jun 2023 18:45:17 +0000 (08:45 -1000)]
Fix minimum version requirement for stdlib

Since c0b8640fc6a7c3381877863960e02da3fa1fe640, we use the namespaced
version of `stdlib::ensure_packages`, which appeared in version 9.0.0 of
the stdlib module.

Adjust the version requirement accordingly.

11 months agoMerge pull request #1113 from bastelfreak/pdksync_CONT-1028-update-stdlib-dependency
Lukas Audzevicius [Mon, 5 Jun 2023 09:13:52 +0000 (10:13 +0100)]
Merge pull request #1113 from bastelfreak/pdksync_CONT-1028-update-stdlib-dependency

(CONT-1028) puppetlabs/stdlib: Allow 9.x

11 months agoensure_packages: switch to stdlib::ensure_packages
Tim Meusel [Mon, 5 Jun 2023 07:37:05 +0000 (09:37 +0200)]
ensure_packages: switch to stdlib::ensure_packages

11 months agoSwitch from merge() to native puppet
Lukas Audzevicius [Wed, 31 May 2023 11:26:08 +0000 (12:26 +0100)]
Switch from merge() to native puppet

11 months ago(CONT-1028) puppetlabs/stdlib: Allow 9.x
Lukas Audzevicius [Tue, 30 May 2023 16:13:14 +0000 (17:13 +0100)]
(CONT-1028) puppetlabs/stdlib: Allow 9.x

12 months agoMerge pull request #1110 from puppetlabs/CONT-581
Gavin Patton [Tue, 30 May 2023 14:46:29 +0000 (15:46 +0100)]
Merge pull request #1110 from puppetlabs/CONT-581

(CONT-581)  Adding deferred function support for password field

12 months ago(CONT-581) Adding deferred function support for password field CONT-581
Ramesh Sencha [Mon, 29 May 2023 08:38:36 +0000 (14:08 +0530)]
(CONT-581)  Adding deferred function support for password field

12 months agoMerge pull request #1108 from puppetlabs/pdksync_CONT-1001-update_litmus_dep
jordanbreen28 [Tue, 23 May 2023 13:24:34 +0000 (14:24 +0100)]
Merge pull request #1108 from puppetlabs/pdksync_CONT-1001-update_litmus_dep

pdksync - (CONT-1001) Add litmus ~> 1.0

12 months ago(CONT-1001) Add litmus ~> 1.0 pdksync_CONT-1001-update_litmus_dep
Ramesh Sencha [Tue, 23 May 2023 10:46:22 +0000 (16:16 +0530)]
(CONT-1001) Add litmus ~> 1.0

12 months agoMerge pull request #1107 from puppetlabs/pdksync_CONT-930-rollout_new_gh-changelog
Gavin Patton [Mon, 15 May 2023 13:25:20 +0000 (14:25 +0100)]
Merge pull request #1107 from puppetlabs/pdksync_CONT-930-rollout_new_gh-changelog

pdksync - (CONT-930) - Roll out new changelog generator

12 months ago(CONT-930) - Roll out new changelog generator pdksync_CONT-930-rollout_new_gh-changelog
jordanbreen28 [Mon, 15 May 2023 13:17:42 +0000 (14:17 +0100)]
(CONT-930) - Roll out new changelog generator

12 months agoMerge pull request #1104 from kenyon/refresh-on-expired-subkeys
jordanbreen28 [Fri, 12 May 2023 11:48:11 +0000 (12:48 +0100)]
Merge pull request #1104 from kenyon/refresh-on-expired-subkeys

(MODULES-10831) key is expired if all subkeys are expired

12 months ago(MODULES-10831) key is expired if all subkeys are expired
Kenyon Ralph [Sat, 22 Apr 2023 18:51:29 +0000 (11:51 -0700)]
(MODULES-10831) key is expired if all subkeys are expired

Previously, subkeys were not considered at all in the determination of
whether a key was expired. Now this looks at all of the subkeys, and if
they are all expired, considers the whole key expired.

13 months agoMerge pull request #1101 from david22swan/CONT-773/main/puppet_8
jordanbreen28 [Thu, 27 Apr 2023 08:26:22 +0000 (09:26 +0100)]
Merge pull request #1101 from david22swan/CONT-773/main/puppet_8

(CONT-773) Add Support for Puppet 8 / Remove Support for Puppet 6

13 months ago(CONT-773) Lint/ConstantDefinitionInBlock Correction
david22swan [Wed, 26 Apr 2023 17:05:15 +0000 (18:05 +0100)]
(CONT-773) Lint/ConstantDefinitionInBlock Correction

13 months ago(CONT-773) Rubocop Manual Fix 6 - RSpec/RepeatedExampleGroupDescription
david22swan [Wed, 26 Apr 2023 16:50:58 +0000 (17:50 +0100)]
(CONT-773) Rubocop Manual Fix 6 - RSpec/RepeatedExampleGroupDescription

13 months ago(CONT-773) Rubocop Manual Fix 5 - RSpec/ContextWording
david22swan [Wed, 26 Apr 2023 16:47:07 +0000 (17:47 +0100)]
(CONT-773) Rubocop Manual Fix 5 - RSpec/ContextWording

13 months ago(CONT-773) Rubocop Manual Fix 4 - Performance/CollectionLiteralInLoop
david22swan [Wed, 26 Apr 2023 16:10:38 +0000 (17:10 +0100)]
(CONT-773) Rubocop Manual Fix 4 - Performance/CollectionLiteralInLoop

13 months ago(CONT-773) Rubocop Manual Fix 3 - Lint/ConstantDefinitionInBlock
david22swan [Wed, 26 Apr 2023 16:09:00 +0000 (17:09 +0100)]
(CONT-773) Rubocop Manual Fix 3 - Lint/ConstantDefinitionInBlock

13 months ago(CONT-773) Rubocop Unsafe Auto Fixes 4-5
david22swan [Wed, 26 Apr 2023 15:43:31 +0000 (16:43 +0100)]
(CONT-773) Rubocop Unsafe Auto Fixes 4-5

- Style/GlobalStdStream
- Style/SlicingWithRange

13 months ago(CONT-773) Rubocop Unsafe Auto Fixes 1-3
david22swan [Wed, 26 Apr 2023 14:37:01 +0000 (15:37 +0100)]
(CONT-773) Rubocop Unsafe Auto Fixes 1-3

- Lint/BooleanSymbol
- RSpec/BeEq
- Style/CaseLikeIf

13 months ago(CONT-773) Rubocop Manual Fix 2 - RSpec/ExampleWording
david22swan [Wed, 26 Apr 2023 14:32:25 +0000 (15:32 +0100)]
(CONT-773) Rubocop Manual Fix 2 - RSpec/ExampleWording

13 months ago(CONT-773) Set toapt_key `open` calls to `URI.open`
david22swan [Wed, 26 Apr 2023 14:09:12 +0000 (15:09 +0100)]
(CONT-773) Set toapt_key `open` calls to `URI.open`

Calls to `open` have previously been left vague, which has caused issues upon implementing Ruby 3

13 months ago(CONT-773) Rubocop Auto Fixes 16-17
david22swan [Fri, 21 Apr 2023 12:49:22 +0000 (13:49 +0100)]
(CONT-773) Rubocop Auto Fixes 16-17

- Style/RescueStandardError
- Style/TrailingCommaInHashLiteral

13 months ago(CONT-773) Rubocop Auto Fixes 11-15
david22swan [Fri, 21 Apr 2023 12:48:27 +0000 (13:48 +0100)]
(CONT-773) Rubocop Auto Fixes 11-15

- RSpec/ExampleWording
- RSpec/ImplicitSubject
- Style/IfUnlessModifier
- Style/QuotedSymbols
- Style/RedundantRegexpEscape

13 months ago(CONT-773) Rubocop Auto Fixes 6-10
david22swan [Fri, 21 Apr 2023 12:44:09 +0000 (13:44 +0100)]
(CONT-773) Rubocop Auto Fixes 6-10

- Lint/SymbolConversion
- RSpec/BeNil
- RSpec/EmptyLineAfterExample
- RSpec/EmptyLineAfterExampleGroup
- RSpec/EmptyLineAfterHook

13 months ago(CONT-773) Rubocop Auto Fixes 1-5
david22swan [Fri, 21 Apr 2023 12:42:23 +0000 (13:42 +0100)]
(CONT-773) Rubocop Auto Fixes 1-5

- Layout/ClosingHeredocIndentation
- Layout/EmptyLineAfterGuardClause
- Layout/HashAlignment
- Layout/HeredocIndentation
- Layout/SpaceAroundMethodCallOperator

13 months ago(CONT-773) Rubocop Manual Fix 1 - RSpec/MultipleExpectations
david22swan [Fri, 21 Apr 2023 12:35:15 +0000 (13:35 +0100)]
(CONT-773) Rubocop Manual Fix 1 - RSpec/MultipleExpectations

13 months ago(CONT-773) Update Rubocop Versions
david22swan [Fri, 21 Apr 2023 09:14:12 +0000 (10:14 +0100)]
(CONT-773) Update Rubocop Versions

New Versions:
rubocop = 1.48.1
rubocop-performance = 1.16.0
rubocop-rspec = 2.19.0

13 months ago(CONT-773) Re-pin puppet_agent
david22swan [Fri, 21 Apr 2023 09:07:06 +0000 (10:07 +0100)]
(CONT-773) Re-pin puppet_agent

13 months ago(CONT-773) Add Support for Puppet 8 / Remove Support for Puppet 6
david22swan [Fri, 21 Apr 2023 09:06:24 +0000 (10:06 +0100)]
(CONT-773) Add Support for Puppet 8 / Remove Support for Puppet 6

13 months ago(CONT-773) PDK Update
david22swan [Fri, 21 Apr 2023 09:05:46 +0000 (10:05 +0100)]
(CONT-773) PDK Update

13 months agoMerge pull request #1100 from puppetlabs/pdksync_CONT-844-update_.sync.yml
Gavin Patton [Wed, 5 Apr 2023 12:14:22 +0000 (13:14 +0100)]
Merge pull request #1100 from puppetlabs/pdksync_CONT-844-update_.sync.yml

pdksync - (CONT-844) - Update .sync.yml

13 months ago(CONT-844) - Update .sync.yml pdksync_CONT-844-update_.sync.yml
jordanbreen28 [Wed, 5 Apr 2023 09:48:57 +0000 (10:48 +0100)]
(CONT-844) - Update .sync.yml

14 months agoMerge pull request #1096 from puppetlabs/pdksync_CONT-229-Implement_reusable_workflows
Gavin Patton [Thu, 23 Mar 2023 13:53:12 +0000 (13:53 +0000)]
Merge pull request #1096 from puppetlabs/pdksync_CONT-229-Implement_reusable_workflows

pdksync - CONT-229-Implement reusable workflows

14 months ago(CONT-229) - Implement reusable workflows pdksync_CONT-229-Implement_reusable_workflows
jordanbreen28 [Thu, 23 Mar 2023 09:50:26 +0000 (09:50 +0000)]
(CONT-229) - Implement reusable workflows

14 months agoMerge pull request #1095 from puppetlabs/pdksync_(MAINT)_Pin_puppetlabs-puppet_agent
jordanbreen28 [Wed, 22 Mar 2023 10:53:59 +0000 (10:53 +0000)]
Merge pull request #1095 from puppetlabs/pdksync_(MAINT)_Pin_puppetlabs-puppet_agent

pdksync - (CONT-768) Pin puppetlabs-puppet_agent

14 months ago"This change pins the puppetlabs-puppet_agent module to v4.12.1. Previosuly the fixut... pdksync_(MAINT)_Pin_puppetlabs-puppet_agent
Gavin Patton [Wed, 22 Mar 2023 06:22:27 +0000 (06:22 +0000)]
"This change pins the puppetlabs-puppet_agent module to v4.12.1. Previosuly the fixutre was configured to pull from main. Given the recent changes when moving towards puppet8 main is unsafe."

14 months agoMerge pull request #1092 from puppetlabs/release-prep v9.0.2
jordanbreen28 [Tue, 14 Mar 2023 16:12:40 +0000 (16:12 +0000)]
Merge pull request #1092 from puppetlabs/release-prep

Release prep v9.0.2

14 months agoRelease prep v9.0.2
GitHub Action [Tue, 14 Mar 2023 15:50:09 +0000 (15:50 +0000)]
Release prep v9.0.2

14 months agoMerge pull request #1091 from puppetlabs/maint-pdk_update
jordanbreen28 [Tue, 14 Mar 2023 15:33:54 +0000 (15:33 +0000)]
Merge pull request #1091 from puppetlabs/maint-pdk_update

(maint) - pdk update

14 months ago(maint) - pdk update maint-pdk_update
jordanbreen28 [Tue, 14 Mar 2023 15:10:46 +0000 (15:10 +0000)]
(maint) - pdk update

15 months agoMerge pull request #1090 from tuxmea/fix_pin_template
Craig Gumbley [Tue, 21 Feb 2023 22:14:32 +0000 (22:14 +0000)]
Merge pull request #1090 from tuxmea/fix_pin_template

15 months agoAdopt new parameter defaults in template
Martin Alfke [Wed, 8 Feb 2023 10:52:37 +0000 (11:52 +0100)]
Adopt new parameter defaults in template

the apt::pin define has switched from empty string to Undef.
But the template was not updated.

fixes #1089

15 months agoMerge pull request #1088 from puppetlabs/pdksync_CONT-211-add_mend_config
Lukas Audzevicius [Wed, 1 Feb 2023 15:12:18 +0000 (15:12 +0000)]
Merge pull request #1088 from puppetlabs/pdksync_CONT-211-add_mend_config

pdksync - (CONT-211) Adding mend config

15 months agoAdding mend file pdksync_CONT-211-add_mend_config
Paula Muir [Wed, 1 Feb 2023 11:56:16 +0000 (11:56 +0000)]
Adding mend file

16 months agoMerge pull request #1086 from puppetlabs/pdksync_CONT-494/pin_github_changelog_generator
Gavin Patton [Wed, 18 Jan 2023 14:25:08 +0000 (14:25 +0000)]
Merge pull request #1086 from puppetlabs/pdksync_CONT-494/pin_github_changelog_generator

pdksync - (CONT-494) Pin github_changelog_generator and JSON gem versions

16 months ago(CONT-494) PDK Update pdksync_CONT-494/pin_github_changelog_generator
david22swan [Tue, 17 Jan 2023 18:12:30 +0000 (18:12 +0000)]
(CONT-494) PDK Update

16 months ago(CONT-494) Pin github_changelog_generator gem version
david22swan [Tue, 17 Jan 2023 18:02:54 +0000 (18:02 +0000)]
(CONT-494) Pin github_changelog_generator gem version

16 months agoMerge pull request #1085 from puppetlabs/CONT-493-ppa_validation_fix
Paula Muir [Wed, 18 Jan 2023 10:43:29 +0000 (10:43 +0000)]
Merge pull request #1085 from puppetlabs/CONT-493-ppa_validation_fix

(CONT-493) PPA validation adjustment

16 months agoMerge pull request #1075 from xepa/xepa-patch-1
Lukas Audzevicius [Wed, 18 Jan 2023 10:39:23 +0000 (10:39 +0000)]
Merge pull request #1075 from xepa/xepa-patch-1

Updated mark as title can contain dot (fixes #1074)

16 months ago(CONT-493) PPA validation adjustment CONT-493-ppa_validation_fix
Lukas Audzevicius [Tue, 17 Jan 2023 16:59:08 +0000 (16:59 +0000)]
(CONT-493) PPA validation adjustment

Prior to this commit, one of our updates (https://github.com/puppetlabs/puppetlabs-apt/pull/1052)
implemented a regex validation for ppa packages that were to be
installed. However, this validation did not account for resource
names that were dotted.

This commit aims to fix this bug in our validation process so that it
works as intended.

16 months agoUpdate spec files
Michiel Brandenburg [Wed, 11 Jan 2023 12:05:47 +0000 (13:05 +0100)]
Update spec files

16 months agoUpdated regex after carefull reading of policy
Michiel Brandenburg [Wed, 11 Jan 2023 12:05:32 +0000 (13:05 +0100)]
Updated regex after carefull reading of policy

16 months agoMerge branch 'main' into xepa-patch-1
Michiel Brandenburg [Mon, 9 Jan 2023 11:14:08 +0000 (12:14 +0100)]
Merge branch 'main' into xepa-patch-1

16 months agoMerge pull request #1081 from johanfleury/fix/remove-apt-prefix-from-facts-variables
david22swan [Mon, 9 Jan 2023 10:06:50 +0000 (10:06 +0000)]
Merge pull request #1081 from johanfleury/fix/remove-apt-prefix-from-facts-variables

fix: remove `apt::` prefix from fact variables

16 months agoMerge pull request #1082 from bastelfreak/foo
Lukas Audzevicius [Mon, 9 Jan 2023 10:02:08 +0000 (10:02 +0000)]
Merge pull request #1082 from bastelfreak/foo

fix typo in source.pp

16 months agofix typo in source.pp
Tim Meusel [Fri, 6 Jan 2023 14:21:22 +0000 (15:21 +0100)]
fix typo in source.pp

16 months agofix: remove `apt::` prefix from fact variables
Johan Fleury [Mon, 2 Jan 2023 14:12:25 +0000 (09:12 -0500)]
fix: remove `apt::` prefix from fact variables

Fact variables are top-scopped and should not be prefixed by module name.

This bug was introduced by cb6e58cedbd6d7a9bfc63c97c83d51eb39e9c7dc.

17 months agoUpdated regex in mark.pp
Michiel Brandenburg [Wed, 21 Dec 2022 21:44:08 +0000 (22:44 +0100)]
Updated regex in mark.pp

Now using debian policy manual as reference

17 months agoMerge branch 'main' into xepa-patch-1
Michiel Brandenburg [Wed, 21 Dec 2022 21:29:56 +0000 (22:29 +0100)]
Merge branch 'main' into xepa-patch-1

17 months agoMerge pull request #1080 from puppetlabs/release-prep v9.0.1
Paula Muir [Wed, 21 Dec 2022 09:33:42 +0000 (09:33 +0000)]
Merge pull request #1080 from puppetlabs/release-prep

Release prep v9.0.1

17 months agoMerge branch 'main' into xepa-patch-1
Michiel Brandenburg [Wed, 21 Dec 2022 07:55:33 +0000 (08:55 +0100)]
Merge branch 'main' into xepa-patch-1

17 months agoRelease prep v9.0.1
GitHub Action [Tue, 20 Dec 2022 19:39:57 +0000 (19:39 +0000)]
Release prep v9.0.1

17 months agoMerge pull request #1079 from puppetlabs/bugfix-bump_minimum_puppet_version
Gavin Patton [Tue, 20 Dec 2022 12:12:29 +0000 (12:12 +0000)]
Merge pull request #1079 from puppetlabs/bugfix-bump_minimum_puppet_version

(bugfix) - Declare minimum Puppet version 6.24.0

17 months ago(bugfix) - Declare minimum Puppet version 6.24.0 bugfix-bump_minimum_puppet_version
Paula Muir [Tue, 20 Dec 2022 11:54:57 +0000 (11:54 +0000)]
(bugfix) - Declare minimum Puppet version 6.24.0

In codebase hardening efforts the commands are passed as an array, but this feature was only introduced in Puppet 6.24.01. This raises the minimum version to match, since it's no longer possible to use the module on anything older.

17 months agoMerge branch 'main' into xepa-patch-1
Michiel Brandenburg [Tue, 13 Dec 2022 10:24:48 +0000 (11:24 +0100)]
Merge branch 'main' into xepa-patch-1

17 months agoMerge pull request #1076 from puppetlabs/pdksync_maint-remove_stale_bot
Gavin Patton [Tue, 13 Dec 2022 10:16:21 +0000 (10:16 +0000)]
Merge pull request #1076 from puppetlabs/pdksync_maint-remove_stale_bot

pdksync - (MAINT) Remove stalebot

17 months ago(MAINT) Remove stalebot workflow pdksync_maint-remove_stale_bot
Craig Gumbley [Tue, 13 Dec 2022 10:00:14 +0000 (10:00 +0000)]
(MAINT) Remove stalebot workflow

17 months agoUpdated mark as title can contain dot
Michiel Brandenburg [Mon, 12 Dec 2022 14:08:49 +0000 (15:08 +0100)]
Updated mark as title can contain dot

19 months agoMerge pull request #1069 from Programie/main
GSPatton [Mon, 31 Oct 2022 15:19:47 +0000 (15:19 +0000)]
Merge pull request #1069 from Programie/main

Do not remove PPA sources.list.d files if purge is enabled

19 months agoExec resource only exists on first run
Michael Wieland [Tue, 25 Oct 2022 14:37:14 +0000 (16:37 +0200)]
Exec resource only exists on first run

19 months agoMake sure add-apt-repository is executed before managing file resource for it
Michael Wieland [Tue, 25 Oct 2022 14:35:20 +0000 (16:35 +0200)]
Make sure add-apt-repository is executed before managing file resource for it

19 months agoEnsure sources.list.d file resource exists so purge does not remove files created...
Michael Wieland [Tue, 25 Oct 2022 14:33:27 +0000 (16:33 +0200)]
Ensure sources.list.d file resource exists so purge does not remove files created by apt::ppa

19 months agoMerge pull request #1068 from puppetlabs/cont-173/main/updating_deprecated_facter
Craig Gumbley [Fri, 14 Oct 2022 13:17:07 +0000 (14:17 +0100)]
Merge pull request #1068 from puppetlabs/cont-173/main/updating_deprecated_facter

(CONT-173) - Updating deprecated facter instances

19 months ago(CONT-173) - Updating deprecated facter instances cont-173/main/updating_deprecated_facter
jordanbreen28 [Thu, 13 Oct 2022 12:10:57 +0000 (13:10 +0100)]
(CONT-173) - Updating deprecated facter instances
Prior to this PR, this module contained instances of Facter::Util::Resolution.exec and Facter::Util::Resolution.which, which are deprecated.
This PR aims to replace these exec helpers with their supported Facter::Core::Execution counterparts.

This PR:
- Replaced all Facter::Util::Resolution instances with corresponding Facter::Core::Execution exec helpers

Fix rubucop linting error

This commit corrects an error identified by rubocop in spec testing.

19 months agoMerge pull request #1067 from puppetlabs/pdksync_pdksync/remove_puppet_module_gems
Craig Gumbley [Thu, 6 Oct 2022 10:01:50 +0000 (11:01 +0100)]
Merge pull request #1067 from puppetlabs/pdksync_pdksync/remove_puppet_module_gems

pdksync - (PDKSync) Removal of puppet_module_gems

19 months ago(PDKSync) Removal of puppet_module_gems pdksync_pdksync/remove_puppet_module_gems
david22swan [Thu, 6 Oct 2022 08:52:38 +0000 (09:52 +0100)]
(PDKSync) Removal of puppet_module_gems

19 months agoMerge pull request #1065 from puppetlabs/pdksync_remove_debian_9
Paula Muir [Wed, 5 Oct 2022 15:17:46 +0000 (16:17 +0100)]
Merge pull request #1065 from puppetlabs/pdksync_remove_debian_9

pdksync - (CONT-130) Dropping Support for Debian 9

19 months agoDropping Debian 9 Support pdksync_remove_debian_9
jordanbreen28 [Wed, 5 Oct 2022 09:03:43 +0000 (10:03 +0100)]
Dropping Debian 9 Support

21 months agoMerge pull request #1058 from puppetlabs/issue-1057
Craig Gumbley [Wed, 31 Aug 2022 17:22:23 +0000 (18:22 +0100)]
Merge pull request #1058 from puppetlabs/issue-1057

21 months agoAdd tests for valid/invalid resource names issue-1057
Lukas Audzevicius [Wed, 31 Aug 2022 11:01:09 +0000 (12:01 +0100)]
Add tests for valid/invalid resource names

Prior to this commit, ppa_spec.rb did not test the recently implemented
validation for resource names.

This commit aims to implement some test cases to make sure that valid
resource names are allowed while invalid or malicious resource names do
not work.

21 months ago(GH-1057) Regex fix to allow dotted resources
Lukas Audzevicius [Tue, 30 Aug 2022 11:56:32 +0000 (12:56 +0100)]
(GH-1057) Regex fix to allow dotted resources

Prior to this commit, one of our recent module updates introduced a
regex validation step for the resource names in our ppa.pp manifest
which would raise an issue if a valid resource name contained a dot (.).

This commit aims to slightly adjust the regex validation so that it
allows for dotted resource names. This PR should fix issue #1057.

21 months agoMerge pull request #1056 from puppetlabs/gh-1055-hardcoded_cache_path
Lukas Audzevicius [Wed, 31 Aug 2022 10:27:52 +0000 (11:27 +0100)]
Merge pull request #1056 from puppetlabs/gh-1055-hardcoded_cache_path

(GH-1055) Fix hardcoded cache path

21 months agoMerge pull request #1053 from david22swan/GH-cat-9
Craig Gumbley [Wed, 24 Aug 2022 16:11:45 +0000 (17:11 +0100)]
Merge pull request #1053 from david22swan/GH-cat-9

(GH-cat-9) Update module to match current syntax standard

21 months ago(GH-cat-9) Update module to match current syntax standard
david22swan [Wed, 24 Aug 2022 10:59:05 +0000 (11:59 +0100)]
(GH-cat-9) Update module to match current syntax standard

Module is now in compliance with the following rules:
- optional_default
- strict_indent
- unquoted_string_in_case
- parameter_documentation
- relative_classname_inclusion
- no-top_scope_facts-check
- no-top_scope_variable-check
- variable_scope

The below exception has been left in place:
- disable_anchor_resource

21 months ago(GH-1055) Fix hardcoded cache path gh-1055-hardcoded_cache_path
Craig Gumbley [Mon, 22 Aug 2022 10:23:56 +0000 (10:23 +0000)]
(GH-1055) Fix hardcoded cache path

Prior to this commit the cache path used to create the script file resource
was hardcoded to /opt/puppetlabs/puppet/cache.

This commit fixes that by using the `puppet_vardir` fact provided by stdlib so
that we will always get the correct path for the OS that is executing the code.

Additionally, if for some reason the `puppet_vardir` fact is not available we
will fall back to `tmp`.

21 months agoMerge pull request #1054 from puppetlabs/release-prep v9.0.0
Paula Muir [Thu, 18 Aug 2022 15:49:03 +0000 (16:49 +0100)]
Merge pull request #1054 from puppetlabs/release-prep

Release prep v9.0.0

21 months agoRelease prep v9.0.0
GitHub Action [Thu, 18 Aug 2022 10:38:33 +0000 (10:38 +0000)]
Release prep v9.0.0

21 months agoMerge pull request #1052 from puppetlabs/maint-harden_ppa
Paula Muir [Thu, 18 Aug 2022 08:23:29 +0000 (09:23 +0100)]
Merge pull request #1052 from puppetlabs/maint-harden_ppa

Harden PPA defined type

21 months agoAdd spec test for add-apt-repository maint-harden_ppa
Craig Gumbley [Fri, 12 Aug 2022 12:15:33 +0000 (12:15 +0000)]
Add spec test for add-apt-repository

This commit adds spec tests that validate the changes made in
the previous commit.

21 months agoHarden PPA defined type
Craig Gumbley [Thu, 11 Aug 2022 15:20:36 +0000 (15:20 +0000)]
Harden PPA defined type

Prior to this commit there was a possibility that malformed strings
could be passed as the resources name. This could lead to unsafe
executions on a remote system.

This was also a possibility for the options parameter as it was
constrained to a string.

In addition, commands were not properly broken out in to arrays of
arguments when passed to the exec resource.

This commit fixes the above by adding validation to the resource name
ensuring that the given ppa name conforms to expectation. Also, commands
are now broken down in to arrays of arguments appropriately. This ensures
safer execution on the remote system.

Given that the options parameter, passed as a raw string, could lead to
unsafe code execution it was reasonable to change the accepted type to
an `Optional[Array[String]]. This means that an array of options can now
be passed to the exec resource inside the original command.

21 months agoMerge pull request #1050 from ekohl/deal-with-net-ftp-as-default-gem
Craig Gumbley [Wed, 17 Aug 2022 10:44:17 +0000 (11:44 +0100)]
Merge pull request #1050 from ekohl/deal-with-net-ftp-as-default-gem

Deal with net-ftp being unavailable

21 months agoMerge pull request #1051 from puppetlabs/maint-move_apt_mark_to_provider
Craig Gumbley [Wed, 17 Aug 2022 10:36:21 +0000 (11:36 +0100)]
Merge pull request #1051 from puppetlabs/maint-move_apt_mark_to_provider

Harden apt-mark defined type

21 months agoAdd spec tests for apt-mark maint-move_apt_mark_to_provider
Craig Gumbley [Fri, 12 Aug 2022 09:41:23 +0000 (09:41 +0000)]
Add spec tests for apt-mark

This commit adds additional spec tests for mark.pp.

The tests validate the new resource name requirements
introduced in the previous commit.

21 months agoHarden apt-mark defined type
Craig Gumbley [Thu, 11 Aug 2022 20:13:11 +0000 (20:13 +0000)]
Harden apt-mark defined type

Prior to this commit the title parameter of this defined
type was not properly validated. This means that it could have been
possible to use a resource title outside of the normal bounds of
a package name.

Additionally the `onlyif` and `command` parameter values were
interpolated strings meaning that it may have been possible to
execute unsafe code on the remote system.

This commit fixes the above issues by adding a regex to check that the
resource title is a valid apt package name and also breaks out the
`onlyif` and `command` parameter values in to arrays of args ensuring
that the commands executed in a safe manor on the remote system.

The exception in this commit is the `unless_cmd`. This has not been
broken out in to an array of args due to the requirement of the command.
This is a reasonable trade of however due to the fact that action is
created from known enum values and title would be pre-validated.
This is also explained in mark.pp:20.

21 months agoDeal with net-ftp being unavailable
Ewoud Kohl van Wijngaarden [Wed, 10 Aug 2022 12:26:16 +0000 (14:26 +0200)]
Deal with net-ftp being unavailable

In Ruby 3.0 net-ftp changed from a bundled gem to a default gem. This
means it may not be available, such as when running unit tests.

Since ftp is becoming less and less common, this changes net-ftp to be
an optional dependency. Users who do need ftp support should ensure the
gem is installed.

21 months agoMerge pull request #1046 from puppetlabs/pdksync_GH-cat-11/main/add_ubuntu_22.04_support
Lukas Audzevicius [Tue, 9 Aug 2022 10:00:26 +0000 (11:00 +0100)]
Merge pull request #1046 from puppetlabs/pdksync_GH-cat-11/main/add_ubuntu_22.04_support

pdksync - (GH-cat-11) Certify Support for Ubuntu 22.04

21 months ago(GH-cat-11) Certify Support for Ubuntu 22.04 pdksync_GH-cat-11/main/add_ubuntu_22.04_support
david22swan [Thu, 4 Aug 2022 10:28:39 +0000 (11:28 +0100)]
(GH-cat-11) Certify Support for Ubuntu 22.04

21 months agoMerge pull request #1044 from david22swan/release_prep v8.5.0
Paula Muir [Wed, 3 Aug 2022 15:28:37 +0000 (16:28 +0100)]
Merge pull request #1044 from david22swan/release_prep

Release prep v8.5.0