commit these RT differences, seem to be mostly in autogen'ed stuff
authorivan <ivan>
Wed, 1 Aug 2007 22:20:33 +0000 (22:20 +0000)
committerivan <ivan>
Wed, 1 Aug 2007 22:20:33 +0000 (22:20 +0000)
16 files changed:
rt/Makefile
rt/bin/mason_handler.fcgi
rt/bin/mason_handler.scgi
rt/bin/mason_handler.svc
rt/bin/rt-commit-handler
rt/bin/rt-crontool
rt/bin/rt-mailgate
rt/bin/webmux.pl [deleted file]
rt/config.log
rt/config.status
rt/etc/RT_Config.pm
rt/lib/RT.pm
rt/lib/RTx/WebCronTool.pm [new file with mode: 0644]
rt/lib/t/02regression.t
rt/lib/t/03web.pl
rt/lib/t/04_send_email.pl

index 6447221..12284ba 100644 (file)
@@ -1,29 +1,48 @@
-# BEGIN LICENSE BLOCK
+# BEGIN BPS TAGGED BLOCK {{{
 # 
 # 
-# Copyright (c) 1996-2002 Jesse Vincent <jesse@bestpractical.com>
+# COPYRIGHT:
+#  
+# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC 
+#                                          <jesse@bestpractical.com>
 # 
 # 
-# (Except where explictly superceded by other copyright notices)
+# (Except where explicitly superseded by other copyright notices)
+# 
+# 
+# LICENSE:
 # 
 # This work is made available to you under the terms of Version 2 of
 # the GNU General Public License. A copy of that license should have
 # been provided with this software, but in any event can be snarfed
 # 
 # This work is made available to you under the terms of Version 2 of
 # the GNU General Public License. A copy of that license should have
 # been provided with this software, but in any event can be snarfed
-# from www.gnu.org
+# from www.gnu.org.
 # 
 # This work is distributed in the hope that it will be useful, but
 # WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 # General Public License for more details.
 # 
 # 
 # This work is distributed in the hope that it will be useful, but
 # WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 # General Public License for more details.
 # 
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 # 
 # 
-# Unless otherwise specified, all modifications, corrections or
-# extensions to this work which alter its source code become the
-# property of Best Practical Solutions, LLC when submitted for
-# inclusion in the work.
 # 
 # 
+# CONTRIBUTION SUBMISSION POLICY:
 # 
 # 
-# END LICENSE BLOCK
-
-
+# (The following paragraph is not intended to limit the rights granted
+# to you to modify and distribute this software under the terms of
+# the GNU General Public License and is only of importance to you if
+# you choose to contribute your changes and enhancements to the
+# community by submitting them to Best Practical Solutions, LLC.)
+# 
+# By intentionally submitting any modifications, corrections or
+# derivatives to this work, or any other work intended for use with
+# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+# you are the copyright holder for those contributions and you grant
+# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
+# royalty-free, perpetual, license to use, copy, create derivative
+# works based on those contributions, and sublicense and distribute
+# those contributions and any derivatives thereof.
+# 
+# END BPS TAGGED BLOCK }}}
 #
 # DO NOT HAND-EDIT the file named 'Makefile'. This file is autogenerated.
 # Have a look at "configure" and "Makefile.in" instead
 #
 # DO NOT HAND-EDIT the file named 'Makefile'. This file is autogenerated.
 # Have a look at "configure" and "Makefile.in" instead
@@ -38,15 +57,15 @@ SITE_CONFIG_FILE            =       $(CONFIG_FILE_PATH)/RT_SiteConfig.pm
 
 
 RT_VERSION_MAJOR       =       3
 
 
 RT_VERSION_MAJOR       =       3
-RT_VERSION_MINOR       =       0
-RT_VERSION_PATCH       =       4
+RT_VERSION_MINOR       =       4
+RT_VERSION_PATCH       =       5
 
 RT_VERSION =   $(RT_VERSION_MAJOR).$(RT_VERSION_MINOR).$(RT_VERSION_PATCH)
 TAG       =    rt-$(RT_VERSION_MAJOR)-$(RT_VERSION_MINOR)-$(RT_VERSION_PATCH)
 
 
 # This is the group that all of the installed files will be chgrp'ed to.
 
 RT_VERSION =   $(RT_VERSION_MAJOR).$(RT_VERSION_MINOR).$(RT_VERSION_PATCH)
 TAG       =    rt-$(RT_VERSION_MAJOR)-$(RT_VERSION_MINOR)-$(RT_VERSION_PATCH)
 
 
 # This is the group that all of the installed files will be chgrp'ed to.
-RTGROUP                        =       rt
+RTGROUP                        =       freeside
 
 
 # User which should own rt binaries.
 
 
 # User which should own rt binaries.
@@ -58,8 +77,11 @@ LIBS_OWNER           =       root
 # Group that should own all of RT's libraries, generally root.
 LIBS_GROUP             =       bin
 
 # Group that should own all of RT's libraries, generally root.
 LIBS_GROUP             =       bin
 
-WEB_USER               =       www
-WEB_GROUP              =       www
+WEB_USER               =       freeside
+WEB_GROUP              =       freeside
+
+
+APACHECTL              =       /usr/sbin/apachectl
 
 # {{{ Files and directories 
 
 
 # {{{ Files and directories 
 
@@ -79,10 +101,11 @@ RT_VAR_PATH                =       /opt/rt3/var
 RT_DOC_PATH            =       /opt/rt3/share/doc
 RT_LOCAL_PATH          =       /opt/rt3/local
 LOCAL_ETC_PATH         =       /opt/rt3/local/etc
 RT_DOC_PATH            =       /opt/rt3/share/doc
 RT_LOCAL_PATH          =       /opt/rt3/local
 LOCAL_ETC_PATH         =       /opt/rt3/local/etc
+LOCAL_LIB_PATH         =       /opt/rt3/local/lib
 LOCAL_LEXICON_PATH     =       /opt/rt3/local/po
 LOCAL_LEXICON_PATH     =       /opt/rt3/local/po
-MASON_HTML_PATH                =       /opt/rt3/share/html
+MASON_HTML_PATH                =       /var/www/freeside/rt
 MASON_LOCAL_HTML_PATH  =       /opt/rt3/local/html
 MASON_LOCAL_HTML_PATH  =       /opt/rt3/local/html
-MASON_DATA_PATH                =       /opt/rt3/var/mason_data
+MASON_DATA_PATH                =       /usr/local/etc/freeside/masondata
 MASON_SESSION_PATH     =       /opt/rt3/var/session_data
 RT_LOG_PATH        =       /opt/rt3/var/log
 
 MASON_SESSION_PATH     =       /opt/rt3/var/session_data
 RT_LOG_PATH        =       /opt/rt3/var/log
 
@@ -97,12 +120,16 @@ RT_READABLE_DIR_MODE       =       0755
 
 # RT_MODPERL_HANDLER is the mason handler script for mod_perl
 RT_MODPERL_HANDLER     =       $(RT_BIN_PATH)/webmux.pl
 
 # RT_MODPERL_HANDLER is the mason handler script for mod_perl
 RT_MODPERL_HANDLER     =       $(RT_BIN_PATH)/webmux.pl
+# RT_STANDALONE_SERVER is a stand-alone HTTP server
+RT_STANDALONE_SERVER   =       $(RT_BIN_PATH)/standalone_httpd
+# RT_SPEEDYCGI_HANDLER is the mason handler script for SpeedyCGI
+RT_SPEEDYCGI_HANDLER   =       $(RT_BIN_PATH)/mason_handler.scgi
 # RT_FASTCGI_HANDLER is the mason handler script for FastCGI
 RT_FASTCGI_HANDLER     =       $(RT_BIN_PATH)/mason_handler.fcgi
 # RT_WIN32_FASTCGI_HANDLER is the mason handler script for FastCGI
 RT_WIN32_FASTCGI_HANDLER       =       $(RT_BIN_PATH)/mason_handler.svc
 # RT_FASTCGI_HANDLER is the mason handler script for FastCGI
 RT_FASTCGI_HANDLER     =       $(RT_BIN_PATH)/mason_handler.fcgi
 # RT_WIN32_FASTCGI_HANDLER is the mason handler script for FastCGI
 RT_WIN32_FASTCGI_HANDLER       =       $(RT_BIN_PATH)/mason_handler.svc
-# RT's admin CLI
-RT_CLI_ADMIN_BIN       =       $(RT_BIN_PATH)/rtadmin
+# RT's CLI
+RT_CLI_BIN             =       $(RT_BIN_PATH)/rt
 # RT's mail gateway
 RT_MAILGATE_BIN                =       $(RT_BIN_PATH)/rt-mailgate
 # RT's cron tool
 # RT's mail gateway
 RT_MAILGATE_BIN                =       $(RT_BIN_PATH)/rt-mailgate
 # RT's cron tool
@@ -110,16 +137,17 @@ RT_CRON_BIN               =       $(RT_BIN_PATH)/rt-crontool
 
 # }}}
 
 
 # }}}
 
-SETGID_BINARIES                =       $(DESTDIR)/$(RT_FASTCGI_HANDLER) \
-                               $(DESTDIR)/$(RT_WIN32_FASTCGI_HANDLER)
 
 BINARIES               =       $(DESTDIR)/$(RT_MODPERL_HANDLER) \
                                $(DESTDIR)/$(RT_MAILGATE_BIN) \
 
 BINARIES               =       $(DESTDIR)/$(RT_MODPERL_HANDLER) \
                                $(DESTDIR)/$(RT_MAILGATE_BIN) \
+                               $(DESTDIR)/$(RT_CLI_BIN) \
                                $(DESTDIR)/$(RT_CRON_BIN) \
                                $(DESTDIR)/$(RT_CRON_BIN) \
-                               $(SETGID_BINARIES)
+                               $(DESTDIR)/$(RT_STANDALONE_SERVER) \
+                               $(DESTDIR)/$(RT_SPEEDYCGI_HANDLER) \
+                               $(DESTDIR)/$(RT_FASTCGI_HANDLER) \
+                               $(DESTDIR)/$(RT_WIN32_FASTCGI_HANDLER)
 SYSTEM_BINARIES                =       $(DESTDIR)/$(RT_SBIN_PATH)/
 
 SYSTEM_BINARIES                =       $(DESTDIR)/$(RT_SBIN_PATH)/
 
-
 # }}}
 
 # {{{ Database setup
 # }}}
 
 # {{{ Database setup
@@ -128,8 +156,9 @@ SYSTEM_BINARIES             =       $(DESTDIR)/$(RT_SBIN_PATH)/
 # DB_TYPE defines what sort of database RT trys to talk to
 # "mysql" is known to work.
 # "Pg" is known to work
 # DB_TYPE defines what sort of database RT trys to talk to
 # "mysql" is known to work.
 # "Pg" is known to work
+# "Informix" is known to work
 
 
-DB_TYPE                        =       mysql
+DB_TYPE                        =       Pg
 
 # Set DBA to the name of a unix account with the proper permissions and 
 # environment to run your commandline SQL sbin
 
 # Set DBA to the name of a unix account with the proper permissions and 
 # environment to run your commandline SQL sbin
@@ -138,9 +167,10 @@ DB_TYPE                    =       mysql
 
 # For mysql, you probably want 'root'
 # For Pg, you probably want 'postgres' 
 
 # For mysql, you probably want 'root'
 # For Pg, you probably want 'postgres' 
-# For oracle, you want 'system'
+# For Oracle, you want 'system'
+# For Informix, you want 'informix'
 
 
-DB_DBA                 =       root
+DB_DBA                 =       freeside
 
 DB_HOST                        =       localhost
 
 
 DB_HOST                        =       localhost
 
@@ -166,9 +196,9 @@ DB_RT_HOST          =       localhost
 # set this to the name you want to give to the RT database in 
 # your database server. For Oracle, this should be the name of your sid
 
 # set this to the name you want to give to the RT database in 
 # your database server. For Oracle, this should be the name of your sid
 
-DB_DATABASE            =       rt3
-DB_RT_USER             =       rt_user
-DB_RT_PASS             =       rt_pass
+DB_DATABASE            =       freeside
+DB_RT_USER             =       freeside
+DB_RT_PASS             =       
 
 # }}}
 
 
 # }}}
 
@@ -189,8 +219,11 @@ instruct:
        @echo ""
        @echo "You must now configure RT by editing $(SITE_CONFIG_FILE)."
        @echo ""
        @echo ""
        @echo "You must now configure RT by editing $(SITE_CONFIG_FILE)."
        @echo ""
-       @echo "(You will definitely need to set RT's database password before continuing."
-       @echo " Not doing so could be very dangerous)"
+       @echo "(You will definitely need to set RT's database password in "
+       @echo "$(SITE_CONFIG_FILE) before continuing. Not doing so could be "
+       @echo "very dangerous.  Note that you do not have to manually add a "
+       @echo "database user or set up a database for RT.  These actions will be "
+       @echo "taken care of in the next step.)"
        @echo ""
        @echo "After that, you need to initialize RT's database by running" 
        @echo " 'make initialize-database'"
        @echo ""
        @echo "After that, you need to initialize RT's database by running" 
        @echo " 'make initialize-database'"
@@ -206,22 +239,27 @@ upgrade-instruct:
        @echo "$(CONFIG_FILE) for any necessary site customization. Additionally,"
        @echo "you should update RT's system database objects by running "
        @echo "   ls etc/upgrade"
        @echo "$(CONFIG_FILE) for any necessary site customization. Additionally,"
        @echo "you should update RT's system database objects by running "
        @echo "   ls etc/upgrade"
-       @echo "For each file in that directory whose name is greater than"
+       @echo ""
+       @echo "For each item in that directory whose name is greater than"
        @echo "your previously installed RT version, run:"
        @echo "your previously installed RT version, run:"
-       @echo "    $(RT_SBIN_PATH)/rt-setup-database --action insert --datafile etc/upgrade/<version>"
+       @echo "    $(RT_SBIN_PATH)/rt-setup-database --dba $(DB_DBA) --prompt-for-dba-password --action schema --datadir etc/upgrade/<version>"
+       @echo "    $(RT_SBIN_PATH)/rt-setup-database --dba $(DB_DBA) --prompt-for-dba-password --action acl --datadir etc/upgrade/<version>"
+       @echo "    $(RT_SBIN_PATH)/rt-setup-database --dba $(DB_DBA) --prompt-for-dba-password --action insert --datadir etc/upgrade/<version>"
 
 
 
 
-upgrade: dirs upgrade-noclobber upgrade-instruct
+upgrade: config-install dirs files-install fixperms upgrade-instruct
 
 upgrade-noclobber: config-install libs-install html-install bin-install local-install doc-install fixperms
 
 
 # {{{ dependencies
 testdeps:
 
 upgrade-noclobber: config-install libs-install html-install bin-install local-install doc-install fixperms
 
 
 # {{{ dependencies
 testdeps:
-       $(PERL) ./sbin/rt-test-dependencies --with-$(DB_TYPE)
+       $(PERL) ./sbin/rt-test-dependencies --verbose --with-$(DB_TYPE)
+
+depends: fixdeps
 
 fixdeps:
 
 fixdeps:
-       $(PERL) ./sbin/rt-test-dependencies --install --with-$(DB_TYPE)
+       $(PERL) ./sbin/rt-test-dependencies --verbose --install --with-$(DB_TYPE)
 
 #}}}
 
 
 #}}}
 
