ignore WP_AUTO_UPDATE_CORE

This commit is contained in:
Remi Collet 2014-01-25 08:00:17 +01:00
commit cd9521671b
3 changed files with 32 additions and 19 deletions

View file

@ -1,6 +1,7 @@
--- wp-config.php.old 2014-01-24 19:43:02.483075882 +0100
+++ wp-config.php 2014-01-24 19:52:30.401841036 +0100
@@ -72,6 +72,21 @@
diff -up wordpress/wp-config.php.old wordpress/wp-config.php
--- wordpress/wp-config.php.old 2014-01-25 07:47:17.622959116 +0100
+++ wordpress/wp-config.php 2014-01-25 07:54:06.816454385 +0100
@@ -72,6 +72,19 @@ $table_prefix = 'wp_';
define('WPLANG', '');
/**
@ -10,19 +11,17 @@
+/* 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
+/* Disable automatic updater, in case you want to allow
+ above FILE_MODS for plugins, themes, ... */
+define('AUTOMATIC_UPDATER_DISABLED', true);
+
+/* Disable change of core, in case you really want to
+ enable AUTOMATIC_UPDATER above, core is manage by package updates */
+define('WP_AUTO_UPDATE_CORE', false);
+/* 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.
@@ -84,7 +99,7 @@
@@ -84,7 +97,7 @@ define('WP_DEBUG', false);
/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )

View file

@ -1,7 +1,17 @@
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 2014-01-24 20:07:50.969565823 +0100
+++ wordpress/wp-admin/includes/class-wp-upgrader.php 2014-01-24 20:08:07.431612588 +0100
@@ -1640,7 +1640,7 @@ class WP_Automatic_Updater {
--- 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
}
}
+ // 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;
@@ -1640,7 +1643,7 @@ class WP_Automatic_Updater {
*/
public function is_disabled() {
// Background updates are disabled if you don't want file changes.
@ -11,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 2014-01-24 19:54:56.488272053 +0100
+++ wordpress/wp-admin/includes/update.php 2014-01-24 19:57:08.816663110 +0100
--- 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
@@ -216,8 +216,6 @@ function update_nag() {
}
echo "<div class='update-nag'>$msg</div>";
@ -32,8 +42,8 @@ diff -up wordpress/wp-admin/includes/update.php.nop wordpress/wp-admin/includes/
echo "<span id='wp-version-message'>$msg</span>";
diff -up wordpress/wp-includes/capabilities.php.nop wordpress/wp-includes/capabilities.php
--- wordpress/wp-includes/capabilities.php.nop 2014-01-24 20:06:55.607405027 +0100
+++ wordpress/wp-includes/capabilities.php 2014-01-24 20:07:29.225504605 +0100
--- 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 )
// Disallow the file editors.
if ( defined( 'DISALLOW_FILE_EDIT' ) && DISALLOW_FILE_EDIT )
@ -53,8 +63,8 @@ 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 2014-01-24 19:53:55.978094909 +0100
+++ wordpress/wp-includes/update.php 2014-01-24 19:56:38.817574394 +0100
--- 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() {
* @since 3.1.0
*/

View file

@ -12,7 +12,7 @@ URL: http://www.wordpress.org
Name: wordpress
Version: 3.8.1
Group: Applications/Publishing
Release: 2%{?dist}
Release: 3%{?dist}
License: GPLv2
Source0: http://wordpress.org/%{name}-%{version}.tar.gz
@ -43,6 +43,7 @@ Patch5: wordpress-3.8.1-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-3.8.1-noupdate.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -133,7 +134,7 @@ rm -rf wp-includes/js/swfupload
# Create RPM configuration
cp wp-config-sample.php wp-config.php
%patch5 -p0
%patch5 -p1
%patch6 -p1
# fix file encoding
@ -235,6 +236,9 @@ rm -rf ${RPM_BUILD_ROOT}
%dir %{_sysconfdir}/wordpress
%changelog
* 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