Commit graph

211 commits

Author SHA1 Message Date
tphoney
f588f2651a 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
2015-03-12 18:25:26 +00:00
Colleen Murphy
e05810d032 Update spec tests for future parser
Strings must be quoted in the future parser.
2015-02-12 12:24:02 -08:00
Stefan Dietrich
443db5a7c2 (MODULES-1200) Fix inconsistent header across files 2015-02-06 21:16:05 +01:00
Morgan Haskel
2415f23fca Merge pull request #398 from irconan/backports-pin
Separate apt::pin for apt::backports to allow pin by release instead of ...
2015-01-28 08:36:01 -08:00
Richard Connon
64f9c76a49 Separate apt::pin for apt::backports to allow pin by release instead of origin
Updated tests for backports
2015-01-28 12:34:18 +00:00
Morgan Haskel
3d25c08ec1 Trusted will be a reserved word in Puppet 4
Rename the new `trusted` parameter to `trusted_source`.
2015-01-21 10:54:37 -08:00
Merritt Krakowitzer
4f0ebaced7 Merge branch 'master' of https://github.com/puppetlabs/puppetlabs-apt into f3792625/trusted_param 2015-01-20 21:27:52 +02:00
WolverineFan
e7fee16589 Fix apt_has_updates fact not parsing apt-check output correctly
The /usr/lib/update-notifier/apt-check script returns its output
to STDERR but a recent change to the script redirects STDERR to
/dev/null.  This will cause the array to always be empty.

Combined with that problem, while we were checking for the result
being nil, we never checked for an invalid array.  As a result,
the apt_has_updates was always true and the apt_updates and
apt_security_updates facts were trying to read from an empty array
and failing.
2015-01-16 17:45:55 -05:00
Travis Fields
f1ca76dec5 MODULES-1661 Fix issue with apt_key destroy, also added mutliple deletes 2015-01-13 17:40:18 -08:00
Merritt Krakowitzer
38582d02cd Add support for parameter trusted
* Add support for paramater trusted, valid options are 'true' and false.
defaults to false. True sets the value to trusted=yes.

trusted=yes can be set to indicate that packages from this source are
always authenticated even if the Release file is not signed or the
signature can't be checked.

* Update documentation
2015-01-13 17:41:20 +02:00
rfkrocktk
445ad0b6fe Allow full length GPG key fingerprints.
Also add support for ECC and ECDSA key_types
2015-01-10 00:45:57 -05:00
Simon Kohlmeyer
b0e0024730
Allow ports that consist of 5 decimals 2015-01-08 05:26:53 +01:00
Morgan Haskel
342b90f4cc Use puppet() instead of shell() to install module dependencies 2014-12-12 12:53:18 -08:00
Morgan Haskel
e5338f2e53 Merge remote-tracking branch 'upstream/1.6.x' into merge_1.6.x
Conflicts:
	lib/facter/apt_package_updates.rb
	lib/facter/apt_security_updates.rb
	lib/facter/apt_updates.rb
2014-11-21 11:59:04 -05:00
Travis Fields
559787268a MODULES-1119 Fixed to now have username and passwords passed in again 2014-11-20 20:57:40 -05:00
Daniele Sluijters
84340fda16 Merge pull request #376 from raoulbhatia/unattended-upgrades-oldstable
Unattended upgrades oldstable for wheezy
2014-11-13 19:23:07 +01:00
Morgan Haskel
2fdad79f74 Fix tests to reflect behavior fixed on 1.7.x
The facts don't really work with 2>&1 in the case of an error, so you
want 2>/dev/null instead.
2014-10-27 10:10:52 -04:00
Morgan Haskel
20ddb67714 Merge remote-tracking branch 'upstream/master' into 1.7.x-merge
Conflicts:
	lib/facter/apt_package_updates.rb
	lib/facter/apt_security_updates.rb
	lib/facter/apt_updates.rb