@@ -241,18 +279,17 @@ fixperms:
        chmod 0500 $(DESTDIR)/$(RT_ETC_PATH)/*
 
        #TODO: the config file should probably be able to have its
        chmod 0500 $(DESTDIR)/$(RT_ETC_PATH)/*
 
        #TODO: the config file should probably be able to have its
-       # owner set seperately from the binaries.
+       # owner set separately from the binaries.
        chown -R $(BIN_OWNER) $(DESTDIR)/$(RT_ETC_PATH)
        chgrp -R $(RTGROUP) $(DESTDIR)/$(RT_ETC_PATH)
 
        chmod 0550 $(DESTDIR)/$(CONFIG_FILE)
        chmod 0550 $(DESTDIR)/$(SITE_CONFIG_FILE)
 
        chown -R $(BIN_OWNER) $(DESTDIR)/$(RT_ETC_PATH)
        chgrp -R $(RTGROUP) $(DESTDIR)/$(RT_ETC_PATH)
 
        chmod 0550 $(DESTDIR)/$(CONFIG_FILE)
        chmod 0550 $(DESTDIR)/$(SITE_CONFIG_FILE)
 
-       # Make the interfaces executable and setgid rt
+       # Make the interfaces executable
        chown $(BIN_OWNER) $(BINARIES)
        chgrp $(RTGROUP) $(BINARIES)
        chmod 0755  $(BINARIES)
        chown $(BIN_OWNER) $(BINARIES)
        chgrp $(RTGROUP) $(BINARIES)
        chmod 0755  $(BINARIES)
-       chmod g+s $(SETGID_BINARIES)
 
        # Make the web ui readable by all. 
        chmod -R  u+rwX,go-w,go+rX      $(DESTDIR)/$(MASON_HTML_PATH) \
 
        # Make the web ui readable by all. 
        chmod -R  u+rwX,go-w,go+rX      $(DESTDIR)/$(MASON_HTML_PATH) \
@@ -272,12 +309,6 @@ fixperms:
                                $(DESTDIR)/$(MASON_SESSION_PATH)
 # }}}
 
                                $(DESTDIR)/$(MASON_SESSION_PATH)
 # }}}
 
-fixperms-nosetgid: fixperms
-       @echo "You should never be running RT this way. it's unsafe"
-       chmod 0555 $(SETGID_BINARIES)
-       chmod 0555 $(DESTDIR)/$(CONFIG_FILE)
-       chmod 0555 $(DESTDIR)/$(SITE_CONFIG_FILE)
-
 # {{{ dirs
 dirs:
        mkdir -p $(DESTDIR)/$(RT_LOG_PATH)
 # {{{ dirs
 dirs:
        mkdir -p $(DESTDIR)/$(RT_LOG_PATH)
@@ -289,6 +320,7 @@ dirs:
        mkdir -p $(DESTDIR)/$(MASON_HTML_PATH)
        mkdir -p $(DESTDIR)/$(MASON_LOCAL_HTML_PATH)
        mkdir -p $(DESTDIR)/$(LOCAL_ETC_PATH)
        mkdir -p $(DESTDIR)/$(MASON_HTML_PATH)
        mkdir -p $(DESTDIR)/$(MASON_LOCAL_HTML_PATH)
        mkdir -p $(DESTDIR)/$(LOCAL_ETC_PATH)
+       mkdir -p $(DESTDIR)/$(LOCAL_LIB_PATH)
        mkdir -p $(DESTDIR)/$(LOCAL_LEXICON_PATH)
 # }}}
 
        mkdir -p $(DESTDIR)/$(LOCAL_LEXICON_PATH)
 # }}}
 
@@ -298,7 +330,7 @@ files-install: libs-install etc-install bin-install sbin-install html-install lo
 
 config-install:
        mkdir -p $(DESTDIR)/$(CONFIG_FILE_PATH) 
 
 config-install:
        mkdir -p $(DESTDIR)/$(CONFIG_FILE_PATH) 
-       cp etc/RT_Config.pm $(DESTDIR)/$(CONFIG_FILE)
+       -cp etc/RT_Config.pm $(DESTDIR)/$(CONFIG_FILE)
        [ -f $(DESTDIR)/$(SITE_CONFIG_FILE) ] || cp etc/RT_SiteConfig.pm $(DESTDIR)/$(SITE_CONFIG_FILE) 
 
        chgrp $(RTGROUP) $(DESTDIR)/$(CONFIG_FILE)
        [ -f $(DESTDIR)/$(SITE_CONFIG_FILE) ] || cp etc/RT_SiteConfig.pm $(DESTDIR)/$(SITE_CONFIG_FILE) 
 
        chgrp $(RTGROUP) $(DESTDIR)/$(CONFIG_FILE)
@@ -312,14 +344,16 @@ config-install:
 test: 
        $(PERL) -Ilib lib/t/00smoke.t
 
 test: 
        $(PERL) -Ilib lib/t/00smoke.t
 
-regression-nosetgid-quiet: config-install dirs files-install libs-install sbin-install bin-install regression-instruct regression-reset-db  testify-pods fixperms-nosetgid apachectl
-       $(PERL) sbin/regression_harness
+regression-install: config-install
+       $(PERL) -pi -e 's/Set\(\$$DatabaseName.*\);/Set\(\$$DatabaseName, "rt3regression"\);/' $(DESTDIR)/$(CONFIG_FILE)
 
 
-regression-nosetgid: config-install dirs files-install libs-install sbin-install bin-install regression-instruct regression-reset-db  testify-pods fixperms-nosetgid apachectl
-       $(PERL) lib/t/02regression.t
+regression: regression-install dirs files-install libs-install sbin-install bin-install regression-instruct regression-reset-db  testify-pods fixperms apachectl run-regression
 
 
-regression: config-install dirs files-install libs-install sbin-install bin-install regression-instruct regression-reset-db  testify-pods apachectl
-       $(PERL) lib/t/02regression.t
+run-regression:
+       prove -Ilib lib/t/setup_regression.t  lib/t/autogen/ lib/t/regression/
+
+
+regression-noapache: regression-install dirs files-install libs-install sbin-install bin-install regression-instruct regression-reset-db  testify-pods fixperms start-httpd  run-regression
 
 regression-quiet:
        $(PERL) sbin/regression_harness
 
 regression-quiet:
        $(PERL) sbin/regression_harness
@@ -331,9 +365,11 @@ regression-instruct:
 # {{{ database-installation
 
 regression-reset-db:
 # {{{ database-installation
 
 regression-reset-db:
-       $(PERL) $(DESTDIR)/$(RT_SBIN_PATH)/rt-setup-database --action drop --dba $(DB_DBA) --dba-password ''
+       $(PERL) $(DESTDIR)/$(RT_SBIN_PATH)/rt-setup-database --action drop --dba $(DB_DBA) --dba-password '' --force
        $(PERL) $(DESTDIR)/$(RT_SBIN_PATH)/rt-setup-database --action init --dba $(DB_DBA) --dba-password ''
 
        $(PERL) $(DESTDIR)/$(RT_SBIN_PATH)/rt-setup-database --action init --dba $(DB_DBA) --dba-password ''
 
+initdb :: initialize-database
+
 initialize-database: 
        $(PERL) $(DESTDIR)/$(RT_SBIN_PATH)/rt-setup-database --action init --dba $(DB_DBA) --prompt-for-dba-password
 
 initialize-database: 
        $(PERL) $(DESTDIR)/$(RT_SBIN_PATH)/rt-setup-database --action init --dba $(DB_DBA) --prompt-for-dba-password
 
@@ -346,13 +382,13 @@ insert-approval-data:
 
 # {{{ libs-install
 libs-install: 
 
 # {{{ libs-install
 libs-install: 
-       [ -d $(DESTDIR)/$(RT_LIB_PATH) ] || mkdir $(DESTDIR)/$(RT_LIB_PATH)
+       [ -d $(DESTDIR)/$(RT_LIB_PATH) ] || mkdir -p $(DESTDIR)/$(RT_LIB_PATH)
        -cp -rp lib/* $(DESTDIR)/$(RT_LIB_PATH)
 # }}}
 
 # {{{ html-install
 html-install:
        -cp -rp lib/* $(DESTDIR)/$(RT_LIB_PATH)
 # }}}
 
 # {{{ html-install
 html-install:
-       [ -d $(DESTDIR)/$(MASON_HTML_PATH) ] || mkdir $(DESTDIR)/$(MASON_HTML_PATH)
+       [ -d $(DESTDIR)/$(MASON_HTML_PATH) ] || mkdir -p $(DESTDIR)/$(MASON_HTML_PATH)
        -cp -rp ./html/* $(DESTDIR)/$(MASON_HTML_PATH)
 # }}}
 
        -cp -rp ./html/* $(DESTDIR)/$(MASON_HTML_PATH)
 # }}}
 
@@ -360,7 +396,7 @@ html-install:
 doc-install:
        # RT 3.0.0 - RT 3.0.2 would accidentally create a file instead of a dir
        -[ -f $(DESTDIR)/$(RT_DOC_PATH) ] && rm $(DESTDIR)/$(RT_DOC_PATH) 
 doc-install:
        # RT 3.0.0 - RT 3.0.2 would accidentally create a file instead of a dir
        -[ -f $(DESTDIR)/$(RT_DOC_PATH) ] && rm $(DESTDIR)/$(RT_DOC_PATH) 
-       [ -d $(DESTDIR)/$(RT_DOC_PATH) ] || mkdir $(DESTDIR)/$(RT_DOC_PATH)
+       [ -d $(DESTDIR)/$(RT_DOC_PATH) ] || mkdir -p $(DESTDIR)/$(RT_DOC_PATH)
        -cp -rp ./README $(DESTDIR)/$(RT_DOC_PATH)
 # }}}
 
        -cp -rp ./README $(DESTDIR)/$(RT_DOC_PATH)
 # }}}
 
@@ -379,9 +415,12 @@ etc-install:
 
 sbin-install:
        mkdir -p $(DESTDIR)/$(RT_SBIN_PATH)
 
 sbin-install:
        mkdir -p $(DESTDIR)/$(RT_SBIN_PATH)
-       chmod +x sbin/rt-setup-database \
+       chmod +x \
+               sbin/rt-dump-database \
+               sbin/rt-setup-database \
                sbin/rt-test-dependencies
        -cp -rp \
                sbin/rt-test-dependencies
        -cp -rp \
+               sbin/rt-dump-database \
                sbin/rt-setup-database \
                sbin/rt-test-dependencies \
                $(DESTDIR)/$(RT_SBIN_PATH)
                sbin/rt-setup-database \
                sbin/rt-test-dependencies \
                $(DESTDIR)/$(RT_SBIN_PATH)
@@ -397,7 +436,10 @@ bin-install:
        -cp -rp \
                bin/rt-mailgate \
                bin/mason_handler.fcgi \
        -cp -rp \
                bin/rt-mailgate \
                bin/mason_handler.fcgi \
+               bin/mason_handler.scgi \
+               bin/standalone_httpd \
                bin/mason_handler.svc \
                bin/mason_handler.svc \
+               bin/rt \
                bin/webmux.pl \
                bin/rt-crontool \
                $(DESTDIR)/$(RT_BIN_PATH)
                bin/webmux.pl \
                bin/rt-crontool \
                $(DESTDIR)/$(RT_BIN_PATH)
@@ -417,8 +459,10 @@ POD2TEST_EXE = sbin/extract_pod_tests
 
 testify-pods:
        [ -d lib/t/autogen ] || mkdir lib/t/autogen
 
 testify-pods:
        [ -d lib/t/autogen ] || mkdir lib/t/autogen
-       find lib -name \*pm |grep -v \*.in |xargs -n 1 $(PERL) $(POD2TEST_EXE)
-       find bin -type f |grep -v \~ | grep -v "\.in" | xargs -n 1 $(PERL) $(POD2TEST_EXE)
+       find lib -name \*pm |grep -v .svn | grep -v \*.in |xargs -n 1 $(PERL) $(POD2TEST_EXE)
+       find bin -type f |grep -v .svn | grep -v \~ | grep -v "\.in" | xargs -n 1 $(PERL) $(POD2TEST_EXE)
+       find lib -name \*pm |grep -v .svn | grep -v \*.in |xargs -n 1 $(PERL) $(POD2TEST_EXE)
+       find bin -type f |grep -v .svn | grep -v \~ | grep -v "\.in" | xargs -n 1 $(PERL) $(POD2TEST_EXE)
 
 
 
 
 
 
@@ -431,55 +475,18 @@ license-tag:
 factory: initialize-database
        cd lib; $(PERL) ../sbin/factory  $(DB_DATABASE) RT
 
 factory: initialize-database
        cd lib; $(PERL) ../sbin/factory  $(DB_DATABASE) RT
 
-commit:
-       aegis -build ; aegis -diff ; aegis -test; aegis -develop_end
-
-integrate:
-       aegis -integrate_begin; aegis -build; aegis -diff; aegis -test ; aegis -integrate_pass
-
-predist: commit tag-and-tar
-
-tag-and-release-baseline:
-       aegis -cp -ind Makefile -output /tmp/Makefile.tagandrelease; \
-       $(MAKE) -f /tmp/Makefile.tagandrelease tag-and-release-never-by-hand
-
-
-# Running this target in a working directory is 
-# WRONG WRONG WRONG.
-# it will tag the current baseline with the version of RT defined 
-# in the currently-being-worked-on makefile. which is wrong.
-#  you want tag-and-release-baseline
-
-tag-and-release-never-by-hand:
-       aegis --delta-name $(TAG)
-       rm -rf /tmp/$(TAG)
-       mkdir /tmp/$(TAG)
-       cd /tmp/$(TAG); \
-               aegis -cp -ind -delta $(TAG) . ;\
-               make reconfigure;\
-               chmod 600 Makefile;\
-               aegis --report --project rt.$(RT_VERSION_MAJOR) \
-                     --page_width 80 \
-                     --page_length 9999 \
-                     --change $(RT_VERSION_MINOR) --output Changelog Change_Log
-
-       cd /tmp; tar czvf /home/ftp/pub/rt/devel/$(TAG).tar.gz $(TAG)/
-       chmod 644 /home/ftp/pub/rt/devel/$(TAG).tar.gz
-
-
 reconfigure:
        aclocal -I m4
        autoconf
        chmod 755 ./configure
        ./configure
 
 reconfigure:
        aclocal -I m4
        autoconf
        chmod 755 ./configure
        ./configure
 
-rpm:
-       (cd ..; tar czvf /usr/src/redhat/SOURCES/rt.tar.gz rt)
-       rpm -ba etc/rt.spec
-
+start-httpd:
+       $(PERL) bin/standalone_httpd 80 &
 
 apachectl:
 
 apachectl:
-       apachectl stop
-       sleep 3
-       apachectl start
+       $(APACHECTL) stop
+       sleep 10
+       $(APACHECTL) start
+       sleep 5
 # }}}
 # }}}
index 431eccb..4ce6c00 100755 (executable)
@@ -1,9 +1,15 @@
 #!/usr/bin/perl
 #!/usr/bin/perl
-# BEGIN LICENSE BLOCK
+# BEGIN BPS TAGGED BLOCK {{{
 # 
 # 
-# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
+# COPYRIGHT:
+#  
+# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC 
+#                                          <jesse@bestpractical.com>
 # 
 # 
-# (Except where explictly superceded by other copyright notices)
+# (Except where explicitly superseded by other copyright notices)
+# 
+# 
+# LICENSE:
 # 
 # This work is made available to you under the terms of Version 2 of
 # the GNU General Public License. A copy of that license should have
 # 
 # This work is made available to you under the terms of Version 2 of
 # the GNU General Public License. A copy of that license should have
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 # General Public License for more details.
 # 
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 # General Public License for more details.
 # 
-# Unless otherwise specified, all modifications, corrections or
-# extensions to this work which alter its source code become the
-# property of Best Practical Solutions, LLC when submitted for
-# inclusion in the work.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# 
+# 
+# CONTRIBUTION SUBMISSION POLICY:
+# 
+# (The following paragraph is not intended to limit the rights granted
+# to you to modify and distribute this software under the terms of
+# the GNU General Public License and is only of importance to you if
+# you choose to contribute your changes and enhancements to the
+# community by submitting them to Best Practical Solutions, LLC.)
 # 
 # 
+# By intentionally submitting any modifications, corrections or
+# derivatives to this work, or any other work intended for use with
+# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+# you are the copyright holder for those contributions and you grant
+# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
+# royalty-free, perpetual, license to use, copy, create derivative
+# works based on those contributions, and sublicense and distribute
+# those contributions and any derivatives thereof.
 # 
 # 
-# END LICENSE BLOCK
+# END BPS TAGGED BLOCK }}}
+package RT::Mason;
 
 use strict;
 
 use strict;
+use vars '$Handler';
 use File::Basename;
 require ('/opt/rt3/bin/webmux.pl');
 
 use File::Basename;
 require ('/opt/rt3/bin/webmux.pl');
 
-my $h = &RT::Interface::Web::NewCGIHandler();
-
 # Enter CGI::Fast mode, which should also work as a vanilla CGI script.
 require CGI::Fast;
 
 RT::Init();
 
 # Enter CGI::Fast mode, which should also work as a vanilla CGI script.
 require CGI::Fast;
 
 RT::Init();
 
-# Response loop
 while ( my $cgi = CGI::Fast->new ) {
     # the whole point of fastcgi requires the env to get reset here..
     # So we must squash it again
 while ( my $cgi = CGI::Fast->new ) {
     # the whole point of fastcgi requires the env to get reset here..
     # So we must squash it again
@@ -44,11 +65,20 @@ while ( my $cgi = CGI::Fast->new ) {
     $ENV{'ENV'}    = '' if defined $ENV{'ENV'};
     $ENV{'IFS'}    = '' if defined $ENV{'IFS'};
 
     $ENV{'ENV'}    = '' if defined $ENV{'ENV'};
     $ENV{'IFS'}    = '' if defined $ENV{'IFS'};
 
-    unless ($h->interp->comp_exists($cgi->path_info)) {
-       $cgi->path_info($cgi->path_info . "/index.html");
+    Module::Refresh->refresh if $RT::DevelMode;
+    RT::ConnectToDatabase();
+
+    if ( ( !$Handler->interp->comp_exists( $cgi->path_info ) )
+        && ( $Handler->interp->comp_exists( $cgi->path_info . "/index.html" ) ) ) {
+        $cgi->path_info( $cgi->path_info . "/index.html" );
     }
     }
-    $h->handle_cgi_object($cgi);
-    # _should_ always be tied
+
+    eval { $Handler->handle_cgi_object($cgi); };
+    if ($@) {
+        $RT::Logger->crit($@);
+    }
+    RT::Interface::Web::Handler->CleanupRequest(); 
+
 }
 
 1;
 }
 
 1;
index 8e1135c..bc6bd76 100755 (executable)
@@ -1,9 +1,15 @@
 #!/usr/local/bin/speedy
 #!/usr/local/bin/speedy
-# BEGIN LICENSE BLOCK
+# BEGIN BPS TAGGED BLOCK {{{
 # 
 # 
-# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
+# COPYRIGHT:
+#  
+# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC 
+#                                          <jesse@bestpractical.com>
 # 
 # 
-# (Except where explictly superceded by other copyright notices)
+# (Except where explicitly superseded by other copyright notices)
+# 
+# 
+# LICENSE:
 # 
 # This work is made available to you under the terms of Version 2 of
 # the GNU General Public License. A copy of that license should have
 # 
 # This work is made available to you under the terms of Version 2 of
 # the GNU General Public License. A copy of that license should have
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 # General Public License for more details.
 # 
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 # General Public License for more details.
 # 
-# Unless otherwise specified, all modifications, corrections or
-# extensions to this work which alter its source code become the
-# property of Best Practical Solutions, LLC when submitted for
-# inclusion in the work.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# 
 # 
 # 
+# CONTRIBUTION SUBMISSION POLICY:
 # 
 # 
-# END LICENSE BLOCK
+# (The following paragraph is not intended to limit the rights granted
+# to you to modify and distribute this software under the terms of
+# the GNU General Public License and is only of importance to you if
+# you choose to contribute your changes and enhancements to the
+# community by submitting them to Best Practical Solutions, LLC.)
+# 
+# By intentionally submitting any modifications, corrections or
+# derivatives to this work, or any other work intended for use with
+# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+# you are the copyright holder for those contributions and you grant
+# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
+# royalty-free, perpetual, license to use, copy, create derivative
+# works based on those contributions, and sublicense and distribute
+# those contributions and any derivatives thereof.
+# 
+# END BPS TAGGED BLOCK }}}
+package RT::Mason;
 
 use strict;
 
 use strict;
+use vars '$Handler';
 require ('/opt/rt3/bin/webmux.pl');
 
 require ('/opt/rt3/bin/webmux.pl');
 
-my $h = &RT::Interface::Web::NewCGIHandler();
-
 require CGI;
 
 RT::Init();
 
 my $cgi = CGI->new;
 require CGI;
 
 RT::Init();
 
 my $cgi = CGI->new;
-unless ($h->interp->comp_exists($cgi->path_info)) {
-    $cgi->path_info($cgi->path_info . "/index.html");
+if ( ( !$Handler->interp->comp_exists( $cgi->path_info ) )
+    && ( $Handler->interp->comp_exists( $cgi->path_info . "/index.html" ) ) ) {
+    $cgi->path_info( $cgi->path_info . "/index.html" );
 }
 }
-$h->handle_cgi_object($cgi);
 
 
+$Handler->handle_cgi_object($cgi);
+RT::Interface::Web::Handler->CleanupRequest();
 1;
 1;
index c05d21e..6065fa5 100644 (file)
@@ -1,9 +1,15 @@
 #!/usr/bin/perl
 #!/usr/bin/perl
-# BEGIN LICENSE BLOCK
+# BEGIN BPS TAGGED BLOCK {{{
 # 
 # 
-# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
+# COPYRIGHT:
+#  
+# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC 
+#                                          <jesse@bestpractical.com>
 # 
 # 
-# (Except where explictly superceded by other copyright notices)
+# (Except where explicitly superseded by other copyright notices)
+# 
+# 
+# LICENSE:
 # 
 # This work is made available to you under the terms of Version 2 of
 # the GNU General Public License. A copy of that license should have
 # 
 # This work is made available to you under the terms of Version 2 of
 # the GNU General Public License. A copy of that license should have
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 # General Public License for more details.
 # 
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 # General Public License for more details.
 # 
-# Unless otherwise specified, all modifications, corrections or
-# extensions to this work which alter its source code become the
-# property of Best Practical Solutions, LLC when submitted for
-# inclusion in the work.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# 
 # 
 # 
+# CONTRIBUTION SUBMISSION POLICY:
 # 
 # 
-# END LICENSE BLOCK
+# (The following paragraph is not intended to limit the rights granted
+# to you to modify and distribute this software under the terms of
+# the GNU General Public License and is only of importance to you if
+# you choose to contribute your changes and enhancements to the
+# community by submitting them to Best Practical Solutions, LLC.)
+# 
+# By intentionally submitting any modifications, corrections or
+# derivatives to this work, or any other work intended for use with
+# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+# you are the copyright holder for those contributions and you grant
+# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
+# royalty-free, perpetual, license to use, copy, create derivative
+# works based on those contributions, and sublicense and distribute
+# those contributions and any derivatives thereof.
+# 
+# END BPS TAGGED BLOCK }}}
 
 =head1 NAME
 
 
 =head1 NAME
 
@@ -55,8 +77,11 @@ registry setting will also be automatically populated.
 
 =cut
 
 
 =cut
 
+package RT::Mason;
+
 use strict;
 use File::Basename;
 use strict;
 use File::Basename;
+use vars '$Handler';
 require (dirname(__FILE__) . '/webmux.pl');
 
 use Cwd;
 require (dirname(__FILE__) . '/webmux.pl');
 
 use Cwd;
@@ -197,7 +222,6 @@ BEGIN {
 warn "Begin listening on $ENV{'FCGI_SOCKET_PATH'}\n";
 
 require CGI::Fast;
 warn "Begin listening on $ENV{'FCGI_SOCKET_PATH'}\n";
 
 require CGI::Fast;
-my $h = &RT::Interface::Web::NewCGIHandler(@RT::MasonParameters);
 
 RT::Init();
 
 
 RT::Init();
 
@@ -212,7 +236,8 @@ while( my $cgi = CGI::Fast->new ) {
     
     warn "Serving $comp\n";
 
     
     warn "Serving $comp\n";
 
-    $h->handle_cgi($comp);
+    $Handler->handle_cgi($comp);
+    RT::Interface::Web::Handler->CleanupRequest();
     # _should_ always be tied
 }
 
     # _should_ always be tied
 }
 
index 29e443e..bf23a6c 100644 (file)
@@ -26,7 +26,7 @@
 # {{{ Docs
 # -*-Perl-*-
 #
 # {{{ Docs
 # -*-Perl-*-
 #
-#ident "@(#)ccvs/contrib:$Name:  $:$Id: rt-commit-handler,v 1.1 2003-07-15 13:16:15 ivan Exp $"
+#ident "@(#)ccvs/contrib:$Name:  $:$Id: rt-commit-handler,v 1.2 2007-08-01 22:20:32 ivan Exp $"
 #
 # Perl filter to handle the log messages from the checkin of files in multiple
 # directories.  This script will group the lists of files by log message, and
 #
 # Perl filter to handle the log messages from the checkin of files in multiple
 # directories.  This script will group the lists of files by log message, and
index cdbc3cb..8acc1c2 100644 (file)
@@ -1,9 +1,15 @@
 #!/usr/bin/perl
 #!/usr/bin/perl
-# BEGIN LICENSE BLOCK
+# BEGIN BPS TAGGED BLOCK {{{
 # 
 # 
-# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
+# COPYRIGHT:
+#  
+# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC 
+#                                          <jesse@bestpractical.com>
 # 
 # 
-# (Except where explictly superceded by other copyright notices)
+# (Except where explicitly superseded by other copyright notices)
+# 
+# 
+# LICENSE:
 # 
 # This work is made available to you under the terms of Version 2 of
 # the GNU General Public License. A copy of that license should have
 # 
 # This work is made available to you under the terms of Version 2 of
 # the GNU General Public License. A copy of that license should have
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 # General Public License for more details.
 # 
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 # General Public License for more details.
 # 
-# Unless otherwise specified, all modifications, corrections or
-# extensions to this work which alter its source code become the
-# property of Best Practical Solutions, LLC when submitted for
-# inclusion in the work.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 # 
 # 
 # 
 # 
-# END LICENSE BLOCK
-
+# CONTRIBUTION SUBMISSION POLICY:
+# 
+# (The following paragraph is not intended to limit the rights granted
+# to you to modify and distribute this software under the terms of
+# the GNU General Public License and is only of importance to you if
+# you choose to contribute your changes and enhancements to the
+# community by submitting them to Best Practical Solutions, LLC.)
+# 
+# By intentionally submitting any modifications, corrections or
+# derivatives to this work, or any other work intended for use with
+# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+# you are the copyright holder for those contributions and you grant
+# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
+# royalty-free, perpetual, license to use, copy, create derivative
+# works based on those contributions, and sublicense and distribute
+# those contributions and any derivatives thereof.
+# 
+# END BPS TAGGED BLOCK }}}
 use strict;
 use Carp;
 
 use strict;
 use Carp;
 
-use lib ("/opt/rt3/lib", "/opt/rt3/local/lib");
+use lib ("/opt/rt3/local/lib", "/opt/rt3/lib");
 
 package RT;
 
 
 package RT;
 
@@ -45,9 +66,6 @@ RT::LoadConfig();
 #Connect to the database and get RT::SystemUser and RT::Nobody loaded
 RT::Init();
 
 #Connect to the database and get RT::SystemUser and RT::Nobody loaded
 RT::Init();
 
-#Drop setgid permissions
-RT::DropSetGIDPermissions();
-
 #Get the current user all loaded
 my $CurrentUser = GetCurrentUser();
 
 #Get the current user all loaded
 my $CurrentUser = GetCurrentUser();
 
@@ -68,7 +86,7 @@ GetOptions( "search=s"        => \$search,
             "help"            => \$help,
             "verbose|v"       => \$verbose );
 
             "help"            => \$help,
             "verbose|v"       => \$verbose );
 
-help() if $help;
+help() if $help or not $search or not $action;
 
 # We _must_ have a search object
 load_module($search);
 
 # We _must_ have a search object
 load_module($search);
@@ -78,15 +96,19 @@ load_module($condition) if ($condition);
 # load template if specified
 my $template_obj;
 if ($template_id) {
 # load template if specified
 my $template_obj;
 if ($template_id) {
-    $template_obj = RT::Template->new($RT::Nobody);
-    $template_obj->LoadById($template_id);
+    $template_obj = RT::Template->new($CurrentUser);
+    $template_obj->Load($template_id);
 }
 
 #At the appointed time:
 
 #find a bunch of tickets
 my $tickets = RT::Tickets->new($CurrentUser);
 }
 
 #At the appointed time:
 
 #find a bunch of tickets
 my $tickets = RT::Tickets->new($CurrentUser);
-my $search  = $search->new( TicketsObj => $tickets, Argument => $search_arg );
+my $search  = $search->new(
+    TicketsObj  => $tickets,
+    Argument    => $search_arg,
+    CurrentUser => $CurrentUser
+);
 
 $search->Prepare();
 
 
 $search->Prepare();
 
@@ -95,12 +117,13 @@ my $tickets = $search->TicketsObj;
 
 #for each ticket we've found
 while ( my $ticket = $tickets->Next() ) {
 
 #for each ticket we've found
 while ( my $ticket = $tickets->Next() ) {
-    print "\n" . $ticket->Id() . ": " if ($verbose);
+    print $ticket->Id() . ": " if ($verbose);
 
     # perform some more advanced check
     if ($condition) {
         my $condition_obj = $condition->new( TicketObj => $ticket,
 
     # perform some more advanced check
     if ($condition) {
         my $condition_obj = $condition->new( TicketObj => $ticket,
-                                             Argument  => $condition_arg );
+                                             Argument  => $condition_arg,
+                                             CurrentUser => $CurrentUser );
 
         # if the condition doesn't apply, get out of here
 
 
         # if the condition doesn't apply, get out of here
 
@@ -109,9 +132,12 @@ while ( my $ticket = $tickets->Next() ) {
     }
 
     #prepare our action
     }
 
     #prepare our action
-    my $action_obj = $action->new( TicketObj => $ticket,
-                                  TemplateObj => $template_obj,
-                                   Argument  => $action_arg );
+    my $action_obj = $action->new(
+        TicketObj   => $ticket,
+        TemplateObj => $template_obj,
+        Argument    => $action_arg,
+        CurrentUser => $CurrentUser
+    );
 
     #if our preparation, move onto the next ticket
     next unless ( $action_obj->Prepare );
 
     #if our preparation, move onto the next ticket
     next unless ( $action_obj->Prepare );
@@ -119,7 +145,7 @@ while ( my $ticket = $tickets->Next() ) {
 
     #commit our action.
     next unless ( $action_obj->Commit );
 
     #commit our action.
     next unless ( $action_obj->Commit );
-    print loc("Action committed.") if ($verbose);
+    print loc("Action committed.\n") if ($verbose);
 }
 
 # {{{ load_module 
 }
 
 # {{{ load_module 
@@ -197,19 +223,17 @@ sub help {
       )
       . "\n\n";
 
       )
       . "\n\n";
 
-    print " bin/rt-cron-tool \\\n";
-    print
-      "  --search RT::Search::ActiveTicketsInQueue  --search-arg general \\\n";
-    print
-      "  --condition RT::Condition::UntouchedInHours --condition-arg 4 \\\n";
+    print " bin/rt-crontool \\\n";
+    print "  --search RT::Search::ActiveTicketsInQueue  --search-arg general \\\n";
+    print "  --condition RT::Condition::UntouchedInHours --condition-arg 4 \\\n";
     print "  --action RT::Action::SetPriority --action-arg 99 \\\n";
     print "  --verbose\n";
 
     print "\n";
     print "  --action RT::Action::SetPriority --action-arg 99 \\\n";
     print "  --verbose\n";
 
     print "\n";
-    print loc("Escalate tickets");
-    print "rt-crontool \\\n";
-    print " --search RT::Search::ActiveTicketsInQueue  --search-arg thequeuename \\\n";
-    print " --action RT::Action::EscalatePriority \\\n";
+    print loc("Escalate tickets"). "\n";
+    print " bin/rt-crontool \\\n";
+    print "  --search RT::Search::ActiveTicketsInQueue  --search-arg general \\\n";
+    print "  --action RT::Action::EscalatePriority\n";
  
  
  
  
  
  
index b304436..5663d68 100755 (executable)
 #!/usr/bin/perl -w
 #!/usr/bin/perl -w
-# BEGIN LICENSE BLOCK
-#
-# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
-#
-# (Except where explictly superceded by other copyright notices)
-#
+# BEGIN BPS TAGGED BLOCK {{{
+# 
+# COPYRIGHT:
+#  
+# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC 
+#                                          <jesse@bestpractical.com>
+# 
+# (Except where explicitly superseded by other copyright notices)
+# 
+# 
+# LICENSE:
+# 
 # This work is made available to you under the terms of Version 2 of
 # the GNU General Public License. A copy of that license should have
 # been provided with this software, but in any event can be snarfed
 # from www.gnu.org.
 # This work is made available to you under the terms of Version 2 of
 # the GNU General Public License. A copy of that license should have
 # been provided with this software, but in any event can be snarfed
 # from www.gnu.org.
-#
+# 
 # This work is distributed in the hope that it will be useful, but
 # WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 # General Public License for more details.
 # This work is distributed in the hope that it will be useful, but
 # WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 # General Public License for more details.
-#
-# Unless otherwise specified, all modifications, corrections or
-# extensions to this work which alter its source code become the
-# property of Best Practical Solutions, LLC when submitted for
-# inclusion in the work.
-#
-#
-# END LICENSE BLOCK
+# 
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# 
+# 
+# CONTRIBUTION SUBMISSION POLICY:
+# 
+# (The following paragraph is not intended to limit the rights granted
+# to you to modify and distribute this software under the terms of
+# the GNU General Public License and is only of importance to you if
+# you choose to contribute your changes and enhancements to the
+# community by submitting them to Best Practical Solutions, LLC.)
+# 
+# By intentionally submitting any modifications, corrections or
+# derivatives to this work, or any other work intended for use with
+# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+# you are the copyright holder for those contributions and you grant
+# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
+# royalty-free, perpetual, license to use, copy, create derivative
+# works based on those contributions, and sublicense and distribute
+# those contributions and any derivatives thereof.
+# 
+# END BPS TAGGED BLOCK }}}
 
 =head1 NAME
 
 rt-mailgate - Mail interface to RT3.
 
 
 =head1 NAME
 
 rt-mailgate - Mail interface to RT3.
 
-=begin testing
-
-use RT::I18N;
-
-
-# {{{ Test new ticket creation by root who is privileged and superuser
-
-ok(open(MAIL, "|/opt/rt3/bin/rt-mailgate --url http://localhost/ --queue general --action correspond"), "Opened the mailgate - $@");
-print MAIL <<EOF;
-From: root\@localhost
-To: rt\@example.com
-Subject: This is a test of new ticket creation
-
-Blah!
-Foob!
-EOF
-close (MAIL);
-
-use RT::Tickets;
-my $tickets = RT::Tickets->new($RT::SystemUser);
-$tickets->OrderBy(FIELD => 'id', ORDER => 'DESC');
-$tickets->Limit(FIELD => 'id', OPERATOR => '>', VALUE => '0');
-my $tick = $tickets->First();
-ok (UNIVERSAL::isa($tick,'RT::Ticket'));
-ok ($tick->Id, "found ticket ".$tick->Id);
-ok ($tick->Subject eq 'This is a test of new ticket creation', "Created the ticket");
-
-# }}}
-
-
-# {{{This is a test of new ticket creation as an unknown user
-
-ok(open(MAIL, "|/opt/rt3/bin/rt-mailgate --url http://localhost/ --queue general --action correspond"), "Opened the mailgate - $@");
-print MAIL <<EOF;
-From: doesnotexist\@example.com
-To: rt\@example.com
-Subject: This is a test of new ticket creation as an unknown user
-
-Blah!
-Foob!
-EOF
-close (MAIL);
-
-$tickets = RT::Tickets->new($RT::SystemUser);
-$tickets->OrderBy(FIELD => 'id', ORDER => 'DESC');
-$tickets->Limit(FIELD => 'id' ,OPERATOR => '>', VALUE => '0');
-$tick = $tickets->First();
-ok ($tick->Id, "found ticket ".$tick->Id);
-ok ($tick->Subject ne 'This is a test of new ticket creation as an unknown user', "failed to create the new ticket from an unprivileged account");
-my $u = RT::User->new($RT::SystemUser);
-$u->Load('doesnotexist@example.com');
-ok( $u->Id == 0, " user does not exist and was not created by failed ticket submission");
-
-
-# }}}
-
-# {{{ now everybody can create tickets.  can a random unkown user create tickets?
-
-my $g = RT::Group->new($RT::SystemUser);
-$g->LoadSystemInternalGroup('Everyone');
-ok( $g->Id, "Found 'everybody'");
-
-my ($val,$msg) = $g->PrincipalObj->GrantRight(Right => 'CreateTicket');
-ok ($val, "Granted everybody the right to create tickets - $msg");
-
-sleep(60); # gotta sleep so the remote process' ACL cache times out
-
-ok(open(MAIL, "|/opt/rt3/bin/rt-mailgate --url http://localhost/ --queue general --action correspond"), "Opened the mailgate - $@");
-print MAIL <<EOF;
-From: doesnotexist\@example.com
-To: rt\@example.com
-Subject: This is a test of new ticket creation as an unknown user
-
-Blah!
-Foob!
-EOF
-close (MAIL);
-
-
-$tickets = RT::Tickets->new($RT::SystemUser);
-$tickets->OrderBy(FIELD => 'id', ORDER => 'DESC');
-$tickets->Limit(FIELD => 'id' ,OPERATOR => '>', VALUE => '0');
-$tick = $tickets->First();
-ok ($tick->Id, "found ticket ".$tick->Id);
-ok ($tick->Subject eq 'This is a test of new ticket creation as an unknown user', "failed to create the new ticket from an unprivileged account");
-my $u = RT::User->new($RT::SystemUser);
-$u->Load('doesnotexist@example.com');
-ok( $u->Id != 0, " user does not exist and was created by ticket submission");
-
-# }}}
-
-
-# {{{  can another random reply to a ticket without being granted privs? answer should be no.
-
-
-#($val,$msg) = $g->PrincipalObj->GrantRight(Right => 'CreateTicket');
-#ok ($val, "Granted everybody the right to create tickets - $msg");
-#sleep(60); # gotta sleep so the remote process' ACL cache times out
-
-ok(open(MAIL, "|/opt/rt3/bin/rt-mailgate --url http://localhost/ --queue general --action correspond"), "Opened the mailgate - $@");
-print MAIL <<EOF;
-From: doesnotexist-2\@example.com
-To: rt\@example.com
-Subject: [example.com #@{[$tick->Id]}] This is a test of a reply as an unknown user
-
-Blah!
-Foob!
-EOF
-close (MAIL);
-
-$u = RT::User->new($RT::SystemUser);
-$u->Load('doesnotexist-2@example.com');
-ok( $u->Id == 0, " user does not exist and was not created by ticket correspondence submission");
-# }}}
-# {{{  can another random reply to a ticket after being granted privs? answer should be yes
-
-
-($val,$msg) = $g->PrincipalObj->GrantRight(Right => 'ReplyToTicket');
-ok ($val, "Granted everybody the right to reply to  tickets - $msg");
-sleep(60); # gotta sleep so the remote process' ACL cache times out
-
-ok(open(MAIL, "|/opt/rt3/bin/rt-mailgate --url http://localhost/ --queue general --action correspond"), "Opened the mailgate - $@");
-print MAIL <<EOF;
-From: doesnotexist-2\@example.com
-To: rt\@example.com
-Subject: [example.com #@{[$tick->Id]}] This is a test of a reply as an unknown user
-
-Blah!
-Foob!
-EOF
-close (MAIL);
-
-
-$u = RT::User->new($RT::SystemUser);
-$u->Load('doesnotexist-2@example.com');
-ok( $u->Id != 0, " user exists and was created by ticket correspondence submission");
-
-# }}}
-
-# {{{  can another random comment on a ticket without being granted privs? answer should be no.
-
-
-#($val,$msg) = $g->PrincipalObj->GrantRight(Right => 'CreateTicket');
-#ok ($val, "Granted everybody the right to create tickets - $msg");
-#sleep(60); # gotta sleep so the remote process' ACL cache times out
-
-ok(open(MAIL, "|/opt/rt3/bin/rt-mailgate --url http://localhost/ --queue general --action comment"), "Opened the mailgate - $@");
-print MAIL <<EOF;
-From: doesnotexist-3\@example.com
-To: rt\@example.com
-Subject: [example.com #@{[$tick->Id]}] This is a test of a comment as an unknown user
-
-Blah!
-Foob!
-EOF
-close (MAIL);
-
-$u = RT::User->new($RT::SystemUser);
-$u->Load('doesnotexist-3@example.com');
-ok( $u->Id == 0, " user does not exist and was not created by ticket comment submission");
-
-# }}}
-# {{{  can another random reply to a ticket after being granted privs? answer should be yes
-
-
-($val,$msg) = $g->PrincipalObj->GrantRight(Right => 'CommentOnTicket');
-ok ($val, "Granted everybody the right to reply to  tickets - $msg");
-sleep(60); # gotta sleep so the remote process' ACL cache times out
-
-ok(open(MAIL, "|/opt/rt3/bin/rt-mailgate --url http://localhost/ --queue general --action comment"), "Opened the mailgate - $@");
-print MAIL <<EOF;
-From: doesnotexist-3\@example.com
-To: rt\@example.com
-Subject: [example.com #@{[$tick->Id]}] This is a test of a comment as an unknown user
-
-Blah!
-Foob!
-EOF
-close (MAIL);
-
-
-$u = RT::User->new($RT::SystemUser);
-$u->Load('doesnotexist-3@example.com');
-ok( $u->Id != 0, " user exists and was created by ticket comment submission");
-
-# }}}
-
-# {{{ Testing preservation of binary attachments
-
-# Get a binary blob (Best Practical logo) 
-
-# Create a mime entity with an attachment
-
-use MIME::Entity;
-my $entity = MIME::Entity->build( From => 'root@localhost',
-                                 To => 'rt@localhost',
-                                Subject => 'binary attachment test',
-                                Data => ['This is a test of a binary attachment']);
-
-# currently in lib/t/autogen
-$entity->attach(Path => '../../../html/NoAuth/images/spacer.gif', 
-                Type => 'image/gif',
-                Encoding => 'base64');
-
-# Create a ticket with a binary attachment
-ok(open(MAIL, "|/opt/rt3/bin/rt-mailgate --url http://localhost/ --queue general --action correspond"), "Opened the mailgate - $@");
-
-$entity->print(\*MAIL);
-
-close (MAIL);
-
-my $tickets = RT::Tickets->new($RT::SystemUser);
-$tickets->OrderBy(FIELD => 'id', ORDER => 'DESC');
-$tickets->Limit(FIELD => 'id', OPERATOR => '>', VALUE => '0');
- $tick = $tickets->First();
-ok (UNIVERSAL::isa($tick,'RT::Ticket'));
-ok ($tick->Id, "found ticket ".$tick->Id);
-ok ($tick->Subject eq 'binary attachment test', "Created the ticket - ".$tick->Id);
-
-my $file = `cat ../../../html/NoAuth/images/spacer.gif`;
-ok ($file, "Read in the logo image");
-
-
-        use Digest::MD5;
-warn "for the raw file the content is ".Digest::MD5::md5_base64($file);
-
-
-
-# Verify that the binary attachment is valid in the database
-my $attachments = RT::Attachments->new($RT::SystemUser);
-$attachments->Limit(FIELD => 'ContentType', VALUE => 'image/gif');
-ok ($attachments->Count == 1, 'Found only one gif in the database');
-my $attachment = $attachments->First;
-my $acontent = $attachment->Content;
-
-        warn "coming from the  database, the content is ".Digest::MD5::md5_base64($acontent);
-
-is( $acontent, $file, 'The attachment isn\'t screwed up in the database.');
-# Log in as root
-use Getopt::Long;
-use LWP::UserAgent;
-
-
-# Grab the binary attachment via the web ui
-my $ua      = LWP::UserAgent->new();
-
-my $full_url = "http://localhost/Ticket/Attachment/".$attachment->TransactionId."/".$attachment->id."/spacer.gif?&user=root&pass=password";
-my $r = $ua->get( $full_url);
-
-
-# Verify that the downloaded attachment is the same as what we uploaded.
-is($file, $r->content, 'The attachment isn\'t screwed up in download');
-
-
-
-# }}}
-
-# {{{ Simple I18N testing
-
-ok(open(MAIL, "|/opt/rt3/bin/rt-mailgate --url http://localhost/ --queue general --action correspond"), "Opened the mailgate - $@");
-                                                                         
-print MAIL <<EOF;
-From: root\@localhost
-To: rtemail\@example.com
-Subject: This is a test of I18N ticket creation
-Content-Type: text/plain; charset="utf-8"
-
-2 accented lines
-\303\242\303\252\303\256\303\264\303\273
-\303\241\303\251\303\255\303\263\303\272
-bye
-EOF
-close (MAIL);
-
-my $unitickets = RT::Tickets->new($RT::SystemUser);
-$unitickets->OrderBy(FIELD => 'id', ORDER => 'DESC');
-$unitickets->Limit(FIELD => 'id', OPERATOR => '>', VALUE => '0');
-my $unitick = $unitickets->First();
-ok (UNIVERSAL::isa($unitick,'RT::Ticket'));
-ok ($unitick->Id, "found ticket ".$unitick->Id);
-ok ($unitick->Subject eq 'This is a test of I18N ticket creation', "Created the ticket - ". $unitick->Subject);
-
-
-
-my $unistring = "\303\241\303\251\303\255\303\263\303\272";
-Encode::_utf8_on($unistring);
-is ($unitick->Transactions->First->Content, $unitick->Transactions->First->Attachments->First->Content, "Content is ". $unitick->Transactions->First->Attachments->First->Content);
-ok($unitick->Transactions->First->Attachments->First->Content =~ /$unistring/i, $unitick->Id." appears to be unicode ". $unitick->Transactions->First->Attachments->First->Id);
-# supposedly I18N fails on the second message sent in.
-
-ok(open(MAIL, "|/opt/rt3/bin/rt-mailgate --url http://localhost/ --queue general --action correspond"), "Opened the mailgate - $@");
-                                                                         
-print MAIL <<EOF;
-From: root\@localhost
-To: rtemail\@example.com
-Subject: This is a test of I18N ticket creation
-Content-Type: text/plain; charset="utf-8"
-
-2 accented lines
-\303\242\303\252\303\256\303\264\303\273
-\303\241\303\251\303\255\303\263\303\272
-bye
-EOF
-close (MAIL);
-
-my $tickets2 = RT::Tickets->new($RT::SystemUser);
-$tickets2->OrderBy(FIELD => 'id', ORDER => 'DESC');
-$tickets2->Limit(FIELD => 'id', OPERATOR => '>', VALUE => '0');
-my $tick2 = $tickets2->First();
-ok (UNIVERSAL::isa($tick2,'RT::Ticket'));
-ok ($tick2->Id, "found ticket ".$tick2->Id);
-ok ($tick2->Subject eq 'This is a test of I18N ticket creation', "Created the ticket");
-
-
-
-my $unistring = "\303\241\303\251\303\255\303\263\303\272";
-Encode::_utf8_on($unistring);
-
-ok ($tick2->Transactions->First->Content =~ $unistring, "It appears to be unicode - ".$tick2->Transactions->First->Content);
-
-# }}}
-
-
-($val,$msg) = $g->PrincipalObj->RevokeRight(Right => 'CreateTicket');
-ok ($val, $msg);
-
-
-
-=end testing
-
 =cut
 
 
 =cut
 
 
@@ -367,7 +59,7 @@ use LWP::UserAgent;
 use constant EX_TEMPFAIL => 75;
 
 my %opts;
 use constant EX_TEMPFAIL => 75;
 
 my %opts;
-GetOptions( \%opts, "queue=s", "action=s", "url=s", "jar=s", "help", "debug", "extension=s" );
+GetOptions( \%opts, "queue=s", "action=s", "url=s", "jar=s", "help", "debug", "extension=s", "timeout=i" );
 
 if ( $opts{help} ) {
     require Pod::Usage;
 
 if ( $opts{help} ) {
     require Pod::Usage;
@@ -380,18 +72,22 @@ for (qw(url)) {
     die "$0 invoked improperly\n\nNo $_ provided to mail gateway!\n" unless $opts{$_};
 }
 
     die "$0 invoked improperly\n\nNo $_ provided to mail gateway!\n" unless $opts{$_};
 }
 
-undef $/;
-my $message = <>;
 my $ua      = LWP::UserAgent->new();
 $ua->cookie_jar( { file => $opts{jar} } );
 
 my %args = (
     queue   => $opts{queue},
     action  => $opts{action},
 my $ua      = LWP::UserAgent->new();
 $ua->cookie_jar( { file => $opts{jar} } );
 
 my %args = (
     queue   => $opts{queue},
     action  => $opts{action},
-    message => $message,
     SessionType => 'REST',    # Surpress login box
 );
 
     SessionType => 'REST',    # Surpress login box
 );
 
+# Read the message in from STDIN
+$args{'message'} = do { local (@ARGV, $/); <> };
+
+unless ( $args{message} =~ /\S/ ) {
+    print STDERR "$0: no message passed on STDIN!\n";
+    exit 0;
+}
 
 if ($opts{'extension'}) {
         $args{$opts{'extension'}} = $ENV{'EXTENSION'};
 
 if ($opts{'extension'}) {
         $args{$opts{'extension'}} = $ENV{'EXTENSION'};
@@ -404,6 +100,7 @@ warn "Connecting to $full_url" if $opts{'debug'};
 
 
 
 
 
 
+$ua->timeout(exists($opts{'timeout'}) ? $opts{'timeout'} : 180);
 my $r = $ua->post( $full_url, {%args} );
 check_failure($r);
 
 my $r = $ua->post( $full_url, {%args} );
 check_failure($r);
 
@@ -414,7 +111,7 @@ if ( $content !~ /^(ok|not ok)/ ) {
 
     # It's not the server's fault if the mail is bogus. We just want to know that
     # *something* came out of the server.
 
     # It's not the server's fault if the mail is bogus. We just want to know that
     # *something* came out of the server.
-    die <<EOF
+    warn <<EOF;
 RT server error.
 
 The RT server which handled your email did not behave as expected. It
 RT server error.
 
 The RT server which handled your email did not behave as expected. It
@@ -423,8 +120,13 @@ said:
 $content
 EOF
 
 $content
 EOF
 
+exit EX_TEMPFAIL;
+
 }
 
 }
 
+exit;
+
+
 sub check_failure {
     my $r = shift;
     return if $r->is_success();
 sub check_failure {
     my $r = shift;
     return if $r->is_success();
@@ -453,9 +155,13 @@ sub check_failure {
 
 Usual invocation (from MTA):
 
 
 Usual invocation (from MTA):
 
-    rt-mailgate --action (correspond|comment) --queue queuename
+    rt-mailgate --action (correspond|comment|...) --queue queuename
                 --url http://your.rt.server/
                 --url http://your.rt.server/
-                [ --extension (queue|action|ticket)
+                [ --debug ]
+                [ --extension (queue|action|ticket) ]
+                [ --timeout seconds ]
+
+
 
 See C<man rt-mailgate> for more.
 
 
 See C<man rt-mailgate> for more.
 
@@ -465,15 +171,31 @@ See C<man rt-mailgate> for more.
 
 =item C<--action>
 
 
 =item C<--action>
 
-Specifies whether this is a correspondence or comment address.
+Specifies what happens to email sent to this alias.  The avaliable
+basic actions are: C<correspond>, C<comment>.
+
+
+If you've set the RT configuration variable B<$RT::UnsafeEmailCommands>,
+C<take> and C<resolve> are also available.  You can execute two or more
+actions on a single message using a C<-> separated list.  RT will execute
+the actions in the listed order.  For example you can use C<take-comment>,
+C<correspond-resolve> or C<take-comment-resolve> as actions.
+
+Note that C<take> and C<resolve> actions ignore message text if used
+alone.  Include a  C<comment> or C<correspond> action if you want RT
+to record the incoming message.
+
+The default action is C<correspond>.
 
 =item C<--queue>
 
 
 =item C<--queue>
 
-Reflects which queue this address handles.
+This flag determines which queue this alias should create a ticket in if no ticket identifier
+is found.
 
 =item C<--url>
 
 
 =item C<--url>
 
-The location of the web server for your RT instance.
+This flag tells the mail gateway where it can find your RT server. You should 
+probably use the same URL that users use to log into RT.
 
 
 =item C<--extension> OPTIONAL
 
 
 =item C<--extension> OPTIONAL
@@ -486,6 +208,16 @@ submitted to will be set to the value of $EXTENSION. By specifying
 is related to.  "action" will allow the user to specify either "comment" or
 "correspond" in the address extension.
 
 is related to.  "action" will allow the user to specify either "comment" or
 "correspond" in the address extension.
 
+=item C<--debug> OPTIONAL
+
+Print debugging output to standard error
+
+
+=item C<--timeout> OPTIONAL
+
+Configure the timeout for posting the message to the web server.  The
+default timeout is 3 minutes (180 seconds).
+
 
 =head1 DESCRIPTION
 
 
 =head1 DESCRIPTION
 
@@ -554,6 +286,7 @@ several parameters:
 =item Message
 
 A C<MIME::Entity> object representing the email
 =item Message
 
 A C<MIME::Entity> object representing the email
+
 =item CurrentUser
 
 An C<RT::CurrentUser> object
 =item CurrentUser
 
 An C<RT::CurrentUser> object
diff --git a/rt/bin/webmux.pl b/rt/bin/webmux.pl
deleted file mode 100755 (executable)
index 21cb83f..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-#!/usr/bin/perl
-# BEGIN LICENSE BLOCK
-# 
-# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
-# 
-# (Except where explictly superceded by other copyright notices)
-# 
-# This work is made available to you under the terms of Version 2 of
-# the GNU General Public License. A copy of that license should have
-# been provided with this software, but in any event can be snarfed
-# from www.gnu.org.
-# 
-# This work is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-# 
-# Unless otherwise specified, all modifications, corrections or
-# extensions to this work which alter its source code become the
-# property of Best Practical Solutions, LLC when submitted for
-# inclusion in the work.
-# 
-# 
-# END LICENSE BLOCK
-
-use strict;
-
-BEGIN {
-    $ENV{'PATH'}   = '/bin:/usr/bin';                      # or whatever you need
-    $ENV{'CDPATH'} = '' if defined $ENV{'CDPATH'};
-    $ENV{'SHELL'}  = '/bin/sh' if defined $ENV{'SHELL'};
-    $ENV{'ENV'}    = '' if defined $ENV{'ENV'};
-    $ENV{'IFS'}    = '' if defined $ENV{'IFS'};
-}
-
-use lib ("/opt/rt3/local/lib", "/opt/rt3/lib");
-use RT;
-
-package RT::Mason;
-
-use CGI qw(-private_tempfiles);    #bring this in before mason, to make sure we
-                                   #set private_tempfiles
-
-BEGIN {
-    if ($CGI::MOD_PERL) {
-       require HTML::Mason::ApacheHandler;
-    }
-    else {
-       require HTML::Mason::CGIHandler;
-    }
-}
-
-use HTML::Mason;                   # brings in subpackages: Parser, Interp, etc.
-
-use vars qw($Nobody $SystemUser $r);
-
-#This drags in RT's config.pm
-RT::LoadConfig();
-
-use Carp;
-
-{
-    package HTML::Mason::Commands;
-    use vars qw(%session);
-
-    use RT::Tickets;
-    use RT::Transactions;
-    use RT::Users;
-    use RT::CurrentUser;
-    use RT::Templates;
-    use RT::Queues;
-    use RT::ScripActions;
-    use RT::ScripConditions;
-    use RT::Scrips;
-    use RT::Groups;
-    use RT::GroupMembers;
-    use RT::CustomFields;
-    use RT::CustomFieldValues;
-    use RT::TicketCustomFieldValues;
-
-    use RT::Interface::Web;
-    use MIME::Entity;
-    use Text::Wrapper;
-    use CGI::Cookie;
-    use Time::ParseDate;
-    use HTML::Entities;
-}
-
-
-# Activate the following if running httpd as root (the normal case).
-# Resets ownership of all files created by Mason at startup.
-# Note that mysql uses DB for sessions, so there's no need to do this.
-unless ($RT::DatabaseType =~ /(mysql|Pg)/) {
-    # Clean up our umask to protect session files
-    umask(0077);
-
-if ( $CGI::MOD_PERL)  {
-    chown( Apache->server->uid, Apache->server->gid, [$RT::MasonSessionDir] )
-       if Apache->server->can('uid');
-        }
-    # Die if WebSessionDir doesn't exist or we can't write to it
-    stat($RT::MasonSessionDir);
-    die "Can't read and write $RT::MasonSessionDir"
-       unless ( ( -d _ ) and ( -r _ ) and ( -w _ ) );
-}
-
-my $ah = &RT::Interface::Web::NewApacheHandler() if $CGI::MOD_PERL;
-
-sub handler {
-    ($r) = @_;
-
-    RT::Init();
-
-    # We don't need to handle non-text items
-    return -1 if defined( $r->content_type ) && $r->content_type !~ m|^text/|io;
-
-    my %session;
-    my $status = $ah->handle_request($r);
-    undef (%session);
-
-    $RT::Logger->crit("Transaction not committed. Usually indicates a software fault. Data loss may have occurred") if $RT::Handle->TransactionDepth;
-    return $status;
-}
-
-1;
index 24e15e3..d4e6493 100644 (file)
@@ -1,25 +1,25 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by RT configure 3.0.9, which was
-generated by GNU Autoconf 2.53.  Invocation command line was
+It was created by RT configure 3.4.5, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
 
 
-  $ ./configure 
+  $ ./configure --enable-layout=Freeside --with-db-type=Pg --with-db-dba=freeside --with-db-database=freeside --with-db-rt-user=freeside --with-db-rt-pass= --with-web-user=freeside --with-web-group=freeside --with-rt-group=freeside
 
 ## --------- ##
 ## Platform. ##
 ## --------- ##
 
 
 ## --------- ##
 ## Platform. ##
 ## --------- ##
 
-hostname = pallas
-uname -m = i686
-uname -r = 2.4.18-686
+hostname = rootwood
+uname -m = x86_64
+uname -r = 2.6.16-2-amd64-k8-smp
 uname -s = Linux
 uname -s = Linux
-uname -v = #1 Sun Apr 14 11:32:47 EST 2002
+uname -v = #1 SMP Wed Jun 21 19:17:08 CEST 2006
 
 /usr/bin/uname -p = unknown
 /bin/uname -X     = unknown
 
 
 /usr/bin/uname -p = unknown
 /bin/uname -X     = unknown
 
-/bin/arch              = i686
+/bin/arch              = x86_64
 /usr/bin/arch -k       = unknown
 /usr/convex/getsysinfo = unknown
 hostinfo               = unknown
 /usr/bin/arch -k       = unknown
 /usr/convex/getsysinfo = unknown
 hostinfo               = unknown
@@ -27,41 +27,37 @@ hostinfo               = unknown
 /usr/bin/oslevel       = unknown
 /bin/universe          = unknown
 
 /usr/bin/oslevel       = unknown
 /bin/universe          = unknown
 
-PATH: /usr/X11R6/bin/
-PATH: /opt/rt/bin
-PATH: /usr/athena/bin
+PATH: /usr/local/sbin
 PATH: /usr/local/bin
 PATH: /usr/local/bin
-PATH: /bin
-PATH: /usr/bin
 PATH: /usr/sbin
 PATH: /usr/bin
 PATH: /usr/sbin
 PATH: /usr/bin
-PATH: /usr/games
-PATH: $HOME/bin
-PATH: /opt/kerberos/bin
-PATH: /opt/StarOffice-4.0/bin
-PATH: /opt/mysql/bin/
-PATH: .
+PATH: /sbin
+PATH: /bin
+PATH: /usr/X11R6/bin
 
 
 ## ----------- ##
 ## Core tests. ##
 ## ----------- ##
 
 
 
 ## ----------- ##
 ## Core tests. ##
 ## ----------- ##
 
-configure:1218: checking for a BSD-compatible install
-configure:1272: result: /usr/bin/install -c
-configure:1286: checking for perl
-configure:1304: found /usr/bin/perl
-configure:1317: result: /usr/bin/perl
-configure:1639: checking for chosen layout
-configure:1654: result: RT3
-configure:1986: creating ./config.status
+configure:1330: checking for a BSD-compatible install
+configure:1385: result: /usr/bin/install -c
+configure:1400: checking for gawk
+configure:1416: found /usr/bin/gawk
+configure:1426: result: gawk
+configure:1439: checking for perl
+configure:1457: found /usr/bin/perl
+configure:1470: result: /usr/bin/perl
+configure:1794: checking for chosen layout
+configure:1809: result: Freeside
+configure:2259: creating ./config.status
 
 ## ---------------------- ##
 ## Running config.status. ##
 ## ---------------------- ##
 
 
 ## ---------------------- ##
 ## Running config.status. ##
 ## ---------------------- ##
 
-This file was extended by RT config.status 3.0.9, which was
-generated by GNU Autoconf 2.53.  Invocation command line was
+This file was extended by RT config.status 3.4.5, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
 
   CONFIG_FILES    = 
   CONFIG_HEADERS  = 
 
   CONFIG_FILES    = 
   CONFIG_HEADERS  = 
@@ -69,26 +65,22 @@ generated by GNU Autoconf 2.53.  Invocation command line was
   CONFIG_COMMANDS = 
   $ ./config.status 
 
   CONFIG_COMMANDS = 
   $ ./config.status 
 
-on pallas
-
-config.status:639: creating sbin/rt-setup-database
-config.status:639: creating sbin/rt-test-dependencies
-config.status:639: creating Makefile
-config.status:639: creating etc/RT_Config.pm
-config.status:639: creating lib/RT.pm
-config.status:639: creating lib/t/00smoke.t
-config.status:639: creating lib/t/01harness.t
-config.status:639: creating lib/t/02regression.t
-config.status:639: creating lib/t/03web.pl
-config.status:639: creating lib/t/04_send_email.pl
-config.status:639: creating bin/mason_handler.fcgi
-config.status:639: creating bin/mason_handler.scgi
-config.status:639: creating bin/mason_handler.svc
-config.status:639: creating bin/rt-commit-handler
-config.status:639: creating bin/rt-crontool
-config.status:639: creating bin/rt-mailgate
-config.status:639: creating bin/rt
-config.status:639: creating bin/webmux.pl
+on rootwood
+
+config.status:759: creating sbin/rt-dump-database
+config.status:759: creating sbin/rt-setup-database
+config.status:759: creating sbin/rt-test-dependencies
+config.status:759: creating bin/mason_handler.fcgi
+config.status:759: creating bin/mason_handler.scgi
+config.status:759: creating bin/standalone_httpd
+config.status:759: creating bin/rt-crontool
+config.status:759: creating bin/rt-mailgate
+config.status:759: creating bin/rt
+config.status:759: creating Makefile
+config.status:759: creating etc/RT_Config.pm
+config.status:759: creating lib/RT.pm
+config.status:759: creating bin/mason_handler.svc
+config.status:759: creating bin/webmux.pl
 
 ## ---------------- ##
 ## Cache variables. ##
 
 ## ---------------- ##
 ## Cache variables. ##
@@ -104,15 +96,131 @@ ac_cv_env_target_alias_set=
 ac_cv_env_target_alias_value=
 ac_cv_path_PERL=/usr/bin/perl
 ac_cv_path_install='/usr/bin/install -c'
 ac_cv_env_target_alias_value=
 ac_cv_path_PERL=/usr/bin/perl
 ac_cv_path_install='/usr/bin/install -c'
+ac_cv_prog_AWK=gawk
+
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+
+APACHECTL='/usr/sbin/apachectl'
+AWK='gawk'
+BIN_OWNER='root'
+CONFIG_FILE_PATH='/opt/rt3/etc'
+DATABASE_ENV_PREF=''
+DB_DATABASE='freeside'
+DB_DBA='freeside'
+DB_HOST='localhost'
+DB_PORT=''
+DB_RT_HOST='localhost'
+DB_RT_PASS=''
+DB_RT_USER='freeside'
+DB_TYPE='Pg'
+DEFS='-DPACKAGE_NAME=\"RT\" -DPACKAGE_TARNAME=\"rt\" -DPACKAGE_VERSION=\"3.4.5\" -DPACKAGE_STRING=\"RT\ 3.4.5\" -DPACKAGE_BUGREPORT=\"rt-bugs@fsck.com\" '
+DESTDIR='/opt/rt3'
+ECHO_C=''
+ECHO_N='-n'
+ECHO_T=''
+INSTALL_DATA='${INSTALL} -m 644'
+INSTALL_PROGRAM='${INSTALL}'
+INSTALL_SCRIPT='${INSTALL}'
+LIBOBJS=''
+LIBS=''
+LIBS_GROUP='bin'
+LIBS_OWNER='root'
+LOCAL_ETC_PATH='/opt/rt3/local/etc'
+LOCAL_LEXICON_PATH='/opt/rt3/local/po'
+LOCAL_LIB_PATH='/opt/rt3/local/lib'
+LTLIBOBJS=''
+MASON_DATA_PATH='/usr/local/etc/freeside/masondata'
+MASON_HTML_PATH='/var/www/freeside/rt'
+MASON_LOCAL_HTML_PATH='/opt/rt3/local/html'
+MASON_SESSION_PATH='/opt/rt3/var/session_data'
+PACKAGE_BUGREPORT='rt-bugs@fsck.com'
+PACKAGE_NAME='RT'
+PACKAGE_STRING='RT 3.4.5'
+PACKAGE_TARNAME='rt'
+PACKAGE_VERSION='3.4.5'
+PATH_SEPARATOR=':'
+PERL='/usr/bin/perl'
+RTGROUP='freeside'
+RT_BIN_PATH='/opt/rt3/bin'
+RT_DEVEL_MODE='0'
+RT_DOC_PATH='/opt/rt3/share/doc'
+RT_ETC_PATH='/opt/rt3/etc'
+RT_LIB_PATH='/opt/rt3/lib'
+RT_LOCAL_PATH='/opt/rt3/local'
+RT_LOG_PATH='/opt/rt3/var/log'
+RT_MAN_PATH='/opt/rt3/man'
+RT_PATH='/opt/rt3'
+RT_SBIN_PATH='/opt/rt3/sbin'
+RT_VAR_PATH='/opt/rt3/var'
+RT_VERSION_MAJOR='3'
+RT_VERSION_MINOR='4'
+RT_VERSION_PATCH='5'
+SHELL='/bin/sh'
+SPEEDY_BIN='/usr/local/bin/speedy'
+WEB_GROUP='freeside'
+WEB_USER='freeside'
+bindir='/opt/rt3/bin'
+build_alias=''
+customdir='/opt/rt3/local'
+custometcdir='/opt/rt3/local/etc'
+customhtmldir='/opt/rt3/local/html'
+customlexdir='/opt/rt3/local/po'
+customlibdir='/opt/rt3/local/lib'
+datadir='/opt/rt3/share'
+exec_prefix='/opt/rt3'
+exp_bindir='/opt/rt3/bin'
+exp_customdir='/opt/rt3/local'
+exp_custometcdir='/opt/rt3/local/etc'
+exp_customhtmldir='/opt/rt3/local/html'
+exp_customlexdir='/opt/rt3/local/po'
+exp_customlibdir='/opt/rt3/local/lib'
+exp_datadir='/opt/rt3/share'
+exp_exec_prefix='/opt/rt3'
+exp_htmldir='/var/www/freeside/rt'
+exp_libdir='/opt/rt3/lib'
+exp_localstatedir='/opt/rt3/var'
+exp_logfiledir='/opt/rt3/var/log'
+exp_mandir='/opt/rt3/man'
+exp_manualdir='/opt/rt3/share/doc'
+exp_masonstatedir='/usr/local/etc/freeside/masondata'
+exp_prefix='/opt/rt3'
+exp_sbindir='/opt/rt3/sbin'
+exp_sessionstatedir='/opt/rt3/var/session_data'
+exp_sysconfdir='/opt/rt3/etc'
+host_alias=''
+htmldir='/var/www/freeside/rt'
+includedir='${prefix}/include'
+infodir='${prefix}/info'
+libdir='/opt/rt3/lib'
+libexecdir='${exec_prefix}/libexec'
+localstatedir='/opt/rt3/var'
+logfiledir='/opt/rt3/var/log'
+mandir='/opt/rt3/man'
+manualdir='/opt/rt3/share/doc'
+masonstatedir='/usr/local/etc/freeside/masondata'
+oldincludedir='/usr/include'
+prefix='/opt/rt3'
+program_transform_name='s,x,x,'
+rt_layout_name='Freeside'
+rt_version_major='3'
+rt_version_minor='4'
+rt_version_patch='5'
+sbindir='/opt/rt3/sbin'
+sessionstatedir='/opt/rt3/var/session_data'
+sharedstatedir='${prefix}/com'
+sysconfdir='/opt/rt3/etc'
+target_alias=''
 
 ## ----------- ##
 ## confdefs.h. ##
 ## ----------- ##
 
 
 ## ----------- ##
 ## confdefs.h. ##
 ## ----------- ##
 
+#define PACKAGE_BUGREPORT "rt-bugs@fsck.com"
 #define PACKAGE_NAME "RT"
 #define PACKAGE_NAME "RT"
+#define PACKAGE_STRING "RT 3.4.5"
 #define PACKAGE_TARNAME "rt"
 #define PACKAGE_TARNAME "rt"
-#define PACKAGE_VERSION "3.0.9"
-#define PACKAGE_STRING "RT 3.0.9"
-#define PACKAGE_BUGREPORT "rt-3.0-bugs@fsck.com"
+#define PACKAGE_VERSION "3.4.5"
 
 configure: exit 0
 
 configure: exit 0
index e7d81b3..c39ee3f 100755 (executable)
@@ -5,8 +5,9 @@
 # configure, is in config.log if it exists.
 
 debug=false
 # configure, is in config.log if it exists.
 
 debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
 SHELL=${CONFIG_SHELL-/bin/sh}
 SHELL=${CONFIG_SHELL-/bin/sh}
-
 ## --------------------- ##
 ## M4sh Initialization.  ##
 ## --------------------- ##
 ## --------------------- ##
 ## M4sh Initialization.  ##
 ## --------------------- ##
@@ -15,46 +16,57 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   emulate sh
   NULLCMD=:
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   emulate sh
   NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
   set -o posix
 fi
 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
   set -o posix
 fi
+DUALCASE=1; export DUALCASE # for MKS sh
 
 
-# NLS nuisances.
 # Support unset when possible.
 # Support unset when possible.
-if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
   as_unset=unset
 else
   as_unset=false
 fi
 
   as_unset=unset
 else
   as_unset=false
 fi
 
-(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
-    { $as_unset LANG || test "${LANG+set}" != set; } ||
-      { LANG=C; export LANG; }
-(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
-    { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
-      { LC_ALL=C; export LC_ALL; }
-(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
-    { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
-      { LC_TIME=C; export LC_TIME; }
-(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
-    { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
-      { LC_CTYPE=C; export LC_CTYPE; }
-(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
-    { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
-      { LANGUAGE=C; export LANGUAGE; }
-(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
-    { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
-      { LC_COLLATE=C; export LC_COLLATE; }
-(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
-    { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
-      { LC_NUMERIC=C; export LC_NUMERIC; }
-(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
-    { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
-      { LC_MESSAGES=C; export LC_MESSAGES; }
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
 
 
 # Name of the executable.
 
 
 # Name of the executable.
-as_me=`(basename "$0") 2>/dev/null ||
+as_me=`$as_basename "$0" ||
 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
         X"$0" : 'X\(//\)$' \| \
         X"$0" : 'X\(/\)$' \| \
 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
         X"$0" : 'X\(//\)$' \| \
         X"$0" : 'X\(/\)$' \| \
@@ -65,6 +77,7 @@ echo X/"$0" |
          /^X\/\(\/\).*/{ s//\1/; q; }
          s/.*/./; q'`
 
          /^X\/\(\/\).*/{ s//\1/; q; }
          s/.*/./; q'`
 
+
 # PATH needs CR, and LINENO needs CR and PATH.
 # Avoid depending upon Character Ranges.
 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
 # PATH needs CR, and LINENO needs CR and PATH.
 # Avoid depending upon Character Ranges.
 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
@@ -75,15 +88,15 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
 
 # The user is always right.
 if test "${PATH_SEPARATOR+set}" != set; then
 
 # The user is always right.
 if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conftest.sh
-  echo  "exit 0"   >>conftest.sh
-  chmod +x conftest.sh
-  if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
     PATH_SEPARATOR=';'
   else
     PATH_SEPARATOR=:
   fi
     PATH_SEPARATOR=';'
   else
     PATH_SEPARATOR=:
   fi
-  rm -f conftest.sh
+  rm -f conf$$.sh
 fi
 
 
 fi
 
 
@@ -132,6 +145,8 @@ do
   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
   test "x$as_lineno_1" != "x$as_lineno_2" &&
   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
   test "x$as_lineno_1" != "x$as_lineno_2" &&
   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+            $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+            $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
             CONFIG_SHELL=$as_dir/$as_base
             export CONFIG_SHELL
             exec "$CONFIG_SHELL" "$0" ${1+"$@"}
             CONFIG_SHELL=$as_dir/$as_base
             export CONFIG_SHELL
             exec "$CONFIG_SHELL" "$0" ${1+"$@"}
@@ -205,13 +220,20 @@ else
 fi
 rm -f conf$$ conf$$.exe conf$$.file
 
 fi
 rm -f conf$$ conf$$.exe conf$$.file
 
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
 as_executable_p="test -f"
 
 # Sed expression to map a string onto a valid CPP name.
 as_executable_p="test -f"
 
 # Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 
 # Sed expression to map a string onto a valid variable name.
 
 # Sed expression to map a string onto a valid variable name.
-as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
 # IFS
 
 
 # IFS
@@ -221,7 +243,7 @@ as_nl='
 IFS="  $as_nl"
 
 # CDPATH.
 IFS="  $as_nl"
 
 # CDPATH.
-$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
+$as_unset CDPATH
 
 exec 6>&1
 
 
 exec 6>&1
 
@@ -237,8 +259,8 @@ _ASBOX
 } >&5
 cat >&5 <<_CSEOF
 
 } >&5
 cat >&5 <<_CSEOF
 
