Commit graph

360 commits

Author SHA1 Message Date
Dan Bode
7bf6d833ed Merge pull request #51 from nanliu/tb/14299
(#14299) Resolve Modulefile name mismatch.
2012-05-03 15:23:15 -07:00
Nan Liu
3f8a7846ab (#14299) Resolve Modulefile name mismatch.
The modulefile name is puppet-apt, but the module is released to forge
under puppetlabs. This causes a dependency confusion for puppet module
tool, which has been fixed by this patch.

Previous:

    $ puppet module list
    ~/.puppet/modules
    ├── puppet-apt (v0.0.2)
    ├── puppetlabs-mongrodb (v0.0.1)
    └── puppetlabs-stdlib (v2.3.1)

Now:

    $ puppet module list
    ~/.puppet/modules
    ├── puppetlabs-apt (v0.0.2)
    ├── puppetlabs-mongrodb (v0.0.1)
    └── puppetlabs-stdlib (v2.3.1)
2012-05-03 14:55:16 -07:00
Dan Bode
0ac5939f9b Merge pull request #48 from nanliu/tb/lint
Cleanup apt-module puppet-lint related issues.
2012-05-03 10:20:03 -07:00
Nan Liu
17b9ac3c7f Cleanup apt-module puppet-lint related issues. 2012-05-03 10:10:06 -07:00
Dan Bode
df376cb9bb Merge pull request #47 from nanliu/master
(#14138) Fix spec test for aptitude changes.
2012-05-02 22:20:08 -07:00
Nan Liu
67023aa435 (#14138) Fix spec test for aptitude changes.
Fix spec test related to apttitude update -> apt-get update change,
2012-05-02 21:35:13 -07:00
Nan Liu
51a7596b03 Merge pull request #41 from tbroyer/install-proxy-first
Make sure we configure the proxy before doing apt-get update.
2012-05-02 17:31:57 -07:00
Nan Liu
4a788a60f9 Merge pull request #44 from relud/patch-1
(#14138) Modify apt::ppa's update-apt exec to use the ${apt::params::provider} parameter.
2012-05-02 17:29:31 -07:00
Nan Liu
42af4cdc74 Merge pull request #42 from ody/sync_with_pl_ops
Sync with pl ops
2012-05-02 17:27:12 -07:00
Dan Bode
34fcd1935e Merge pull request #46 from nanliu/master
(#14287) Fix apt::pin resource for rspec-puppet.
2012-05-02 16:08:14 -07:00
Nan Liu
d1e0e3ee37 (#14287) Fix apt::pin resource for rspec-puppet.
The shorthand syntax cause rspec-puppet failure for external modules
depending on the puppet-apt module. This patch uses the require
metaparameter to avoid this issue.
2012-05-02 16:00:27 -07:00
Daniel Thornton
a5ba24695f (#14138) Modify apt::ppa's update-apt exec to use the ${apt::params::provider} parameter rather than explicitly calling aptitude.
Previously the update-apt exec would always use /usr/bin/aptitude, which is not necessarily present. This change makes it use ${apt::params::provider} which defaults to /usr/bin/apt-get. This also adds some consistency so that ${apt::params::provider} is used everywhere.
2012-04-23 20:40:24 +00:00
Cody Herriges
644ed232a0 Tests to validate apt::{conf,backports}
This patch adds the appropriate spec tests to validate the changes
  introduced by e5f2dfe.  As a bonus it includes fixes to the manifests
  that were discovered while writing the tests.
2012-04-20 13:43:38 -07:00
Cody Herriges
e5f2dfe294 Adds apt::{conf,backports} and variable style.
With the addition of this patch two new defines will be added; one to
  manage APT configuration files (apt::conf) and one that abstracts out the
  requirements needed to turn on backport repositories (apt::backports).

  In addition, the patch takes the opportunity to clean up variable
  definitions so they follow a consistent pattern of setting local
  variables to the fully qualified value stored in the apt::params
  class.  Previously all variable used within a class directly addressed
  the apt::params namespace when ever the variable was used.  In the
  pattern they now adhere to we can more easily switch the namespace
  data lives in or externalize it even more using hiera.
2012-04-20 13:35:27 -07:00
Thomas Broyer
e656c65818 Make sure we configure the proxy before doing apt-get update. 2012-03-30 17:48:31 +02:00
Matthaus Litteken
482609fa39 Merge pull request #39 from rcoleman/0.0.2_release
Updated CHANGELOG and Modulefile for 0.0.2
2012-03-26 17:44:53 -07:00
Ryan Coleman
1218d1103c Updated CHANGELOG and Modulefile for 0.0.2
This commit updates both the Modulefile and CHANGELOG for the 0.0.2
Puppet Forge release.
2012-03-26 17:01:54 -07:00
Cody Herriges
551a0d2188 Merge pull request #36 from rcoleman/tickets/13261/improve_smoke_tests
Tickets/13261/improve smoke tests
2012-03-26 16:46:24 -07:00
Ryan Coleman
41cedbb7ba (#13261) Add real examples to smoke tests.
This commit modifies some smoke tests with real-world usage examples
instead of providing things like 'foo' that the module user must
replace in order to conduct a smoke test or try out example functionality.
2012-03-26 16:31:49 -07:00
Ryan Coleman
d159a78a8f (#13261) Add key.pp smoke test
This commit adds a smoke test for key.pp, adding a key declaration
for the puppetlabs apt source.
2012-03-26 16:31:49 -07:00
Ryan Coleman
7116c7a624 (#13261) Replace foo source with puppetlabs source
Prior to this commit, the source.pp test included an apt source
named foo which broke the apt-get update exec when applied on a
target system. This commit removes it in favor of the puppetlabs
apt source which is valid on all target platforms.
2012-03-26 16:31:48 -07:00
Ryan Coleman
1ead0bf3ab Ignore pkg directory.
This commit modifies .gitingore to ignore changes to the pkg directory
used when building Forge releases.
2012-03-26 16:31:12 -07:00
Ryan Coleman
cd7a3efdf0 Merge pull request #37 from kbarber/ticket/master/13289
Ticket/master/13289 Style violations & rspec cleanup
2012-03-23 16:02:26 -07:00
Ken Barber
9c13872b5a (#13289) Fix some more style violations 2012-03-21 13:35:48 +00:00
Ken Barber
0ea4ffa9a2 (#13289) Change test scaffolding to use a module & manifest dir fixture path
This removes the need for depending on a global site.pp, and depending on the
checked out apt module to be called 'apt' as well.

It pulls in stdlib via sub-modules as I don't have a better way to deal with
dependencies yet. It has pinned the revision for stdlib to 2.2.1 which is the
minimum required version for apt to work.
2012-03-21 13:21:50 +00:00
Ken Barber
a758247f26 (#13289) Clean up style violations and fix corresponding tests 2012-03-21 13:21:11 +00:00
Ken Barber
99c3fd354d (#13289) Add puppet lint tests to Rakefile 2012-03-21 13:19:05 +00:00
Matthaus Litteken
a11a7b091f Merge pull request #34 from pdxcat/apt_key_should_be_case_insensitive
(#13125) Apt keys should be case insensitive
2012-03-15 00:24:03 -07:00
William Van Hevelingen
5148cbf5a6 (#13125) Apt keys should be case insensitive
Previously lowercase keys would be installed every
puppet run because apt-key list returns an uppercase
key. This commit makes the comparison case insensitive.
2012-03-15 00:06:27 -07:00
Matthaus Litteken
3dd2d1f227 Merge pull request #32 from pdxcat/convert_apt__key_to_use_anchors
Convert apt::key to use anchors
2012-03-14 23:33:46 -07:00
Ryan Coleman
fa40ebae34 Merge pull request #33 from rcoleman/tickets/13016/create_CHANGELOG
(#13016) Add a CHANGELOG since first commit
Skipping the merge review rules on this harmless commit of a changelog.
2012-03-07 18:46:13 -08:00
Ryan Coleman
909942bfd5 (#13016) Add a CHANGELOG since first commit 2012-03-07 21:22:50 -05:00
Reid Vandewiele
b9607a440d Convert apt::key to use anchors
Previously, apt::key used a noop exec hack to do exactly what anchors were
intended to be used for. This commit removes the exec hack and achieves the
same end using Anchor resources from the puppetlabs/stdlib module.
2012-03-07 14:20:34 -08:00
Nan Liu
44fd06c4a4 Merge pull request #31 from pdxcat/fix_release_parameter_test
Modify apt::source release verification to work correctly with puppet-rspec
2012-03-07 11:24:21 -08:00
Reid Vandewiele
d4fec561f3 Modify apt::source release parameter test
This commit modifies the release parameter test in apt::source to work
correctly within puppet-rspec for edge-case resource definitions. Previously,
the test for the $release parameter was written as

`if ! $release { fail() }`

This commit updates the test to be written as

`if $release == undef { fail() }`

Additionally, the tests for correct behavior in the presence or absence of a
$release parameter have been beefed up.

The reason for making this change relates to examples such as the following
resource definition:

apt::source { "jenkins":
  location    => "http://pkg.jenkins-ci.org/debian",
  release     => "",
  repos       => "binary/",
  key         => "D50582E6",
  key_source  => "http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key",
  include_src => false,
}

Note that the $release parameter is given as the empty string. In practice,
this is perfectly valid and everything will work great. However, it seems that
the empty string gets interpreted by something in puppet-rspec as something
equivalent to "False", and thus when testing, the above resource definition
would fail with "Puppet::Error: lsbdistcodename fact not available: release
parameter required" even though the $release parameter has been explicitely
specified (as the empty string).

See also: https://github.com/rtyler/puppet-jenkins/issues/9
2012-03-07 10:10:46 -08:00
Matthaus Litteken
65a7a030e0 Merge pull request #30 from rcoleman/tickets/12917/add_contributors_to_readme
(#12917) Add contributors to README
2012-03-01 15:10:54 -08:00
Ryan Coleman
1132a07f3f (#12917) Add contributors to README
Prior to this commit, this modules README had no list of contributors.
This commit adds such a list and corrects a typo I overlooked on the
last pull request.
2012-03-01 15:04:51 -08:00
Ryan Coleman
76dbf992e0 Merge pull request #26 from pdxcat/ticket_12823_aptkey_defined_type
(#12823) Add apt::key defined type and modify apt::source to use it

Reviewed and tested by Ryan Coleman (ryan@puppetlabs.com)
2012-03-01 14:40:44 -08:00
Reid Vandewiele
8cdaf855a1 (#12823) Add apt::key defined type and modify apt::source to use it
Adding this defined type allows puppet to add keys to the apt keystore without
needing to add a corresponding source; it also adds the "key_source" parameter
for wget'ing keys from arbitrary URLs, and allows for keys to be explicity
removed.

apt::key allows a key to be ensured present multiple times to account for
apt::source resources that all reference the same key. However, this means
that it is possible for a given key to be defined multiple times with
differing source parameters. e.g.

apt::key { "Add key: 4BD6EC30 from Apt::Source bunny":
  key        => "4BD6EC30",
  key_server => "pgp.mit.edu",
}

apt::key { "Add key: 4BD6EC30 from Apt::Source rabbit":
  key        => "4BD6EC30",
  key_server => "keyserver.ubuntu.com",
}

The defined type will accept both definitions and will create multiple exec
resources. This was deemed preferable to the alternative (creating only one
exec resource) in that one broken definition won't hose an entire catalog. If
one definition fails to install the key because of a bad "key_server", the
next apt::key that uses the key will get it done.
2012-03-01 14:15:52 -08:00
Ryan Coleman
9f570782aa Merge pull request #27 from blkperl/ticket_12809_refactor_release
(#12809) $release should use $lsbdistcodename and fall back to manual in...

Reviewed and tested by Ryan Coleman (ryan@puppetlabs.com)
2012-03-01 13:37:51 -08:00
William Van Hevelingen
7c0d10b392 (#12809) $release should use $lsbdistcodename and fall back to manual input
This commit changes $release to default to Facter's $lsbdistcodename
and fall back to a Parse Error if $release is not set and $lsbdistcodename
does not exist. Previously $release was hardcoded to karmic.

This commit also modifies apt::ppa to use $release and sets the
files to be ensured so that they are not purged when purge_sources_list_d
is set to true.
2012-03-01 11:15:02 -08:00
Ryan Coleman
b1eb28956e Merge pull request #23 from haus/python_properties
Check if python-software-properties is defined before attempting to define it.

Reviewed and tested by Ryan Coleman (ryan@puppetlabs.com)
2012-02-24 11:20:52 -08:00
Ryan Coleman
fab62e6de7 Merge pull request #22 from haus/unique_required_packages
Allow duplicate required_packages between sources

Reviewed and tested by Ryan Coleman (ryan@puppetlabs.com)
2012-02-24 11:12:39 -08:00
Ryan Coleman
2a57cbb8ca Merge pull request #24 from haus/fix_source_key_tests
Fix source specs to test all key permutations

Reviewed and tested by Ryan Coleman (ryan@puppetlabs.com)
2012-02-24 10:56:55 -08:00
Matthaus Litteken
e68e663f28 Merge pull request #25 from rcoleman/ticket_12522_purge_option_take_2
(#12522) Split purge option to spare sources.list
2012-02-24 10:29:09 -08:00
Ryan Coleman
be2cc3ec1b (#12522) Adjust spec test for splitting purge
Now that the purge parameter is split into two, the spec test needs
adjusted. This commit makes that adjustment.
2012-02-24 10:17:26 -08:00
Ryan Coleman
7dc60ae5ea (#12522) Split purge option to spare sources.list
Prior to this commit, when using the purge option, unmanaged entries
in both /etc/apt/sources.list and sources.list.d would be purged.

This commit splits purge into purge_sources_list and purge_sources_list_d
which handle the purging of those items separately. Brief documentation on
each added to class documentation.
2012-02-24 09:27:28 -08:00
Matthaus Litteken
9059c4e2a8 Fix source specs to test all key permutations
Previously only one should in each block was being evaluated. This moves each
should to its own block so that all values are tested. It also adds another set
of params so that all useful permutations of key, key_server, and key_content
are generated. It also replaces the previous ternary assignment for param_set
with a hash merge.
2012-02-23 22:14:38 -08:00
Matthaus Litteken
8acb202685 Add test for python-software-properties package
This test adds the precondition that the python-software-packages package be
installed before the apt class is synced. If the defined function were not
called around the package resource, this test would fail with a duplicate
package resource error.
2012-02-23 21:40:42 -08:00
Peter Drake
a4af11f7bc Check if python-software-properties is defined before attempting to define it. 2012-02-23 21:27:48 -08:00