Compare commits

...
Sign in to create a new pull request.

16 commits

Author SHA1 Message Date
52c2892b5b update to 4.1
(cherry picked from commit cdc67b2be0)
2014-12-22 07:11:58 +01:00
20bcf22980 WordPress 4.0.1 Security Release
(cherry picked from commit ede7a54071)
2014-11-21 08:21:04 +01:00
c50ab0badf update to WordPress 4.0 “Benny”
(cherry picked from commit 00237e3af1)
2014-09-08 13:44:29 +02:00
Remi Collet
a455c72ba9 - config dir only readable by apache group, better fix for #1124582
- fix license handling

(cherry picked from commit ebc8928969)
2014-08-08 11:19:24 +02:00
Remi Collet
45a1b4fd6d - update to 3.9.2 Security Release #1127547
- config file only readable by apache user (httpd or php-fpm) #1124582

(cherry picked from commit cde8ef0645)
2014-08-07 16:47:57 +02:00
ab39112954 update to 3.9.1
(cherry picked from commit 1e632fae73)
2014-05-09 06:46:22 +02:00
9e8e414ac2 update to 3.9 “Smith”
(cherry picked from commit 74719500d2)
2014-05-07 17:57:48 +02:00
3afabae760 update to 3.8.3
(cherry picked from commit 2f2b541a65)
2014-04-15 13:34:20 +02:00
4a9188b2ef update to 3.8.2 Security Release
- fix privilege escalation issue  CVE-2014-0165
- fix authentication bypass issue CVE-2014-0166

(cherry picked from commit 8bfaea7ed1)
2014-04-09 16:59:32 +02:00
a09673af15 update to 3.8.1 + disable auto-updater 2014-01-25 08:11:50 +01:00
Adam Williamson
5316ede6c9 new release 3.8.1 (bugfix, no security) 2014-01-23 19:47:06 -08:00
0b3d3d949a - update to 3.8 “Parker” #1043104
- link to README.fedora in package description
- add note about optional packages #1037516
- add php dependencies: ereg, ftp, gd, xml
- del php dependencies: pdo, reflection

(cherry picked from commit b99791fd2e)
2013-12-16 15:40:12 +01:00
d4d08cbaf8 update to 3.7.1 (bugfixes)
(cherry picked from commit 64afcf22fe)
2013-10-30 08:10:36 +01:00
329c2e1274 clean
(cherry picked from commit 18130dfcb7)
2013-10-25 15:07:54 +02:00
ded9b1d8d4 - update to 3.7
- requires ca-certificates for ca-bundle.crt
2013-10-25 14:50:42 +02:00
Paul Wouters
6011a98a43 * Thu Sep 12 2013 Paul Wouters <pwouters@redhat.com> - 3.6.1-1
- update to 3.6.1, various bugs and security fixes:
  CVE-2013-4338 CVE-2013-4339 CVE-2013-4340
2013-09-11 22:07:44 -04:00
13 changed files with 400 additions and 126 deletions

52
.gitignore vendored
View file

@ -1,42 +1,14 @@
*spec~
clog
wordpress-3.0.1.tar.gz
/wordpress-3.0.2.tar.gz
/wordpress-3.0.3.tar.gz
/wordpress-3.0.4.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
/wordpress-3.2-RC1.zip
/wordpress-3.2-RC3.zip
/wordpress-3.2.tar.gz
/wordpress-3.2.1.tar.gz
/wordpress-3.3-beta2.tar.gz
/wordpress-3.3-beta3.tar.gz
/wordpress-3.3-beta4.tar.gz
/wordpress-3.3-RC1.tar.gz
/wordpress-3.3-RC2.tar.gz
/wordpress-3.3.tar.gz
/wordpress-3.3.1.tar.gz
/wordpress-3.4-beta1.tar.gz
/wordpress-3.4-beta2.tar.gz
/wordpress-3.4-beta3.tar.gz
/wordpress-3.4-beta4.tar.gz
/wordpress-3.4-RC1.tar.gz
/wordpress-3.4-RC2.tar.gz
/wordpress-3.4-RC3.tar.gz
/wordpress-3.4.tar.gz
/wordpress-3.4.1.tar.gz
/wordpress-3.4.2.tar.gz
/wordpress-3.5-beta-1.tar.gz
/wordpress-3.5-beta2.tar.gz
/wordpress-3.5-beta3.tar.gz
/wordpress-3.5-RC1.tar.gz
/wordpress-3.5-RC2.tar.gz
/wordpress-3.5-RC3.tar.gz
/wordpress-3.5.tar.gz
/wordpress-3.5.1.tar.gz
/wordpress-3.5.2.tar.gz
/wordpress-3.6.tar.gz
/wordpress-3.7.tar.gz
/wordpress-3.7.1.tar.gz
/wordpress-3.8.tar.gz
/wordpress-3.8.1.tar.gz
/wordpress-3.8.2.tar.gz
/wordpress-3.8.3.tar.gz
/wordpress-3.9.tar.gz
/wordpress-3.9.1.tar.gz
/wordpress-3.9.2.tar.gz
/wordpress-4.0.tar.gz
/wordpress-4.0.1.tar.gz
/wordpress-4.1.tar.gz

