From: Tom Hughes Date: Sun, 2 Nov 2014 08:40:08 +0000 (+0000) Subject: Use old-releases.ubuntu.com for quantal machines X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/84e42632189359364d16a936dfceaa86fa032d36 Use old-releases.ubuntu.com for quantal machines --- diff --git a/cookbooks/apt/recipes/default.rb b/cookbooks/apt/recipes/default.rb index c4cd3acc3..792ce6aa3 100644 --- a/cookbooks/apt/recipes/default.rb +++ b/cookbooks/apt/recipes/default.rb @@ -29,8 +29,13 @@ execute "apt-update" do command "/usr/bin/apt-get update" end +sources_template = case node[:lsb][:release].to_f + when 12.10 then "old-sources.list.erb" + else "sources.list.erb" +end + template "/etc/apt/sources.list" do - source "sources.list.erb" + source sources_template owner "root" group "root" mode 0644 diff --git a/cookbooks/apt/templates/default/old-sources.list.erb b/cookbooks/apt/templates/default/old-sources.list.erb new file mode 100644 index 000000000..8839edc4a --- /dev/null +++ b/cookbooks/apt/templates/default/old-sources.list.erb @@ -0,0 +1,51 @@ +# DO NOT EDIT - This file is being maintained by Chef + +deb http://old-releases.ubuntu.com/ubuntu/ <%= node.lsb.codename %> main restricted +deb-src http://old-releases.ubuntu.com/ubuntu/ <%= node.lsb.codename %> main restricted + +## Major bug fix updates produced after the final release of the +## distribution. +deb http://old-releases.ubuntu.com/ubuntu/ <%= node.lsb.codename %>-updates main restricted +deb-src http://old-releases.ubuntu.com/ubuntu/ <%= node.lsb.codename %>-updates main restricted + +## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu +## team. Also, please note that software in universe WILL NOT receive any +## review or updates from the Ubuntu security team. +deb http://old-releases.ubuntu.com/ubuntu/ <%= node.lsb.codename %> universe +deb-src http://old-releases.ubuntu.com/ubuntu/ <%= node.lsb.codename %> universe +deb http://old-releases.ubuntu.com/ubuntu/ <%= node.lsb.codename %>-updates universe +deb-src http://old-releases.ubuntu.com/ubuntu/ <%= node.lsb.codename %>-updates universe + +## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu +## team, and may not be under a free licence. Please satisfy yourself as to +## your rights to use the software. Also, please note that software in +## multiverse WILL NOT receive any review or updates from the Ubuntu +## security team. +deb http://old-releases.ubuntu.com/ubuntu/ <%= node.lsb.codename %> multiverse +deb-src http://old-releases.ubuntu.com/ubuntu/ <%= node.lsb.codename %> multiverse +deb http://old-releases.ubuntu.com/ubuntu/ <%= node.lsb.codename %>-updates multiverse +deb-src http://old-releases.ubuntu.com/ubuntu/ <%= node.lsb.codename %>-updates multiverse + +## Uncomment the following two lines to add software from the 'backports' +## repository. +## N.B. software from this repository may not have been tested as +## extensively as that contained in the main release, although it includes +## newer versions of some applications which may provide useful features. +## Also, please note that software in backports WILL NOT receive any review +## or updates from the Ubuntu security team. +deb http://old-releases.ubuntu.com/ubuntu/ <%= node.lsb.codename %>-backports main restricted universe multiverse +deb-src http://old-releases.ubuntu.com/ubuntu/ <%= node.lsb.codename %>-backports main restricted universe multiverse + +## Uncomment the following two lines to add software from Canonical's +## 'partner' repository. This software is not part of Ubuntu, but is +## offered by Canonical and the respective vendors as a service to Ubuntu +## users. +# deb http://archive.canonical.com/ubuntu <%= node.lsb.codename %> partner +# deb-src http://archive.canonical.com/ubuntu <%= node.lsb.codename %> partner + +deb http://old-releases.ubuntu.com/ubuntu <%= node.lsb.codename %>-security main restricted +deb-src http://old-releases.ubuntu.com/ubuntu <%= node.lsb.codename %>-security main restricted +deb http://old-releases.ubuntu.com/ubuntu <%= node.lsb.codename %>-security universe +deb-src http://old-releases.ubuntu.com/ubuntu <%= node.lsb.codename %>-security universe +deb http://old-releases.ubuntu.com/ubuntu <%= node.lsb.codename %>-security multiverse +deb-src http://old-releases.ubuntu.com/ubuntu <%= node.lsb.codename %>-security multiverse