finish setup for signing packages sipb-xen-dev/18
authorGreg Price <price@mit.edu>
Mon, 4 Aug 2008 04:49:36 +0000 (00:49 -0400)
committerGreg Price <price@mit.edu>
Mon, 4 Aug 2008 04:49:36 +0000 (00:49 -0400)
svn path=/trunk/packages/sipb-xen-dev/; revision=853

README [new file with mode: 0644]
debian/changelog
debian/sipb-xen-dev.init [new file with mode: 0755]
repository-config/distributions.in [moved from repository-config/distributions with 72% similarity]
repository-config/invirt-uploaders.in [new file with mode: 0644]
reprepro-env

diff --git a/README b/README
new file mode 100644 (file)
index 0000000..3339738
--- /dev/null
+++ b/README
@@ -0,0 +1,7 @@
+Installation:
+
+ - The secret of the gpg key identified in invirt.config.apt.keyid
+   must be in the keyring of the repository user.
+
+   The public key should then be in the apt keyring of systems using
+   the packages.
index 7a9dc42..57671d2 100644 (file)
@@ -1,8 +1,8 @@
 sipb-xen-dev (18) unstable; urgency=low
 
-  * sign the packages
+  * sign the packages, getting keyid from invirt.config
 
- -- Greg Price <price@mit.edu>  Sat,  2 Aug 2008 21:57:58 -0400
+ -- Greg Price <price@mit.edu>  Mon,  4 Aug 2008 00:43:58 -0400
 
 sipb-xen-dev (17) unstable; urgency=low
 
diff --git a/debian/sipb-xen-dev.init b/debian/sipb-xen-dev.init
new file mode 100755 (executable)
index 0000000..c2e7336
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+PACKAGE=sipb-xen-dev
+
+. /lib/lsb/init-functions
+
+gen_config () {
+    local keyid="$(invirt-getconf apt.keyid)"
+    for f in /srv/repository/conf/{distributions,invirt-uploaders}; do
+       perl -pe "s/@apt.keyid@/$keyid/g" <"$f".in >"$f"
+    done
+}
+
+case "$1" in
+  start|reload|force-reload|restart)
+    log_begin_msg "Reloading config for $PACKAGE"
+    gen_config
+    log_end_msg $?
+    ;;
+  stop)
+    ;;
+  *)
+    log_success_msg "Usage: /etc/init.d/$PACKAGE {start|reload|force-reload|restart|stop}"
+    ;;
+esac
similarity index 72%
rename from repository-config/distributions
rename to repository-config/distributions.in
index 2544a80..1a4fbf4 100644 (file)
@@ -1,6 +1,7 @@
 CodeName: unstable
 Components: main
-Uploaders: unsigned
+Uploaders: invirt-uploaders
+SignWith: @apt.keyid@
 Architectures: amd64 source
 Origin: sipb
 Notautomatic: yes
@@ -9,6 +10,8 @@ Description: Unreleased sipb-xen software
 
 Codename: stable
 Components: main
+Uploaders: invirt-uploaders
+SignWith: @apt.keyid@
 Architectures: amd64 source 
 Origin: sipb
 Description: Released sipb-xen  code
diff --git a/repository-config/invirt-uploaders.in b/repository-config/invirt-uploaders.in
new file mode 100644 (file)
index 0000000..0564e0d
--- /dev/null
@@ -0,0 +1 @@
+allow * by key @apt.keyid@
index 71335a0..25e17b1 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
 set -e
 export HOME=/home/repository
-exec sudo -u repository  /usr/bin/reprepro -b /srv/repository "$@"
+exec sudo -H -u repository  /usr/bin/reprepro -b /srv/repository "$@"