Commit graph

875 commits

Author SHA1 Message Date
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
Matthaus Litteken
1dcbf3d303 Add tests for required_packages change
This updates the tests for the apt::source defined type to use the new name for
the exec resource and the new parameter for the same exec.
2012-02-23 21:04:57 -08:00
Matthaus Litteken
f3735d2ba2 Allow duplicate $required_packages
Previously, if more than one apt::source required the same packages to be
installed it would fail with a duplicate exec resource. This adds the name of
the source resource to the exec and gives the exec a name, moving it to a
command parameter for the exec.
2012-02-23 21:01:20 -08:00
Matthaus Litteken
8171d35470 Merge branch 'allow-same-key' 2012-02-23 20:54:10 -08:00
Matthaus Litteken
74c8371533 (#12430) Add tests for changes to apt module
This update reflects the changes to the apt module to allow duplicate keys. It
mostly involves tests for changes to the resource names to make them unique
between defines.
2012-02-23 20:51:27 -08:00
Christian G. Warden
97ebb2d5d5 Test two sources with the same key 2012-02-23 15:44:26 -08:00
Ryan Coleman
44510890b4 Merge pull request #17 from blkperl/ticket_12526_apt_disable_keys
(#12526) Add ability to reverse apt { disable_keys => true }

Reviewed by Ryan Coleman (ryan@puppetlabs.com)
2012-02-23 14:55:55 -08:00
William Van Hevelingen
1160bcd6d1 (#12526) Add ability to reverse apt { disable_keys => true }
The setting `disable_keys => true` parameter in the apt module creates
/etc/apt/apt.conf.d/99unauth with the contents
"APT::Get::AllowUnauthenticated 1;". Changing `disable_keys`
does not remove this file. This patch makes it so that
`disable_keys => false` will remove /etc/apt/apt.conf.d/99unauth.
2012-02-23 14:37:04 -08:00
Ryan Coleman
c09f476b9d Merge pull request #20 from blkperl/ticket_12522_purge_option
(#12522) Adding purge option to apt class

Reviewed by Ryan Coleman
2012-02-23 14:31:45 -08:00
William Van Hevelingen
923375f093 Merge pull request #1 from rcoleman/ticket_12522_purge_option
Add Modulefile to puppet-apt
2012-02-23 14:05:25 -08:00
Ryan Coleman
2842d73b95 Add Modulefile to puppet-apt
Now that puppet-apt depends on puppetlabs-stdlib, an explicit
dependency is required. Modulefile was entirely missing. This commit
adds on.
2012-02-23 14:01:31 -08:00
Christian G. Warden
c65774204d Allow the use of the same key in multiple sources
Allow the use of the same key in multiple sources by including the name
of the source in the declaration for the exec which adds the key.
2012-02-14 11:40:29 -08:00
William Van Hevelingen
8c279636f5 (#12522) Adding purge option to apt class
Adds a purge option to the apt class to remove repositories
that are not managed by apt::source
2012-02-14 10:51:56 -08:00
Matthaus Litteken
52adc3555c Merge pull request #18 from bodepd/apt_proxy_tests
(#12529) Add unit test for apt proxy settings
2012-02-13 10:02:50 -08:00
Dan Bode
997c9fdc40 (#12529) Add unit test for apt proxy settings
This commit adds unit tests to validate that the
apt proxy is configured as expected when the class
parameter proxy_host is set as a class parameter for
the apt class.
2012-02-13 09:58:30 -08:00
Ken Barber
3abad192fa Merge pull request #15 from bodepd/proxysupport
(#12529) Add parameter to support setting a proxy for apt
2012-02-08 15:20:32 -08:00
Dan Bode
50f3cca0c6 (#12529) Add parameter to support setting a proxy for apt
This commit adds two class parameter to apt that can be used to
specify a proxy to use with apt.

  - proxy_host
  - proxy_port
2012-02-08 15:06:53 -08:00
Dan Bode
0d32fee292 Merge pull request #14 from haus/ticket/12094_add_spec_tests
Ticket/12094 add spec tests
2012-02-08 09:44:38 -08:00
Matthaus Litteken
d522877cdd (#12094) Replace chained .with_* with a hash
The hash passing to the with method is cleaner and closer to puppet code, so
all of the with_$param have been replaced with with($hash). This also
includes two minor whitspace changes to unstable.pp and source.pp.
This also replaces the ternary switch on param_set with a hash merge,
which is cleaner and will support more use cases.
2012-02-08 09:24:43 -08:00
Matthaus Litteken
8cf1bd0289 (#12094) Remove deprecated spec.opts file
Rspec no longer uses the spec.opts file, and this particular file also uses
options for rspec that are no longer honored or available, like loadby. So this
commit removes the file. Users that want to customize rspec behavior should use
a .rspec file in the repository root or in their home directory.
2012-01-23 13:38:09 -08:00
Matthaus Litteken
2d688f4cdc (#12094) Add rspec-puppet tests for apt
This commit adds full coverage for the apt module as it currently exists. It
adds rspec-puppet tests for the defines (apt::builddep, apt::force, apt::pin,
apt::ppa, apt::source) and classes (apt, debian::testing, debian::unstable,
apt::params, apt::release).
2012-01-23 13:37:42 -08:00
Matthaus Litteken
0fb5f78379 (#12094) Replace name with path in file resources
When the name is used with a file resource, it becomes difficult to test the
resource using rspec-puppet, as the name parameter gets aliased to path. So to
maintain consistency between tests and manifests, this replaces all name
parameters in file resources with the equivalent path parameter.
2012-01-23 13:25:52 -08:00
Dan Bode
f04eb5ab71 Merge pull request #4 from webfactory/pin_before_source
Suggested fix for #10449
2012-01-15 21:47:45 -08:00
Dan Bode
3f2df6b860 Merge pull request #12 from haus/11953_fix_apt_force_version
(#11953) Apt::force passes $version to aptitude
2012-01-13 17:17:15 -08:00
Matthaus Litteken
f759bc039a (#11953) Apt::force passes $version to aptitude
Previously, even if $version were passed to apt::force, aptitude would just
install the default version of the package available. This updates the aptitude
call to use the version string if it exists. If no version is passed, or if it
is false, no version is added to the aptitude call.  This also updates the
rspec-puppet tests for the define, to reflect the changes to the exec.
2012-01-13 15:29:47 -08:00
Matthaus Litteken
30b6748f02 Merge pull request #11 from bodepd/11413_apt_force_query_fix
11413 apt force query fix
2012-01-13 15:09:45 -08:00
Dan Bode
f2265b470b Merge pull request #8 from cwarden/source-example-improvement
include_src parameter in example; Whitespace cleanup
2012-01-13 12:25:42 -08:00
Dan Bode
f71db53130 (#11413) Add spec test for apt::force to verify changes to unless
In the Previous commits, the query being done by the
apt::force install command was not strict enough and
could lead to false positives.

These queries represented by the unless parameter have been
resolved in another commit. This commit accompanies that commit
and adds basic unit tests to correspond to the changes.
2012-01-13 12:04:09 -08:00
Matthias Pigulla
2f5d317177 (#11413) Update dpkg query used by apt::force
This patch fixes the query used by apt::force to
determine rather or not the package is installed.

Previously, the expression was not specific enough and
could not lead to false positives in cases where a package
name is contained within another package name (puppet could be
incorrectly determined as being installed if puppet-common is
installed)

This commit resolves that by improving the query expression.
2012-01-13 11:59:24 -08:00
Matthaus Litteken
ee5d762351 Merge pull request #9 from bodepd/10451_fix_apt_update_refresh
10451 fix apt update refresh
2012-01-04 10:30:31 -08:00
Dan Bode
cf6caa1f15 (#10451) Add test coverage to apt::ppa
This commit adds test coverage for apt::ppa.

This test coverage is suficient to verify the
code changes that resolve the issue with
aptitude update not being called when ppas were
added (#10451).
2012-01-03 17:03:24 -08:00
Christian G. Warden
0dd697d7cf include_src parameter in example; Whitespace cleanup
In the apt::source example, include the include_src parameter.  Clean-up
whitespace in the example to be consistent with the style guide.
2011-12-20 13:45:43 -08:00
Garrett Honeycutt
a7d7a6ca6c Merge pull request #7 from cwarden/patch-1
fix typos in "repositories"
2011-12-20 12:33:29 -08:00
Christian G. Warden
b662eb8644 fix typos in "repositories" 2011-12-20 12:06:24 -08:00
Matthias Pigulla
1be745705c Fix (#10451) - apt::ppa fails to "apt-get update" when new PPA source is added 2011-11-02 15:40:10 +01:00
Matthias Pigulla
864302a091 Set the pin priority before adding the source (Fix #10449) 2011-11-02 10:28:38 +01:00