OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   07-Sep-2005 12:11:56
  Branch: HEAD                             Handle: 2005090711115500

  Added files:
    openpkg-src/apache      apache.patch.suphp
  Modified files:
    openpkg-src/apache      apache.spec

  Log:
    Fix two nasty suPHP installation bugs:
    
    1. The code did not take the Autoconf variable --with-logfile and its
       resulting macro OPT_LOGFILE into account. This resulted in a broken
       logfile path. Additionally, it missed to include other
       configuration parameters, too.
    
    2. The path to the configuration file suphp.conf was set incorrectly.
       Additionally, no default suphp.conf file was installed.
    
    All those bugs are now fixed.
    
    Discovered by: Birger Krägelin

  Summary:
    Revision    Changes     Path
    1.1         +24 -0      openpkg-src/apache/apache.patch.suphp
    1.302       +10 -1      openpkg-src/apache/apache.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/apache/apache.patch.suphp
  ============================================================================
  $ cvs diff -u -r0 -r1.1 apache.patch.suphp
  --- /dev/null 2005-09-07 12:11:37 +0200
  +++ apache.patch.suphp        2005-09-07 12:11:55 +0200
  @@ -0,0 +1,24 @@
  +Index: src/Configuration.cpp
  +--- src/Configuration.cpp.orig       2005-02-27 18:53:05 +0100
  ++++ src/Configuration.cpp    2005-09-07 12:09:45 +0200
  +@@ -21,6 +21,8 @@
  + #include <string>
  + #include <vector>
  + 
  ++#include "config.h"
  ++
  + #include "IniFile.hpp"
  + #include "Util.hpp"
  + 
  +@@ -81,7 +83,11 @@
  + }
  + 
  + suPHP::Configuration::Configuration() {
  ++#ifdef OPT_LOGFILE
  ++    this->logfile = OPT_LOGFILE;
  ++#else
  +     this->logfile = "/var/log/suphp.log";
  ++#endif
  + #ifdef OPT_APACHE_USER
  +     this->webserver_user = OPT_APACHE_USER;
  + #else
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/apache/apache.spec
  ============================================================================
  $ cvs diff -u -r1.301 -r1.302 apache.spec
  --- openpkg-src/apache/apache.spec    2 Sep 2005 21:10:31 -0000       1.301
  +++ openpkg-src/apache/apache.spec    7 Sep 2005 10:11:55 -0000       1.302
  @@ -65,7 +65,7 @@
   Group:        Web
   License:      ASF
   Version:      %{V_apache}
  -Release:      20050902
  +Release:      20050907
   
   #   package options (suexec related)
   %option       with_suexec               yes
  @@ -211,6 +211,7 @@
   Patch1:       apache.patch.modowa
   Patch2:       apache.patch.php
   Patch3:       
http://www.hardened-php.net/hardened-php-%{V_mod_php_hardened}.patch.gz
  +Patch4:       apache.patch.suphp
   
   #   build information
   Prefix:       %{l_prefix}
  @@ -567,6 +568,7 @@
   %endif
   %if "%{with_suphp}" == "yes"
       %setup -q -T -D -a 17
  +    %patch -p0 -d suphp-%{V_suphp} -P 4
   %endif
   %if "%{with_mod_security}" == "yes"
       %setup -q -T -D -a 18
  @@ -999,6 +1001,7 @@
         CFLAGS="%{l_cflags -O}" \
         ./configure \
             --prefix=%{l_prefix} \
  +          --sysconfdir=%{l_prefix}/etc/apache \
             --with-apxs="" \
             --with-apache-user=%{with_suphp_caller} \
             --with-php=%{with_suphp_phpcgi} \
  @@ -1231,6 +1234,12 @@
       ( cd suphp-%{V_suphp}
         %{l_shtool} install -c -s -m 711 \
             src/suphp $RPM_BUILD_ROOT%{l_prefix}/sbin/
  +      %{l_shtool} install -c -m 644 \
  +          -e 's;^\(logfile=\).*;\1%{l_prefix}/var/apache/log/suphp.log;' \
  +          -e 's;^\(webserver_user=\).*;\1%{with_suphp_caller};' \
  +          -e 's;/usr/bin/php;%{with_suphp_phpcgi};' \
  +          doc/suphp.conf-example \
  +          $RPM_BUILD_ROOT%{l_prefix}/etc/apache/suphp.conf
       ) || exit $?
   %endif
   
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [email protected]

Reply via email to