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?

Details

Reference
bz71379
bzimport raised the priority of this task from to Normal.
bzimport set Reference to bz71379.
bzimport added a subscriber: Unknown Object (MLST).
robkam created this task.Sep 27 2014, 8:53 AM

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 added a subscriber: Krinkle.

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.

MaxSem added a subscriber: MaxSem.Apr 18 2018, 1:06 AM

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

demon added a subscriber: demon.Apr 26 2018, 8:50 PM

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.

demon added a comment.EditedApr 26 2018, 8:53 PM

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

Krinkle removed a subscriber: Krinkle.Apr 28 2018, 1:58 AM

Was this a problem for the rc's?

greg added a subscriber: greg.Jul 6 2018, 8:06 PM

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

robkam removed a subscriber: robkam.Sep 13 2018, 9:50 AM

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 closed this task as Resolved.Fri, Sep 21, 4:19 AM
Legoktm claimed this task.