--- debathena-moira-4.0.0-r4113.orig/debian/control
+++ debathena-moira-4.0.0-r4113/debian/control
@@ -0,0 +1,109 @@
+Source: debathena-moira
+Section: debathena/net
+Priority: extra
+Maintainer: Debathena Project <debathena@mit.edu>
+Build-Depends: autotools-dev,
+ debhelper,
+ dh-buildinfo,
+ quilt,
+ patchutils (>= 0.2.25),
+ cdbs (>= 0.4.27), comerr-dev, libkrb5-dev, libhesiod-dev,
+ libzephyr-dev, libreadline-dev, libncurses-dev, libssl-dev
+Standards-Version: 3.9.1
+
+Package: debathena-moira-clients
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, libzephyr4-krb5 | libzephyr3-krb
+Conflicts: debathena-moira-update-server (<= 4.0.0+cvs20090728-0debathena1), stella
+Description: Clients for the Moira database
+ Moira is the Athena Service Management system.  It serves as the 
+ central repository for information about users, groups hosts, print 
+ queues, and several other aspects of the Athena environment.
+ .
+ This package contains clients such as moira, stella, blanche, etc.
+
+Package: debathena-moira-update-server
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, libzephyr4-krb5 |
+ libzephyr3-krb
+Description: Athena update_server
+ Moira is the Athena Service Management system.  It serves as the 
+ central repository for information about users, groups hosts, print 
+ queues, and several other aspects of the Athena environment.
+ .
+ This package contains the update_server daemon, which is used for
+ servers that automatically receive information dumps from moira.
+
+Package: debathena-libmoira0
+Section: debathena/libs
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: The Moira library
+ Moira is the Athena Service Management system.  It serves as the 
+ central repository for information about users, groups hosts, print 
+ queues, and several other aspects of the Athena environment.
+ .
+ This package contains the shared Moira library.
+
+Package: debathena-libmoira0-dbg
+Section: debathena/libdevel
+Architecture: any
+Depends: debathena-libmoira0 (= ${binary:Version}), ${shlibs:Depends},
+ ${misc:Depends}
+Description: The Moira library - library with debugging symbols
+ Moira is the Athena Service Management system.  It serves as the 
+ central repository for information about users, groups hosts, print 
+ queues, and several other aspects of the Athena environment.
+ .
+ This package contains an unstripped shared library. It will be used
+ automatically by gdb for debugging libmoira-related issues.
+
+Package: debathena-libmoira-dev
+Section: debathena/libdevel
+Architecture: any
+Provides: libmoira-dev
+Depends: debathena-libmoira0 (= ${binary:Version}), ${shlibs:Depends},
+ ${misc:Depends}, comerr-dev, libkrb5-dev, libhesiod-dev,
+ libzephyr-dev, libzephyr4-krb5 | libzephyr3-krb
+Description: Development files for Moira library
+ Moira is the Athena Service Management system.  It serves as the 
+ central repository for information about users, groups hosts, print 
+ queues, and several other aspects of the Athena environment.
+ .
+ This package contains headers and static libraries for development.
+
+Package: debathena-libmrclient0
+Section: debathena/libs
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: The Moira client library
+ Moira is the Athena Service Management system.  It serves as the 
+ central repository for information about users, groups hosts, print 
+ queues, and several other aspects of the Athena environment.
+ .
+ This package contains the shared Moira client library.
+
+Package: debathena-libmrclient0-dbg
+Section: debathena/libdevel
+Architecture: any
+Depends: debathena-libmrclient0 (= ${binary:Version}),
+ ${shlibs:Depends}, ${misc:Depends}
+Description: The Moira client library - library with debugging symbols.
+ Moira is the Athena Service Management system.  It serves as the 
+ central repository for information about users, groups hosts, print 
+ queues, and several other aspects of the Athena environment.
+ .
+ This package contains an unstripped shared library. It will be used
+ automatically by gdb for debugging libmrclient-related issues.
+
+Package: debathena-libmrclient-dev
+Section: debathena/libdevel
+Architecture: any
+Depends: debathena-libmrclient0 (= ${binary:Version}),
+ ${shlibs:Depends}, ${misc:Depends}, debathena-libmoira-dev
+Description: Development files for the Moira client library
+ Moira is the Athena Service Management system.  It serves as the 
+ central repository for information about users, groups hosts, print 
+ queues, and several other aspects of the Athena environment.
+ .
+ This package contains headers and static libraries for development.
--- debathena-moira-4.0.0-r4113.orig/debian/compat
+++ debathena-moira-4.0.0-r4113/debian/compat
@@ -0,0 +1 @@
+6
--- debathena-moira-4.0.0-r4113.orig/debian/control.in
+++ debathena-moira-4.0.0-r4113/debian/control.in
@@ -0,0 +1,104 @@
+Source: debathena-moira
+Section: debathena/net
+Priority: extra
+Maintainer: Debathena Project <debathena@mit.edu>
+Build-Depends: @cdbs@, comerr-dev, libkrb5-dev, libhesiod-dev,
+ libzephyr-dev, libreadline-dev, libncurses-dev, libssl-dev
+Standards-Version: 3.9.1
+
+Package: debathena-moira-clients
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, libzephyr4-krb5 | libzephyr3-krb
+Conflicts: debathena-moira-update-server (<= 4.0.0+cvs20090728-0debathena1), stella
+Description: Clients for the Moira database
+ Moira is the Athena Service Management system.  It serves as the 
+ central repository for information about users, groups hosts, print 
+ queues, and several other aspects of the Athena environment.
+ .
+ This package contains clients such as moira, stella, blanche, etc.
+
+Package: debathena-moira-update-server
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, libzephyr4-krb5 |
+ libzephyr3-krb
+Description: Athena update_server
+ Moira is the Athena Service Management system.  It serves as the 
+ central repository for information about users, groups hosts, print 
+ queues, and several other aspects of the Athena environment.
+ .
+ This package contains the update_server daemon, which is used for
+ servers that automatically receive information dumps from moira.
+
+Package: debathena-libmoira0
+Section: debathena/libs
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: The Moira library
+ Moira is the Athena Service Management system.  It serves as the 
+ central repository for information about users, groups hosts, print 
+ queues, and several other aspects of the Athena environment.
+ .
+ This package contains the shared Moira library.
+
+Package: debathena-libmoira0-dbg
+Section: debathena/libdevel
+Architecture: any
+Depends: debathena-libmoira0 (= ${binary:Version}), ${shlibs:Depends},
+ ${misc:Depends}
+Description: The Moira library - library with debugging symbols
+ Moira is the Athena Service Management system.  It serves as the 
+ central repository for information about users, groups hosts, print 
+ queues, and several other aspects of the Athena environment.
+ .
+ This package contains an unstripped shared library. It will be used
+ automatically by gdb for debugging libmoira-related issues.
+
+Package: debathena-libmoira-dev
+Section: debathena/libdevel
+Architecture: any
+Provides: libmoira-dev
+Depends: debathena-libmoira0 (= ${binary:Version}), ${shlibs:Depends},
+ ${misc:Depends}, comerr-dev, libkrb5-dev, libhesiod-dev,
+ libzephyr-dev, libzephyr4-krb5 | libzephyr3-krb
+Description: Development files for Moira library
+ Moira is the Athena Service Management system.  It serves as the 
+ central repository for information about users, groups hosts, print 
+ queues, and several other aspects of the Athena environment.
+ .
+ This package contains headers and static libraries for development.
+
+Package: debathena-libmrclient0
+Section: debathena/libs
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: The Moira client library
+ Moira is the Athena Service Management system.  It serves as the 
+ central repository for information about users, groups hosts, print 
+ queues, and several other aspects of the Athena environment.
+ .
+ This package contains the shared Moira client library.
+
+Package: debathena-libmrclient0-dbg
+Section: debathena/libdevel
+Architecture: any
+Depends: debathena-libmrclient0 (= ${binary:Version}),
+ ${shlibs:Depends}, ${misc:Depends}
+Description: The Moira client library - library with debugging symbols.
+ Moira is the Athena Service Management system.  It serves as the 
+ central repository for information about users, groups hosts, print 
+ queues, and several other aspects of the Athena environment.
+ .
+ This package contains an unstripped shared library. It will be used
+ automatically by gdb for debugging libmrclient-related issues.
+
+Package: debathena-libmrclient-dev
+Section: debathena/libdevel
+Architecture: any
+Depends: debathena-libmrclient0 (= ${binary:Version}),
+ ${shlibs:Depends}, ${misc:Depends}, debathena-libmoira-dev
+Description: Development files for the Moira client library
+ Moira is the Athena Service Management system.  It serves as the 
+ central repository for information about users, groups hosts, print 
+ queues, and several other aspects of the Athena environment.
+ .
+ This package contains headers and static libraries for development.
--- debathena-moira-4.0.0-r4113.orig/debian/changelog
+++ debathena-moira-4.0.0-r4113/debian/changelog
@@ -0,0 +1,264 @@
+debathena-moira (4.0.0-r4113-0debathena0) unstable; urgency=low
+
+  * Snapshot moira at r4113 to pick up new firewall-related changes
+
+ -- Jonathan Reed <jdreed@mit.edu>  Fri, 31 May 2013 10:39:59 -0400
+
+debathena-moira (4.0.0-r4097-0debathena1) unstable; urgency=low
+
+  * Re-snapshot moira at r4097 to pick up Status 10 (Suspended) (Trac: #1295)
+  * Remove our addusr.1 and namespace.1 in favor of upstreams (Trac: #918)
+  * Build-dep on OpenSSL and pass new configure flag per moira r4091
+
+ -- Jonathan Reed <jdreed@mit.edu>  Thu, 21 Feb 2013 11:51:39 -0500
+
+debathena-moira (4.0.0-r4081-0debathena1) unstable; urgency=low
+
+  * Re-snapshot moira at r4081, to pick up client changes for lockers of
+    type 'SITE'
+
+ -- Jonathan Reed <jdreed@mit.edu>  Fri, 01 Jun 2012 12:01:20 -0400
+
+debathena-moira (4.0.0-r4077-0debathena1) unstable; urgency=low
+
+  * Re-snapshot moira at r4077, which incorporates the
+    -Werror=format-security fixes from 4.0.0-r4073-0debathena2, except
+    from upstream instead of from us.  
+
+ -- Jonathan Reed <jdreed@mit.edu>  Mon, 07 May 2012 14:31:58 -0400
+
+debathena-moira (4.0.0-r4073-0debathena2) unstable; urgency=low
+
+  * Make -Werror=format-security happy
+
+ -- Jonathan Reed <jdreed@mit.edu>  Thu, 03 May 2012 15:37:54 -0400
+
+debathena-moira (4.0.0-r4073-0debathena1) unstable; urgency=low
+
+  * Re-snapshot moira at r4073 to pick up new changes to clients; the
+    eunice issue described in the previous entry is no longer relevant
+
+ -- Jonathan Reed <jdreed@mit.edu>  Wed, 29 Feb 2012 15:24:32 -0500
+
+debathena-moira (4.0.0-r4048-0debathena2) unstable; urgency=low
+
+  * Revert eunice.c to Moira r3998 / Debathena r24319 because the
+    corresponding functionality on the server is not yet available, per
+    zacheiss
+
+ -- Jonathan Reed <jdreed@mit.edu>  Tue, 06 Sep 2011 10:42:55 -0400
+
+debathena-moira (4.0.0-r4048-0debathena1) unstable; urgency=low
+
+  [ Geoffrey Thomas ]
+  * Conflict with the stella package.
+
+  [ Jonathan Reed ]
+  * Use correct lt-nl comparison in moira-update-server postinst to avoid
+    enabling update_server everywhere.
+  * Re-snapshot moira at r4048
+  * Use a less stupid version number for this package.
+
+ -- Jonathan Reed <jdreed@mit.edu>  Mon, 29 Aug 2011 11:00:38 -0400
+
+debathena-moira (4.0.0+svn20110728-r4045-0debathena2) unstable; urgency=low
+
+  * Install new upstream file /etc/shells.moira
+
+ -- Geoffrey Thomas <geofft@mit.edu>  Tue, 02 Aug 2011 02:12:09 -0400
+
+debathena-moira (4.0.0+svn20110728-r4045-0debathena1) unstable; urgency=low
+
+  * Snapshot moira@r4045 (7/28/11)
+
+ -- Jonathan Reed <jdreed@mit.edu>  Thu, 28 Jul 2011 16:43:28 -0400
+
+debathena-moira (4.0.0+svn20110628-r4042-0debathena1) unstable; urgency=low
+
+  * Snapshot moira@r4042 (6/28/11)
+  * Update version number to include moira revision number
+
+ -- Jonathan Reed <jdreed@mit.edu>  Thu, 30 Jun 2011 12:04:02 -0400
+
+debathena-moira (4.0.0+svn20100405-0debathena4) unstable; urgency=low
+
+  * Don't turn off the daemon on workstations that previously had enabled it
+
+ -- Jonathan Reed <jdreed@mit.edu>  Wed, 23 Mar 2011 09:41:53 -0400
+
+debathena-moira (4.0.0+svn20100405-0debathena3) unstable; urgency=low
+
+  * Add manpages for addusr and namespace (Trac: 268)
+  * Use a .pid file in the initscript
+
+ -- Jonathan Reed <jdreed@mit.edu>  Tue, 15 Mar 2011 22:59:55 -0400
+
+debathena-moira (4.0.0+svn20100405-0debathena2) unstable; urgency=low
+
+  * Add debathena-moira-update-server.default file
+  * Do not start daemon unless enabled in aforementioned file
+
+ -- Jonathan Reed <jdreed@mit.edu>  Wed, 02 Mar 2011 16:56:27 -0500
+
+debathena-moira (4.0.0+svn20100405-0debathena1) unstable; urgency=low
+
+  * New SVN snapshot.
+  * Bump debhelper compatibility. (No changes required)
+  * Bump debian standards version. (No changes required)
+  * Punt some directories that were retconned away in the svn conversion.
+
+ -- Evan Broder <broder@mit.edu>  Mon, 05 Apr 2010 15:25:18 -0400
+
+debathena-moira (4.0.0+svn20100225-0debathena2) UNRELEASED; urgency=low
+
+  * There is no "lib" section - it's "libs".
+
+ -- Evan Broder <broder@mit.edu>  Fri, 26 Feb 2010 12:50:19 -0500
+
+debathena-moira (4.0.0+svn20100225-0debathena1) unstable; urgency=low
+
+  * New SVN snapshot.
+
+ -- Evan Broder <broder@mit.edu>  Thu, 25 Feb 2010 15:54:26 -0500
+
+debathena-moira (4.0.0+svn20100223-0debathena1) unstable; urgency=low
+
+  * New SVN snapshot.
+  * Drop patch install-headers, which was incorporated upstream.
+
+ -- Evan Broder <broder@mit.edu>  Thu, 25 Feb 2010 02:13:44 -0500
+
+debathena-moira (4.0.0+svn20100104-0debathena1) unstable; urgency=low
+
+  * New SVN snapshot.
+  * Build and install libmrclient as a shared library.
+  * Deal with rename of /etc{/athena => }/moira.conf
+  * Patch manpages to deal with our installation paths.
+
+ -- Evan Broder <broder@mit.edu>  Mon, 04 Jan 2010 22:05:10 -0500
+
+debathena-moira (4.0.0+cvs20091116-0debathena1) unstable; urgency=low
+
+  * New CVS snapshot.
+  * Drop patch fix-update-ticket, which was incorporated upstream.
+  * Add a missing definition of ${prefix} in include/Makefile.in so that
+    the moira.h header actually gets installed in
+    /usr/include/moira. (Trac: #445)
+
+ -- Evan Broder <broder@mit.edu>  Thu, 19 Nov 2009 10:53:40 -0500
+
+debathena-moira (4.0.0+cvs20090922-0debathena1) unstable; urgency=low
+
+  * New CVS snapshot.
+  * Add patch to fix builds without krb4.
+
+ -- Evan Broder <broder@mit.edu>  Tue, 22 Sep 2009 00:35:12 -0400
+
+debathena-moira (4.0.0+cvs20090728-0debathena3) unstable; urgency=low
+
+  * Add a missing conflicts to make upgrades run more smoothly.
+
+ -- Evan Broder <broder@mit.edu>  Tue, 28 Jul 2009 18:28:33 -0700
+
+debathena-moira (4.0.0+cvs20090728-0debathena2) unstable; urgency=low
+
+  * Include the headers in debathena-libmoira-dev.
+  * Install update_test in moira-clients instead of moira-update-server.
+
+ -- Evan Broder <broder@mit.edu>  Tue, 28 Jul 2009 17:54:34 -0700
+
+debathena-moira (4.0.0+cvs20090728-0debathena1) unstable; urgency=low
+
+  * New CVS snapshot.
+  * Fix zephyr dependencies to actually pull in Kerberized libraries; drop
+    build-dep on Kerberized library.
+
+ -- Evan Broder <broder@mit.edu>  Tue, 28 Jul 2009 13:43:28 -0400
+
+debathena-moira (4.0.0+cvs20090621-0debathena1) unstable; urgency=low
+
+  * New CVS snapshot.
+  * Drop krb4less-fix; it was incorporated upstream.
+  * Universally stop building Moira with krb4 support.
+
+ -- Evan Broder <broder@mit.edu>  Fri, 26 Jun 2009 00:51:28 -0400
+
+debathena-moira (4.0.0+cvs20090618-0debathena1) unstable; urgency=low
+
+  * New upstream release
+  * Build and install libmoira as a shared library. (Trac: #70)
+  * Drop most of the krb4 patch - it's been incorporated upstream.
+  * Install the Moira development headers by patching the relevant
+    Makefiles, instead of in the debian/rules file.
+
+ -- Evan Broder <broder@mit.edu>  Sat, 20 Jun 2009 14:45:32 -0400
+
+debathena-moira (4.0.0+cvs20090409-0debathena1) unstable; urgency=low
+
+  * New CVS snapshot (Trac: #195)
+  * Drop patches that have been incorporated upstream.
+  * Add patch to allow building on systems without krb4. (Trac: #198)
+
+ -- Evan Broder <broder@mit.edu>  Sun, 12 Apr 2009 14:03:22 -0400
+
+debathena-moira (4.0.0+cvs20080830-0debathena2) unstable; urgency=low
+
+  * Remove DEB_AUTO_UPDATE_DEBIAN_CONTROL.
+  * Change "Debian-Athena Project" to "Debathena Project".
+  * Remove debian/control from version control.
+
+ -- Tim Abbott <tabbott@mit.edu>  Sat, 24 Jan 2009 15:32:35 -0500
+
+debathena-moira (4.0.0+cvs20080830-0debathena1) unstable; urgency=low
+
+  * New CVS snapshot
+  * Add a debathena-moira-update-server package that installs
+    update_server
+
+ -- Evan Broder <broder@mit.edu>  Fri, 01 Aug 2008 10:54:26 -0400
+
+debathena-moira (4.0.0+cvs20080701-0debathena1) unstable; urgency=low
+
+  * New CVS snapshot
+  * Move Moira header files from /usr/share/include to /usr/include/moira
+
+ -- Evan Broder <broder@mit.edu>  Tue, 01 Jul 2008 20:38:13 -0400
+
+debathena-moira (4.0.0+cvs20080304-0debathena1) unstable; urgency=low
+
+  * New CVS snapshot to fix chsh.
+
+ -- Anders Kaseorg <andersk@mit.edu>  Tue, 04 Mar 2008 15:50:31 -0500
+
+debathena-moira (4.0.0+cvs20080301-0debathena1) unstable; urgency=low
+
+  * New CVS snapshot.
+  * Remove mrtest segfault patch from last release (fixed in upstream)
+
+ -- Tim Abbott <tabbott@mit.edu>  Sat,  1 Mar 2008 18:51:40 -0500
+
+debathena-moira (4.0.0+cvs20070817-0debathena1) unstable; urgency=low
+
+  * New CVS snapshot.
+  * Patch an mrtest segfault with too many command line arguments.
+
+ -- Anders Kaseorg <andersk@mit.edu>  Fri, 24 Aug 2007 19:53:49 -0400
+
+debathena-moira (4.0.0+cvs20070129-0debathena3) unstable; urgency=low
+
+  * Move chsh.debathena to chsh.moira and chfn.debathena to chfn.moira.
+
+ -- Anders Kaseorg <andersk@mit.edu>  Mon, 06 Aug 2007 03:17:10 -0400
+
+debathena-moira (4.0.0+cvs20070129-0debathena2) unstable; urgency=low
+
+  * Add missing build dependencies to libmoira-dev.
+  * Section: debathena/net.
+
+ -- Anders Kaseorg <andersk@mit.edu>  Tue, 17 Jul 2007 06:34:07 -0400
+
+debathena-moira (4.0.0+cvs20070129-0debathena1) unstable; urgency=low
+
+  * Initial release.
+
+ -- Anders Kaseorg <andersk@mit.edu>  Wed, 14 Feb 2007 00:53:24 -0500
--- debathena-moira-4.0.0-r4113.orig/debian/debathena-moira-clients.install
+++ debathena-moira-4.0.0-r4113/debian/debathena-moira-clients.install
@@ -0,0 +1,21 @@
+usr/bin/addusr
+usr/bin/blanche
+usr/bin/chfn.moira
+usr/bin/chpobox
+usr/bin/chsh.moira
+usr/bin/eunice
+usr/bin/mitch
+usr/bin/namespace
+usr/bin/moira
+usr/bin/mrcheck
+usr/bin/mrtest
+usr/bin/stanley
+usr/bin/stella
+usr/bin/mailmaint
+usr/bin/listmaint
+usr/bin/dcmmaint
+usr/bin/usermaint
+usr/bin/update_test
+usr/share/man/man1/*
+usr/share/man/man8/mrtest.8
+etc/shells.moira
--- debathena-moira-4.0.0-r4113.orig/debian/copyright
+++ debathena-moira-4.0.0-r4113/debian/copyright
@@ -0,0 +1,23 @@
+This package was debianized as part of the Debathena Project
+<http://debathena.mit.edu/> of the MIT Student Information Processing
+Board.
+
+The Moira source code was obtained from the Moira CVS repository at 
+/afs/athena.mit.edu/astaff/project/moiradev, and is licensed as follows:
+
+  Copyright © 1987-1998 by the Massachusetts Institute of Technology
+  
+  Permission to use, copy, modify, and distribute this
+  software and its documentation for any purpose and without
+  fee is hereby granted, provided that the above copyright
+  notice appear in all copies and that both that copyright
+  notice and this permission notice appear in supporting
+  documentation, and that the name of M.I.T. not be used in
+  advertising or publicity pertaining to distribution of the
+  software without specific, written prior permission.
+  M.I.T. makes no representations about the suitability of
+  this software for any purpose.  It is provided "as is"
+  without express or implied warranty.
+
+The Debian packaging is Copyright © 2007-2008 Tim Abbott and Anders
+Kaseorg, and has the same license as the original software.
--- debathena-moira-4.0.0-r4113.orig/debian/rules
+++ debathena-moira-4.0.0-r4113/debian/rules
@@ -0,0 +1,21 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/autotools.mk
+include /usr/share/cdbs/1/rules/patchsys-quilt.mk
+
+DEB_CONFIGURE_EXTRA_FLAGS += --without-krb4 --with-krb5 --with-hesiod --with-zephyr --with-com_err=/usr --without-oracle --without-afs --disable-rpath --with-openssl
+DEB_DH_INSTALL_SOURCEDIR = $(DEB_DESTDIR)
+DEB_DH_STRIP_ARGS_debathena-libmoira0 += --dbg-package=debathena-libmoira0-dbg
+DEB_DH_STRIP_ARGS_debathena-libmrclient0 += --dbg-package=debathena-libmrclient0-dbg
+
+common-install-impl::
+	mv $(DEB_DESTDIR)/usr/bin/chfn $(DEB_DESTDIR)/usr/bin/chfn.moira
+	mv $(DEB_DESTDIR)/usr/bin/chsh $(DEB_DESTDIR)/usr/bin/chsh.moira
+	mv $(DEB_DESTDIR)/usr/share/man/man1/chsh.1 \
+		$(DEB_DESTDIR)/usr/share/man/man1/chsh.moira.1
+	mv $(DEB_DESTDIR)/usr/share/man/man1/chfn.1 \
+		$(DEB_DESTDIR)/usr/share/man/man1/chfn.moira.1
+
+clean::
+	rm -f libtool util/rsaref/Makefile
--- debathena-moira-4.0.0-r4113.orig/debian/debathena-moira-update-server.init
+++ debathena-moira-4.0.0-r4113/debian/debathena-moira-update-server.init
@@ -0,0 +1,152 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides:          debathena-moira-update-server
+# Required-Start:    $local_fs $remote_fs
+# Required-Stop:     $local_fs $remote_fs
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Moira update_server
+# Description:       The moira update_server program for taking updates from
+#                    moira
+### END INIT INFO
+
+# Author: Evan Broder <broder@mit.edu>
+
+# Do NOT "set -e"
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
+DESC="Moira update_server"
+NAME=debathena-moira-update-server
+DAEMON=/usr/sbin/update_server
+DAEMON_ARGS=""
+SCRIPTNAME=/etc/init.d/$NAME
+ENABLED=false
+PIDFILE=/var/run/update_server.pid
+
+# Exit if the package is not installed
+[ -x "$DAEMON" ] || exit 0
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+# Exit if the daemon has not been enabled
+[ "$ENABLED" = true ] || exit 0
+
+# Load the VERBOSE setting and other rcS variables
+[ -f /etc/default/rcS ] && . /etc/default/rcS
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
+. /lib/lsb/init-functions
+
+# Function that starts the daemon/service
+#
+do_start()
+{
+	# Return
+	#   0 if daemon has been started
+	#   1 if daemon was already running
+	#   2 if daemon could not be started
+
+        # Remove the following once #849 is fixed and update_server is 
+        # capable of writing its own pidfile
+        PID="$(pgrep -f $DAEMON)"
+	if [ -n "$PID" ]; then
+	    if ! [ -f "$PIDFILE" ]; then
+		echo "$PID" > $PIDFILE
+	    elif [ "$(cat $PIDFILE)" != "$PID" ]; then
+		rm -f $PIDFILE
+		echo "$PID" > $PIDFILE
+	    fi
+	fi
+	start-stop-daemon --start --quiet --pidfile $PIDFILE \
+	        --exec $DAEMON --test > /dev/null \
+		|| return 1
+	start-stop-daemon --start --quiet --pidfile $PIDFILE \
+		--exec $DAEMON -- \
+		$DAEMON_ARGS \
+		|| return 2
+        # Remove the following once #849 is fixed and update_server is 
+        # capable of writing its own pidfile
+	sleep 1
+	# If we got here, we successfully started the daemon, 
+	# so overwrite the PID file
+	rm -f $PIDFILE
+        PID="$(pgrep -f $DAEMON)"
+	echo "$PID" > $PIDFILE
+	# Add code here, if necessary, that waits for the process to be ready
+	# to handle requests from services started subsequently which depend
+	# on this one.  As a last resort, sleep for some time.
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+	# Return
+	#   0 if daemon has been stopped
+	#   1 if daemon was already stopped
+	#   2 if daemon could not be stopped
+	#   other if a failure occurred
+	start-stop-daemon --stop --quiet --pidfile $PIDFILE 
+	RETVAL="$?"
+	[ "$RETVAL" = 2 ] && return 2
+	# Wait for children to finish too if this is a daemon that forks
+	# and if the daemon is only ever run from this initscript.
+	# If the above conditions are not satisfied then add some other code
+	# that waits for the process to drop all resources that could be
+	# needed by services started subsequently.  A last resort is to
+	# sleep for some time.
+	start-stop-daemon --stop --quiet --oknodo --retry=0/10/KILL/5 --exec $DAEMON
+	[ "$?" = 2 ] && return 2
+	return "$RETVAL"
+}
+
+case "$1" in
+  start)
+	[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+	do_start
+	case "$?" in
+		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+	esac
+	;;
+  stop)
+	[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+	do_stop
+	case "$?" in
+		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+	esac
+	;;
+  restart|force-reload)
+	#
+	# If the "reload" option is implemented then remove the
+	# 'force-reload' alias
+	#
+	log_daemon_msg "Restarting $DESC" "$NAME"
+	do_stop
+	case "$?" in
+	  0|1)
+		do_start
+		case "$?" in
+			0) log_end_msg 0 ;;
+			1) log_end_msg 1 ;; # Old process is still running
+			*) log_end_msg 1 ;; # Failed to start
+		esac
+		;;
+	  *)
+	  	# Failed to stop
+		log_end_msg 1
+		;;
+	esac
+	;;
+  *)
+	echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+	exit 3
+	;;
+esac
+
+:
--- debathena-moira-4.0.0-r4113.orig/debian/debathena-libmoira-dev.install
+++ debathena-moira-4.0.0-r4113/debian/debathena-libmoira-dev.install
@@ -0,0 +1,8 @@
+usr/include/moira/moira.h
+usr/include/moira/mr_et.h
+usr/include/moira/krb_et.h
+usr/include/moira/ureg_err.h
+usr/share/man/man3/*
+usr/lib/libmoira.so
+usr/lib/libmoira.la
+usr/lib/libmoira.a
--- debathena-moira-4.0.0-r4113.orig/debian/debathena-moira-update-server.install
+++ debathena-moira-4.0.0-r4113/debian/debathena-moira-update-server.install
@@ -0,0 +1,3 @@
+usr/sbin/update_server
+usr/share/man/man8/update_server.8
+etc/moira.conf
--- debathena-moira-4.0.0-r4113.orig/debian/debathena-libmoira0.install
+++ debathena-moira-4.0.0-r4113/debian/debathena-libmoira0.install
@@ -0,0 +1 @@
+usr/lib/libmoira.so.*
--- debathena-moira-4.0.0-r4113.orig/debian/debathena-libmrclient0.install
+++ debathena-moira-4.0.0-r4113/debian/debathena-libmrclient0.install
@@ -0,0 +1 @@
+usr/lib/libmrclient.so.*
--- debathena-moira-4.0.0-r4113.orig/debian/debathena-moira-update-server.postinst
+++ debathena-moira-4.0.0-r4113/debian/debathena-moira-update-server.postinst
@@ -0,0 +1,66 @@
+#!/bin/sh
+# postinst script for debathena-moira-update-server
+#
+# 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
+
+# Move a conffile without triggering a dpkg question
+mv_conffile() {
+    OLDCONFFILE="$1"
+    NEWCONFFILE="$2"
+
+    [ -e "$OLDCONFFILE" ] || return 0
+
+    echo "Preserving user changes to $NEWCONFFILE ..."
+    mv -f "$NEWCONFFILE" "$NEWCONFFILE".dpkg-new
+    mv -f "$OLDCONFFILE" "$NEWCONFFILE"
+}
+
+case "$1" in
+    configure)
+	if dpkg --compare-versions "$2" lt 4.0.0+svn20100104-0debathena1~; then
+	    mv_conffile /etc/athena/moira.conf /etc/moira.conf
+
+	    # If that empties out /etc/athena, then delete it
+	    rmdir --ignore-fail-on-non-empty /etc/athena
+	fi
+	if dpkg --compare-versions "$2" lt-nl 4.0.0+svn20100405-0debathena2~; then
+	    # If they're upgrading from a version that pre-dates
+	    # the defaults file, then they probably had it installed for
+	    # a reason, so we should turn it on (if it's not a cluster machine)
+	    if ! dpkg-query --showformat '${Status}\n' -W "debathena-cluster" 2>/dev/null | grep -q ' installed$'; then
+		sed -i -e 's/^ENABLED=.*$/ENABLED=true/' /etc/default/debathena-moira-update-server
+	    fi
+	fi
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- debathena-moira-4.0.0-r4113.orig/debian/debathena-moira-update-server.preinst
+++ debathena-moira-4.0.0-r4113/debian/debathena-moira-update-server.preinst
@@ -0,0 +1,53 @@
+#!/bin/sh
+# preinst script for debathena-moira-update-server
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <new-preinst> `install'
+#        * <new-preinst> `install' <old-version>
+#        * <new-preinst> `upgrade' <old-version>
+#        * <old-preinst> `abort-upgrade' <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+# Prepare to move a conffile without triggering a dpkg question
+prep_mv_conffile() {
+    PKGNAME="$1"
+    CONFFILE="$2"
+
+    [ -e "$CONFFILE" ] || return 0
+
+    md5sum="$(md5sum $CONFFILE | sed -e 's/ .*//')"
+    old_md5sum="$(dpkg-query -W -f='${Conffiles}' $PKGNAME | sed -n -e "\' $CONFFILE ' { s/ obsolete$//; s/.* //; p }")"
+    if [ "$md5sum" = "$old_md5sum" ]; then
+        rm -f "$CONFFILE"
+    fi
+}
+
+case "$1" in
+    install|upgrade)
+	if dpkg --compare-versions "$2" lt 4.0.0+svn20100104-0debathena1~; then
+	    prep_mv_conffile debathena-moira-update-server /etc/athena/moira.conf
+	fi
+    ;;
+
+    abort-upgrade)
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- debathena-moira-4.0.0-r4113.orig/debian/debathena-libmrclient-dev.install
+++ debathena-moira-4.0.0-r4113/debian/debathena-libmrclient-dev.install
@@ -0,0 +1,4 @@
+usr/include/moira/mrclient.h
+usr/lib/libmrclient.so
+usr/lib/libmrclient.la
+usr/lib/libmrclient.a
--- debathena-moira-4.0.0-r4113.orig/debian/debathena-moira-update-server.default
+++ debathena-moira-4.0.0-r4113/debian/debathena-moira-update-server.default
@@ -0,0 +1,8 @@
+# Defaults for debathena-moira-update-server
+
+# Arguments for /usr/sbin/update_server
+DAEMON_ARGS=""
+
+# Enabled by default?
+# Values: false, true
+ENABLED=false
--- debathena-moira-4.0.0-r4113.orig/debian/patches/series
+++ debathena-moira-4.0.0-r4113/debian/patches/series
@@ -0,0 +1 @@
+fix-manpage-paths
--- debathena-moira-4.0.0-r4113.orig/debian/patches/fix-manpage-paths
+++ debathena-moira-4.0.0-r4113/debian/patches/fix-manpage-paths
@@ -0,0 +1,39 @@
+Index: moira/man/update_server.8
+===================================================================
+--- moira.orig/man/update_server.8	2010-01-04 21:12:54.000000000 -0500
++++ moira/man/update_server.8	2010-01-04 22:03:58.000000000 -0500
+@@ -14,7 +14,7 @@
+ it is needed.
+ .SH OPTIONS
+ While there are no command line options, a configuration file
+-.I /etc/athena/moira.conf
++.I /etc/moira.conf
+ may specify a number of options.  This file may contain blank lines,
+ comments preceeded by hash marks, boolean options, or string options.
+ A boolean option is set by just putting the name of the option on a
+@@ -48,7 +48,7 @@
+ .B sms
+ in the local realm is assumed.
+ .SH FILES
+-/etc/athena/moira.conf \- For configuration variables.
+-/etc/athena/srvtab \- It must be able to get rcmd Kerberos tickets.
++/etc/moira.conf \- For configuration variables.
++/etc/srvtab \- It must be able to get rcmd Kerberos tickets.
+ .SH "SEE ALSO"
+ The Project Athena Technical Plan section on Moira.
+Index: moira/man/moira.3
+===================================================================
+--- moira.orig/man/moira.3	2010-01-04 22:04:05.000000000 -0500
++++ moira/man/moira.3	2010-01-04 22:04:20.000000000 -0500
+@@ -239,9 +239,9 @@
+ except that it uses strcmp on the elements rather than comparing the
+ addresses directly.
+ .SH FILES
+-/usr/athena/include/moira.h
++/usr/include/moira/moira.h
+ .br
+-/usr/athena/include/mr_et.h
++/usr/include/moira/mr_et.h
+ .br
+ /tmp/tkt###
+ .SH "SEE ALSO"
