Browse Source

finally upgrade to RT 3.6 (including SQLite support ;-)

Ralf S. Engelschall 19 years ago
parent
commit
998354919d
7 changed files with 137 additions and 153 deletions
  1. 19 20
      rt/config.layout
  2. 39 23
      rt/rc.rt
  3. 1 1
      rt/rt-mailgate.sh
  4. 16 48
      rt/rt.patch
  5. 40 44
      rt/rt.spec
  6. 19 16
      rt/rtapache.conf
  7. 3 1
      rt/rtsetup

+ 19 - 20
rt/config.layout

@@ -1,22 +1,21 @@
-#   OpenPKG RT3 path layout.
+#   OpenPKG RT3 path layout
 <Layout OPKG>
 <Layout OPKG>
-  prefix:		@l_prefix@
-  exec_prefix:		${prefix}
-  bindir:		${exec_prefix}/bin
-  sbindir:		${exec_prefix}/libexec/rt/tools
-  sysconfdir:		${prefix}/libexec/rt/etc
-  mandir:		${prefix}/man
-  libdir:		${prefix}/libexec/rt
-  datadir:		${prefix}/share/rt
-  htmldir:		${libdir}/WebRT/html
-  manualdir:		${datadir}
-  localstatedir:	${prefix}/var/rt
-  logfiledir:		${localstatedir}/log
-  masonstatedir:	${localstatedir}/mason-data
-  sessionstatedir:	${localstatedir}/mason-session
-  customdir:		${prefix}/libexec/rt/local
-  customhtmldir:	${customdir}/html
-  customlexdir:		${customdir}/po
-  customlibdir:		${customdir}/lib
+  prefix:               @l_prefix@
+  exec_prefix:          ${prefix}
+  bindir:               ${exec_prefix}/bin
+  sbindir:              ${exec_prefix}/libexec/rt/tools
+  sysconfdir:           ${prefix}/libexec/rt/etc
+  mandir:               ${prefix}/man
+  libdir:               ${prefix}/libexec/rt
+  datadir:              ${prefix}/share/rt
+  htmldir:              ${libdir}/WebRT/html
+  manualdir:            ${datadir}
+  localstatedir:        ${prefix}/var/rt
+  logfiledir:           ${localstatedir}/log
+  masonstatedir:        ${localstatedir}/mason-data
+  sessionstatedir:      ${localstatedir}/mason-session
+  customdir:            ${prefix}/libexec/rt/local
+  customhtmldir:        ${customdir}/html
+  customlexdir:         ${customdir}/po
+  customlibdir:         ${customdir}/lib
 </Layout>
 </Layout>
-

+ 39 - 23
rt/rc.rt

@@ -6,34 +6,50 @@
 %config
 %config
     rt_enable="$openpkg_rc_def"
     rt_enable="$openpkg_rc_def"
     rt_log_files="@l_prefix@/var/rt/log/access.log"
     rt_log_files="@l_prefix@/var/rt/log/access.log"
-    rt_log_rotsteps="10"
-    rt_log_rotminsize="10M"
-    rt_log_rotcomplevel="9"
-    rt_log_rotprolog="true"
-    rt_log_rotepilog="true"
+    rt_log_steps="10"
+    rt_log_minsize="10M"
+    rt_log_complevel="9"
+    rt_log_prolog="true"
+    rt_log_epilog="true"
     rt_err_files="@l_prefix@/var/rt/log/error.log"
     rt_err_files="@l_prefix@/var/rt/log/error.log"
-    rt_err_rotsteps="10"
-    rt_err_rotminsize="1M"
-    rt_err_rotcomplevel="9"
-    rt_err_rotprolog="true"
-    rt_err_rotepilog="true"
-    rt_apachectl=@l_prefix@/libexec/rt/tools/rtapachectl
-    rt_sessiondir=@l_prefix@/var/rt/mason-session
+    rt_err_steps="10"
+    rt_err_minsize="1M"
+    rt_err_complevel="9"
+    rt_err_prolog="true"
+    rt_err_epilog="true"
+
+%common
+    rt_apachectl="@l_prefix@/libexec/rt/tools/rtapachectl"
+    rt_sessiondir="@l_prefix@/var/rt/mason-session"
+    rt_pidfile="@l_prefix@/var/rt/run/apache.pid"
+    rt_signal () {
+        [ -f $rt_pidfile ] && kill -$1 `cat $rt_pidfile`
+    }
+
+%status -u @l_susr@ -o
+    rt_usable="unknown"
+    rt_active="no"
+    rcService rt enable yes && \
+        rt_signal 0 && rt_active="yes"
+    echo "rt_enable=\"$rt_enable\""
+    echo "rt_usable=\"$rt_usable\""
+    echo "rt_active=\"$rt_active\""
 
 
 %start -u @l_rusr@
 %start -u @l_rusr@
     rcService rt enable yes || exit 0
     rcService rt enable yes || exit 0
