Commit graph

237 commits

Author SHA1 Message Date
intrigeri
e19b574e23 Starting from Squeeze, Debian Volatile is deprecated in favor of CODENAME-updates.
Take this into account in the Debian sources.list template:
  - go on using volatile.d.o for <= Lenny sources lines
  - start using CODENAME-updates for Squeeze and newer.

Reference: http://lists.debian.org/debian-volatile/2011/01/msg00008.html
2011-02-07 11:17:07 +01:00
intrigeri
f362f05995 Update debian_release function since Squeeze has been released. 2011-02-06 08:56:54 +01:00
intrigeri
d76f922dfb Make sources snippets world-readable.
Not doing this breaks big parts of functionality, such as aptitude why.
2011-01-08 19:39:10 +01:00
Micah Anderson
c5dc8ff5fc add -q to the apt-get invocation in upgrade_package.pp, also switch to using -y instead of --force-yes. this way we are acting in the same way as the dist_upgrade class 2010-12-18 15:47:11 -05:00
Micah Anderson
5fdadb955d switch aptitude to apt-get, since aptitude will sometimes automatically do things that are unrelated to the task at hand, such as deinstalling automatically installed packages, which can be undesirable behavior 2010-12-18 14:01:11 -05:00
intrigeri
575e4ab9cc Fix apt::upgrade_package when used multiple times. 2010-12-16 18:14:23 +01:00
intrigeri
bbe2c8aee9 New class: apt::dist_upgrade::initiator.
This implements the "update initiator" pattern suggested by
http://projects.puppetlabs.com/projects/puppet/wiki/Debian_Patterns.

This feature is useful when one does not want to setup a fully automated upgrade
process but still needs a way to manually trigger full upgrades of any number of
systems at scheduled times.
2010-12-16 13:03:08 +01:00
intrigeri
4765a02564 New class: apt::dist_upgrade. 2010-12-16 13:02:28 +01:00
intrigeri
c0377ca737 Apply fix from 67dc9a22 to Squeeze template as well. 2010-12-15 22:20:08 +01:00
intrigeri
2d4f6d3522 Fix 5237f9da. 2010-12-15 22:11:34 +01:00
intrigeri
7ffedbad6b Merge remote branch 'riseup/master' 2010-12-15 22:01:34 +01:00
Micah Anderson
67dc9a2259 fix apticron template 2010-12-15 15:46:20 -05:00
Micah Anderson
5237f9dab0 change $listchanges_* to $apt_listchanges, not nice to clutter up the namespace like that 2010-12-15 14:49:34 -05:00
intrigeri
75cf15b7c7 Fix packages dependency. 2010-12-15 15:18:16 +01:00
intrigeri
a084ac642c Use line define instead of append_if_no_such_line.
The latter is only a wrapper around the former and it seems we want to remove
the latter from our shared common module.
2010-12-15 10:44:14 +01:00
intrigeri
a06bf5f71b apt::upgrade_package: explicitly depend on needed packages.
This define was previously broken unless dctrl-tools and apt-show-versions were
installed.
2010-12-15 10:00:47 +01:00
intrigeri
af8ecf1e9f Repair Exec['update_apt'] to run apt-get update when needed.
Move this Exec to a dedicated class that is not included by default i.e. we
default not to "apt-get update" on every Puppet run.

We now make use of this class in the apt::upgrade_package define to make sure
APT indexes are up-to-date before attempting package upgrades.

One may now use the following to ensure current packages are installed by
Package resources:

  include apt::update
  Package { require => Exec[apt_updated] }
2010-12-15 09:47:57 +01:00
intrigeri
4979889584 (ugly workaround warning) Update packages lists before upgrading a package.
... because Exec[update_apt] is currently never run since we set it refreshonly.
Better solutions are being thought of, but in the meantime the least we can do
is somehow repair apt::upgrade_package.
2010-12-14 22:04:05 +01:00
intrigeri
1ae3fdfeb5 Make consistent the use of absolute path to apt-get. 2010-12-14 21:56:36 +01:00
intrigeri
5846da98ce Factorize. 2010-12-14 21:39:50 +01:00
intrigeri
4625afacae apt::reboot_required_notify: take into account the random sleep time. 2010-12-13 10:08:47 +01:00
intrigeri
4195a91773 Merge remote branch 'riseup/master' 2010-12-13 09:54:37 +01:00
Micah Anderson
f855a5a0ad switch default frontend to 'mail' instead of pager, as most things are done non-interactively 2010-12-12 21:41:21 -05:00
intrigeri
4103a27054 Additionally use version number in Lenny default pinning.
Lenny's APT does not support pinning like this:

  Pin: release o=Debian,n=<%= codename %>

We therefore switched (in commit ef2ebdffd) to:

  Pin: release o=Debian,a=<%= release %>

With such a pinning setup, when Squeeze is released, systems using this module
with $apt_use_next_release set to true would immediately switch to prefer
packages from Squeeze. If an automated upgrade process is setup, they would be
automatically upgraded to Squeeze.

This does not sound safe to me, so let's use the release version number as an
additional selection criterion to prevent upgrades to Squeeze to happen behind
our back:

  Pin: release o=Debian,a=<%= release %>,v=<%= release_version %>*

