From 7f3acf40f99a618b714c629ff695770e91e12d6f Mon Sep 17 00:00:00 2001 From: Raoul Bhatia Date: Fri, 24 Oct 2014 12:29:48 +0200 Subject: [PATCH 1/3] 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 d33a401fe6..06925a341b 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -45,7 +45,8 @@ '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 57df21cbdf..3742bf1c2a 100644 --- a/spec/classes/unattended_upgrades_spec.rb +++ b/spec/classes/unattended_upgrades_spec.rb @@ -134,6 +134,17 @@ 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 { From fb9b9185e4754f120046fc43a184a2b2c43d60dc Mon Sep 17 00:00:00 2001 From: Raoul Bhatia Date: Fri, 24 Oct 2014 12:37:46 +0200 Subject: [PATCH 2/3] Fix "WARNING: indentation of => is not properly aligned on line 9" --- manifests/builddep.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/builddep.pp b/manifests/builddep.pp index 3beadeb373..3a059c273d 100644 --- a/manifests/builddep.pp +++ b/manifests/builddep.pp @@ -6,7 +6,7 @@ exec { "apt-builddep-${name}": command => "/usr/bin/apt-get -y --force-yes build-dep ${name}", logoutput => 'on_failure', - require => Exec['apt_update'], + require => Exec['apt_update'], } # Need anchor to provide containment for dependencies. From 15fad7ec118d93edab7f2eb8beaa641b9485f266 Mon Sep 17 00:00:00 2001 From: Raoul Bhatia Date: Fri, 24 Oct 2014 12:59:15 +0200 Subject: [PATCH 3/3] Fix "WARNING: case statement without a default case on line ..." --- manifests/force.pp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/manifests/force.pp b/manifests/force.pp index a73f7ab218..7524981da2 100644 --- a/manifests/force.pp +++ b/manifests/force.pp @@ -25,15 +25,15 @@ } case $cfg_files { - 'new': { $config_files = '-o Dpkg::Options::="--force-confnew"' } - 'old': { $config_files = '-o Dpkg::Options::="--force-confold"' } - 'unchanged': { $config_files = '-o Dpkg::Options::="--force-confdef"' } - 'none': { $config_files = '' } + 'new': { $config_files = '-o Dpkg::Options::="--force-confnew"' } + 'old': { $config_files = '-o Dpkg::Options::="--force-confold"' } + 'unchanged': { $config_files = '-o Dpkg::Options::="--force-confdef"' } + 'none', default: { $config_files = '' } } case $cfg_missing { - true: { $config_missing = '-o Dpkg::Options::="--force-confmiss"' } - false: { $config_missing = '' } + true: { $config_missing = '-o Dpkg::Options::="--force-confmiss"' } + false, default: { $config_missing = '' } } if $version == false {