Merge branch 'master' into el6

This commit is contained in:
Matěj Cepl 2011-06-01 21:03:32 +02:00
commit 5510653bfd
5 changed files with 75 additions and 31 deletions

1
.gitignore vendored
View file

@ -5,3 +5,4 @@ wordpress-3.0.1.tar.gz
/wordpress-3.1.tar.gz
/wordpress-3.1.1.tar.gz
/wordpress-3.1.2.tar.gz
/wordpress-3.1.3.tar.gz

View file

@ -1 +1 @@
a2dee4df1cf5e1539ffba2da49a6cfa7 wordpress-3.1.2.tar.gz
dd0323f13f5b1c44636bb3db5ca1c717 wordpress-3.1.3.tar.gz

View file

@ -0,0 +1,12 @@
diff -up wordpress/wp-includes/kses.php.FSFaddr wordpress/wp-includes/kses.php
--- wordpress/wp-includes/kses.php.FSFaddr 2011-05-25 23:54:34.347025847 +0200
+++ wordpress/wp-includes/kses.php 2011-05-25 23:56:18.403727954 +0200
@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit
+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
* http://www.gnu.org/licenses/gpl.html
*
* [kses strips evil scripts!]

View file

@ -0,0 +1,12 @@
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
@@ -39,7 +39,7 @@ function wp_initial_constants( ) {
@ini_set('memory_limit', WP_MEMORY_LIMIT);
if ( !defined('WP_CONTENT_DIR') )
- define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); // no trailing slash, full paths only - WP_CONTENT_URL is defined further down
+ define( 'WP_CONTENT_DIR', '/var/www/wordpress/wp-content' ); // no trailing slash, full paths only - WP_CONTENT_URL is defined further down
// Add define('WP_DEBUG', true); to wp-config.php to enable display of notices during development.
if ( !defined('WP_DEBUG') )

View file

@ -1,18 +1,26 @@
Summary: WordPress blogging software
Summary: Blog tool and publishing platform
URL: http://www.wordpress.org
Name: wordpress
Version: 3.1.2
Version: 3.1.3
Group: Applications/Publishing
Release: 1%{?dist}
Release: 2%{?dist}
License: GPLv2
Source0: http://wordpress.org/%{name}-%{version}.tar.gz
Source1: wordpress-httpd-conf
Source2: README.fedora.wordpress
Source3: README.fedora.wordpress-mu
# Patch out copyrighted text of Hello, Dolly
# (and replace it with Free Software Song)
Patch0: wordpress-debian_patches_hello.patch
# Move wp-content to /var/www/wordpress/
Patch1: wordpress-move-wp-content.patch
# Fix FSF address (again) ... patch posted upstream
# http://core.trac.wordpress.org/ticket/14967
Patch2: wordpress-FSF-address.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: php >= 4.1.0, webserver, php-mysql, php-gettext, php-simplepie
Obsoletes: wordpress-mu
Provides: wordpress-mu = %{version}-%{release}
Obsoletes: wordpress-mu < 2.9.3
BuildArch: noarch
%description
@ -23,6 +31,8 @@ almost trivial, to get information out to people on the web.
%setup -q -n wordpress
%patch0 -p1 -b .dolly
%patch1 -p1 -b .rhbz522897
%patch2 -p1 -b .FSFaddr
# disable wp_version_check, updates are always installed via rpm
sed -i -e "s,\(.*\)'wp_version_check'\(.*\),#\1'wp_version_check'\2,g" \
@ -34,6 +44,8 @@ sed -i -e "s,\(.*\)'update_nag'\(.*\),#\1'update_nag'\2,g; \
# fix file encoding
sed -i -e 's/\r//' license.txt
%build
%install
mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/wordpress
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/wordpress
@ -45,18 +57,36 @@ cat wp-config-sample.php | sed -e "s|dirname(__FILE__).'/'|'/usr/share/wordpress
/bin/cp %{SOURCE2} ./README.fedora
/bin/cp %{SOURCE3} ./README.fedora-multiuser
# Remove empty files to make rpmlint happy
find ${RPM_BUILD_ROOT} -type f -empty -exec rm -f {} \;
find ${RPM_BUILD_ROOT} -type f -empty -exec rm -vf {} \;
# These are docs, remove them from here, docify them later
rm -f ${RPM_BUILD_ROOT}%{_datadir}/wordpress/{license.txt,readme.html}
#Remove bundled php-gettext and link to system copy
# 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
# Remove bundled php-simplepie and link to system copy
rm -f ${RPM_BUILD_ROOT}%{_datadir}/wordpress/wp-includes/class-simplepie.php
ln -sf /usr/share/php/php-simplepie/simplepie.inc ${RPM_BUILD_ROOT}%{_datadir}/wordpress/wp-includes/class-simplepie.php
# 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
%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
%clean
rm -rf ${RPM_BUILD_ROOT}
@ -65,40 +95,29 @@ rm -rf ${RPM_BUILD_ROOT}
%config(noreplace) %{_sysconfdir}/httpd/conf.d/wordpress.conf
%dir %{_datadir}/wordpress
%{_datadir}/wordpress/wp-admin
%{_datadir}/wordpress/wp-content
%attr(-,apache,apache) %{_localstatedir}/www/wordpress/
%{_datadir}/wordpress/wp-includes
%{_datadir}/wordpress/index.php
%doc license.txt
%doc readme.html
%doc README.fedora
%doc README.fedora-multiuser
%{_datadir}/wordpress/wp-atom.php
%{_datadir}/wordpress/wp-app.php
%{_datadir}/wordpress/wp-blog-header.php
%{_datadir}/wordpress/wp-comments-post.php
%{_datadir}/wordpress/wp-commentsrss2.php
%{_datadir}/wordpress/wp-config-sample.php
%{_datadir}/wordpress/wp-config.php
%{_datadir}/wordpress/wp-*.php
%config(noreplace) %{_sysconfdir}/wordpress/wp-config.php
%{_datadir}/wordpress/wp-cron.php
%{_datadir}/wordpress/wp-feed.php
%{_datadir}/wordpress/wp-links-opml.php
%{_datadir}/wordpress/wp-load.php
%{_datadir}/wordpress/wp-login.php
%{_datadir}/wordpress/wp-mail.php
%{_datadir}/wordpress/wp-pass.php
%{_datadir}/wordpress/wp-rdf.php
%{_datadir}/wordpress/wp-register.php
%{_datadir}/wordpress/wp-rss.php
%{_datadir}/wordpress/wp-rss2.php
%{_datadir}/wordpress/wp-settings.php
%{_datadir}/wordpress/wp-trackback.php
%{_datadir}/wordpress/xmlrpc.php
%dir %{_sysconfdir}/wordpress
%{_datadir}/wordpress/wp-activate.php
%{_datadir}/wordpress/wp-signup.php
%changelog
* Wed Jun 01 2011 Matěj Cepl <mcepl@redhat.com> - 3.1.3-2
- Fix old FSF address and Summary to make rpmlint happy.
- Make wp-content directory owned by apache:apache
- Correctly Provides/Obsoletes (with versions)
* Wed May 25 2011 Matěj Cepl <mcepl@redhat.com> - 3.1.3-1
- Upgrade to the latest upstream version (security fixes and enhancements, BZ 707772)
- Move wp-content directory to /var/www/wordpress/ (BZ 522897)
- Simplify overly detailed %%files
* Sun May 01 2011 Matěj Cepl <mcepl@redhat.com> - 3.1.2-1
- New upstream release.