]> review.fuel-infra Code Review - puppet-modules/puppetlabs-apt.git/commitdiff
Merge pull request #131 from mbornoz/apt-preferences
authorHunter Haugen <h.haugen@gmail.com>
Tue, 2 Jul 2013 00:46:24 +0000 (17:46 -0700)
committerHunter Haugen <h.haugen@gmail.com>
Tue, 2 Jul 2013 00:46:24 +0000 (17:46 -0700)
apt::pin: handling all apt preferences properties

.travis.yml
CHANGELOG
Gemfile
Modulefile
README.md
manifests/key.pp

index a19074d0b8412434d76d5d32f489c4210f9615e2..71054bb2eaac34cf7b97353c0f9c02a378126a84 100644 (file)
@@ -4,26 +4,23 @@ script: "bundle exec rake spec SPEC_OPTS='--format documentation'"
 rvm:
   - 1.8.7
   - 1.9.3
-  - ruby-head
+  - 2.0.0
 env:
-  - PUPPET_GEM_VERSION="~> 2.6.0"
   - PUPPET_GEM_VERSION="~> 2.7.0"
   - PUPPET_GEM_VERSION="~> 3.0.0"
   - PUPPET_GEM_VERSION="~> 3.1.0"
   - PUPPET_GEM_VERSION="~> 3.2.0"
 matrix:
   exclude:
-    - rvm: ruby-head
-      env: PUPPET_GEM_VERSION="~> 3.0.0"
-    - rvm: ruby-head
-      env: PUPPET_GEM_VERSION="~> 3.1.0"
     - rvm: 1.9.3
       env: PUPPET_GEM_VERSION="~> 2.7.0"
-    - rvm: ruby-head
+    - rvm: 2.0.0
       env: PUPPET_GEM_VERSION="~> 2.7.0"
-    - rvm: 1.9.3
-      env: PUPPET_GEM_VERSION="~> 2.6.0"
-    - rvm: ruby-head
-      env: PUPPET_GEM_VERSION="~> 2.6.0"
+    - rvm: 2.0.0
+      env: PUPPET_GEM_VERSION="~> 3.0.0"
+    - rvm: 2.0.0
+      env: PUPPET_GEM_VERSION="~> 3.1.0"
+    - rvm: 1.8.7
+      env: PUPPET_GEM_VERSION="~> 3.2.0"
 notifications:
   email: false
index da4072f2528acfbb620f2ad307e6b43766f352a0..44fa88abb22ff66cd0a16563a24e7feb2b16f6ba 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,48 @@
+## puppetlabs-apt changelog
+
+Release notes for the puppetlabs-apt module.
+
+1.1.1
+=====
+
+This is a bug fix release that resolves a number of issues:
+
+* By changing template variable usage, we remove the deprecation warnings
+  for Puppet 3.2.x
+* Fixed proxy file removal, when proxy absent
+
+Some documentation, style and whitespaces changes were also merged. This
+release also introduced proper rspec-puppet unit testing on Travis-CI to help
+reduce regression.
+
+Thanks to all the community contributors below that made this patch possible.
+
+#### Detail Changes
+
+* fix minor comment type (Chris Rutter)
+* whitespace fixes (Michael Moll)
+* Update travis config file (William Van Hevelingen)
+* Build all branches on travis (William Van Hevelingen)
+* Standardize travis.yml on pattern introduced in stdlib (William Van Hevelingen)
+* Updated content to conform to README best practices template (Lauren Rother)
+* Fix apt::release example in readme (Brian Galey)
+* add @ to variables in template (Peter Hoeg)
+* Remove deprecation warnings for pin.pref.erb as well (Ken Barber)
+* Update travis.yml to latest versions of puppet (Ken Barber)
+* Fix proxy file removal (Scott Barber)
+* Add spec test for removing proxy configuration (Dean Reilly)
+* Fix apt::key listing longer than 8 chars (Benjamin Knofe)
+
+
+---------------------------------------
+
+1.1.0
+=====
+
+This release includes Ubuntu 12.10 (Quantal) support for PPAs.
+
+---------------------------------------
+
 2012-05-25 Puppet Labs <info@puppetlabs.com> - 0.0.4
  * Fix ppa list filename when there is a period in the PPA name
  * Add .pref extension to apt preferences files
diff --git a/Gemfile b/Gemfile
index 8e5e04d744ce24eb8f62dc1d1390e62805fe790d..881fc90e21cf98c7fe8994ca6ad6062d1632632a 100644 (file)
--- a/Gemfile
+++ b/Gemfile
@@ -1,6 +1,8 @@
-source :rubygems
+source 'https://rubygems.org'
 
 group :development, :test do
+  gem 'rake',                   :require => false
+  gem 'rspec-puppet',           :require => false
   gem 'puppetlabs_spec_helper', :require => false
 end
 
index d3511424645f8a5a70447f370cdd7b13559f5c81..2b1b21c3f83ba825dc747fd285184a6c1115b942 100644 (file)
@@ -1,5 +1,5 @@
 name    'puppetlabs-apt'
-version '1.1.0'
+version '1.1.1'
 source  'https://github.com/puppetlabs/puppetlabs-apt'
 author  'Evolving Web / Puppet Labs'
 license 'Apache License 2.0'
index a6a0013e3fa385ad56ad0ec499044818455000cc..402d7ab021982244b61a07ab923405c536418cd3 100644 (file)
--- a/README.md
+++ b/README.md
@@ -223,10 +223,3 @@ A lot of great people have contributed to this module. A somewhat current list f
 * Spencer Krum <spencer@puppetlabs.com>  
 * William Van Hevelingen <blkperl@cat.pdx.edu> <wvan13@gmail.com>  
 * Zach Leslie <zach@puppetlabs.com>  
-
-Release Notes
--------------
-
-**1.1.0**
-
-This release includes Ubuntu 12.10 (Quantal) support for PPAs.
index 98a0f3a32c4b42192f33f6795689b3df939b24ea..b14500ed039db17ca3990435af036f1945c61893 100644 (file)
@@ -9,6 +9,8 @@ define apt::key (
   include apt::params
 
   $upkey = upcase($key)
+  # trim the key to the last 8 chars so we can match longer keys with apt-key list too
+  $trimmedkey = regsubst($upkey, '^.*(.{8})$', '\1')
 
   if $key_content {
     $method = 'content'
@@ -48,7 +50,7 @@ define apt::key (
         exec { $digest:
           command   => $digest_command,
           path      => '/bin:/usr/bin',
-          unless    => "/usr/bin/apt-key list | /bin/grep '${upkey}'",
+          unless    => "/usr/bin/apt-key list | /bin/grep '${trimmedkey}'",
           logoutput => 'on_failure',
           before    => Anchor["apt::key ${upkey} present"],
         }
@@ -66,7 +68,7 @@ define apt::key (
       exec { "apt::key ${upkey} absent":
         command   => "apt-key del '${upkey}'",
         path      => '/bin:/usr/bin',
-        onlyif    => "apt-key list | grep '${upkey}'",
+        onlyif    => "apt-key list | grep '${trimmedkey}'",
         user      => 'root',
         group     => 'root',
         logoutput => 'on_failure',