]> review.fuel-infra Code Review - puppet-modules/puppetlabs-apt.git/commitdiff
Merge pull request #246 from hunner/buncha_picks
authorHunter Haugen <hunter@puppetlabs.com>
Tue, 25 Feb 2014 17:58:36 +0000 (09:58 -0800)
committerHunter Haugen <hunter@puppetlabs.com>
Tue, 25 Feb 2014 17:58:36 +0000 (09:58 -0800)
Buncha picks

12 files changed:
LICENSE
README.md
manifests/debian/testing.pp
manifests/debian/unstable.pp
manifests/init.pp
manifests/ppa.pp
spec/classes/backports_spec.rb
spec/classes/debian_testing_spec.rb
spec/classes/debian_unstable_spec.rb
spec/defines/pin_spec.rb
templates/pin.pref.erb
tests/source.pp

diff --git a/LICENSE b/LICENSE
index 638c347b17382cfa59642a046d4a40ceda1f4af3..30ce036d5e0b1c677f62bc641f7b0d3120b00ce2 100644 (file)
--- a/LICENSE
+++ b/LICENSE
@@ -17,3 +17,18 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 THE SOFTWARE.
+
+
+Copyright 2014 Puppet Labs
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
index d07bbb0eced9d969a322e9f408bdb27057c81888..ec8b4c5e49bf5ace6461338a2b4fb04c3a5d4809 100644 (file)
--- a/README.md
+++ b/README.md
@@ -17,14 +17,14 @@ The APT module provides a simple interface for managing APT source, key, and def
 Module Description
 ------------------
 
-APT automates obtaining and installing software packages on *nix systems. 
+APT automates obtaining and installing software packages on \*nix systems.
 
 Setup
 -----
 
 **What APT affects:**
 
-* package/service/configuration files for APT 
+* package/service/configuration files for APT
 * your system's `sources.list` file and `sources.list.d` directory
     * NOTE: Setting the `purge_sources_list` and `purge_sources_list_d` parameters to 'true' will destroy any existing content that was not declared with Puppet. The default for these parameters is 'false'.
 * system repositories
@@ -36,14 +36,14 @@ Setup
 To begin using the APT module with default parameters, declare the class
 
     include apt
-Puppet code that uses anything from the APT module requires that the core apt class be declared
+
+Puppet code that uses anything from the APT module requires that the core apt class be declared/\s\+$//e
 
 Usage
 -----
 
-Using the APT module consists predominantly in declaring classes that provide desired functionality and features. 
+Using the APT module consists predominantly in declaring classes that provide desired functionality and features.
+
 ### apt
 
 `apt` provides a number of common resources and options that are shared by the various defined types in this module, so you MUST always include this class in your manifests.
@@ -61,9 +61,9 @@ The parameters for `apt` are not required in general and are predominantly for d
       update_timeout       => undef
     }
 
-Puppet will manage your system's `sources.list` file and `sources.list.d` directory but will do its best to respect existing content. 
+Puppet will manage your system's `sources.list` file and `sources.list.d` directory but will do its best to respect existing content.
 
-If you declare your apt class with `purge_sources_list` and `purge_sources_list_d` set to 'true', Puppet will unapologetically purge any existing content it finds that wasn't declared with Puppet. 
+If you declare your apt class with `purge_sources_list` and `purge_sources_list_d` set to 'true', Puppet will unapologetically purge any existing content it finds that wasn't declared with Puppet.
 
 ### apt::builddep
 
@@ -76,9 +76,9 @@ Installs the build depends of a specified package.
 Forces a package to be installed from a specific release.  This class is particularly useful when using repositories, like Debian, that are unstable in Ubuntu.
 
     apt::force { 'glusterfs-server':
-         release => 'unstable',
-         version => '3.0.3',
-         require => Apt::Source['debian_unstable'],
+      release => 'unstable',
+      version => '3.0.3',
+      require => Apt::Source['debian_unstable'],
     }
 
 ### apt::key
