소스 검색

- move webrt.css to <prefix>/etc/rt/ as %config for editing - move rtapache.conf to <prefix>/etc/rt/ as %config for editing - integrate primary color selection as %option to reduce post-patching - disable useless header element on login screen - disable nasty looking copyright message on login screen - provide generic support for logo and URL in header

Ralf S. Engelschall 22 년 전
부모
커밋
178df4ce98
4개의 변경된 파일74개의 추가작업 그리고 7개의 파일을 삭제
  1. 51 0
      rt/rt.patch
  2. 21 4
      rt/rt.spec
  3. 1 1
      rt/rtapache.conf
  4. 1 2
      rt/rtapachectl

+ 51 - 0
rt/rt.patch

@@ -47,3 +47,54 @@
  % }
  <%INIT>
  use URI::URL;
+--- etc/RT_Config.pm.in.orig	Mon Mar 24 17:38:40 2003
++++ etc/RT_Config.pm.in	Fri Apr  4 16:06:52 2003
+@@ -262,7 +262,8 @@
+ 
+ # $RTLogoURL points to the URL of the RT logo displayed in the web UI
+ 
+-Set($LogoURL , $WebImagesURL . "rt.jpg");
++Set($LogoURL , $WebImagesURL . "/bplogo.gif");
++Set($LogoLink , "http://bestpractical.com/");
+ 
+ # if TrustHTMLAttachments is not defined, we will display them
+ # as text. This prevents malicious HTML and javascript from being
+--- html/Elements/Header.orig	Mon Mar 24 17:38:40 2003
++++ html/Elements/Header	Fri Apr  4 16:02:16 2003
+@@ -40,9 +40,10 @@
+ "
+ % }
+ >
++% if ($session{'CurrentUser'} && $session{'CurrentUser'}->Id && $LoggedIn) {
+ <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="" 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">
+@@ -61,6 +62,7 @@
+     </td>
+   </tr>
+ </table>
++% }
+ <%INIT>
+ 
+ $r->header_out('Pragma' => 'no-cache');
+--- html/Elements/Login.orig	Mon Mar 24 17:38:40 2003
++++ html/Elements/Login	Wed Apr  2 21:17:21 2003
+@@ -86,12 +86,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>
+ <&|/l, '2003'&>RT is &copy; Copyright 1996-[_1] Jesse Vincent &lt;jesse@bestpractical.com&gt;.  It is distributed under <a href="http://www.gnu.org/copyleft/gpl.html">Version 2 of the GNU General Public License.</a></&>
+-
++-->
+ <%ARGS>
+ $user => ""
+ $pass => undef

+ 21 - 4
rt/rt.spec

@@ -47,7 +47,10 @@ Distribution: OpenPKG [EVAL]
 Group:        Database
 License:      GPL
 Version:      %{V_here}
-Release:      20030403
+Release:      20030404
+
+#   package options
+%option       with_color_primary  336699
 
 #   list of sources
 Source0:      http://www.cpan.org/modules/by-module/Log/Log-Dispatch-%{V_log_dispatch}.tar.gz
@@ -318,6 +321,12 @@ AutoReqProv:  no
       ln -s \
         %{l_prefix}/etc/rt/RT_SiteConfig.pm \
         $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/etc/RT_SiteConfig.pm
+      mv \
+        $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/WebRT/html/NoAuth/webrt.css \
+        $RPM_BUILD_ROOT%{l_prefix}/etc/rt/webrt.css
+      ln -s \
+        %{l_prefix}/etc/rt/webrt.css \
+        $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/WebRT/html/NoAuth/webrt.css
     ) || exit $?
 
     #   remove Win32 handler
@@ -346,8 +355,8 @@ AutoReqProv:  no
     #   startup script
     %{l_shtool} install -c -m 755 \
         -e 's;@l_prefix@;%{l_prefix};g' \
-        -e 's;@l_rusr@;%{l_rusr};g'     \
-        -e 's;@l_rgrp@;%{l_rgrp};g'     \
+        -e 's;@l_rusr@;%{l_rusr};g' \
+        -e 's;@l_rgrp@;%{l_rgrp};g' \
         %{SOURCE rc.rt} \
         $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
 
@@ -367,7 +376,7 @@ AutoReqProv:  no
         -e "s;@l_hostname@;$l_hostname;g" \
         -e "s;@l_domainname@;$l_domainname;g" \
         %{SOURCE rtapache.conf} \
-        $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/
+        $RPM_BUILD_ROOT%{l_prefix}/etc/rt/
 
     #   better places
     mv \
@@ -383,12 +392,20 @@ AutoReqProv:  no
         %{SOURCE rt-mailgate.sh} \
         $RPM_BUILD_ROOT%{l_prefix}/bin/rt-mailgate
 
+    #   post-adjustments
+    %{l_shtool} subst \
+        -e 's;#336699;#%{with_color_primary};g' \
+        `find $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/WebRT -type f -print | grep -v gif | grep -v jpg`
+
+    #   determine installation files
     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
         %{l_files_std} \
         '%{l_prefix}/libexec/rt' \
         '%attr(755,%{l_musr},%{l_mgrp}) %{l_prefix}/libexec/rt/tools/rt-setup-database' \
         '%attr(755,%{l_musr},%{l_mgrp}) %{l_prefix}/libexec/rt/tools/rt-crontool' \
         '%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(644,%{l_musr},%{l_rgrp}) %{l_prefix}/etc/rt/webrt.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-session' \

+ 1 - 1
rt/rtapache.conf

@@ -82,7 +82,7 @@ ServerSignature        on
 #   configure global document root
 DocumentRoot      @l_prefix@/libexec/rt/WebRT/html
 <Directory        "@l_prefix@/libexec/rt/WebRT/html">
-Options           None
+Options           FollowSymLinks
 AllowOverride     None
 Order             allow,deny
 Allow             from all

+ 1 - 2
rt/rtapachectl

@@ -1,7 +1,6 @@
 #!/bin/sh
-
 sed \
     -e "s;^\(PIDFILE=\).*;\1@l_prefix@/var/rt/run/apache.pid;" \
-    -e "s;^\(HTTPD=\)\(.*\);\1\"\2 -f @l_prefix@/libexec/rt/rtapache.conf\";" \
+    -e "s;^\(HTTPD=\)\(.*\);\1\"\2 -f @l_prefix@/etc/rt/rtapache.conf\";" \
     @l_prefix@/sbin/apachectl \
 | sh -s "$@"