From a93d4e6b593a6a3fc335c9639e4973470a67b918 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 13 Apr 2016 08:42:50 +0200 Subject: [PATCH 1/6] =?UTF-8?q?WordPress=204.5=20=E2=80=9CColeman=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ sources | 2 +- ...date.patch => wordpress-4.5-noupdate.patch | 32 +++++++++++++++---- wordpress.spec | 10 ++++-- 4 files changed, 36 insertions(+), 10 deletions(-) rename wordpress-4.4-noupdate.patch => wordpress-4.5-noupdate.patch (78%) diff --git a/.gitignore b/.gitignore index 470921f..f562157 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,5 @@ clog /wordpress-4.4.tar.gz /wordpress-4.4.1.tar.gz /wordpress-4.4.2.tar.gz +/wordpress-4.5-RC1.tar.gz +/wordpress-4.5.tar.gz diff --git a/sources b/sources index 5452e24..d1991bb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -65d89263dad6154fdc8b747e9ef4e357 wordpress-4.4.2.tar.gz +6beda5bee679ddff61cb8e2e163f23bf wordpress-4.5.tar.gz diff --git a/wordpress-4.4-noupdate.patch b/wordpress-4.5-noupdate.patch similarity index 78% rename from wordpress-4.4-noupdate.patch rename to wordpress-4.5-noupdate.patch index d02cf71..f4a64c5 100644 --- a/wordpress-4.4-noupdate.patch +++ b/wordpress-4.5-noupdate.patch @@ -12,7 +12,7 @@ diff -up wordpress/wp-admin/includes/admin-filters.php.orig wordpress/wp-admin/i 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 -@@ -2386,6 +2386,9 @@ class Core_Upgrader extends WP_Upgrader +@@ -2465,6 +2465,9 @@ class Core_Upgrader extends WP_Upgrader } } @@ -22,7 +22,7 @@ diff -up wordpress/wp-admin/includes/class-wp-upgrader.php.orig wordpress/wp-adm // 1: If we're already on that version, not much point in updating? if ( $offered_ver == $wp_version ) return false; -@@ -2627,7 +2630,7 @@ class WP_Automatic_Updater { +@@ -2706,7 +2709,7 @@ class WP_Automatic_Updater { */ public function is_disabled() { // Background updates are disabled if you don't want file changes. @@ -46,7 +46,7 @@ diff -up wordpress/wp-admin/includes/update.php.orig wordpress/wp-admin/includes 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 -@@ -308,7 +308,7 @@ function map_meta_cap( $cap, $user_id ) +@@ -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'; @@ -55,7 +55,7 @@ diff -up wordpress/wp-includes/capabilities.php.orig wordpress/wp-includes/capab $caps[] = 'do_not_allow'; elseif ( is_multisite() && ! is_super_admin( $user_id ) ) $caps[] = 'do_not_allow'; -@@ -326,7 +326,7 @@ function map_meta_cap( $cap, $user_id ) +@@ -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. @@ -67,7 +67,7 @@ diff -up wordpress/wp-includes/capabilities.php.orig wordpress/wp-includes/capab 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 -@@ -637,9 +637,6 @@ function _maybe_update_themes() { +@@ -653,9 +653,6 @@ function _maybe_update_themes() { * @since 3.1.0 */ function wp_schedule_update_checks() { @@ -77,7 +77,7 @@ diff -up wordpress/wp-includes/update.php.orig wordpress/wp-includes/update.php if ( ! wp_next_scheduled( 'wp_update_plugins' ) && ! wp_installing() ) wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins'); -@@ -681,8 +678,6 @@ if ( ( ! is_main_site() && ! is_network_ +@@ -683,8 +680,6 @@ if ( ( ! is_main_site() && ! is_network_ } add_action( 'admin_init', '_maybe_update_core' ); @@ -86,3 +86,23 @@ diff -up wordpress/wp-includes/update.php.orig wordpress/wp-includes/update.php 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.spec b/wordpress.spec index 7c42dd9..4d71d4f 100644 --- a/wordpress.spec +++ b/wordpress.spec @@ -19,16 +19,17 @@ %else %global with_getid3 0 %endif +#global prever RC1 Summary: Blog tool and publishing platform URL: http://www.wordpress.org Name: wordpress -Version: 4.4.2 +Version: 4.5 Group: Applications/Publishing Release: 1%{?dist} License: GPLv2 -Source0: http://wordpress.org/%{name}-%{version}.tar.gz +Source0: http://wordpress.org/%{name}-%{version}%{?prever:-%{prever}}.tar.gz Source1: wordpress-httpd-conf Source2: README.fedora.wordpress Source3: README.fedora.wordpress-mu @@ -53,7 +54,7 @@ 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.4-noupdate.patch +Patch6: wordpress-4.5-noupdate.patch # Use system libraries Patch7: wordpress-4.4-systemlibs.patch @@ -287,6 +288,9 @@ rm -rf ${RPM_BUILD_ROOT} %changelog +* Wed Apr 13 2016 Remi Collet - 4.5-1 +- WordPress 4.5 “Coleman” + * Wed Feb 3 2016 Remi Collet - 4.4.2-1 - WordPress 4.4.2 Security and Maintenance Release From efc2c3609cf049611dc882ba2ea5de33059fa373 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 27 Apr 2016 06:57:51 +0200 Subject: [PATCH 2/6] WordPress 4.5.1 Maintenance Release (cherry picked from commit f295541234a01891f3dc8c072ac2fa8868b3b119) --- .gitignore | 1 + sources | 2 +- wordpress.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index f562157..83607f2 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ clog /wordpress-4.4.2.tar.gz /wordpress-4.5-RC1.tar.gz /wordpress-4.5.tar.gz +/wordpress-4.5.1.tar.gz diff --git a/sources b/sources index d1991bb..7ba038d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6beda5bee679ddff61cb8e2e163f23bf wordpress-4.5.tar.gz +203dded9c917a541c5b5b63e611fc51f wordpress-4.5.1.tar.gz diff --git a/wordpress.spec b/wordpress.spec index 4d71d4f..b553cf7 100644 --- a/wordpress.spec +++ b/wordpress.spec @@ -24,7 +24,7 @@ Summary: Blog tool and publishing platform URL: http://www.wordpress.org Name: wordpress -Version: 4.5 +Version: 4.5.1 Group: Applications/Publishing Release: 1%{?dist} License: GPLv2 @@ -288,6 +288,9 @@ rm -rf ${RPM_BUILD_ROOT} %changelog +* Wed Apr 27 2016 Remi Collet - 4.5.1-1 +- WordPress 4.5.1 Maintenance Release + * Wed Apr 13 2016 Remi Collet - 4.5-1 - WordPress 4.5 “Coleman” From 27ee5166176eeeebc858b2069e3ce43b66068e1a Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 11 May 2016 07:17:38 +0200 Subject: [PATCH 3/6] WordPress 4.5.2 Security Release (cherry picked from commit 22f8927f3aa3d0967546d6d01261d8977c96d46e) --- .gitignore | 1 + sources | 2 +- wordpress.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 83607f2..193f109 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ clog /wordpress-4.5-RC1.tar.gz /wordpress-4.5.tar.gz /wordpress-4.5.1.tar.gz +/wordpress-4.5.2.tar.gz diff --git a/sources b/sources index 7ba038d..7c020d2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -203dded9c917a541c5b5b63e611fc51f wordpress-4.5.1.tar.gz +056da124260ed5b4465ec1fb2f9b7155 wordpress-4.5.2.tar.gz diff --git a/wordpress.spec b/wordpress.spec index b553cf7..8090c3a 100644 --- a/wordpress.spec +++ b/wordpress.spec @@ -24,7 +24,7 @@ Summary: Blog tool and publishing platform URL: http://www.wordpress.org Name: wordpress -Version: 4.5.1 +Version: 4.5.2 Group: Applications/Publishing Release: 1%{?dist} License: GPLv2 @@ -288,6 +288,9 @@ rm -rf ${RPM_BUILD_ROOT} %changelog +* Tue May 10 2016 Remi Collet - 4.5.2-1 +- WordPress 4.5.2 Security Release + * Wed Apr 27 2016 Remi Collet - 4.5.1-1 - WordPress 4.5.1 Maintenance Release From 9abc1b7ba9cf70814fdd7da7c20fb8a447f75659 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 22 Jun 2016 11:06:11 +0200 Subject: [PATCH 4/6] WordPress 4.5.3 Maintenance and Security Release --- .gitignore | 1 + sources | 2 +- wordpress-httpd-conf | 12 ++++++++++++ wordpress-nginx-conf | 35 +++++++++++++++++++++++++++++++++++ wordpress.spec | 42 ++++++++++++++++++++++++++++++++---------- 5 files changed, 81 insertions(+), 11 deletions(-) create mode 100644 wordpress-nginx-conf diff --git a/.gitignore b/.gitignore index 193f109..a86355c 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ clog /wordpress-4.5.tar.gz /wordpress-4.5.1.tar.gz /wordpress-4.5.2.tar.gz +/wordpress-4.5.3.tar.gz diff --git a/sources b/sources index 7c020d2..6f22991 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -056da124260ed5b4465ec1fb2f9b7155 wordpress-4.5.2.tar.gz +6cd70fcceb7050bfe22fc03e801e0305 wordpress-4.5.3.tar.gz diff --git a/wordpress-httpd-conf b/wordpress-httpd-conf index c4266b4..68ca0a3 100644 --- a/wordpress-httpd-conf +++ b/wordpress-httpd-conf @@ -1,5 +1,8 @@ Alias /wordpress /usr/share/wordpress +# Access is only allowed via local access +# Change this once configured + AllowOverride Options @@ -15,7 +18,16 @@ Alias /wordpress /usr/share/wordpress + + # Deny access to any php file in the uploads directory + + Order Deny,Allow + Deny from all + + + + # Deny access to any php file in the akismet directory Order Deny,Allow Deny from all diff --git a/wordpress-nginx-conf b/wordpress-nginx-conf new file mode 100644 index 0000000..e41cc6a --- /dev/null +++ b/wordpress-nginx-conf @@ -0,0 +1,35 @@ +# Wordpress + +location = /wordpress { + alias /usr/share/wordpress/; +} + +location /wordpress/ { + root /usr/share; + index index.php; + + location ~ ^/wordpress/wp-content/uploads/(.+)\.php$ { + # Deny access to any php file in the uploads directory + deny all; + } + location ~ ^/wordpress/wp-content/plugins/akismet/(.+)\.php$ { + # Deny access to any php file in the akismet directory + deny all; + } + + # Access is only allowed via local access + # Change this once configured + location ~ ^/wordpress/(.+\.php)$ { + allow 127.0.0.1; + allow ::1; + deny all; + + try_files $uri =404; + fastcgi_intercept_errors on; + include fastcgi_params; + fastcgi_param SERVER_NAME $host; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_pass php-fpm; + } +} + diff --git a/wordpress.spec b/wordpress.spec index 8090c3a..ca0dd22 100644 --- a/wordpress.spec +++ b/wordpress.spec @@ -8,11 +8,12 @@ %{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}} %global wp_content %{_datadir}/wordpress/wp-content -%if 0%{?rhel} == 5 -%global with_cacert 0 +%if 0%{?fedora} >= 21 +%global with_nginx 1 %else -%global with_cacert 1 +%global with_nginx 0 %endif + # https://bugzilla.redhat.com/1147817 php53-getid3 review %if 0%{?fedora} >= 17 || 0%{?rhel} >= 6 %global with_getid3 1 @@ -24,7 +25,7 @@ Summary: Blog tool and publishing platform URL: http://www.wordpress.org Name: wordpress -Version: 4.5.2 +Version: 4.5.3 Group: Applications/Publishing Release: 1%{?dist} License: GPLv2 @@ -33,6 +34,7 @@ Source0: http://wordpress.org/%{name}-%{version}%{?prever:-%{prever}}.tar.gz Source1: wordpress-httpd-conf Source2: README.fedora.wordpress Source3: README.fedora.wordpress-mu +Source4: wordpress-nginx-conf # Patch out copyrighted text of Hello, Dolly # (and replace it with Free Software Song) @@ -68,7 +70,16 @@ Requires: php53-simplepie >= 1.3.1 Requires: php53-getid3 %endif %else +%if %{with_nginx} +Requires: webserver +Requires: php(httpd) +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 @@ -104,9 +115,8 @@ Requires: php-zlib # Unbundled libraries Requires: php-PHPMailer Requires: httpd -%if %{with_cacert} -Requires: ca-certificates -%endif +# ca-certificates (excepted on EL-5) +Requires: %{_sysconfdir}/pki/tls/certs/ca-bundle.crt Provides: wordpress-mu = %{version}-%{release} Obsoletes: wordpress-mu < 2.9.3 @@ -191,6 +201,10 @@ sed -i -e 's/\r//' license.txt # Apache configuration install -m 0644 -D -p %{SOURCE1} ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf.d/wordpress.conf +%if %{with_nginx} +install -m 0644 -D -p %{SOURCE4} ${RPM_BUILD_ROOT}%{_sysconfdir}/nginx/default.d/wordpress.conf +%endif + # Application mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/wordpress cp -pr * ${RPM_BUILD_ROOT}%{_datadir}/wordpress @@ -234,11 +248,9 @@ 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 \ +ln -s %{_sysconfdir}/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 \*.orig \) \ @@ -264,6 +276,9 @@ 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 +%endif %dir %{_datadir}/wordpress %{_datadir}/wordpress/wp-admin %{_datadir}/wordpress/wp-includes @@ -288,6 +303,13 @@ rm -rf ${RPM_BUILD_ROOT} %changelog +* Wed Jun 22 2016 Remi Collet - 4.5.3-1 +- WordPress 4.5.3 Maintenance and Security Release +- never bundle ca-bundle.crt (EL-5) +- provide nginx configuration (fedora) +- drop mandatory dependency on httpd (suggested) #1336091 +- protect php files in uploads directory + * Tue May 10 2016 Remi Collet - 4.5.2-1 - WordPress 4.5.2 Security Release From 0b1de333680651324d7729ce2c0148b6023cb6f8 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sat, 3 Sep 2016 08:50:49 +0200 Subject: [PATCH 5/6] =?UTF-8?q?WordPress=204.6=20=E2=80=9CPepper=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit cc7bdefab7ca5ffe696d33e1f0160a6f881f1c62) --- .gitignore | 2 + sources | 2 +- wordpress-4.5-noupdate.patch | 108 ----------------------------------- wordpress-4.6-noupdate.patch | 103 +++++++++++++++++++++++++++++++++ wordpress.spec | 30 ++++++---- 5 files changed, 125 insertions(+), 120 deletions(-) delete mode 100644 wordpress-4.5-noupdate.patch create mode 100644 wordpress-4.6-noupdate.patch diff --git a/.gitignore b/.gitignore index a86355c..7ab8d07 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,5 @@ 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 diff --git a/sources b/sources index 6f22991..e275cdf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6cd70fcceb7050bfe22fc03e801e0305 wordpress-4.5.3.tar.gz +b07bb75bb0f85fd6e1a65ad3d0b876d8 wordpress-4.6.tar.gz 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.6-noupdate.patch b/wordpress-4.6-noupdate.patch new file mode 100644 index 0000000..0038d1e --- /dev/null +++ b/wordpress-4.6-noupdate.patch @@ -0,0 +1,103 @@ +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-09-03 07:50:51.812312381 +0200 ++++ wordpress/wp-admin/includes/admin-filters.php 2016-09-03 07:51:39.070577518 +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-09-03 07:59:45.832367671 +0200 ++++ wordpress/wp-admin/includes/class-core-upgrader.php 2016-09-03 07:59:50.160392833 +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 2016-09-03 08:00:15.810540773 +0200 ++++ wordpress/wp-admin/includes/class-wp-automatic-updater.php 2016-09-03 08:00:28.915616106 +0200 +@@ -31,7 +31,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/translation-install.php.rpm wordpress/wp-admin/includes/translation-install.php +--- wordpress/wp-admin/includes/translation-install.php.rpm 2016-05-22 20:01:30.000000000 +0200 ++++ wordpress/wp-admin/includes/translation-install.php 2016-09-03 07:50:51.813312387 +0200 +@@ -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 -up wordpress/wp-admin/includes/update.php.rpm wordpress/wp-admin/includes/update.php +--- wordpress/wp-admin/includes/update.php.rpm 2016-08-10 21:06:31.000000000 +0200 ++++ wordpress/wp-admin/includes/update.php 2016-09-03 07:50:51.812312381 +0200 +@@ -271,7 +271,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.rpm wordpress/wp-includes/capabilities.php +--- wordpress/wp-includes/capabilities.php.rpm 2016-06-30 03:02:29.000000000 +0200 ++++ wordpress/wp-includes/capabilities.php 2016-09-03 07:50:51.812312381 +0200 +@@ -330,7 +330,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'; +@@ -348,7 +348,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 2016-05-25 21:36:28.000000000 +0200 ++++ wordpress/wp-includes/update.php 2016-09-03 07:50:51.813312387 +0200 +@@ -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'); + diff --git a/wordpress.spec b/wordpress.spec index ca0dd22..d1d25a2 100644 --- a/wordpress.spec +++ b/wordpress.spec @@ -25,9 +25,9 @@ Summary: Blog tool and publishing platform URL: http://www.wordpress.org Name: wordpress -Version: 4.5.3 +Version: 4.6 Group: Applications/Publishing -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Source0: http://wordpress.org/%{name}-%{version}%{?prever:-%{prever}}.tar.gz @@ -56,7 +56,7 @@ 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.6-noupdate.patch # Use system libraries Patch7: wordpress-4.4-systemlibs.patch @@ -69,6 +69,8 @@ Requires: php53-simplepie >= 1.3.1 %if %{with_getid3} Requires: php53-getid3 %endif +Requires: php53-mysql + %else %if %{with_nginx} Requires: webserver @@ -77,6 +79,7 @@ Suggests: httpd # For directory ownership Requires: httpd-filesystem Requires: nginx-filesystem + %else Requires: php >= 5.2.4 %endif @@ -84,13 +87,15 @@ Requires: php-simplepie >= 1.3.1 %if %{with_getid3} Requires: php-getid3 %endif +Requires: php-ctype +Requires: php-filter +Requires: php-mysqli %endif -# From phpcompatinfo report for version 3.8 + +# 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 +106,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 @@ -285,10 +289,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 +307,10 @@ rm -rf ${RPM_BUILD_ROOT} %changelog +* Sat Sep 3 2016 Remi Collet - 4.6-2 +- WordPress 4.6 “Pepper” +- fix direftory permissions #1305687 + * Wed Jun 22 2016 Remi Collet - 4.5.3-1 - WordPress 4.5.3 Maintenance and Security Release - never bundle ca-bundle.crt (EL-5) From ea9fc3e9840d1f2b3f424957010bf34e6827cf91 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 8 Sep 2016 08:44:09 +0200 Subject: [PATCH 6/6] WordPress 4.6.1 Security and Maintenance Release (cherry picked from commit b2e1003fecedab032434c32b5a1ee710fd8a1e63) --- .gitignore | 1 + sources | 2 +- wordpress.spec | 9 ++++++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 7ab8d07..a4d5620 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ clog /wordpress-4.5.3.tar.gz /wordpress-debian_patches_hello.patch /wordpress-4.6.tar.gz +/wordpress-4.6.1.tar.gz diff --git a/sources b/sources index e275cdf..cde0dc9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b07bb75bb0f85fd6e1a65ad3d0b876d8 wordpress-4.6.tar.gz +ca0b978fd702eac033830ca2d0784b79 wordpress-4.6.1.tar.gz diff --git a/wordpress.spec b/wordpress.spec index d1d25a2..d39d7cc 100644 --- a/wordpress.spec +++ b/wordpress.spec @@ -25,9 +25,9 @@ Summary: Blog tool and publishing platform URL: http://www.wordpress.org Name: wordpress -Version: 4.6 +Version: 4.6.1 Group: Applications/Publishing -Release: 2%{?dist} +Release: 1%{?dist} License: GPLv2 Source0: http://wordpress.org/%{name}-%{version}%{?prever:-%{prever}}.tar.gz @@ -307,9 +307,12 @@ rm -rf ${RPM_BUILD_ROOT} %changelog +* 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 direftory permissions #1305687 +- fix directory permissions #1305687 * Wed Jun 22 2016 Remi Collet - 4.5.3-1 - WordPress 4.5.3 Maintenance and Security Release