2014-10-27 09:57:46 -04:00
Travis Fields
bc7601dfed Fix issue with puppet_module_install, removed and using updated method from beaker core copy_module_to 2014-10-27 09:49:27 -04:00
Raoul Bhatia
7f3acf40f9 Add "oldstable" to the default update origins for wheezy
Add "oldstable" to the default update origins to ensure
the updates keep working after wheezy+1 gets released

See unattended-upgrades 0.79.5+wheezy1 and https://bugs.debian.org/711826
2014-10-24 12:50:43 +02:00
Daniele Sluijters
5d96da0c6a Merge pull request #375 from raphink/dev/facts_perfs
Refactor facts to improve performance.
2014-10-16 10:07:25 +02:00
Raphaël Pinson
d090ae4ebb Refactor facts to improve performance:
* Add an apt_has_updates boolean fact
* Make other facts depend on it
2014-10-15 15:44:50 +02:00
Bryan M. Schlief
a6b560c9b4 Add support for RandomSleep to 10periodic 2014-10-13 14:19:11 -07:00
Morgan Haskel
c5edc86c3c add --force-yes so deb7 doesn't hang 2014-10-06 19:44:19 -04:00
Morgan Haskel
a3d4822920 apt-key doesn't add long keys in deb6
You can feed the command the long key, but it truncates it to add the
key. This causes issues due to the short-key collision with the
puppetlabs key. So, test with a different key on debian 6.
2014-10-02 17:21:46 -05:00
Morgan Haskel
febda27623 We aren't truncating in the type
So don't check for truncated IDs in the type test.
2014-10-01 13:46:14 -05:00
Morgan Haskel
87f3f1023c Don't truncate to short keys in the type
You should be able to create/delete keys using the long key to avoid
collisions, and truncating in the type makes that not work.
2014-10-01 13:40:25 -05:00
Wolf Noble
7a192d7bea - add bits for updating apt
- fix spec tests to include osfamily fact
- add spec tests to verify current default behavior unimpacted.
- manage the update-stamp file in puppet via content rather than a served file.
- update custom fact to return -1 if the file doesn't exist
- add spec test for custom fact
- refactor to use a variable vs a collector/override
- document parameters a bit more verbosely
- remove empty unconstrained fact
- Add osfamily fact to backports tests to facilitate functional tests on non-debian hosts
2014-09-24 16:29:27 -07:00
Daniele Sluijters
761a4d26c7 Fix a test that broke with #326. 2014-09-24 15:27:06 -07:00
Martin Seener
93567aef4a apt::force: Added 2 parameters for automatic configuration file handling; fixes #modules-1306
when updating or installing newer packages with apt::force and you have changed previous
configuration files aptitude or apt-get will prompt what to do. You can suppress that
by pre-define the action with cfg_files parameter (new, old or unchanged and its backward
compatible if not defined). With a second optional parameter cfg_missing you can force
your provider to install missing configuration files as well.

Signed-off-by: Martin Seener <martin@seener.de>

apt::force: Changed selectors used in force.pp to case statements; refs #module-1306

Signed-off-by: Martin Seener <martin@seener.de>

apt::force: rspec: fixed the failing tests and added validate_re for cfg_files and validate_bool for cfg_missing. Also removed default values for both case statements and only allow pre-defined values or true/false. Furthermore enhanced the README refs #module-1306

Was able to fix the failing rspec tests for the patch.
Thanks to Morgan Haskel.

Signed-off-by: Martin Seener <martin@seener.de>

Despite the puppetlabs-stdlib documentation says validation_re supports 3 arguments the tests failed telling that only 2 are supported. Fixed this by removing the 3 optional argument; refs #modules-1306

Signed-off-by: Martin Seener <martin.seener@barzahlen.de>

apt::force: updated readme refs #module-1306