@@ -138,7 +138,7 @@ Adds an apt source to `/etc/apt/sources.list.d/`.
       release           => 'unstable',
       repos             => 'main contrib non-free',
       required_packages => 'debian-keyring debian-archive-keyring',
-      key               => '55BE302B',
+      key               => '46925553',
       key_server        => 'subkeys.pgp.net',
       pin               => '-10',
       include_src       => true
@@ -167,7 +167,7 @@ This test will set up a Puppet Labs apt repository. Start by creating a new smok
       key        => '4BD6EC30',
       key_server => 'pgp.mit.edu',
     }
-    
+
 This resource creates an apt source named puppetlabs and gives Puppet information about the repository's location and key used to sign its packages. Puppet leverages Facter to determine the appropriate release, but you can set it directly by adding the release type.
 
 Check your smoke test for syntax errors
@@ -181,7 +181,7 @@ If you receive no output from that command, it means nothing is wrong. Then appl
     info: /Stage[main]//Apt::Source[puppetlabs]/File[puppetlabs.list]: Scheduling refresh of Exec[puppetlabs apt update]
     notice: /Stage[main]//Apt::Source[puppetlabs]/Exec[puppetlabs apt update]: Triggered 'refresh' from 1 events>
 
-The above example used a smoke test to easily lay out a resource declaration and apply it on your system. In production, you may want to declare your APT sources inside the classes where they’re needed. 
+The above example used a smoke test to easily lay out a resource declaration and apply it on your system. In production, you may want to declare your APT sources inside the classes where they’re needed.
 
 Implementation
 --------------
@@ -193,7 +193,7 @@ Adds the necessary components to get backports for Ubuntu and Debian. The releas
 Limitations
 -----------
 
-This module should work across all versions of Debian/Ubuntu and support all major APT repository management features. 
+This module should work across all versions of Debian/Ubuntu and support all major APT repository management features.
 
 Development
 ------------
@@ -204,6 +204,13 @@ We want to keep it as easy as possible to contribute changes so that our modules
 
 You can read the complete module contribution guide [on the Puppet Labs wiki.](http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing)
 
+License
+-------
+
+The original code for this module comes from Evolving Web and was licensed under the MIT license. Code added since the fork of this module is licensed under the Apache 2.0 License like the rest of the Puppet Labs products.
+
+The LICENSE contains both licenses.
+
 Contributors
 ------------
 
@@ -211,19 +218,19 @@ A lot of great people have contributed to this module. A somewhat current list f
 
 * Ben Godfrey <ben.godfrey@wonga.com>
 * Branan Purvine-Riley <branan@puppetlabs.com>