-This file was extended by RT $as_me 3.0.9, which was
-generated by GNU Autoconf 2.53.  Invocation command line was
+This file was extended by RT $as_me 3.4.5, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -249,7 +271,7 @@ generated by GNU Autoconf 2.53.  Invocation command line was
 _CSEOF
 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
 echo >&5
 _CSEOF
 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
 echo >&5
-config_files=" sbin/rt-setup-database sbin/rt-test-dependencies Makefile etc/RT_Config.pm lib/RT.pm lib/t/00smoke.t lib/t/01harness.t lib/t/02regression.t lib/t/03web.pl lib/t/04_send_email.pl bin/mason_handler.fcgi bin/mason_handler.scgi bin/mason_handler.svc bin/rt-commit-handler bin/rt-crontool bin/rt-mailgate bin/rt bin/webmux.pl"
+config_files=" sbin/rt-dump-database sbin/rt-setup-database sbin/rt-test-dependencies bin/mason_handler.fcgi bin/mason_handler.scgi bin/standalone_httpd bin/rt-crontool bin/rt-mailgate bin/rt Makefile etc/RT_Config.pm lib/RT.pm bin/mason_handler.svc bin/webmux.pl"
 
 ac_cs_usage="\
 \`$as_me' instantiates files from templates according to the
 
 ac_cs_usage="\
 \`$as_me' instantiates files from templates according to the
