aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2015-02-07 16:12:55 +0000
committerintrigeri <intrigeri@boum.org>2015-02-07 16:12:55 +0000
commit85c7554c4bb06130ab3e88170842dc1b2ddbb186 (patch)
treee972226a58071cb17c4ea46fc959a0077c2ca2eb
parent5a8d214529429b5dd898e0df29d69e0acf5271df (diff)
downloadpuppet-apt-85c7554c4bb06130ab3e88170842dc1b2ddbb186.tar.gz
puppet-apt-85c7554c4bb06130ab3e88170842dc1b2ddbb186.tar.bz2
Add support for Squeeze LTS.
-rw-r--r--README8
-rw-r--r--manifests/init.pp2
-rw-r--r--manifests/params.pp2
-rw-r--r--templates/Debian/preferences_squeeze.erb5
-rw-r--r--templates/Debian/sources.list.erb12
5 files changed, 29 insertions, 0 deletions
diff --git a/README b/README
index 0057d87..5e5c7c5 100644
--- a/README
+++ b/README
@@ -128,6 +128,14 @@ Example usage:
Class parameters:
+* use_lts
+
+ If this variable is set to true the CODENAME-lts sources (such as
+ squeeze-lts) are added.
+
+ By default this is false for backward compatibility with older
+ versions of this module.
+
* use_volatile
If this variable is set to true the CODENAME-updates sources (such as
diff --git a/manifests/init.pp b/manifests/init.pp
index 7550aaa..2814013 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -5,12 +5,14 @@
class apt(
$codename = $apt::params::codename,
+ $use_lts = $apt::params::use_lts,
$use_volatile = $apt::params::use_volatile,
$include_src = $apt::params::include_src,
$use_next_release = $apt::params::use_next_release,
$debian_url = $apt::params::debian_url,
$security_url = $apt::params::security_url,
$backports_url = $apt::params::backports_url,
+ $lts_url = $apt::params::lts_url,
$volatile_url = $apt::params::volatile_url,
$ubuntu_url = $apt::params::ubuntu_url,
$repos = $apt::params::repos,
diff --git a/manifests/params.pp b/manifests/params.pp
index 12273ac..54fd13e 100644
--- a/manifests/params.pp
+++ b/manifests/params.pp
@@ -1,5 +1,6 @@
class apt::params () {
$codename = $::lsbdistcodename
+ $use_lts = false
$use_volatile = false
$include_src = false
$use_next_release = false
@@ -9,6 +10,7 @@ class apt::params () {
'wheezy' => $debian_url,
default => 'http://backports.debian.org/debian-backports/',
}
+ $lts_url = $debian_url
$volatile_url = 'http://volatile.debian.org/debian-volatile/'
$ubuntu_url = 'http://archive.ubuntu.com/ubuntu'
$repos = 'auto'
diff --git a/templates/Debian/preferences_squeeze.erb b/templates/Debian/preferences_squeeze.erb
index efe7720..838b3a1 100644
--- a/templates/Debian/preferences_squeeze.erb
+++ b/templates/Debian/preferences_squeeze.erb
@@ -8,6 +8,11 @@ Package: *
Pin: release o=Debian,n=<%= codename %>-updates
Pin-Priority: 990
+Explanation: Debian <%= codename %>-lts
+Package: *
+Pin: release o=Debian,n=<%= codename %>-lts
+Pin-Priority: 990
+
Explanation: Debian <%= next_codename=scope.lookupvar('apt::next_codename') %>
Package: *
Pin: release o=Debian,n=<%= next_codename %>
diff --git a/templates/Debian/sources.list.erb b/templates/Debian/sources.list.erb
index 65b5945..7b99df6 100644
--- a/templates/Debian/sources.list.erb
+++ b/templates/Debian/sources.list.erb
@@ -41,6 +41,18 @@ deb-src <%= debian_url %> <%= codename %>-updates <%= lrepos %>
<% end -%>
<% end -%>
+<% if use_lts=scope.lookupvar('apt::use_lts') -%>
+# LTS
+<% if release != "oldstable" -%>
+# There is no LTS archive for <%= release %>
+<% else -%>
+deb <%= debian_url %> <%= codename %>-lts <%= lrepos %>
+<% if include_src -%>
+deb-src <%= debian_url %> <%= codename %>-lts <%= lrepos %>
+<% end -%>
+<% end -%>
+<% end -%>
+
<% if next_release=scope.lookupvar('apt::use_next_release') -%>
### Debian next: <%= next_release=scope.lookupvar('apt::next_release') ; next_codename=scope.lookupvar('apt::next_codename') %>