-* Christian G. Warden <cwarden@xerus.org>  
-* Dan Bode <bodepd@gmail.com> <dan@puppetlabs.com>  
-* Garrett Honeycutt <github@garretthoneycutt.com>  
-* Jeff Wallace <jeff@evolvingweb.ca> <jeff@tjwallace.ca>  
-* Ken Barber <ken@bob.sh>  
-* Matthaus Litteken <matthaus@puppetlabs.com> <mlitteken@gmail.com>  
-* Matthias Pigulla <mp@webfactory.de>  
-* Monty Taylor <mordred@inaugust.com>  
-* Peter Drake <pdrake@allplayers.com>  
-* Reid Vandewiele <marut@cat.pdx.edu>  
-* Robert Navarro <rnavarro@phiivo.com>  
-* Ryan Coleman <ryan@puppetlabs.com>  
-* Scott McLeod <scott.mcleod@theice.com>  
-* Spencer Krum <spencer@puppetlabs.com>  
-* William Van Hevelingen <blkperl@cat.pdx.edu> <wvan13@gmail.com>  
-* Zach Leslie <zach@puppetlabs.com>  
+* Christian G. Warden <cwarden@xerus.org>
+* Dan Bode <bodepd@gmail.com> <dan@puppetlabs.com>
+* Garrett Honeycutt <github@garretthoneycutt.com>
+* Jeff Wallace <jeff@evolvingweb.ca> <jeff@tjwallace.ca>
+* Ken Barber <ken@bob.sh>
+* Matthaus Litteken <matthaus@puppetlabs.com> <mlitteken@gmail.com>
+* Matthias Pigulla <mp@webfactory.de>
+* Monty Taylor <mordred@inaugust.com>
+* Peter Drake <pdrake@allplayers.com>
+* Reid Vandewiele <marut@cat.pdx.edu>
+* Robert Navarro <rnavarro@phiivo.com>
+* Ryan Coleman <ryan@puppetlabs.com>
+* Scott McLeod <scott.mcleod@theice.com>
+* Spencer Krum <spencer@puppetlabs.com>
+* William Van Hevelingen <blkperl@cat.pdx.edu> <wvan13@gmail.com>
+* Zach Leslie <zach@puppetlabs.com>
index 45133470fa4c6c229825079ba38ac9aa1dbbe60b..3a82b4f7fd9266447333ba6f2199e3c93b7bc9f2 100644 (file)
@@ -5,7 +5,7 @@ class apt::debian::testing {
 
   # deb http://debian.mirror.iweb.ca/debian/ testing main contrib non-free
   # deb-src http://debian.mirror.iweb.ca/debian/ testing main contrib non-free
-  # Key: 55BE302B  Server: subkeys.pgp.net
+  # Key: 46925553  Server: subkeys.pgp.net
   # debian-keyring
   # debian-archive-keyring
 
@@ -14,7 +14,7 @@ class apt::debian::testing {
     release           => 'testing',
     repos             => 'main contrib non-free',
     required_packages => 'debian-keyring debian-archive-keyring',
-    key               => '55BE302B',
+    key               => '46925553',
     key_server        => 'subkeys.pgp.net',
     pin               => '-10',
   }
index 401c9c5cda7401afbc5988c58260af62fb277015..77df94b0af572df1fc1aaf23e7b3ae1261917da6 100644 (file)
@@ -5,7 +5,7 @@ class apt::debian::unstable {
 
   # deb http://debian.mirror.iweb.ca/debian/ unstable main contrib non-free
   # deb-src http://debian.mirror.iweb.ca/debian/ unstable main contrib non-free
-  # Key: 55BE302B  Server: subkeys.pgp.net
+  # Key: 46925553  Server: subkeys.pgp.net
   # debian-keyring
   # debian-archive-keyring
 
@@ -14,7 +14,7 @@ class apt::debian::unstable {
     release           => 'unstable',
     repos             => 'main contrib non-free',
     required_packages => 'debian-keyring debian-archive-keyring',
-    key               => '55BE302B',
+    key               => '46925553',
     key_server        => 'subkeys.pgp.net',
     pin               => '-10',
   }
index b106ad490979ce67522382eb02f54a9ce7a1a15d..364ce8cb4e172fb789945755356be4b2bfc8f628 100644 (file)
@@ -25,7 +25,7 @@
 class apt(
   $always_apt_update    = false,
   $disable_keys         = undef,
-  $proxy_host           = false,
+  $proxy_host           = undef,
   $proxy_port           = '8080',
   $purge_sources_list   = false,
   $purge_sources_list_d = false,
@@ -103,7 +103,7 @@ class apt(
   }
 
   $proxy_set = $proxy_host ? {
-    false   => absent,
+    undef   => absent,
     default => present
   }
 
index 7ec6b20375d37358a096fa7cc0765923fe78401f..f2629809e0c12d8aae499fc8d5b77dbeaf1b88a1 100644 (file)
@@ -67,6 +67,9 @@ define apt::ppa(
 
     file { "${sources_list_d}/${sources_list_d_filename}":
         ensure => 'absent',
+        mode   => '0644',
+        owner  => 'root',
+        gruop  => 'root',
         notify => Exec['apt_update'],
     }
   }
index 27c6708f259407a5b9d2e550c3f0d8eb37395be7..98ad873af54a3d7b6f29ae17851e9aea9d0152f7 100644 (file)
@@ -34,7 +34,7 @@ describe 'apt::backports', :type => :class do
         'location'   => 'http://backports.debian.org/debian-backports',
         'release'    => 'squeeze-backports',
         'repos'      => 'main contrib non-free',
-        'key'        => '55BE302B',
+        'key'        => '46925553',
         'key_server' => 'pgp.mit.edu',
         'pin'        => '200',
       })
@@ -62,7 +62,7 @@ describe 'apt::backports', :type => :class do
         'location'   => location,
         'release'    => 'squeeze-backports',
         'repos'      => 'main contrib non-free',
-        'key'        => '55BE302B',
+        'key'        => '46925553',
         'key_server' => 'pgp.mit.edu',
         'pin'        => '200',
       })