Note that the trailing '*' is intentional and necessary to match stable
point-releases.
2010-12-12 09:57:42 +01:00
intrigeri
248d7e46ff Bypass default APT proxy to access bugs.debian.org.
This is needed when using apt-listbugs with an APT proxy that only {wants,can}
proxy "normal" APT traffic.
2010-12-11 19:58:19 +01:00
intrigeri
fad111e036 Allow running cron-apt more than once a day. 2010-12-11 15:17:41 +01:00
intrigeri
874da52745 New class: apt::reboot_required_notify
This class installs a daily cronjob that checks if a package upgrade
requires the system to be rebooted; if so, cron sends a notification
email to root.
2010-12-11 14:50:16 +01:00
intrigeri
b467cda7f4 Fix formatting. 2010-12-11 14:46:29 +01:00
intrigeri
1cf642b3a8 Merge remote branch 'riseup/master' 2010-12-11 09:39:27 +01:00
intrigeri
5e94f0707c Update comment: Squeeze's unattended-upgrades 0.62 still does not support wildcards. 2010-12-11 09:30:51 +01:00
Micah Anderson
ab3a5294cf removed bit from README that is no longer true 2010-12-09 09:51:00 -05:00
Micah Anderson
c67abe8d16 fix compile syntax error in ubuntu sources.list, closes #2639 2010-12-09 09:48:38 -05:00
Micah Anderson
9223dfc186 Merge remote branch 'lelutin/master' 2010-12-09 09:44:00 -05:00
Micah Anderson
d61a64b394 fix syntax error 2010-12-08 22:32:00 -05:00
Micah Anderson
d32573ae83 fix template missing <%- end -%> 2010-12-08 22:29:45 -05:00
Micah Anderson
8944374bf2 fix confusion over lsbrelease / lsbdistcodename 2010-12-08 22:27:13 -05:00
Micah Anderson
13bf7d0623 add apt-listchanges support. this is a nice compliment to using the upgrade_package functionality, because you get an email when the package has been upgraded. 2010-12-08 22:25:09 -05:00
Micah Anderson
fbb291ed19 add apticron support.
Why apticron, when we have cron-apt already? Some people have different preferences, we use apticron along with the upgrade_package functionality in this module. I know someone who uses cron-apt to run the upgrades, but apticron for notifications, because apticron's notifications are much nicer (cron-apt just gives you the output of apt-get upgrade)
2010-12-08 22:24:24 -05:00
Micah Anderson
d9ccf2a99b provide an "03clean" alias for the 03clean_vserver to satisfy dependencies 2010-12-08 09:57:02 -05:00
Micah Anderson
72bb7b5ccb fix typo 2010-12-08 00:02:15 -05:00
Micah Anderson
36c4873f87 multiple sources for templates are not allowed (see #1818), so revert it to a single source referenced by the README, and clarify the README to indicate how you can pass the preseed contents directly 2010-12-07 23:57:25 -05:00
Micah Anderson
ee21742cf8 change the name of the custom_keys exec to be "custom_keys" instead of using the alias metaparameter.
the reason for this change was because the Exec override was not able to find the exec through its alias
2010-12-07 23:06:11 -05:00
Micah Anderson
dd0552dce1 update apt::preseeded_package template sources to use $lsbdistcodename instead of $debian_release, also expand it to allow for site-apt sources 2010-12-07 23:04:46 -05:00
Micah Anderson
ef2ebdffd2 switch to archive name for lenny default preferences
the templates/Debian/preferences_lenny.erb file checked in with
e2f80db7b7 contains pinning based on codename,
which is not supported in lenny (see #433624 - if you look at the version graph,
you see, "Fixed in version 0.7.21", and lenny has 0.7.20.2+lenny1.)
2010-12-07 22:59:58 -05:00
Micah Anderson
1c1ed0e352 README update: minor typo fix 2010-12-07 13:53:01 -05:00
Micah Anderson
b59bdb0a89 README update: clarify that the debian-archive-keyring is managed already
Just so people are clear that they do not need to specify a $custom_key_dir to manage the debian archive keyring, I've added some clarifying text so you know that this is not necessary
2010-12-07 13:44:30 -05:00
Micah Anderson
7e1a187f24 README update: clarify the site-apt preferences options
The README described a few things that were not true relating to the
apt/preferences file.

First of all it said you could ship a 'file', but preferences.pp very clearly
uses the 'content => $custom_preferences' parameter, which will not take file
sources, only templates.

Secondly, it seemed to imply that you could just drop the custom preferences
into your site-apt and it would work. But you actually need to set the
$custom_preferences to indicate the content source.

Lastly, it said that you could specify a host-specific file in the site-apt
module, but there is no facility for this (nor can you use files).

Perhaps this is where this module is going eventually, once we have a
preferences.d possibility? Until then, it makes more sense to have it reflect
the current situation.
2010-12-07 13:39:54 -05:00
Micah Anderson
e15283b781 format standardization 2010-12-07 13:18:41 -05:00
Micah Anderson
bb03c32b45 switch the default $debian_url to use the Debian CDN mirror address.
The CDN checks your IP and uses the Max-Mind geoIP DB to determine your location and then uses your local country Debian Mirror, or if your local country doesn't have a debian mirror, it uses the local continent. It automatically checks and prunes dead mirrors. the technology for the Debian CDN setup is still improving, I believe that ASN-number associations are the next step to attempt to make more informed, finer-grained choices.

This is more useful than using ftp.debian.org because that is just a round-robin DNS entry that could get you any mirror anywhere.
2010-12-07 12:46:37 -05:00
Micah Anderson
2ee70ab5e0 Set dselect DSelect::Clean to 'pre-auto' by default for hosts that are vservers.
Before you only had the choice of setting a 03clean apt configuration for either
all hosts, or every single host. Setting it to have the recommended settings for
vservers for all hosts meant that you were setting it for non-vservers as well
as vservers. The other option you had was to set it per host. This was a bit
annoying if you have any more than one vserver because you would need to create
a 03clean for every single vserver guest.

This change auto-detects if the node is a vserver, and if it is it automatically
installs the 03clean_vserver file, with the recommended DSelect::Clean settings,
and allows you to override this for all of your vservers, or for specific hosts.
2010-12-07 12:20:14 -05:00