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. 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 { 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 {