Index: /package_tags/invirt-dev/0.0.9/README
===================================================================
--- /package_tags/invirt-dev/0.0.9/README	(revision 1772)
+++ /package_tags/invirt-dev/0.0.9/README	(revision 1772)
@@ -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: /package_tags/invirt-dev/0.0.9/debian/changelog
===================================================================
--- /package_tags/invirt-dev/0.0.9/debian/changelog	(revision 1772)
+++ /package_tags/invirt-dev/0.0.9/debian/changelog	(revision 1772)
@@ -0,0 +1,244 @@
+invirt-dev (0.0.9) unstable; urgency=low
+
+  * Don't add the same line a bunch of times to /etc/sudoers
+
+ -- Evan Broder <broder@mit.edu>  Tue, 25 Nov 2008 08:16:17 -0500
+
+invirt-dev (0.0.8) unstable; urgency=low
+
+  * Support building multiple packages in sequence
+
+ -- Evan Broder <broder@mit.edu>  Sat, 15 Nov 2008 23:19:38 -0500
+
+invirt-dev (0.0.7) unstable; urgency=low
+
+  * Undo my attempts at correctly splitting the package list; do it less
+    correctly
+
+ -- Evan Broder <broder@mit.edu>  Mon, 10 Nov 2008 04:01:09 -0500
+
+invirt-dev (0.0.6) unstable; urgency=low
+
+  * Punt duplicate dirs file and unused docs file in package
+  * Add invirt-ood-build for building out of date packages
+
+ -- Evan Broder <broder@mit.edu>  Mon, 10 Nov 2008 03:43:41 -0500
+
+invirt-dev (0.0.5) unstable; urgency=low
+
+  * Add new invirt-ood-packages script
+
+ -- Evan Broder <broder@mit.edu>  Sat, 08 Nov 2008 23:52:09 -0500
+
+invirt-dev (0.0.4) unstable; urgency=low
+
+  * Get the svn repo from the config file, instead of /srv/checkout
+
+ -- Evan Broder <broder@mit.edu>  Sat, 01 Nov 2008 02:11:59 -0400
+
+invirt-dev (0.0.3) unstable; urgency=low
+
+  * sipb-xen-base -> invirt-base
+
+ -- Evan Broder <broder@mit.edu>  Tue, 28 Oct 2008 04:23:25 -0400
+
+invirt-dev (0.0.2) unstable; urgency=low
+
+  * document need to add users to sbuild group
+
+ -- Greg Price <price@mit.edu>  Sun, 26 Oct 2008 00:03:03 -0400
+
+invirt-dev (0.0.1) unstable; urgency=low
+
+  * sipb-xen-dev -> invirt-dev
+  * sx-build-release -> invirt-build-release
+
+ -- Greg Price <price@mit.edu>  Sat, 25 Oct 2008 23:23:26 -0400
+
+sipb-xen-dev (26.2) unstable; urgency=low
+
+  * remove vacuous README files
+  * remove sipb-xen-repository Apache config file,
+    which has been in sipb-xen-www, now invirt-web, since May
+
+ -- Greg Price <price@mit.edu>  Sat, 25 Oct 2008 22:48:33 -0400
+
+sipb-xen-dev (26.1) unstable; urgency=low
+
+  * Fix a typo where the source package didn't get uploaded
+
+ -- Evan Broder <broder@mit.edu>  Thu, 23 Oct 2008 22:03:40 -0400
+
+sipb-xen-dev (26) unstable; urgency=low
+
+  * Update sx-build-release and reprepro-env to work with sbuild instead
+    of dpkg-buildpackage
+
+ -- Evan Broder <broder@mit.edu>  Thu, 23 Oct 2008 21:56:17 -0400
+
+sipb-xen-dev (25) unstable; urgency=low
+
+  * Don't sign packages when they're built
+
+ -- Evan Broder <broder@mit.edu>  Sun, 05 Oct 2008 00:25:52 -0400
+
+sipb-xen-dev (24) unstable; urgency=low
+
+  * depend on quilt, patchutils, config-package-dev
+
+ -- Greg Price <price@mit.edu>  Wed, 01 Oct 2008 01:00:40 -0400
+
+sipb-xen-dev (23) unstable; urgency=low
+
+  * in postinst, create user repository and group repo
+    and add /etc/sudoers line
+
+ -- Greg Price <price@mit.edu>  Tue, 30 Sep 2008 23:06:04 -0400
+
+sipb-xen-dev (22) unstable; urgency=low
+
+  [ Sam Hartman ]
+  * Do not include a key id for dpkg-buildpackage per discussion on class xvm
+
+  [ Greg Price ]
+  * depend on equivs
+
+ -- Greg Price <price@mit.edu>  Sun, 24 Aug 2008 15:58:14 -0400
+
+sipb-xen-dev (21) unstable; urgency=low
+
+  * Depend on sipb-xen-base
+  * don't require packages be signed on upload
+
+ --  Sam Hartman <hartmans@xvm.mit.edu>  Tue,  5 Aug 2008 21:23:44 +0000
+
+sipb-xen-dev (20) unstable; urgency=low
+
+  * dumb bugfix in init script
+
+ -- Greg Price <price@mit.edu>  Mon,  4 Aug 2008 02:11:04 -0400
+
+sipb-xen-dev (19) unstable; urgency=low
+
+  * use CDBS, which doesn't forget dh_installinit like I did
+
+ -- Greg Price <price@mit.edu>  Mon,  4 Aug 2008 02:02:41 -0400
+
+sipb-xen-dev (18) unstable; urgency=low
+
+  * sign the packages, getting keyid from invirt.config
+
+ -- Greg Price <price@mit.edu>  Mon,  4 Aug 2008 00:43:58 -0400
+
+sipb-xen-dev (17) unstable; urgency=low
+
+  * use reprepro more correctly (and include in both stable and unstable)
+
+ -- Greg Price <price@mit.edu>  Sat, 26 Apr 2008 23:47:55 -0400
+
+sipb-xen-dev (16) unstable; urgency=low
+
+  * usage as "sx-build-release <package-name>", no "trunk/packages"
+  * clobber the build-release/<package-name> directory automatically
+
+ -- Greg Price <price@mit.edu>  Sat, 26 Apr 2008 23:12:03 -0400
+
+sipb-xen-dev (15) unstable; urgency=low
+
+  * Stop requiring the current directory to be in the checkout.
+  * Don't do unnecessary write operations
+    (hence prompt less often for a password.)
+
+ -- Greg Price <price@mit.edu>  Sat, 26 Apr 2008 22:45:42 -0400
+
+sipb-xen-dev (14) unstable; urgency=low
+
+  * Use the shallower directory structure.
+
+ -- Eric Price <ecprice@sipb-xen-dev.mit.edu>  Sat, 29 Mar 2008 17:25:20 -0400
+
+sipb-xen-dev (13) unstable; urgency=low
+
+  * Update the svn uri automatically.
+
+ -- Eric Price <ecprice@sipb-xen-dev.mit.edu>  Fri, 28 Mar 2008 21:38:37 -0400
+
+sipb-xen-dev (12) unstable; urgency=low
+
+  * Update the svn uri to point to the new repository
+
+ -- Nelson Elhage <nelhage@mit.edu>  Wed, 15 Aug 2007 22:58:49 -0400
+
+sipb-xen-dev (11) unstable; urgency=low
+
+  * Use svn export not co to avoid installing .svn directories
+
+ -- Sam Hartman <hartmans@debian.org>  Sat,  4 Aug 2007 19:15:58 -0400
+
+sipb-xen-dev (10) unstable; urgency=low
+
+  * Use svn export not svn co so we don't get .svn directories installed
+
+ -- Sam Hartman <hartmans@debian.org>  Sat,  4 Aug 2007 19:14:51 -0400
+
+sipb-xen-dev (9) unstable; urgency=low
+
+  * Add /debian to apache config
+
+ -- Sam Hartman <hartmans@debian.org>  Sat,  4 Aug 2007 18:54:43 -0400
+
+sipb-xen-dev (8) unstable; urgency=low
+
+  * Can't use ..
+
+ -- Sam Hartman <hartmans@debian.org>  Sun, 15 Jul 2007 17:29:54 -0400
+
+sipb-xen-dev (7) unstable; urgency=low
+
+  * Can't use ..
+
+ -- Sam Hartman <hartmans@debian.org>  Sun, 15 Jul 2007 17:27:59 -0400
+
+sipb-xen-dev (6) unstable; urgency=low
+
+  * Can't use ..
+
+ -- Sam Hartman <hartmans@debian.org>  Sun, 15 Jul 2007 17:26:17 -0400
+
+sipb-xen-dev (5) unstable; urgency=low
+
+  * Bug fix
+
+ -- Sam Hartman <hartmans@debian.org>  Sun, 15 Jul 2007 17:25:00 -0400
+
+sipb-xen-dev (4) unstable; urgency=low
+
+  * Blah
+
+ -- Sam Hartman <hartmans@debian.org>  Sun, 15 Jul 2007 17:21:28 -0400
+
+sipb-xen-dev (3) unstable; urgency=low
+
+  * Working sx-build-release
+  
+
+ -- Sam Hartman <hartmans@debian.org>  Sun, 15 Jul 2007 16:58:46 -0400
+
+sipb-xen-dev (2) unstable; urgency=low
+
+  * Add sipb-xen-repository apache config
+
+ -- Sam Hartman <hartmans@debian.org>  Sun, 15 Jul 2007 14:04:03 -0400
+
+sipb-xen-dev (1) unstable; urgency=low
+
+  * Add repository config
+  * update dependencies
+
+ --  Sam Hartman <hartmans@debian.org>  Sun, 15 Jul 2007 13:43:08 -0400
+
+sipb-xen-dev (0) unstable; urgency=low
+
+  * Initial Release.
+
+ -- unknown <hartmans@debian.org>  Fri,  6 Jul 2007 00:52:28 -0400
Index: /package_tags/invirt-dev/0.0.9/debian/compat
===================================================================
--- /package_tags/invirt-dev/0.0.9/debian/compat	(revision 1772)
+++ /package_tags/invirt-dev/0.0.9/debian/compat	(revision 1772)
@@ -0,0 +1,1 @@
+5
Index: /package_tags/invirt-dev/0.0.9/debian/control
===================================================================
--- /package_tags/invirt-dev/0.0.9/debian/control	(revision 1772)
+++ /package_tags/invirt-dev/0.0.9/debian/control	(revision 1772)
@@ -0,0 +1,12 @@
+Source: invirt-dev
+Section: servers
+Priority: important
+Maintainer: Invirt project <invirt@mit.edu>
+Build-Depends: cdbs (>= 0.4.23-1.1), debhelper (>= 5)
+Standards-Version: 3.7.2
+
+Package: invirt-dev
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}, dpkg-dev-el, emacs21, reprepro, apache2, postfix, screen, dh-make, fakeroot, quilt, patchutils, config-package-dev, pbuilder, equivs, invirt-base
+Description: Invirt build and apt server
+ This packages the build scripts and apt-repository configuration for Invirt.
Index: /package_tags/invirt-dev/0.0.9/debian/copyright
===================================================================
--- /package_tags/invirt-dev/0.0.9/debian/copyright	(revision 1772)
+++ /package_tags/invirt-dev/0.0.9/debian/copyright	(revision 1772)
@@ -0,0 +1,16 @@
+This software was written as part of the Invirt project <invirt@mit.edu>.
+
+Copyright :
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+On Debian systems, the complete text of the GNU General Public License
+can be found in the file /usr/share/common-licenses/GPL.
Index: /package_tags/invirt-dev/0.0.9/debian/invirt-dev.dirs
===================================================================
--- /package_tags/invirt-dev/0.0.9/debian/invirt-dev.dirs	(revision 1772)
+++ /package_tags/invirt-dev/0.0.9/debian/invirt-dev.dirs	(revision 1772)
@@ -0,0 +1,3 @@
+usr/bin
+usr/sbin
+srv/repository/conf
Index: /package_tags/invirt-dev/0.0.9/debian/invirt-dev.init
===================================================================
--- /package_tags/invirt-dev/0.0.9/debian/invirt-dev.init	(revision 1772)
+++ /package_tags/invirt-dev/0.0.9/debian/invirt-dev.init	(revision 1772)
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+PACKAGE=invirt-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
Index: /package_tags/invirt-dev/0.0.9/debian/invirt-dev.install
===================================================================
--- /package_tags/invirt-dev/0.0.9/debian/invirt-dev.install	(revision 1772)
+++ /package_tags/invirt-dev/0.0.9/debian/invirt-dev.install	(revision 1772)
@@ -0,0 +1,5 @@
+reprepro-env usr/bin
+repository-config/* srv/repository/conf
+invirt-build-release usr/bin
+invirt-ood-packages usr/bin
+invirt-ood-build usr/bin
Index: /package_tags/invirt-dev/0.0.9/debian/invirt-dev.postinst
===================================================================
--- /package_tags/invirt-dev/0.0.9/debian/invirt-dev.postinst	(revision 1772)
+++ /package_tags/invirt-dev/0.0.9/debian/invirt-dev.postinst	(revision 1772)
@@ -0,0 +1,37 @@
+#!/bin/sh
+set -e
+
+#DEBHELPER#
+
+case "$1" in
+    configure)
+        if [ -z "$2" ]; then
+            adduser --system repository
+            addgroup --system repo
+            
+            # Clean up the old sudoers block, then add it back
+            perl -i.bak -ne 's%^### (BEGIN|END) invirt-dev\s*$%%m && ($skip = ($1 eq "BEGIN")); print unless $skip;' /etc/sudoers
+            
+            cat >>/etc/sudoers <<EOF
+### BEGIN invirt-dev
+%repo   ALL=(repository)        ALWAYS_SET_HOME,NOPASSWD: /usr/bin/reprepro
+### END invirt-dev
+EOF
+            echo "-----"
+            echo "invirt-dev: run"
+            echo "  adduser --disabled-password \$user"
+            echo "  adduser \$user repo"
+            echo "  adduser \$user sbuild"
+            echo "to make individual users that will build packages."
+            echo "-----"
+        fi
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
Index: /package_tags/invirt-dev/0.0.9/debian/rules
===================================================================
--- /package_tags/invirt-dev/0.0.9/debian/rules	(revision 1772)
+++ /package_tags/invirt-dev/0.0.9/debian/rules	(revision 1772)
@@ -0,0 +1,5 @@
+#!/usr/bin/make -f
+
+
+
+include /usr/share/cdbs/1/rules/debhelper.mk
Index: /package_tags/invirt-dev/0.0.9/invirt-build-release
===================================================================
--- /package_tags/invirt-dev/0.0.9/invirt-build-release	(revision 1772)
+++ /package_tags/invirt-dev/0.0.9/invirt-build-release	(revision 1772)
@@ -0,0 +1,45 @@
+#!/bin/bash
+svnuri="$(invirt-getconf svn.uri)"
+
+set -e
+if  [ $# -eq 0 ] ; then
+	echo " usage: invirt-build-release package_name [package_name [...]]"
+	exit 1
+fi
+
+for package; do
+    rm -rf build-release/$package
+    svn export $svnuri/trunk/packages/$package build-release/$package
+    cd build-release/$package
+    
+    eval  `perl '-F:\s+' -lane 'print  $F[0]."=".$F[1] if /^Version|^Source|^Distribution/' \
+        <(dpkg-parsechangelog)`
+    
+    dpkg-buildpackage -us -uc -rfakeroot -S
+    cd ..
+    sbuild -A -d hardy-amd64 "${Source}_${Version}.dsc"
+    
+    if ! svn ls $svnuri/package_tags/$Source >/dev/null 2>&1; then
+        svn mkdir $svnuri/package_tags/$Source \
+            -m "Create package tags directory"
+    fi
+    if ! svn ls $svnuri/package_tags/$Source/$Version >/dev/null 2>&1; then
+        svn cp $svnuri/trunk/packages/$package $svnuri/package_tags/$Source/$Version \
+            -m "Tag $Version of $Source"
+    else
+        echo "$(basename $0): tag already exists, not making again"
+    fi
+    
+    [ $Distribution = 'unstable' ] \
+        || echo "$(basename $0): warning: Distribution is ${Distribution}, script expects unstable"
+    changesfile=`pwd`/${Source}_*${Version}*.changes
+    for i in $changesfile; do
+        reprepro-env include unstable $i
+        reprepro-env copy stable unstable \
+	    $(perl '-F:\s+' -lane 'print $F[1]." " if /^Binary/' <$i)
+    done
+    reprepro-env copy stable unstable ${Source}
+    
+    cd ..
+    rm -rf build-release
+done
Index: /package_tags/invirt-dev/0.0.9/invirt-ood-build
===================================================================
--- /package_tags/invirt-dev/0.0.9/invirt-ood-build	(revision 1772)
+++ /package_tags/invirt-dev/0.0.9/invirt-ood-build	(revision 1772)
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+packages="$(invirt-ood-packages)"
+
+if [ ${#packages} -eq 0 ]; then
+    echo "No packages to build."
+    exit 0
+fi
+
+echo "The following NEW packages will be built:"
+echo $packages | fmt | sed 's/^/  /'
+echo -n "Do you want to continue? [Y/n] "
+
+read answer
+if [ "${answer:0:1}" = "n" -o "${answer:0:1}" = "N" ]; then
+   echo "Abort."
+   exit 0
+fi
+
+for package in $packages; do
+    invirt-build-release "$package"
+done
Index: /package_tags/invirt-dev/0.0.9/invirt-ood-packages
===================================================================
--- /package_tags/invirt-dev/0.0.9/invirt-ood-packages	(revision 1772)
+++ /package_tags/invirt-dev/0.0.9/invirt-ood-packages	(revision 1772)
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+svn="$(invirt-getconf svn.uri)"
+
+for package in $(svn ls "$svn/trunk/packages"); do
+    package=${package%%/}
+    version=$(svn cat "$svn/trunk/packages/$package/debian/changelog" | dpkg-parsechangelog -l- | perl '-F:\s+' -lane 'print $F[1] if /^Version/')
+    
+    if ! svn ls "$svn/package_tags/$package/$version" >/dev/null 2>&1; then
+        echo $package
+    fi
+done
Index: /package_tags/invirt-dev/0.0.9/repository-config/distributions.in
===================================================================
--- /package_tags/invirt-dev/0.0.9/repository-config/distributions.in	(revision 1772)
+++ /package_tags/invirt-dev/0.0.9/repository-config/distributions.in	(revision 1772)
@@ -0,0 +1,17 @@
+CodeName: unstable
+Components: main
+Uploaders: unsigned
+SignWith: @apt.keyid@
+Architectures: amd64 source
+Origin: Invirt
+Notautomatic: yes
+Description: Invirt unstable
+
+Codename: stable
+Components: main
+Uploaders: unsigned
+SignWith: @apt.keyid@
+Architectures: amd64 source 
+Origin: Invirt
+Description: Invirt stable
+Contents: 1
Index: /package_tags/invirt-dev/0.0.9/repository-config/invirt-uploaders.in
===================================================================
--- /package_tags/invirt-dev/0.0.9/repository-config/invirt-uploaders.in	(revision 1772)
+++ /package_tags/invirt-dev/0.0.9/repository-config/invirt-uploaders.in	(revision 1772)
@@ -0,0 +1,1 @@
+allow * by key @apt.keyid@
Index: /package_tags/invirt-dev/0.0.9/repository-config/unsigned
===================================================================
--- /package_tags/invirt-dev/0.0.9/repository-config/unsigned	(revision 1772)
+++ /package_tags/invirt-dev/0.0.9/repository-config/unsigned	(revision 1772)
@@ -0,0 +1,2 @@
+allow  * by unsigned
+
Index: /package_tags/invirt-dev/0.0.9/reprepro-env
===================================================================
--- /package_tags/invirt-dev/0.0.9/reprepro-env	(revision 1772)
+++ /package_tags/invirt-dev/0.0.9/reprepro-env	(revision 1772)
@@ -0,0 +1,5 @@
+#!/bin/sh
+set -e
+export HOME=/home/repository
+exec sudo -H -u repository  /usr/bin/reprepro -b /srv/repository --ignore=wrongdistribution "$@"
+
