Page MenuHomePhabricator

Upgrade patches for tarball releases don't apply cleanly to tarball installation
Closed, ResolvedPublic

Description

For the MediaWiki 1.23.4 release, a patch file was provided that was based on all files in Git, instead of just the files we provide in a tarball. As a result, the audience the patch is intended for (using tarball instead of Git), could not apply it cleanly without warnings.

Original task description by @robkam

Intention:
Trying to patch mediawiki 1.23.3 to mediawiki-1.23.4.patch.

Steps to Reproduce:
patch -p 1 --dry-run < mediawiki-1.23.4.patch

Actual Results
patching file includes/config/GlobalVarConfig.php
patching file includes/db/DatabaseMysqli.php
patching file includes/DefaultSettings.php
patching file includes/libs/XmlTypeCheck.php
patching file includes/Sanitizer.php
patching file includes/upload/UploadBase.php
patching file RELEASE-NOTES-1.23
can't find file to patch at input line 387
Perhaps you used the wrong -p or --strip option?

The text leading up to this was:

|diff -Nruw -x messages -x '*.png' -x '*.jpg' -x '*.xcf' -x '*.gif' -x '*.svg' -                               x '*.tiff' -x '*.zip' -x '*.xmp' -x '.git*' mediawiki-1.23.3/tests/phpunit/inclu                               des/upload/UploadBaseTest.php mediawiki-1.23.4/tests/phpunit/includes/upload/Upl                               oadBaseTest.php
|--- mediawiki-1.23.3/tests/phpunit/includes/upload/UploadBaseTest.php  2014-09-                               24 19:58:10.961599096 +0000
|+++ mediawiki-1.23.4/tests/phpunit/includes/upload/UploadBaseTest.php  2014-09-                               24 19:55:15.538575503 +0000

Reproducible: Always

So I ran it anyway and wiki now is version 1.23.4 - it seems to be only the non-existent UploadBaseTest.php that has not been patched. Is this right/there nothing to worry about?

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:44 AM
bzimport set Reference to bz71379.
bzimport added a subscriber: Unknown Object (MLST).

The problem is that you installed 1.23.3 from a tarball, but the patch is based on an installation from Git. Files for testing purposes aren't included in the tarball, but the patch tried to change one of them, which is why it couldn't find it. Your upgrade was successful even though you skipped that file.

We are currently working on this issue. Added hexmode in CC.

Krinkle renamed this task from Upgrade patches include changes to files under tests/ even though the tarball does not include these files to Upgrade patches for tarball releases don't apply cleanly to tarball installation.Apr 4 2018, 5:55 PM
Krinkle updated the task description. (Show Details)
Krinkle removed a subscriber: wikibugs-l-list.
Krinkle subscribed.

Not sure if still this is still an issue with current processes. In case it's still an issue, tagging for next release. Seems easy to fix :)

I think the ideal long term fix is to generate the patch files by diffing the two tarballs instead of trying to use git diffs.

Are patches even useful these days when download speed is much less of a problem than 20 years ago?

Are patches even useful these days when download speed is much less of a problem than 20 years ago?

They're useful for being able to review the actual diffs between versions yourself.

I think the ideal long term fix is to generate the patch files by diffing the two tarballs instead of trying to use git diffs.

We don't use git diffs...

https://gerrit.wikimedia.org/g/mediawiki/tools/release/+/master/make-release/makerelease.py#419

Was this a problem for the rc's?

Was this a problem for the rc's?

....

Change 454609 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[mediawiki/tools/release@master] Move to git archive like model for MediaWiki releases

https://gerrit.wikimedia.org/r/454609

Change 454609 merged by jenkins-bot:
[mediawiki/tools/release@master] Move to git archive like model for MediaWiki releases

https://gerrit.wikimedia.org/r/454609

Legoktm claimed this task.