aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/Debian/preferences_lenny.erb24
-rw-r--r--templates/Debian/preferences_sid.erb9
-rw-r--r--templates/Debian/preferences_squeeze.erb24
-rw-r--r--templates/Debian/sources.list.deb-src.erb12
-rw-r--r--templates/Debian/sources.list.erb84
-rw-r--r--templates/Debian/sources.list.volatile.erb8
-rw-r--r--templates/Ubuntu/sources.list.backports.erb5
-rw-r--r--templates/Ubuntu/sources.list.deb-src.erb13
-rw-r--r--templates/Ubuntu/sources.list.erb21
9 files changed, 149 insertions, 51 deletions
diff --git a/templates/Debian/preferences_lenny.erb b/templates/Debian/preferences_lenny.erb
new file mode 100644
index 0000000..3de7959
--- /dev/null
+++ b/templates/Debian/preferences_lenny.erb
@@ -0,0 +1,24 @@
+Explanation: Debian <%= codename %>
+Package: *
+Pin: release o=Debian,n=<%= codename %>
+Pin-Priority: 990
+
+Explanation: Debian backports
+Package: *
+Pin: origin backports.debian.org
+Pin-Priority: 200
+
+Explanation: Debian <%= next_codename %>
+Package: *
+Pin: release o=Debian,n=<%= next_codename %>
+Pin-Priority: 2
+
+Explanation: Debian sid
+Package: *
+Pin: release o=Debian,n=sid
+Pin-Priority: 1
+
+Explanation: Debian fallback
+Package: *
+Pin: release o=Debian
+Pin-Priority: -10
diff --git a/templates/Debian/preferences_sid.erb b/templates/Debian/preferences_sid.erb
new file mode 100644
index 0000000..3d8a45f
--- /dev/null
+++ b/templates/Debian/preferences_sid.erb
@@ -0,0 +1,9 @@
+Explanation: Debian sid
+Package: *
+Pin: release o=Debian,n=sid
+Pin-Priority: 990
+
+Explanation: Debian fallback
+Package: *
+Pin: release o=Debian
+Pin-Priority: -10
diff --git a/templates/Debian/preferences_squeeze.erb b/templates/Debian/preferences_squeeze.erb
new file mode 100644
index 0000000..f21562d
--- /dev/null
+++ b/templates/Debian/preferences_squeeze.erb
@@ -0,0 +1,24 @@
+Explanation: Debian <%= codename %>
+Package: *
+Pin: release o=Debian,n=<%= codename %>
+Pin-Priority: 990
+
+Explanation: Debian backports
+Package: *
+Pin: origin backports.debian.org
+Pin-Priority: 200
+
+Explanation: Debian wheezy
+Package: *
+Pin: release o=Debian,n=wheezy
+Pin-Priority: 2
+
+Explanation: Debian sid
+Package: *
+Pin: release o=Debian,n=sid
+Pin-Priority: 1
+
+Explanation: Debian fallback
+Package: *
+Pin: release o=Debian
+Pin-Priority: -10
diff --git a/templates/Debian/sources.list.deb-src.erb b/templates/Debian/sources.list.deb-src.erb
deleted file mode 100644
index e167ab6..0000000
--- a/templates/Debian/sources.list.deb-src.erb
+++ /dev/null
@@ -1,12 +0,0 @@
-# This file is brought to you by puppet
-# all local modifications will be overwritten
-
-# basic <%= lsbdistcodename %>
-deb-src http://ftp.debian.org/debian/ <%= lsbdistcodename %> main contrib non-free
-# security suppport
-<% if (lsbdistcodename == "sid" || lsbdistcodename == "unstable") -%>
-# There is no security mirror for <%= lsbdistcodename %>
-<% else -%>
-deb-src http://security.debian.org/ <%= lsbdistcodename %>/updates main contrib non-free
-<% end -%>
-
diff --git a/templates/Debian/sources.list.erb b/templates/Debian/sources.list.erb
index 12d1027..7fb9bdf 100644
--- a/templates/Debian/sources.list.erb
+++ b/templates/Debian/sources.list.erb
@@ -1,18 +1,84 @@
# This file is brought to you by puppet
# all local modifications will be overwritten
-# basic <%= lsbdistcodename %>
-deb <%= real_main_apt_source %> <%= lsbdistcodename %> main contrib non-free
-# security suppport
-<% if (lsbdistcodename == "sid" || lsbdistcodename == "unstable") -%>
-# There is no security mirror for <%= lsbdistcodename %>
+### Debian current: <%= codename %>
+
+# basic
+deb <%= debian_url %> <%= codename %> <%= repos %>
+<% if include_src then -%>
+deb-src <%= debian_url %> <%= codename %> <%= repos %>
+<% end -%>
+
+# security
+<% if (release == "unstable" || release == "experimental") -%>
+# There is no security support for <%= release %>
+<% else -%>
+deb <%= security_url %> <%= codename %>/updates <%= repos %>
+<% if include_src then -%>
+deb-src <%= security_url %> <%= codename %>/updates <%= repos %>
+<% end -%>
+<% end -%>
+
+# backports
+<% if (release == "testing" || release == "unstable" || release == "experimental") -%>
+# There is no backports archive for <%= release %>
+<% else -%>
+deb <%= backports_url %> <%= codename %>-backports <%= repos %>
+<% if include_src then -%>
+deb-src <%= backports_url %> <%= codename %>-backports <%= repos %>
+<% end -%>
+<% end -%>
+
+<% if use_volatile -%>
+# volatile
+<% if (release == "testing" || release == "unstable" || release == "experimental") -%>
+# There is no volatile archive for <%= release %>
+<% else -%>
+deb <%= volatile_url %> <%= codename %>/volatile <%= repos %>
+<% if include_src then -%>
+deb-src <%= volatile_url %> <%= codename %>/volatile <%= repos %>
+<% end -%>
+<% end -%>
+<% end -%>
+
+<% if use_next_release then -%>
+### Debian next: <%= next_codename %>
+
+# basic
+deb <%= debian_url %> <%= next_codename %> <%= repos %>
+<% if include_src then -%>
+deb-src <%= debian_url %> <%= next_codename %> <%= repos %>
+<% end -%>
+
+# security
+<% if (next_release == "unstable" || next_release == "experimental") -%>
+# There is no security support for <%= next_release %>
<% else -%>
-deb http://security.debian.org/ <%= lsbdistcodename %>/updates main contrib non-free
+deb <%= security_url %> <%= next_codename %>/updates <%= repos %>
+<% if include_src then -%>
+deb-src <%= security_url %> <%= next_codename %>/updates <%= repos %>
+<% end -%>
<% end -%>
# backports
-<% if (lsbdistcodename == "sid" || lsbdistcodename == "unstable") -%>
-# There are no backports for for <%= lsbdistcodename %>
+<% if (next_release == "testing" || next_release == "unstable" || next_release == "experimental") -%>
+# There is no backports archive for <%= next_release %>
<% else -%>
-deb http://www.backports.org/debian/ <%= lsbdistcodename %>-backports main
+deb <%= backports_url %> <%= next_codename %>-backports <%= repos %>
+<% if include_src then -%>
+deb-src <%= backports_url %> <%= next_codename %>-backports <%= repos %>
+<% end -%>
+<% end -%>
+
+<% if use_volatile -%>
+# volatile
+<% if (next_release == "testing" || next_release == "unstable" || next_release == "experimental") -%>
+# There is no volatile archive for <%= next_release %>
+<% else -%>
+deb <%= volatile_url %> <%= next_codename %>/volatile <%= repos %>
+<% if include_src then -%>
+deb-src <%= volatile_url %> <%= next_codename %>/volatile <%= repos %>
+<% end -%>
+<% end -%>
+<% end -%>
<% end -%>
diff --git a/templates/Debian/sources.list.volatile.erb b/templates/Debian/sources.list.volatile.erb
deleted file mode 100644
index d8527b6..0000000
--- a/templates/Debian/sources.list.volatile.erb
+++ /dev/null
@@ -1,8 +0,0 @@
-# This file is brought to you by puppet
-# all local modifications will be overwritten
-
-<% if (lsbdistcodename == "sid" || lsbdistcodename == "unstable" || lsbdistcodename == "squeeze") -%>
-# There are no backports for for <%= lsbdistcodename %>
-<% else -%>
-deb http://volatile.debian.org/debian-volatile <%= lsbdistcodename %>/volatile main contrib non-free
-<% end -%>
diff --git a/templates/Ubuntu/sources.list.backports.erb b/templates/Ubuntu/sources.list.backports.erb
deleted file mode 100644
index 2bb0ad2..0000000
--- a/templates/Ubuntu/sources.list.backports.erb
+++ /dev/null
@@ -1,5 +0,0 @@
-# This file is brought to you by puppet
-# all local modifications will be overwritten
-
-# backports
-deb http://archive.ubuntu.com/ubuntu <%= lsbdistcodename %>-backports main universe multiverse restricted
diff --git a/templates/Ubuntu/sources.list.deb-src.erb b/templates/Ubuntu/sources.list.deb-src.erb
deleted file mode 100644
index 22f103b..0000000
--- a/templates/Ubuntu/sources.list.deb-src.erb
+++ /dev/null
@@ -1,13 +0,0 @@
-# This file is brought to you by puppet
-# all local modifications will be overwritten
-
-# basic <%= lsbdistcodename %>
-deb-src http://de.archive.ubuntu.com/ubuntu <%= lsbdistcodename %> main restricted universe multiverse
-
-# updates
-deb-src http://de.archive.ubuntu.com/ubuntu <%= lsbdistcodename %>-updates main restricted universe multiverse
-
-# security suppport
-deb-src http://de.archive.ubuntu.com/ubuntu <%= lsbdistcodename %>-security main restricted universe multiverse
-
-
diff --git a/templates/Ubuntu/sources.list.erb b/templates/Ubuntu/sources.list.erb
index 2719934..2a25d6f 100644
--- a/templates/Ubuntu/sources.list.erb
+++ b/templates/Ubuntu/sources.list.erb
@@ -2,12 +2,25 @@
# all local modifications will be overwritten
# basic <%= lsbdistcodename %>
-deb <%= real_main_apt_source %> <%= lsbdistcodename %> main restricted universe multiverse
+deb <%= ubuntu_url %> <%= lsbdistcodename %> <%= repos %>
+<% if include_src then -%>
+deb-src <%= ubuntu_url %> <%= lsbdistcodename %> <%= repos %>
+<% end -%>
# updates
-deb http://de.archive.ubuntu.com/ubuntu <%= lsbdistcodename %>-updates main restricted universe multiverse
+deb <%= ubuntu_url %> <%= lsbdistcodename %>-updates <%= repos %>
+<% if include_src then -%>
+deb-src <%= ubuntu_url %> <%= lsbdistcodename %>-updates <%= repos %>
+<% end -%>
# security suppport
-deb http://de.archive.ubuntu.com/ubuntu <%= lsbdistcodename %>-security main restricted universe multiverse
-
+deb <%= ubuntu_url %> <%= lsbdistcodename %>-security <%= repos %>
+<% if include_src then -%>
+deb-src <%= ubuntu_url %> <%= lsbdistcodename %>-security <%= repos %>
+<% end -%>
+# backports
+deb <%= ubuntu_url %> <%= lsbdistcodename %>-backports main <%= repos %>
+<% if include_src then -%>
+deb-src <%= ubuntu_url %> <%= lsbdistcodename %>-backports <%= repos >
+<% end -%>