diff --git a/.gitignore b/.gitignore index 8662ae3..4b3fcfe 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ clog /wordpress-3.8.1.tar.gz /wordpress-3.8.2.tar.gz /wordpress-3.8.3.tar.gz +/wordpress-3.9.tar.gz diff --git a/sources b/sources index 0000d7e..287b682 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -90e9ec8a90e59322144737f30ef8799f wordpress-3.8.3.tar.gz +d0b0396e84942faf87ccde819df0916f wordpress-3.9.tar.gz diff --git a/wordpress-3.6-tinymce_noflash.patch b/wordpress-3.6-tinymce_noflash.patch deleted file mode 100644 index a5d0a7f..0000000 --- a/wordpress-3.6-tinymce_noflash.patch +++ /dev/null @@ -1,6 +0,0 @@ ---- wordpress/wp-includes/js/tinymce/plugins/media/editor_plugin.js 2012-07-07 09:22:53.000000000 -0700 -+++ wordpress/wp-includes/js/tinymce/plugins/media/editor_plugin.js.new 2013-08-23 11:57:22.032012144 -0700 -@@ -1 +1 @@ --(function(){var b=tinymce.explode("id,name,width,height,style,align,class,hspace,vspace,bgcolor,type"),a=tinymce.makeMap(b.join(",")),f=tinymce.html.Node,d,i,h=tinymce.util.JSON,g;d=[["Flash","d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],["ShockWave","166b1bca-3f9c-11cf-8075-444553540000","application/x-director","http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"],["WindowsMedia","6bf52a52-394a-11d3-b153-00c04f79faa6,22d6f312-b0f6-11d0-94ab-0080c74c7e95,05589fa1-c356-11ce-bf01-00aa0055595a","application/x-mplayer2","http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"],["QuickTime","02bf25d5-8c17-4b23-bc80-d3488abddc6b","video/quicktime","http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"],["RealMedia","cfcdaa03-8be4-11cf-b84b-0020afbbccfa","audio/x-pn-realaudio-plugin","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],["Java","8ad9c840-044e-11d1-b3e9-00805f499d93","application/x-java-applet","http://java.sun.com/products/plugin/autodl/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0"],["Silverlight","dfeaf541-f3e1-4c24-acac-99c30715084a","application/x-silverlight-2"],["Iframe"],["Video"],["EmbeddedAudio"],["Audio"]];function e(j){return typeof(j)=="string"?j.replace(/[^0-9%]/g,""):j}function c(m){var l,j,k;if(m&&!m.splice){j=[];for(k=0;true;k++){if(m[k]){j[k]=m[k]}else{break}}return j}return m}tinymce.create("tinymce.plugins.MediaPlugin",{init:function(n,j){var r=this,l={},m,p,q,k;function o(s){return s&&s.nodeName==="IMG"&&n.dom.hasClass(s,"mceItemMedia")}r.editor=n;r.url=j;i="";for(m=0;m0){O+=(O?"&":"")+P+"="+escape(Q)}});if(O.length){G.params.flashvars=O}L=p.getParam("flash_video_player_params",{allowfullscreen:true,allowscriptaccess:true});tinymce.each(L,function(Q,P){G.params[P]=""+Q})}}G=z.attr("data-mce-json");if(!G){return}G=h.parse(G);q=this.getType(z.attr("class"));B=z.attr("data-mce-style");if(!B){B=z.attr("style");if(B){B=p.dom.serializeStyle(p.dom.parseStyle(B,"img"))}}G.width=z.attr("width")||G.width;G.height=z.attr("height")||G.height;if(q.name==="Iframe"){x=new f("iframe",1);tinymce.each(b,function(n){var J=z.attr(n);if(n=="class"&&J){J=J.replace(/mceItem.+ ?/g,"")}if(J&&J.length>0){x.attr(n,J)}});for(I in G.params){x.attr(I,G.params[I])}x.attr({style:B,src:G.params.src});z.replace(x);return}if(this.editor.settings.media_use_script){x=new f("script",1).attr("type","text/javascript");y=new f("#text",3);y.value="write"+q.name+"("+h.serialize(tinymce.extend(G.params,{width:z.attr("width"),height:z.attr("height")}))+");";x.append(y);z.replace(x);return}if(q.name==="Video"&&G.video.sources[0]){C=new f("video",1).attr(tinymce.extend({id:z.attr("id"),width:e(z.attr("width")),height:e(z.attr("height")),style:B},G.video.attrs));if(G.video.attrs){l=G.video.attrs.poster}k=G.video.sources=c(G.video.sources);for(A=0;A0){O+=(O?"&":"")+P+"="+escape(Q)}});if(O.length){G.params.flashvars=O}L=p.getParam("flash_video_player_params",{allowfullscreen:true,allowscriptaccess:true});tinymce.each(L,function(Q,P){G.params[P]=""+Q})}}G=z.attr("data-mce-json");if(!G){return}G=h.parse(G);q=this.getType(z.attr("class"));B=z.attr("data-mce-style");if(!B){B=z.attr("style");if(B){B=p.dom.serializeStyle(p.dom.parseStyle(B,"img"))}}G.width=z.attr("width")||G.width;G.height=z.attr("height")||G.height;if(q.name==="Iframe"){x=new f("iframe",1);tinymce.each(b,function(n){var J=z.attr(n);if(n=="class"&&J){J=J.replace(/mceItem.+ ?/g,"")}if(J&&J.length>0){x.attr(n,J)}});for(I in G.params){x.attr(I,G.params[I])}x.attr({style:B,src:G.params.src});z.replace(x);return}if(this.editor.settings.media_use_script){x=new f("script",1).attr("type","text/javascript");y=new f("#text",3);y.value="write"+q.name+"("+h.serialize(tinymce.extend(G.params,{width:z.attr("width"),height:z.attr("height")}))+");";x.append(y);z.replace(x);return}if(q.name==="Video"&&G.video.sources[0]){C=new f("video",1).attr(tinymce.extend({id:z.attr("id"),width:e(z.attr("width")),height:e(z.attr("height")),style:B},G.video.attrs));if(G.video.attrs){l=G.video.attrs.poster}k=G.video.sources=c(G.video.sources);for(A=0;Aadd( '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 +@@ -278,15 +278,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'); diff --git a/wordpress-3.8.1-noupdate.patch b/wordpress-3.9-noupdate.patch similarity index 72% rename from wordpress-3.8.1-noupdate.patch rename to wordpress-3.9-noupdate.patch index c2b2f6f..e72d370 100644 --- a/wordpress-3.8.1-noupdate.patch +++ b/wordpress-3.9-noupdate.patch @@ -1,7 +1,7 @@ diff -up wordpress/wp-admin/includes/class-wp-upgrader.php.nop wordpress/wp-admin/includes/class-wp-upgrader.php ---- wordpress/wp-admin/includes/class-wp-upgrader.php.nop 2013-12-11 20:49:11.000000000 +0100 -+++ wordpress/wp-admin/includes/class-wp-upgrader.php 2014-01-25 07:51:32.794892043 +0100 -@@ -1479,6 +1479,9 @@ class Core_Upgrader extends WP_Upgrader +--- wordpress/wp-admin/includes/class-wp-upgrader.php.nop 2014-04-15 12:57:14.000000000 +0200 ++++ wordpress/wp-admin/includes/class-wp-upgrader.php 2014-05-07 17:25:04.434588696 +0200 +@@ -1546,6 +1546,9 @@ class Core_Upgrader extends WP_Upgrader } } @@ -11,7 +11,7 @@ diff -up wordpress/wp-admin/includes/class-wp-upgrader.php.nop wordpress/wp-admi // 1: If we're already on that version, not much point in updating? if ( $offered_ver == $wp_version ) return false; -@@ -1640,7 +1643,7 @@ class WP_Automatic_Updater { +@@ -1734,7 +1737,7 @@ class WP_Automatic_Updater { */ public function is_disabled() { // Background updates are disabled if you don't want file changes. @@ -21,8 +21,8 @@ diff -up wordpress/wp-admin/includes/class-wp-upgrader.php.nop wordpress/wp-admi if ( defined( 'WP_INSTALLING' ) ) diff -up wordpress/wp-admin/includes/update.php.nop wordpress/wp-admin/includes/update.php ---- wordpress/wp-admin/includes/update.php.nop 2013-12-02 22:55:10.000000000 +0100 -+++ wordpress/wp-admin/includes/update.php 2014-01-25 07:48:42.202268342 +0100 +--- wordpress/wp-admin/includes/update.php.nop 2014-04-16 02:38:14.000000000 +0200 ++++ wordpress/wp-admin/includes/update.php 2014-05-07 17:26:14.139840288 +0200 @@ -216,8 +216,6 @@ function update_nag() { } echo "
$msg
"; @@ -32,7 +32,7 @@ diff -up wordpress/wp-admin/includes/update.php.nop wordpress/wp-admin/includes/ // Called directly from dashboard function update_right_now_message() { -@@ -227,7 +225,7 @@ function update_right_now_message() { +@@ -232,7 +230,7 @@ function update_right_now_message() { $cur = get_preferred_from_update_core(); if ( isset( $cur->response ) && $cur->response == 'upgrade' ) @@ -40,11 +40,11 @@ diff -up wordpress/wp-admin/includes/update.php.nop wordpress/wp-admin/includes/ + $msg .= ''; } - echo "$msg"; + echo "