@@ -259,22 +281,22 @@ Usage: $0 [OPTIONS] [FILE]...
 
   -h, --help       print this help, then exit
   -V, --version    print version number, then exit
 
   -h, --help       print this help, then exit
   -V, --version    print version number, then exit
+  -q, --quiet      do not print progress messages
   -d, --debug      don't remove temporary files
       --recheck    update $as_me by reconfiguring in the same conditions
   --file=FILE[:TEMPLATE]
   -d, --debug      don't remove temporary files
       --recheck    update $as_me by reconfiguring in the same conditions
   --file=FILE[:TEMPLATE]
-                   instantiate the configuration file FILE
+                  instantiate the configuration file FILE
 
 Configuration files:
 $config_files
 
 Report bugs to <bug-autoconf@gnu.org>."
 ac_cs_version="\
 
 Configuration files:
 $config_files
 
 Report bugs to <bug-autoconf@gnu.org>."
 ac_cs_version="\
-RT config.status 3.0.9
-configured by ./configure, generated by GNU Autoconf 2.53,
-  with options \"\"
+RT config.status 3.4.5
+configured by ./configure, generated by GNU Autoconf 2.59,
+  with options \"'--enable-layout=Freeside' '--with-db-type=Pg' '--with-db-dba=freeside' '--with-db-database=freeside' '--with-db-rt-user=freeside' '--with-db-rt-pass=' '--with-web-user=freeside' '--with-web-group=freeside' '--with-rt-group=freeside'\"
 
 
-Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
-Free Software Foundation, Inc.
+Copyright (C) 2003 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 srcdir=.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 srcdir=.
@@ -288,21 +310,23 @@ do
   --*=*)
     ac_option=`expr "x$1" : 'x\([^=]*\)='`
     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
   --*=*)
     ac_option=`expr "x$1" : 'x\([^=]*\)='`
     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
