Author: glen                         Date: Thu Nov 19 15:31:40 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- pldize setup procedure

---- Files affected:
packages/wordpress-mu:
   pld.patch (1.3 -> 1.4) , wordpress-mu.spec (1.4 -> 1.5) 

---- Diffs:

================================================================
Index: packages/wordpress-mu/pld.patch
diff -u packages/wordpress-mu/pld.patch:1.3 packages/wordpress-mu/pld.patch:1.4
--- packages/wordpress-mu/pld.patch:1.3 Thu Nov 19 15:57:02 2009
+++ packages/wordpress-mu/pld.patch     Thu Nov 19 16:31:35 2009
@@ -1,6 +1,6 @@
---- wordpress-mu-2.8.6/index-install.php~      2009-11-19 14:39:53.000000000 
+0200
-+++ wordpress-mu-2.8.6/index-install.php       2009-11-19 14:42:58.870091243 
+0200
-@@ -288,7 +288,7 @@
+--- wordpress-mu-2.8.6/index-install.php       2009-11-19 17:28:48.623647566 
+0200
++++ wordpress-mu-2.8.6.pld/index-install.php   2009-11-19 17:28:33.183056898 
+0200
+@@ -288,10 +288,16 @@
                <h2>Warning!</h2>
                <div style='border: 1px solid #ccc'>
                        <p style='font-weight: bold; padding-left: 10px'>One or 
more of the directories must be made writeable by the webserver. You will be 
reminded to reset the permissions at the end of the install.<br />
@@ -8,15 +8,54 @@
 +                              Please <code>chmod 777 
<q>directory-name</q></code> or <code>chown</code> that directory to the user 
the web server runs as (usually "nobody", "apache", or "www-data"; It is "http" 
in PLD Linux)<br />
                                Refresh this page when you're done!<br /></p>
                </div>
