Last modified: 2013-01-08 20:44:33 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T32970, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30970 - Add a file to extension packages with source information
Add a file to extension packages with source information
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
ExtensionDistributor (Other open bugs)
unspecified
All All
: Low enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-18 15:26 UTC by Olivier Finlay Beaton
Modified: 2013-01-08 20:44 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Olivier Finlay Beaton 2011-09-18 15:26:52 UTC
ExtensionDistributor should check out a special hidden file for very extension package that includes information from our repository (say call it .info):

For subversion it may be:
- Branch
- Revision (the important item)

For git it may be:
- Checkin ID (a hash)

This is following bawolff's suggestion on IRC and the discussion happening over at
https://bugzilla.wikimedia.org/show_bug.cgi?id=30955
about this.

I'm not familiar with the systems, but one suggestion for how to go about it would be to make ExtensionDistributor check in a default .info file to the project (ensuring it has the right and latest format) then checking out the extension for packaging. It would have to ensure the special auto-prop is set.

http://dev.juokaz.com/php/automatic-svn-revision-number-in-source-code

I don't see a need for the file to be .php, we can just as easily parse it, however maybe .info.php would mean we could just include() it.

In the short term this would provide an audit trail for administrators on what they installed (especially for extensions with no or inconsistent versioning).

In the longer term I am working on a ExtensionUpdate Special page which could use these files, in combination with some new API calls (will file separate reports for those) and report to administrators which extensions (or mediawiki core!) need updating.

One day we might even get to installing them from the web ala wordpress.
Comment 1 Daniel Friesen 2011-09-18 15:28:59 UTC
Good ole ini:

# .extensiondistributor
revision = r666666
path = /branches/REL1_17/extensions/Foo/
Comment 2 Olivier Finlay Beaton 2011-09-19 13:13:22 UTC
It should also put in the url of the repo, and the type of repo (svn, git, etc).

I'm with Daniel, an .ini file would be great.
Comment 3 Marcin Cieślak 2012-06-20 09:08:56 UTC
Not a Wikimedia site bug.
Comment 4 Krinkle 2012-06-26 01:55:33 UTC
maybe a prettified .json file like this?

--- .extensionDistributor.json
{
	"repo": {
		"type": "git",
		"url": "https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Cite.git",
		"branch": "master",
		"HEAD": "4c8c2623c2d932b1b59f2d5f730b06ea40a37693"
	}
}
Comment 5 Olivier Finlay Beaton 2012-06-26 02:02:36 UTC
or how about a composer file? eh? eh? bandwagon! You could do like CI and run your own package repo even if you like instead of using packagist.
Comment 6 Krinkle 2012-06-26 02:06:32 UTC
(In reply to comment #5)
> or how about a composer file? eh? eh? bandwagon! You could do like CI and run
> your own package repo even if you like instead of using packagist.

Those are fine suggestions. Note though that contrary to a package manager manifest (which should be stored inside the repository itself), the proposal here is to add a source manifest, declaring what version has been downloaded etc.

If we want to create or own package repo and/or use an existing one, that's a different (great) feature request. Something like Composer (the PHP version of NodeJS's NPM, basically) can be used without needing MediaWiki support actually. Afaik you can publish to it from any repository that has such a file, so that can/does work already.
Comment 7 Olivier Finlay Beaton 2012-06-26 02:08:57 UTC
True, my original request for a source file was to help with developing an automated updating extension. But there's no reason someone couldn't use composer for that. So even if they got the extension by downloading it, they could keep it up to date using composer, and extension distributor could make sure the file was there even if the extension didn't provide it themselves.
Comment 8 Chad H. 2013-01-08 20:44:33 UTC
The new version (to be deployed on Jan 16th with 1.21wmf8) has users downloading files that include the sha1 in the filename.

This should be sufficient, I think. Marking FIXED.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links