-    shift
-    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
-    shift
+    ac_shift=:
+    ;;
+  -*)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
     ;;
     ;;
-  -*);;
   *) # This is not an option, so the user has probably given explicit
      # arguments.
   *) # This is not an option, so the user has probably given explicit
      # arguments.
+     ac_option=$1
      ac_need_defaults=false;;
   esac
 
      ac_need_defaults=false;;
   esac
 
-  case $1 in
+  case $ac_option in
   # Handling of the options.
   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
   # Handling of the options.
   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running /bin/sh ./configure "  " --no-create --no-recursion"
-    exec /bin/sh ./configure  --no-create --no-recursion ;;
+    ac_cs_recheck=: ;;
   --version | --vers* | -V )
     echo "$ac_cs_version"; exit 0 ;;
   --he | --h)
   --version | --vers* | -V )
     echo "$ac_cs_version"; exit 0 ;;
   --he | --h)
@@ -317,13 +341,16 @@ Try \`$0 --help' for more information." >&2;}
   --debug | --d* | -d )
     debug=: ;;
   --file | --fil | --fi | --f )
   --debug | --d* | -d )
     debug=: ;;
   --file | --fil | --fi | --f )
-    shift
-    CONFIG_FILES="$CONFIG_FILES $1"
+    $ac_shift
+    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
     ac_need_defaults=false;;
   --header | --heade | --head | --hea )
     ac_need_defaults=false;;
   --header | --heade | --head | --hea )
-    shift
-    CONFIG_HEADERS="$CONFIG_HEADERS $1"
+    $ac_shift
+    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
     ac_need_defaults=false;;
     ac_need_defaults=false;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
 
   # This is an error.
   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
 
   # This is an error.
   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
@@ -338,27 +365,35 @@ Try \`$0 --help' for more information." >&2;}
   shift
 done
 
   shift
 done
 
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+if $ac_cs_recheck; then
+  echo "running /bin/sh ./configure " '--enable-layout=Freeside' '--with-db-type=Pg' '--with-db-dba=freeside' '--with-db-database=freeside' '--with-db-rt-user=freeside' '--with-db-rt-pass=' '--with-web-user=freeside' '--with-web-group=freeside' '--with-rt-group=freeside' $ac_configure_extra_args " --no-create --no-recursion" >&6
+  exec /bin/sh ./configure '--enable-layout=Freeside' '--with-db-type=Pg' '--with-db-dba=freeside' '--with-db-database=freeside' '--with-db-rt-user=freeside' '--with-db-rt-pass=' '--with-web-user=freeside' '--with-web-group=freeside' '--with-rt-group=freeside' $ac_configure_extra_args --no-create --no-recursion
+fi
+
 for ac_config_target in $ac_config_targets
 do
   case "$ac_config_target" in
   # Handling of arguments.
 for ac_config_target in $ac_config_targets
 do
   case "$ac_config_target" in
   # Handling of arguments.
+  "sbin/rt-dump-database" ) CONFIG_FILES="$CONFIG_FILES sbin/rt-dump-database" ;;
   "sbin/rt-setup-database" ) CONFIG_FILES="$CONFIG_FILES sbin/rt-setup-database" ;;
   "sbin/rt-test-dependencies" ) CONFIG_FILES="$CONFIG_FILES sbin/rt-test-dependencies" ;;
   "sbin/rt-setup-database" ) CONFIG_FILES="$CONFIG_FILES sbin/rt-setup-database" ;;
   "sbin/rt-test-dependencies" ) CONFIG_FILES="$CONFIG_FILES sbin/rt-test-dependencies" ;;
-  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-  "etc/RT_Config.pm" ) CONFIG_FILES="$CONFIG_FILES etc/RT_Config.pm" ;;
-  "lib/RT.pm" ) CONFIG_FILES="$CONFIG_FILES lib/RT.pm" ;;
-  "lib/t/00smoke.t" ) CONFIG_FILES="$CONFIG_FILES lib/t/00smoke.t" ;;
-  "lib/t/01harness.t" ) CONFIG_FILES="$CONFIG_FILES lib/t/01harness.t" ;;
-  "lib/t/02regression.t" ) CONFIG_FILES="$CONFIG_FILES lib/t/02regression.t" ;;
-  "lib/t/03web.pl" ) CONFIG_FILES="$CONFIG_FILES lib/t/03web.pl" ;;
-  "lib/t/04_send_email.pl" ) CONFIG_FILES="$CONFIG_FILES lib/t/04_send_email.pl" ;;
   "bin/mason_handler.fcgi" ) CONFIG_FILES="$CONFIG_FILES bin/mason_handler.fcgi" ;;
   "bin/mason_handler.scgi" ) CONFIG_FILES="$CONFIG_FILES bin/mason_handler.scgi" ;;
   "bin/mason_handler.fcgi" ) CONFIG_FILES="$CONFIG_FILES bin/mason_handler.fcgi" ;;
   "bin/mason_handler.scgi" ) CONFIG_FILES="$CONFIG_FILES bin/mason_handler.scgi" ;;
-  "bin/mason_handler.svc" ) CONFIG_FILES="$CONFIG_FILES bin/mason_handler.svc" ;;
-  "bin/rt-commit-handler" ) CONFIG_FILES="$CONFIG_FILES bin/rt-commit-handler" ;;
+  "bin/standalone_httpd" ) CONFIG_FILES="$CONFIG_FILES bin/standalone_httpd" ;;
   "bin/rt-crontool" ) CONFIG_FILES="$CONFIG_FILES bin/rt-crontool" ;;
   "bin/rt-mailgate" ) CONFIG_FILES="$CONFIG_FILES bin/rt-mailgate" ;;
   "bin/rt" ) CONFIG_FILES="$CONFIG_FILES bin/rt" ;;
   "bin/rt-crontool" ) CONFIG_FILES="$CONFIG_FILES bin/rt-crontool" ;;
   "bin/rt-mailgate" ) CONFIG_FILES="$CONFIG_FILES bin/rt-mailgate" ;;
   "bin/rt" ) CONFIG_FILES="$CONFIG_FILES bin/rt" ;;
+  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+  "etc/RT_Config.pm" ) CONFIG_FILES="$CONFIG_FILES etc/RT_Config.pm" ;;
+  "lib/RT.pm" ) CONFIG_FILES="$CONFIG_FILES lib/RT.pm" ;;
+  "bin/mason_handler.svc" ) CONFIG_FILES="$CONFIG_FILES bin/mason_handler.svc" ;;
   "bin/webmux.pl" ) CONFIG_FILES="$CONFIG_FILES bin/webmux.pl" ;;
   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
   "bin/webmux.pl" ) CONFIG_FILES="$CONFIG_FILES bin/webmux.pl" ;;
   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
@@ -374,6 +409,9 @@ if $ac_need_defaults; then
   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
 fi
 
   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
 fi
 
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
 # Create a temporary directory, and hook for its removal unless debugging.
 $debug ||
 {
 # Create a temporary directory, and hook for its removal unless debugging.
 $debug ||
 {
@@ -382,17 +420,17 @@ $debug ||
 }
 
 # Create a (secure) tmp directory for tmp files.
 }
 
 # Create a (secure) tmp directory for tmp files.
-: ${TMPDIR=/tmp}
+
 {
 {
-  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
+  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
   test -n "$tmp" && test -d "$tmp"
 }  ||
 {
   test -n "$tmp" && test -d "$tmp"
 }  ||
 {
-  tmp=$TMPDIR/cs$$-$RANDOM
+  tmp=./confstat$$-$RANDOM
   (umask 077 && mkdir $tmp)
 } ||
 {
   (umask 077 && mkdir $tmp)
 } ||
 {
-   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
+   echo "$me: cannot create a temporary directory in ." >&2
    { (exit 1); exit 1; }
 }
 
    { (exit 1); exit 1; }
 }
 
@@ -411,9 +449,9 @@ s,@SHELL@,/bin/sh,;t t
 s,@PATH_SEPARATOR@,:,;t t
 s,@PACKAGE_NAME@,RT,;t t
 s,@PACKAGE_TARNAME@,rt,;t t
 s,@PATH_SEPARATOR@,:,;t t
 s,@PACKAGE_NAME@,RT,;t t
 s,@PACKAGE_TARNAME@,rt,;t t
-s,@PACKAGE_VERSION@,3.0.9,;t t
-s,@PACKAGE_STRING@,RT 3.0.9,;t t
-s,@PACKAGE_BUGREPORT@,rt-3.0-bugs@fsck.com,;t t
+s,@PACKAGE_VERSION@,3.4.5,;t t
+s,@PACKAGE_STRING@,RT 3.4.5,;t t
+s,@PACKAGE_BUGREPORT@,rt-bugs@fsck.com,;t t
 s,@exec_prefix@,/opt/rt3,;t t
 s,@prefix@,/opt/rt3,;t t
 s,@program_transform_name@,s,x,x,,;t t
 s,@exec_prefix@,/opt/rt3,;t t
 s,@prefix@,/opt/rt3,;t t
 s,@program_transform_name@,s,x,x,,;t t
@@ -432,17 +470,18 @@ s,@mandir@,/opt/rt3/man,;t t
 s,@build_alias@,,;t t
 s,@host_alias@,,;t t
 s,@target_alias@,,;t t
 s,@build_alias@,,;t t
 s,@host_alias@,,;t t
 s,@target_alias@,,;t t
-s,@DEFS@,-DPACKAGE_NAME=\"RT\" -DPACKAGE_TARNAME=\"rt\" -DPACKAGE_VERSION=\"3.0.9\" -DPACKAGE_STRING=\"RT\ 3.0.9\" -DPACKAGE_BUGREPORT=\"rt-3.0-bugs@fsck.com\" ,;t t
+s,@DEFS@,-DPACKAGE_NAME=\"RT\" -DPACKAGE_TARNAME=\"rt\" -DPACKAGE_VERSION=\"3.4.5\" -DPACKAGE_STRING=\"RT\ 3.4.5\" -DPACKAGE_BUGREPORT=\"rt-bugs@fsck.com\" ,;t t
 s,@ECHO_C@,,;t t
 s,@ECHO_N@,-n,;t t
 s,@ECHO_T@,,;t t
 s,@LIBS@,,;t t
 s,@rt_version_major@,3,;t t
 s,@ECHO_C@,,;t t
 s,@ECHO_N@,-n,;t t
 s,@ECHO_T@,,;t t
 s,@LIBS@,,;t t
 s,@rt_version_major@,3,;t t
-s,@rt_version_minor@,0,;t t
-s,@rt_version_patch@,9,;t t
+s,@rt_version_minor@,4,;t t
+s,@rt_version_patch@,5,;t t
 s,@INSTALL_PROGRAM@,${INSTALL},;t t
 s,@INSTALL_SCRIPT@,${INSTALL},;t t
 s,@INSTALL_DATA@,${INSTALL} -m 644,;t t
 s,@INSTALL_PROGRAM@,${INSTALL},;t t
 s,@INSTALL_SCRIPT@,${INSTALL},;t t
 s,@INSTALL_DATA@,${INSTALL} -m 644,;t t
+s,@AWK@,gawk,;t t
 s,@PERL@,/usr/bin/perl,;t t
 s,@SPEEDY_BIN@,/usr/local/bin/speedy,;t t
 s,@exp_prefix@,/opt/rt3,;t t
 s,@PERL@,/usr/bin/perl,;t t
 s,@SPEEDY_BIN@,/usr/local/bin/speedy,;t t
 s,@exp_prefix@,/opt/rt3,;t t
@@ -453,15 +492,15 @@ s,@exp_sysconfdir@,/opt/rt3/etc,;t t
 s,@exp_mandir@,/opt/rt3/man,;t t
 s,@exp_libdir@,/opt/rt3/lib,;t t
 s,@exp_datadir@,/opt/rt3/share,;t t
 s,@exp_mandir@,/opt/rt3/man,;t t
 s,@exp_libdir@,/opt/rt3/lib,;t t
 s,@exp_datadir@,/opt/rt3/share,;t t
-s,@htmldir@,/opt/rt3/share/html,;t t
-s,@exp_htmldir@,/opt/rt3/share/html,;t t
+s,@htmldir@,/var/www/freeside/rt,;t t
+s,@exp_htmldir@,/var/www/freeside/rt,;t t
 s,@manualdir@,/opt/rt3/share/doc,;t t
 s,@exp_manualdir@,/opt/rt3/share/doc,;t t
 s,@exp_localstatedir@,/opt/rt3/var,;t t
 s,@logfiledir@,/opt/rt3/var/log,;t t
 s,@exp_logfiledir@,/opt/rt3/var/log,;t t
 s,@manualdir@,/opt/rt3/share/doc,;t t
 s,@exp_manualdir@,/opt/rt3/share/doc,;t t
 s,@exp_localstatedir@,/opt/rt3/var,;t t
 s,@logfiledir@,/opt/rt3/var/log,;t t
 s,@exp_logfiledir@,/opt/rt3/var/log,;t t
-s,@masonstatedir@,/opt/rt3/var/mason_data,;t t
-s,@exp_masonstatedir@,/opt/rt3/var/mason_data,;t t
+s,@masonstatedir@,/usr/local/etc/freeside/masondata,;t t
+s,@exp_masonstatedir@,/usr/local/etc/freeside/masondata,;t t
 s,@sessionstatedir@,/opt/rt3/var/session_data,;t t
 s,@exp_sessionstatedir@,/opt/rt3/var/session_data,;t t
 s,@customdir@,/opt/rt3/local,;t t
 s,@sessionstatedir@,/opt/rt3/var/session_data,;t t
 s,@exp_sessionstatedir@,/opt/rt3/var/session_data,;t t
 s,@customdir@,/opt/rt3/local,;t t
@@ -474,25 +513,27 @@ s,@customlexdir@,/opt/rt3/local/po,;t t
 s,@exp_customlexdir@,/opt/rt3/local/po,;t t
 s,@customlibdir@,/opt/rt3/local/lib,;t t
 s,@exp_customlibdir@,/opt/rt3/local/lib,;t t
 s,@exp_customlexdir@,/opt/rt3/local/po,;t t
 s,@customlibdir@,/opt/rt3/local/lib,;t t
 s,@exp_customlibdir@,/opt/rt3/local/lib,;t t
-s,@rt_layout_name@,RT3,;t t
-s,@RTGROUP@,rt,;t t
+s,@rt_layout_name@,Freeside,;t t
 s,@BIN_OWNER@,root,;t t
 s,@LIBS_OWNER@,root,;t t
 s,@LIBS_GROUP@,bin,;t t
 s,@BIN_OWNER@,root,;t t
 s,@LIBS_OWNER@,root,;t t
 s,@LIBS_GROUP@,bin,;t t
-s,@DB_TYPE@,mysql,;t t
-s,@ORACLE_ENV_PREF@,,;t t
+s,@DB_TYPE@,Pg,;t t
+s,@DATABASE_ENV_PREF@,,;t t
 s,@DB_HOST@,localhost,;t t
 s,@DB_PORT@,,;t t
 s,@DB_RT_HOST@,localhost,;t t
 s,@DB_HOST@,localhost,;t t
 s,@DB_PORT@,,;t t
 s,@DB_RT_HOST@,localhost,;t t
-s,@DB_DBA@,root,;t t
-s,@DB_DATABASE@,rt3,;t t
-s,@DB_RT_USER@,rt_user,;t t
-s,@DB_RT_PASS@,rt_pass,;t t
-s,@WEB_USER@,www,;t t
-s,@WEB_GROUP@,www,;t t
+s,@DB_DBA@,freeside,;t t
+s,@DB_DATABASE@,freeside,;t t
+s,@DB_RT_USER@,freeside,;t t
+s,@DB_RT_PASS@,,;t t
+s,@WEB_USER@,freeside,;t t
+s,@WEB_GROUP@,freeside,;t t
+s,@RTGROUP@,freeside,;t t
+s,@APACHECTL@,/usr/sbin/apachectl,;t t
+s,@RT_DEVEL_MODE@,0,;t t
 s,@RT_VERSION_MAJOR@,3,;t t
 s,@RT_VERSION_MAJOR@,3,;t t
-s,@RT_VERSION_MINOR@,0,;t t
-s,@RT_VERSION_PATCH@,9,;t t
+s,@RT_VERSION_MINOR@,4,;t t
+s,@RT_VERSION_PATCH@,5,;t t
 s,@RT_PATH@,/opt/rt3,;t t
 s,@RT_DOC_PATH@,/opt/rt3/share/doc,;t t
 s,@RT_LOCAL_PATH@,/opt/rt3/local,;t t
 s,@RT_PATH@,/opt/rt3,;t t
 s,@RT_DOC_PATH@,/opt/rt3/share/doc,;t t
 s,@RT_LOCAL_PATH@,/opt/rt3/local,;t t
@@ -503,15 +544,17 @@ s,@RT_BIN_PATH@,/opt/rt3/bin,;t t
 s,@RT_SBIN_PATH@,/opt/rt3/sbin,;t t
 s,@RT_VAR_PATH@,/opt/rt3/var,;t t
 s,@RT_MAN_PATH@,/opt/rt3/man,;t t
 s,@RT_SBIN_PATH@,/opt/rt3/sbin,;t t
 s,@RT_VAR_PATH@,/opt/rt3/var,;t t
 s,@RT_MAN_PATH@,/opt/rt3/man,;t t
-s,@MASON_DATA_PATH@,/opt/rt3/var/mason_data,;t t
+s,@MASON_DATA_PATH@,/usr/local/etc/freeside/masondata,;t t
 s,@MASON_SESSION_PATH@,/opt/rt3/var/session_data,;t t
 s,@MASON_SESSION_PATH@,/opt/rt3/var/session_data,;t t
-s,@MASON_HTML_PATH@,/opt/rt3/share/html,;t t
+s,@MASON_HTML_PATH@,/var/www/freeside/rt,;t t
 s,@LOCAL_ETC_PATH@,/opt/rt3/local/etc,;t t
 s,@MASON_LOCAL_HTML_PATH@,/opt/rt3/local/html,;t t
 s,@LOCAL_LEXICON_PATH@,/opt/rt3/local/po,;t t
 s,@LOCAL_LIB_PATH@,/opt/rt3/local/lib,;t t
 s,@DESTDIR@,/opt/rt3,;t t
 s,@RT_LOG_PATH@,/opt/rt3/var/log,;t t
 s,@LOCAL_ETC_PATH@,/opt/rt3/local/etc,;t t
 s,@MASON_LOCAL_HTML_PATH@,/opt/rt3/local/html,;t t
 s,@LOCAL_LEXICON_PATH@,/opt/rt3/local/po,;t t
 s,@LOCAL_LIB_PATH@,/opt/rt3/local/lib,;t t
 s,@DESTDIR@,/opt/rt3,;t t
 s,@RT_LOG_PATH@,/opt/rt3/var/log,;t t
+s,@LIBOBJS@,,;t t
+s,@LTLIBOBJS@,,;t t
 CEOF
 
   # Split the substitutions into bite-sized pieces for seds with
 CEOF
 
   # Split the substitutions into bite-sized pieces for seds with
@@ -538,9 +581,9 @@ CEOF
       (echo ':t
   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
       if test -z "$ac_sed_cmds"; then
       (echo ':t
   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
       if test -z "$ac_sed_cmds"; then
-       ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+       ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
       else
       else
-       ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+       ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
       fi
       ac_sed_frag=`expr $ac_sed_frag + 1`
       ac_beg=$ac_end
       fi
       ac_sed_frag=`expr $ac_sed_frag + 1`
       ac_beg=$ac_end
@@ -556,46 +599,51 @@ for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
   case $ac_file in
   - | *:- | *:-:* ) # input from stdin
   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
   case $ac_file in
   - | *:- | *:-:* ) # input from stdin
-        cat >$tmp/stdin
-        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+       cat >$tmp/stdin
+       ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+       ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+       ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
   * )   ac_file_in=$ac_file.in ;;
   esac
 
   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
   * )   ac_file_in=$ac_file.in ;;
   esac
 
   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-         X"$ac_file" : 'X\(//\)[^/]' \| \
-         X"$ac_file" : 'X\(//\)$' \| \
-         X"$ac_file" : 'X\(/\)' \| \
-         .     : '\(.\)' 2>/dev/null ||
+        X"$ac_file" : 'X\(//\)[^/]' \| \
+        X"$ac_file" : 'X\(//\)$' \| \
+        X"$ac_file" : 'X\(/\)' \| \
+        .     : '\(.\)' 2>/dev/null ||
 echo X"$ac_file" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
          /^X\(\/\/\)$/{ s//\1/; q; }
          /^X\(\/\).*/{ s//\1/; q; }
          s/.*/./; q'`
 echo X"$ac_file" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
          /^X\(\/\/\)$/{ s//\1/; q; }
          /^X\(\/\).*/{ s//\1/; q; }
          s/.*/./; q'`
-  { case "$ac_dir" in
-  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
-  *)                      as_incr_dir=.;;
-esac
-as_dummy="$ac_dir"
-for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
-  case $as_mkdir_dir in
-    # Skip DOS drivespec
-    ?:) as_incr_dir=$as_mkdir_dir ;;
-    *)
-      as_incr_dir=$as_incr_dir/$as_mkdir_dir
-      test -d "$as_incr_dir" ||
-        mkdir "$as_incr_dir" ||
-       { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
-   { (exit 1); exit 1; }; }
-    ;;
-  esac
-done; }
+  { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_dir" : 'X\(//\)[^/]' \| \
+        X"$as_dir" : 'X\(//\)$' \| \
+        X"$as_dir" : 'X\(/\)' \| \
+        .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+         /^X\(\/\/\)$/{ s//\1/; q; }
+         /^X\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
 
   ac_builddir=.
 
 
   ac_builddir=.
 
@@ -622,12 +670,45 @@ case $srcdir in
     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
     ac_top_srcdir=$ac_top_builddir$srcdir ;;
 esac
     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
     ac_top_srcdir=$ac_top_builddir$srcdir ;;
 esac
-# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
-# absolute.
-ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
-ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
-ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
-ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
 
 
   case $INSTALL in
 
 
   case $INSTALL in
@@ -635,11 +716,6 @@ ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
   esac
 
   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
   esac
 
-  if test x"$ac_file" != x-; then
-    { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-    rm -f "$ac_file"
-  fi
   # Let's still pretend it is `configure' which instantiates (i.e., don't
   # use $as_me), people would be surprised to read:
   #    /* config.h.  Generated by config.status.  */
   # Let's still pretend it is `configure' which instantiates (i.e., don't
   # use $as_me), people would be surprised to read:
   #    /* config.h.  Generated by config.status.  */
@@ -649,7 +725,7 @@ echo "$as_me: creating $ac_file" >&6;}
     configure_input="$ac_file.  "
   fi
   configure_input=$configure_input"Generated from `echo $ac_file_in |
     configure_input="$ac_file.  "
   fi
   configure_input=$configure_input"Generated from `echo $ac_file_in |
-                                     sed 's,.*/,,'` by configure."
+                                    sed 's,.*/,,'` by configure."
 
   # First look for the input files in the build tree, otherwise in the
   # src tree.
 
   # First look for the input files in the build tree, otherwise in the
   # src tree.
@@ -658,33 +734,39 @@ echo "$as_me: creating $ac_file" >&6;}
       case $f in
       -) echo $tmp/stdin ;;
       [\\/$]*)
       case $f in
       -) echo $tmp/stdin ;;
       [\\/$]*)