+    rcService rt active yes && exit 0
     ${rt_apachectl} start
     ${rt_apachectl} start
 
 
 %stop -u @l_rusr@
 %stop -u @l_rusr@
     rcService rt enable yes || exit 0
     rcService rt enable yes || exit 0
+    rcService rt active no  && exit 0
     ${rt_apachectl} stop
     ${rt_apachectl} stop
     sleep 2
     sleep 2
 
 
 %restart -u @l_rusr@
 %restart -u @l_rusr@
     rcService rt enable yes || exit 0
     rcService rt enable yes || exit 0
-    ${rt_apachectl} stop
-    sleep 2
-    ${rt_apachectl} start
+    rcService rt active no  && exit 0
+    rc rt stop start
 
 
 %hourly -u @l_rusr@
 %hourly -u @l_rusr@
     rcService rt enable yes || exit 0
     rcService rt enable yes || exit 0
@@ -43,18 +59,18 @@
     rcService rt enable yes || exit 0
     rcService rt enable yes || exit 0
     if [ ".$rt_log_files" != . ]; then
     if [ ".$rt_log_files" != . ]; then
         shtool rotate -f \
         shtool rotate -f \
-            -n ${rt_log_rotsteps} -s ${rt_log_rotminsize} -d \
-            -z ${rt_log_rotcomplevel} -o @l_musr@ -g @l_mgrp@ -m 644 \
-            -P "$rt_log_rotprolog" \
-            -E "${rt_apachectl} restart; $rt_log_rotepilog" \
+            -n ${rt_log_steps} -s ${rt_log_minsize} -d \
+            -z ${rt_log_complevel} -o @l_musr@ -g @l_mgrp@ -m 644 \
+            -P "$rt_log_prolog" \
+            -E "${rt_apachectl} restart; $rt_log_epilog" \
             $rt_log_files
             $rt_log_files
     fi
     fi
     if [ ".$rt_err_files" != . ]; then
     if [ ".$rt_err_files" != . ]; then
         shtool rotate -f \
         shtool rotate -f \
-            -n ${rt_err_rotsteps} -s ${rt_err_rotminsize} -d \
-            -z ${rt_err_rotcomplevel} -o @l_musr@ -g @l_mgrp@ -m 644 \
-            -P "$rt_err_rotprolog" \
-            -E "${rt_apachectl} restart; $rt_err_rotepilog" \
+            -n ${rt_err_steps} -s ${rt_err_minsize} -d \
+            -z ${rt_err_complevel} -o @l_musr@ -g @l_mgrp@ -m 644 \
+            -P "$rt_err_prolog" \
+            -E "${rt_apachectl} restart; $rt_err_epilog" \
             $rt_err_files
             $rt_err_files
     fi
     fi
 
 

+ 1 - 1
rt/rt-mailgate.sh

@@ -1,4 +1,4 @@
 #!/bin/sh
 #!/bin/sh
 PERL5LIB='@l_prefix@/libexec/rt'
 PERL5LIB='@l_prefix@/libexec/rt'
 export PERL5LIB
 export PERL5LIB
-exec @l_prefix@/libexec/rt/tools/rt-mailgate "$@"
+exec @l_prefix@/libexec/rt/tools/rt-mailgate ${1+"$@"}

+ 16 - 48
rt/rt.patch