-               <p>Quick fix:<br /> <code>chmod&nbsp;777&nbsp;<?php
---- wordpress-mu-2.8.6/index-install.php~      2009-11-19 16:54:08.000000000 
+0200
-+++ wordpress-mu-2.8.6/index-install.php       2009-11-19 16:55:38.075995166 
+0200
-@@ -359,7 +359,7 @@
+-              <p>Quick fix:<br /> <code>chmod&nbsp;777&nbsp;<?php
++              <p>Quick fix:<br />
++              <code>chgrp&nbsp;http&nbsp;<?php
++              foreach( $errors as $dir ) {
++                      echo "$dir&nbsp;";
++              }
++              ?></code>
++              <code>chmod&nbsp;g+w&nbsp;<?php
+               foreach( $errors as $dir ) {
+                       echo "$dir&nbsp;";
+               }
+@@ -359,7 +365,7 @@
        return true;
  }
  
 -function printstep1form( $dbname = 'wordpress', $uname = 'username', $pwd = 
'password', $dbhost = 'localhost', $vhost = 'yes', $prefix = 'wp_' ) {
-+function printstep1form( $dbname = 'wordpress', $uname = 'mysql', $pwd = '', 
$dbhost = 'localhost', $vhost = 'yes', $prefix = 'wp_' ) {
++function printstep1form( $dbname = 'wpmu', $uname = 'mysql', $pwd = '', 
$dbhost = 'localhost', $vhost = 'yes', $prefix = 'wp_' ) {
        $weblog_title = ucfirst( $_SERVER[ 'HTTP_HOST' ] ) . ' Blogs';
        $email = '';
        $hostname = $_SERVER[ 'HTTP_HOST' ];
+@@ -630,6 +636,14 @@
+       </p>
+       <p>You can probably use the following command to fix the permissions 
but check with your host if it doubt:
+               <br />
++              <code>chown&nbsp;root&nbsp;
++                      <?php
++                      reset( $dirs );
++                      foreach( (array) $dirs as $dir ) {
++                              echo "$dir&nbsp;";
++                      }
++                      ?>
++              </code><br />
+               <code>chmod&nbsp;755&nbsp;
+                       <?php
+                       reset( $dirs );
+--- wordpress-mu-2.8.6/wp-blog-header.php      2009-11-19 17:28:48.952408338 
+0200
++++ wordpress-mu-2.8.6.pld/wp-blog-header.php  2009-11-19 17:28:33.183056898 
+0200
+@@ -10,8 +10,11 @@
+       if ( !file_exists( dirname(__FILE__) . '/wp-config.php') && 
!file_exists( dirname( dirname(__FILE__) ) . '/wp-config.php')) {
+               if (strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false) $path = 
'';
+               else $path = 'wp-admin/';
+-              include( "index-install.php" ); // install WPMU!
+-              die();
++              // install WPMU!
++              if (include("index-install.php")) {
++                      exit;
++              }
++              die('Please install <code>wordpress-mu-setup</code> package to 
run install wizard');
+       }
+ 
+       $wp_did_header = true;

================================================================
Index: packages/wordpress-mu/wordpress-mu.spec
diff -u packages/wordpress-mu/wordpress-mu.spec:1.4 
packages/wordpress-mu/wordpress-mu.spec:1.5
--- packages/wordpress-mu/wordpress-mu.spec:1.4 Thu Nov 19 15:45:25 2009
+++ packages/wordpress-mu/wordpress-mu.spec     Thu Nov 19 16:31:35 2009
@@ -5,7 +5,7 @@
 Summary(en.UTF-8):     WordPress ยต
 Name:          wordpress-mu
 Version:       2.8.6
-Release:       0.11
+Release:       0.24
 License:       GPL
 Group:         Applications/Publishing
 Source0:       http://mu.wordpress.org/%{name}-%{version}.tar.gz
@@ -62,6 +62,9 @@
 %prep
 %setup -qc
 mv %{name}/* .; rmdir %{name}
+# undos
+find '(' -name '*.php' -o -name '*.js' -o -name '*.html' ')' -print0 | xargs 
-0 %{__sed} -i -e 's,\r$,,'
+
 %patch0 -p1
 
 rm wp-content/themes/index.php
@@ -70,18 +73,19 @@
 rm wp-content/plugins/index.php
 rm wp-content/plugins/readme.txt
 
-find '(' -name '*.php' -o -name '*.js' -o -name '*.html' ')' -print0 | xargs 
-0 %{__sed} -i -e 's,\r$,,'
+# cleanup backups after patching
+find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d 
$RPM_BUILD_ROOT{%{_appdir},%{_sbindir},%{_sysconfdir},%{_appdir}/wp-content/languages}
 
 cp -a . $RPM_BUILD_ROOT%{_appdir}
-cp -a wp-config-sample.php $RPM_BUILD_ROOT%{_sysconfdir}/wp-config.php
+cp -a 
$RPM_BUILD_ROOT{%{_appdir}/wp-config-sample.php,%{_sysconfdir}/wp-config.php}
 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
 cp -a $RPM_BUILD_ROOT%{_sysconfdir}/{apache,httpd}.conf
-rm $RPM_BUILD_ROOT%{_appdir}/htaccess.dist
+rm $RPM_BUILD_ROOT%{_appdir}/{README.txt,license.txt}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -89,23 +93,26 @@
 %post
 if [ "$1" = 1 ]; then
        %banner -e %{name} <<-EOF
-       To finish your configuration DO NOT FORGET to:
+       To setup configuration using web wizard:
 
-       1) Create some MySQL database owned by some user
-       2) Edit the file: %{_sysconfdir}/wp-config.php
-       3) Install %{name}-setup
-       4) Run a browser and visit: 
http://$(hostname)/wordpress/wp-admin/install.php
+       - Install %{name}-setup
+       - Create empty MySQL database (mysqladmin create wpmu)
+       - Open web browser at: http://$(hostname)/wordpress/wp-admin/install.php
 EOF
 fi
 
 %post setup
 chmod 660 %{_sysconfdir}/wp-config.php
 chown root:http %{_sysconfdir}/wp-config.php
+chmod 775 %{_appdir} %{_appdir}/wp-content
+chown root:http %{_appdir} %{_appdir}/wp-content
 
 %postun setup
 if [ "$1" = "0" ]; then
        chmod 640 %{_sysconfdir}/wp-config.php
        chown root:http %{_sysconfdir}/wp-config.php
+       chmod 755 %{_appdir} %{_appdir}/wp-content
+       chown root:root %{_appdir} %{_appdir}/wp-content
 fi
 
 %triggerin -- apache1 < 1.3.37-3, apache1-base
@@ -128,14 +135,13 @@
 
 %files
 %defattr(644,root,root,755)
+%doc README.txt license.txt
 %dir %attr(750,root,http) %{_sysconfdir}
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) 
%{_sysconfdir}/apache.conf
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) 
%{_sysconfdir}/httpd.conf
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) 
%{_sysconfdir}/lighttpd.conf
 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) 
%{_sysconfdir}/wp-config.php
 
-%{_appdir}/README.txt
-%{_appdir}/license.txt
 %{_appdir}/wp-content/blogs.php
 
 %dir %{_appdir}
@@ -154,6 +160,7 @@
 
 # -setup package
 %exclude %{_appdir}/index-install.php
+%exclude %{_appdir}/wp-config-sample.php
 
 %files setup
 %defattr(644,root,root,755)
@@ -161,8 +168,10 @@
 #%attr(755,root,root) %{_sbindir}/wpmu-setup
 #%{_appdir}/wp-secure.sh
 #%{_appdir}/wp-setup.sh
-%{_appdir}/wp-admin
+%{_appdir}/htaccess.dist
 %{_appdir}/index-install.php
+%{_appdir}/wp-config-sample.php
+%{_appdir}/wp-admin
 
 %define date   %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -170,6 +179,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.5  2009/11/19 15:31:35  glen
+- pldize setup procedure
+
 Revision 1.4  2009/11/19 14:45:25  glen
 - add pld.patch
 - some cosmetics
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/wordpress-mu/pld.patch?r1=1.3&r2=1.4&f=u
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/wordpress-mu/wordpress-mu.spec?r1=1.4&r2=1.5&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to