-         # Absolute (can't be DOS-style, as IFS=:)
-         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+        # Absolute (can't be DOS-style, as IFS=:)
+        test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
-         echo $f;;
+        echo "$f";;
       *) # Relative
       *) # Relative
-         if test -f "$f"; then
-           # Build tree
-           echo $f
-         elif test -f "$srcdir/$f"; then
-           # Source tree
-           echo $srcdir/$f
-         else
-           # /dev/null tree
-           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+        if test -f "$f"; then
+          # Build tree
+          echo "$f"
+        elif test -f "$srcdir/$f"; then
+          # Source tree
+          echo "$srcdir/$f"
+        else
+          # /dev/null tree
+          { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
-         fi;;
+        fi;;
       esac
     done` || { (exit 1); exit 1; }
       esac
     done` || { (exit 1); exit 1; }
-  sed "/^[     ]*VPATH[        ]*=/{
+
+  if test x"$ac_file" != x-; then
+    { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    rm -f "$ac_file"
+  fi
+  sed "/^[      ]*VPATH[        ]*=/{
 s/:*\$(srcdir):*/:/;
 s/:*\${srcdir}:*/:/;
 s/:*@srcdir@:*/:/;
 s/:*\$(srcdir):*/:/;
 s/:*\${srcdir}:*/:/;
 s/:*@srcdir@:*/:/;
-s/^\([^=]*=[   ]*\):*/\1/;
+s/^\([^=]*=[    ]*\):*/\1/;
 s/:*$//;
 s/:*$//;
-s/^[^=]*=[     ]*$//;
+s/^[^=]*=[      ]*$//;
 }
 
 :t
 }
 
 :t
@@ -708,6 +790,27 @@ s,@INSTALL@,$ac_INSTALL,;t t
     rm -f $tmp/out
   fi
 
     rm -f $tmp/out
   fi
 
+  # Run the commands associated with the file.
+  case $ac_file in
+    sbin/rt-dump-database ) chmod ug+x $ac_file
+                ;;
+    sbin/rt-setup-database ) chmod ug+x $ac_file
+                ;;
+    sbin/rt-test-dependencies ) chmod ug+x $ac_file
+                ;;
+    bin/mason_handler.fcgi ) chmod ug+x $ac_file
+                ;;
+    bin/mason_handler.scgi ) chmod ug+x $ac_file
+                ;;
+    bin/standalone_httpd ) chmod ug+x $ac_file
+                ;;
+    bin/rt-crontool ) chmod ug+x $ac_file
+                ;;
+    bin/rt-mailgate ) chmod ug+x $ac_file
+                ;;
+    bin/rt ) chmod ug+x $ac_file
+                ;;
+  esac
 done
 
 { (exit 0); exit 0; }
 done
 
 { (exit 0); exit 0; }
