From 9b0b7e0505d9bc5adeea389a9c8aeb833c4fc13d Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 8 May 2010 12:40:15 -0300 Subject: Using templates instead of plain config files, adding $reprepro_basedir --- .gitignore | 1 + files/distributions | 41 ----------------------------------------- files/index.html | 38 -------------------------------------- files/uploaders | 2 -- manifests/init.pp | 11 +++++++---- templates/distributions.erb | 41 +++++++++++++++++++++++++++++++++++++++++ templates/index.html.erb | 38 ++++++++++++++++++++++++++++++++++++++ templates/uploaders.erb | 4 ++++ 8 files changed, 91 insertions(+), 85 deletions(-) create mode 100644 .gitignore delete mode 100644 files/distributions delete mode 100644 files/index.html delete mode 100644 files/uploaders create mode 100644 templates/distributions.erb create mode 100644 templates/index.html.erb create mode 100644 templates/uploaders.erb diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1377554 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.swp diff --git a/files/distributions b/files/distributions deleted file mode 100644 index 00dbb02..0000000 --- a/files/distributions +++ /dev/null @@ -1,41 +0,0 @@ -Origin: koumbit -Label: koumbit -Suite: oldstable -Codename: etch -Version: 4.0 -Architectures: i386 amd64 source -Components: main non-free contrib -Description: koumbit specific (or backported) packages -SignWith: yes -Uploaders: uploaders - -Origin: koumbit -Label: koumbit -Suite: stable -Codename: lenny -Version: 5.0 -Architectures: i386 amd64 source -Components: main non-free contrib -Description: koumbit specific (or backported) packages -SignWith: yes -Uploaders: uploaders - -Origin: koumbit -Label: koumbit -Suite: testing -Codename: squeeze -Architectures: i386 amd64 source -Components: main non-free contrib -Description: koumbit specific (or backported) packages -SignWith: yes -Uploaders: uploaders - -Origin: koumbit -Label: koumbit -Suite: unstable -Codename: sid -Architectures: i386 amd64 source -Components: main non-free contrib -Description: koumbit specific (or backported) packages -SignWith: yes -Uploaders: uploaders diff --git a/files/index.html b/files/index.html deleted file mode 100644 index ffcaf4a..0000000 --- a/files/index.html +++ /dev/null @@ -1,38 +0,0 @@ - - -Koumbit Debian package repository - - -

Introduction

- -

This is the Debian package repository of Koumbit. 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, see the Beta page for more information.

- -

How to use

- -

In your /etc/apt/source.list: - -

-deb http://debian.koumbit.net/debian lenny main
-deb-src http://debian.koumbit.net/debian lenny main
-
- -"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.

- -

Adding the archive key to your keyring

- -

This archive self-signs packages uploaded to it (and packages uploaded are -verified against a whitelist of trusted uploaders) using OpenPGP (GnuPG, to be -more precise).

- -

The key of the archive is in the key.asc file. You should add the key using something like this:

- -
-wget http://debian.koumbit.net/debian/key.asc
-apt-key add key.asc
-apt-get update
-
diff --git a/files/uploaders b/files/uploaders deleted file mode 100644 index 2625b7b..0000000 --- a/files/uploaders +++ /dev/null @@ -1,2 +0,0 @@ -# anarcat -allow * by key 4023702f diff --git a/manifests/init.pp b/manifests/init.pp index 140bad7..02a8794 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,6 +1,9 @@ class reprepro { - $basedir = '/srv/reprepro' + $basedir = $reprepro_basedir ? { + '' => '/srv/reprepro', + default => $reprepro_basedir, + } case $lsbdistcodename { etch: { @@ -66,11 +69,11 @@ class reprepro { "$basedir/conf/distributions": mode => 0664, owner => root, group => reprepro, - source => "puppet://$servername/reprepro/distributions"; + content => template("reprepro/distributions.erb"); "$basedir/conf/uploaders": mode => 0660, owner => root, group => reprepro, - source => "puppet://$servername/reprepro/uploaders"; + content => template("reprepro/uploaders.erb"); "$basedir/conf/incoming": mode => 0664, owner => root, group => reprepro, @@ -78,7 +81,7 @@ class reprepro { "$basedir/index.html": mode => 0664, owner => root, group => reprepro, - source => "puppet://$servername/reprepro/index.html"; + source => template("reprepro/index.html.erb"); "$basedir/.gnupg": mode => 750, owner => reprepro, group => root, diff --git a/templates/distributions.erb b/templates/distributions.erb new file mode 100644 index 0000000..c295245 --- /dev/null +++ b/templates/distributions.erb @@ -0,0 +1,41 @@ +Origin: <%= domain %> +Label: <%= domain %> +Suite: oldstable +Codename: etch +Version: 4.0 +Architectures: i386 amd64 source +Components: main non-free contrib +Description: <%= domain %> specific (or backported) packages +SignWith: yes +Uploaders: uploaders + +Origin: <%= domain %> +Label: <%= domain %> +Suite: stable +Codename: lenny +Version: 5.0 +Architectures: i386 amd64 source +Components: main non-free contrib +Description: <%= domain %> specific (or backported) packages +SignWith: yes +Uploaders: uploaders + +Origin: <%= domain %> +Label: <%= domain %> +Suite: testing +Codename: squeeze +Architectures: i386 amd64 source +Components: main non-free contrib +Description: <%= domain %> specific (or backported) packages +SignWith: yes +Uploaders: uploaders + +Origin: <%= domain %> +Label: <%= domain %> +Suite: unstable +Codename: sid +Architectures: i386 amd64 source +Components: main non-free contrib +Description: <%= domain %> specific (or backported) packages +SignWith: yes +Uploaders: uploaders diff --git a/templates/index.html.erb b/templates/index.html.erb new file mode 100644 index 0000000..719460e --- /dev/null +++ b/templates/index.html.erb @@ -0,0 +1,38 @@ + + +<%= domain %> Debian package repository + + +

Introduction

+ +

This is the Debian package repository of <%= domain %>. 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, see the Beta page for more information.

+ +

How to use

+ +

In your /etc/apt/source.list: + +

+deb http://debian.<%= domain %>/debian lenny main
+deb-src http://debian.<%= domain %>/debian lenny main
+
+ +"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.

+ +

Adding the archive key to your keyring

+ +

This archive self-signs packages uploaded to it (and packages uploaded are +verified against a whitelist of trusted uploaders) using OpenPGP (GnuPG, to be +more precise).

+ +

The key of the archive is in the key.asc file. You should add the key using something like this:

+ +
+wget http://debian.<%= domain %>/debian/key.asc
+apt-key add key.asc
+apt-get update
+
diff --git a/templates/uploaders.erb b/templates/uploaders.erb new file mode 100644 index 0000000..560e3ce --- /dev/null +++ b/templates/uploaders.erb @@ -0,0 +1,4 @@ +# reprepro uploaders, file managed by puppet +<% reprepro_upladers.each do |uploader| -%> +allow * by key <%= uploader %> +<% end -%> -- cgit v1.2.3