View file

@ -1,3 +1,5 @@
-------------------------------------------------------------------------------
Wordpress is a database driven blogging program designed to make it exceedingly
easy to publish an online blog, sometimes also called a weblog or journal.
@ -44,6 +46,8 @@ open a web browser to http://localhost/wordpress/wp-admin/install.php and
follow the instructions given to you on the pages you see to set up the
database tables and begin publishing your blog.
-------------------------------------------------------------------------------
Wordpress ships with Flash and Silverlight plugins for the 'plupload' file
uploader and the 'mediaelement' media player embedder. The idea is to try and
be able to provide a multi-file uploader and an embedded video player when
@ -64,3 +68,19 @@ b) If you try to embed media into a Wordpress post using the [video] and
a browser that has HTML5 support for the media format in question; if not, the
'Download Media' link will be offered. No Flash or Silverlight-based player
element will be included.
-------------------------------------------------------------------------------
Optional dependencies:
You may wish to install the following packages:
php-pecl-imagick: optimize image transformation
php-pecl-ssh2: for file transfert using ssh
An opcode cache is also recommended:
php 5.5: php-opcache
php 5.4: php-pecl-zendopcache
php 5.3: php-pecl-apc
-------------------------------------------------------------------------------

View file

@ -1 +1 @@
ddbe1549dc27a260d28b47ad32eadd34 wordpress-3.6.tar.gz
5adac1bfc61b793a1ca9bcb4d67b4d28 wordpress-4.1.tar.gz

View file

