Page MenuHomePhabricator

Patch for 1.27.3/1.28.2 missing
Closed, ResolvedPublic

Description

Hello,

there is no patch for updating to version 1.27.3:

https://releases.wikimedia.org/mediawiki/1.27/

Would be great to have one to make upgrading Mediawiki simple.

Event Timeline

So there seems to have been an issue in the build script--patches are not generated against extensions (1.27.3 and 1.28.2 were just for SyntaxHighlight).

The patch itself is just this. I can generate one and upload it to the tar directory as well, if you'd like.

@demon Would be great if you could create a patch. I can imagine that there are several people who would use it to update MW.

Reedy renamed this task from Patch for 1.27.3 missing to Patch for 1.27.3/1.28.2 missing.May 7 2017, 4:02 PM
Reedy added a project: MW-1.28-release.

@demon For me the patch to version 1.27.3 doesn't work. I get the following:

root@server:/wiki/folder# patch -p1 --dry-run -i syntaxhighlightgeshi-1.27.3.patch 
can't find file to patch at input line 18
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From a88c5e1dcbdb3e9940c6f55a6744c62a6d62710f Mon Sep 17 00:00:00 2001
|From: Reedy <reedy@wikimedia.org>
|Date: Tue, 21 Feb 2017 19:20:16 +0000
|Subject: [PATCH] SECURITY: Escape start argument before passing to pygments
|
|Issue identified by Yorick Koster
|
|Bug: T158689
|Change-Id: Ib55f7a38edbdd39c9587794d250e22d3b26950be
|---
| SyntaxHighlight_GeSHi.class.php | 4 ++--
| 1 file changed, 2 insertions(+), 2 deletions(-)
|
|diff --git a/SyntaxHighlight_GeSHi.class.php b/SyntaxHighlight_GeSHi.class.php
|index 5381351..c722c1a 100644
|--- a/SyntaxHighlight_GeSHi.class.php
|+++ b/SyntaxHighlight_GeSHi.class.php
--------------------------
File to patch:

@Scroom: This task is about a non-existing patch file. If there are problems with some existing patch file, please create a thread on the support desk with clear steps to reproduce (especially the exact folder you are executing the command in -are you in the correct extensions subfolder?). Thanks! Closing task as resolved again.

@Scroom: That was not a very helpful reply I gave, sorry. Let me rephrase: When you execute that command, are you in the extensions/SyntaxHighlight_GeSHi/ subfolder? And is there a specific reason you use -p1 instead of -p0, and -i? Because hard to say where you are located from the root@server:/wiki/folder# prompt, and the 1.27.3 patch has no folder structure info included in its file names...

@Aklapper: I've been in the main folder of the wiki (in which the LocalSettings.php is located). I've just reused the commands of the patches I've used before. Do this patch works in another way?

I'd recommend going to the folder where the SyntaxHighlight_GeSHi.class.php file is located and trying to use -p0 instead of -p1 && drop the -i.

@Aklapper Didn't work for me as well. Changed it manually. By the way wouln't it be better to have a patch which behaves as the normal patches (for which there is the update description https://www.mediawiki.org/wiki/Manual:Upgrading/de#Using_patch)? An which changes the version number (I had to change the $wgVersion in /includes/DefaultSettings.php)?

GregariousJB triaged this task as High priority.
GregariousJB subscribed.

This is not resolved yet, and is so broken that I'm increasing its priority due to the fact that it is currently stopping users from being able to upgrade their wikis according to the simple "Using Patch" documentation. Forcibly upgrading by replacing all files is still an option but not recommended according to Mediawiki.

I've read through the above discussion and this is the current situation:

  • A 1.27.3 patch does not exist.
  • A patch for 1.27.2 does exist in the form of an extremely small and confusing patch file called syntaxhighlightgeshi-1.27.3.patch.gz, which unless you read this issue page you will not know how to install it since it requires the user to first browse into the extensions/SyntaxHighlight_GeSHi folder, which is unlike every other patch. This was a foolish oversight and also needs to be fixed, but is not relevant to this issue.
  • Running the aforementioned patch does not upgrade the current installation number to 1.27.3, so the user remains on 1.27.2. Therefore, the patch for 1.27.4 is inaccessible and therefore the user can no longer upgrade unless doing it forcibly as mentioned above.
  • As mentioned, a package full of files for 1.23.3 does exist, but only the files in a tar.gz - no patch.

Conclusion:

  1. Users can technically upgrade to 1.23.3, but need to do so in a way that is not recommended by Mediawiki - by essentially drag+drop to replace all existing files even though only a select few need to be changed.
  2. Users cannot patch past 1.27.2.

I'm currently stuck on 1.27.2 as a result until this is rectified, which means I'm no longer getting security updates that may be crucial to my wiki installation. I'm personally going to be working on making a patch file for myself and will share it here when I'm done. Perhaps it will help someone.

Please fix this so that users can upgrade their wikis.

EDIT:

- Here's the patch file. I ran the same command that other patches have been running, which is listed in the patch files themselves:

diff -Nruw -x '*~' -x '.js*' -x '.git*' -x '#*#' -x '.#*' -x '.rubocop*' -x .travis.yml -x package.json -x messages -x Gemfile -x .mailmap -x '*.png' -x '*.jpg' -x '*.xcf' -x '*.gif' -x '*.svg' -x '*.tiff' -x '*.zip' -x '*.xmp'

You'll see a Reversed (or previously applied) patch detected! Assume -R? [n] message if you've already patched the SyntaxHighlight_GeSHi.class.php file which has been mentioned a few times above. I just typed y and hit enter. Everything seems fine so far - version has been updated to 1.23.3 and I can now continue upgrading to the 1.24.4 patch without errors.

For quick reference, the commands I ran to upgrade are:

(From the root directory, after copying the above file into it)
patch -p1 --dry-run -i mediawiki-1.27.3.patch (--dry-run first to test it before making any changes)
Then...
patch -p1 -i mediawiki-1.27.3.patch (to confirm the patch and make changes)
Then you can continue with the 1.27.4 patch with similar commands. I'm now successfully on version 1.27.4 with no immediate issues, but I suspect I'll need to update a few extensions and perhaps my LocalSettings.php.

Verified, gzip'd, signed and uploaded the patch, thanks for submitting it! Sorry for the confusion around having two separate patches for this.