]>
review.fuel-infra Code Review - puppet-modules/puppetlabs-apt.git/log
Morgan Haskel [Tue, 7 Apr 2015 19:12:06 +0000 (12:12 -0700)]
Add testing, docs, and examples for backports
Daniele Sluijters [Tue, 7 Apr 2015 11:51:10 +0000 (13:51 +0200)]
backports: Add support back for backports.
This is currently lacking tests.
Daniele Sluijters [Mon, 6 Apr 2015 22:02:58 +0000 (18:02 -0400)]
source: Support complex pin, like key does.
This adds support for passing in a full pin declaration as the pin
parameter on a source declaration.
It keeps the old behaviour intact, you can still simply do `pin => '10'`
and it will pin on origin with a priority of 10.
Should that not be what you want you can now pass in a full pin
declaration instead. We make no assumptions here, whatever you pass in
will be passed through to pin as-is with the exception of the values for
`ensure` and `before` which are always overridden by us to ensure
everything keeps working as designed.
Colleen Murphy [Mon, 6 Apr 2015 20:32:27 +0000 (13:32 -0700)]
Merge pull request #491 from mhaskel/lint_cleanup
more lint cleanup
Morgan Haskel [Mon, 6 Apr 2015 20:18:58 +0000 (13:18 -0700)]
more lint cleanup
Daniele Sluijters [Mon, 6 Apr 2015 19:06:24 +0000 (15:06 -0400)]
Merge pull request #490 from mhaskel/lint_cleanup
Lint cleanup
Morgan Haskel [Mon, 6 Apr 2015 18:29:02 +0000 (11:29 -0700)]
Lint cleanup
Daniele Sluijters [Fri, 27 Mar 2015 13:11:05 +0000 (14:11 +0100)]
Merge pull request #483 from mhaskel/examples
Add missing examples for 'removed' functionality
Morgan Haskel [Wed, 25 Mar 2015 21:22:52 +0000 (17:22 -0400)]
Example updates
Daniele Sluijters [Thu, 26 Mar 2015 07:48:14 +0000 (08:48 +0100)]
Merge pull request #484 from mhaskel/merge_master_to_next
Merge master to next
Morgan Haskel [Wed, 25 Mar 2015 22:32:09 +0000 (18:32 -0400)]
Merge remote-tracking branch 'upstream/master' into merge_master_to_next
Daniele Sluijters [Wed, 25 Mar 2015 19:36:11 +0000 (20:36 +0100)]
Merge pull request #482 from leoarnold/master
Updated key fingerprints in README to match v1.8.0 requirements
Morgan Haskel [Wed, 25 Mar 2015 19:30:16 +0000 (15:30 -0400)]
Example for fancy progress.
Morgan Haskel [Wed, 25 Mar 2015 19:16:04 +0000 (15:16 -0400)]
Example for disabling keys
Leo Arnold [Wed, 25 Mar 2015 19:09:22 +0000 (20:09 +0100)]
Updated key fingerprints in README to match v1.8.0 requirements
Morgan Haskel [Wed, 25 Mar 2015 17:08:13 +0000 (13:08 -0400)]
Add examples for force.
Morgan Haskel [Wed, 25 Mar 2015 15:13:12 +0000 (11:13 -0400)]
We've got things in params, let's use those!
Morgan Haskel [Mon, 23 Mar 2015 20:13:37 +0000 (16:13 -0400)]
Add an example for backports
Morgan Haskel [Mon, 23 Mar 2015 19:24:35 +0000 (15:24 -0400)]
We got rid of the funny proxy removal
Daniele Sluijters [Wed, 25 Mar 2015 07:30:11 +0000 (08:30 +0100)]
Merge pull request #479 from mhaskel/update_anchors
(MODULES-1156, MODULES-769) Update anchors
Morgan Haskel [Mon, 23 Mar 2015 17:55:13 +0000 (13:55 -0400)]
(MODULES-1156, MODULES-769) Remove unnecessary anchors
`apt::ppa` and `apt::setting` don't actually include `apt::update` so
anchors are unnecessary. Move `apt` to use contain instead of anchors,
since it wasn't anchoring properly anyways. Update the tests to make
sure it can have settings and ppas depending on each other without
cycles.
Daniele Sluijters [Tue, 24 Mar 2015 21:03:13 +0000 (22:03 +0100)]
Merge pull request #480 from anodelman/master
(BKR-147) add Gemfile setting for BEAKER_VERSION for puppet...
Alice Nodelman [Tue, 24 Mar 2015 18:40:24 +0000 (11:40 -0700)]
(BKR-147) add Gemfile setting for BEAKER_VERSION for puppet...
puppetdb, etc
- support for BEAKER_VERSION and BEAKER_RSPEC_VERSION in gemfile
Daniele Sluijters [Sun, 22 Mar 2015 22:54:46 +0000 (23:54 +0100)]
Merge pull request #478 from GhostLyrics/update-readme-unattended-upgrades
Extend docs for unattended_upgrades
Alexander Skiba [Sun, 22 Mar 2015 20:02:59 +0000 (21:02 +0100)]
Extend docs for unattended_upgrades
documented more common parameters
Daniele Sluijters [Fri, 20 Mar 2015 18:15:42 +0000 (19:15 +0100)]
README: update['frequency'] is not a boolean
Daniele Sluijters [Fri, 20 Mar 2015 18:13:53 +0000 (19:13 +0100)]
README: Add highlighting for code blocks.
Morgan Haskel [Fri, 20 Mar 2015 18:12:12 +0000 (14:12 -0400)]
Fix typo
Daniele Sluijters [Fri, 20 Mar 2015 18:09:18 +0000 (19:09 +0100)]
Merge pull request #477 from mhaskel/doc_updates
Doc updates
Morgan Haskel [Fri, 20 Mar 2015 00:15:32 +0000 (17:15 -0700)]
README updates for 2.x rewrite
All classes, defines, parameters, and examples should be up to date.
Daniele Sluijters [Thu, 19 Mar 2015 09:16:15 +0000 (10:16 +0100)]
Merge pull request #472 from mhaskel/acceptance_test_fixes
Acceptance test fixes
Daniele Sluijters [Thu, 19 Mar 2015 09:14:56 +0000 (10:14 +0100)]
Merge pull request #473 from mhaskel/freq_cleanup
Remove `update['always'] = true` support
Daniele Sluijters [Thu, 19 Mar 2015 09:14:35 +0000 (10:14 +0100)]
Merge pull request #474 from mhaskel/containers_ftw
Linux open-source builds are regularly maxed out.
Morgan Haskel [Wed, 18 Mar 2015 22:51:37 +0000 (15:51 -0700)]
Linux open-source builds are regularly maxed out.
Container-based are not. Let's switch!
Morgan Haskel [Wed, 18 Mar 2015 20:52:12 +0000 (13:52 -0700)]
Remove `update['always'] = true` support
We don't really need both of `update['always'] = true` and
`update['frequency'] = 'always'`.
Morgan Haskel [Wed, 18 Mar 2015 19:56:29 +0000 (12:56 -0700)]
Make the acceptance tests work
Morgan Haskel [Wed, 18 Mar 2015 19:51:37 +0000 (12:51 -0700)]
Actually make it possible to use apt_key
The provider wasn't updated for a parameter rename.
Bryan Jen [Tue, 17 Mar 2015 23:59:49 +0000 (16:59 -0700)]
Merge pull request #471 from mhaskel/merge_1.8.x_to_master
Merge 1.8.x to master
Hunter Haugen [Tue, 17 Mar 2015 00:22:18 +0000 (17:22 -0700)]
Merge pull request #469 from mhaskel/test_fixes
Update all the unit tests to look for full fingerprints
Morgan Haskel [Mon, 16 Mar 2015 23:40:46 +0000 (16:40 -0700)]
Update all the unit tests to look for full fingerprints
Merged #466 too quickly
Hunter Haugen [Mon, 16 Mar 2015 21:30:19 +0000 (14:30 -0700)]
Merge pull request #468 from mhaskel/1.8.0-prep
1.8.0 prep
Morgan Haskel [Mon, 16 Mar 2015 21:16:08 +0000 (14:16 -0700)]
Merge pull request #466 from paroga/master
Fix gpg key checking warings after
f588f26
Morgan Haskel [Mon, 16 Mar 2015 21:05:58 +0000 (14:05 -0700)]
1.8.0 prep
Patrick Gansterer [Mon, 16 Mar 2015 18:34:24 +0000 (19:34 +0100)]
Fix gpg key checking warings after
f588f26
Use the full fingerprint for all keys to silence the warning.
Morgan Haskel [Mon, 16 Mar 2015 17:56:28 +0000 (10:56 -0700)]
Merge pull request #465 from bootc/fixes/gpg2_date_parsing
apt_key: fix parsing invalid dates when using GnuPG 2.x
Chris Boot [Sun, 15 Mar 2015 22:47:15 +0000 (22:47 +0000)]
apt_key: fix some whitespace issues
Chris Boot [Sun, 15 Mar 2015 22:33:22 +0000 (22:33 +0000)]
apt_key: fix parsing invalid dates when using GnuPG 2.x
If one should happen to have redirected /usr/bin/gpg to run GnuPG 2.x
rather than the more usual GnuPG 1.x, the apt_key provider fails with
the following error:
Could not prefetch apt_key provider 'apt_key': invalid date
This is because the output of "--with-colons" defaults to using
"fixed-list-mode" in 2.x but did not do so for 1.x. This new format
gives much more information about keys and also uses timestamps in
seconds from 1970-01-01 (UNIX epoch) rather than dates in the format
YYYY-MM-DD.
This patch adds "--fixed-list-mode" when calling apt-key, and adjusts
the code to parse the timestamps instead. This actually has several
advantages:
- Works the same with GnuPG 1.x and 2.x.
- More accurate expiry time tracking, not just entire days.
- No need to require 'date' any longer.
- Will allow the provider to expose more key information in future.
Tested on:
- Debian Wheezy (Puppet 2.7.23, Ruby 1.8.7p358)
- Debian Jessie (Puppet 3.7.2, Ruby 2.1.5p273)
Colleen Murphy [Fri, 13 Mar 2015 22:33:12 +0000 (15:33 -0700)]
Merge pull request #464 from mhaskel/README_cleanup
Update docs for unattended_upgrades
Morgan Haskel [Fri, 13 Mar 2015 21:56:53 +0000 (14:56 -0700)]
Update docs and test for $legacy_origin
Hunter Haugen [Fri, 13 Mar 2015 22:29:20 +0000 (15:29 -0700)]
Merge pull request #463 from mhaskel/toggle-legacy-origin
Allow changing legacy_origin
Morgan Haskel [Fri, 13 Mar 2015 21:56:53 +0000 (14:56 -0700)]
Update docs and test for $legacy_origin
Mikko Pesari [Wed, 18 Feb 2015 16:09:53 +0000 (18:09 +0200)]
unattended_upgrades: Allow changing legacy_origin
This enables using Origins-Pattern in Ubuntu.
Morgan Haskel [Fri, 13 Mar 2015 21:40:43 +0000 (14:40 -0700)]
Merge pull request #459 from tphoney/modules-1675_check_gpg_version
initial commit for apt_key checking
Morgan Haskel [Fri, 13 Mar 2015 21:10:13 +0000 (14:10 -0700)]
Merge pull request #456 from johanfleury/cleaning/template/unattended-upgrades
Cleaning 50unattended-upgrades.erb
Colleen Murphy [Fri, 13 Mar 2015 20:51:56 +0000 (13:51 -0700)]
Merge pull request #462 from mhaskel/optional_software_properties
Make installation of software-properties optional
Morgan Haskel [Fri, 20 Feb 2015 22:25:53 +0000 (14:25 -0800)]
Make installation of software-properties optional
This is cherry-picked from the PPA cleanup happening for the 2.0.0 release.
Conflicts:
manifests/params.pp
manifests/ppa.pp
tphoney [Fri, 6 Mar 2015 16:14:40 +0000 (16:14 +0000)]
initial commit for gpg key checking
better attempt at gpg version checking
adding in key length warning
removing version check, adding key check
adding tests
clean up the code
small changes
use commands
documentation updates
Daniele Sluijters [Wed, 11 Mar 2015 08:21:45 +0000 (09:21 +0100)]
Merge pull request #461 from mhaskel/boo_inheritance
Inheritance of apt::params means it can't be private
Morgan Haskel [Wed, 11 Mar 2015 00:13:31 +0000 (17:13 -0700)]
Inheritance of apt::params means it can't be private
Otherwise, if another module has `class { 'apt': }` in it everything
fails, as `$caller_module_name` will be the other module name.
Johan Fleury [Sun, 8 Mar 2015 23:01:57 +0000 (00:01 +0100)]
Cleaning 50unattended-upgrades.erb
Morgan Haskel [Fri, 6 Mar 2015 18:08:02 +0000 (10:08 -0800)]
Merge pull request #453 from puppetlabs/daenney/location-required
apt::source: Make location required.
Daniele Sluijters [Thu, 5 Mar 2015 19:35:02 +0000 (20:35 +0100)]
apt::source: Make location mostly required.
In what universe does it make sense to create a `sources.list.d` entry
for a repository **without** specifying where this repository is?
:confounded:
:disappointed: :weary: :anguished: :scream:
Only when removing the resource should a location not be required.
TP Honey [Fri, 6 Mar 2015 12:13:49 +0000 (12:13 +0000)]
Merge pull request #454 from LeslieCarr/MODULES-1827-add-cumulus-linux
MODULES-1827 adding Cumulus Linux detection
Leslie Carr [Fri, 6 Mar 2015 00:56:03 +0000 (16:56 -0800)]
MODULES-1827 adding Cumulus Linux detection
the apt module did not correctly detect Cumulus Linux with lsbdistid.
This change adds several lines in params.pp to detect Cumulus Linux and
set $distid and $distcodename
Morgan Haskel [Fri, 6 Mar 2015 00:49:23 +0000 (16:49 -0800)]
Merge pull request #452 from puppetlabs/daenney/rename-trusted-source
apt::source: Rename `trusted_source`.
Daniele Sluijters [Thu, 5 Mar 2015 19:23:38 +0000 (20:23 +0100)]
apt::source: Rename `trusted_source`.
It is weird that `trusted_source` would default to `false` as that would
imply that we normally don't trust our sources. This is opposite to the
truth, by default we trust them but only if the Releases file can be
verified (meaning it is signed by a GPG key known to apt).
What we were telling apt is that it should trust this source even if the
Releases file and the repository is unsigned. This is better captured
with `allow_unsigned` and better highlights the danger of what you're
doing, installing packages from a source we cannot authenticate.
Morgan Haskel [Thu, 5 Mar 2015 19:10:20 +0000 (11:10 -0800)]
Merge pull request #451 from puppetlabs/daenney/consolidate-include
apt::source: Merge `include_*` options into hash.
Daniele Sluijters [Thu, 5 Mar 2015 16:37:51 +0000 (17:37 +0100)]
apt::source: Merge `include_*` options into hash.
This makes its behaviour similar to the `update`, `proxy` and `purge`
hashes on the main classes bringing its API more in line with the rest
of the module.
Morgan Haskel [Tue, 3 Mar 2015 17:38:29 +0000 (09:38 -0800)]
Merge pull request #450 from puppetlabs/daenney/guard-lsb-facts
apt::params: Complete $xfacts.
Daniele Sluijters [Tue, 3 Mar 2015 17:07:48 +0000 (18:07 +0100)]
apt::params: Complete $xfacts.
`$xfacts` now contains and guards all `lsb*` facts. Looking up any
`lsb*`-related fact should now always be done through `$::apt::xfacts`
to ensure that the values are always set to either the value of the fact
or undef. This avoids all sorts of kerfuffles with strict variables.
Morgan Haskel [Tue, 3 Mar 2015 16:54:27 +0000 (08:54 -0800)]
Merge pull request #449 from puppetlabs/daenney/fix-strict-vars
apt: Fix all strict variable cases.
Daniele Sluijters [Mon, 2 Mar 2015 21:40:06 +0000 (22:40 +0100)]
apt: Fix all strict variable cases.
A few of these fixes are absolutely horrendous but we have no choice as
we need to stay current- and future-parser compatible for now.
Once we can go Puppet 4 only we can use the `$facts` hash lookup instead
which will return undef/nil for things that aren't set instead of them
not being defined at all.
Morgan Haskel [Mon, 2 Mar 2015 19:53:53 +0000 (11:53 -0800)]
Merge pull request #448 from puppetlabs/daenney/kill-file-perms
apt::setting: Remove file_perms.
Daniele Sluijters [Mon, 2 Mar 2015 19:37:01 +0000 (20:37 +0100)]
apt::setting: Remove file_perms.
This was a great idea but is pretty pointless. It's also not being used
by anything and not exposed as a switch on the main class so it would
almost never affect any behaviour.
Morgan Haskel [Mon, 2 Mar 2015 18:10:37 +0000 (10:10 -0800)]
Merge pull request #447 from puppetlabs/daenney/hulk-smash-2
It's been a long time - how have you been
Daniele Sluijters [Sun, 1 Mar 2015 13:42:39 +0000 (14:42 +0100)]
apt::key: Be explicit about the keyserver.
The behaviour of passing down undef through multiple layers gets fuzzy
so for now be explicit about the keyserver.
Once Puppet 4 is out and this behaviour has been crystallised and tested
we can revisit it.
Daniele Sluijters [Sun, 1 Mar 2015 13:18:48 +0000 (14:18 +0100)]
apt::key: Rename $key to $id to match apt_key.
Daniele Sluijters [Sat, 28 Feb 2015 17:02:23 +0000 (18:02 +0100)]
apt::source: Allow passing in a complex key.
Turn `$key` into something that accepts a string or a hash of four keys
representing the different options that can be passed on to `apt::key`.
Daniele Sluijters [Sat, 28 Feb 2015 16:35:25 +0000 (17:35 +0100)]
apt(::key|_key) Remove the `key.*_` prefixes.
Remove a lot of the redundant `key_` prefixes on `apt::key` and the
`keyserver_` prefix on `apt_key`.
Daniele Sluijters [Sat, 28 Feb 2015 16:04:47 +0000 (17:04 +0100)]
apt: Add settings, keys and ppas.
* Allow any configuration of apt to be done through data bindings by
passing in hashes representing the resources.
* Switch apt::ppa to use `distid` as set in `apt::params. This makes
`apt::ppa` also work for LinuxMint.
Daniele Sluijters [Sat, 28 Feb 2015 15:48:48 +0000 (16:48 +0100)]
apt: Change how update is managed.
* Instead of having 4 options controlling purging we now have a single
hash with four possible keys.
* Include `apt::update` only _after_ we've assembled the `$_update`
hash.
Daniele Sluijters [Sat, 28 Feb 2015 15:12:47 +0000 (16:12 +0100)]
apt: Change how purging is managed.
* Instead of having 4 options controlling purging we now have a single
hash with four possible keys.
* We purge everything by default.
* `/etc/apt/preferences` is now always managed.
* Add missing `mode` to some of the files.
Morgan Haskel [Fri, 27 Feb 2015 21:09:07 +0000 (13:09 -0800)]
Merge pull request #446 from puppetlabs/daenney/apt-proxy
apt: Add proxy support on the class.
Daniele Sluijters [Fri, 27 Feb 2015 11:34:05 +0000 (12:34 +0100)]
apt: Add proxy support on the class.
Re-introduce proxy support at the class level. Needing to configure a
proxy is such a common scenario that having it on the class is a
reasonable thing. It also affects `apt::ppa`.
Change `apt::ppa` to no longer have its own `proxy` parameter but use
the proxy as configured on the main `apt` class.
Daniele Sluijters [Fri, 27 Feb 2015 11:07:56 +0000 (12:07 +0100)]
spec/(apt|ppa): Enough with all the strings.
Most options can and should be named through symbols, makes it much
easier to read too with syntax highlighting.
Daniele Sluijters [Fri, 27 Feb 2015 08:01:38 +0000 (09:01 +0100)]
Merge pull request #445 from mhaskel/updates_everywhere
Make apt::setting notify Exec['apt_update'] by default
Morgan Haskel [Thu, 26 Feb 2015 20:44:06 +0000 (12:44 -0800)]
Make apt::setting notify Exec['apt_update'] by default
Can be disabled by setting `notify_update => false`
Morgan Haskel [Thu, 26 Feb 2015 19:27:38 +0000 (11:27 -0800)]
Merge pull request #444 from puppetlabs/daenney/parse-setting-from-name
apt::setting: Parse type and name from title.
Daniele Sluijters [Thu, 26 Feb 2015 18:12:53 +0000 (19:12 +0100)]
apt::setting: Parse type and name from title.
Instead of having two additional parameters, `base_name` and
`setting_type` simply parse it from `title`.
We need to prefix most resources with `list-`, `conf-`, or `pref-` any
way to avoid duplicate resources so we might as well leverage that.
Daniele Sluijters [Thu, 26 Feb 2015 17:00:17 +0000 (18:00 +0100)]
Merge pull request #443 from mhaskel/proxy_updates
proxy_* params were removed from class apt
Daniele Sluijters [Thu, 26 Feb 2015 17:00:02 +0000 (18:00 +0100)]
Merge pull request #441 from mhaskel/use_setting
Convert to use apt::setting instead of file resource
Morgan Haskel [Tue, 24 Feb 2015 22:57:31 +0000 (14:57 -0800)]
Convert to use apt::setting instead of file resources
This adds consistency across the module
Morgan Haskel [Wed, 25 Feb 2015 01:03:50 +0000 (17:03 -0800)]
proxy_* params were removed from class apt
Add them to PPA since they were being used there, and add a placeholder
example for setting up the proxy files.
Daniele Sluijters [Wed, 25 Feb 2015 17:22:37 +0000 (18:22 +0100)]
Merge pull request #442 from mhaskel/add_base_name
Add base_name parameter to apt::setting
Daniele Sluijters [Wed, 25 Feb 2015 17:22:04 +0000 (18:22 +0100)]
Merge pull request #440 from mhaskel/fix_setting_validation
Allow priorities to be zero-padded
Morgan Haskel [Tue, 24 Feb 2015 23:51:41 +0000 (15:51 -0800)]
Add base_name parameter to apt::setting
This allows you to work around duplicate resource issues when you have
settings of different types with the same name. When the files are built
it is path/${priority}${base_name}${extension}.
Morgan Haskel [Tue, 24 Feb 2015 21:53:25 +0000 (13:53 -0800)]
Allow priorities to be zero-padded
Daniele Sluijters [Wed, 25 Feb 2015 07:45:30 +0000 (08:45 +0100)]
Merge pull request #439 from mhaskel/rspec3
Convert specs to RSpec 3.1.7 syntax with Transpec
Morgan Haskel [Wed, 25 Feb 2015 00:14:23 +0000 (16:14 -0800)]
Merge pull request #438 from puppetlabs/daenney/cant-touch-params-nanananana
apt::params: Make the class private.
Morgan Haskel [Tue, 24 Feb 2015 21:20:29 +0000 (13:20 -0800)]
Convert specs to RSpec 3.1.7 syntax with Transpec
This conversion is done by Transpec 3.0.8 with the following command:
transpec spec/classes spec/defines spec/unit
* 87 conversions
from: it { should ... }
to: it { is_expected.to ... }
* 14 conversions
from: obj.should
to: expect(obj).to
* 7 conversions
from: == expected
to: eq(expected)
* 1 conversion
from: it { should_not ... }
to: it { is_expected.not_to ... }
For more details: https://github.com/yujinakayama/transpec#supported-conversions