Index: trunk/packages/invirt-ssh-config/debian/changelog
===================================================================
--- trunk/packages/invirt-ssh-config/debian/changelog	(revision 2855)
+++ trunk/packages/invirt-ssh-config/debian/changelog	(revision 2855)
@@ -0,0 +1,5 @@
+invirt-ssh-config (1.0) unstable; urgency=low
+
+  * Initial release.
+
+ -- Evan Broder <broder@mit.edu>  Fri, 13 Jul 2007 17:43:39 -0400
Index: trunk/packages/invirt-ssh-config/debian/compat
===================================================================
--- trunk/packages/invirt-ssh-config/debian/compat	(revision 2855)
+++ trunk/packages/invirt-ssh-config/debian/compat	(revision 2855)
@@ -0,0 +1,1 @@
+4
Index: trunk/packages/invirt-ssh-config/debian/control
===================================================================
--- trunk/packages/invirt-ssh-config/debian/control	(revision 2855)
+++ trunk/packages/invirt-ssh-config/debian/control	(revision 2855)
@@ -0,0 +1,15 @@
+Source: invirt-ssh-config
+Section: net
+Priority: extra
+Maintainer: Invirt Project <invirt@mit.edu>
+Build-Depends: cdbs (>= 0.4.23-1.1), debhelper (>= 4.2.0), config-package-dev (>= 4.5~), openssh-server (>= 1:4.3)
+Standards-Version: 3.8.3
+
+Package: invirt-ssh-config
+Architecture: all
+Depends: openssh-server (>= 1:4.3), ${misc:Depends}
+Provides: ${diverted-files}
+Conflicts: ${diverted-files}
+Description: sshd configuration for Invirt
+ This package configures the ssh daemon to support Kerberos
+ authentication.
Index: trunk/packages/invirt-ssh-config/debian/copyright
===================================================================
--- trunk/packages/invirt-ssh-config/debian/copyright	(revision 2855)
+++ trunk/packages/invirt-ssh-config/debian/copyright	(revision 2855)
@@ -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: trunk/packages/invirt-ssh-config/debian/invirt-ssh-config.install
===================================================================
--- trunk/packages/invirt-ssh-config/debian/invirt-ssh-config.install	(revision 2855)
+++ trunk/packages/invirt-ssh-config/debian/invirt-ssh-config.install	(revision 2855)
@@ -0,0 +1,1 @@
+debian/sshd_config.invirt etc/ssh/
Index: trunk/packages/invirt-ssh-config/debian/invirt-ssh-config.postinst
===================================================================
--- trunk/packages/invirt-ssh-config/debian/invirt-ssh-config.postinst	(revision 2855)
+++ trunk/packages/invirt-ssh-config/debian/invirt-ssh-config.postinst	(revision 2855)
@@ -0,0 +1,39 @@
+#!/bin/sh
+# postinst script for debathena-ssh-server-config
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <postinst> `abort-remove'
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+#DEBHELPER#
+
+case "$1" in
+    configure)
+	if hash invoke-rc.d; then
+	    invoke-rc.d ssh restart
+	else
+	    /etc/init.d/ssh restart
+	fi
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
Index: trunk/packages/invirt-ssh-config/debian/rules
===================================================================
--- trunk/packages/invirt-ssh-config/debian/rules	(revision 2855)
+++ trunk/packages/invirt-ssh-config/debian/rules	(revision 2855)
@@ -0,0 +1,24 @@
+#!/usr/bin/make -f
+
+DEB_DIVERT_EXTENSION = .invirt
+DEB_DIVERT_FILES_invirt-ssh-config += \
+	/etc/ssh/sshd_config.invirt
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/rules/config-package.mk
+
+debian/sshd_config.invirt-orig: /var/lib/dpkg/info/openssh-server.postinst
+	perl -0pe 's/^.*<<EOF[^\n]*\n(.*\n)EOF\n.*$$/$$1/s or die;' $< > $@
+
+common-build-indep:: debian/sshd_config.invirt
+
+debian/sshd_config.invirt: debian/sshd_config.invirt-orig
+	perl -0pe ' \
+	    s/^#?GSSAPIAuthentication .*$$/GSSAPIAuthentication yes\nGSSAPIKeyExchange yes\nGSSAPIStrictAcceptorCheck no/m and \
+	    s/^#?GSSAPICleanupCredentials .*$$/GSSAPICleanupCredentials yes/m and \
+	    s/^#?ChallengeResponseAuthentication .*$$/ChallengeResponseAuthentication yes/m and \
+	    s/^#?UsePrivilegeSeparation .*$$/UsePrivilegeSeparation yes/m and \
+	    s/^#?PasswordAuthentication .*$$/PasswordAuthentication no/m or die;' $< > $@
+
+clean::
+	rm -f debian/sshd_config.invirt debian/sshd_config.invirt-orig
