diff --git a/.gitignore b/.gitignore index a86355c..eee2c6e 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,13 @@ clog /wordpress-4.5.1.tar.gz /wordpress-4.5.2.tar.gz /wordpress-4.5.3.tar.gz +/wordpress-debian_patches_hello.patch +/wordpress-4.6.tar.gz +/wordpress-4.6.1.tar.gz +/wordpress-4.7.tar.gz +/wordpress-4.7.1.tar.gz +/wordpress-4.7.2.tar.gz +/wordpress-4.7.3.tar.gz +/wordpress-4.7.4.tar.gz +/wordpress-4.7.5.tar.gz +/wordpress-4.8.tar.gz diff --git a/sources b/sources index 6f22991..de99ee2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6cd70fcceb7050bfe22fc03e801e0305 wordpress-4.5.3.tar.gz +SHA512 (wordpress-4.8.tar.gz) = 20249cf13dbcec198df3ec1feb3a7381c194c7c9f832262e40449f90c5e5b5d3f4b63b6021e78c65cc615e059b1b601881d33ce03e1e4618231329b680511467 diff --git a/wordpress-4.0-tinymce_noflash.patch b/wordpress-4.0-tinymce_noflash.patch deleted file mode 100644 index 217e7f9..0000000 --- a/wordpress-4.0-tinymce_noflash.patch +++ /dev/null @@ -1,23 +0,0 @@ -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 -@@ -46,10 +46,6 @@ tinymce.PluginManager.add('media', funct - return 'video/ogg'; - } - -- if (url.indexOf('.swf') != -1) { -- return 'application/x-shockwave-flash'; -- } -- - return ''; - } - -@@ -247,7 +243,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; diff --git a/wordpress-4.5-noupdate.patch b/wordpress-4.5-noupdate.patch deleted file mode 100644 index f4a64c5..0000000 --- a/wordpress-4.5-noupdate.patch +++ /dev/null @@ -1,108 +0,0 @@ -diff -up wordpress/wp-admin/includes/admin-filters.php.orig wordpress/wp-admin/includes/admin-filters.php ---- wordpress/wp-admin/includes/admin-filters.php.orig 2015-10-15 00:35:24.000000000 +0200 -+++ wordpress/wp-admin/includes/admin-filters.php 2015-12-09 17:08:00.945112230 +0100 -@@ -100,7 +100,6 @@ add_action( 'profile_update', 'default_p - add_action( 'admin_init', 'wp_plugin_update_rows' ); - add_action( 'admin_init', 'wp_theme_update_rows' ); - --add_action( 'admin_notices', 'update_nag', 3 ); - add_action( 'admin_notices', 'maintenance_nag', 10 ); - - add_filter( 'update_footer', 'core_update_footer' ); -diff -up wordpress/wp-admin/includes/class-wp-upgrader.php.orig wordpress/wp-admin/includes/class-wp-upgrader.php ---- wordpress/wp-admin/includes/class-wp-upgrader.php.orig 2015-11-16 03:47:25.000000000 +0100 -+++ wordpress/wp-admin/includes/class-wp-upgrader.php 2015-12-09 17:09:34.735571806 +0100 -@@ -2465,6 +2465,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; -@@ -2706,7 +2709,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 ( wp_installing() ) -diff -up wordpress/wp-admin/includes/update.php.orig wordpress/wp-admin/includes/update.php ---- wordpress/wp-admin/includes/update.php.orig 2015-12-09 17:08:00.946112235 +0100 -+++ wordpress/wp-admin/includes/update.php 2015-12-09 17:10:27.642831054 +0100 -@@ -251,7 +251,7 @@ function update_right_now_message() { - $cur = get_preferred_from_update_core(); - - if ( isset( $cur->response ) && $cur->response == 'upgrade' ) -- $msg .= '' . sprintf( __( 'Update to %s' ), $cur->current ? $cur->current : __( 'Latest' ) ) . ' '; -+ $msg .= ''; - } - - /* translators: 1: version number, 2: theme name */ -diff -up wordpress/wp-includes/capabilities.php.orig wordpress/wp-includes/capabilities.php ---- wordpress/wp-includes/capabilities.php.orig 2015-11-29 03:27:18.000000000 +0100 -+++ wordpress/wp-includes/capabilities.php 2015-12-09 17:08:00.946112235 +0100 -@@ -310,7 +310,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'; -@@ -328,7 +328,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.orig wordpress/wp-includes/update.php ---- wordpress/wp-includes/update.php.orig 2015-12-06 16:44:27.000000000 +0100 -+++ wordpress/wp-includes/update.php 2015-12-09 17:12:09.038327895 +0100 -@@ -653,9 +653,6 @@ function _maybe_update_themes() { - * @since 3.1.0 - */ - function wp_schedule_update_checks() { -- if ( ! wp_next_scheduled( 'wp_version_check' ) && ! wp_installing() ) -- wp_schedule_event(time(), 'twicedaily', 'wp_version_check'); -- - if ( ! wp_next_scheduled( 'wp_update_plugins' ) && ! wp_installing() ) - wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins'); - -@@ -683,8 +680,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' ); ---- wordpress/wp-admin/includes/translation-install.php.orig 2016-03-25 14:48:58.616147092 +0100 -+++ wordpress/wp-admin/includes/translation-install.php 2016-03-25 14:50:43.841612441 +0100 -@@ -181,7 +181,7 @@ function wp_download_language_pack( $dow - return $download; - } - -- if ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS ) { -+ if ( !defined( 'DISALLOW_FILE_MODS' ) || DISALLOW_FILE_MODS ) { - return false; - } - -@@ -224,7 +224,7 @@ function wp_download_language_pack( $dow - * @return bool Returns true on success, false on failure. - */ - function wp_can_install_language_pack() { -- if ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS ) { -+ if ( !defined( 'DISALLOW_FILE_MODS' ) || DISALLOW_FILE_MODS ) { - return false; - } - diff --git a/wordpress-4.8-noupdate.patch b/wordpress-4.8-noupdate.patch new file mode 100644 index 0000000..b2e2f37 --- /dev/null +++ b/wordpress-4.8-noupdate.patch @@ -0,0 +1,71 @@ +diff -up wordpress/wp-admin/includes/admin-filters.php.rpm wordpress/wp-admin/includes/admin-filters.php +--- wordpress/wp-admin/includes/admin-filters.php.rpm 2016-07-31 20:11:29.000000000 +0200 ++++ wordpress/wp-admin/includes/admin-filters.php 2017-06-09 13:27:51.184747881 +0200 +@@ -106,7 +106,6 @@ add_action( 'profile_update', 'default_p + add_action( 'load-plugins.php', 'wp_plugin_update_rows', 20 ); // After wp_update_plugins() is called. + add_action( 'load-themes.php', 'wp_theme_update_rows', 20 ); // After wp_update_themes() is called. + +-add_action( 'admin_notices', 'update_nag', 3 ); + add_action( 'admin_notices', 'maintenance_nag', 10 ); + + add_filter( 'update_footer', 'core_update_footer' ); +diff -up wordpress/wp-admin/includes/class-core-upgrader.php.rpm wordpress/wp-admin/includes/class-core-upgrader.php +--- wordpress/wp-admin/includes/class-core-upgrader.php.rpm 2016-07-08 15:19:30.000000000 +0200 ++++ wordpress/wp-admin/includes/class-core-upgrader.php 2017-06-09 13:27:51.184747881 +0200 +@@ -236,6 +236,9 @@ class Core_Upgrader extends WP_Upgrader + * @return bool True if we should update to the offered version, otherwise false. + */ + public static function should_update_to_version( $offered_ver ) { ++ // RPM: nether allow core update ++ return false; ++ + include( ABSPATH . WPINC . '/version.php' ); // $wp_version; // x.y.z + + $current_branch = implode( '.', array_slice( preg_split( '/[.-]/', $wp_version ), 0, 2 ) ); // x.y +diff -up wordpress/wp-admin/includes/class-wp-automatic-updater.php.rpm wordpress/wp-admin/includes/class-wp-automatic-updater.php +--- wordpress/wp-admin/includes/class-wp-automatic-updater.php.rpm 2017-06-09 13:27:51.184747881 +0200 ++++ wordpress/wp-admin/includes/class-wp-automatic-updater.php 2017-06-09 13:30:18.175525864 +0200 +@@ -38,7 +38,7 @@ class WP_Automatic_Updater { + return true; + + // More fine grained control can be done through the WP_AUTO_UPDATE_CORE constant and filters. +- $disabled = defined( 'AUTOMATIC_UPDATER_DISABLED' ) && AUTOMATIC_UPDATER_DISABLED; ++ $disabled = !defined( 'AUTOMATIC_UPDATER_DISABLED' ) || AUTOMATIC_UPDATER_DISABLED; + + /** + * Filters whether to entirely disable background updates. +diff -up wordpress/wp-admin/includes/update.php.rpm wordpress/wp-admin/includes/update.php +--- wordpress/wp-admin/includes/update.php.rpm 2017-05-06 16:30:40.000000000 +0200 ++++ wordpress/wp-admin/includes/update.php 2017-06-09 13:27:51.185747886 +0200 +@@ -279,7 +279,7 @@ function update_right_now_message() { + $cur = get_preferred_from_update_core(); + + if ( isset( $cur->response ) && $cur->response == 'upgrade' ) +- $msg .= '' . sprintf( __( 'Update to %s' ), $cur->current ? $cur->current : __( 'Latest' ) ) . ' '; ++ $msg .= ''; + } + + /* translators: 1: version number, 2: theme name */ +diff -up wordpress/wp-includes/load.php.rpm wordpress/wp-includes/load.php +--- wordpress/wp-includes/load.php.rpm 2017-06-09 13:33:24.946514394 +0200 ++++ wordpress/wp-includes/load.php 2017-06-09 13:33:35.654571069 +0200 +@@ -1108,5 +1108,5 @@ function wp_is_file_mod_allowed( $contex + * @param bool $file_mod_allowed Whether file modifications are allowed. + * @param string $context The usage context. + */ +- return apply_filters( 'file_mod_allowed', ! defined( 'DISALLOW_FILE_MODS' ) || ! DISALLOW_FILE_MODS, $context ); ++ return apply_filters( 'file_mod_allowed', defined( 'DISALLOW_FILE_MODS' ) && ! DISALLOW_FILE_MODS, $context ); + } +diff -up wordpress/wp-includes/update.php.rpm wordpress/wp-includes/update.php +--- wordpress/wp-includes/update.php.rpm 2017-05-06 16:30:40.000000000 +0200 ++++ wordpress/wp-includes/update.php 2017-06-09 13:27:51.185747886 +0200 +@@ -683,9 +683,6 @@ function _maybe_update_themes() { + * @since 3.1.0 + */ + function wp_schedule_update_checks() { +- if ( ! wp_next_scheduled( 'wp_version_check' ) && ! wp_installing() ) +- wp_schedule_event(time(), 'twicedaily', 'wp_version_check'); +- + if ( ! wp_next_scheduled( 'wp_update_plugins' ) && ! wp_installing() ) + wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins'); + diff --git a/wordpress-4.8-tinymce_noflash.patch b/wordpress-4.8-tinymce_noflash.patch new file mode 100644 index 0000000..f2a5cde --- /dev/null +++ b/wordpress-4.8-tinymce_noflash.patch @@ -0,0 +1,31 @@ +--- ./wp-includes/js/tinymce/plugins/media/plugin.js.orig 2017-06-09 13:24:42.303748183 +0200 ++++ ./wp-includes/js/tinymce/plugins/media/plugin.js 2017-06-09 13:25:21.965958105 +0200 +@@ -937,8 +937,7 @@ + 'wav': 'audio/wav', + 'mp4': 'video/mp4', + 'webm': 'video/webm', +- 'ogg': 'video/ogg', +- 'swf': 'application/x-shockwave-flash' ++ 'ogg': 'video/ogg' + }; + var fileEnd = url.toLowerCase().split('.').pop(); + var mime = mimes[fileEnd]; +@@ -1111,18 +1110,6 @@ + '" width="' + data.width + + '" height="' + data.height + + '"' + allowFullscreen + '>'; +- } else if (data.source1mime === "application/x-shockwave-flash") { +- html += +- ''; +- +- if (data.poster) { +- html += ''; +- } +- +- html += ''; + } else if (data.source1mime.indexOf('audio') !== -1) { + if (editor.settings.audio_template_callback) { + html = editor.settings.audio_template_callback(data); diff --git a/wordpress.spec b/wordpress.spec index 3eb0fc7..2c48138 100644 --- a/wordpress.spec +++ b/wordpress.spec @@ -14,18 +14,12 @@ %global with_nginx 0 %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 #global prever RC1 Summary: Blog tool and publishing platform URL: http://www.wordpress.org Name: wordpress -Version: 4.5.3 +Version: 4.8 Group: Applications/Publishing Release: 1%{?dist} License: GPLv2 @@ -47,7 +41,7 @@ Patch2: wordpress-4.4-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-4.0-tinymce_noflash.patch +Patch3: wordpress-4.8-tinymce_noflash.patch # RPM configuration: # Path to installation # Disable auto-updater @@ -56,20 +50,12 @@ Patch5: wordpress-4.0-config.patch # disable version check and updated # change DISALLOW_FILE_MODS default value to true # ignore WP_AUTO_UPDATE_CORE (always false) -Patch6: wordpress-4.5-noupdate.patch +Patch6: wordpress-4.8-noupdate.patch # Use system libraries Patch7: wordpress-4.4-systemlibs.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 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 %if %{with_nginx} Requires: webserver Requires: php(httpd) @@ -77,20 +63,20 @@ Suggests: httpd # For directory ownership Requires: httpd-filesystem Requires: nginx-filesystem + %else Requires: php >= 5.2.4 %endif Requires: php-simplepie >= 1.3.1 -%if %{with_getid3} Requires: php-getid3 -%endif -%endif -# From phpcompatinfo report for version 3.8 +Requires: php-ctype +Requires: php-filter +Requires: php-mysqli + +# From phpcompatinfo report for version 4.5.3 Requires: php-curl Requires: php-date Requires: php-dom -Requires: php-enchant -Requires: php-ereg Requires: php-exif Requires: php-fileinfo Requires: php-ftp @@ -101,7 +87,6 @@ Requires: php-iconv Requires: php-json Requires: php-libxml Requires: php-mbstring -Requires: php-mysql Requires: php-openssl Requires: php-pcre Requires: php-posix @@ -145,7 +130,6 @@ Important information in %{_pkgdocdir}/README.fedora 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 @@ -163,9 +147,7 @@ rm wp-content/plugins/akismet/.htaccess # changes 'plugins:["flash,"silverlight","youtube","vimeo"]' to # 'plugins:["youtube","vimeo"]' sed -s 's/"flash","silverlight",//' -i wp-includes/js/mediaelement/mediaelement-and-player.min.js -%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 @@ -227,11 +209,7 @@ 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 -r ${RPM_BUILD_ROOT}%{_datadir}/wordpress/wp-includes/SimplePie -%if 0%{?rhel} == 5 -ln -s /usr/share/php/php53-simplepie/autoloader.php \ -%else ln -s /usr/share/php/php-simplepie/autoloader.php \ -%endif ${RPM_BUILD_ROOT}%{_datadir}/wordpress/wp-includes/class-simplepie.php # Remove bundled PHPMailer and link to system one @@ -242,10 +220,8 @@ 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 rm ${RPM_BUILD_ROOT}%{_datadir}/wordpress/wp-includes/certificates/ca-bundle.crt @@ -270,11 +246,7 @@ find ${RPM_BUILD_ROOT} \( -name \*.dolly -o -name \*.rhbz522897 -o -name \*.orig #fi -%clean -rm -rf ${RPM_BUILD_ROOT} - %files -%defattr(-,root,root,-) %config(noreplace) %{_sysconfdir}/httpd/conf.d/wordpress.conf %if %{with_nginx} %config(noreplace) %{_sysconfdir}/nginx/default.d/wordpress.conf @@ -285,10 +257,10 @@ rm -rf ${RPM_BUILD_ROOT} %{_datadir}/wordpress/index.php %dir %{wp_content}/ %{wp_content}/index.php -%dir %attr(0775,apache,ftp) %{wp_content}/plugins -%dir %attr(0775,apache,ftp) %{wp_content}/themes -%dir %attr(0775,apache,ftp) %{wp_content}/upgrade -%dir %attr(0775,apache,ftp) %{wp_content}/uploads +%dir %attr(2775,apache,ftp) %{wp_content}/plugins +%dir %attr(2775,apache,ftp) %{wp_content}/themes +%dir %attr(2775,apache,ftp) %{wp_content}/upgrade +%dir %attr(2775,apache,ftp) %{wp_content}/uploads %{wp_content}/plugins/* %{wp_content}/themes/* %{!?_licensedir:%global license %%doc} @@ -303,6 +275,34 @@ rm -rf ${RPM_BUILD_ROOT} %changelog +* Fri Jun 9 2017 Remi Collet - 4.8-1 +- WordPress 4.8 “Evans” + +* Wed May 17 2017 Remi Collet - 4.7.5-1 +- WordPress 4.7.5 Security and Maintenance Release + +* Sat Apr 22 2017 Kevin Fenzi - 4.7.4-1 +- Update to 4.7.4. Maintenance Release. + +* Tue Mar 7 2017 Remi Collet - 4.7.3-1 +- WordPress 4.7.3 Security and Maintenance Release + +* Fri Jan 27 2017 Remi Collet - 4.7.2-1 +- WordPress 4.7.2 Security Release + +* Thu Jan 12 2017 Remi Collet - 4.7.1-1 +- WordPress 4.7.1 Security and Maintenance Release + +* Wed Dec 7 2016 Remi Collet - 4.7.0-1 +- WordPress 4.7 “Vaughan” + +* Thu Sep 8 2016 Remi Collet - 4.6.1-1 +- WordPress 4.6.1 Security and Maintenance Release + +* Sat Sep 3 2016 Remi Collet - 4.6-2 +- WordPress 4.6 “Pepper” +- fix directory permissions #1305687 + * Wed Jun 22 2016 Remi Collet - 4.5.3-1 - WordPress 4.5.3 Maintenance and Security Release