]> review.fuel-infra Code Review - puppet-modules/puppetlabs-apt.git/commitdiff
Add "oldstable" to the default update origins for wheezy
authorRaoul Bhatia <raoul@bhatia.at>
Fri, 24 Oct 2014 10:29:48 +0000 (12:29 +0200)
committerRaoul Bhatia <raoul@bhatia.at>
Fri, 24 Oct 2014 10:50:43 +0000 (12:50 +0200)
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

manifests/params.pp
spec/classes/unattended_upgrades_spec.rb

index d33a401fe6df214ff93c85bccb83635ed7e27e1b..06925a341b34ede9084d6fd48c2093ffdba3e045 100644 (file)
@@ -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/'
index 57df21cbdfa3a2750ab38d167cf20393fd919d08..3742bf1c2add1dd9206ae849d4b6a797210b91ed 100644 (file)
@@ -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
       {