Commit graph

59 commits

Author SHA1 Message Date
Hunter Haugen
944f9d5064 Merge branch '1.4.x' 2014-02-24 13:36:48 -08:00
Hunter Haugen
8453d40138 Missed the - for -y, but also tests were missing lsbdistid 2014-02-21 09:34:46 -08:00
Daniele Sluijters
ef7d149d5a apt::pin: Allow for packages to be an array. 2014-02-16 14:51:39 +01:00
Hunter Haugen
4b8aa9e55a Revert "Undo backwards-incompatible changes and features."
This reverts commit f9e2fe2a7c.
2014-02-14 14:49:43 -08:00
Hunter Haugen
f9e2fe2a7c Undo backwards-incompatible changes and features.
Undoes the parameter changes in #140 and #184
2014-02-14 14:33:30 -08:00
Ashley Penney
558954bedf Ensure apt::ppa fails on non-Ubuntu. 2014-01-09 14:35:17 -05:00
Ryan Tandy
38c0208673 change include_class to contain_class in specs
include_class was deprecated starting from rspec-puppet 1.0.0.
2013-12-06 08:33:05 -08:00
Marco Nenciarini
935d3ce15b Fix the name of sources.list.d file resource in apt::ppa 2013-12-02 13:40:22 +01:00
Stefan van Wouw
67e8968fe0 Fixed tests for fe594950c5
We actually expect an extra space. The previous build failed because a test is issued for location='', which indeed results in 2 spaces between the architecture specification and the release. According to the sources.list man page a location is always required though (unlike the missing/empty location in the :default_params of the source_spec test).
2013-10-23 12:29:47 +02:00
Ashley Penney
d1e87d4774 Merge pull request #140 from hunner/apt_force
Handling of release parameter and apt provider in force manifest
2013-10-15 10:45:17 -07:00
lkoranda
7dd4a14848 Fixed tests for cf04f76 2013-10-14 14:27:17 +02:00
Ashley Penney
39cbeeb9d2 This work flips from onlyif to unless (mistakenly looked at the
wrong return code).
2013-10-08 10:50:30 -07:00
Ashley Penney
2f9c16a273 This switches us to doing a test -s instead of checking for the
files existence as add-apt-repository --remove leaves a 0 byte file
behind instead of deleting everything properly.
2013-10-02 14:46:00 -04:00
Hunter Haugen
5db24d8e33 Update specs for #145 2013-08-05 13:41:25 -07:00
Hunter Haugen
6cde028332 Merge pull request #145 from PierreGambarotto/master
ppa: fix empty environment definition in exec ressource when no proxy
2013-07-31 09:32:27 -07:00
Oleiade
1e940d19f6 Fix: ppa options support specs 2013-07-17 09:56:24 +02:00
Pierre Gambarotto
19fbdab794 ppa: fix empty environment definition in exec ressource when no proxy 2013-07-16 09:52:06 +02:00
Hunter Haugen
4d8a99aead Adding specs for proxy and apt::ppa 2013-07-11 15:49:00 -07:00
Hunter Haugen
711420739d Update specs to test all parameter cases 2013-07-03 13:11:18 -07:00
Hunter Haugen
9568ecf26d Merge pull request #134 from spali/my_changes
replace aptitude with apt in apt::force
2013-07-02 13:54:12 -07:00
Thomas Spalinger
7c66ab5f39 fixed test for changing aptitude to apt-get 2013-07-02 21:59:26 +02:00
Hunter Haugen
46d47f79d2 Merge pull request #118 from opeckojo/apt-sources-arch
Add optional architecture qualifier to apt-sources
2013-07-02 11:48:06 -07:00
Hunter Haugen
91d917495e Merge pull request #123 from ctrlaltdel/fix-required-packages
Install required_packages before 'apt-get update'
2013-07-02 11:37:39 -07:00
Mathieu Bornoz
414c57926c apt::pin: handling all apt preferences properties
The two forms of APT preferences records (general & specific) can now be
completely and not partially defined. All distribution properties can be passed
as resource parameters. This change is totally backward-compatible.
2013-06-18 11:31:38 +02:00
Francois Deppierraz
37a0dcd0b6 Install required_packages before 'apt-get update'
This is necessary when required_packages contains GPG keys that are used for
authenticating other packages. Tested with package ubuntu-cloud-keyring which
is included in Ubuntu main and used by the Ubuntu Cloud Archive.

