From 4b0cd61c7e7f06c744e17a2d4cd64a5033abbdae Mon Sep 17 00:00:00 2001 From: Bryan Jen Date: Fri, 29 Jan 2016 13:12:36 -0700 Subject: [PATCH 1/2] Removes pinning of concat dependency to <2.0.0 --- .fixtures.yml | 4 +--- metadata.json | 2 +- spec/spec_helper_acceptance.rb | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.fixtures.yml b/.fixtures.yml index 4645a757fc..6eddf260f6 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -1,9 +1,7 @@ fixtures: repositories: stdlib: "git://github.com/puppetlabs/puppetlabs-stdlib.git" - concat: - repo: "git://github.com/puppetlabs/puppetlabs-concat.git" - branch: "1.2.x" + concat: "git://github.com/puppetlabs/puppetlabs-concat.git" portage: "git://github.com/gentoo/puppet-portage.git" symlinks: apache: "#{source_dir}" diff --git a/metadata.json b/metadata.json index af2b56b3ba..460502a181 100644 --- a/metadata.json +++ b/metadata.json @@ -9,7 +9,7 @@ "issues_url": "https://tickets.puppetlabs.com/browse/MODULES", "dependencies": [ {"name":"puppetlabs/stdlib","version_requirement":">= 2.4.0 < 5.0.0"}, - {"name":"puppetlabs/concat","version_requirement":">= 1.1.1 < 2.0.0"} + {"name":"puppetlabs/concat","version_requirement":">= 1.1.1 < 3.0.0"} ], "operatingsystem_support": [ { diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index 307f7b7106..b6ec0b5856 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -43,7 +43,7 @@ copy_module_to(host, :source => proj_root, :module_name => 'apache') on host, puppet('module','install','puppetlabs-stdlib') - on host, puppet('module','install','puppetlabs-concat', '--version 1.1.1', '--force') + on host, puppet('module','install','puppetlabs-concat') # Required for mod_passenger tests. if fact('osfamily') == 'RedHat' @@ -59,7 +59,7 @@ class { 'epel': } # Required for manifest to make mod_pagespeed repository available if fact('osfamily') == 'Debian' - on host, puppet('module','install','puppetlabs-apt', '--version 1.8.0', '--force') + on host, puppet('module','install','puppetlabs-apt') end # Make sure selinux is disabled so the tests work. From e96a933bef3d6bdeadd78ceb2185fe6a5b3b30d5 Mon Sep 17 00:00:00 2001 From: Bryan Jen Date: Fri, 29 Jan 2016 13:09:52 -0700 Subject: [PATCH 2/2] (MODULES-3018) Fixes Apache to work correctly with Concat. --- manifests/init.pp | 2 +- spec/acceptance/custom_config_spec.rb | 2 +- spec/classes/apache_spec.rb | 2 +- spec/defines/vhost_spec.rb | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index b67c9f2fb3..13eb5f7172 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -345,7 +345,7 @@ ensure => file, content => template($conf_template), notify => Class['Apache::Service'], - require => [Package['httpd'], File[$ports_file]], + require => [Package['httpd'], Concat[$ports_file]], } # preserve back-wards compatibility to the times when default_mods was diff --git a/spec/acceptance/custom_config_spec.rb b/spec/acceptance/custom_config_spec.rb index fe73d111bd..c8e254e858 100644 --- a/spec/acceptance/custom_config_spec.rb +++ b/spec/acceptance/custom_config_spec.rb @@ -82,7 +82,7 @@ class { 'apache': } # Try to wedge the apache::custom_config call between when httpd.conf is written and # ports.conf is written. This should trigger a dependency cycle - File["#{$conf_file}"] -> Apache::Custom_config['ordering_test'] -> File["#{$ports_file}"] + File["#{$conf_file}"] -> Apache::Custom_config['ordering_test'] -> Concat["#{$ports_file}"] EOS expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/Found 1 dependency cycle/i) end diff --git a/spec/classes/apache_spec.rb b/spec/classes/apache_spec.rb index 45f8a690c6..34d56ba4f7 100644 --- a/spec/classes/apache_spec.rb +++ b/spec/classes/apache_spec.rb @@ -504,7 +504,7 @@ it { is_expected.to contain_file("/opt/rh/root/etc/httpd/conf/httpd.conf").with( 'ensure' => 'file', 'notify' => 'Class[Apache::Service]', - 'require' => ['Package[httpd]', 'File[/etc/httpd/conf/ports.conf]'], + 'require' => ['Package[httpd]', 'Concat[/etc/httpd/conf/ports.conf]'], ) } end diff --git a/spec/defines/vhost_spec.rb b/spec/defines/vhost_spec.rb index 9a3027604f..e6456ae265 100644 --- a/spec/defines/vhost_spec.rb +++ b/spec/defines/vhost_spec.rb @@ -50,7 +50,7 @@ let :facts do default_facts end it { is_expected.to contain_class("apache") } it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_file("25-rspec.example.com.conf").with( + it { is_expected.to contain_concat("25-rspec.example.com.conf").with( :ensure => 'present', :path => '/etc/apache2/sites-available/25-rspec.example.com.conf' ) } @@ -77,7 +77,7 @@ let :facts do default_facts end it { is_expected.to contain_class("apache") } it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_file("25-rspec.example.com.conf").with( + it { is_expected.to contain_concat("25-rspec.example.com.conf").with( :ensure => 'present', :path => '/usr/local/etc/apache24/Vhosts/25-rspec.example.com.conf' ) } @@ -99,7 +99,7 @@ let :facts do default_facts end it { is_expected.to contain_class("apache") } it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_file("25-rspec.example.com.conf").with( + it { is_expected.to contain_concat("25-rspec.example.com.conf").with( :ensure => 'present', :path => '/etc/apache2/vhosts.d/25-rspec.example.com.conf' ) } @@ -1108,7 +1108,7 @@ end it { is_expected.to compile } - it { is_expected.to contain_file('25-rspec.example.com.conf') } + it { is_expected.to contain_concat('25-rspec.example.com.conf') } it { is_expected.to contain_concat__fragment('rspec.example.com-directories') } it { is_expected.to contain_concat__fragment('rspec.example.com-directories').with( :content => /^\s+Require all granted$/ ) } @@ -1141,7 +1141,7 @@ end it { is_expected.to compile } - it { is_expected.to contain_file('25-rspec.example.com.conf') } + it { is_expected.to contain_concat('25-rspec.example.com.conf') } it { is_expected.to contain_concat__fragment('rspec.example.com-directories') } it { is_expected.to_not contain_concat__fragment('rspec.example.com-directories').with( :content => /^\s+Require all granted$/ )