index ca55ef687bd100c54cea2af8f2851ad28767471b..20487333f67ae6b3683998dcd5155c484eb606f5 100644 (file)
@@ -7,7 +7,7 @@ describe 'apt::debian::testing', :type => :class do
       "release"             => "testing",
       "repos"               => "main contrib non-free",
       "required_packages"   => "debian-keyring debian-archive-keyring",
-      "key"                 => "55BE302B",
+      "key"                 => "46925553",
       "key_server"          => "subkeys.pgp.net",
       "pin"                 => "-10"
     })
index f5ed4558a755df22882842a130870d1eccc59466..70724f90bd04d4fefa5441b516b928edfb461629 100644 (file)
@@ -7,7 +7,7 @@ describe 'apt::debian::unstable', :type => :class do
       "release"           => "unstable",
       "repos"             => "main contrib non-free",
       "required_packages" => "debian-keyring debian-archive-keyring",
-      "key"               => "55BE302B",
+      "key"               => "46925553",
       "key_server"        => "subkeys.pgp.net",
       "pin"               => "-10"
     })
index 7537251dded2234ea5c3f9b5227bf86727f5482a..78a9b12690b0d5e2f743aaf6c9ef1d30594d0259 100644 (file)
@@ -61,7 +61,7 @@ describe 'apt::pin', :type => :define do
         :priority => '1',
         :origin   => 'ftp.de.debian.org'
       },
-      :content => "# my_pin\nExplanation: : my_pin\nPackage: *\nPin: origin \"ftp.de.debian.org\"\nPin-Priority: 1\n"
+      :content => "# my_pin\nExplanation: : my_pin\nPackage: *\nPin: origin ftp.de.debian.org\nPin-Priority: 1\n"
     },
     {
       :params => {
index 62c44c72414b41551ad8334c468ec70ba8ccc80f..eed0c10db67facf87d9f7a8d3ab6163bd7d39e6a 100644 (file)
@@ -12,7 +12,7 @@ if @pin_release.length > 0
 elsif @version.length > 0
   @pin = "version #{@version}"
 elsif @origin.length > 0
-  @pin = "origin \"#{@origin}\""
+  @pin = "origin #{@origin}"
 end
 -%>
 # <%= @name %>
index d83cb9787ae9a5ee2e107d034b12df37e88b52ea..c20b59662a0e4ac2a8644dd8adb37ca7363cf0b3 100644 (file)
@@ -15,7 +15,7 @@ apt::source { 'debian_testing':
   location   => 'http://debian.mirror.iweb.ca/debian/',
   release    => 'testing',
   repos      => 'main contrib non-free',
-  key        => '55BE302B',
+  key        => '46925553',
   key_server => 'subkeys.pgp.net',
   pin        => '-10',
 }
@@ -23,7 +23,7 @@ apt::source { 'debian_unstable':
   location   => 'http://debian.mirror.iweb.ca/debian/',
   release    => 'unstable',
   repos      => 'main contrib non-free',
-  key        => '55BE302B',
+  key        => '46925553',
   key_server => 'subkeys.pgp.net',
   pin        => '-10',
 }