@@ -1,26 +1,9 @@
-Index: html/Elements/Login
---- html/Elements/Login.orig	2003-11-18 01:31:11.000000000 +0100
-+++ html/Elements/Login	2003-11-25 17:08:38.000000000 +0100
-@@ -87,11 +87,13 @@
- If you've forgotten your username or password, RT can <A
- href="/NoAuth/Reminder.html">send you a reminder</a>.
- -->
-+<!--
- <BR>
- <BR>
- <BR>
- <HR>
- <& /Elements/Footer, Menu => 0 &>
-+-->
- <%ARGS>
- $user => ""
- $pass => undef
 Index: html/Ticket/Elements/ShowMessageStanza
 Index: html/Ticket/Elements/ShowMessageStanza
---- html/Ticket/Elements/ShowMessageStanza.orig	2004-03-16 16:19:24.000000000 +0100
-+++ html/Ticket/Elements/ShowMessageStanza	2004-03-16 16:20:51.000000000 +0100
-@@ -24,12 +24,40 @@
+--- html/Ticket/Elements/ShowMessageStanza.orig	2006-06-20 00:44:04 +0200
++++ html/Ticket/Elements/ShowMessageStanza	2006-11-12 14:56:18 +0100
+@@ -46,12 +46,40 @@
  % if (ref($Message)) {
  % if (ref($Message)) {
- <font color="<%$colors[$Depth]%>">
+ <div class="message-stanza-depth-<% $Depth %>">
  <%perl>
  <%perl>
 -foreach my $stanza (@$Message) {
 -foreach my $stanza (@$Message) {
 -    if ( ref $stanza eq "ARRAY" ) {
 -    if ( ref $stanza eq "ARRAY" ) {
@@ -66,28 +49,25 @@ Index: html/Ticket/Elements/ShowMessageStanza
      elsif ( ref $stanza eq "HASH" ) {
      elsif ( ref $stanza eq "HASH" ) {
          my $content = $stanza->{raw};
          my $content = $stanza->{raw};
 Index: lib/RT/Attachment_Overlay.pm
 Index: lib/RT/Attachment_Overlay.pm
---- lib/RT/Attachment_Overlay.pm.orig	2003-11-18 01:31:13.000000000 +0100
-+++ lib/RT/Attachment_Overlay.pm	2003-11-25 17:08:38.000000000 +0100
-@@ -318,10 +318,11 @@
-     # If we somehow fail to do the decode, at least push out the raw bits
+--- lib/RT/Attachment_Overlay.pm.orig	2006-07-18 23:51:35 +0200
++++ lib/RT/Attachment_Overlay.pm	2006-11-12 14:58:59 +0100
+@@ -295,10 +295,12 @@
      eval {return( Encode::decode_utf8($content))} || return ($content);
      eval {return( Encode::decode_utf8($content))} || return ($content);
    }
    }
--  
--  eval { Encode::from_to($content, 'utf8' => $enc);};
--  if ($@) {
--	$RT::Logger->error("Could not convert attachment from assumed utf8 to '$enc' :".$@);
+   
 +  if (!$enc) {
 +  if (!$enc) {
-+    eval { Encode::from_to($content, 'utf8' => $enc);};
-+    if ($@) {
-+	  $RT::Logger->error("Could not convert attachment from assumed utf8 to '$enc' :".$@);
-+    }
+   eval { Encode::from_to($content, 'utf8' => $enc) } if $enc;
+   if ($@) {
+ 	$RT::Logger->error("Could not convert attachment from assumed utf8 to '$enc' :".$@);
    }
    }
++  }
    return $content;
    return $content;
  }
  }
+ 
 Index: lib/RT/User_Overlay.pm
 Index: lib/RT/User_Overlay.pm
---- lib/RT/User_Overlay.pm.orig	2003-11-18 01:31:14.000000000 +0100
-+++ lib/RT/User_Overlay.pm	2003-11-25 17:08:38.000000000 +0100
-@@ -279,7 +279,7 @@
+--- lib/RT/User_Overlay.pm.orig	2006-06-20 00:44:04 +0200
++++ lib/RT/User_Overlay.pm	2006-11-12 14:56:18 +0100
+@@ -264,7 +264,7 @@
      #If the create failed.
      #If the create failed.
      unless ($id) {
      unless ($id) {
          $RT::Handle->Rollback();
          $RT::Handle->Rollback();
@@ -96,15 +76,3 @@ Index: lib/RT/User_Overlay.pm
  
  
          return ( 0, $self->loc('Could not create user') );
          return ( 0, $self->loc('Could not create user') );
      }
      }
-Index: html/Elements/Header
---- html/Elements/Header.orig	2005-03-27 09:40:16 +0200
-+++ html/Elements/Header	2005-08-11 11:17:29 +0200
-@@ -77,7 +77,7 @@
- >
- <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
-   <tr> 
--    <td colspan=2><a href="http://bestpractical.com"><img src="<%$RT::WebImagesURL%>/bplogo.gif" alt="<%loc("Best Practical Solutions, LLC corporate logo")%>" width="230" height="50"></a></td>
-+    <td colspan=2><a href="<%$RT::LogoLink%>"><img src="<%$RT::LogoURL%>" alt="" width="230" height="50"></a></td>
-     <td>&nbsp;</td>
-     <td>&nbsp;</td>
-     <td width="50%" align="right">

+ 40 - 44
rt/rt.spec

@@ -25,14 +25,13 @@
 #   FIXME: rse: Error: MM: mm:core: failed to open semaphore file (Permission denied): OS: No such file or directory
 #   FIXME: rse: Error: MM: mm:core: failed to open semaphore file (Permission denied): OS: No such file or directory
 
 
 #   package versions
 #   package versions
-%define       V_rt                         3.4.5
+%define       V_rt                         3.6.1
 %define       V_log_dispatch               2.13
 %define       V_log_dispatch               2.13
 %define       V_html_mason                 1.35
 %define       V_html_mason                 1.35
 %define       V_mldbm                      2.01
 %define       V_mldbm                      2.01
 %define       V_html_format                2.04
 %define       V_html_format                2.04
 %define       V_html_scrubber              0.08
 %define       V_html_scrubber              0.08
 %define       V_module_version             1.02
 %define       V_module_version             1.02
-%define       V_cache_simple_timedexpiry   0.26
 
 
 #   package information
 #   package information
 Name:         rt
 Name:         rt
@@ -45,21 +44,16 @@ Class:        EVAL
 Group:        Ticketing
 Group:        Ticketing
 License:      GPL
 License:      GPL
 Version:      %{V_rt}
 Version:      %{V_rt}
-Release:      20061018
+Release:      20061112
 
 
 #   package options
 #   package options
-%option       with_color_primary   336699
-%option       with_color_secondary dddddd
+%option       with_db_sqlite       no
 %option       with_db_mysql        yes
 %option       with_db_mysql        yes
 %option       with_db_pgsql        no
 %option       with_db_pgsql        no
 %option       with_db_oracle       no
 %option       with_db_oracle       no
 
 
 #   fixing conflicting options
 #   fixing conflicting options
-%if "%{with_db_oracle}" == "yes"
-%undefine     with_db_pgsql
-%define       with_db_pgsql        no
-%endif
-%if "%{with_db_oracle}" == "yes" || "%{with_db_pgsql}" == "yes"
+%if "%{with_db_sqlite}" == "yes" || "%{with_db_pgsql}" == "yes" || "%{with_db_oracle}" == "yes"
 %undefine     with_db_mysql
 %undefine     with_db_mysql
 %define       with_db_mysql        no
 %define       with_db_mysql        no
 %endif
 %endif
@@ -72,15 +66,14 @@ Source3:      http://www.cpan.org/modules/by-authors/id/C/CH/CHAMAS/MLDBM-%{V_ml
 Source4:      http://www.cpan.org/modules/by-authors/id/S/SB/SBURKE/HTML-Format-%{V_html_format}.tar.gz
 Source4:      http://www.cpan.org/modules/by-authors/id/S/SB/SBURKE/HTML-Format-%{V_html_format}.tar.gz
 Source5:      http://www.cpan.org/modules/by-authors/id/P/PO/PODMASTER/HTML-Scrubber-%{V_html_scrubber}.tar.gz
 Source5:      http://www.cpan.org/modules/by-authors/id/P/PO/PODMASTER/HTML-Scrubber-%{V_html_scrubber}.tar.gz
 Source6:      http://www.cpan.org/modules/by-authors/id/S/SB/SBURKE/Module-Versions-Report-%{V_module_version}.tar.gz
 Source6:      http://www.cpan.org/modules/by-authors/id/S/SB/SBURKE/Module-Versions-Report-%{V_module_version}.tar.gz
-Source7:      http://www.cpan.org/modules/by-module/Cache/Cache-Simple-TimedExpiry-%{V_cache_simple_timedexpiry}.tar.gz
-Source8:      rc.rt
-Source9:      rtsetup
-Source10:     rtcleanup
-Source11:     rtupgrade
-Source12:     rtapachectl
-Source13:     rtapache.conf
-Source14:     config.layout
-Source15:     rt-mailgate.sh
+Source7:      rc.rt
+Source8:      rtsetup
+Source9:      rtcleanup
+Source10:     rtupgrade
+Source11:     rtapachectl
+Source12:     rtapache.conf
+Source13:     config.layout
+Source14:     rt-mailgate.sh
 Patch0:       rt.patch
 Patch0:       rt.patch
 
 
 #   build information
 #   build information
@@ -94,8 +87,11 @@ BuildPreReq:  perl-dbi, perl-dbix, perl-mail, perl-www, perl-locale, perl-devel,
 PreReq:       perl-dbi, perl-dbix, perl-mail, perl-www, perl-locale, perl-devel, perl-cache
 PreReq:       perl-dbi, perl-dbix, perl-mail, perl-www, perl-locale, perl-devel, perl-cache
 BuildPreReq:  apache, apache::with_mod_perl = yes
 BuildPreReq:  apache, apache::with_mod_perl = yes
 PreReq:       apache, apache::with_mod_perl = yes
 PreReq:       apache, apache::with_mod_perl = yes
+%if "%{with_db_sqlite}" == "yes"
+PreReq:       sqlite, perl-dbi::with_dbd_sqlite = yes
+%endif
 %if "%{with_db_mysql}" == "yes"
 %if "%{with_db_mysql}" == "yes"
-PreReq:       mysql, mysql::with_innodb = yes, perl-dbi::with_dbd_mysql = yes
+PreReq:       mysql, mysql::with_innobase = yes, perl-dbi::with_dbd_mysql = yes
 %endif
 %endif
 %if "%{with_db_pgsql}" == "yes"
 %if "%{with_db_pgsql}" == "yes"
 PreReq:       postgresql, perl-dbi::with_dbd_pgsql = yes
 PreReq:       postgresql, perl-dbi::with_dbd_pgsql = yes
@@ -151,11 +147,6 @@ AutoReqProv:  no
         url       = http://www.cpan.org/modules/by-authors/id/S/SB/SBURKE/
         url       = http://www.cpan.org/modules/by-authors/id/S/SB/SBURKE/
         regex     = Module-Versions-Report-(__VER__)\.tar\.gz
         regex     = Module-Versions-Report-(__VER__)\.tar\.gz
     }
     }
-    prog rt:cache-simple-timedexpiry = {
-        version   = %{V_cache_simple_timedexpiry}
-        url       = http://www.cpan.org/modules/by-module/Cache/
-        regex     = Cache-Simple-TimedExpiry-(__VER__)\.tar\.gz
-    }
 
 
 %prep
 %prep
     #   unpack distribution tarballs
     #   unpack distribution tarballs
@@ -166,7 +157,6 @@ AutoReqProv:  no
     %setup -q -T -D -a 4
     %setup -q -T -D -a 4
     %setup -q -T -D -a 5
     %setup -q -T -D -a 5
     %setup -q -T -D -a 6
     %setup -q -T -D -a 6
-    %setup -q -T -D -a 7
 
 
     #   patch RT distribution
     #   patch RT distribution
     cd rt-%{V_rt}
     cd rt-%{V_rt}
@@ -192,29 +182,38 @@ AutoReqProv:  no
     PERL=%{l_prefix}/bin/perl
     PERL=%{l_prefix}/bin/perl
     ./configure \
     ./configure \
         --enable-layout=OPKG \
         --enable-layout=OPKG \
-        --with-db-type=mysql \
         --with-db-host=localhost \
         --with-db-host=localhost \
         --with-db-home=%{l_prefix} \
         --with-db-home=%{l_prefix} \
+%if "%{with_db_sqlite}" == "yes"
+        --with-db-type=SQLite \
+        --with-db-dba=%{l_rusr} \
+        --with-db-database=%{l_prefix}/var/rt/run/rt.db \
+        --with-db-user=rt \
+        --with-db-pass=XXX \
+%endif
 %if "%{with_db_mysql}" == "yes"
 %if "%{with_db_mysql}" == "yes"
+        --with-db-type=mysql \
         --with-db-dba=root \
         --with-db-dba=root \
         --with-db-database=rt \
         --with-db-database=rt \
         --with-db-user=rt \
         --with-db-user=rt \
         --with-db-pass=XXX \
         --with-db-pass=XXX \
 %endif
 %endif
 %if "%{with_db_pgsql}" == "yes"
 %if "%{with_db_pgsql}" == "yes"
+        --with-db-type=Pg \
         --with-db-dba=postgresql \
         --with-db-dba=postgresql \
         --with-db-database=rt \
         --with-db-database=rt \
         --with-db-user=rt \
         --with-db-user=rt \
         --with-db-pass=XXX \
         --with-db-pass=XXX \
 %endif
 %endif
 %if "%{with_db_oracle}" == "yes"
 %if "%{with_db_oracle}" == "yes"
+        --with-db-type=Oracle \
         --with-db-dba=system \
         --with-db-dba=system \
         --with-db-database=rt \
         --with-db-database=rt \
         --with-db-user=rt \
         --with-db-user=rt \
         --with-db-pass=XXX \
         --with-db-pass=XXX \
 %endif
 %endif
-        --with-web-user=%{l_nusr} \
-        --with-web-group=%{l_ngrp} \
+        --with-web-user=%{l_rusr} \
+        --with-web-group=%{l_rgrp} \
         --with-customdir=%{l_prefix}/etc/rt/local \
         --with-customdir=%{l_prefix}/etc/rt/local \
         --with-customhtmldir=%{l_prefix}/etc/rt/local/html \
         --with-customhtmldir=%{l_prefix}/etc/rt/local/html \
         --with-customlibdir=%{l_prefix}/etc/rt/local/lib \
         --with-customlibdir=%{l_prefix}/etc/rt/local/lib \
@@ -241,8 +240,6 @@ AutoReqProv:  no
         -l %{l_prefix}/libexec/rt configure build install
         -l %{l_prefix}/libexec/rt configure build install
     %{l_prefix}/bin/perl-openpkg -d Module-Versions-Report-%{V_module_version} \
     %{l_prefix}/bin/perl-openpkg -d Module-Versions-Report-%{V_module_version} \
         -l %{l_prefix}/libexec/rt configure build install
         -l %{l_prefix}/libexec/rt configure build install
-    %{l_prefix}/bin/perl-openpkg -d Cache-Simple-TimedExpiry-%{V_cache_simple_timedexpiry} \
-        -l %{l_prefix}/libexec/rt configure build install
     %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
     %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
 
 
     #   create installation file hierarchy
     #   create installation file hierarchy
@@ -265,7 +262,7 @@ AutoReqProv:  no
           config-install dirs libs-install etc-install bin-install \
           config-install dirs libs-install etc-install bin-install \
           sbin-install html-install doc-install \
           sbin-install html-install doc-install \
           DESTDIR=$RPM_BUILD_ROOT
           DESTDIR=$RPM_BUILD_ROOT
-      %{l_shtool} install -c -m 0644 \
+      cp -rp \
           etc/upgrade/* \
           etc/upgrade/* \
           $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/etc/upgrade/
           $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/etc/upgrade/
       %{l_shtool} install -c -m 0644 \
       %{l_shtool} install -c -m 0644 \
@@ -279,11 +276,11 @@ AutoReqProv:  no
         $RPM_BUILD_ROOT%{l_prefix}/etc/rt/RT_SiteConfig.pm \
         $RPM_BUILD_ROOT%{l_prefix}/etc/rt/RT_SiteConfig.pm \
         $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/etc/RT_SiteConfig.pm
         $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/etc/RT_SiteConfig.pm
     mv \
     mv \
-        $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/WebRT/html/NoAuth/webrt.css \
-        $RPM_BUILD_ROOT%{l_prefix}/etc/rt/webrt.css
+        $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/WebRT/html/NoAuth/css/print.css \
+        $RPM_BUILD_ROOT%{l_prefix}/etc/rt/print.css
     %{l_shtool} mkln -f -s \
     %{l_shtool} mkln -f -s \
-        $RPM_BUILD_ROOT%{l_prefix}/etc/rt/webrt.css \
-        $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/WebRT/html/NoAuth/webrt.css
+        $RPM_BUILD_ROOT%{l_prefix}/etc/rt/print.css \
+        $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/WebRT/html/NoAuth/css/print.css
     mv \
     mv \
         $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/local \
         $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/local \
         $RPM_BUILD_ROOT%{l_prefix}/etc/rt/local
         $RPM_BUILD_ROOT%{l_prefix}/etc/rt/local
@@ -303,6 +300,7 @@ AutoReqProv:  no
         $RPM_BUILD_ROOT%{l_prefix}/bin/rt-mailgate
         $RPM_BUILD_ROOT%{l_prefix}/bin/rt-mailgate
 
 
     #   strip installation hierarchy
     #   strip installation hierarchy
+    rm -f  $RPM_BUILD_ROOT%{l_prefix}/bin/convert*
     rm -f  $RPM_BUILD_ROOT%{l_prefix}/bin/*.svc
     rm -f  $RPM_BUILD_ROOT%{l_prefix}/bin/*.svc
     rm -f  $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/tools/rt-test-dependencies
     rm -f  $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/tools/rt-test-dependencies
     rm -rf $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/t
     rm -rf $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/t
@@ -313,6 +311,9 @@ AutoReqProv:  no
     rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/rt
     rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/rt
 
 
     #   install own setup/cleanup/upgrade script
     #   install own setup/cleanup/upgrade script
+%if "%{with_db_sqlite}" == "yes"
+    rt_db_dba=%{l_rusr}
+%endif
 %if "%{with_db_mysql}" == "yes"
 %if "%{with_db_mysql}" == "yes"
     rt_db_dba=root
     rt_db_dba=root
 %endif
 %endif
@@ -347,11 +348,6 @@ AutoReqProv:  no
         $RPM_BUILD_ROOT%{l_prefix}/etc/rt/
         $RPM_BUILD_ROOT%{l_prefix}/etc/rt/
 
 
     #   final post-adjustments to installation hierarchy
     #   final post-adjustments to installation hierarchy
-    %{l_shtool} subst \
-        -e 's;#336699;#%{with_color_primary};g' \
-        -e 's;#dddddd;#%{with_color_secondary};g' \
-        `find $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/WebRT \
-              -type f -print | grep -v gif | grep -v jpg | grep -v .orig`
     find $RPM_BUILD_ROOT%{l_prefix}/libexec/rt \
     find $RPM_BUILD_ROOT%{l_prefix}/libexec/rt \
           -type f -name "*.html" -print | xargs chmod 644
           -type f -name "*.html" -print | xargs chmod 644
     find $RPM_BUILD_ROOT%{l_prefix}/libexec/rt \
     find $RPM_BUILD_ROOT%{l_prefix}/libexec/rt \
@@ -371,7 +367,7 @@ AutoReqProv:  no
         '%attr(755,%{l_musr},%{l_mgrp}) %{l_prefix}/libexec/rt/tools/rt-mailgate' \
         '%attr(755,%{l_musr},%{l_mgrp}) %{l_prefix}/libexec/rt/tools/rt-mailgate' \
         '%config %attr(640,%{l_musr},%{l_rgrp}) %{l_prefix}/etc/rt/RT_SiteConfig.pm' \
         '%config %attr(640,%{l_musr},%{l_rgrp}) %{l_prefix}/etc/rt/RT_SiteConfig.pm' \
         '%config %attr(640,%{l_musr},%{l_rgrp}) %{l_prefix}/etc/rt/rtapache.conf' \
         '%config %attr(640,%{l_musr},%{l_rgrp}) %{l_prefix}/etc/rt/rtapache.conf' \
-        '%config %attr(644,%{l_musr},%{l_rgrp}) %{l_prefix}/etc/rt/webrt.css' \
+        '%config %attr(644,%{l_musr},%{l_rgrp}) %{l_prefix}/etc/rt/print.css' \
         '%attr(750,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/rt/mason-data' \
         '%attr(750,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/rt/mason-data' \
         '%attr(750,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/rt/mason-data/*' \
         '%attr(750,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/rt/mason-data/*' \
         '%attr(750,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/rt/mason-session' \
         '%attr(750,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/rt/mason-session' \
@@ -403,10 +399,10 @@ AutoReqProv:  no
           echo "In particular, you have to assign a password to the RT"
           echo "In particular, you have to assign a password to the RT"
           echo "database user. Then you have to start the MySQL RDBMS and"
           echo "database user. Then you have to start the MySQL RDBMS and"
           echo "create the initial RT database with:"
           echo "create the initial RT database with:"
-          echo "    \$ $RPM_INSTALL_PREFIX/etc/rc mysql start"
+          echo "    \$ $RPM_INSTALL_PREFIX/bin/openpkg rc mysql start"
           echo "    \$ $RPM_INSTALL_PREFIX/sbin/rtsetup"
           echo "    \$ $RPM_INSTALL_PREFIX/sbin/rtsetup"
           echo "After this post-installation, start RT by running"
           echo "After this post-installation, start RT by running"
-          echo "    \$ $RPM_INSTALL_PREFIX/etc/rc rt start"
+          echo "    \$ $RPM_INSTALL_PREFIX/bin/openpkg rc rt start"
           echo "and connect with a browser to:"
           echo "and connect with a browser to:"
           echo "    http://127.0.0.1:8380/"
           echo "    http://127.0.0.1:8380/"
           echo "Login as 'root' (with initial password 'password')"
           echo "Login as 'root' (with initial password 'password')"

+ 19 - 16
rt/rtapache.conf

@@ -1,6 +1,5 @@
 ##
 ##
 ##  rtapache.conf -- RT Apache Custom Configuration
 ##  rtapache.conf -- RT Apache Custom Configuration
-##  ______________________________________________________
 ##
 ##
 
 
 ServerType             standalone
 ServerType             standalone
@@ -14,9 +13,9 @@ Port                   8380
 Listen                 127.0.0.1:8380
 Listen                 127.0.0.1:8380
 
 
 #   runtime files
 #   runtime files
-PidFile           @l_prefix@/var/rt/run/apache.pid
-ScoreBoardFile    @l_prefix@/var/rt/run/apache.sb
-LockFile          @l_prefix@/var/rt/run/apache.lock
+PidFile                @l_prefix@/var/rt/run/apache.pid
+ScoreBoardFile         @l_prefix@/var/rt/run/apache.sb
+LockFile               @l_prefix@/var/rt/run/apache.lock
 
 
 #  server behaviour
 #  server behaviour
 Timeout                300
 Timeout                300
@@ -81,21 +80,25 @@ ServerSignature        on
 
 
 #   configure global document root
 #   configure global document root
 DocumentRoot      @l_prefix@/libexec/rt/WebRT/html
 DocumentRoot      @l_prefix@/libexec/rt/WebRT/html
-<Directory        "@l_prefix@/libexec/rt/WebRT/html">
-Options           FollowSymLinks
-AllowOverride     None
-Order             allow,deny
-Allow             from all
+<Directory        @l_prefix@/libexec/rt/WebRT/html>
+    Options       FollowSymLinks
+    AllowOverride None
+    Order         allow,deny
+    Allow         from all
 </Directory>
 </Directory>
 
 
+#   mod_perl support
 <IfModule mod_perl.c>
 <IfModule mod_perl.c>
-PerlModule  Apache::DBI
-PerlRequire @l_prefix@/cgi/rt/webmux.pl
-<Location />
-    SetHandler perl-script
-    PerlHandler RT::Mason
-</Location>
+    PerlModule      Apache::DBI
+    PerlRequire     @l_prefix@/cgi/rt/webmux.pl
+    <Location />
+        SetHandler  perl-script
+        PerlHandler RT::Mason
+    </Location>
 </IfModule>
 </IfModule>
-<LocationMatch "/NoAuth/images">
+
+#   special exception for static image content
+<LocationMatch /NoAuth/images>
     SetHandler None
     SetHandler None
 </LocationMatch>
 </LocationMatch>
+

+ 3 - 1
rt/rtsetup

@@ -3,4 +3,6 @@
     --action init \
     --action init \
     --dba "@rt_db_dba@" \
     --dba "@rt_db_dba@" \
     --prompt-for-dba-password
     --prompt-for-dba-password
-
+if [ -f @l_prefix@/var/rt/run/rt.db ]; then
+    chown @l_rusr@:@l_rgrp@ @l_prefix@/var/rt/run/rt.db
+fi