diff --git a/.gitignore b/.gitignore index b266141..336fc17 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -wordpress-2.8.6.tar.gz wordpress-3.0.1.tar.gz /wordpress-3.0.2.tar.gz /wordpress-3.0.3.tar.gz diff --git a/wordpress-move-wp-content.patch b/wordpress-move-wp-content.patch index 7dd738e..54eb921 100644 --- a/wordpress-move-wp-content.patch +++ b/wordpress-move-wp-content.patch @@ -1,6 +1,6 @@ diff -up wordpress/wp-includes/default-constants.php.rhbz522897 wordpress/wp-includes/default-constants.php ---- wordpress/wp-includes/default-constants.php.rhbz522897 2011-05-25 22:02:51.857213589 +0200 -+++ wordpress/wp-includes/default-constants.php 2011-05-25 22:19:01.211438543 +0200 +--- wordpress/wp-includes/default-constants.php.rhbz522897 2010-05-26 04:42:15.000000000 +0200 ++++ wordpress/wp-includes/default-constants.php 2011-06-02 12:29:57.919714584 +0200 @@ -39,7 +39,7 @@ function wp_initial_constants( ) { @ini_set('memory_limit', WP_MEMORY_LIMIT); @@ -10,3 +10,21 @@ diff -up wordpress/wp-includes/default-constants.php.rhbz522897 wordpress/wp-inc // Add define('WP_DEBUG', true); to wp-config.php to enable display of notices during development. if ( !defined('WP_DEBUG') ) +@@ -75,7 +75,7 @@ function wp_initial_constants( ) { + */ + function wp_plugin_directory_constants( ) { + if ( !defined('WP_CONTENT_URL') ) +- define( 'WP_CONTENT_URL', get_option('siteurl') . '/wp-content'); // full url - WP_CONTENT_DIR is defined further up ++ define( 'WP_CONTENT_URL', get_option('siteurl')); // full url - WP_CONTENT_DIR is defined further up + + /** + * Allows for the plugins directory to be moved from the default location. +@@ -100,7 +100,7 @@ function wp_plugin_directory_constants( + * @deprecated + */ + if ( !defined('PLUGINDIR') ) +- define( 'PLUGINDIR', 'wp-content/plugins' ); // Relative to ABSPATH. For back compat. ++ define( 'PLUGINDIR', WP_CONTENT_DIR . 'plugins' ); // Relative to ABSPATH. For back compat. + + /** + * Allows for the mu-plugins directory to be moved from the default location. diff --git a/wordpress.spec b/wordpress.spec index 5c3b428..051c85e 100644 --- a/wordpress.spec +++ b/wordpress.spec @@ -3,7 +3,7 @@ URL: http://www.wordpress.org Name: wordpress Version: 3.1.3 Group: Applications/Publishing -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Source0: http://wordpress.org/%{name}-%{version}.tar.gz Source1: wordpress-httpd-conf @@ -31,7 +31,7 @@ almost trivial, to get information out to people on the web. %setup -q -n wordpress %patch0 -p1 -b .dolly -%patch1 -p1 -b .rhbz522897 +#%patch1 -p1 -b .rhbz522897 %patch2 -p1 -b .FSFaddr # disable wp_version_check, updates are always installed via rpm @@ -63,7 +63,6 @@ rm -f ${RPM_BUILD_ROOT}%{_datadir}/wordpress/{license.txt,readme.html} # Remove bundled php-gettext and link to system copy rm -f ${RPM_BUILD_ROOT}%{_datadir}/wordpress/wp-includes/gettext.php -ln -sf /usr/share/php/php-gettext/gettext.php ${RPM_BUILD_ROOT}%{_datadir}/wordpress/wp-includes/gettext.php # Remove bundled php-simplepie and link to system copy rm -f ${RPM_BUILD_ROOT}%{_datadir}/wordpress/wp-includes/class-simplepie.php @@ -72,20 +71,20 @@ ln -sf /usr/share/php/php-simplepie/simplepie.inc ${RPM_BUILD_ROOT}%{_datadir}/w # Remove backup copies of patches find ${RPM_BUILD_ROOT} \( -name \*.dolly -o -name \*.rhbz522897 -o -name \*.FSFaddr \) -print -delete -# Move wp-content directory to /var/www location -mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/www/wordpress -mv -v ${RPM_BUILD_ROOT}%{_datadir}/wordpress/wp-content/ \ - ${RPM_BUILD_ROOT}%{_localstatedir}/www/wordpress +## Move wp-content directory to /var/www location +#mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/www/wordpress +#mv -v ${RPM_BUILD_ROOT}%{_datadir}/wordpress/wp-content/ \ +# ${RPM_BUILD_ROOT}%{_localstatedir}/www/wordpress -%post -if [ $1 -eq 2 ] ; then -# In case user has old wp-content from previous version, move it to -# the new location. -mv -v %{_datadir}/wordpress/wp-content/* \ - %{_localstatedir}/www/wordpress/wp-content/ -/sbin/restorecon -R %{_localstatedir}/www/wordpress/ -fi +#%post +#if [ $1 -eq 2 ] ; then +## In case user has old wp-content from previous version, move it to +## the new location. +#mv -uf %{_datadir}/wordpress/wp-content/* \ +# %{_localstatedir}/www/wordpress/ +#/sbin/restorecon -R %{_localstatedir}/www/wordpress/ +#fi %clean rm -rf ${RPM_BUILD_ROOT} @@ -95,8 +94,8 @@ rm -rf ${RPM_BUILD_ROOT} %config(noreplace) %{_sysconfdir}/httpd/conf.d/wordpress.conf %dir %{_datadir}/wordpress %{_datadir}/wordpress/wp-admin -%attr(-,apache,apache) %{_localstatedir}/www/wordpress/ %{_datadir}/wordpress/wp-includes +%{_datadir}/wordpress/wp-content %{_datadir}/wordpress/index.php %doc license.txt %doc readme.html @@ -108,6 +107,12 @@ rm -rf ${RPM_BUILD_ROOT} %dir %{_sysconfdir}/wordpress %changelog +* Thu Jun 02 2011 Matěj Cepl - 3.1.3-3 +- Actually, we just don't need gettext.php at all, it is provided by + php itself. Just remove the file, don't make a symlink. +- revert back to wp-content in /usr/share/wordpress, I am not able to make it + work. Not fixing BZ 522897. + * Wed Jun 01 2011 Matěj Cepl - 3.1.3-2 - Fix old FSF address and Summary to make rpmlint happy. - Make wp-content directory owned by apache:apache