$msg

"; diff -up wordpress/wp-includes/capabilities.php.nop wordpress/wp-includes/capabilities.php ---- wordpress/wp-includes/capabilities.php.nop 2013-11-13 05:39:08.000000000 +0100 -+++ wordpress/wp-includes/capabilities.php 2014-01-25 07:48:42.202268342 +0100 -@@ -1251,7 +1251,7 @@ function map_meta_cap( $cap, $user_id ) +--- wordpress/wp-includes/capabilities.php.nop 2014-03-04 04:09:15.000000000 +0100 ++++ wordpress/wp-includes/capabilities.php 2014-05-07 17:25:04.434588696 +0200 +@@ -1238,7 +1238,7 @@ function map_meta_cap( $cap, $user_id ) // Disallow the file editors. if ( defined( 'DISALLOW_FILE_EDIT' ) && DISALLOW_FILE_EDIT ) $caps[] = 'do_not_allow'; @@ -53,7 +53,7 @@ diff -up wordpress/wp-includes/capabilities.php.nop wordpress/wp-includes/capabi $caps[] = 'do_not_allow'; elseif ( is_multisite() && ! is_super_admin( $user_id ) ) $caps[] = 'do_not_allow'; -@@ -1267,7 +1267,7 @@ function map_meta_cap( $cap, $user_id ) +@@ -1254,7 +1254,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. @@ -63,9 +63,9 @@ diff -up wordpress/wp-includes/capabilities.php.nop wordpress/wp-includes/capabi elseif ( is_multisite() && ! is_super_admin( $user_id ) ) $caps[] = 'do_not_allow'; diff -up wordpress/wp-includes/update.php.nop wordpress/wp-includes/update.php ---- wordpress/wp-includes/update.php.nop 2013-11-15 04:04:10.000000000 +0100 -+++ wordpress/wp-includes/update.php 2014-01-25 07:48:42.202268342 +0100 -@@ -574,9 +574,6 @@ function _maybe_update_themes() { +--- wordpress/wp-includes/update.php.nop 2014-04-16 02:38:14.000000000 +0200 ++++ wordpress/wp-includes/update.php 2014-05-07 17:25:04.435588699 +0200 +@@ -602,9 +602,6 @@ function _maybe_update_themes() { * @since 3.1.0 */ function wp_schedule_update_checks() { @@ -75,7 +75,7 @@ diff -up wordpress/wp-includes/update.php.nop wordpress/wp-includes/update.php if ( !wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING') ) wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins'); -@@ -602,8 +599,6 @@ if ( ( ! is_main_site() && ! is_network_ +@@ -630,8 +627,6 @@ if ( ( ! is_main_site() && ! is_network_ return; add_action( 'admin_init', '_maybe_update_core' ); diff --git a/wordpress-3.9-tinymce_noflash.patch b/wordpress-3.9-tinymce_noflash.patch new file mode 100644 index 0000000..ab974d0 --- /dev/null +++ b/wordpress-3.9-tinymce_noflash.patch @@ -0,0 +1,22 @@ +--- wordpress/wp-includes/js/tinymce/plugins/media/plugin.js.old 2014-05-07 17:03:41.009962331 +0200 ++++ wordpress/wp-includes/js/tinymce/plugins/media/plugin.js 2014-05-07 17:04:08.549061421 +0200 +@@ -41,10 +41,6 @@ + return 'video/ogg'; + } + +- if (url.indexOf('.swf') != -1) { +- return 'application/x-shockwave-flash'; +- } +- + return ''; + } + +@@ -198,7 +194,7 @@ + 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; + + if (data.embed) { + html = updateHtml(data.embed, data, true); diff --git a/wordpress.spec b/wordpress.spec index 6ceaa69..dfd39a5 100644 --- a/wordpress.spec +++ b/wordpress.spec @@ -10,7 +10,7 @@ Summary: Blog tool and publishing platform URL: http://www.wordpress.org Name: wordpress -Version: 3.8.3 +Version: 3.9 Group: Applications/Publishing Release: 1%{?dist} License: GPLv2 @@ -27,15 +27,15 @@ Patch0: wordpress-debian_patches_hello.patch # This patch doesn’t 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-3.9-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-3.9-mediaelement-noflash_silverlight.patch # RPM configuration: # Path to installation # Disable auto-updater @@ -44,7 +44,7 @@ Patch5: wordpress-3.8.1-config.patch # disable version check and updated # change DISALLOW_FILE_MODS default value to true # ignore WP_AUTO_UPDATE_CORE (always false) -Patch6: wordpress-3.8.1-noupdate.patch +Patch6: wordpress-3.9-noupdate.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -115,13 +115,11 @@ Important information in %{_pkgdocdir}/README.fedora # 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 @@ -132,6 +130,25 @@ rm -rf wp-includes/js/swfupload %patch3 -p1 %patch4 -p1 +# 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 @@ -236,6 +253,9 @@ rm -rf ${RPM_BUILD_ROOT} %dir %{_sysconfdir}/wordpress %changelog +* Wed May 7 2014 Remi Collet - 3.9-1 +- update to 3.9 “Smith” + * Tue Apr 15 2014 Remi Collet - 3.8.3-1 - update to 3.8.3 Maintenance Release http://wordpress.org/news/2014/04/wordpress-3-8-3/