From: Raoul Bhatia Date: Fri, 24 Oct 2014 10:29:48 +0000 (+0200) Subject: Add "oldstable" to the default update origins for wheezy X-Git-Tag: 1.8.0~36^2~2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=7f3acf40f99a618b714c629ff695770e91e12d6f;p=puppet-modules%2Fpuppetlabs-apt.git 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 --- diff --git a/manifests/params.pp b/manifests/params.pp index d33a401..06925a3 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -45,7 +45,8 @@ class apt::params { 'wheezy': { $backports_location = 'http://ftp.debian.org/debian/' $legacy_origin = false - $origins = ['origin=Debian,archive=stable,label=Debian-Security'] + $origins = ['origin=Debian,archive=stable,label=Debian-Security', + 'origin=Debian,archive=oldstable,label=Debian-Security'] } default: { $backports_location = 'http://http.debian.net/debian/' diff --git a/spec/classes/unattended_upgrades_spec.rb b/spec/classes/unattended_upgrades_spec.rb index 57df21c..3742bf1 100644 --- a/spec/classes/unattended_upgrades_spec.rb +++ b/spec/classes/unattended_upgrades_spec.rb @@ -134,6 +134,17 @@ describe 'apt::unattended_upgrades', :type => :class do it { is_expected.to_not contain_file("/etc/apt/apt.conf.d/10periodic").with_content %r{APT::Periodic::RandomSleep}} end + context 'wheezy' do + let :facts do + { + 'lsbdistid' => 'debian', + 'lsbdistcodename' => 'wheezy', + } + end + + it { is_expected.to contain_file("/etc/apt/apt.conf.d/50unattended-upgrades").with_content %r{Unattended-Upgrade::Origins-Pattern \{\n\t"origin=Debian,archive=stable,label=Debian-Security";\n\t"origin=Debian,archive=oldstable,label=Debian-Security";\n\};} } + end + context 'anything but defaults' do let :facts do {