@ -1,11 +0,0 @@
--- wordpress/wp-includes/js/mediaelement/mediaelement-and-player.min.js 2013-08-01 06:47:23.000000000 -0700
+++ wordpress/wp-includes/js/mediaelement/mediaelement-and-player.min.js.new 2013-08-23 16:02:01.491295485 -0700
@@ -37,7 +37,7 @@
this.attributes},removeAttribute:function(a){delete this.attributes[a]},getAttribute:function(a){if(this.hasAttribute(a))return this.attributes[a];return""},setAttribute:function(a,b){this.attributes[a]=b},remove:function(){mejs.Utility.removeSwf(this.pluginElement.id);mejs.MediaPluginBridge.unregisterPluginElement(this.pluginElement.id)}};
mejs.MediaPluginBridge={pluginMediaElements:{},htmlMediaElements:{},registerPluginElement:function(a,b,c){this.pluginMediaElements[a]=b;this.htmlMediaElements[a]=c},unregisterPluginElement:function(a){delete this.pluginMediaElements[a];delete this.htmlMediaElements[a]},initPlugin:function(a){var b=this.pluginMediaElements[a],c=this.htmlMediaElements[a];if(b){switch(b.pluginType){case "flash":b.pluginElement=b.pluginApi=document.getElementById(a);break;case "silverlight":b.pluginElement=document.getElementById(b.id);
b.pluginApi=b.pluginElement.Content.MediaElementJS}b.pluginApi!=null&&b.success&&b.success(b,c)}},fireEvent:function(a,b,c){var d,e;if(a=this.pluginMediaElements[a]){b={type:b,target:a};for(d in c){a[d]=c[d];b[d]=c[d]}e=c.bufferedTime||0;b.target.buffered=b.buffered={start:function(){return 0},end:function(){return e},length:1};a.dispatchEvent(b.type,b)}}};
-mejs.MediaElementDefaults={mode:"auto",plugins:["flash","silverlight","youtube","vimeo"],enablePluginDebug:false,httpsBasicAuthSite:false,type:"",pluginPath:mejs.Utility.getScriptPath(["mediaelement.js","mediaelement.min.js","mediaelement-and-player.js","mediaelement-and-player.min.js"]),flashName:"flashmediaelement.swf",flashStreamer:"",enablePluginSmoothing:false,enablePseudoStreaming:false,pseudoStreamingStartQueryParam:"start",silverlightName:"silverlightmediaelement.xap",defaultVideoWidth:480,
+mejs.MediaElementDefaults={mode:"auto",plugins:["youtube","vimeo"],enablePluginDebug:false,httpsBasicAuthSite:false,type:"",pluginPath:mejs.Utility.getScriptPath(["mediaelement.js","mediaelement.min.js","mediaelement-and-player.js","mediaelement-and-player.min.js"]),flashName:"flashmediaelement.swf",flashStreamer:"",enablePluginSmoothing:false,enablePseudoStreaming:false,pseudoStreamingStartQueryParam:"start",silverlightName:"silverlightmediaelement.xap",defaultVideoWidth:480,
defaultVideoHeight:270,pluginWidth:-1,pluginHeight:-1,pluginVars:[],timerRate:250,startVolume:0.8,success:function(){},error:function(){}};mejs.MediaElement=function(a,b){return mejs.HtmlMediaElementShim.create(a,b)};
mejs.HtmlMediaElementShim={create:function(a,b){var c=mejs.MediaElementDefaults,d=typeof a=="string"?document.getElementById(a):a,e=d.tagName.toLowerCase(),f=e==="audio"||e==="video",g=f?d.getAttribute("src"):d.getAttribute("href");e=d.getAttribute("poster");var h=d.getAttribute("autoplay"),l=d.getAttribute("preload"),j=d.getAttribute("controls"),k;for(k in b)c[k]=b[k];g=typeof g=="undefined"||g===null||g==""?null:g;e=typeof e=="undefined"||e===null?"":e;l=typeof l=="undefined"||l===null||l==="false"?
"none":l;h=!(typeof h=="undefined"||h===null||h==="false");j=!(typeof j=="undefined"||j===null||j==="false");k=this.determinePlayback(d,c,mejs.MediaFeatures.supportsMediaTag,f,g);k.url=k.url!==null?mejs.Utility.absolutizeUrl(k.url):"";if(k.method=="native"){if(mejs.MediaFeatures.isBustedAndroid){d.src=k.url;d.addEventListener("click",function(){d.play()},false)}return this.updateNative(k,c,h,l)}else if(k.method!=="")return this.createPlugin(k,c,e,h,l,j);else{this.createErrorMessage(k,c,e);return this}},

File diff suppressed because one or more lines are too long

View file

@ -1,7 +1,8 @@
--- wordpress/wp-includes/script-loader.php 2013-08-01 06:47:23.000000000 -0700
+++ wordpress/wp-includes/script-loader.php.new 2013-08-23 00:10:37.406222565 -0700
@@ -252,15 +252,6 @@
$scripts->add( 'wp-plupload', "/wp-includes/js/plupload/wp-plupload$suffix.js", array('plupload-all', 'jquery', 'json2', 'media-models'), false, 1 );
diff -up wordpress/wp-includes/script-loader.php.orig wordpress/wp-includes/script-loader.php
--- wordpress/wp-includes/script-loader.php.orig 2014-05-07 15:55:26.485228222 +0200
+++ wordpress/wp-includes/script-loader.php 2014-05-07 15:55:18.019198073 +0200
@@ -273,15 +273,6 @@ function wp_default_scripts( &$scripts )
$scripts->add( 'wp-plupload', "/wp-includes/js/plupload/wp-plupload$suffix.js", array( 'plupload', 'jquery', 'json2', 'media-models' ), false, 1 );
did_action( 'init' ) && $scripts->localize( 'wp-plupload', 'pluploadL10n', $uploader_l10n );
- // keep 'swfupload' for back-compat.
@ -13,6 +14,6 @@
- $scripts->add( 'swfupload-handlers', "/wp-includes/js/swfupload/handlers$suffix.js", array('swfupload-all', 'jquery'), '2201-20110524');
- did_action( 'init' ) && $scripts->localize( 'swfupload-handlers', 'swfuploadL10n', $uploader_l10n );
-
$scripts->add( 'comment-reply', "/wp-includes/js/comment-reply$suffix.js" );
$scripts->add( 'comment-reply', "/wp-includes/js/comment-reply$suffix.js", array(), false, 1 );
$scripts->add( 'json2', "/wp-includes/js/json2$suffix.js", array(), '2011-02-23');

View file

@ -0,0 +1,32 @@
diff -up wordpress/wp-config.php.orig wordpress/wp-config.php
--- wordpress/wp-config.php.orig 2014-09-08 13:12:36.525908423 +0200
+++ wordpress/wp-config.php 2014-09-08 13:14:33.583402525 +0200
@@ -62,6 +62,19 @@ define('NONCE_SALT', 'put your uni
$table_prefix = 'wp_';
/**
+ * See http://make.wordpress.org/core/2013/10/25/the-definitive-guide-to-disabling-auto-updates-in-wordpress-3-7
+ */
+
+/* Disable all file change, as RPM base installation are read-only */
+define('DISALLOW_FILE_MODS', true);
+
+/* Disable automatic updater, in case you want to allow
+ above FILE_MODS for plugins, themes, ... */
+define('AUTOMATIC_UPDATER_DISABLED', true);
+
+/* Core update is always disabled, WP_AUTO_UPDATE_CORE value is ignore */
+
+/**
* For developers: WordPress debugging mode.
*
* Change this to true to enable the display of notices during development.
@@ -74,7 +87,7 @@ define('WP_DEBUG', false);
/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
- define('ABSPATH', dirname(__FILE__) . '/');
+ define('ABSPATH', '/usr/share/wordpress');
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');

View file

@ -0,0 +1,21 @@
diff -up wordpress/wp-admin/includes/media.php.old wordpress/wp-admin/includes/media.php
--- wordpress/wp-admin/includes/media.php.old 2014-09-30 08:54:21.666519693 +0200
+++ wordpress/wp-admin/includes/media.php 2014-09-30 08:55:11.247757421 +0200
@@ -2907,7 +2907,7 @@ function wp_read_video_metadata( $file )
$metadata = array();
if ( ! class_exists( 'getID3' ) )
- require( ABSPATH . WPINC . '/ID3/getid3.php' );
+ require( '/usr/share/php/getid3/getid3.php' );
$id3 = new getID3();
$data = $id3->analyze( $file );
@@ -2962,7 +2962,7 @@ function wp_read_audio_metadata( $file )
$metadata = array();
if ( ! class_exists( 'getID3' ) )
- require( ABSPATH . WPINC . '/ID3/getid3.php' );
+ require( '/usr/share/php/getid3/getid3.php' );
$id3 = new getID3();
$data = $id3->analyze( $file );

View file

@ -0,0 +1,23 @@
diff -up wordpress/wp-includes/js/tinymce/plugins/media/plugin.js.rpm wordpress/wp-includes/js/tinymce/plugins/media/plugin.js
--- wordpress/wp-includes/js/tinymce/plugins/media/plugin.js.rpm 2014-08-22 01:53:18.000000000 +0200
+++ wordpress/wp-includes/js/tinymce/plugins/media/plugin.js 2014-09-08 13:10:15.717314458 +0200
@@ -44,10 +44,6 @@ tinymce.PluginManager.add('media', funct
return 'video/ogg';
}
- if (url.indexOf('.swf') != -1) {
- return 'application/x-shockwave-flash';
- }
-
return '';
}
@@ -239,7 +235,7 @@ tinymce.PluginManager.add('media', funct
data.source1mime = guessMime(data.source1);
data.source2mime = guessMime(data.source2);
data.poster = editor.convertURL(data.poster, "poster");
- data.flashPlayerUrl = editor.convertURL(url + '/moxieplayer.swf', "movie");
+ data.flashPlayerUrl = false;
tinymce.each(urlPatterns, function(pattern) {
var match, i, url;

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,86 @@
diff -up wordpress/wp-admin/includes/class-wp-upgrader.php.rpm wordpress/wp-admin/includes/class-wp-upgrader.php
--- wordpress/wp-admin/includes/class-wp-upgrader.php.rpm 2014-12-16 20:54:23.000000000 +0100
+++ wordpress/wp-admin/includes/class-wp-upgrader.php 2014-12-22 06:46:28.487097611 +0100
@@ -2141,6 +2141,9 @@ class Core_Upgrader extends WP_Upgrader
}
}
+ // RPM: nether allow core update
+ return false;
+
// 1: If we're already on that version, not much point in updating?
if ( $offered_ver == $wp_version )
return false;
@@ -2372,7 +2375,7 @@ class WP_Automatic_Updater {
*/
public function is_disabled() {
// Background updates are disabled if you don't want file changes.
- if ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS )
+ if ( !defined( 'DISALLOW_FILE_MODS' ) || DISALLOW_FILE_MODS )
return true;
if ( defined( 'WP_INSTALLING' ) )
diff -up wordpress/wp-admin/includes/update.php.rpm wordpress/wp-admin/includes/update.php
--- wordpress/wp-admin/includes/update.php.rpm 2014-11-30 12:28:24.000000000 +0100
+++ wordpress/wp-admin/includes/update.php 2014-12-22 06:46:28.487097611 +0100
@@ -211,8 +211,6 @@ function update_nag() {
}
echo "<div class='update-nag'>$msg</div>";
}
-add_action( 'admin_notices', 'update_nag', 3 );
-add_action( 'network_admin_notices', 'update_nag', 3 );
// Called directly from dashboard
function update_right_now_message() {
@@ -227,7 +225,7 @@ function update_right_now_message() {
$cur = get_preferred_from_update_core();
if ( isset( $cur->response ) && $cur->response == 'upgrade' )
- $msg .= " <a href='" . network_admin_url( 'update-core.php' ) . "' class='button'>" . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a>';
+ $msg .= '';
}
echo "<p id='wp-version-message'>$msg</p>";
diff -up wordpress/wp-includes/capabilities.php.rpm wordpress/wp-includes/capabilities.php
--- wordpress/wp-includes/capabilities.php.rpm 2014-12-01 02:34:24.000000000 +0100
+++ wordpress/wp-includes/capabilities.php 2014-12-22 06:46:28.487097611 +0100
@@ -1255,7 +1255,7 @@ function map_meta_cap( $cap, $user_id )
// Disallow the file editors.
if ( defined( 'DISALLOW_FILE_EDIT' ) && DISALLOW_FILE_EDIT )
$caps[] = 'do_not_allow';
- elseif ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS )
+ elseif ( !defined( 'DISALLOW_FILE_MODS' ) || DISALLOW_FILE_MODS )
$caps[] = 'do_not_allow';
elseif ( is_multisite() && ! is_super_admin( $user_id ) )
$caps[] = 'do_not_allow';
@@ -1273,7 +1273,7 @@ function map_meta_cap( $cap, $user_id )
case 'update_core':
// Disallow anything that creates, deletes, or updates core, plugin, or theme files.
// Files in uploads are excepted.
- if ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS ) {
+ if ( !defined( 'DISALLOW_FILE_MODS' ) || DISALLOW_FILE_MODS ) {
$caps[] = 'do_not_allow';
} elseif ( is_multisite() && ! is_super_admin( $user_id ) ) {
$caps[] = 'do_not_allow';
diff -up wordpress/wp-includes/update.php.rpm wordpress/wp-includes/update.php
--- wordpress/wp-includes/update.php.rpm 2014-12-22 06:48:34.883575009 +0100
+++ wordpress/wp-includes/update.php 2014-12-22 06:48:44.144609988 +0100
@@ -626,9 +626,6 @@ function _maybe_update_themes() {
* @since 3.1.0
*/
function wp_schedule_update_checks() {
- if ( !wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING') )
- wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
-
if ( !wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING') )
wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
@@ -671,8 +668,6 @@ if ( ( ! is_main_site() && ! is_network_
}
add_action( 'admin_init', '_maybe_update_core' );
-add_action( 'wp_version_check', 'wp_version_check' );
-add_action( 'upgrader_process_complete', 'wp_version_check', 10, 0 );
add_action( 'load-plugins.php', 'wp_update_plugins' );
add_action( 'load-update.php', 'wp_update_plugins' );

View file

@ -1,12 +0,0 @@
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

@ -1,19 +1,31 @@
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
%global wp_content %{_datadir}/wordpress/wp-content
%global betatag RC3
Summary: Blog tool and publishing platform
URL: http://www.wordpress.org
Name: wordpress
Version: 3.6
Group: Applications/Publishing
#Release: 0.5.%{betatag}%{?dist}
Release: 1%{?dist}
License: GPLv2
#Source0: http://wordpress.org/%{name}-%{version}-%{betatag}.tar.gz
Source0: http://wordpress.org/%{name}-%{version}.tar.gz
Source1: wordpress-httpd-conf
Source2: README.fedora.wordpress
Source3: README.fedora.wordpress-mu
%if 0%{?rhel} == 5
%global with_cacert 0
%else
%global with_cacert 1
%endif
# https://bugzilla.redhat.com/1147817 php53-getid3 review
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 6
%global with_getid3 1
%else
%global with_getid3 0
%endif
Summary: Blog tool and publishing platform
URL: http://www.wordpress.org
Name: wordpress
Version: 4.1
Group: Applications/Publishing
Release: 1%{?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
@ -21,15 +33,26 @@ Patch0: wordpress-debian_patches_hello.patch
# This patch doesnt work well, see bugzilla.redhat.com/522897
Patch1: wordpress-move-wp-content.patch
# Drop swfupload: not built from source, not reasonably possible to do
Patch2: wordpress-3.6-no_swfupload.patch
Patch2: wordpress-3.9-no_swfupload.patch
# Adjust tinymce's media plugin not to use its SWF plugin. This changes
# 'p.getParam("flash_video_player_url",u.convertUrl(u.url+"/moxieplayer.swf"))'
# to 'false'
Patch3: wordpress-3.6-tinymce_noflash.patch
Patch3: wordpress-4.0-tinymce_noflash.patch
# Adjust mediaelement not to use its SWF and Silverlight plugins. This
# changes 'plugins:["flash,"silverlight","youtube","vimeo"]' to
# 'plugins:["youtube","vimeo"]'
Patch4: wordpress-3.6-mediaelement-noflash_silverlight.patch
Patch4: wordpress-4.1-mediaelement-noflash_silverlight.patch
# RPM configuration:
# Path to installation
# Disable auto-updater
Patch5: wordpress-4.0-config.patch
# RPM are readonly
# disable version check and updated
# change DISALLOW_FILE_MODS default value to true
# ignore WP_AUTO_UPDATE_CORE (always false)
Patch6: wordpress-4.1-noupdate.patch
# Use system libraries
Patch7: wordpress-4.0-systemlibs.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@ -37,19 +60,26 @@ BuildArch: noarch
%if 0%{?rhel} == 5
Requires: php53 >= 5.2.4
Requires: php53-simplepie >= 1.3.1
%if %{with_getid3}
Requires: php53-getid3
%endif
%else
Requires: php >= 5.2.4
Requires: php-simplepie >= 1.3.1
%if %{with_getid3}
Requires: php-getid3
%endif
# Required php extension (detected by phpci)
%endif
# From phpcompatinfo report for version 3.8
Requires: php-curl
Requires: php-date
Requires: php-dom
Requires: php-enchant
# not yet available for RHEL Requires: php-ereg
Requires: php-ereg
Requires: php-exif
Requires: php-fileinfo
# not yet available for RHEL Requires: php-filter
Requires: php-ftp
Requires: php-gd
Requires: php-gettext
Requires: php-hash
Requires: php-iconv
@ -59,18 +89,20 @@ Requires: php-mbstring
Requires: php-mysql
Requires: php-openssl
Requires: php-pcre
Requires: php-pdo
Requires: php-posix
Requires: php-reflection
Requires: php-simplexml
Requires: php-sockets
Requires: php-spl
Requires: php-tokenizer
Requires: php-xml
Requires: php-zip
Requires: php-zlib
# Unbundled libraries
Requires: php-PHPMailer
Requires: webserver
Requires: httpd
%if %{with_cacert}
Requires: ca-certificates
%endif
Provides: wordpress-mu = %{version}-%{release}
Obsoletes: wordpress-mu < 2.9.3
@ -78,6 +110,9 @@ Obsoletes: wordpress-mu < 2.9.3
Wordpress is an online publishing / weblog package that makes it very easy,
almost trivial, to get information out to people on the web.
Important information in %{_pkgdocdir}/README.fedora
%prep
%setup -q -n wordpress
@ -94,43 +129,69 @@ almost trivial, to get information out to people on the web.
# and draw a non-functional button. - AdamW, 2013/08
# https://fedoraproject.org/wiki/Packaging:Guidelines#No_inclusion_of_pre-built_binaries_or_libraries
rm -f wp-includes/js/mediaelement/silverlightmediaelement.xap
rm -f wp-includes/js/mediaelement/flashmediaelement.sw
rm -f wp-includes/js/tinymce/plugins/media/moxieplayer.swf
rm -f wp-includes/js/plupload/plupload.silverlight.xap
rm -f wp-includes/js/plupload/plupload.silverlight.js
rm -f wp-includes/js/plupload/plupload.flash.swf
rm -f wp-includes/js/plupload/plupload.flash.js
rm wp-includes/js/mediaelement/silverlightmediaelement.xap
rm wp-includes/js/mediaelement/flashmediaelement.swf
rm wp-includes/js/tinymce/plugins/media/moxieplayer.swf
rm wp-includes/js/plupload/plupload.silverlight.xap
rm wp-includes/js/plupload/plupload.flash.swf
# swfupload can just die in its entirety
rm -rf wp-includes/js/swfupload
# remove .htaccess, protected by httpd config file
rm wp-content/plugins/akismet/.htaccess
%patch0 -p1 -b .dolly
#%patch1 -p1 -b .rhbz522897
#patch1 -p1 -b .rhbz522897
%patch2 -p1
%patch3 -p1
%patch4 -p1
%if %{with_getid3}
%patch7 -p1
%endif
# We patch a .js file, used patched file instead of unpatch minified one
ln -sf plugin.js wp-includes/js/tinymce/plugins/media/plugin.min.js
# Re-Generated the archive
arc=wp-includes/js/tinymce/wp-tinymce.js
gunzip -dc $arc.gz | \
grep "^// Source" | \
while read a b c
do
if [ -f $c ]; then
echo -e "\n$a $b $c"
cat $c
else
exit 1
fi
done >$arc
gzip --force $arc
ls -l $arc.gz
# Create RPM configuration
cp wp-config-sample.php wp-config.php
%patch5 -p1
%patch6 -p1
# disable wp_version_check, updates are always installed via rpm
sed -i -e "s,\(.*\)'wp_version_check'\(.*\),#\1'wp_version_check'\2,g" \
wp-includes/update.php
# disable update_nag() function
sed -i -e "s,\(.*\)'update_nag'\(.*\),#\1'update_nag'\2,g; \
s,\(.*\)\$msg .=\(.*\),\1\$msg .= '';,g;" \
wp-admin/includes/update.php
# 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
# Apache configuration
install -m 0644 -D -p %{SOURCE1} ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf.d/wordpress.conf
# Application
mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/wordpress
cp -pr * ${RPM_BUILD_ROOT}%{_datadir}/wordpress
cat wp-config-sample.php | sed -e "s|dirname(__FILE__).'/'|'/usr/share/wordpress/'|g" > \
${RPM_BUILD_ROOT}%{_sysconfdir}/wordpress/wp-config.php
# Configuration
install -m 0644 -D wp-config.php ${RPM_BUILD_ROOT}%{_sysconfdir}/wordpress/wp-config.php
/bin/ln -sf ../../../etc/wordpress/wp-config.php ${RPM_BUILD_ROOT}%{_datadir}/wordpress/wp-config.php
/bin/cp %{SOURCE2} ./README.fedora
/bin/cp %{SOURCE3} ./README.fedora-multiuser
@ -143,12 +204,12 @@ find ${RPM_BUILD_ROOT} -type f -empty -exec rm -vf {} \;
rm -f ${RPM_BUILD_ROOT}%{_datadir}/wordpress/{license.txt,readme.html}
# Remove bundled php-simplepie and link to system copy
rm ${RPM_BUILD_ROOT}%{_datadir}/wordpress/wp-includes/class-simplepie.php
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/wordpress/wp-includes/SimplePie
rm ${RPM_BUILD_ROOT}%{_datadir}/wordpress/wp-includes/class-simplepie.php
rm -r ${RPM_BUILD_ROOT}%{_datadir}/wordpress/wp-includes/SimplePie
%if 0%{?rhel} == 5
ln -sf /usr/share/php/php53-simplepie/autoloader.php \
ln -s /usr/share/php/php53-simplepie/autoloader.php \
%else
ln -sf /usr/share/php/php-simplepie/autoloader.php \
ln -s /usr/share/php/php-simplepie/autoloader.php \
%endif
${RPM_BUILD_ROOT}%{_datadir}/wordpress/wp-includes/class-simplepie.php
@ -160,8 +221,20 @@ for fic in phpmailer smtp; do
${RPM_BUILD_ROOT}%{_datadir}/wordpress/wp-includes/class-$fic.php
done
%if %{with_getid3}
# Remove bundled php-getid3
rm -r ${RPM_BUILD_ROOT}%{_datadir}/wordpress/wp-includes/ID3
%endif
# Remove bundled ca-bundle.crt
%if %{with_cacert}
rm ${RPM_BUILD_ROOT}%{_datadir}/wordpress/wp-includes/certificates/ca-bundle.crt
ln -s /etc/pki/tls/certs/ca-bundle.crt \
${RPM_BUILD_ROOT}%{_datadir}/wordpress/wp-includes/certificates/ca-bundle.crt
%endif
# Remove backup copies of patches
find ${RPM_BUILD_ROOT} \( -name \*.dolly -o -name \*.rhbz522897 -o -name \*.FSFaddr \) \
find ${RPM_BUILD_ROOT} \( -name \*.dolly -o -name \*.rhbz522897 -o -name \*.orig \) \
-print -delete
## Move wp-content directory to /var/www location
@ -177,6 +250,7 @@ find ${RPM_BUILD_ROOT} \( -name \*.dolly -o -name \*.rhbz522897 -o -name \*.FSFa
#/sbin/restorecon -R %{_localstatedir}/www/wordpress/
#fi
%clean
rm -rf ${RPM_BUILD_ROOT}
@ -195,16 +269,79 @@ rm -rf ${RPM_BUILD_ROOT}
%dir %attr(0775,apache,ftp) %{wp_content}/uploads
%{wp_content}/plugins/*
%{wp_content}/themes/*
%doc license.txt
%{!?_licensedir:%global license %%doc}
%license license.txt
%doc readme.html
%doc README.fedora
%doc README.fedora-multiuser
%{_datadir}/wordpress/wp-*.php
%config(noreplace) %{_sysconfdir}/wordpress/wp-config.php
%attr(750,root,apache) %dir %{_sysconfdir}/wordpress
%attr(640,root,apache) %config(noreplace) %{_sysconfdir}/wordpress/wp-config.php
%{_datadir}/wordpress/xmlrpc.php
%dir %{_sysconfdir}/wordpress
%changelog
* Mon Dec 22 2014 Remi Collet <remi@fedoraproject.org> - 4.1-1
- WordPress 4.1 “Dinah”
* Fri Nov 21 2014 Remi Collet <remi@fedoraproject.org> - 4.0.1-1
- WordPress 4.0.1 Security Release
- use system php-getid3 when available #1145574
* Mon Sep 8 2014 Remi Collet <remi@fedoraproject.org> - 4.0-1
- WordPress 4.0 “Benny”
* Fri Aug 8 2014 Remi Collet <remi@fedoraproject.org> - 3.9.2-3
- config dir only readable by apache group, better fix for #1124582
- fix license handling
* Thu Aug 7 2014 Remi Collet <remi@fedoraproject.org> - 3.9.2-2
- update to 3.9.2 Security Release #1127547
- config file only readable by apache user (httpd or php-fpm) #1124582
* Fri May 9 2014 Remi Collet <remi@fedoraproject.org> - 3.9.1-1
- update to 3.9.1 Maintenance Release
* Wed May 7 2014 Remi Collet <remi@fedoraproject.org> - 3.9-1
- update to 3.9 “Smith”
* Tue Apr 15 2014 Remi Collet <remi@fedoraproject.org> - 3.8.3-1
- update to 3.8.3 Maintenance Release
http://wordpress.org/news/2014/04/wordpress-3-8-3/
* Wed Apr 9 2014 Remi Collet <remi@fedoraproject.org> - 3.8.2-1
- update to 3.8.2 Security Release
- fix privilege escalation issue CVE-2014-0165
- fix authentication bypass issue CVE-2014-0166
* Sat Jan 25 2014 Remi Collet <remi@fedoraproject.org> - 3.8.1-3
- ignore WP_AUTO_UPDATE_CORE (always false)
* Fri Jan 24 2014 Remi Collet <remi@fedoraproject.org> - 3.8.1-2
- comment provided configuration about auto-updater
- disable auto-updater on default configuration #1057521
- switch some sed to patch (more robust)
* Thu Jan 23 2014 Adam Williamson <awilliam@redhat.com> - 3.8.1-1
- new upstream release 3.8.1 (bugfixes)
* Mon Dec 16 2013 Remi Collet <rcollet@redhat.com> - 3.8-1
- update to 3.8 “Parker” #1043104
- link to README.fedora in package description
- add note about optional packages #1037516
- add php dependencies: ereg, ftp, gd, xml
- del php dependencies: pdo, reflection
* Wed Oct 30 2013 Remi Collet <rcollet@redhat.com> - 3.7.1-1
- update to 3.7.1 (bugfixes)
* Fri Oct 25 2013 Remi Collet <rcollet@redhat.com> - 3.7-1
- update to 3.7
- requires ca-certificates for ca-bundle.crt
* Thu Sep 12 2013 Paul Wouters <pwouters@redhat.com> - 3.6.1-1
- update to 3.6.1, various bugs and security fixes:
CVE-2013-4338 CVE-2013-4339 CVE-2013-4340
* Thu Aug 22 2013 Adam Williamson <awilliam@redhat.com> - 3.6.0-1
- update to 3.6.0
- drop pre-compiled Flash and Silverlight binaries - #1000267