Browse Source

Drupal uses preg_replace() -> with_mod_php_pcre. Drupal uses session_set_save_handler() -> with_mod_php_mm. Move site configuration into $PREFIX/etc/sites subdir because a) drupal admins are used to use a directory of that name and b) PHP virtual site configuration logic in bootstrap.inc uses file_exists() which, when safe_mode=on, requires that the parent dir of the (settings.php) file to be checked is owned by the PHP (=apache =r_usr) user. Flag $PREFIX/etc/sites/default/settings.php as config file. Use a PHP5 compatible default theme.

Thomas Lotterer 19 years ago
parent
commit
189dd1c4e7
2 changed files with 19 additions and 10 deletions
  1. 1 1
      drupal/drupal-setup.sh
  2. 18 9
      drupal/drupal.spec

+ 1 - 1
drupal/drupal-setup.sh

@@ -23,5 +23,5 @@ EOF
 #  configure /etc/drupal/default/settings.php accordingly
 @l_prefix@/lib/openpkg/shtool subst \
     -e '/^\$db_url =/s;mysql://username:password@localhost/database;mysql://drupal:drupal@localhost/drupal;' \
-    @l_prefix@/etc/drupal/default/settings.php
+    @l_prefix@/etc/drupal/sites/default/settings.php
 

+ 18 - 9
drupal/drupal.spec

@@ -133,7 +133,7 @@ Class:        PLUS
 Group:        Web
 License:      GPL
 Version:      %{V_drupal}
-Release:      20060815
+Release:      20060816
 
 #   list of sources
 Source0:      http://drupal.org/files/projects/drupal-%{V_drupal}.tar.gz
@@ -245,7 +245,9 @@ BuildPreReq:  OpenPKG, openpkg >= 20040130
 PreReq:       OpenPKG, openpkg >= 20040130
 PreReq:       apache
 PreReq:       apache::with_mod_php = yes
+PreReq:       apache::with_mod_php_mm = yes
 PreReq:       apache::with_mod_php_mysql = yes
+PreReq:       apache::with_mod_php_pcre = yes
 PreReq:       apache::with_mod_php_xml = yes
 AutoReq:      no
 AutoReqProv:  no
@@ -868,13 +870,20 @@ AutoReqProv:  no
       chmod a-x modules/*.module
     ) || exit $?
 
+    #   adjust default theme because vendor default "blumarine"
+    #   uses template engine XTemplate which, as of Drupal
+    #   4.6.x, is incompatible to PHP 5.0.5+/5.1.1+
+    #   see http://drupal.org/node/42080
+    %{l_shtool} subst \
+        -e 's/s:10:"bluemarine"/s:9:"chameleon"/' \
+        $RPM_BUILD_ROOT%{l_prefix}/share/drupal/database/database.mysql
+
     #   move configuration location
-    mv $RPM_BUILD_ROOT%{l_prefix}/share/drupal/sites/default \
-       $RPM_BUILD_ROOT%{l_prefix}/etc/drupal/default
-    mkdir $RPM_BUILD_ROOT%{l_prefix}/etc/drupal/default/themes
-    rmdir $RPM_BUILD_ROOT%{l_prefix}/share/drupal/sites
-    %{l_shtool} mkln -t -s \
-       $RPM_BUILD_ROOT%{l_prefix}/etc/drupal \
+    mv $RPM_BUILD_ROOT%{l_prefix}/share/drupal/sites \
+       $RPM_BUILD_ROOT%{l_prefix}/etc/drupal/
+    mkdir $RPM_BUILD_ROOT%{l_prefix}/etc/drupal/sites/default/themes
+    %{l_shtool} mkln -s \
+       $RPM_BUILD_ROOT%{l_prefix}/etc/drupal/sites \
        $RPM_BUILD_ROOT%{l_prefix}/share/drupal/sites
     %{l_shtool} mkln -s \
        $RPM_BUILD_ROOT%{l_prefix}/var/drupal/files \
@@ -1032,8 +1041,8 @@ AutoReqProv:  no
     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
         %{l_files_std} \
         '%config %{l_prefix}/etc/drupal/*' \
-        '%config %{l_prefix}/etc/drupal/*/*' \
-        '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/etc/drupal/default/*' \
+        '%config %{l_prefix}/etc/drupal/sites/default/*' \
+        '%dir %attr(775,%{l_rusr},%{l_mgrp}) %{l_prefix}/etc/drupal/sites/default' \
         '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/share/drupal' \
         '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/drupal' \
         '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/drupal/files'