diff options
Diffstat (limited to 'files')
-rw-r--r-- | files/incoming | 2 | ||||
-rw-r--r-- | files/reprepro-export-key.sh | 19 |
2 files changed, 20 insertions, 1 deletions
diff --git a/files/incoming b/files/incoming index 57c6a5f..874fe1c 100644 --- a/files/incoming +++ b/files/incoming @@ -3,5 +3,5 @@ Name: incoming IncomingDir: incoming TempDir: tmp -Allow: oldstable>lenny stable>squeeze testing>wheezy unstable>sid +Allow: stable testing unstable Cleanup: on_deny on_error diff --git a/files/reprepro-export-key.sh b/files/reprepro-export-key.sh new file mode 100644 index 0000000..6e0b278 --- /dev/null +++ b/files/reprepro-export-key.sh @@ -0,0 +1,19 @@ +#!/bin/sh +# +# This file is managed by Puppet. Do not edit, any changes will be overwritten! +# + +set -e + +BASEDIR="$1" +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 |