index 5386a8e..6267af5 100644 (file)
@@ -17,7 +17,7 @@ use RT::Config;
 
 # {{{ Base Configuration
 
 
 # {{{ Base Configuration
 
-# $rtname the string that RT will look for in mail messages to
+# $rtname is the string that RT will look for in mail messages to
 # figure out what ticket a new piece of mail belongs to
 
 # Your domain name is recommended, so as not to pollute the namespace.
 # figure out what ticket a new piece of mail belongs to
 
 # Your domain name is recommended, so as not to pollute the namespace.
@@ -26,6 +26,28 @@ use RT::Config;
 
 Set($rtname , "example.com");
 
 
 Set($rtname , "example.com");
 
+
+# This regexp controls what subject tags RT recognizes as its own.
+# If you're not dealing with historical $rtname values, you'll likely
+# never have to enable this feature.
+#
+# Be VERY CAREFUL with it. Note that it overrides $rtname for subject
+# token matching and that you should use only "non-capturing" parenthesis
+# grouping. For example:
+#
+#      Set($EmailSubjectTagRegex, qr/(?:example.com|example.org)/i );
+#
+# and NOT
+# 
+#      Set($EmailSubjectTagRegex, qr/(example.com|example.org)/i );
+#
+# This setting would make RT behave exactly as it does without the 
+# setting enabled.
+#
+# Set($EmailSubjectTagRegex, qr/\Q$rtname\E/i );
+
+
+
 # You should set this to your organization's DNS domain. For example,
 # fsck.com or asylum.arkham.ma.us. It's used by the linking interface to
 # guarantee that ticket URIs are unique and easy to construct.
 # You should set this to your organization's DNS domain. For example,
 # fsck.com or asylum.arkham.ma.us. It's used by the linking interface to
 # guarantee that ticket URIs are unique and easy to construct.
@@ -42,14 +64,12 @@ Set($Timezone , 'US/Eastern');
 
 # }}}
 
 
 # }}}
 
-# }}}
-
 # {{{ Database Configuration
 
 # Database driver beeing used. Case matters
 # Valid types are "mysql", "Oracle" and "Pg"
 
 # {{{ Database Configuration
 
 # Database driver beeing used. Case matters
 # Valid types are "mysql", "Oracle" and "Pg"
 
-Set($DatabaseType , 'mysql');
+Set($DatabaseType , 'Pg');
 
 # The domain name of your database server
 # If you're running mysql and it's on localhost,
 
 # The domain name of your database server
 # If you're running mysql and it's on localhost,
@@ -62,13 +82,13 @@ Set($DatabaseRTHost , 'localhost');
 Set($DatabasePort , '');
 
 #The name of the database user (inside the database)
 Set($DatabasePort , '');
 
 #The name of the database user (inside the database)
-Set($DatabaseUser , 'rt_user');
+Set($DatabaseUser , 'freeside');
 
 # Password the DatabaseUser should use to access the database
 
 # Password the DatabaseUser should use to access the database
-Set($DatabasePassword , 'rt_pass');
+Set($DatabasePassword , '');
 
 # The name of the RT's database on your database server
 
 # The name of the RT's database on your database server
-Set($DatabaseName , 'rt3');
+Set($DatabaseName , 'freeside');
 
 # If you're using Postgres and have compiled in SSL support,
 # set DatabaseRequireSSL to 1 to turn on SSL communication
 
 # If you're using Postgres and have compiled in SSL support,
 # set DatabaseRequireSSL to 1 to turn on SSL communication
@@ -89,7 +109,7 @@ Set($OwnerEmail , 'root');
 
 Set($LoopsToRTOwner , 1);
 
 
 Set($LoopsToRTOwner , 1);
 
-# If $StoreLoopss is defined, RT will record messages that it believes
+# If $StoreLoops is defined, RT will record messages that it believes
 # to be part of mail loops.
 # As it does this, it will try to be careful not to send mail to the
 # sender of these messages
 # to be part of mail loops.
 # As it does this, it will try to be careful not to send mail to the
 # sender of these messages
@@ -106,12 +126,12 @@ Set($StoreLoops , undef);
 Set($MaxAttachmentSize , 10000000);
 
 # $TruncateLongAttachments: if this is set to a non-undef value,
 Set($MaxAttachmentSize , 10000000);
 
 # $TruncateLongAttachments: if this is set to a non-undef value,
-# RT will truncate attachments longer than MaxAttachmentLength.
+# RT will truncate attachments longer than MaxAttachmentSize.
 
 Set($TruncateLongAttachments , undef);
 
 # $DropLongAttachments: if this is set to a non-undef value,
 
 Set($TruncateLongAttachments , undef);
 
 # $DropLongAttachments: if this is set to a non-undef value,
-# RT will silently drop attachments longer than MaxAttachmentLength.
+# RT will silently drop attachments longer than MaxAttachmentSize.
 
 Set($DropLongAttachments , undef);
 
 
 Set($DropLongAttachments , undef);
 
@@ -135,8 +155,12 @@ Set($RTAddressRegexp , '^rt\@example.com$');
 # (These values are passed to the CanonicalizeEmailAddress subroutine in RT/User.pm)
 # By default, that routine performs a s/$Match/$Replace/gi on any address passed to it
 
 # (These values are passed to the CanonicalizeEmailAddress subroutine in RT/User.pm)
 # By default, that routine performs a s/$Match/$Replace/gi on any address passed to it
 
-Set($CanonicalizeEmailAddressMatch   , 'subdomain.example.com$');
-Set($CanonicalizeEmailAddressReplace , 'example.com');
+#Set($CanonicalizeEmailAddressMatch , '@subdomain\.example\.com$');
+#Set($CanonicalizeEmailAddressReplace , '@example.com');
+
+# set this to true and the create new user page will use the values that you
+# enter in the form but use the function CanonicalizeUserInfo in User_Local.pm
+Set($CanonicalizeOnCreate , 0);
 
 # If $SenderMustExistInExternalDatabase is true, RT will refuse to
 # create non-privileged accounts for unknown users if you are using
 
 # If $SenderMustExistInExternalDatabase is true, RT will refuse to
 # create non-privileged accounts for unknown users if you are using
@@ -175,7 +199,7 @@ Set($CommentAddress , 'RT_CommentAddressNotSet');
 # If 'sendmailpipe' doesn't work well for you, try 'sendmail'
 #
 # Note that you should remove the '-t' from $SendmailArguments
 # If 'sendmailpipe' doesn't work well for you, try 'sendmail'
 #
 # Note that you should remove the '-t' from $SendmailArguments
-# if you use 'sendmail rather than 'sendmailpipe'
+# if you use 'sendmail' rather than 'sendmailpipe'
 
 Set($MailCommand , 'sendmailpipe');
 
 
 Set($MailCommand , 'sendmailpipe');
 
@@ -186,6 +210,11 @@ Set($MailCommand , 'sendmailpipe');
 # These options are good for most sendmail wrappers and workalikes
 Set($SendmailArguments , "-oi -t");
 
 # These options are good for most sendmail wrappers and workalikes
 Set($SendmailArguments , "-oi -t");
 
+# $SendmailBounceArguments defines what flags to pass to $Sendmail
+# assuming RT needs to send an error (ie. bounce).
+
+Set($SendmailBounceArguments , '-f "<>"');
+
 # These arguments are good for sendmail brand sendmail 8 and newer
 #Set($SendmailArguments,"-oi -t -ODeliveryMode=b -OErrorMode=m");
 
 # These arguments are good for sendmail brand sendmail 8 and newer
 #Set($SendmailArguments,"-oi -t -ODeliveryMode=b -OErrorMode=m");
 
@@ -216,12 +245,15 @@ Set($UseFriendlyToLine , 0);
 # are WatcherType and TicketId.
 Set($FriendlyToLineFormat, "\"%s of $RT::rtname Ticket #%s\":;");
 
 # are WatcherType and TicketId.
 Set($FriendlyToLineFormat, "\"%s of $RT::rtname Ticket #%s\":;");
 
-# By default RT doesn't notify the person who performs an update, as they
+# By default, RT doesn't notify the person who performs an update, as they
 # already know what they've done. If you'd like to change this behaviour,
 # Set $NotifyActor to 1
 
 Set($NotifyActor, 0);
 
 # already know what they've done. If you'd like to change this behaviour,
 # Set $NotifyActor to 1
 
 Set($NotifyActor, 0);
 
+# By default, RT records each message it sends out to its own internal database.# To change this behaviour, set $RecordOutgoingEmail to 0 
+
+Set($RecordOutgoingEmail, 1);
 
 # }}}
 
 
 # }}}
 
@@ -247,6 +279,14 @@ Set($LogToFile      , undef);
 Set($LogDir, '/opt/rt3/var/log');
 Set($LogToFileNamed , "rt.log");    #log to rt.log
 
 Set($LogDir, '/opt/rt3/var/log');
 Set($LogToFileNamed , "rt.log");    #log to rt.log
 
+# On Solaris or UnixWare, set to ( socket => 'inet' ).  Options here
+# override any other options RT passes to Log::Dispatch::Syslog.
+# Other interesting flags include facility and logopt.  (See the
+# Log::Dispatch::Syslog documentation for more information.)  (Maybe
+# ident too, if you have multiple RT installations.)
+
+@LogToSyslogConf = () unless (@LogToSyslogConf);
+
 # }}}
 
 # {{{ Web interface configuration
 # }}}
 
 # {{{ Web interface configuration
@@ -263,17 +303,22 @@ Set($WebPath , "");
 # This is the Scheme, server and port for constructing urls to webrt
 # $WebBaseURL doesn't need a trailing /
 
 # This is the Scheme, server and port for constructing urls to webrt
 # $WebBaseURL doesn't need a trailing /
 
-Set($WebBaseURL , "http://RT::WebBaseURL.not.configured:80");
+Set($WebBaseURL , "http://localhost");
 
 Set($WebURL , $WebBaseURL . $WebPath . "/");
 
 # $WebImagesURL points to the base URL where RT can find its images.
 
 
 Set($WebURL , $WebBaseURL . $WebPath . "/");
 
 # $WebImagesURL points to the base URL where RT can find its images.
 
-Set($WebImagesURL , $WebURL . "NoAuth/images/");
+Set($WebImagesURL , $WebPath . "/NoAuth/images/");
 
 
-# $RTLogoURL points to the URL of the RT logo displayed in the web UI
+# $LogoURL points to the URL of the RT logo displayed in the web UI
 
 
-Set($LogoURL , $WebImagesURL . "rt.jpg");
+Set($LogoURL , $WebImagesURL . "bplogo.gif");
+
+# WebNoAuthRegex - What portion of RT's URLspace should not require
+# authentication.
+Set($WebNoAuthRegex, qr!^(?:/+NoAuth/|
+                            /+REST/\d+\.\d+/NoAuth/)!x );
 
 # For message boxes, set the entry box width and what type of wrapping
 # to use.
 
 # For message boxes, set the entry box width and what type of wrapping
 # to use.
@@ -289,6 +334,20 @@ Set($MessageBoxWrap, "HARD");
 # sent in a request (although there is probably more to it than that)
 Set($TrustHTMLAttachments , undef);
 
 # sent in a request (although there is probably more to it than that)
 Set($TrustHTMLAttachments , undef);
 
+# Should RT redistribute correspondence that it identifies as
+# machine generated? A true value (the default) will do so, setting
+# this to '0' will cause no such messages to be redistributed.
+# You can also use 'privileged', which will redistribute only to
+# privileged users. This is seful if you get malformed bounces caused by
+# autocreated requestors with bogus addresses.
+Set($RedistributeAutoGeneratedMessages, 1);
+
+# If PreferRichText is set to a true value, RT will show HTML/Rich text
+# messages in preference to their plaintext alternatives. RT "scrubs" the 
+# html to show only a minimal subset of HTML to avoid possible contamination
+# by cross-site-scripting attacks.
+Set($PreferRichText, undef);
+
 # If $WebExternalAuth is defined, RT will defer to the environment's
 # REMOTE_USER variable.
 
 # If $WebExternalAuth is defined, RT will defer to the environment's
 # REMOTE_USER variable.
 
@@ -316,32 +375,66 @@ Set($WebExternalAuto , undef);
 
 # Set($WebSessionClass , 'Apache::Session::File');
 
 
 # Set($WebSessionClass , 'Apache::Session::File');
 
+# By default, RT clears its database cache after every page view.
+# This ensures that you've always got the most current information 
+# when working in a multi-process (mod_perl or FastCGI) Environment
+# Setting $WebFlushDbCacheEveryRequest to '0' will turn this off,
+# which will speed RT up a bit, at the expense of a tiny bit of data 
+# accuracy
+
+Set($WebFlushDbCacheEveryRequest, '1');
+
+
 # $MaxInlineBody is the maximum attachment size that we want to see
 # inline when viewing a transaction. 13456 is a random sane-sounding
 # default.
 
 Set($MaxInlineBody, 13456);
 
 # $MaxInlineBody is the maximum attachment size that we want to see
 # inline when viewing a transaction. 13456 is a random sane-sounding
 # default.
 
 Set($MaxInlineBody, 13456);
 
-# $MyTicketsLength is the length of the table on the front page.
-# For some people, the default of 10 isn't big enough to get a feel for
-# how much work needs to be done before you get some time off.
+# $MyTicketsLength is the length of the owned tickets table on the
+# front page. For some people, the default of 10 isn't big enough
+# to get a feel for how much work needs to be done before you get
+# some time off.
 
 Set($MyTicketsLength, 10);
 
 
 Set($MyTicketsLength, 10);
 
+# $MyRequestsLength is the length of the requested tickets table
+# on the front page.
+
+Set($MyRequestsLength, 10);
+
 # @MasonParameters is the list of parameters for the constructor of
 # HTML::Mason's Apache or CGI Handler.  This is normally only useful
 # @MasonParameters is the list of parameters for the constructor of
 # HTML::Mason's Apache or CGI Handler.  This is normally only useful
-# for debugging, eg. profiling individual components with
-#     (preamble => 'my $p = MasonX::Profiler->new($m, $r);');
+# for debugging, eg. profiling individual components with:
+#     use MasonX::Profiler; # available on CPAN
+#     @MasonParameters = (preamble => 'my $p = MasonX::Profiler->new($m, $r);');
 
 @MasonParameters = () unless (@MasonParameters);
 
 
 @MasonParameters = () unless (@MasonParameters);
 
+# $DefaultSearchResultFormat is the default format for RT search results
+Set ($DefaultSearchResultFormat, qq{
+   '<B><A HREF="$RT::WebPath/Ticket/Display.html?id=__id__">__id__</a></B>/TITLE:#',
+   '<B><A HREF="$RT::WebPath/Ticket/Display.html?id=__id__">__Subject__</a></B>/TITLE:Subject',
+   Status,
+   QueueName, 
+   OwnerName, 
+   Priority, 
+   '__NEWLINE__',
+   '', 
+   '<small>__Requestors__</small>',
+   '<small>__CreatedRelative__</small>',
+   '<small>__ToldRelative__</small>',
+   '<small>__LastUpdatedRelative__</small>',
+   '<small>__TimeLeft__</small>'});
+
+
 # }}}
 
 # {{{ RT UTF-8 Settings
 
 # An array that contains languages supported by RT's internationalization
 # }}}
 
 # {{{ RT UTF-8 Settings
 
 # An array that contains languages supported by RT's internationalization
-# interface.  Defaults to all *.po lexicons; set it to qw(en ja) will make
-# RT bilingual instead of multilingual, but will save same memory.
+# interface.  Defaults to all *.po lexicons; setting it to qw(en ja) will make
+# RT bilingual instead of multilingual, but will save some memory.
 
 @LexiconLanguages = qw(*) unless (@LexiconLanguages);
 
 
 @LexiconLanguages = qw(*) unless (@LexiconLanguages);
 
@@ -371,4 +464,40 @@ Set($AmbiguousDayInPast , 1);
 
 # }}}
 
 
 # }}}
 
+# {{{ Miscellaneous RT Settings
+
+# You can define new statuses and even reorder existing statuses here.
+# WARNING. DO NOT DELETE ANY OF THE DEFAULT STATUSES. If you do, RT
+# will break horribly.
+
+@ActiveStatus = qw(new open stalled) unless @ActiveStatus;
+@InactiveStatus = qw(resolved rejected deleted) unless @InactiveStatus;
+
+# Backward compatability setting. Add/Delete Link used to record one
+# transaction and run one scrip. Set this value to 0 if you want
+# both link transactions to have a scrip run.
+Set($LinkTransactionsRun1Scrip , 1);
+
+# }}}
+
+
+# {{{ Development Mode
+#
+# RT comes with a "Development mode" setting. 
+# This setting, as a convenience for developers, turns on 
+# all sorts of development options that you most likely don't want in 
+# production:
+#
+# * Turns off Mason's 'static_source' directive. By default, you can't 
+#   edit RT's web ui components on the fly and have RT magically pick up
+#   your changes. (It's a big performance hit)
+#
+#  * More to come
+#
+
+Set($DevelMode, '0');
+
+# }}}
+
+
 1;
 1;
index 90c332b..7719be1 100644 (file)
@@ -1,29 +1,48 @@
-# BEGIN LICENSE BLOCK
+# BEGIN BPS TAGGED BLOCK {{{
 # 
 # 
-# Copyright (c) 1996-2002 Jesse Vincent <jesse@bestpractical.com>
+# COPYRIGHT:
+#  
+# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC 
+#                                          <jesse@bestpractical.com>
 # 
 # 
-# (Except where explictly superceded by other copyright notices)
+# (Except where explicitly superseded by other copyright notices)
+# 
+# 
+# LICENSE:
 # 
 # This work is made available to you under the terms of Version 2 of
 # the GNU General Public License. A copy of that license should have
 # been provided with this software, but in any event can be snarfed
 # 
 # This work is made available to you under the terms of Version 2 of
 # the GNU General Public License. A copy of that license should have
 # been provided with this software, but in any event can be snarfed
-# from www.gnu.org
+# from www.gnu.org.
 # 
 # This work is distributed in the hope that it will be useful, but
 # WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 # General Public License for more details.
 # 
 # 
 # This work is distributed in the hope that it will be useful, but
 # WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 # General Public License for more details.
 # 
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 # 
 # 
-# Unless otherwise specified, all modifications, corrections or
-# extensions to this work which alter its source code become the
-# property of Best Practical Solutions, LLC when submitted for
-# inclusion in the work.
 # 
 # 
+# CONTRIBUTION SUBMISSION POLICY:
 # 
 # 
-# END LICENSE BLOCK
-
-
+# (The following paragraph is not intended to limit the rights granted
+# to you to modify and distribute this software under the terms of
+# the GNU General Public License and is only of importance to you if
+# you choose to contribute your changes and enhancements to the
+# community by submitting them to Best Practical Solutions, LLC.)
+# 
+# By intentionally submitting any modifications, corrections or
+# derivatives to this work, or any other work intended for use with
+# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+# you are the copyright holder for those contributions and you grant
+# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
+# royalty-free, perpetual, license to use, copy, create derivative
+# works based on those contributions, and sublicense and distribute
+# those contributions and any derivatives thereof.
+# 
+# END BPS TAGGED BLOCK }}}
 package RT;
 use strict;
 use RT::I18N;
 package RT;
 use strict;
 use RT::I18N;
