summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/distributions.erb42
-rw-r--r--templates/index.html.erb29
-rw-r--r--templates/inoticoming.default.erb8
-rw-r--r--templates/reprepro-export-key.sh.erb19
-rw-r--r--templates/uploaders.erb5
5 files changed, 64 insertions, 39 deletions
diff --git a/templates/distributions.erb b/templates/distributions.erb
index e93baaf..3e8dea8 100644
--- a/templates/distributions.erb
+++ b/templates/distributions.erb
@@ -1,43 +1,45 @@
-Origin: <%= reprepro_origin %>
-Label: <%= reprepro_origin %>
+# This file is managed by Puppet. Do not edit, any changes will be overwritten!
+
+Origin: <%= @origin %>
+Label: <%= @origin %>
Suite: oldstable
Pull: stable
Codename: lenny
Version: 5.0
-Architectures: i386 amd64 source kfreebsd-amd64 kfreebsd-i386
+Architectures: <%= @architectures.join(' ') %>
Components: main non-free contrib
-Description: <%= reprepro_origin %> specific (or backported) packages
-SignWith: <%= reprepro_signwith %>
+Description: <%= @origin %> specific (or backported) packages
+SignWith: yes
Uploaders: uploaders
-Origin: <%= reprepro_origin %>
-Label: <%= reprepro_origin %>
+Origin: <%= @origin %>
+Label: <%= @origin %>
Suite: stable
Pull: testing
Codename: squeeze
Version: 6.0
-Architectures: i386 amd64 source kfreebsd-amd64 kfreebsd-i386
+Architectures: <%= @architectures.join(' ') %>
Components: main non-free contrib
-Description: <%= reprepro_origin %> specific (or backported) packages
-SignWith: <%= reprepro_signwith %>
+Description: <%= @origin %> specific (or backported) packages
+SignWith: yes
Uploaders: uploaders
-Origin: <%= reprepro_origin %>
-Label: <%= reprepro_origin %>
+Origin: <%= @origin %>
+Label: <%= @origin %>
Suite: testing
Codename: wheezy
-Architectures: i386 amd64 source kfreebsd-amd64 kfreebsd-i386
+Architectures: <%= @architectures.join(' ') %>
Components: main non-free contrib
-Description: <%= reprepro_origin %> specific (or backported) packages
-SignWith: <%= reprepro_signwith %>
+Description: <%= @origin %> specific (or backported) packages
+SignWith: yes
Uploaders: uploaders
-Origin: <%= reprepro_origin %>
-Label: <%= reprepro_origin %>
+Origin: <%= @origin %>
+Label: <%= @origin %>
Suite: unstable
Codename: sid
-Architectures: i386 amd64 source kfreebsd-amd64 kfreebsd-i386
+Architectures: <%= @architectures.join(' ') %>
Components: main non-free contrib
-Description: <%= reprepro_origin %> specific (or backported) packages
-SignWith: <%= reprepro_signwith %>
+Description: <%= @origin %> specific (or backported) packages
+SignWith: yes
Uploaders: uploaders
diff --git a/templates/index.html.erb b/templates/index.html.erb
index 65ac222..7990d51 100644
--- a/templates/index.html.erb
+++ b/templates/index.html.erb
@@ -1,11 +1,11 @@
-<html>
+<html><!-- This file is managed by Puppet. Do not edit, any changes will be overwritten! -->
<head>
-<title><%= domain %> Debian package repository</title>
+<title><%= @domain %> Debian package repository</title>
</head>
<body>
<h1>Introduction</h1>
-<p>This is the Debian package repository of <%= reprepro_origin %>. It is used for internal
+<p>This is the Debian package repository of <%= @origin %>. It is used for internal
distribution of locally built packages not yet part of Debian. Feel free to use
it for yourself, but it comes at no warranty.
@@ -14,13 +14,13 @@ it for yourself, but it comes at no warranty.
<p>In your /etc/apt/source.list:
<pre>
-deb http://debian.<%= domain %>/debian lenny main
-deb-src http://debian.<%= domain %>/debian lenny main
+deb http://debian.<%= @domain %>/debian stable main
+deb-src http://debian.<%= @domain %>/debian stable main
</pre>
-"lenny", of course, can be replaced by your distribution. Know that we usually
-package straight for etch or lenny. Packages will likely not be available in
-squeeze or sid.</p>
+<code>stable</code> can be replaced by <code>testing</code>
+or <code>unstable</code> if you wish to test the development version
+of packages.</p>
<h2>Adding the archive key to your keyring</h2>
@@ -28,10 +28,19 @@ squeeze or sid.</p>
verified against a whitelist of trusted uploaders) using OpenPGP (GnuPG, to be
more precise).</p>
-<p>The key of the archive is in the <a href="/key.asc">key.asc file</a>. You should add the key using something like this:</p>
+<p>The key of the archive is in the <a href="/debian/key.asc">key.asc file</a>. You should add the key using something like this:</p>
<pre>
-wget http://debian.<%= domain %>/debian/key.asc
+wget http://debian.<%= @domain %>/debian/key.asc
apt-key add key.asc
apt-get update
</pre>
+
+<h2>Browsing the archive</h2>
+
+There is no interactive interface to browse the archive.
+
+<ul>
+<li>To see the list of all packages regardless of the distribution, see the <a href="/debian/pool">pool directory</a></li>
+<li>To see the package descriptions per distribution, see the <a href="/debian/dists">dists directory</a>
+</li>
diff --git a/templates/inoticoming.default.erb b/templates/inoticoming.default.erb
index b666851..a298a16 100644
--- a/templates/inoticoming.default.erb
+++ b/templates/inoticoming.default.erb
@@ -1,3 +1,5 @@
+# This file is managed by Puppet. Do not edit, any changes will be overwritten!
+
# /etc/default/inoticoming
#
# for an explanation of options and actions, see inoticoming(1)
@@ -11,12 +13,12 @@ LOGFILE="/var/log/incoming.log"
# first search the directory for files already existing
# 0 for false, 1 for true
-INITIALSEARCH=0
+INITIALSEARCH=1
# directory to monitor
-DIR=<%= basedir %>/incoming
+DIR=<%= @basedir %>/incoming
# actions
-BASEDIR=<%= basedir %>
+BASEDIR=<%= @basedir %>
RULENAME=incoming
ACTIONS="--suffix .changes --stderr-to-log reprepro -s -b $BASEDIR --waitforlock 1000 processincoming $RULENAME {} ;"
diff --git a/templates/reprepro-export-key.sh.erb b/templates/reprepro-export-key.sh.erb
index c99f06b..bbc195c 100644
--- a/templates/reprepro-export-key.sh.erb
+++ b/templates/reprepro-export-key.sh.erb
@@ -1,7 +1,18 @@
-#!/bin/bash
+#!/bin/sh
+#
+# This file is managed by Puppet. Do not edit, any changes will be overwritten!
+#
-KEY="`gpg --homedir <%= basedir %>/.gnupg --with-colon --list-secret-keys | cut -d : -f 5 | head -n 1`"
+set -e
-if [ ! -z "$KEY" ]; then
- gpg --homedir <%= basedir %>/.gnupg --export --armor $KEY > <%= basedir %>/key.asc
+KEY="$(gpg --homedir '<%= @basedir %>/.gnupg' --with-colon --list-secret-keys | cut -d : -f 5 | head -n 1)"
+
+if [ -n "$KEY" ]; then
+ TEMPFILE=$(mktemp --tmpdir='<%= @basedir %>')
+ trap "rm -f '$TEMPFILE'" EXIT
+ DESTFILE='<%= @basedir %>/key.asc'
+ gpg --homedir '<%= @basedir %>/.gnupg' --export --armor "$KEY" > "$TEMPFILE"
+ mv "$TEMPFILE" "$DESTFILE"
+ chown reprepro:reprepro "$DESTFILE"
+ chmod 0664 "$DESTFILE"
fi
diff --git a/templates/uploaders.erb b/templates/uploaders.erb
index ce5897d..84559a8 100644
--- a/templates/uploaders.erb
+++ b/templates/uploaders.erb
@@ -1,4 +1,5 @@
-# reprepro uploaders, file managed by puppet
-<% reprepro_uploaders.each do |uploader| -%>
+# This file is managed by Puppet. Do not edit, any changes will be overwritten!
+
+<% @uploaders.each do |uploader| -%>
allow * by key <%= uploader %>
<% end -%>