Index: /tags/2.4/README.debian
===================================================================
--- /tags/2.4/README.debian	(revision 83)
+++ /tags/2.4/README.debian	(revision 83)
@@ -0,0 +1,10 @@
+torque for Debian
+----------------------
+
+Comments regarding the Package.
+
+Always see debian/patches/apply file. To see what patches you may
+need to include for the different torque versions.
+
+
+Bas van der Vlies <basv@sara.nl>, Thu, 11 Dec 2003 11:27:41 +0100
Index: /tags/2.4/changelog
===================================================================
--- /tags/2.4/changelog	(revision 83)
+++ /tags/2.4/changelog	(revision 83)
@@ -0,0 +1,791 @@
+torque (4.1.3-5) unstable; urgency=low
+
+  * New upstream release. with root security exploit fix 
+  * Added building of drmaa library to configure option
+  * Working version svn revision 6873
+  * added new options to init.d
+
+ -- Bas van der Vlies <basv@sara.nl>  Mon, 03 Sep 2012 11:05:40 +0200
+
+torque (4.1.1-2) unstable; urgency=low
+
+  * SVN Update 4.1.1
+  * one of the pbs_mkdirs.in patch is accepted
+
+ -- Bas van der Vlies <basv@sara.nl>  Mon, 23 Jul 2012 11:13:12 +0200
+
+torque (4.1.1-1) unstable; urgency=low
+
+  * New release 
+
+ -- Bas van der Vlies <basv@sara.nl>  Thu, 12 Jul 2012 08:57:30 +0200
+
+torque (4.1.0-2) unstable; urgency=low
+
+  * Some pbs_server updates
+  * enabled SARA pam patch so it logs in auth.log
+
+ -- Bas van der Vlies <basv@sara.nl>  Wed, 11 Jul 2012 09:43:45 +0200
+
+torque (4.1.0-1) unstable; urgency=low
+
+  * New torque release to test
+
+ -- Bas van der Vlies <basv@sara.nl>  Tue, 03 Jul 2012 09:06:02 +0200
+
+torque (2.4.16-2) unstable; urgency=low
+
+  * new postinst script 
+
+ -- Bas van der Vlies <basv@sara.nl>  Fri, 16 Sep 2011 09:06:47 +0200
+
+torque (2.4.16-1) unstable; urgency=low
+
+  * Fixes pbs_mom crashes
+  * this a 2.4.16 snapshot release
+
+ -- Bas van der Vlies <basv@sara.nl.irc.sara.nl>  Wed, 27 Jul 2011 10:38:04 +0200
+
+torque (2.4.14-1) unstable; urgency=low
+
+  * New upstream torque version with security fix
+
+ -- Bas van der Vlies <basv@sara.nl>  Tue, 14 Jun 2011 12:43:31 +0200
+
+torque (2.4.11-1) unstable; urgency=low
+
+  *  New upstream torque version
+
+ -- Bas van der Vlies <basv@sara.nl>  Fri, 14 Jan 2011 13:32:40 +0100
+
+torque (2.4.9-4) unstable; urgency=low
+
+  * For debian squeeze the package openmpi need libtorque package. So 
+    we just createad an empty package to satisfy this dependency.
+
+ -- Bas van der Vlies <basv@sara.nl>  Mon, 11 Oct 2010 12:19:07 +0200
+
+torque (2.4.9-3) unstable; urgency=low
+
+  * /etc/init.d/torque restart-mom did not work, fixed by
+    Bas van der Vlies & Dennis Stam
+
+ -- Bas van der Vlies <basv@sara.nl>  Fri, 13 Aug 2010 11:32:59 +0200
+
+torque (2.4.9-2) unstable; urgency=low
+
+  * Changed runlevels to 99 start and 1 stop.  Ramon & Bas
+
+ -- Bas van der Vlies <basvsara.nl>  Mon, 09 Aug 2010 11:26:49 +0200
+
+torque (2.4.9-1) unstable; urgency=low
+
+  * New upstream version with our patch applied 
+
+ -- Bas van der Vlies <basv@sara.nl>  Wed, 04 Aug 2010 11:11:03 +0200
+
+torque (2.4.7-3) unstable; urgency=low
+
+  * Increase NCONNECTS to 10. So we can have 10 connections at the same time
+
+ -- Bas van der Vlies <basv@sara.nl>  Wed, 28 Apr 2010 11:30:09 +0200
+
+torque (2.4.7-2) unstable; urgency=low
+
+  * Updated pbs_mkdirs.in to new situation, must make some more directories
+
+ -- Bas van der Vlies <basv@sara.nl>  Tue, 27 Apr 2010 11:49:08 +0200
+
+torque (2.4.7-1) unstable; urgency=low
+
+  * New upstream release 2.4.7 
+
+ -- Bas van der Vlies <basv@sara.nl>  Tue, 13 Apr 2010 15:51:10 +0200
+
+torque (2.4.6-1) unstable; urgency=low
+
+  * New upstream release 2.4.6 
+
+ -- Bas van der Vlies <basv@sara.nl>  Thu, 25 Mar 2010 09:11:02 +0100
+
+torque (2.3.7-1) unstable; urgency=low
+
+ * changed init.d scripts. If we do a configure or install a new torque version. We restart the daemon.
+    the administrator can decicde what to do when the pbs_mom restart with the PBS_MOM_RESTART_OPTS in
+    dpkg-reconfigure or /etc/default/torque
+
+ * added PBS_MOM_RESTART_OPTS to debconf setup
+
+ * new upstream version
+
+ -- Bas van der  Vlies <basv@sara.nl>  Mon, 19 Jan 2009 14:16:13 +0100
+
+torque (2.3.4-2) unstable; urgency=low
+
+  * Made init.d script LSBaware, see http://wiki.debian.org/LSBInitScripts
+
+ -- Bas van der Vlies <basv@sara.nl>  Tue, 11 Nov 2008 14:05:34 +0100
+
+torque (2.3.4-1) unstable; urgency=low
+
+  * New torque release 2.3.4 
+
+ -- Bas van der Vlies <bas@sara.nl>  Tue, 11 Nov 2008 13:52:36 +0100
+
+torque (2.3.2) unstable; urgency=low
+
+  * New upstream release 
+  * Applied patch from renfro at tntech dot edu, fix a bug in the date command
+    for postinst script
+
+
+ -- Bas van der Vlies <bas@saralt0081.ka.sara.nl>  Thu, 14 Aug 2008 12:15:32 +0200
+
+torque (2.3.0) unstable; urgency=low
+
+  * New upstream release
+
+ -- Bas van der Vlies <basv@sara.nl>  Mon, 17 Mar 2008 18:15:29 +0100
+
+torque (2.2.1) unstable; urgency=low
+
+  * new upstream release
+  * fixed directory permissions in /var/spool/torque
+  * overwrite /etc/default/torque, it's handled by debconf
+  * create /var/spool/torque/sched_priv/accounting
+
+ -- Adrian Knoth <adi@thur.de>  Mon, 05 Nov 2007 18:34:00 +0100
+
+torque (2.2.0) unstable; urgency=low
+
+  * New upstream release
+  * added compile fix for gcc-4.2 on amd64
+  * added configure fix for new pam_get_user()
+  * added compile fix for gcc-4.1 
+
+ -- Adrian Knoth <adi@chopin.inf-ra.uni-jena.de>  Thu, 01 Nov 2007 15:49:47 +0100
+
+torque (2.1.9p0-3) unstable; urgency=low
+
+  *  Fix the permissions for pbs_iff
+  *  Clean up the rules file
+
+ -- Bas van der Vlies <basv@sara.nl>  Fri, 21 Sep 2007 12:47:52 +0200
+
+torque (2.1.9p0-2) unstable; urgency=low
+
+  *  Changed the debconf from low to high
+  *  Removed some obsolete code
+
+ -- root <root@rc.sara.nl>  Wed, 12 Sep 2007 09:19:04 +0200
+
+torque (2.1.9p0-1) unstable; urgency=low
+
+  *  New upstream release
+
+ -- root <root@rc.sara.nl>  Tue, 11 Sep 2007 16:45:55 +0200
+
+torque (2.1.8) unstable; urgency=low
+
+  * New upstream release torque 2.1.8
+  * Added Build-Depends libpam0g-dev and sed (for debian/patches/apply_patch)
+  * Removed info.ex and diversion.ex
+  * added debconf support
+  * On 64bit systems, PAM modules are no longer placed in /lib64
+    to circumvent #367962
+
+ -- Adrian Knoth <adi@thur.de>  Tue,  7 Aug 2007 11:54:00 +0200
+
+torque (2.1.7p0-1) unstable; urgency=low
+
+  * Fresh upstream with Bas's torque_2_deb
+  * Adjusted conf_torq with --with-rcp=scp
+  * Added Build-Depends
+  * Yaroslav O. Halchenko <debian@onerussian.com>  Fri, 27 Oct 2006
+
+ -- root <root@rc.sara.nl>  Thu,  2 Nov 2006 12:15:50 +0100
+
+torque (2.1.6p0-1) unstable; urgency=low
+
+  * New release fixes security issues and related bugs 
+
+ -- root <root@rc.sara.nl>  Wed, 25 Oct 2006 09:16:47 +0200
+
+torque (2.1.4p0-3) unstable; urgency=low
+
+  * Just a test
+
+ -- root <root@rc.sara.nl>  Sat, 21 Oct 2006 09:35:08 +0200
+
+torque (2.1.4p0-2) unstable; urgency=low
+
+  * Added -p opion to pbs_mom 
+
+ -- root <root@rc.sara.nl>  Sat, 21 Oct 2006 09:27:54 +0200
+
+torque (2.1.4p0-1) unstable; urgency=low
+
+  * New torque fixes security issue 
+
+ -- root <root@rc.sara.nl>  Sat, 21 Oct 2006 09:07:11 +0200
+
+torque (2.1.3p0-5) unstable; urgency=low
+
+  * acl group sloppy fix 
+
+ -- root <root@rc.sara.nl>  Fri, 29 Sep 2006 16:23:13 +0200
+
+torque (2.1.3p0-4) unstable; urgency=low
+
+  * ac_group_sloppy_fix
+  * pam fixes 
+
+ -- root <root@rc.sara.nl>  Tue, 26 Sep 2006 09:15:38 +0200
+
+torque (2.1.2p1-3) unstable; urgency=low
+
+  * Debian packages fixes 
+
+ -- root <root@rc.sara.nl>  Thu, 21 Sep 2006 12:02:51 +0200
+
+torque (2.1.2p1-2) unstable; urgency=low
+
+  * Fixed acl_sloppy_group bug. It hangs up the server 
+
+ -- root <root@rc.sara.nl>  Thu, 21 Sep 2006 10:56:11 +0200
+
+torque (2.1.2p0-1) unstable; urgency=low
+
+  * New upstream release with pam and xauth support 
+
+ -- root <root@rc.sara.nl>  Wed, 20 Sep 2006 14:36:34 +0200
+
+torque (2.1.1p0-3) unstable; urgency=low
+
+  * Fixing mail problem
+
+ -- root <root@rc.sara.nl>  Fri, 21 Jul 2006 09:14:15 +0200
+
+torque (2.1.1p0-2) unstable; urgency=low
+
+  *  Install torque lib in /usr/lib instead of /usr/lib/torque
+
+ -- root <root@rc.sara.nl>  Tue, 18 Jul 2006 15:11:12 +0200
+
+torque (2.1.1p0-1) unstable; urgency=low
+
+  * New release 
+
+ -- root <root@rc.sara.nl>  Tue, 18 Jul 2006 10:58:27 +0200
+
+torque (2.1.0p0-5) unstable; urgency=low
+
+  * use -X/--excludse option dh_fixperms
+
+ -- root <root@rc.sara.nl>  Mon, 15 May 2006 17:28:57 +0200
+
+torque (2.1.0p0-4) unstable; urgency=low
+
+  *  Use --update for dpkg-statoverride
+
+ -- root <root@rc.sara.nl>  Mon, 15 May 2006 17:22:11 +0200
+
+torque (2.1.0p0-3) unstable; urgency=low
+
+  *  Fixed an permission problem for pbs_iff
+
+ -- root <root@rc.sara.nl>  Mon, 15 May 2006 17:09:43 +0200
+
+torque (2.1.0p0-2) unstable; urgency=low
+
+  * Final version of 2.1.0 
+
+ -- root <root@rc.sara.nl>  Mon, 15 May 2006 16:59:58 +0200
+
+torque (2.1.0p0-1) unstable; urgency=low
+
+  * New upstream release and build system 
+
+ -- root <root@rc.sara.nl>  Thu, 20 Apr 2006 11:36:39 +0200
+
+torque (2.0.0p8-10) unstable; urgency=low
+
+  * Added pbs_mkdirs.in patch from SARA
+  * Changed build for 2.1.0 and higher
+  * Fixed an error in new debian build
+
+ -- root <root@rc.sara.nl>  Wed, 19 Apr 2006 13:37:55 +0200
+
+torque (2.0.0p8-9) unstable; urgency=low
+
+  * New debian build system, make use of debhelper 
+
+ -- root <root@bas2.ka.sara.nl>  Tue, 18 Apr 2006 15:49:21 +0200
+
+torque (2.0.0p8-8) unstable; urgency=low
+
+  *  Put in the right place now, else we lose the PBS environment 
+
+ -- root <root@rc.sara.nl>  Mon, 13 Mar 2006 14:40:39 +0100
+
+torque (2.0.0p8-7) unstable; urgency=low
+
+  * We have fixed it hopefully
+
+ -- root <root@rc.sara.nl>  Mon, 13 Mar 2006 12:51:33 +0100
+
+torque (2.0.0p8-6) unstable; urgency=low
+
+  *  Changed the code a bit
+
+ -- root <root@rc.sara.nl>  Mon, 13 Mar 2006 12:06:08 +0100
+
+torque (2.0.0p8-5) unstable; urgency=low
+
+  *  Removed some oboslete code ;-(
+
+ -- root <root@rc.sara.nl>  Mon, 13 Mar 2006 11:25:55 +0100
+
+torque (2.0.0p8-4) unstable; urgency=low
+
+  * Fixed the patch for the patch 
+
+ -- root <root@rc.sara.nl>  Mon, 13 Mar 2006 11:05:43 +0100
+
+torque (2.0.0p8-3) unstable; urgency=low
+
+  * Patch to try epilogure.pararallel 
+
+ -- root <root@rc.sara.nl>  Mon, 13 Mar 2006 10:11:45 +0100
+
+torque (2.0.0p8-2) unstable; urgency=low
+
+  *  Just update version
+
+ -- root <root@rc.sara.nl>  Fri, 10 Mar 2006 15:31:24 +0100
+
+torque (2.0.0p8-1) unstable; urgency=low
+
+  * New upstream release 
+
+ -- root <root@rc.sara.nl>  Fri, 10 Mar 2006 14:06:28 +0100
+
+torque (2.0.0p7-4) unstable; urgency=low
+
+  * Fixed parsing bug for torque.cfg
+
+ -- root <root@rc.sara.nl>  Wed, 22 Feb 2006 13:04:44 +0100
+
+torque (2.0.0p7-3) unstable; urgency=low
+
+  * Have fixed it, parallel epilogue 
+
+ -- root <root@rc.sara.nl>  Tue, 21 Feb 2006 15:45:47 +0100
+
+torque (2.0.0p7-2) unstable; urgency=low
+
+  * Try to fix parallel epilogue
+
+ -- root <root@rc.sara.nl>  Tue, 21 Feb 2006 15:06:59 +0100
+
+torque (2.0.0p7-1) unstable; urgency=low
+
+  * New upstream version
+
+ -- root <root@rc.sara.nl>  Tue, 21 Feb 2006 14:19:21 +0100
+
+torque (2.0.0p5-1) unstable; urgency=low
+
+  * New version 2.0.0p5
+
+ -- root <root@rc.sara.nl>  Thu, 19 Jan 2006 15:53:56 +0100
+
+torque (2.0.0p2-2) unstable; urgency=low
+
+  * The real 2.0.0p2 release  
+
+ -- root <root@rc.sara.nl>  Thu, 24 Nov 2005 14:00:28 +0100
+
+torque (2.0.0p2-1) unstable; urgency=low
+
+  * New new torque release
+
+ -- root <root@rc.sara.nl>  Tue, 15 Nov 2005 14:10:30 +0100
+
+torque (1.2.0p6-1) unstable; urgency=low
+
+  * New torque version 
+
+ -- root <root@rc.sara.nl>  Thu,  6 Oct 2005 15:26:45 +0200
+
+torque (1.2.0p4-2) unstable; urgency=low
+
+  * Made /var/spool/torque/server_name an config file. So it will not be
+    overwritten by a package update 
+
+ -- root <root@rc.sara.nl>  Wed, 22 Jun 2005 08:56:04 +0200
+
+torque (1.2.0p4-1) unstable; urgency=low
+
+  * New upstream release 
+  * Added configurable daemon options to init.d and default config file
+    Thanks to Josh Lauricha for the patches.
+
+ -- root <root@rc.sara.nl>  Tue, 21 Jun 2005 16:21:52 +0200
+
+torque (1.2.0p2-2) unstable; urgency=low
+
+  * New upstream release
+  * added --enable-docs to get readable manpages ;-)
+
+ -- Bas van der Vlies <basv@sara.nl>  Fri, 11 Mar 2005 13:53:25 +0100
+
+torque (1.1.0p4-6) unstable; urgency=low
+
+  *  Made build depended on ssh
+     Fixed by: Ingo Juergensmann
+
+ -- Bas van der Vlies <bas@sara.nl>  Fri, 17 Dec 2004 11:29:49 +0100
+
+torque (1.1.0p4-5) unstable; urgency=low
+
+  * dpkg-source -b does not make all script executable, fixed it 
+    in rules file.
+    Thanks to: Ingo Juergensmann
+
+ -- Bas van der Vlies <bas@sara.nl>  Thu, 16 Dec 2004 16:03:15 +0100
+
+torque (1.1.0p4-4) unstable; urgency=low
+
+  *  Made build depended on debmake
+     Fixed by: Ingo Juergensmann
+
+ -- Bas van der Vlies <basv@sara.nl>  Thu, 16 Dec 2004 14:45:25 +0100
+
+torque (1.1.0p4-3) unstable; urgency=low
+
+  * added rm.h/log.h to /usr/include/torque needed by some tools 
+
+ -- Bas van der Vlies <basv@sara.nl>  Mon,  8 Nov 2004 12:31:52 +0100
+
+torque (1.1.0p4-2) unstable; urgency=low
+
+  * Added and patch that changes the location of submit_filter to /usr/sbin
+    instead of /usr/local/sbin
+
+ -- Bas van der Vlies <basv@sara.nl>  Wed,  3 Nov 2004 17:50:02 +0100
+
+torque (1.1.0p4-1) unstable; urgency=low
+
+  * New upstream release. 
+  * In this release there ptmx fix for udev/2.6 kernels. Adjust the rules
+    files to reflect these changes. Thanks to Yaroslav Halchenko for
+    reporting it.
+
+ -- Bas van der Vlies <basv@sara.nl>  Mon,  1 Nov 2004 12:37:34 +0100
+
+torque (1.1.0p2-4) unstable; urgency=low
+
+  * New upstream release 
+  * Added torque changelog to /usr/share/doc/torque
+  * Added README's of the contrib software to /usr/share/doc/torque
+
+ -- Bas van der Vlies <basv@sara.nl>  Thu, 14 Oct 2004 08:08:55 +0200
+
+torque (1.1.0p2-3) unstable; urgency=low
+
+  * new upstream release
+
+ -- Bas van der Vlies <basv@sara.nl>  Fri,  8 Oct 2004 15:18:24 +0200
+
+torque (1.1.0p1-3) unstable; urgency=low
+
+  * added an postinst patch from Josh Lauricha for tcl indexes
+
+ -- Bas van der Vlies <basv@sara.nl>  Wed,  6 Oct 2004 13:53:21 +0200
+
+torque (1.1.0p1-2) unstable; urgency=low
+
+  * removed the building of the gui commands. 
+
+ -- Bas van der Vlies <basv@sara.nl>  Thu, 16 Sep 2004 11:06:06 +0200
+
+torque (1.1.0p1-1) unstable; urgency=low
+
+  * A new torque release 
+
+ -- Bas van der Vlies <basv@sara.nl>  Wed, 15 Sep 2004 17:01:07 +0200
+
+torque (1.1.0p0-5) unstable; urgency=low
+
+  * Make use of a new script that does the patching
+
+ -- Bas van der Vlies <basv@sara.nl>  Wed,  4 Aug 2004 13:24:24 +0200
+
+torque (1.1.0p0-4) unstable; urgency=low
+
+  * Added the patches directory. 
+  * configure patch for tk. Now we can handle all tcl/tk versions instead of
+    only one version 8.0
+  * ptmx patch in the new 2.6 kernel the handeling of pty's is different
+
+ -- Bas van der Vlies <basv@sara.nl>  Wed,  4 Aug 2004 12:48:45 +0200
+
+torque (1.1.0p0) unstable; urgency=low
+
+  * New upstream release
+
+ -- Bas van der Vlies <basv@sara.nl>  Mon, 12 Jul 2004 17:44:15 +0200
+
+torque (1.0.1p6-3) unstable; urgency=low
+
+  * 1-april-release with debug support
+
+ -- Bas van der Vlies <basv@sara.nl>  Tue, 20 Apr 2004 14:46:09 +0200
+
+torque (1.0.1p6-2) unstable; urgency=low
+
+  * fixed init.d script. First use -15 and then -9
+
+ -- Bas van der Vlies <basv@sara.nl>  Thu,  1 Apr 2004 11:41:56 +0200
+
+torque (1.0.1p6-1) unstable; urgency=low
+
+  * New torque release 1.0.1p6
+
+ -- Bas van der Vlies <basv@sara.nl>  Fri, 26 Mar 2004 10:52:22 +0100
+
+torque (1.0.1p5-12) unstable; urgency=low
+
+  * replaced egrep in an awk statement, else postinst script will
+    fail with exit status 1
+
+ -- Bas van der Vlies <basv@sara.nl>  Wed, 24 Mar 2004 12:26:46 +0100
+
+torque (1.0.1p5-11) unstable; urgency=low
+
+  * Else instead of elif ;-(
+
+ -- Bas van der Vlies <basv@sara.nl>  Mon, 22 Mar 2004 20:50:43 +0100
+
+torque (1.0.1p5-10) unstable; urgency=low
+
+  * Fix an error in postinst script. Egrep on non existent file.
+
+ -- Bas van der Vlies <basv@sara.nl>  Mon, 22 Mar 2004 20:48:10 +0100
+
+torque (1.0.1p5-9) unstable; urgency=low
+
+  * Using a new style default file with 3 variables instead of 1
+
+ -- Bas van der Vlies <basv@sara.nl>  Mon, 22 Mar 2004 20:31:39 +0100
+
+torque (1.0.1p5-8) unstable; urgency=high
+
+  * Fixed a bug in parsing the /etc/default/torque file
+
+ -- Bas van der Vlies <basv@sara.nl>  Mon, 22 Mar 2004 19:14:41 +0100
+
+torque (1.0.1p5-7) unstable; urgency=low
+
+  *  Make xpbs/xpbsmon executable after change by patch_gui_cmds.sh
+
+ -- Bas van der Vlies <basv@sara.nl>  Thu, 18 Mar 2004 11:56:37 +0100
+
+torque (1.0.1p5-6) unstable; urgency=low
+
+  *  Fix an error in patch_gui_cmds.sh
+
+ -- Bas van der Vlies <basv@sara.nl>  Tue, 16 Mar 2004 17:03:02 +0100
+
+torque (1.0.1p5-5) unstable; urgency=low
+
+  * Fix the gui commands because it had wrong paths/interperters
+
+ -- Bas van der Vlies <basv@sara.nl>  Tue, 16 Mar 2004 16:54:20 +0100
+
+torque (1.0.1p5-4) unstable; urgency=low
+
+  * Replaced init.d script with one supplied by Kilian CAVALOTTI
+
+ -- Bas van der Vlies <bas@sara.nl>  Mon, 15 Mar 2004 15:31:39 +0100
+
+torque (1.0.1p5-3) unstable; urgency=low
+
+  * Fixes some errors in the init.d script, Thanks to Kilian CAVALOTTI 
+    for the comments/remarks.
+
+  * Changed the keyword slave to mom
+
+     
+ -- Bas van der Vlies <bas@sara.nl>  Mon, 15 Mar 2004 14:42:38 +0100
+
+torque (1.0.1p5-2) unstable; urgency=low
+
+  * Added --set-default-server=localhost 
+
+ -- Bas van der Vlies <bas@uva-c.sara.nl>  Mon, 16 Feb 2004 11:04:21 +0100
+
+torque (1.0.1p5-1) unstable; urgency=low
+
+  * New torque release 1.0.1p5
+
+ -- Bas van der Vlies <basv@sara.nl>  Mon, 16 Feb 2004 11:00:11 +0100
+
+torque (1.0.1p4-10) unstable; urgency=low
+
+  *  Fix an error in src/resmom/mom_main.c
+
+ -- Bas van der Vlies <root@uva-c.sara.nl>  Wed,  4 Feb 2004 15:10:39 +0100
+
+torque (1.0.1p4-9) unstable; urgency=low
+
+  * Add verbose output for usecp (Willem, Bas) 
+
+ -- Bas van der Vlies <root@uva-c.sara.nl>  Wed,  4 Feb 2004 15:06:30 +0100
+
+torque (1.0.1p4-8) unstable; urgency=low
+
+  *  added --with-scp for willem
+
+ -- Bas van der Vlies <root@uva-c.sara.nl>  Wed,  4 Feb 2004 14:28:04 +0100
+
+torque (1.0.1p4-7) unstable; urgency=low
+
+  * debian/rules
+
+ -- Bas van der Vlies <bas@uva-c.sara.nl>  Wed,  4 Feb 2004 14:33:15 +0100
+
+torque (1.0.1p4-6) unstable; urgency=low
+
+  * Disable --with-scp, problems with ssh protocol 2
+
+ -- Bas van der Vlies <bas@uva-c.sara.nl>  Wed,  4 Feb 2004 10:44:33 +0100
+
+torque (1.0.1p4-5) unstable; urgency=low
+
+  * Fixed an echo problem in init.d 
+
+ -- Bas van der Vlies <root@uva-c.sara.nl>  Tue,  3 Feb 2004 09:08:31 +0100
+
+torque (1.0.1p4-4) unstable; urgency=low
+
+  * Changed the init.d script. It now support sched,server and all keywords
+    So we can use another scheduler and only start the server.
+
+ -- Bas van der Vlies <bas@uva-c.sara.nl>  Mon,  2 Feb 2004 12:52:52 +0100
+
+torque (1.0.1p4-3) unstable; urgency=low
+
+  * Fix an error with the spool permissions directories.
+
+ -- Bas van der Vlies <bas@uva-c.sara.nl>  Thu, 29 Jan 2004 14:09:47 +0100
+
+torque (1.0.1p4-2) unstable; urgency=low
+
+  * --with-scp added to rules file 
+
+ -- Bas van der Vlies <bas@uva-c.sara.nl>  Wed, 28 Jan 2004 17:31:47 +0100
+
+torque (1.0.1p4-1) unstable; urgency=low
+
+  * The name has been changed to TORQUE (Tera-scale Open-source Resource
+    and QUEue manager). We have also a new release 1.0.1p4. First try!
+
+ -- Bas van der Vlies <bas@uva-c.sara.nl>  Mon, 26 Jan 2004 11:40:09 +0100
+
+torque (1.0.1p3-7) unstable; urgency=low
+
+  * Added in rules the creation of pbs_mkdirs and in postinst
+
+ -- Bas van der Vlies <bas@uva-c.sara.nl>  Fri, 23 Jan 2004 14:50:30 +0100
+
+storm (1.0.1p3-6) unstable; urgency=low
+
+  * Remove the # before pbs_mkdirs
+
+ -- Bas van der Vlies <bas@uva-c.sara.nl>  Fri, 23 Jan 2004 13:00:29 +0100
+
+storm (1.0.1p3-5) unstable; urgency=low
+
+  * removed var/spool/storm from debian/dirs file
+
+ -- Bas van der Vlies <bas@uva-c.sara.nl>  Fri, 23 Jan 2004 12:34:20 +0100
+
+storm (1.0.1p3-4) unstable; urgency=low
+
+  *  Lot of things fixed. First time install does not make default
+     directory structure. Thanks to Jaap Dijkshoorn for the solution.
+
+ -- Bas van der Vlies <bas@uva-c.sara.nl>  Fri, 23 Jan 2004 12:29:00 +0100
+
+storm (1.0.1p3-3) unstable; urgency=low
+
+  * A new snapshot, release 1074756214
+
+ -- Bas van der Vlies <root@uva-c.sara.nl>  Fri, 23 Jan 2004 11:32:57 +0100
+
+storm (1.0.1p3-2) unstable; urgency=low
+
+  * fixed some typo's in the control files, from spbs to storm
+
+ -- Bas van der Vlies <root@uva-c.sara.nl>  Mon, 19 Jan 2004 16:03:30 +0100
+
+storm (1.0.1p3-1) unstable; urgency=low
+
+  *  Fixed an error in the postrm script
+
+ -- Bas van der Vlies <linux-tg@hec.sara.nl>  Thu, 11 Dec 2003 16:29:12 +0100
+
+spbs (1.0.1p2-8) unstable; urgency=low
+
+  * Added postrm script
+
+ -- Bas van der Vlies <linux-tg@hec.sara.nl>  Thu, 11 Dec 2003 16:15:32 +0100
+
+spbs (1.0.1p2-7) unstable; urgency=low
+
+  *  Some errors in postinst script
+
+ -- Bas van der Vlies <linux-tg@hec.sara.nl>  Thu, 11 Dec 2003 16:09:25 +0100
+
+spbs (1.0.1p2-6) unstable; urgency=low
+
+  *  Fixed an error in postinst script
+
+ -- Bas van der Vlies <linux-tg@hec.sara.nl>  Thu, 11 Dec 2003 15:55:15 +0100
+
+spbs (1.0.1p2-5) unstable; urgency=low
+
+  *  Made init script, postinst script and some other info files
+
+ -- Bas van der Vlies <linux-tg@hec.sara.nl>  Thu, 11 Dec 2003 15:45:52 +0100
+
+spbs (1.0.1p2-4) unstable; urgency=low
+
+  * spbs include files are also in a seperate directory, /usr/include/spbs
+
+ -- Bas van der Vlies <linux-tg@hec.sara.nl>  Thu, 11 Dec 2003 12:01:16 +0100
+
+spbs (1.0.1p2-3) unstable; urgency=low
+
+  * Did not work. changed it to /usr/lib/spbs agian
+  * Added libdir=`pwd`/debian/tmp/usr/lib/spbs to install section
+
+ -- Bas van der Vlies <linux-tg@hec.sara.nl>  Thu, 11 Dec 2003 11:56:02 +0100
+
+spbs (1.0.1p2-2) unstable; urgency=low
+
+  * Changed libdir to usr/lib/spbs instead of /usr/lib/spbs
+
+ -- Bas van der Vlies <linux-tg@hec.sara.nl>  Thu, 11 Dec 2003 11:50:34 +0100
+
+spbs (1.0.1p2-1) unstable; urgency=low
+
+  * Initial release.
+
+ -- Bas van der Vlies <linux-tg@hec.sara.nl>  Thu, 11 Dec 2003 11:27:41 +0100
+
+Local variables:
+mode: debian-changelog
+End:
Index: /tags/2.4/compat
===================================================================
--- /tags/2.4/compat	(revision 83)
+++ /tags/2.4/compat	(revision 83)
@@ -0,0 +1,1 @@
+6
Index: /tags/2.4/conf_torque
===================================================================
--- /tags/2.4/conf_torque	(revision 83)
+++ /tags/2.4/conf_torque	(revision 83)
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# A script to configure torque. To support more than one release and different
+# kernels.
+#
+# SVN INFO:
+#	$Id: conf_torque 2385 2006-11-03 07:20:35Z bas $
+#
+set -x
+
+CFLAGS=" -D_FILE_OFFSET_BITS=64" ./configure --prefix=/usr \
+	--includedir=/usr/include/torque \
+	--with-server-home=/var/spool/torque \
+	--with-default-server=`hostname` \
+	--with-tmpdir=/var/tmp \
+	--with-pam=/lib/security \
+	--with-xauth=/usr/bin/X11/xauth \
+	--enable-syslog \
+	--enable-blcr \
+	--with-sched=c \
+	--with-sched-code=fifo \
+	--disable-gui \
+	--with-cflags=" -g -D__PNEWTTY" \
+	--enable-docs \
+    --enable-drmaa \
+	--with-rcp=scp
+	
+
+#--without-loadlibfile \
Index: /tags/2.4/conffiles
===================================================================
--- /tags/2.4/conffiles	(revision 83)
+++ /tags/2.4/conffiles	(revision 83)
@@ -0,0 +1,2 @@
+/var/spool/torque/server_name
+/var/spool/torque/server_priv/nodes
Index: /tags/2.4/control
===================================================================
--- /tags/2.4/control	(revision 83)
+++ /tags/2.4/control	(revision 83)
@@ -0,0 +1,25 @@
+Source: torque
+Section: unknown
+Priority: optional
+Maintainer: Bas van der Vlies <basv@sara.nl>
+Build-Depends: openssh-client, debhelper, libpam0g-dev, sed, gperf, libcr-dev, libxml2-dev
+Standards-Version: 3.7.2.2
+
+Package: torque
+Architecture: any 
+Depends: ${shlibs:Depends}, coreutils, debconf | debconf-2.0, libtorque2
+Provides: torque-client, torque-common, torque-mom, torque-pam, torque-scheduler, torque-server, libtorque2-dev, libtorque-dev
+Replaces: torque-client, torque-common, torque-mom, torque-pam, torque-scheduler, torque-server, libtorque2-dev, libtorque-dev
+Conflicts: torque-client, torque-common, torque-mom, torque-pam, torque-scheduler, torque-server, libtorque2-dev, libtorque-dev
+Description: Tera-scale Open-source Resource and QUEue manager
+	This package contains a batch system developed by supercluster.org
+	based on the openpbs software. This software contains a lot of
+	improvement over the openpbs software. 
+
+Package: libtorque2
+Section: libs
+Architecture: any
+Description: Dummy package for openmpi
+	Else openmpi fails to install. This is needed because libopenmpi
+	check for a version.
+
Index: /tags/2.4/copyright
===================================================================
--- /tags/2.4/copyright	(revision 83)
+++ /tags/2.4/copyright	(revision 83)
@@ -0,0 +1,81 @@
+This package was debianized by Bas van der Vlies linux-tg@hec.sara.nl on
+Thu, 11 Dec 2003 11:27:41 +0100.
+
+It was downloaded from http://www.supercluster.org/projects/torque
+
+Copyright:
+        OpenPBS (Portable Batch System) v2.3 Software License
+
+Copyright (c) 1999-2000 Veridian Information Solutions, Inc.
+All rights reserved.
+
+---------------------------------------------------------------------------
+For a license to use or redistribute the OpenPBS software under conditions
+other than those described below, or to purchase support for this software,
+please contact Veridian Systems, PBS Products Department ("Licensor") at:
+
+   www.OpenPBS.org  +1 650 967-4675                  sales@OpenPBS.org
+                       877 902-4PBS (US toll-free)
+---------------------------------------------------------------------------
+
+This license covers use of the OpenPBS v2.3 software (the "Software") at
+your site or location, and, for certain users, redistribution of the
+Software to other sites and locations.  Use and redistribution of
+OpenPBS v2.3 in source and binary forms, with or without modification,
+are permitted provided that all of the following conditions are met.
+After December 31, 2001, only conditions 3-6 must be met:
+
+1. Commercial and/or non-commercial use of the Software is permitted
+   provided a current software registration is on file at www.OpenPBS.org.
+   If use of this software contributes to a publication, product, or
+   service, proper attribution must be given; see www.OpenPBS.org/credit.html
+
+2. Redistribution in any form is only permitted for non-commercial,
+   non-profit purposes.  There can be no charge for the Software or any
+   software incorporating the Software.  Further, there can be no
+   expectation of revenue generated as a consequence of redistributing
+   the Software.
+
+3. Any Redistribution of source code must retain the above copyright notice
+   and the acknowledgment contained in paragraph 6, this list of conditions
+   and the disclaimer contained in paragraph 7.
+
+4. Any Redistribution in binary form must reproduce the above copyright
+   notice and the acknowledgment contained in paragraph 6, this list of
+   conditions and the disclaimer contained in paragraph 7 in the
+   documentation and/or other materials provided with the distribution.
+
+5. Redistributions in any form must be accompanied by information on how to
+   obtain complete source code for the OpenPBS software and any
+   modifications and/or additions to the OpenPBS software.  The source code
+   must either be included in the distribution or be available for no more
+   than the cost of distribution plus a nominal fee, and all modifications
+   and additions to the Software must be freely redistributable by any party
+   (including Licensor) without restriction.
+
+6. All advertising materials mentioning features or use of the Software must
+   display the following acknowledgment:
+
+    "This product includes software developed by NASA Ames Research Center,
+    Lawrence Livermore National Laboratory, and Veridian Information Solutions,
+    Inc.  Visit www.OpenPBS.org for OpenPBS software support,
+    products, and information."
+
+7. DISCLAIMER OF WARRANTY
+
+THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. ANY EXPRESS
+OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT
+ARE EXPRESSLY DISCLAIMED.
+
+IN NO EVENT SHALL VERIDIAN CORPORATION, ITS AFFILIATED COMPANIES, OR THE
+U.S. GOVERNMENT OR ANY OF ITS AGENCIES BE LIABLE FOR ANY DIRECT OR INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+This license will be governed by the laws of the Commonwealth of Virginia,
+without reference to its choice of law rules.
Index: /tags/2.4/dirs
===================================================================
--- /tags/2.4/dirs	(revision 83)
+++ /tags/2.4/dirs	(revision 83)
@@ -0,0 +1,4 @@
+usr/bin
+usr/sbin
+usr/include/torque
+usr/share/doc
Index: /tags/2.4/docs
===================================================================
--- /tags/2.4/docs	(revision 83)
+++ /tags/2.4/docs	(revision 83)
@@ -0,0 +1,3 @@
+CHANGELOG
+README.torque
+contrib/README*
Index: /tags/2.4/init.d
===================================================================
--- /tags/2.4/init.d	(revision 83)
+++ /tags/2.4/init.d	(revision 83)
@@ -0,0 +1,222 @@
+#!/bin/sh
+#set -x
+#
+# Start stop script for TORQUE
+#
+# Authors : Bas van der Vlies & Jaap Dijkshoorn
+#	    Kilian Cavalotti
+#
+# SVN INFO:
+#       $Id$
+#		$URL$
+#
+### BEGIN INIT INFO
+# Provides:          torque
+# Required-Start:    $remote_fs $network
+# Required-Stop:     $remote_fs $network
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Start daemon at boot time
+# Description:       pbs_mon, pbs_sched and pbs_server
+### END INIT INFO
+#
+DESC="TORQUE servers"
+TORQUE_DIR=/usr/sbin
+DEFAULT=/etc/default/torque
+SPOOLDIR=/var/spool/torque
+
+# Some useful defaults can be overriden in the DEFAULT file
+#
+PBS_MOM_RESTART_OPTS='-p'
+PBS_MOM_OPTS=''
+PBS_SCHED_OPTS=''
+PBS_SERVER_OPTS='-a t'
+PBS_TRQAUTH_OPTS=""
+
+if [ ! -f $DEFAULT ]
+then
+        echo "No file [$DEFAULT]"
+        exit 0
+fi
+. $DEFAULT
+
+## Start functions
+start_server() {
+        start-stop-daemon --start --quiet --exec $TORQUE_DIR/pbs_server -- $PBS_SERVER_OPTS
+        echo "start pbs server"
+}
+
+start_sched() {
+        start-stop-daemon --start --quiet --exec $TORQUE_DIR/pbs_sched -- $PBS_SCHED_OPTS
+        echo "start pbs sched"
+}
+
+start_mom() {
+        start-stop-daemon --start --quiet --exec $TORQUE_DIR/pbs_mom -- $PBS_MOM_OPTS
+        echo "start pbs mom"
+}
+
+start_trqauth() {
+        start-stop-daemon --start --quiet --background --exec $TORQUE_DIR/trqauthd -- $PBS_TRQAUTH_OPTS
+        echo "start pbs trqauth"
+}
+
+start_daemons() {
+    check_perms 
+
+    ## Always start trqauth daemon
+    #
+    start_trqauth
+
+    if [ "$PBS_SERVER" = "1" ] 
+    then
+        start_server
+    fi 
+        
+    if [ "$PBS_SCHED" = "1" ]
+    then
+        start_sched
+    fi 
+        
+   if [ "$PBS_MOM" = "1" ]
+   then
+        start_mom
+   fi
+}
+
+## Stop functions
+
+stop_server() {
+        start-stop-daemon --retry 5 --stop --quiet --exec $TORQUE_DIR/pbs_server
+        echo " stop pbs server"
+        echo " waiting for server to shutdown"
+        sleep 5
+}
+
+stop_sched() {
+        start-stop-daemon --retry 5 --stop --quiet --exec $TORQUE_DIR/pbs_sched
+        echo "stop pbs sched"
+}
+
+stop_mom() {
+        start-stop-daemon --retry 5 --stop --quiet --exec $TORQUE_DIR/pbs_mom
+        echo "stop pbs mom"
+}
+
+stop_trqauth() {
+        start-stop-daemon --retry 5 --stop --quiet --exec $TORQUE_DIR/trqauthd
+        echo "stop pbs trqauth"
+}
+
+stop_daemons() {
+        if [ "$PBS_SERVER" = "1" ]
+        then
+                stop_server
+        fi 
+        
+        if [ "$PBS_SCHED" = "1" ]
+        then
+                stop_sched
+        fi 
+        
+        if [ "$PBS_MOM" = "1" ]
+        then
+                stop_mom
+        fi
+
+        stop_trqauth
+}
+
+## Check permissions and directories
+check_perms() {
+
+    check_dir() {
+        if [ ! -d "$1" ]; then
+            mkdir -m 1777 "$1"
+        else
+            chmod 1777 "$1"
+        fi
+    }
+
+    check_dir $SPOOLDIR/spool
+    check_dir $SPOOLDIR/undelivered
+}
+
+
+## Main
+case "$1" in
+        start)
+                echo "Starting $DESC: "
+                start_daemons
+        ;;
+
+        stop)
+                echo "Stopping $DESC: "
+                stop_daemons
+        ;;
+
+        restart)
+                echo "Restarting $DESC: "
+                stop_daemons
+                sleep 1
+                PBS_MOM_OPTS="$PBS_MOM_RESTART_OPTS"
+                start_daemons
+        ;;
+
+        stop-mom)
+                echo "Stopping pbs_mom: "
+                stop_mom 
+        ;;
+
+        stop-sched)
+                echo "Stopping pbs_sched: "
+                stop_sched
+        ;;
+
+        stop-server)
+                echo "Stopping pbs_mom: "
+                stop_server
+        ;;
+
+        stop-trqauth)
+                echo "Stopping pbs trqauthr: "
+                stop_trqauth
+        ;;
+
+        restart-mom)
+                echo "Restarting pbs_mom: "
+                stop_mom 
+                sleep 1 
+                PBS_MOM_OPTS="$PBS_MOM_RESTART_OPTS"
+                start_mom
+        ;;
+
+        restart-sched)
+                echo "Restarting pbs_sched: " 
+                stop_sched 
+                sleep 1
+                start_sched
+        ;;
+
+
+        restart-server)
+                echo "Restarting pbs_server: "
+                stop_server
+                sleep 1
+                start_server
+        ;;
+
+        restart-trqauth)
+                echo "Restarting pbs trqauthr: "
+                stop_trqauth
+                sleep 1
+                start_trqauth
+        ;;
+
+        *)
+                echo "Usage: $0 restart|start|stop|restart-<mom|server|sched|trqauth>|stop_<mom|server|sched|trqauth>"
+                exit 1
+        ;;
+esac
+
+exit 0
Index: /tags/2.4/patch_gui_cmds.sh
===================================================================
--- /tags/2.4/patch_gui_cmds.sh	(revision 83)
+++ /tags/2.4/patch_gui_cmds.sh	(revision 83)
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# Author: Bas van der Vlies
+# Desc. : The tcl gui commands uses the wrong settings for
+#         libdir, appdefdir and the interperter
+# 
+# SVN Info:
+#	$Id: patch_gui_cmds.sh 365 2004-03-18 10:57:22Z bas $
+#
+
+for file in xpbs xpbsmon
+do
+	sed -e "s,set libdir.*,set libdir $1/$file," \
+    	 -e "s,set appdefdir.*,set appdefdir $1/$file," \
+    	 `pwd`/debian/tmp/usr/bin/$file > ./tmp$$
+
+	mv ./tmp$$ `pwd`/debian/tmp/usr/bin/$file
+	chmod 755 `pwd`/debian/tmp/usr/bin/$file
+done
+
+# xpbsmon has also wrong interperter
+#
+sed -e "s,.*/usr/bin/pbs_wish.*,#!/usr/bin/pbs_wish -f," \
+ `pwd`/debian/tmp/usr/bin/xpbsmon > ./tmp$$
+
+mv ./tmp$$ `pwd`/debian/tmp/usr/bin/xpbsmon
+chmod 755 `pwd`/debian/tmp/usr/bin/xpbsmon
Index: /tags/2.4/patches/2.4/pam_pbssimpleauth.patch
===================================================================
--- /tags/2.4/patches/2.4/pam_pbssimpleauth.patch	(revision 83)
+++ /tags/2.4/patches/2.4/pam_pbssimpleauth.patch	(revision 83)
@@ -0,0 +1,137 @@
+--- src/pam/pam_pbssimpleauth.c	2010-03-25 11:59:41.586094181 +0100
++++ src/pam/pam_pbssimpleauth.c.new	2010-03-25 12:00:49.133610859 +0100
+@@ -35,6 +35,11 @@
+ #define PAM_SM_AUTH
+ #define PAM_SM_ACCOUNT
+ 
++/*
++ * HVB: add for pam_syslog
++*/
++#include <security/pam_ext.h>
++
+ #ifdef HAVE_SECURITY_PAM_APPL_H
+ #include <security/pam_appl.h>
+ #endif
+@@ -76,7 +81,6 @@
+   char jobdirpath[PATH_MAX+1];
+   int debug = 0;
+ 
+-  openlog(MODNAME, LOG_PID, LOG_USER);
+   strcpy(jobdirpath, PBS_SERVER_HOME "/mom_priv/jobs");
+ 
+   /* step through arguments */
+@@ -88,16 +92,15 @@
+     else if (!strcmp(*argv, "jobdir"))
+       strncpy(jobdirpath, *argv, PATH_MAX);
+     else
+-      syslog(LOG_ERR, "unknown option: %s", *argv);
++      pam_syslog(pamh, LOG_ERR, "unknown option: %s", *argv);
+     }
+ 
+-  if (debug) syslog(LOG_INFO, "opening %s", jobdirpath);
++  if (debug) pam_syslog(pamh, LOG_INFO, "opening %s", jobdirpath);
+ 
+   if ((jobdir = opendir(jobdirpath)) == NULL)
+     {
+-    if (debug) syslog(LOG_INFO, "failed to open jobs dir: %s", strerror(errno));
++    if (debug) pam_syslog(pamh, LOG_INFO, "failed to open jobs dir: %s", strerror(errno));
+ 
+-    closelog();
+ 
+     return PAM_IGNORE;
+     }
+@@ -108,7 +111,6 @@
+ #if defined(PAM_CONV_AGAIN) && defined(PAM_INCOMPLETE)
+   if (retval == PAM_CONV_AGAIN)
+     {
+-    closelog();
+     return PAM_INCOMPLETE;
+     }
+ 
+@@ -116,8 +118,7 @@
+ 
+   if ((retval != PAM_SUCCESS) || !username)
+     {
+-    syslog(LOG_ERR, "failed to retrieve username");
+-    closelog();
++    pam_syslog(pamh, LOG_ERR, "failed to retrieve username");
+     return PAM_SERVICE_ERR;
+     }
+ 
+@@ -125,7 +126,7 @@
+ 
+   /* no early returns from this point on because we need to free ubuf */
+ 
+-  if (debug) syslog(LOG_INFO, "username %s, %s", username, user_pwd ? "known" : "unknown");
++  if (debug) pam_syslog(pamh, LOG_INFO, "username %s, %s", username, user_pwd ? "known" : "unknown");
+ 
+   if (!user_pwd)
+     {
+@@ -133,7 +134,7 @@
+     }
+   else if (user_pwd->pw_uid == 0)
+     {
+-    if (debug) syslog(LOG_INFO, "allowing uid 0");
++    if (debug) pam_syslog(pamh, LOG_INFO, "allowing uid 0");
+ 
+     retval = PAM_SUCCESS;
+     }
+@@ -148,13 +149,13 @@
+ 
+       snprintf(jobpath, PATH_MAX - 1, "%s/%s", jobdirpath, jdent->d_name);
+ 
+-      if (debug) syslog(LOG_INFO, "opening %s", jobpath);
++      if (debug) pam_syslog(pamh, LOG_INFO, "opening %s", jobpath);
+ 
+       fp = open(jobpath, O_RDONLY, 0);
+ 
+       if (fp < 0)
+         {
+-        syslog(LOG_ERR, "error opening job file");
++        pam_syslog(pamh, LOG_ERR, "error opening job file");
+         continue;
+         }
+ 
+@@ -163,7 +164,7 @@
+       if (amt != sizeof(xjob.ji_qs))
+         {
+         close(fp);
+-        syslog(LOG_ERR, "short read of job file");
++        pam_syslog(pamh, LOG_ERR, "short read of job file");
+         continue;
+         }
+ 
+@@ -171,11 +172,11 @@
+         {
+         /* odd, this really should be JOB_UNION_TYPE_MOM */
+         close(fp);
+-        syslog(LOG_ERR, "job file corrupt");
++        pam_syslog(pamh, LOG_ERR, "job file corrupt");
+         continue;
+         }
+ 
+-      if (debug) syslog(LOG_INFO, "state=%d, substate=%d", xjob.ji_qs.ji_state, xjob.ji_qs.ji_substate);
++      if (debug) pam_syslog(pamh, LOG_INFO, "state=%d, substate=%d", xjob.ji_qs.ji_state, xjob.ji_qs.ji_substate);
+ 
+       if ((xjob.ji_qs.ji_un.ji_momt.ji_exuid == user_pwd->pw_uid) &&
+           ((xjob.ji_qs.ji_substate == JOB_SUBSTATE_PRERUN) ||
+@@ -185,7 +186,7 @@
+         /* success! */
+         close(fp);
+ 
+-        if (debug) syslog(LOG_INFO, "allowed by %s", jdent->d_name);
++        if (debug) pam_syslog(pamh, LOG_INFO, "allowed by %s", jdent->d_name);
+ 
+         retval = PAM_SUCCESS;
+ 
+@@ -202,9 +203,8 @@
+   if (ubuf)
+     free(ubuf);
+ 
+-  if (debug) syslog(LOG_INFO, "returning %s", retval == PAM_SUCCESS ? "success" : "failed");
++  if (debug) pam_syslog(pamh, LOG_INFO, "returning %s", retval == PAM_SUCCESS ? "success" : "failed");
+ 
+-  closelog();
+ 
+   return retval;
+   }
Index: /tags/2.4/patches/acl_sloppy_group.patch
===================================================================
--- /tags/2.4/patches/acl_sloppy_group.patch	(revision 83)
+++ /tags/2.4/patches/acl_sloppy_group.patch	(revision 83)
@@ -0,0 +1,77 @@
+--- src/server/svr_jobfunc.c	2006-06-20 02:24:02.000000000 +0200
++++ src/server/svr_jobfunc.c	2006-09-21 10:51:36.262261683 +0200
+@@ -1015,6 +1015,10 @@
+   int failed_group_acl = 0;
+   int failed_user_acl  = 0;
+ 
++  /* HvB */
++  struct array_strings *pas;
++  int j=0;
++
+   if (EMsg != NULL)
+     EMsg[0] = '\0';
+ 
+@@ -1089,7 +1093,6 @@
+           (!(pjob->ji_wattr[(int)JOB_ATR_grouplst].at_flags & ATR_VFLAG_SET)))
+         {
+         /* check group acl against all accessible groups */
+-
+         struct group *grp;
+         int i;
+ 
+@@ -1097,34 +1100,30 @@
+ 
+         strncpy(uname,pjob->ji_wattr[(int)JOB_ATR_euser].at_val.at_str,PBS_MAXUSER);
+ 
+-        setgrent();
+-
+         /* walk all groups looking for matching user membership */
+ 
+-        while ((grp = getgrent()))
+-          {
+-          for (i = 0;grp->gr_mem[i] != NULL;i++)
+-            {
+-            if (strcmp(grp->gr_mem[i],uname))
+-              continue;
+-
+-            rc = acl_check(
+-              &pque->qu_attr[QA_ATR_AclGroup],
+-              grp->gr_name,
+-              ACL_Gid);
+-
+-            break;
+-            }
+-
+-          if (rc != 0)
+-            {
+-            /* match found */
+-
+-            break;
+-            }
+-          }  /* END while (grp) */
++	pas =  pque->qu_attr[QA_ATR_AclGroup].at_val.at_arst;
++	for (i=0; i<pas->as_usedptr; i++) 
++	{
++		/* HvB debug info
++		printf("pas->as_usedptr = %d\n", pas->as_usedptr);
++		printf("pas->as_usedptr = %s, %d\n", pas->as_string[i], i);
++		*/
++		if ( (grp = getgrnam(pas->as_string[i])) != NULL) 
++		{
++			j = 0;
++		        while(grp->gr_mem[j] != NULL) 
++			{
++			       	if (!strcmp(grp->gr_mem[j], uname))
++				{
++				   	rc = 1;
++					break;
++				}
++				j++;
++			}
++		}
+ 
+-        endgrent();
++	}
+         }    /* END if (rc == 0) && AclGroupSloppy...) */
+ 
+       if (rc == 0)
Index: /tags/2.4/patches/apply
===================================================================
--- /tags/2.4/patches/apply	(revision 83)
+++ /tags/2.4/patches/apply	(revision 83)
@@ -0,0 +1,55 @@
+#!/bin/sh
+#
+# Author: Bas van der Vlies
+# Desc. : Apply some useful debian/sara patches to torque
+#
+# SVN INFO:
+#	$Id: apply 2336 2006-09-26 12:31:18Z bas $
+#
+#patch < debian/patches/tk.patch
+
+# pbs_mkdir.in patches by SARA
+#
+#cp debian/patches/pbs_mkdirs.in buildutils 
+patch -p0 < debian/patches/pbs_mkdirs.patch 
+
+## We do not need this anymore
+#
+#r=`grep -c 2.1.0 CHANGELOG`
+#case `uname -r` in
+#	2.6*)
+#		if [ $r -eq 0 ]
+#		then
+#			touch torque_oldconfigure
+#		else
+#			touch torque_newconfigure
+#		fi
+#	;;
+#esac
+
+# Always do this patch
+#
+#debian/patches/submit_filter.patch
+
+# For version 2.0.0p7 we applied this patches
+#
+#patch -p0 < debian/patches/torque.cfg.patch
+#patch -p0 < debian/patches/epilogue.parallel.patch
+
+# For versions 2.1.1 and 2.1.2
+#
+#patch -p0 < debian/patches/acl_sloppy_group.patch
+
+# Only for torque-2.2.0
+#patch -p0 < debian/patches/gcc4.2-amd64.patch
+#patch -p0 < debian/patches/torque-pam.patch
+
+# at least until 2.3.0, these patches are required:
+# patch -p0 < debian/patches/gcc4.1-rlimit.patch
+
+# changed syslog to pam_syslog version 2.1
+#patch -p0 < debian/patches/pam_pbssimpleauth.patch
+
+## changed syslog to pam_syslog version 2.4 and 4.X
+#
+patch -p0 < debian/patches/2.4/pam_pbssimpleauth.patch
Index: /tags/2.4/patches/epilogue.parallel.patch
===================================================================
--- /tags/2.4/patches/epilogue.parallel.patch	(revision 83)
+++ /tags/2.4/patches/epilogue.parallel.patch	(revision 83)
@@ -0,0 +1,18 @@
+--- src/resmom/mom_main.c  2006-01-27 19:42:04.000000000 +0100
++++ src/resmon/mom_main.c  2006-02-21 15:34:40.372437633 +0100
+@@ -4689,6 +4689,15 @@
+     sprintf(PBSNodeMsgBuf,"ERROR:  precancel epilog failed");
+     }
+
++  /*
++   * HvB enable epilogue.parallel script
++  */
++  if (run_pelog(PE_EPILOG,path_epilogp,pjob,PE_IO_TYPE_NULL) != 0)
++    {
++    log_err(-1,(char *)id,"epilog parallel failed");
++    sprintf(PBSNodeMsgBuf,"ERROR:  epilog parallel failed");
++    }
++
+   ptask = (task *)GET_NEXT(pjob->ji_tasks);
+
+   while (ptask != NULL)
Index: /tags/2.4/patches/gcc4.1-rlimit.patch
===================================================================
--- /tags/2.4/patches/gcc4.1-rlimit.patch	(revision 83)
+++ /tags/2.4/patches/gcc4.1-rlimit.patch	(revision 83)
@@ -0,0 +1,47 @@
+--- src/resmom/linux/mom_mach.c	2007-10-18 19:52:19.000000000 +0200
++++ src/resmom/linux/mom_mach.c	2007-11-01 15:44:46.000000000 +0100
+@@ -1155,7 +1155,7 @@
+         if (LOGLEVEL >= 2)
+           {
+           sprintf(log_buffer,"setting cpu time limit to %ld for job %s",
+-            reslim.rlim_cur,
++            (long int) reslim.rlim_cur,
+             pjob->ji_qs.ji_jobid);
+ 
+           log_record(PBSEVENT_SYSTEM,0,id,log_buffer);
+@@ -1197,7 +1197,7 @@
+           if (LOGLEVEL >= 0)
+             {
+             sprintf(log_buffer,"cannot set file limit to %ld for job %s (value too large)",
+-              reslim.rlim_cur,
++              (long int) reslim.rlim_cur,
+               pjob->ji_qs.ji_jobid);
+ 
+             log_err(0,id,log_buffer);
+@@ -1213,7 +1213,7 @@
+         if (setrlimit(RLIMIT_FSIZE,&reslim) < 0)
+           {
+           sprintf(log_buffer,"cannot set file limit to %ld for job %s (setrlimit failed - check default user limits)",
+-            reslim.rlim_max,
++            (long int) reslim.rlim_max,
+             pjob->ji_qs.ji_jobid);
+ 
+           log_err(errno,id,log_buffer);
+@@ -1297,7 +1297,7 @@
+         if (setrlimit(RLIMIT_DATA,&reslim) < 0)
+           {
+          sprintf(log_buffer,"cannot set data limit to %ld for job %s (setrlimit failed w/errno=%d - check default user limits)",
+-            reslim.rlim_max,
++            (long int) reslim.rlim_max,
+             pjob->ji_qs.ji_jobid,
+             errno);
+ 
+@@ -1307,7 +1307,7 @@
+         if (setrlimit(RLIMIT_RSS,&reslim) < 0)
+           {
+          sprintf(log_buffer,"cannot set RSS limit to %ld for job %s (setrlimit failed w/errno=%d - check default user limits)",
+-            reslim.rlim_max,
++            (long int) reslim.rlim_max,
+             pjob->ji_qs.ji_jobid,
+             errno);
+ 
Index: /tags/2.4/patches/gcc4.2-amd64.patch
===================================================================
--- /tags/2.4/patches/gcc4.2-amd64.patch	(revision 83)
+++ /tags/2.4/patches/gcc4.2-amd64.patch	(revision 83)
@@ -0,0 +1,11 @@
+--- src/scheduler.cc/samples/fifo/parse.c	2006-07-12 17:25:20.000000000 +0200
++++ src/scheduler.cc/samples/fifo/parse.c	2007-11-01 11:33:15.000000000 +0100
+@@ -335,7 +335,7 @@
+     perror("Error Allocating Memory");
+     return 0;
+   }
+-  memset( conf.non_prime_sort, (int) NULL, (num_sorts + 1 ) * 
++  memset( conf.non_prime_sort, 0, (num_sorts + 1 ) * 
+   		sizeof( struct sort_info) );
+   
+   if( is_prime_time() == PRIME )
Index: /tags/2.4/patches/pam_pbssimpleauth.patch
===================================================================
--- /tags/2.4/patches/pam_pbssimpleauth.patch	(revision 83)
+++ /tags/2.4/patches/pam_pbssimpleauth.patch	(revision 83)
@@ -0,0 +1,139 @@
+Index: pam_pbssimpleauth.c
+===================================================================
+--- src/pam/pam_pbssimpleauth.c	(revision 1)
++++ src/pam/pam_pbssimpleauth.c	(working copy)
+@@ -73,7 +73,6 @@
+   char jobdirpath[PATH_MAX+1];
+   int debug=0;
+ 
+-  openlog(MODNAME,LOG_PID,LOG_USER);
+   strcpy(jobdirpath,PBS_SERVER_HOME "/mom_priv/jobs");
+ 
+   /* step through arguments */
+@@ -84,15 +83,17 @@
+     else if (!strcmp(*argv,"jobdir"))
+       strncpy(jobdirpath,*argv,PATH_MAX);
+     else
+-      syslog(LOG_ERR,"unknown option: %s",*argv);
++      pam_syslog(pamh, LOG_ERR, "unknown option: %s", *argv);
+     }
+ 
+-  if (debug) syslog(LOG_INFO,"opening %s",jobdirpath);
++  if (debug) 
++  	pam_syslog(pamh, LOG_INFO, "opening %s", jobdirpath);
+ 
+   if ((jobdir = opendir(jobdirpath)) == NULL)
+     {
+-    if (debug) syslog(LOG_INFO,"failed to open jobs dir: %s",strerror(errno));
+-    closelog();
++    if (debug) 
++  	pam_syslog(pamh, LOG_INFO, "failed to open jobs dir: %s", strerror(errno));
++
+     return PAM_IGNORE;
+     }
+ 
+@@ -102,15 +103,16 @@
+ #if defined(PAM_CONV_AGAIN) && defined(PAM_INCOMPLETE)
+   if (retval == PAM_CONV_AGAIN)
+     {
++    /* HvB
+     closelog();
++    */
+     return PAM_INCOMPLETE;
+     }
+ #endif
+ 
+   if ((retval != PAM_SUCCESS) || !username)
+     {
+-    syslog(LOG_ERR,"failed to retrieve username");
+-    closelog();
++    pam_syslog(pamh, LOG_ERR, "failed to retrieve username");
+     return PAM_SERVICE_ERR;
+     }
+ 
+@@ -118,7 +120,8 @@
+ 
+   /* no early returns from this point on because we need to free ubuf */
+ 
+-  if (debug) syslog(LOG_INFO,"username %s, %s",username,user_pwd ? "known" : "unknown");
++  if (debug) 
++  	pam_syslog(pamh, LOG_INFO, "username %s, %s", username, user_pwd ? "known" : "unknown");
+ 
+   if (!user_pwd)
+     {
+@@ -126,7 +129,9 @@
+     }
+   else if (user_pwd->pw_uid == 0)
+     {
+-    if (debug) syslog(LOG_INFO,"allowing uid 0");
++    if (debug) 
++  	pam_syslog(pamh, LOG_INFO, "allowing uid 0");
++
+     retval = PAM_SUCCESS;
+     }
+   else
+@@ -139,12 +144,13 @@
+         continue;
+ 
+       snprintf(jobpath,PATH_MAX-1,"%s/%s",jobdirpath,jdent->d_name);
+-      if (debug) syslog(LOG_INFO,"opening %s",jobpath);
++      if (debug) 
++  	pam_syslog(pamh, LOG_INFO, "opening %s", jobpath);
+ 
+       fp = open(jobpath, O_RDONLY, 0);
+       if (fp < 0)
+         {
+-        syslog(LOG_ERR,"error opening job file");               
++  	pam_syslog(pamh, LOG_ERR, "error opening job file");
+         continue;
+         }
+ 
+@@ -152,7 +158,7 @@
+       if (amt != sizeof(xjob.ji_qs))
+         {
+         close(fp);
+-        syslog(LOG_ERR,"short read of job file");               
++  	pam_syslog(pamh, LOG_ERR, "short read of job file");
+         continue;
+         }
+ 
+@@ -160,11 +166,13 @@
+         {
+         /* odd, this really should be JOB_UNION_TYPE_MOM */
+         close(fp);
+-        syslog(LOG_ERR,"job file corrupt");               
++  	pam_syslog(pamh, LOG_ERR, "job file corrupt");
++
+         continue;
+         }
+ 
+-      if (debug) syslog(LOG_INFO,"state=%d, substate=%d",xjob.ji_qs.ji_state,xjob.ji_qs.ji_substate);
++      if (debug) 
++  	pam_syslog(pamh, LOG_INFO, "state=%d, substate=%d", xjob.ji_qs.ji_state,xjob.ji_qs.ji_substate);
+ 
+       if ((xjob.ji_qs.ji_un.ji_momt.ji_exuid == user_pwd->pw_uid) &&
+           ((xjob.ji_qs.ji_substate == JOB_SUBSTATE_PRERUN) ||
+@@ -173,7 +181,9 @@
+         {
+         /* success! */
+         close(fp);
+-        if (debug) syslog(LOG_INFO,"allowed by %s",jdent->d_name);
++        if (debug) 
++  		pam_syslog(pamh, LOG_INFO, "allowed by %s", jdent->d_name);
++
+         retval = PAM_SUCCESS;
+         break;
+         }
+@@ -188,10 +198,9 @@
+   if (ubuf)
+     free(ubuf);
+     
+-  if (debug) syslog(LOG_INFO,"returning %s",retval==PAM_SUCCESS ? "success" : "failed");
++  if (debug) 
++	pam_syslog(pamh, LOG_INFO, "returning %s", retval==PAM_SUCCESS ? "success" : "failed");
+ 
+-  closelog();
+-
+   return retval;
+ }
+ 
Index: /tags/2.4/patches/pam_pbssimpleauth_4_X.patch
===================================================================
--- /tags/2.4/patches/pam_pbssimpleauth_4_X.patch	(revision 83)
+++ /tags/2.4/patches/pam_pbssimpleauth_4_X.patch	(revision 83)
@@ -0,0 +1,139 @@
+Index: src/pam/pam_pbssimpleauth.c
+===================================================================
+--- src/pam/pam_pbssimpleauth.c	(revision 6504)
++++ src/pam/pam_pbssimpleauth.c	(working copy)
+@@ -36,6 +36,11 @@
+ #define PAM_SM_AUTH
+ #define PAM_SM_ACCOUNT
+ 
++/*
++ * HVB: add for pam_syslog
++*/
++#include <security/pam_ext.h>
++
+ #ifdef HAVE_SECURITY_PAM_APPL_H
+ #include <security/pam_appl.h>
+ #endif
+@@ -77,7 +82,6 @@
+   char jobdirpath[PATH_MAX+1];
+   int debug = 0;
+ 
+-  openlog(MODNAME, LOG_PID, LOG_USER);
+   strcpy(jobdirpath, PBS_SERVER_HOME "/mom_priv/jobs");
+ 
+   /* step through arguments */
+@@ -89,16 +93,15 @@
+     else if (!strcmp(*argv, "jobdir"))
+       strncpy(jobdirpath, *argv, PATH_MAX);
+     else
+-      syslog(LOG_ERR, "unknown option: %s", *argv);
++      pam_syslog(pamh, LOG_ERR, "unknown option: %s", *argv);
+     }
+ 
+-  if (debug) syslog(LOG_INFO, "opening %s", jobdirpath);
++  if (debug) pam_syslog(pamh, LOG_INFO, "opening %s", jobdirpath);
+ 
+   if ((jobdir = opendir(jobdirpath)) == NULL)
+     {
+-    if (debug) syslog(LOG_INFO, "failed to open jobs dir: %s", strerror(errno));
++    if (debug) pam_syslog(pamh, LOG_INFO, "failed to open jobs dir: %s", strerror(errno));
+ 
+-    closelog();
+ 
+     return PAM_IGNORE;
+     }
+@@ -109,7 +112,6 @@
+ #if defined(PAM_CONV_AGAIN) && defined(PAM_INCOMPLETE)
+   if (retval == PAM_CONV_AGAIN)
+     {
+-    closelog();
+     return PAM_INCOMPLETE;
+     }
+ 
+@@ -117,8 +119,7 @@
+ 
+   if ((retval != PAM_SUCCESS) || !username)
+     {
+-    syslog(LOG_ERR, "failed to retrieve username");
+-    closelog();
++    pam_syslog(pamh, LOG_ERR, "failed to retrieve username");
+     return PAM_SERVICE_ERR;
+     }
+ 
+@@ -126,7 +127,7 @@
+ 
+   /* no early returns from this point on because we need to free ubuf */
+ 
+-  if (debug) syslog(LOG_INFO, "username %s, %s", username, user_pwd ? "known" : "unknown");
++  if (debug) pam_syslog(pamh, LOG_INFO, "username %s, %s", username, user_pwd ? "known" : "unknown");
+ 
+   if (!user_pwd)
+     {
+@@ -134,7 +135,7 @@
+     }
+   else if (user_pwd->pw_uid == 0)
+     {
+-    if (debug) syslog(LOG_INFO, "allowing uid 0");
++    if (debug) pam_syslog(pamh, LOG_INFO, "allowing uid 0");
+ 
+     retval = PAM_SUCCESS;
+     }
+@@ -149,13 +150,13 @@
+ 
+       snprintf(jobpath, PATH_MAX - 1, "%s/%s", jobdirpath, jdent->d_name);
+ 
+-      if (debug) syslog(LOG_INFO, "opening %s", jobpath);
++      if (debug) pam_syslog(pamh, LOG_INFO, "opening %s", jobpath);
+ 
+       fp = open(jobpath, O_RDONLY, 0);
+ 
+       if (fp < 0)
+         {
+-        syslog(LOG_ERR, "error opening job file");
++        pam_syslog(pamh, LOG_ERR, "error opening job file");
+         continue;
+         }
+ 
+@@ -164,7 +165,7 @@
+       if (amt != sizeof(xjob.ji_qs))
+         {
+         close(fp);
+-        syslog(LOG_ERR, "short read of job file");
++        pam_syslog(pamh, LOG_ERR, "short read of job file");
+         continue;
+         }
+ 
+@@ -172,11 +173,11 @@
+         {
+         /* odd, this really should be JOB_UNION_TYPE_MOM */
+         close(fp);
+-        syslog(LOG_ERR, "job file corrupt");
++        pam_syslog(pamh, LOG_ERR, "job file corrupt");
+         continue;
+         }
+ 
+-      if (debug) syslog(LOG_INFO, "state=%d, substate=%d", xjob.ji_qs.ji_state, xjob.ji_qs.ji_substate);
++      if (debug) pam_syslog(pamh, LOG_INFO, "state=%d, substate=%d", xjob.ji_qs.ji_state, xjob.ji_qs.ji_substate);
+ 
+       if ((xjob.ji_qs.ji_un.ji_momt.ji_exuid == user_pwd->pw_uid) &&
+           ((xjob.ji_qs.ji_substate == JOB_SUBSTATE_PRERUN) ||
+@@ -186,7 +187,7 @@
+         /* success! */
+         close(fp);
+ 
+-        if (debug) syslog(LOG_INFO, "allowed by %s", jdent->d_name);
++        if (debug) pam_syslog(pamh, LOG_INFO, "allowed by %s", jdent->d_name);
+ 
+         retval = PAM_SUCCESS;
+ 
+@@ -203,9 +204,8 @@
+   if (ubuf)
+     free(ubuf);
+ 
+-  if (debug) syslog(LOG_INFO, "returning %s", retval == PAM_SUCCESS ? "success" : "failed");
++  if (debug) pam_syslog(pamh, LOG_INFO, "returning %s", retval == PAM_SUCCESS ? "success" : "failed");
+ 
+-  closelog();
+ 
+   return retval;
+   }
Index: /tags/2.4/patches/pbs_mkdirs.in
===================================================================
--- /tags/2.4/patches/pbs_mkdirs.in	(revision 83)
+++ /tags/2.4/patches/pbs_mkdirs.in	(revision 83)
@@ -0,0 +1,450 @@
+#!/bin/sh
+#
+# 
+#         OpenPBS (Portable Batch System) v2.3 Software License
+# 
+# Copyright (c) 1999-2000 Veridian Information Solutions, Inc.
+# All rights reserved.
+# 
+# ---------------------------------------------------------------------------
+# For a license to use or redistribute the OpenPBS software under conditions
+# other than those described below, or to purchase support for this software,
+# please contact Veridian Systems, PBS Products Department ("Licensor") at:
+# 
+#    www.OpenPBS.org  +1 650 967-4675                  sales@OpenPBS.org
+#                        877 902-4PBS (US toll-free)
+# ---------------------------------------------------------------------------
+# 
+# This license covers use of the OpenPBS v2.3 software (the "Software") at
+# your site or location, and, for certain users, redistribution of the
+# Software to other sites and locations.  Use and redistribution of
+# OpenPBS v2.3 in source and binary forms, with or without modification,
+# are permitted provided that all of the following conditions are met.
+# After December 31, 2001, only conditions 3-6 must be met:
+# 
+# 1. Commercial and/or non-commercial use of the Software is permitted
+#    provided a current software registration is on file at www.OpenPBS.org.
+#    If use of this software contributes to a publication, product, or
+#    service, proper attribution must be given; see www.OpenPBS.org/credit.html
+# 
+# 2. Redistribution in any form is only permitted for non-commercial,
+#    non-profit purposes.  There can be no charge for the Software or any
+#    software incorporating the Software.  Further, there can be no
+#    expectation of revenue generated as a consequence of redistributing
+#    the Software.
+# 
+# 3. Any Redistribution of source code must retain the above copyright notice
+#    and the acknowledgment contained in paragraph 6, this list of conditions
+#    and the disclaimer contained in paragraph 7.
+# 
+# 4. Any Redistribution in binary form must reproduce the above copyright
+#    notice and the acknowledgment contained in paragraph 6, this list of
+#    conditions and the disclaimer contained in paragraph 7 in the
+#    documentation and/or other materials provided with the distribution.
+# 
+# 5. Redistributions in any form must be accompanied by information on how to
+#    obtain complete source code for the OpenPBS software and any
+#    modifications and/or additions to the OpenPBS software.  The source code
+#    must either be included in the distribution or be available for no more
+#    than the cost of distribution plus a nominal fee, and all modifications
+#    and additions to the Software must be freely redistributable by any party
+#    (including Licensor) without restriction.
+# 
+# 6. All advertising materials mentioning features or use of the Software must
+#    display the following acknowledgment:
+# 
+#     "This product includes software developed by NASA Ames Research Center,
+#     Lawrence Livermore National Laboratory, and Veridian Information
+#     Solutions, Inc.
+#     Visit www.OpenPBS.org for OpenPBS software support,
+#     products, and information."
+# 
+# 7. DISCLAIMER OF WARRANTY
+# 
+# THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. ANY EXPRESS
+# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT
+# ARE EXPRESSLY DISCLAIMED.
+# 
+# IN NO EVENT SHALL VERIDIAN CORPORATION, ITS AFFILIATED COMPANIES, OR THE
+# U.S. GOVERNMENT OR ANY OF ITS AGENCIES BE LIABLE FOR ANY DIRECT OR INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 
+# This license will be governed by the laws of the Commonwealth of Virginia,
+# without reference to its choice of law rules.
+# pbs_mkdirs:
+#
+# This will make the various directories that are needed for PBS
+# housekeeping.
+#
+# Usage:
+#  pbs_mkdirs [-v] [-c] [-C chk_tree_location] what
+#    -v     be verbose
+#    -c     allow usage of chk_tree (do not use this within a make install)
+#    -C     Specify where the location of the chk_tree binary
+#    what   select from the following list
+#              server   -- dirs needed by pbs_server
+#              mom      -- dirs needed by pbs_mom
+#              aux      -- the aux directory
+#              default  -- the default file
+#              common   -- make common directory to all daemons
+#              check    -- run chk_tree (turns on -c automatically)
+#              all      -- do all of the above
+#
+# SVN INFO:
+# 	$Id: pbs_mkdirs.in 2044 2006-04-19 11:43:12Z bas $
+#
+#
+
+#
+# check tree should not be called until it is installed since
+# only relative paths are used by autoconf.
+#
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+CHK_TREE=${DESTDIR}@bindir@/chk_tree
+
+PBS_DEFAULT_SERVER=@PBS_DEFAULT_SERVER@
+
+# PBS_SERVER_HOME is defined without DESTDIR so that DEFAULT_FILE and EVIRON
+# can be based on SERVER_HOME.  SERVER_HOME is defined a second time to pick
+# up DESTDIR
+test -n "$PBS_SERVER_HOME" || PBS_SERVER_HOME=@PBS_SERVER_HOME@
+test -n "$PBS_DEFAULT_FILE" || PBS_DEFAULT_FILE=${DESTDIR}@PBS_DEFAULT_FILE@
+test -n "$PBS_ENVIRON" || PBS_ENVIRON=${DESTDIR}@PBS_ENVIRON@
+
+PBS_SERVER_HOME=${DESTDIR}$PBS_SERVER_HOME
+
+verbose=""
+
+display_flags()
+{
+cat << EOF
+Usage:
+  pbs_mkdirs [-v] [-c] [-C chk_tree_location] what
+    -v     be verbose
+    -c     allow usage of chk_tree (do not use this within a make install)
+    -C     Specify where the location of the chk_tree binary
+    what   select from the following list
+              server   -- dirs needed by pbs_server
+              mom      -- dirs needed by pbs_mom
+              aux      -- the aux directory
+              default  -- the default file
+              common   -- make common directory to all daemons
+              check    -- run chk_tree (turns on -c automatically)
+              all      -- do all of the above
+EOF
+exit 0
+}
+
+
+#
+# this will create a directory and any chain of parent directories
+# that might be needed
+# All of this is somewhat lame because install-sh is used
+# along with install_dir in various places. 
+#
+install_dir()
+{
+	# use the id_ for namespace disambiguation
+	id_dname="$1"
+	id_mode=`test -n "$2" && echo "$2" || echo 755`
+
+	# dlist will contain a list of directory names to make
+	id_dlist=""
+
+	while [ ! \( -z "$id_dname" -o "$id_dname" = / -o \
+		"$id_dname" = "." \) ]; do
+
+		test -f $id_dname && return 1
+		test -d $id_dname && break
+
+		id_dlist="`basename $id_dname` $id_dlist"
+		id_dname=`dirname "$id_dname"`
+	done
+
+	id_dir="$id_dname"
+	for id_d in $id_dlist ""; do
+		id_dir="$id_dir/$id_d"
+		test -z "$id_d" && return 0
+		mkdir $id_dir && chmod $id_mode $id_dir || return 1
+	done
+	return 0
+}
+
+#
+# This will take the name of the variable (not value) and
+# make a directory. This is just to stick with the original
+# way things were done in the top-level make file in PBS
+#
+install_dir_by_varname()
+{
+	idv_dvarname="$1"
+	idv_dname=`eval 'echo $'$idv_dvarname`
+
+	idv_mode=`test -n "$2" && echo "$2" || echo 755`
+
+	if [ X$idv_dname = X ] ; then
+		echo $idv_dvarname is not defined 1>&2
+		return 1
+	elif [ -f $idv_dname ] ; then
+		echo $idv_dvarname exists and is not a directory 1>&2
+		return 1
+	elif [ -d $idv_dname ] ; then
+		chmod $idv_mode $idv_dname || return 1
+		return 0
+	elif [ ! -d $idv_dname ] ; then
+		test -n "$verbose" && echo Creating $idv_dname
+		install_dir `dirname $idv_dname` 755 && \
+		    mkdir $idv_dname && chmod $idv_mode $idv_dname || return 1
+	fi
+
+	return 0
+}
+
+check_env()
+{
+	test -n "$verbose" && echo Making environment file
+	if [ ! -f $PBS_ENVIRON ] ; then
+		install_dir `dirname $PBS_ENVIRON` || return 1
+		echo "PATH=/bin:/usr/bin" > $PBS_ENVIRON || return 1
+		if [ X$TZ != X ] ; then
+			echo "TZ=$TZ" >> $PBS_ENVIRON || return 1
+		fi
+		if [ X$LANG != X ] ; then
+			echo "LANG=$LANG" >> $PBS_ENVIRON || return 1
+		fi
+		if [ X$LC_ALL != X ] ; then
+			echo "LC_ALL=$LC_ALL" >> $PBS_ENVIRON || return 1
+		fi
+		if [ X$LC_COLLATE != X ] ; then
+			echo "LC_COLLATE=$LC_COLLATE" >> $PBS_ENVIRON || return 1
+		fi
+		if [ X$LC_CTYPE != X ] ; then
+			echo "LC_CTYPE=$LC_CTYPE" >> $PBS_ENVIRON || return 1
+		fi
+		if [ X$LC_MONETARY != X ] ; then
+			echo "LC_MONETARY=$LC_MONETARY" >> $PBS_ENVIRON || return 1
+		fi
+		if [ X$LC_NUMERIC != X ] ; then
+			echo "LC_NUMERIC=$LC_NUMERIC" >> $PBS_ENVIRON || return 1
+		fi
+		if [ X$LC_TIME != X ] ; then
+			echo "LC_TIME=$LC_TIME" >> $PBS_ENVIRON || return 1
+		fi
+		chmod 644 $PBS_ENVIRON || return 1
+	fi
+}
+
+chk_tree_wrap()
+{
+	if test -n "$chktree";then
+		$CHK_TREE $* || return 1
+	fi
+}
+
+mk_server_dirs()
+{
+	test -n "$verbose" && echo Creating Directories required for the Server
+	install_dir_by_varname PBS_SERVER_HOME 755 || return 1
+
+	install_dir $PBS_SERVER_HOME/spool 1777 || return 1
+	install_dir $PBS_SERVER_HOME/server_priv 750 || return 1
+	install_dir $PBS_SERVER_HOME/server_priv/jobs 750 || return 1
+	install_dir $PBS_SERVER_HOME/server_priv/hostlist 750 || return 1
+	install_dir $PBS_SERVER_HOME/server_priv/queues 750 || return 1
+	install_dir $PBS_SERVER_HOME/server_priv/acl_svr 750 || return 1
+	install_dir $PBS_SERVER_HOME/server_priv/acl_hosts 750 || return 1
+	install_dir $PBS_SERVER_HOME/server_priv/acl_users 750 || return 1
+	install_dir $PBS_SERVER_HOME/server_priv/acl_groups 750 || return 1
+	install_dir $PBS_SERVER_HOME/server_priv/disallowed_types 750 || return 1
+	install_dir $PBS_SERVER_HOME/server_priv/accounting 755 || return 1
+	install_dir $PBS_SERVER_HOME/server_logs 755 || return 1
+	install_dir $PBS_SERVER_HOME/sched_priv 750 || return 1
+	install_dir $PBS_SERVER_HOME/sched_priv/accounting 755 || return 1
+	install_dir $PBS_SERVER_HOME/sched_logs 755 || return 1
+	install_dir $PBS_SERVER_HOME/server_priv/arrays 750 || return 1
+
+	test -f $PBS_ENVIRON || check_env || return 1
+
+	chk_tree_wrap -d -n $PBS_SERVER_HOME/server_priv/jobs \
+		$PBS_SERVER_HOME/server_priv/hostlist \
+		$PBS_SERVER_HOME/server_priv/queues \
+		$PBS_SERVER_HOME/server_priv/acl_svr \
+		$PBS_SERVER_HOME/server_priv/acl_hosts \
+		$PBS_SERVER_HOME/server_priv/acl_users \
+		$PBS_SERVER_HOME/server_priv/acl_groups \
+		$PBS_SERVER_HOME/server_priv/accounting \
+		$PBS_SERVER_HOME/server_logs \
+		$PBS_SERVER_HOME/server_priv/arrays  || return 1
+	chk_tree_wrap -d -n -s $PBS_SERVER_HOME/spool || return 1
+	chk_tree_wrap -n $PBS_ENVIRON || return 1
+}
+
+
+mk_mom_dirs()
+{
+	test -n "$verbose" && echo Creating Directories required for MOM
+
+	install_dir_by_varname PBS_SERVER_HOME 755 || return 1
+
+	test -d $PBS_SERVER_HOME/spool || \
+	    install_dir $PBS_SERVER_HOME/spool 1777 || return 1
+
+	install_dir $PBS_SERVER_HOME/checkpoint 770 || return 1
+	install_dir $PBS_SERVER_HOME/undelivered  1777 || return 1
+	install_dir $PBS_SERVER_HOME/mom_priv 751 || return 1
+	install_dir $PBS_SERVER_HOME/mom_priv/jobs 751 || return 1
+	install_dir $PBS_SERVER_HOME/mom_logs 755 || return 1
+
+	mk_default_file || return 1
+
+	test -f $PBS_ENVIRON || check_env || return 1
+
+	chk_tree_wrap -d -n $PBS_SERVER_HOME/checkpoint \
+		$PBS_SERVER_HOME/mom_priv/jobs \
+		$PBS_SERVER_HOME/mom_logs || return 1
+	chk_tree_wrap -d -n -s $PBS_SERVER_HOME/spool \
+		$PBS_SERVER_HOME/undelivered || return 1
+	chk_tree_wrap -n $PBS_ENVIRON || return 1
+}
+
+mk_default_file()
+{
+	test -n "$verbose" && echo Making default server file
+
+	install_dir `dirname $PBS_DEFAULT_FILE` || return 1
+
+	# I think I know better than pbs.  --pw
+	if [ ! -e $PBS_DEFAULT_FILE ]; then
+	    rm -f $PBS_DEFAULT_FILE > /dev/null 2>&1
+	    echo $PBS_DEFAULT_SERVER > $PBS_DEFAULT_FILE && \
+		chmod 644 $PBS_DEFAULT_FILE || return 1
+	fi
+
+	chk_tree_wrap -n $PBS_DEFAULT_FILE || return 1
+}
+
+mk_common()
+{
+	mk_default_file || return 1
+	mk_aux_dir || return 1
+	install_dir $PBS_SERVER_HOME/spool 1777 || return 1
+	check_env || return 1
+}
+
+mk_aux_dir()
+{
+	install_dir $PBS_SERVER_HOME/aux 755 || return 1
+	chk_tree_wrap -d -n $PBS_SERVER_HOME/aux || return 1
+}
+
+do_check_tree()
+{
+	chk_tree_wrap -d $PBS_SERVER_HOME/server_priv/jobs \
+		$PBS_SERVER_HOME/server_priv/queues \
+		$PBS_SERVER_HOME/server_priv/acl_svr \
+		$PBS_SERVER_HOME/server_priv/acl_hosts \
+		$PBS_SERVER_HOME/server_priv/acl_users \
+		$PBS_SERVER_HOME/server_priv/acl_groups \
+		$PBS_SERVER_HOME/server_priv/accounting \
+		$PBS_SERVER_HOME/server_logs || return 1
+	chk_tree_wrap -d $PBS_SERVER_HOME/checkpoint \
+		$PBS_SERVER_HOME/mom_priv/jobs \
+		$PBS_SERVER_HOME/mom_logs || return 1
+	chk_tree_wrap -d -s $PBS_SERVER_HOME/spool \
+		$PBS_SERVER_HOME/undelivered || return 1
+	chk_tree_wrap -d $PBS_SERVER_HOME/aux || return 1
+	chk_tree_wrap $PBS_DEFAULT_FILE || return 1
+}
+
+
+# mk_dirs() will generate the set of directories needed 
+# for server and mom execution.
+
+mk_dirs()
+{
+	chktree=yes
+	mk_server_dirs || return 1
+	mk_mom_dirs || return 1
+	mk_default_file || return 1
+	mk_aux_dir || return 1
+}
+
+
+getopt vcd:C:h "$@" > /dev/null || display_flags
+set -- `getopt vcd:C:h "$@"`
+while true
+do
+	case "$1" in
+		-v)
+			verbose=yes
+			shift
+		;;
+		-d)
+			PBS_SERVER_HOME=$2
+			shift 2
+		;; 
+		-h)
+			display_flags
+		;;
+		-c)
+			chktree=yes
+			shift 
+		;; 
+		-C)
+			CHK_TREE=$2
+			shift 2
+		;; 
+		--)
+			shift; break
+		;;
+
+          esac
+done
+
+while [ $# -gt 0 ]
+do
+	case "$1" in
+		serv*)    
+			mk_server_dirs || exit 1
+			break
+			;;
+	    	mom*)   
+			mk_mom_dirs || exit 1 
+			break
+			;;
+		aux*)   
+			mk_aux_dir || exit 1
+			break
+		;; 
+		default*) 
+			mk_default_file || exit 1
+			break
+		;;
+		common*)
+			mk_common || exit 1
+			break
+		;;
+	    	check*)
+			chktree=yes
+			do_check_tree || exit 1
+			break
+		;;
+		all*)  
+			mk_dirs || exit 1
+			break
+		;;
+		*)		
+			echo "$1 is unknown flag"
+			display_flags
+			break
+		;;
+	esac
+	shift
+done
Index: /tags/2.4/patches/pbs_mkdirs.patch
===================================================================
--- /tags/2.4/patches/pbs_mkdirs.patch	(revision 83)
+++ /tags/2.4/patches/pbs_mkdirs.patch	(revision 83)
@@ -0,0 +1,40 @@
+Index: buildutils/pbs_mkdirs.in
+===================================================================
+--- buildutils/pbs_mkdirs.in	(revision 6869)
++++ buildutils/pbs_mkdirs.in	(working copy)
+@@ -340,18 +340,17 @@
+ 
+ 	test -f $PBS_ENVIRON || check_env || return 1
+ 
+-	chk_tree_wrap -d -n $PBS_SERVER_HOME/checkpoint \
+-		$PBS_SERVER_HOME/mom_priv/jobs \
++	chk_tree_wrap -d -n $PBS_SERVER_HOME/mom_priv/jobs \
+ 		$PBS_SERVER_HOME/mom_logs || return 1
+ 	chk_tree_wrap -d -n -s $PBS_SERVER_HOME/spool \
+-	$PBS_SERVER_HOME/undelivered || return 1
++        $PBS_SERVER_HOME/checkpoint \
++	    $PBS_SERVER_HOME/undelivered || return 1
+ 	chk_tree_wrap -n $PBS_ENVIRON || return 1
+ }
+ 							
+ mk_default_ld_lib_file()
+ {
+-  echo "loadlibfile = $HAVE_LOAD_LIB_FILE"
+-  test -n "$verbose" && echo "loadlibfile = $HAVE_LOAD_LIB_FILE"
++    test -n "$verbose" && echo "loadlibfile = $HAVE_LOAD_LIB_FILE"
+     if [ "$HAVE_LOAD_LIB_FILE" = "yes" ]; then
+       test -n "$verbose" && echo Making libtorque.conf
+ 
+@@ -413,10 +412,10 @@
+ 		$PBS_SERVER_HOME/server_priv/accounting \
+ 		$PBS_SERVER_HOME/job_logs || return 1
+ 		$PBS_SERVER_HOME/server_logs || return 1
+-	chk_tree_wrap -d $PBS_SERVER_HOME/checkpoint \
+-		$PBS_SERVER_HOME/mom_priv/jobs \
++	chk_tree_wrap -d $PBS_SERVER_HOME/mom_priv/jobs \
+ 		$PBS_SERVER_HOME/mom_logs || return 1
+ 	chk_tree_wrap -d -s $PBS_SERVER_HOME/spool \
++		$PBS_SERVER_HOME/checkpoint \
+ 		$PBS_SERVER_HOME/undelivered || return 1
+ 	chk_tree_wrap -d $PBS_SERVER_HOME/$AUX_PATH || return 1
+ 	chk_tree_wrap $PBS_DEFAULT_FILE || return 1
Index: /tags/2.4/patches/ptmx.patch
===================================================================
--- /tags/2.4/patches/ptmx.patch	(revision 83)
+++ /tags/2.4/patches/ptmx.patch	(revision 83)
@@ -0,0 +1,73 @@
+--- torque-1.1.0p1/src/resmom/linux/mom_start.c	2004-06-02 19:54:45.000000000 +0100
++++ torque-1.1.0p1-ptmx/src/resmom/linux/mom_start.c	2004-07-27 04:15:33.000000000 +0100
+@@ -78,6 +78,7 @@
+ */
+ #include <pbs_config.h>   /* the master config generated by configure */
+ 
++#include <stdlib.h> /* for unix98 pty api in open_master */
+ #include <string.h>
+ #include <unistd.h>
+ #include <pwd.h>
+@@ -356,48 +357,31 @@
+  * piece of code depends on multiplexor /dev/ptc
+  */
+ 
+-#define PTY_SIZE 12
+ 
+ int open_master(
+ 
+   char **rtn_name)	/* RETURN name of slave pts */
+ 
+   {
+-  char 	       *pc1;
+-  char 	       *pc2;
+   int		ptc;	/* master file descriptor */
+-  static char	ptcchar1[] = "pqrs";
+-  static char	ptcchar2[] = "0123456789abcdef";
+-  static char	pty_name[PTY_SIZE+1];	/* "/dev/[pt]tyXY" */
+ 
+-  strncpy(pty_name, "/dev/ptyXY", PTY_SIZE);
+-
+-  for (pc1 = ptcchar1;*pc1 != '\0';++pc1) 
++  if ((ptc = open("/dev/ptmx",O_RDWR|O_NOCTTY)) >= 0) 
+     {
+-    pty_name[8] = *pc1;
+-
+-    for (pc2 = ptcchar2;*pc2 != '\0';++pc2) 
+-      {
+-      pty_name[9] = *pc2;
+-
+-      if ((ptc = open(pty_name,O_RDWR|O_NOCTTY,0)) >= 0) 
+-        {
+-        /* got a master, fix name to matching slave */
+-
+-        pty_name[5] = 't';	
+-
+-        *rtn_name = pty_name;
+-
++    /* got a master, fix name to matching slave */
++       if (grantpt(ptc)<0 || unlockpt(ptc)<0)
++         {
++           close(ptc);
++           return(-1);
++         }
++       *rtn_name = (char *) ptsname(ptc); /* never to be freed */
++       if (*rtn_name == NULL)
++	  {
++            close(ptc);
++	    return(-1);
++          }
+         return(ptc);
+-        } 
+-      else if (errno == ENOENT)
+-        {
+-        return(-1);	/* tried all entries, give up */
+-        }
+-      }
+-    }
+-
+-  return(-1);	/* tried all entries, give up */
++     } 
++  return(-1);	/* give up */
+   }  /* END open_master() */
+
Index: /tags/2.4/patches/submit_filter.patch
===================================================================
--- /tags/2.4/patches/submit_filter.patch	(revision 83)
+++ /tags/2.4/patches/submit_filter.patch	(revision 83)
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+FILE="src/cmds/qsub.c"
+ORG="/usr/local/sbin/torque_submitfilter"
+NEW="/usr/sbin/torque_submitfilter"
+
+sed -e "s,$ORG,$NEW," $FILE > $FILE.new
+
+mv $FILE.new $FILE
Index: /tags/2.4/patches/tk.patch
===================================================================
--- /tags/2.4/patches/tk.patch	(revision 83)
+++ /tags/2.4/patches/tk.patch	(revision 83)
@@ -0,0 +1,11 @@
+--- configure	2004-08-04 12:23:08.000000000 +0200
++++ configure.new	2004-08-04 12:13:10.000000000 +0200
+@@ -1048,7 +1048,7 @@
+ 
+                     tk_h=/dev/null
+     for i in $TCL_DIR/include/tk.h \
+-      `/bin/ls -d $TCL_DIR/include/tk*/tk.h 2> /dev/null`; do
++      `/bin/ls -d $TCL_DIR/include/tcl*/tk.h 2> /dev/null`; do
+         test -r $i && { tk_h="$i"; break; }
+     done
+ 
Index: /tags/2.4/patches/torque-pam.patch
===================================================================
--- /tags/2.4/patches/torque-pam.patch	(revision 83)
+++ /tags/2.4/patches/torque-pam.patch	(revision 83)
@@ -0,0 +1,11 @@
+--- configure	2007-11-01 12:11:56.000000000 +0100
++++ configure.new	2007-11-01 12:18:35.000000000 +0100
+@@ -23218,7 +23218,7 @@
+ {
+ 
+                   $t* username;
+-                  pam_get_user(0,&username,0);
++                  pam_get_user((pam_handle_t*) 1,&username,0);
+ 
+   ;
+   return 0;
Index: /tags/2.4/patches/torque.cfg.patch
===================================================================
--- /tags/2.4/patches/torque.cfg.patch	(revision 83)
+++ /tags/2.4/patches/torque.cfg.patch	(revision 83)
@@ -0,0 +1,29 @@
+--- src/server/pbsd_main.c	2006-01-27 19:45:38.000000000 +0100
++++ src/server/pbsd_main.c	2006-02-22 12:52:57.530088796 +0100
+@@ -452,6 +452,7 @@
+   time_t last_jobstat_time;
+   int    when;
+ 
++  int	 BuffSize;
+   char   *Buffer;
+ 
+   void	 ping_nodes A_((struct work_task *ptask));
+@@ -476,7 +477,8 @@
+ 
+   ProgName = argv[0];
+ 
+-  Buffer=calloc(65536,sizeof(char));
++  BuffSize=65536;
++  Buffer=calloc(1,BuffSize);
+ 
+   /* if we are not running with real and effective uid of 0, forget it */
+ 
+@@ -502,7 +504,7 @@
+ 
+   /* load/process config file first then override values with command line parameters */
+ 
+-  if (TLoadConfig(Buffer,sizeof(Buffer)) == 0)
++  if (TLoadConfig(Buffer,BuffSize) == 0)
+     {
+     char *ptr;
+     char *tptr;
Index: /tags/2.4/patches/trqauth_syslog.patch
===================================================================
--- /tags/2.4/patches/trqauth_syslog.patch	(revision 83)
+++ /tags/2.4/patches/trqauth_syslog.patch	(revision 83)
@@ -0,0 +1,69 @@
+Index: trq_auth_daemon.c
+===================================================================
+--- trq_auth_daemon.c	(revision 6504)
++++ trq_auth_daemon.c	(working copy)
+@@ -36,8 +36,17 @@
+     /* Currently this only display's the port for the trq server
+      * from the lib_ifl.h file or server_name file (The same way
+      * the client utilities determine the pbs_server port)
+-     */
+-    printf("hostname: %s\n", tmp_name);
++    */
++    if (debug_mode == TRUE)
++      {
++      printf("pbs_server: %s\n", tmp_name);
++      }
++    else
++      {
++      openlog("trqauthd", LOG_PID | LOG_NOWAIT, LOG_DAEMON);
++      syslog(LOG_INFO, "pbs_server : %s\n", tmp_name);
++      closelog();
++      }
+     *ip = tmp_name;
+     PBS_get_server(tmp_name, (unsigned int *)t_port);
+     if (*t_port == 0)
+@@ -61,7 +70,18 @@
+     char **sign_key)
+   {
+   int rc = PBSE_NONE;
+-  fprintf(stderr, "pbs_server port is: %d\n", t_server_port);
++
++  if (debug_mode == TRUE)
++    {
++    fprintf(stderr, "pbs_server port is: %d\n", t_server_port);
++    }
++  else
++    {
++    openlog("trqauthd", LOG_PID | LOG_NOWAIT, LOG_DAEMON);
++    syslog(LOG_INFO, "pbs_server port is : %d\n", t_server_port);
++    closelog();
++    }
++
+   return rc;
+   }
+ 
+@@ -88,6 +108,7 @@
+ 
+   if (getenv("PBSDEBUG") != NULL)
+     debug_mode = TRUE;
++
+   if (debug_mode == FALSE)
+     {
+     pid = fork();
+@@ -104,11 +125,15 @@
+       }
+     else
+       {
+-      fprintf(stderr, "trqauthd daemonized - port %d\n", server_port);
++      openlog("trqauthd", LOG_PID | LOG_NOWAIT, LOG_DAEMON);
++      syslog(LOG_INFO, "daemonized - port: %d\n", server_port);
++      closelog();
++
+       /* If I made it here I am the child */
+       fclose(stdin);
+       fclose(stdout);
+       fclose(stderr);
++
+       /* We closed 0 (stdin), 1 (stdout), and 2 (stderr). fopen should give us
+          0, 1 and 2 in that order. this is a UNIX practice */
+       (void)fopen("/dev/null", "r");
Index: /tags/2.4/postinst
===================================================================
--- /tags/2.4/postinst	(revision 83)
+++ /tags/2.4/postinst	(revision 83)
@@ -0,0 +1,183 @@
+#!/bin/sh -e
+#
+# Authors: Bas van der Vlies & Jaap Dijkshoorn
+# Desc.  : Put a default torque file in /etc/default/torque
+#
+# SVN INFO: 
+#	$Id: postinst 2329 2006-09-21 10:12:53Z bas $
+#set -x
+
+SPOOLDIR=/var/spool/torque
+SERVER_CONF_FILE=${SPOOLDIR}/server_name
+CONFIG_FILE=/etc/default/torque
+MKDIR="/usr/sbin/pbs_mkdirs"
+
+
+# Always check/create the directory structure
+#
+$MKDIR all
+
+
+# Source debconf library.
+. /usr/share/debconf/confmodule
+
+
+# Also build the tclindexes again for xpbs xpbsmon
+#
+for file in xpbs xpbsmon
+do
+	if [ -d  /usr/lib/torque/$file ] 
+	then
+		cd /usr/lib/torque/$file
+		./buildindex /usr/lib/torque/$file
+	fi
+done
+
+
+# creating default file torque in /etc/default
+#
+create_default_torque_file() {
+    set_conf_options() {
+        RESULT=""
+        db_get torque/$1 || true
+        if [ $? -eq 0 ]; then
+            RESULT=$RET
+        fi
+    }
+
+    PBS_SERVER=0
+    PBS_MOM=0
+    PBS_SCHED=0
+    PBS_MOM_OPTS=""
+    PBS_MOM_RESTART_OPTS=""
+    PBS_SCHED_OPTS=""
+    PBS_SERVER_OPTS=""
+
+    db_get torque/daemon_list
+
+    for daemon in $RET; do
+        daemon=${daemon%,}
+
+        # this sets $RESULT
+        set_conf_options ${daemon}_opts
+
+        case "$daemon" in
+            pbs_server)
+                PBS_SERVER=1
+                PBS_SERVER_OPTS=$RESULT
+                ;;
+            pbs_mom)
+                PBS_MOM=1
+                PBS_MOM_OPTS=$RESULT
+
+        	set_conf_options ${daemon}_restart_opts
+                PBS_MOM_RESTART_OPTS=$RESULT
+
+                ;;
+            pbs_sched)
+                PBS_SCHED=1
+                PBS_SCHED_OPTS=$RESULT
+                ;;
+        esac
+    done
+
+  cat > $CONFIG_FILE << EOF
+#
+# Author: Bas van der Vlies & Jaap Dijkshoorn
+# created with install of torque
+#
+# Do not edit this file by hand, use
+#
+#     dpkg-reconfigure -p high torque
+#
+# to change which daemons to start or
+#
+#     dpkg-reconfigure -p medium torque
+#
+# to even change startup options (PBS_{MOM,SCHED,SERVER}_OPTS).
+
+PBS_MOM=$PBS_MOM
+PBS_SCHED=$PBS_SCHED
+PBS_SERVER=$PBS_SERVER
+
+PBS_MOM_OPTS="$PBS_MOM_OPTS"
+PBS_MOM_RESTART_OPTS='$PBS_MOM_RESTART_OPTS'
+PBS_SCHED_OPTS="$PBS_SCHED_OPTS"
+PBS_SERVER_OPTS="$PBS_SERVER_OPTS"
+
+EOF
+}
+
+
+if [ "$1" = configure ]
+then
+	if [ ! -f $CONFIG_FILE ]
+	then
+		create_default_torque_file
+	fi
+fi
+
+
+#
+# Generate server_name
+#
+if [ "$1" = configure -o ! -f $SERVER_CONF_FILE ]; then
+
+    db_get torque/server_name || true
+    NEW_SERVER_NAME="$RET"
+    OLD_SERVER_NAME="`cat $SERVER_CONF_FILE`"
+
+    if [ "$OLD_SERVER_NAME" != "$NEW_SERVER_NAME" ]; then
+        # backup
+        mv $SERVER_CONF_FILE $SERVER_CONF_FILE.`date +"%Y%m%d-%H%M%S"`
+    fi
+
+    echo $NEW_SERVER_NAME > $SERVER_CONF_FILE
+fi
+
+
+#
+# make the spool directory an set mode bits.
+#
+if [ ! -d $SPOOLDIR/spool ]
+then
+	mkdir $SPOOLDIR/spool
+fi
+chmod 1777 $SPOOLDIR/spool
+chmod 1777 $SPOOLDIR/undelivered
+
+
+# pbs_sched needs a subdir not created by pbs_mkdirs.
+if [ ! -d $SPOOLDIR/sched_priv/accounting ]
+then
+    mkdir $SPOOLDIR/sched_priv/accounting
+fi
+
+#
+# create an empty config file for pbs_mom if missing
+#
+if [ ! -f $SPOOLDIR/mom_priv/config ]
+then
+    touch $SPOOLDIR/mom_priv/config
+fi
+
+
+#DEBHELPER#
+
+
+# Automatically added by dh_installinit
+if [ -x "/etc/init.d/torque" ]; then
+	update-rc.d torque defaults 99 1 >/dev/null
+	if [ -x "`which invoke-rc.d 2>/dev/null`" ]
+	then
+        if [ "$1" = configure ]
+		then
+			invoke-rc.d torque restart || exit $? 
+		else
+			invoke-rc.d torque start || exit $?
+        fi
+	fi
+fi
+# End automatically added section
+
+
Index: /tags/2.4/postrm
===================================================================
--- /tags/2.4/postrm	(revision 83)
+++ /tags/2.4/postrm	(revision 83)
@@ -0,0 +1,27 @@
+#!/bin/sh -e
+#
+# Authors: Bas van der Vlies & Jaap Dijkshoorn
+#
+# SVN INFO:
+#	$Id: postrm 318 2004-02-02 11:56:16Z bas $
+#
+CONFIG_FILE=/etc/default/torque
+
+if [ "$1" = "purge" ]
+then
+    if [ -e $CONFIG_FILE ]
+    then
+        /bin/rm $CONFIG_FILE
+    fi
+
+    # if we still have debconf, also remove our entries from the DB
+    if [ -e /usr/share/debconf/confmodule ]
+    then
+        # Source debconf library.
+        . /usr/share/debconf/confmodule
+        db_purge
+    fi
+fi
+
+
+#DEBHELPER#
Index: /tags/2.4/rules
===================================================================
--- /tags/2.4/rules	(revision 83)
+++ /tags/2.4/rules	(revision 83)
@@ -0,0 +1,117 @@
+#!/usr/bin/make -f
+# Made with the aid of debmake, by Christoph Lameter,
+# based on the sample debian/rules file for GNU hello by Ian Jackson.
+#
+# Authors: Bas van der Vlies
+# Desc.  : Builds a torque deb package from the sources
+#
+# SVN INFO:
+#	$Id: rules 2385 2006-11-03 07:20:35Z bas $
+#
+#	compat=4
+
+package=torque
+
+patched: 
+	$(checkdir)
+
+	# Make scripts executable
+	#
+	chmod +x debian/patches/apply
+	chmod +x debian/conf_torque
+	chmod +x debian/patches/submit_filter.patch
+
+	# apply some patches
+	#debian/patches/apply
+
+	touch patched
+
+build: patched
+	$(checkdir)
+	debian/conf_torque
+	$(MAKE)
+	touch build
+
+clean:
+	$(checkdir)
+	-rm -f build
+	-$(MAKE) distclean
+	-rm -f `find . -name "*~"`
+	-rm -rf debian/torque debian/files* core
+	-rm -f debian/*.debhelper
+
+binary-indep: checkroot build
+	$(checkdir)
+# There are no architecture-independent files to be uploaded
+# generated by this package.  If there were any they would be
+# made here.
+
+binary-arch: checkroot build
+	$(checkdir)
+	-rm -rf debian/torque
+	install -d debian/torque
+	cd debian/torque && install -d `cat ../dirs`
+
+	chmod 700 buildutils/pbs_mkdirs
+	DESTDIR=`pwd`/debian/torque buildutils/pbs_mkdirs\
+		-v -C./src/tools/chk_tree -d `pwd`/debian/torque/var/spool/torque all
+
+	$(MAKE) DESTDIR=`pwd`/debian/torque install
+
+	  # OLD PBS stuff before 2.1.0
+ 	  #libdir=`pwd`/debian/torque/usr/lib/torque \
+	  #includedir=`pwd`/debian/torque/usr/include/torque \
+	  #PBS_SERVER_HOME=`pwd`/debian/torque/var/spool/torque \
+
+	#debian/patch_gui_cmds.sh /usr/lib/torque
+
+	dh_testdir
+	dh_testroot 
+	dh_installdirs
+	dh_installchangelogs CHANGELOG
+	#dh_installdocs -Xcontrib README.mpiexec
+	dh_installdocs -Xcontrib
+	dh_installexamples contrib/* -XCVS
+	dh_install
+	dh_link
+	dh_installdebconf
+	dh_compress
+	dh_fixperms
+	dh_installdeb 
+	dh_makeshlibs --noscripts
+	dh_shlibdeps
+	dh_gencontrol 
+
+	## Do not modify any postinst/rm scripts
+	#
+	dh_installinit --noscripts 
+
+	dh_md5sums
+
+	#chown -R root.root debian/torque
+	#chmod -R go=rX debian/torque
+
+	#
+	# Include pbs_mkdirs in the package, else we have to make own
+	# directories. Thanks to Jaap Dijkshoorn
+	#
+	cp buildutils/pbs_mkdirs debian/torque/usr/sbin
+
+	# Not in the standard install ;-)
+	#
+	#cp src/include/rm.h debian/torque/usr/include/torque
+	#cp src/include/log.h debian/torque/usr/include/torque
+
+	dh_builddeb
+
+define checkdir
+	test -f debian/rules
+endef
+
+binary: binary-indep binary-arch
+
+checkroot:
+	$(checkdir)
+	test root = "`whoami`"
+
+.PHONY: binary binary-arch binary-indep clean checkroot
Index: /tags/2.4/torque.config
===================================================================
--- /tags/2.4/torque.config	(revision 83)
+++ /tags/2.4/torque.config	(revision 83)
@@ -0,0 +1,28 @@
+#!/bin/sh -e
+
+# Source debconf library.
+. /usr/share/debconf/confmodule
+
+# Display disclaimer
+db_input high torque/disclaimer || true
+db_go
+
+# Let the user choose which daemons to run
+db_input high torque/daemon_list || true
+db_go
+
+# Ask the user for server_name
+db_input high torque/server_name || true
+db_go
+
+# If the user wants daemons, ask for any options to be passed
+db_get torque/daemon_list
+for daemon in $RET; do
+    daemon=${daemon%,}
+    db_input medium torque/${daemon}_opts || true
+    db_go
+done
+
+# Let the user specify which option must be used when pbs_mom restart 
+db_input medium torque/pbs_mom_restart_opts || true
+db_go
Index: /tags/2.4/torque.templates
===================================================================
--- /tags/2.4/torque.templates	(revision 83)
+++ /tags/2.4/torque.templates	(revision 83)
@@ -0,0 +1,71 @@
+Template: torque/disclaimer
+Type: note
+Description: This debconf isn't fully functional.
+ We currently do not provide full-featured torque configuration via debconf.
+ We just care about /etc/default/torque to define which daemons to start.
+ .
+ Use qmgr or the files in /var/spool/torque for everything else.
+
+Template: torque/daemon_list
+Type: multiselect
+Choices: pbs_server, pbs_mom, pbs_sched
+Default: pbs_mom
+Description: Which daemons should be run on this node?
+ You can define which daemons should be started on this node. Normally, the
+ master node has to run at least pbs_server and pbs_sched (unless replaced by
+ Maui), whereas computation nodes usually only run pbs_mom (the Torque client)
+
+Template: torque/server_name
+Type: string
+Default: localhost
+Description: Please enter FQDN of your Torque server
+ Please enter the FQDN (with domain) of your Torque server. This is value will
+ be stored in /var/spool/torque/server_name.
+ .
+ Don't modify this file by hand, it will be overwritten anytime you upgrade
+ this package. Use "dpkg-reconfigure -p high torque" instead.
+
+Template: torque/pbs_mom_opts
+Type: string
+Description: Please enter the options to be passed to pbs_mom
+ Please enter the commandline options for pbs_mom. You can usually leave it
+ empty.
+ .
+ The value will be stored in /etc/default/torque.
+ .
+ Don't modify this file by hand, it will be overwritten anytime you upgrade
+ this package. Use "dpkg-reconfigure -p medium torque" instead.
+
+Template: torque/pbs_mom_restart_opts
+Type: string
+Description: Please enter the options to be passed to pbs_mom when it restarts
+ Please enter the commandline options when pbs_mom restarts. You can use
+ -r (delete the jobs) or -p (leave jobs running)
+ .
+ The value will be stored in /etc/default/torque.
+ .
+ Don't modify this file by hand, it will be overwritten anytime you upgrade
+ this package. Use "dpkg-reconfigure -p medium torque" instead.
+
+Template: torque/pbs_sched_opts
+Type: string
+Description: Please enter the options to be passed to pbs_sched
+ Please enter the commandline options for pbs_sched. You can usually leave it
+ empty.
+ .
+ The value will be stored in /etc/default/torque.
+ .
+ Don't modify this file by hand, it will be overwritten anytime you upgrade
+ this package. Use "dpkg-reconfigure -p medium torque" instead.
+
+Template: torque/pbs_server_opts
+Type: string
+Default: -a t
+Description: Please enter the options to be passed to pbs_server
+ Please enter the commandline options for pbs_server.
+ The default is "-a t"
+ .
+ The value will be stored in /etc/default/torque.
+ .
+ Don't modify this file by hand, it will be overwritten anytime you upgrade
+ this package. Use "dpkg-reconfigure -p medium torque" instead.