@@ -33,7 +52,6 @@ use RT::System;
 use vars qw($VERSION $System $SystemUser $Nobody $Handle $Logger
         $CORE_CONFIG_FILE
         $SITE_CONFIG_FILE
 use vars qw($VERSION $System $SystemUser $Nobody $Handle $Logger
         $CORE_CONFIG_FILE
         $SITE_CONFIG_FILE
-        $VENDOR_CONFIG_FILE
         $BasePath
         $EtcPath
         $VarPath
         $BasePath
         $EtcPath
         $VarPath
@@ -41,19 +59,23 @@ use vars qw($VERSION $System $SystemUser $Nobody $Handle $Logger
         $LocalEtcPath
         $LocalLexiconPath
         $LogDir
         $LocalEtcPath
         $LocalLexiconPath
         $LogDir
+        $BinPath
         $MasonComponentRoot
         $MasonLocalComponentRoot
         $MasonDataDir
         $MasonSessionDir
 );
 
         $MasonComponentRoot
         $MasonLocalComponentRoot
         $MasonDataDir
         $MasonSessionDir
 );
 
-$VERSION = '3.0.4';
+$VERSION = '3.4.5';
 $CORE_CONFIG_FILE = "/opt/rt3/etc/RT_Config.pm";
 $SITE_CONFIG_FILE = "/opt/rt3/etc/RT_SiteConfig.pm";
 
 $CORE_CONFIG_FILE = "/opt/rt3/etc/RT_Config.pm";
 $SITE_CONFIG_FILE = "/opt/rt3/etc/RT_SiteConfig.pm";
 
+
+
 $BasePath = '/opt/rt3';
 
 $EtcPath = '/opt/rt3/etc';
 $BasePath = '/opt/rt3';
 
 $EtcPath = '/opt/rt3/etc';
+$BinPath = '/opt/rt3/bin';
 $VarPath = '/opt/rt3/var';
 $LocalPath = '/opt/rt3/local';
 $LocalEtcPath = '/opt/rt3/local/etc';
 $VarPath = '/opt/rt3/var';
 $LocalPath = '/opt/rt3/local';
 $LocalEtcPath = '/opt/rt3/local/etc';
@@ -61,7 +83,7 @@ $LocalLexiconPath = '/opt/rt3/local/po';
 
 # $MasonComponentRoot is where your rt instance keeps its mason html files
 
 
 # $MasonComponentRoot is where your rt instance keeps its mason html files
 
-$MasonComponentRoot = '/opt/rt3/share/html';
+$MasonComponentRoot = '/var/www/freeside/rt';
 
 # $MasonLocalComponentRoot is where your rt instance keeps its site-local
 # mason html files.
 
 # $MasonLocalComponentRoot is where your rt instance keeps its site-local
 # mason html files.
@@ -70,7 +92,7 @@ $MasonLocalComponentRoot = '/opt/rt3/local/html';
 
 # $MasonDataDir Where mason keeps its datafiles
 
 
 # $MasonDataDir Where mason keeps its datafiles
 
-$MasonDataDir = '/opt/rt3/var/mason_data';
+$MasonDataDir = '/usr/local/etc/freeside/masondata';
 
 # RT needs to put session data (for preserving state between connections
 # via the web interface)
 
 # RT needs to put session data (for preserving state between connections
 # via the web interface)
@@ -80,22 +102,26 @@ $MasonSessionDir = '/opt/rt3/var/session_data';
 
 =head1 NAME
 
 
 =head1 NAME
 
-       RT - Request Tracker
+RT - Request Tracker
 
 =head1 SYNOPSIS
 
 
 =head1 SYNOPSIS
 
-       A fully featured request tracker package
+A fully featured request tracker package
 
 =head1 DESCRIPTION
 
 
 =head1 DESCRIPTION
 
+=head2 LoadConfig
 
 
-=cut
-
-=item LoadConfig
+Load RT's config file.  First, the site configuration file
+(C<RT_SiteConfig.pm>) is loaded, in order to establish overall site
+settings like hostname and name of RT instance.  Then, the core
+configuration file (C<RT_Config.pm>) is loaded to set fallback values
+for all settings; it bases some values on settings from the site
+configuration file.
 
 
-Load RT's config file. First, go after the core config file. 
-After that, try to load the vendor config.
-After that, go after the site config.
+In order for the core configuration to not override the site's
+settings, the function C<Set> is used; it only sets values if they
+have not been set already.
 
 =cut
 
 
 =cut
 
@@ -110,20 +136,17 @@ sub LoadConfig {
     RT::I18N->Init;
 }
 
     RT::I18N->Init;
 }
 
-=item Init
+=head2 Init
+
+Conenct to the database, set up logging.
 
 
-    Conenct to the database, set up logging.
-    
 =cut
 
 sub Init {
 =cut
 
 sub Init {
-    require RT::Handle;
+
     #Get a database connection
     #Get a database connection
-        unless ($Handle && $Handle->dbh->ping) {
-    $Handle = RT::Handle->new();
-        } 
-    $Handle->Connect();
-    
+    ConnectToDatabase();
+
     #RT's system user is a genuine database user. its id lives here
     $SystemUser = new RT::CurrentUser();
     $SystemUser->LoadByName('RT_System');
     #RT's system user is a genuine database user. its id lives here
     $SystemUser = new RT::CurrentUser();
     $SystemUser->LoadByName('RT_System');
@@ -134,17 +157,34 @@ sub Init {
   
     $System = RT::System->new();
 
   
     $System = RT::System->new();
 
-   InitLogging(); 
+    InitClasses();
+    InitLogging(); 
 }
 
 }
 
+  
+=head2 ConnectToDatabase
+
+Get a database connection
+
+=cut
+
+sub ConnectToDatabase {
+    require RT::Handle;
+    unless ($Handle && $Handle->dbh && $Handle->dbh->ping) {
+        $Handle = RT::Handle->new();
+    } 
+    $Handle->Connect();
+}
+    
 =head2 InitLogging
 
 Create the RT::Logger object. 
 
 =cut
 =head2 InitLogging
 
 Create the RT::Logger object. 
 
 =cut
+
 sub InitLogging {
 
 sub InitLogging {
 
-    # We have to set the record seperator ($, man perlvar)
+    # We have to set the record separator ($, man perlvar)
     # or Log::Dispatch starts getting
     # really pissy, as some other module we use unsets it.
 
     # or Log::Dispatch starts getting
     # really pissy, as some other module we use unsets it.
 
@@ -156,21 +196,24 @@ sub InitLogging {
     $RT::Logger=Log::Dispatch->new();
     
     if ($RT::LogToFile) {
     $RT::Logger=Log::Dispatch->new();
     
     if ($RT::LogToFile) {
-
-    unless (-d $RT::LogDir && -w $RT::LogDir) {
-        # localizing here would be hard when we don't have a current user yet
-        # die $self->loc("Log directory [_1] not found or couldn't be written.\n RT can't run.", $RT::LogDir);
-        die ("Log directory $RT::LogDir not found or couldn't be written.\n RT can't run.");
-    }
-
-       my $filename;
+       my ($filename, $logdir);
        if ($RT::LogToFileNamed =~ m![/\\]!) {
            # looks like an absolute path.
            $filename = $RT::LogToFileNamed;
        if ($RT::LogToFileNamed =~ m![/\\]!) {
            # looks like an absolute path.
            $filename = $RT::LogToFileNamed;
+           ($logdir) = $RT::LogToFileNamed =~ m!^(.*[/\\])!;
        }
        else {
            $filename = "$RT::LogDir/$RT::LogToFileNamed";
        }
        else {
            $filename = "$RT::LogDir/$RT::LogToFileNamed";
+           $logdir = $RT::LogDir;
        }
        }
+
+    unless ( -d $logdir && ( ( -f $filename && -w $filename ) || -w $logdir ) ) {
+        # localizing here would be hard when we don't have a current user yet
+        # die $self->loc("Log directory [_1] not found or couldn't be written.\n RT can't run.", $RT::LogDir);
+        die ("Log file $filename couldn't be written or created.\n RT can't run.");
+    }
+
+    package Log::Dispatch::File;
     require Log::Dispatch::File;
 
 
     require Log::Dispatch::File;
 
 
@@ -188,6 +231,7 @@ sub InitLogging {
                       ));
     }
     if ($RT::LogToScreen) {
                       ));
     }
     if ($RT::LogToScreen) {
+       package Log::Dispatch::Screen;
        require Log::Dispatch::Screen;
        $RT::Logger->add(Log::Dispatch::Screen->new
                     ( name => 'screen',
        require Log::Dispatch::Screen;
        $RT::Logger->add(Log::Dispatch::Screen->new
                     ( name => 'screen',
@@ -201,6 +245,7 @@ sub InitLogging {
                     ));
     }
     if ($RT::LogToSyslog) {
                     ));
     }
     if ($RT::LogToSyslog) {
+       package Log::Dispatch::Syslog;
        require Log::Dispatch::Syslog;
        $RT::Logger->add(Log::Dispatch::Syslog->new
                     ( name => 'syslog',
        require Log::Dispatch::Syslog;
        $RT::Logger->add(Log::Dispatch::Syslog->new
                     ( name => 'syslog',
@@ -219,7 +264,8 @@ sub InitLogging {
                                 return "$p{message} ($filename:$line)\n"}
                                },
              
                                 return "$p{message} ($filename:$line)\n"}
                                },
              
-                      stderr => 1
+                      stderr => 1,
+               @RT::LogToSyslogConf
                     ));
     }
 
                     ));
     }
 
@@ -232,7 +278,14 @@ sub InitLogging {
 ## Mason).  It will log all problems through the standard logging
 ## mechanism (see above).
 
 ## Mason).  It will log all problems through the standard logging
 ## mechanism (see above).
 
-$SIG{__WARN__} = sub {$RT::Logger->warning($_[0])};
+$SIG{__WARN__} = sub {
+    my $w = shift;
+    $w =~ s/(?:\r*\n)+$//;
+    # The 'wide character' warnings has to be silenced for now, at least
+    # until HTML::Mason offers a sane way to process both raw output and
+    # unicode strings.
+    $RT::Logger->warning($w) if index($w, 'Wide character in ') != 0;
+};
 
 #When we call die, trap it and log->crit with the value of the die.
 
 
 #When we call die, trap it and log->crit with the value of the die.
 
@@ -252,6 +305,30 @@ $SIG{__DIE__}  = sub {
 
 }
 
 
 }
 
+=head2 InitClasses
+
+Load all modules that define base classes
+
+=cut
+
+sub InitClasses {
+    require RT::Tickets;
+    require RT::Transactions;
+    require RT::Users;
+    require RT::CurrentUser;
+    require RT::Templates;
+    require RT::Queues;
+    require RT::ScripActions;
+    require RT::ScripConditions;
+    require RT::Scrips;
+    require RT::Groups;
+    require RT::GroupMembers;
+    require RT::CustomFields;
+    require RT::CustomFieldValues;
+    require RT::ObjectCustomFields;
+    require RT::ObjectCustomFieldValues;
+}
+
 # }}}
 
 
 # }}}
 
 
@@ -263,37 +340,25 @@ sub Nobody {
     return ($Nobody);
 }
 
     return ($Nobody);
 }
 
+=head1 BUGS
 
 
-=head2 DropSetGIDPermissions
-
-Drops setgid permissions.
-
-=cut
-
-sub DropSetGIDPermissions {
-    # Now that we got the config read in, we have the database 
-    # password and don't need to be setgid
-    # make the effective group the real group
-    $) = $(;
-}
-
-
-=head1 SYNOPSIS
+Please report them to rt-bugs@fsck.com, if you know what's broken and have at least 
+some idea of what needs to be fixed.
 
 
-=head1 BUGS
+If you're not sure what's going on, report them rt-devel@lists.bestpractical.com.
 
 =head1 SEE ALSO
 
 
 =head1 SEE ALSO
 
+L<RT::StyleGuide>
+L<DBIx::SearchBuilder>
 
 =begin testing
 
 
 =begin testing
 
-
 ok ($RT::Nobody->Name() eq 'Nobody', "Nobody is nobody");
 ok ($RT::Nobody->Name() ne 'root', "Nobody isn't named root");
 ok ($RT::SystemUser->Name() eq 'RT_System', "The system user is RT_System");
 ok ($RT::SystemUser->Name() ne 'noname', "The system user isn't noname");
 
 ok ($RT::Nobody->Name() eq 'Nobody', "Nobody is nobody");
 ok ($RT::Nobody->Name() ne 'root', "Nobody isn't named root");
 ok ($RT::SystemUser->Name() eq 'RT_System', "The system user is RT_System");
 ok ($RT::SystemUser->Name() ne 'noname', "The system user isn't noname");
 
-
 =end testing
 
 =cut
 =end testing
 
 =cut
diff --git a/rt/lib/RTx/WebCronTool.pm b/rt/lib/RTx/WebCronTool.pm
new file mode 100644 (file)
index 0000000..5f086a2
--- /dev/null
@@ -0,0 +1,41 @@
+package RTx::WebCronTool;
+$RTx::WebCronTool::VERSION = "0.01";
+
+1;
+
+__END__
+
+=head1 NAME
+
+RTx::WebCronTool - Web interface to rt-crontool
+
+=head1 VERSION
+
+This document describes version 0.01 of RTx::WebCronTool, released
+July 11, 2004.
+
+=head1 DESCRIPTION
+
+This RT extension provides a web interface for the built-in F<rt-crontool>
+utility, allowing scheduled processes to be launched remotely.
+
+After installation, log in as superuser, and click on the "Web CronTool" menu
+on the bottom of the navigation pane.
+
+To use it, simply submit the modules and arguments.  All progress, error messages
+and debug information will then be displayed online.
+
+=head1 AUTHORS
+
+Autrijus Tang E<lt>autrijus@autrijus.orgE<gt>
+
+=head1 COPYRIGHT
+
+Copyright 2004 by Autrijus Tang E<lt>autrijus@autrijus.orgE<gt>.
+
+This program is free software; you can redistribute it and/or 
+modify it under the same terms as Perl itself.
+
+See L<http://www.perl.com/perl/misc/Artistic.html>
+
+=cut
index 4504cc7..4cc1318 100644 (file)
@@ -34,11 +34,14 @@ is($q2->CommentAddress, 'comment@a');
 
 
 use File::Find;
 
 
 use File::Find;
-File::Find::find({wanted => \&wanted_autogen}, 'lib/t/autogen');
+File::Find::find({wanted => \&wanted_autogen,  
+       preprocess => sub {return sort @_}}, 'lib/t/autogen');
 sub wanted_autogen { /^autogen.*\.t\z/s && require $_; }
 
 sub wanted_autogen { /^autogen.*\.t\z/s && require $_; }
 
-File::Find::find({wanted => \&wanted_regression}, 'lib/t/regression');
+File::Find::find({wanted => \&wanted_regression,
+       preprocess => sub {return sort @_}}, 'lib/t/regression');
 sub wanted_regression { /^*\.t\z/s && require $_; }
 
 require "/opt/rt3/lib/t/03web.pl";
 require "/opt/rt3/lib/t/04_send_email.pl";
 sub wanted_regression { /^*\.t\z/s && require $_; }
 
 require "/opt/rt3/lib/t/03web.pl";
 require "/opt/rt3/lib/t/04_send_email.pl";
+require "/opt/rt3/lib/t/05cronsupport.pl";
index 94ad3e9..597ad10 100644 (file)
@@ -67,7 +67,83 @@ ok( $agent->{'content'} =~ qr{$string} , "Found the content");
 
 # }}}
 
 
 # }}}
 
+# {{{ Query Builder tests
+
+my $response = $agent->get($url."Search/Build.html");
+ok( $response->is_success, "Fetched " . $url."Search/Build.html" );
+
+# Parsing TicketSQL
+#
+# Adding items
+
+# set the first value
+ok($agent->form_name('BuildQuery'));
+$agent->field("AttachmentField", "Subject");
+$agent->field("AttachmentOp", "LIKE");
+$agent->field("ValueOfAttachment", "aaa");
+$agent->submit();
+
+# set the next value
+ok($agent->form_name('BuildQuery'));
+$agent->field("AttachmentField", "Subject");
+$agent->field("AttachmentOp", "LIKE");
+$agent->field("ValueOfAttachment", "bbb");
+$agent->submit();
+
+ok($agent->form_name('BuildQuery'));
+
+# get the query
+my $query = $agent->current_form->find_input("Query")->value;
+# strip whitespace from ends
+$query =~ s/^\s*//g;
+$query =~ s/\s*$//g;
+
+# collapse other whitespace
+$query =~ s/\s+/ /g;
+
+is ($query, "Subject LIKE 'aaa' AND Subject LIKE 'bbb'");
+
+# - new items go one level down
+# - add items at currently selected level
+# - if nothing is selected, add at end, one level down
+#
+# move left
+# - error if nothing selected
+# - same item should be selected after move
+# - can't move left if you're at the top level
+#
+# move right
+# - error if nothing selected
+# - same item should be selected after move
+# - can always move right (no max depth...should there be?)
+#
+# move up
+# - error if nothing selected
+# - same item should be selected after move
+# - can't move up if you're first in the list
+#
+# move down
+# - error if nothing selected
+# - same item should be selected after move
+# - can't move down if you're last in the list
+#
+# toggle
+# - error if nothing selected
+# - change all aggregators in the grouping
+# - don't change any others
+#
+# delete
+# - error if nothing selected
+# - delete currently selected item
+# - delete all children of a grouping
+# - if delete leaves a node with no children, delete that, too
+# - what should be selected?
+#
+# Clear
+# - clears entire query
+# - clears it from the session, too
 
 
+# }}}
 
 use File::Find;
 find ( \&wanted , 'html/');
 
 use File::Find;
 find ( \&wanted , 'html/');
@@ -83,7 +159,7 @@ sub test_get {
         $file =~ s#^html/##; 
         ok ($agent->get("$url/$file", "GET $url/$file"));
         is ($agent->{'status'}, 200, "Loaded $file");
         $file =~ s#^html/##; 
         ok ($agent->get("$url/$file", "GET $url/$file"));
         is ($agent->{'status'}, 200, "Loaded $file");
-        ok( $agent->{'content'} =~ /Logout/i, "Found a logout link on $file ");
+#        ok( $agent->{'content'} =~ /Logout/i, "Found a logout link on $file ");
         ok( $agent->{'content'} !~ /Not logged in/i, "Still logged in for  $file");
         ok( $agent->{'content'} !~ /System error/i, "Didn't get a Mason compilation error on $file");
         
         ok( $agent->{'content'} !~ /Not logged in/i, "Still logged in for  $file");
         ok( $agent->{'content'} !~ /System error/i, "Didn't get a Mason compilation error on $file");
         
index c384eed..973d9d2 100644 (file)
@@ -476,6 +476,31 @@ sub crashes_redef_sendmessage {
 
 # }}}
 
 
 # }}}
 
+# {{{ test a multi-line RT-Send-CC header
+
+my $content =  `cat /opt/rt3/lib/t/data/rt-send-cc` || die "couldn't find new content";
+
+$parser->ParseMIMEEntityFromScalar($content);
+
+
+
+my %args =        (message => $content, queue => 1, action => 'correspond');
+ RT::Interface::Email::Gateway(\%args);
+my $tickets = RT::Tickets->new($RT::SystemUser);
+$tickets->OrderBy(FIELD => 'id', ORDER => 'DESC');
+$tickets->Limit(FIELD => 'id' ,OPERATOR => '>', VALUE => '0');
+my $tick = $tickets->First();
+ok ($tick->Id, "found ticket ".$tick->Id);
+
+my $cc = $tick->Transactions->First->Attachments->First->GetHeader('RT-Send-Cc');
+ok ($cc =~ /test1/, "Found test 1");
+ok ($cc =~ /test2/, "Found test 2");
+ok ($cc =~ /test3/, "Found test 3");
+ok ($cc =~ /test4/, "Found test 4");
+ok ($cc =~ /test5/, "Found test 5");
+
+# }}}
+
 # Don't taint the environment
 $everyone->PrincipalObj->RevokeRight(Right =>'SuperUser');
 1;
 # Don't taint the environment
 $everyone->PrincipalObj->RevokeRight(Right =>'SuperUser');
 1;