From 7f3acf40f99a618b714c629ff695770e91e12d6f Mon Sep 17 00:00:00 2001 From: Raoul Bhatia Date: Fri, 24 Oct 2014 12:29:48 +0200 Subject: [PATCH] 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 --- manifests/params.pp | 3 ++- spec/classes/unattended_upgrades_spec.rb | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) 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 { -- 2.45.2