From 994934798031c0f91e8628edee7b848d0444c57e Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Sun, 2 Jul 2017 01:58:34 -0400 Subject: Deploy forgotten fallback for debian to avoid upgrade mishaps During the change from the monolithic preferences file to the series of snippets in preferences.d, one part was left out possibly as an oversight, which prevents installing packages by mistake that belong to a release that hasn't been explicitely pinned. --- files/Debian/preferences_fallback | 7 +++++++ manifests/preferences.pp | 11 +++++++++++ templates/Debian/fallback.erb | 7 ------- 3 files changed, 18 insertions(+), 7 deletions(-) create mode 100644 files/Debian/preferences_fallback delete mode 100644 templates/Debian/fallback.erb diff --git a/files/Debian/preferences_fallback b/files/Debian/preferences_fallback new file mode 100644 index 0000000..1c75e83 --- /dev/null +++ b/files/Debian/preferences_fallback @@ -0,0 +1,7 @@ +# This file is managed by puppet +# all local modifications will be overwritten + +Explanation: Debian fallback +Package: * +Pin: release o=Debian +Pin-Priority: -10 diff --git a/manifests/preferences.pp b/manifests/preferences.pp index d2f6ab4..04a09b0 100644 --- a/manifests/preferences.pp +++ b/manifests/preferences.pp @@ -49,6 +49,17 @@ class apt::preferences { '/etc/apt/preferences.d/custom': ensure => absent; } + # This file ensures that all debian packages that don't have a + # preference file shouldn't be considered for auto-install or upgrade at + # all. + file { '/etc/apt/preferences.d/debian_fallback': + ensure => present, + source => 'puppet:///modules/apt/Debian/preferences_fallback', + owner => 'root', + group => 0, + mode => '0644', + require => File['/etc/apt/sources.list'], + } if $apt::use_volatile { diff --git a/templates/Debian/fallback.erb b/templates/Debian/fallback.erb deleted file mode 100644 index 1c75e83..0000000 --- a/templates/Debian/fallback.erb +++ /dev/null @@ -1,7 +0,0 @@ -# This file is managed by puppet -# all local modifications will be overwritten - -Explanation: Debian fallback -Package: * -Pin: release o=Debian -Pin-Priority: -10 -- cgit v1.2.3