Signed-off-by: Martin Seener <martin@seener.de>
2014-09-22 19:53:45 +02:00
Morgan Haskel
6540b7ba24 Merge branch '1.6.x' into test 2014-09-12 17:24:49 -04:00
Travis Fields
8fa73ac96f Fix issue with puppet_module_install, removed and using updated method from beaker core copy_module_to 2014-09-10 10:37:07 -07:00
Christophe Bliard
636cacd72c add support for LinuxMint operating system 2014-08-29 16:23:21 +02:00
Morgan Haskel
ae28193ce4 Only call install_* methods once 2014-08-28 11:16:09 -04:00
Morgan Haskel
442ca30870 Don't hardcode /etc/puppet as the puppetpath. 2014-08-12 16:10:36 -04:00
Morgan Haskel
c69fb2cd24 Clean up test failures 2014-08-12 13:45:37 -04:00
Morgan Haskel
5d7982dba0 Cleaned up unit tests. 2014-08-12 12:09:04 -04:00
Morgan Haskel
ce846d0118 Cleaned up acceptance tests
A lot of the tests were testing things that really should be tested via
unit tests, so those were deleted and unit tests will be revamped to
make sure they are covering everything they need to be covering.

Conflicts:
	spec/acceptance/unattended_upgrade_spec.rb
2014-08-12 12:09:04 -04:00
Morgan Haskel
08043adb75 Sometimes killing apt is too aggressive. 2014-08-12 12:09:04 -04:00
Morgan Haskel
d6bdb4d925 Cleaned up unit tests. 2014-08-04 19:44:19 -04:00
Morgan Haskel
4ed9cb5099 Cleaned up acceptance tests
A lot of the tests were testing things that really should be tested via
unit tests, so those were deleted and unit tests will be revamped to
make sure they are covering everything they need to be covering.
2014-08-04 19:20:07 -04:00
Morgan Haskel
e970aa9a6d Merge pull request #333 from wilman0/master
Fix for debian/ubuntu hold and a way to add debian src only
2014-07-31 12:58:20 -04:00
wilman0
538a9f9aab Update hold.pp
fix for default debian installations

all files in /etc/apt/preferences without _ will be silently ignore according to debian manpage. Addionally its not a good idea to write versionnumber in filename cause there is no way to delete this files if you increase versionumber

Update source_spec.rb

add a way to include debsrc only (useful for debian/ubuntu build server ... jenkins ect)

Update source_spec.rb

var rename

Update source.list.erb

add include_deb "switch"

Update source.pp

"include_deb" defaultvalue = true

Update hold_spec.rb

change the name of the preferences file (hold)

Update source_spec.rb

Update README.md

Doku: 'include_deb' included next to 'include_src' in examples

Update README.md

typo
2014-07-31 18:40:46 +02:00
Morgan Haskel
66e05edbe7 Debian seems to have hanging apt-get and/or dpkg processes, so kill
those.
2014-07-30 14:40:20 -04:00
Morgan Haskel
f02f9b8465 Fix broken acceptance tests.
New fact was added that matched a regex breaking the always_apt_update
tests.  Updated the tests to check for the apt_update exec, not just the
string apt_update.
2014-07-30 12:03:09 -04:00
Spencer Owen
64b8eb1e4a Adds check to params.pp if lab-release is not installed
Adds spec test

If lab-release is not installed, then the end user sees a confusing/ vague message
Error: Unsupported lsbdistid () at /modules/apt/manifests/params.pp:52
It is common for docker containers to not include this package by default

After fix, the user sees a friendlier message if lab-release is not installed
Error: Unable to determine lsbdistid, is lsb-release installed? at /modules/apt/manifests/params.pp:52
2014-07-10 11:48:54 -06:00
Ashley Penney
3c48598eeb Merge branch '1.5.x' into merge
Conflicts:
	Gemfile
	spec/acceptance/apt_key_provider_spec.rb
2014-07-03 13:08:11 -04:00
Daniele Sluijters
4ee69d08f4 Merge pull request #321 from raoulbhatia/squeeze-lts
Enable auto-update for Debian squeeze-lts
2014-06-27 17:41:50 +02:00
Daniele Sluijters
943be409bd Merge pull request #319 from cloudbuy/master
add facts showing available updates
2014-06-27 14:28:19 +02:00
Damien Churchill
7eb9d00360 add facts showing available updates
Making use of the apt-check command from the 'update-notifier-common'
package (if available) display the number of available updates, number of
security updates as well as the update package names.
2014-06-27 11:21:58 +01:00