I think the same problem applies to other *-keyring packages as well.
2013-06-03 09:57:58 +00:00
Joe O'Pecko
b3d67c8937 Add optional architecture qualifier to apt-sources 2013-06-02 11:55:36 -07:00
Jarl Nicolson
ac86fab459 Changed PPA manifest and tests for new package which started in Quantal 2012-11-05 19:33:38 +10:00
Erik Dalén
75092fdbf1 (#16076) Ability to fill in pin explanation
Adds the ability to fill it in and sets a reasonable default.
2012-10-25 15:44:20 -04:00
Branan Purvine-Riley
bd68302783 Merge pull request #83 from dalen/pin_order
(#16070) Allow optional order parameter to apt::pin
2012-10-18 16:45:15 -07:00
Erik Dalén
40f8755217 (#16070) Allow optional order parameter to apt::pin
As the apt pinnings are parsed in ascending alphabetical order with
first match wins within a given scope it is useful to be able to specify
a ordering parameter. Then the name parameter can be kept to something
meaningful.
2012-08-23 11:25:17 +02:00
Steffen Zieger
d49dbb49ae fix check of release parameter 2012-07-10 01:39:53 +02:00
Branan Purvine-Riley
7450a5ffc0 Fix the spec test for apt::source
the $location paramater is meant to be a deb location, so it should be
formatted as a URI.
2012-05-25 15:32:49 -07:00
Branan Purvine-Riley
ebd05e5c51 Fix spec tests 2012-05-25 11:23:54 -07:00
Nan Liu
2ce47f0652 Fix apt::dep spec tests.
Some of the existing tests were not verifying anything useful. This
update replace them with more meaningful tests.
2012-05-09 12:22:28 -07:00
Nan Liu
e3784987fc Fix dependency issues introduced with anchor.
apt::ppa and apt::builddep requires apt class. The anchor introduced for
containment of apt-get update causes a dependency loop. apt::ppa appears
to depend on apt class sources.d direcory. While apt::builddep have no
clear reason for a dependency on apt class. This change refactor both
define type, so they no longer cause a dependency loop.
2012-05-09 12:04:17 -07:00
Nan Liu
e8977deea1 (#14321) apt::pin resource support release.
apt::pin release should default to title, but should be able to
override. This update removes unnecessary "" around $name, and add spec
tests.

Conflicts:

	spec/defines/pin_spec.rb
2012-05-04 13:56:35 -07:00
Thomas Broyer
0ffe484c7c Move Package['python-software-properties'] to apt:ppa
Also updates the apt-update in Apt::Ppa to use $apt::params::provider
instead of aptitude.
2012-05-04 13:46:08 -07:00
Nan Liu
f13f3cfac7 (#11966) Change apt update to apt_update.
Based on code review change exec from apt update to apt_update.
2012-05-04 13:35:25 -07:00
Nan Liu
82967a22fa (#11966) Update apt::ppa to use apt::update.
Change apt::ppa define type to also use the apt::update class to invoke
apt-get update once.
2012-05-04 13:35:25 -07:00
Nan Liu
3684f88372 (#11966) Only invoke apt-get update once.
Move apt-get update exec to a seperate class to minimize the number of
apt-get updates invoked by configuration changes.

* remove apt_update exec resource in apt class.
* remove apt-get-${name} in defines.
* apt::source notify Exec['apt update'].
* Remove dependency to Exec['apt_update'].
* fix rspec-puppet tests.

Conflicts:

	manifests/source.pp
2012-05-04 13:35:13 -07:00
Nan Liu
effb3f7ff3 (#14308) Add ensure=>absent for define resource.
Several apt::* define resource type does not support ensurable. This
update allows ensure=>absent to support the removal of these
configuration files.

* apt::conf
* apt::pin
* apt::source
2012-05-03 16:59:13 -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
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
Ken Barber
a758247f26 (#13289) Clean up style violations and fix corresponding tests 2012-03-21 13:21:11 +00: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
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
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
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
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