summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README4
-rw-r--r--lib/puppet/parser/functions/debian_nextcodename.rb3
-rw-r--r--lib/puppet/parser/functions/debian_release.rb5
-rw-r--r--lib/puppet/parser/functions/debian_release_version.rb1
-rw-r--r--manifests/sources_list.pp2
-rw-r--r--manifests/upgrade_package.pp2
-rw-r--r--templates/Debian/preferences_squeeze.erb9
-rw-r--r--templates/Debian/sources.list.erb14
8 files changed, 31 insertions, 9 deletions
diff --git a/README b/README
index 61ffb1d..6489272 100644
--- a/README
+++ b/README
@@ -112,7 +112,9 @@ Here's an example of setting the proxy to 'http://proxy.domain' at port 666:
$apt_volatile_enabled
-----------------
-If this variable is set to true the Debian Volatile sources are added.
+If this variable is set to true the Debian Volatile sources (until
+Lenny) or CODENAME-updates (such as squeeze-updates, supported since
+Squeeze) are added.
By default this is false for backward compatibility with older
versions of this module.
diff --git a/lib/puppet/parser/functions/debian_nextcodename.rb b/lib/puppet/parser/functions/debian_nextcodename.rb
index 6bc4b6b..f57dd2a 100644
--- a/lib/puppet/parser/functions/debian_nextcodename.rb
+++ b/lib/puppet/parser/functions/debian_nextcodename.rb
@@ -3,7 +3,8 @@ module Puppet::Parser::Functions
case args[0]
when "etch" then "lenny"
when "lenny" then "squeeze"
- when "squeeze" then "sid"
+ when "squeeze" then "wheezy"
+ when "wheezy" then "sid"
when "sid" then "experimental"
else "sid"
end
diff --git a/lib/puppet/parser/functions/debian_release.rb b/lib/puppet/parser/functions/debian_release.rb
index 64feb66..857edf3 100644
--- a/lib/puppet/parser/functions/debian_release.rb
+++ b/lib/puppet/parser/functions/debian_release.rb
@@ -1,9 +1,8 @@
module Puppet::Parser::Functions
newfunction(:debian_release, :type => :rvalue) do |args|
case args[0]
- when 'etch' then 'oldstable'
- when 'lenny' then 'stable'
- when 'squeeze' then 'testing'
+ when 'lenny' then 'oldstable'
+ when 'squeeze' then 'stable'
when 'wheezy' then 'testing'
when 'sid' then 'unstable'
when 'experimental' then 'experimental'
diff --git a/lib/puppet/parser/functions/debian_release_version.rb b/lib/puppet/parser/functions/debian_release_version.rb
index 4b135d0..ff58f72 100644
--- a/lib/puppet/parser/functions/debian_release_version.rb
+++ b/lib/puppet/parser/functions/debian_release_version.rb
@@ -3,6 +3,7 @@ module Puppet::Parser::Functions
case args[0]
when 'etch' then '4.0'
when 'lenny' then '5.0'
+ when 'squeeze' then '6.0'
else ''
end
end
diff --git a/manifests/sources_list.pp b/manifests/sources_list.pp
index ff8f21a..86b35a7 100644
--- a/manifests/sources_list.pp
+++ b/manifests/sources_list.pp
@@ -13,7 +13,7 @@ define apt::sources_list (
file { "/etc/apt/sources.list.d/${name}":
ensure => $ensure,
- owner => root, group => 0, mode => 0600;
+ owner => root, group => 0, mode => 0644;
}
if $source {
diff --git a/manifests/upgrade_package.pp b/manifests/upgrade_package.pp
index 358bd9e..9202624 100644
--- a/manifests/upgrade_package.pp
+++ b/manifests/upgrade_package.pp
@@ -22,7 +22,7 @@ define apt::upgrade_package ($version = "") {
}
}
- exec { "aptitude -y install ${name}${version_suffix}":
+ exec { "apt-get -q -y -o 'DPkg::Options::=--force-confold' install ${name}${version_suffix}":
onlyif => [ "grep-status -F Status installed -a -P $name -q", "apt-show-versions -u $name | grep -q upgradeable" ],
require => [
Exec['apt_updated'],
diff --git a/templates/Debian/preferences_squeeze.erb b/templates/Debian/preferences_squeeze.erb
index f21562d..5e15d27 100644
--- a/templates/Debian/preferences_squeeze.erb
+++ b/templates/Debian/preferences_squeeze.erb
@@ -3,14 +3,19 @@ Package: *
Pin: release o=Debian,n=<%= codename %>
Pin-Priority: 990
+Explanation: Debian <%= codename %>-updates
+Package: *
+Pin: release o=Debian,n=<%= codename %>-updates
+Pin-Priority: 990
+
Explanation: Debian backports
Package: *
Pin: origin backports.debian.org
Pin-Priority: 200
-Explanation: Debian wheezy
+Explanation: Debian <%= next_codename %>
Package: *
-Pin: release o=Debian,n=wheezy
+Pin: release o=Debian,n=<%= next_codename %>
Pin-Priority: 2
Explanation: Debian sid
diff --git a/templates/Debian/sources.list.erb b/templates/Debian/sources.list.erb
index f2e8fd8..3a810e3 100644
--- a/templates/Debian/sources.list.erb
+++ b/templates/Debian/sources.list.erb
@@ -34,10 +34,17 @@ deb-src <%= backports_url %> <%= codename %>-backports <%= repos %>
<% if (release == "testing" || release == "unstable" || release == "experimental") -%>
# There is no volatile archive for <%= release %>
<% else -%>
+<% if (codename == "lenny" || codename == "etch") -%>
deb <%= volatile_url %> <%= codename %>/volatile <%= repos %>
<% if include_src then -%>
deb-src <%= volatile_url %> <%= codename %>/volatile <%= repos %>
<% end -%>
+<% else -%>
+deb <%= debian_url %> <%= codename %>-updates <%= repos %>
+<% if include_src then -%>
+deb-src <%= debian_url %> <%= codename %>-updates <%= repos %>
+<% end -%>
+<% end -%>
<% end -%>
<% end -%>
@@ -75,10 +82,17 @@ deb-src <%= backports_url %> <%= next_codename %>-backports <%= repos %>
<% if (next_release == "testing" || next_release == "unstable" || next_release == "experimental") -%>
# There is no volatile archive for <%= next_release %>
<% else -%>
+<% if (next_codename == "lenny" || next_codename == "etch") -%>
deb <%= volatile_url %> <%= next_codename %>/volatile <%= repos %>
<% if include_src then -%>
deb-src <%= volatile_url %> <%= next_codename %>/volatile <%= repos %>
<% end -%>
+<% else -%>
+deb <%= debian_url %> <%= next_codename %>-updates <%= repos %>
+<% if include_src then -%>
+deb-src <%= debian_url %> <%= next_codename %>-updates <%= repos %>
+<% end -%>
+<% end -%>
<% end -%>
<% end -%>
<% end -%>