From 8198296c7b15cfd540709ef7992bf8ea711a2ebb Mon Sep 17 00:00:00 2001 From: Bryan Jen Date: Mon, 13 Apr 2015 15:06:01 -0700 Subject: [PATCH 1/9] Updates CHANGELOG and metadata for 1.2.1 release --- CHANGELOG.md | 14 ++++++++++++++ metadata.json | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2043b6046..7ba7ebeb5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +##2015-04-14 - Supported Release 1.2.1 +###Summary + +This release includes bugfixes, test improvements, and a rewritten README. + +####Bugfixes + +- Verifies existence of $is_pe before using it. +- Adds validation for $order param to not allow restricted characters. +- Sets the group id on Fragments for versions of Facter that contain the $gid fact. +- Sets the script group to 0 if the script is owned by root. +- Explicitly sets script and concat directories to the same owner and group. +- Re-adds support for fragment backup, so that static compiler can work with filebucket (MODULES-1700). + ##2015-02-17 - Supported Release 1.2.0 ###Summary diff --git a/metadata.json b/metadata.json index 9d7a46dd0..ce932111d 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { "name": "puppetlabs-concat", - "version": "1.2.0", + "version": "1.2.1", "author": "Puppet Labs", "summary": "Construct files from multiple fragments.", "license": "Apache-2.0", From 0459ebace52184319f80241ec0b569588ca09cb8 Mon Sep 17 00:00:00 2001 From: Bryan Jen Date: Thu, 23 Apr 2015 15:55:30 -0700 Subject: [PATCH 2/9] MODULES-1933: fixes backup passing in fragments without concat resource --- manifests/fragment.pp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/manifests/fragment.pp b/manifests/fragment.pp index f9ee2a7ca..7b13b0042 100644 --- a/manifests/fragment.pp +++ b/manifests/fragment.pp @@ -57,7 +57,13 @@ if $backup { warning('The $backup parameter to concat::fragment is deprecated and has no effect') } + $my_backup = concat_getparam(Concat[$target], 'backup') + $_backup = $my_backup ? { + '' => undef, + default => $my_backup + } + if $ensure == undef { $my_ensure = concat_getparam(Concat[$target], 'ensure') } else { @@ -119,7 +125,7 @@ mode => $fragmode, source => $source, content => $content, - backup => $my_backup, + backup => $_backup, replace => true, alias => "concat_fragment_${name}", notify => Exec["concat_${target}"] From 8d0442672fd619c487edb643731182f453440a47 Mon Sep 17 00:00:00 2001 From: Bryan Jen Date: Mon, 11 May 2015 16:21:43 -0700 Subject: [PATCH 3/9] 1.2.2 release prep --- CHANGELOG.md | 8 ++++++++ metadata.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ba7ebeb5..8c279a7d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +##2015-05-12 - Supported Release 1.2.2 +###Summary + +This release includes a bugfix. + +####Bugfixes +- Fixes a bug introduced by MODULES-1700, in handling default retrieval of fragment backup parameter. + ##2015-04-14 - Supported Release 1.2.1 ###Summary diff --git a/metadata.json b/metadata.json index ce932111d..1c6bb98f6 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { "name": "puppetlabs-concat", - "version": "1.2.1", + "version": "1.2.2", "author": "Puppet Labs", "summary": "Construct files from multiple fragments.", "license": "Apache-2.0", From b5f17644b5a07bd7de514aac512750e1b0ce5567 Mon Sep 17 00:00:00 2001 From: Bryan Jen Date: Mon, 11 May 2015 17:04:48 -0700 Subject: [PATCH 4/9] update metadata.json --- metadata.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/metadata.json b/metadata.json index 1c6bb98f6..663434c2b 100644 --- a/metadata.json +++ b/metadata.json @@ -7,6 +7,9 @@ "source": "https://github.com/puppetlabs/puppetlabs-concat", "project_page": "https://github.com/puppetlabs/puppetlabs-concat", "issues_url": "https://tickets.puppetlabs.com/browse/MODULES", + "dependencies": [ + {"name":"puppetlabs/stdlib","version_requirement":">= 3.2.0 < 5.0.0"} + ], "operatingsystem_support": [ { "operatingsystem": "RedHat", @@ -103,8 +106,5 @@ "name": "puppet", "version_requirement": "3.x" } - ], - "dependencies": [ - {"name":"puppetlabs/stdlib","version_requirement":">= 3.2.0 < 5.0.0"} ] } From abf40f0485e2e40cc55e58ce9ffac440d85a850d Mon Sep 17 00:00:00 2001 From: Bryan Jen Date: Mon, 1 Jun 2015 10:45:00 -0700 Subject: [PATCH 5/9] update README with correct behavior for fragment parameter --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 873f6478a..69b9a8983 100644 --- a/README.md +++ b/README.md @@ -218,7 +218,7 @@ Specifies a file to read into the content of the fragment. **Note**: You must su #####`target` -*Required.* Specifies the destination file of the fragment. Valid options: a string containing an absolute path. +*Required.* Specifies the destination file of the fragment. Valid options: a string containing the title of the parent `concat` resource. ###Deprecations @@ -280,4 +280,4 @@ For more information, see our [module contribution guide.](https://docs.puppetla ###Contributors -To see who's already involved, see the [list of contributors.](https://github.com/puppetlabs/puppetlabs-concat/graphs/contributors) \ No newline at end of file +To see who's already involved, see the [list of contributors.](https://github.com/puppetlabs/puppetlabs-concat/graphs/contributors) From d4376cb3f5d98d5236eaa3bcb07951ab3cb9e631 Mon Sep 17 00:00:00 2001 From: Bryan Jen Date: Mon, 1 Jun 2015 12:05:31 -0700 Subject: [PATCH 6/9] updates init.pp to pass linting --- manifests/init.pp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index c44c03284..57f6425bd 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -99,6 +99,7 @@ $default_warn_message = '# This file is managed by Puppet. DO NOT EDIT.' $bool_warn_message = 'Using stringified boolean values (\'true\', \'yes\', \'on\', \'false\', \'no\', \'off\') to represent boolean true/false as the $warn parameter to concat is deprecated and will be treated as the warning message in a future release' + # lint:ignore:quoted_booleans case $warn { true: { $warn_message = $default_warn_message @@ -118,6 +119,7 @@ $warn_message = $warn } } + # lint:endignore $warnmsg_escaped = regsubst($warn_message, '\'', '\'\\\'\'', 'G') $warnflag = $warnmsg_escaped ? { @@ -177,15 +179,15 @@ } file { $name: - ensure => present, - owner => $owner, - group => $group, - mode => $mode, - replace => $replace, - path => $path, - alias => "concat_${name}", - source => "${fragdir}/${concat_name}", - backup => $backup, + ensure => present, + owner => $owner, + group => $group, + mode => $mode, + replace => $replace, + path => $path, + alias => "concat_${name}", + source => "${fragdir}/${concat_name}", + backup => $backup, } # Only newer versions of puppet 3.x support the validate_cmd parameter @@ -243,7 +245,7 @@ $absent_exec_command = $::kernel ? { 'windows' => 'cmd.exe /c exit 0', - default => 'true', + default => true, } $absent_exec_path = $::kernel ? { From 6751adb2826ae063f3eb5052895dbc13babc6251 Mon Sep 17 00:00:00 2001 From: Bryan Jen Date: Mon, 1 Jun 2015 15:30:04 -0700 Subject: [PATCH 7/9] 1.2.3 Release prep --- CHANGELOG.md | 9 +++++++++ metadata.json | 8 ++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c279a7d5..2e6064131 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +##2015-06-02 - Supported Release 1.2.3 +###Summary + +This release includes a README fix to document correct behavior of fragment target parameter. + +####Bugfixes + +- README Fix to correctly document how a fragment $target param should work. + ##2015-05-12 - Supported Release 1.2.2 ###Summary diff --git a/metadata.json b/metadata.json index 663434c2b..1d4599260 100644 --- a/metadata.json +++ b/metadata.json @@ -1,15 +1,12 @@ { "name": "puppetlabs-concat", - "version": "1.2.2", + "version": "1.2.3", "author": "Puppet Labs", "summary": "Construct files from multiple fragments.", "license": "Apache-2.0", "source": "https://github.com/puppetlabs/puppetlabs-concat", "project_page": "https://github.com/puppetlabs/puppetlabs-concat", "issues_url": "https://tickets.puppetlabs.com/browse/MODULES", - "dependencies": [ - {"name":"puppetlabs/stdlib","version_requirement":">= 3.2.0 < 5.0.0"} - ], "operatingsystem_support": [ { "operatingsystem": "RedHat", @@ -106,5 +103,8 @@ "name": "puppet", "version_requirement": "3.x" } + ], + "dependencies": [ + {"name":"puppetlabs/stdlib","version_requirement":">= 3.2.0 < 5.0.0"} ] } From a5cce42a5ba266dfc052585a252492003696638f Mon Sep 17 00:00:00 2001 From: Bryan Jen Date: Mon, 1 Jun 2015 16:52:27 -0700 Subject: [PATCH 8/9] fixes bug introduced by a linting fix --- manifests/init.pp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index 57f6425bd..077a29bd6 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -243,10 +243,12 @@ backup => $backup, } + # lint:ignore:quoted_booleans $absent_exec_command = $::kernel ? { 'windows' => 'cmd.exe /c exit 0', - default => true, + default => 'true', } + # lint:endignore $absent_exec_path = $::kernel ? { 'windows' => $::path, From 9dd00aab2de3c4b364de8bd90e630173e3f4ed19 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Thu, 11 Jun 2015 15:28:34 -0700 Subject: [PATCH 9/9] Add helper to install puppet/pe/puppet-agent --- Gemfile | 1 + spec/spec_helper_acceptance.rb | 14 +++----------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/Gemfile b/Gemfile index cc4048aec..a1cfe6c19 100644 --- a/Gemfile +++ b/Gemfile @@ -33,6 +33,7 @@ group :system_tests do gem 'beaker-rspec', :require => false end gem 'serverspec', :require => false + gem 'beaker-puppet_install_helper', :require => false end if facterversion = ENV['FACTER_GEM_VERSION'] diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index da994f8df..805104649 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -1,20 +1,12 @@ require 'beaker-rspec/spec_helper' require 'beaker-rspec/helpers/serverspec' require 'acceptance/specinfra_stubs' +require 'beaker/puppet_install_helper' -unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no' - # This will install the latest available package on el and deb based - # systems fail on windows and osx, and install via gem on other *nixes - foss_opts = {:default_action => 'gem_install'} - - if default.is_pe?; then - install_pe; - else - install_puppet(foss_opts); - end +run_puppet_install_helper +unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no' hosts.each do |host| - on hosts, "mkdir -p #{host['distmoduledir']}" if host['platform'] =~ /sles-1/i || host['platform'] =~ /solaris-1/i get_stdlib = <<-EOS package{'wget':}