From 6062ecec5c65a3b7e5165218130d6091031be131 Mon Sep 17 00:00:00 2001 From: Matthew Haughton <3flex@users.noreply.github.com> Date: Tue, 21 Apr 2015 17:32:28 -0400 Subject: [PATCH 1/2] package/debian: support puppetlabs-apt 2.0.0 puppetlabs-apt 2.0.0 drops support in apt::source for key_source and required_packages. * key_source will default to keyserver.ubuntu.com which carries both keys, so it doesn't need to be explicitly defined * required_packages can be emulated with the package resource --- manifests/package/debian.pp | 9 +++++---- metadata.json | 2 +- spec/classes/package_spec.rb | 2 -- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/manifests/package/debian.pp b/manifests/package/debian.pp index 4d4f3ebfc..3043bb9a2 100644 --- a/manifests/package/debian.pp +++ b/manifests/package/debian.pp @@ -37,7 +37,6 @@ location => "http://nginx.org/packages/${distro}", repos => 'nginx', key => '573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62', - key_source => 'http://nginx.org/keys/nginx_signing.key', } } 'nginx-mainline': { @@ -45,7 +44,6 @@ location => "http://nginx.org/packages/mainline/${distro}", repos => 'nginx', key => '573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62', - key_source => 'http://nginx.org/keys/nginx_signing.key', } } 'passenger': { @@ -53,8 +51,11 @@ location => 'https://oss-binaries.phusionpassenger.com/apt/passenger', repos => 'main', key => '16378A33A6EF16762922526E561F9B9CAC40B2F7', - key_source => 'https://oss-binaries.phusionpassenger.com/auto-software-signing-gpg-key.txt', - required_packages => 'apt-transport-https ca-certificates', + } + + package { ['apt-transport-https', 'ca-certificates']: + ensure => 'present', + before => Apt::Source['nginx'], } package { 'passenger': diff --git a/metadata.json b/metadata.json index 6beec0b7f..38879965d 100644 --- a/metadata.json +++ b/metadata.json @@ -9,7 +9,7 @@ "issues_url": "https://github.com/jfryman/puppet-nginx/issues", "dependencies": [ {"name":"puppetlabs/stdlib","version_requirement":">= 4.2.0 <5.0.0"}, - {"name":"puppetlabs/apt","version_requirement":">= 1.0.0 <2.0.0"}, + {"name":"puppetlabs/apt","version_requirement":">= 1.0.0 <3.0.0"}, {"name":"puppetlabs/concat","version_requirement":">= 1.1.1 <2.0.0"} ], "requirements": [ diff --git a/spec/classes/package_spec.rb b/spec/classes/package_spec.rb index a153efec8..03106a658 100644 --- a/spec/classes/package_spec.rb +++ b/spec/classes/package_spec.rb @@ -68,7 +68,6 @@ 'location' => "http://nginx.org/packages/#{operatingsystem.downcase}", 'repos' => 'nginx', 'key' => '573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62', - 'key_source' => 'http://nginx.org/keys/nginx_signing.key' )} it { is_expected.to contain_anchor('nginx::package::begin').that_comes_before('Class[nginx::package::debian]') } it { is_expected.to contain_anchor('nginx::package::end').that_requires('Class[nginx::package::debian]') } @@ -89,7 +88,6 @@ 'location' => 'https://oss-binaries.phusionpassenger.com/apt/passenger', 'repos' => "main", 'key' => '16378A33A6EF16762922526E561F9B9CAC40B2F7', - 'key_source' => 'https://oss-binaries.phusionpassenger.com/auto-software-signing-gpg-key.txt' )} end From ae8a60da13da84db7d51d3c0deee9f614be827a5 Mon Sep 17 00:00:00 2001 From: Matthew Haughton <3flex@users.noreply.github.com> Date: Wed, 22 Apr 2015 15:46:07 -0400 Subject: [PATCH 2/2] metadata: require puppetlabs-apt 1.8.0 or higher Support for full fingerprints was only added in puppetlabs-apt 1.8.0 This module started using full fingerprints as of d9b1d8c --- metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.json b/metadata.json index 38879965d..8a062fc06 100644 --- a/metadata.json +++ b/metadata.json @@ -9,7 +9,7 @@ "issues_url": "https://github.com/jfryman/puppet-nginx/issues", "dependencies": [ {"name":"puppetlabs/stdlib","version_requirement":">= 4.2.0 <5.0.0"}, - {"name":"puppetlabs/apt","version_requirement":">= 1.0.0 <3.0.0"}, + {"name":"puppetlabs/apt","version_requirement":">= 1.8.0 <3.0.0"}, {"name":"puppetlabs/concat","version_requirement":">= 1.1.1 <2.0.0"} ], "requirements": [