From e451cfe3c477c65c1674ed66238c2f4598f879ae Mon Sep 17 00:00:00 2001 From: Quentin Smith Date: Sat, 1 Nov 2008 00:33:34 -0400 Subject: [PATCH] Initial checkin of a GSSAPI subversion server package svn path=/trunk/packages/invirt-svn-server/; revision=1475 --- debian/changelog | 5 +++ debian/compat | 1 + debian/control | 14 +++++++++ debian/copyright | 16 ++++++++++ debian/invirt-svn-server.init | 61 +++++++++++++++++++++++++++++++++++++ debian/invirt-svn-server.install | 1 + debian/invirt-svn-server.postinst | 20 ++++++++++++ debian/rules | 5 +++ files/etc/sasl2/svn.conf | 1 + 9 files changed, 124 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/invirt-svn-server.init create mode 100644 debian/invirt-svn-server.install create mode 100644 debian/invirt-svn-server.postinst create mode 100755 debian/rules create mode 100644 files/etc/sasl2/svn.conf diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..c0a4ed5 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +invirt-svn-server (0.0.1) unstable; urgency=low + + * Initial Release. + + -- Quentin Smith Fri, 31 Oct 2008 23:44:14 -0400 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +5 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..fd17e45 --- /dev/null +++ b/debian/control @@ -0,0 +1,14 @@ +Source: invirt-svn-server +Section: base +Priority: extra +Maintainer: Invirt project +Build-Depends: cdbs, debhelper (>= 5) +Standards-Version: 3.7.2 + +Package: invirt-svn-server +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, subversion, + libsasl2-gssapi-mit, kstart, invirt-base +Description: Configures a Subversion server for Invirt + Configures a Subversion server for Invirt, committing to a SVN + repository in AFS and authenticating with GSSAPI. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..361ca8f --- /dev/null +++ b/debian/copyright @@ -0,0 +1,16 @@ +This software was written as part of the Invirt project . + +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. diff --git a/debian/invirt-svn-server.init b/debian/invirt-svn-server.init new file mode 100644 index 0000000..2628098 --- /dev/null +++ b/debian/invirt-svn-server.init @@ -0,0 +1,61 @@ +#!/usr/bin/pagsh -e +### BEGIN INIT INFO +# Provides: invirt-svn-server +# Required-Start: $local_fs $remote_fs $network $syslog openafs-client +# Required-Stop: $local_fs $remote_fs $network $syslog openafs-client +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start/stop subversion server +### END INIT INFO +# +# Apache kstart wrapper by anders. +# + +SCRIPT=/etc/init.d/apache2.invirt-orig +KSTART_PIDFILE=/var/run/k5start-invirt-svn.pid +KSTART_KEYTAB=/etc/invirt/keytab + +export AFSCELL=sipb.mit.edu + +kstart_start () { + TMP_PIDFILE=$(mktemp /tmp/k5start-invirt-svn-server.pid-XXXXXX) + chown invirt-svn "$TMP_PIDFILE" + export KRB5CCNAME=$(mktemp /tmp/krb5cc_33.kstart-XXXXXX) + chown invirt-svn $KRB5CCNAME + export KRB5_KTNAME=/etc/invirt/svn.keytab + /sbin/start-stop-daemon --start --pidfile "$TMP_PIDFILE" -c invirt-svn \ + --exec /usr/bin/k5start -- -b -p "$TMP_PIDFILE" \ + -U -f "$KSTART_KEYTAB" -K10 -S afs -I "$AFSCELL" -t -b \ + sudo -u invirt-svn svnserve -d --foreground -r "$(invirt-getconf svn.repopath)" + cat "$TMP_PIDFILE" >|"$KSTART_PIDFILE" + rm -f "$TMP_PIDFILE" +} +kstart_stop () { + if [ -e $KSTART_PIDFILE ]; then + /sbin/start-stop-daemon --stop --pidfile $KSTART_PIDFILE + rm -f $KSTART_PIDFILE + else + echo -n " ... no kstart pidfile" + fi +} + +case "$1" in + start) + echo -n "Starting kstart for Subversion: k5start" + kstart_start + echo "." + ;; + stop) + echo -n "Stopping kstart for Subversion: k5start" + kstart_stop + echo "." + ;; + restart|force-reload) + "$0" stop + sleep 1 + "$0" start + ;; + *) + exec "$SCRIPT" "$@" + ;; +esac diff --git a/debian/invirt-svn-server.install b/debian/invirt-svn-server.install new file mode 100644 index 0000000..9da31b3 --- /dev/null +++ b/debian/invirt-svn-server.install @@ -0,0 +1 @@ +files/* . diff --git a/debian/invirt-svn-server.postinst b/debian/invirt-svn-server.postinst new file mode 100644 index 0000000..f96fb91 --- /dev/null +++ b/debian/invirt-svn-server.postinst @@ -0,0 +1,20 @@ +#!/bin/sh +set -e + +#DEBHELPER# + +case "$1" in + configure) + if [ -z "$2" ]; then + adduser --system invirt-svn + fi + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..2815a4d --- /dev/null +++ b/debian/rules @@ -0,0 +1,5 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/rules/debhelper.mk + +# Add here any variable or target overrides you need. diff --git a/files/etc/sasl2/svn.conf b/files/etc/sasl2/svn.conf new file mode 100644 index 0000000..d173762 --- /dev/null +++ b/files/etc/sasl2/svn.conf @@ -0,0 +1 @@ +mech_list: gssapi -- 1.7.9.5