User:DanielRenfro/ExtensionRepo

These are Daniel's notes about implementing a package management system for extensions — ExtensionRepo.

Things I need to review

 * Package management in general
 * http://www.debian.org/doc/manuals/debian-reference/ch02.en.html
 * The pros and cons of each package management system

Requirements

 * 1) don't break the current extensions
 * 2) incentivize (with features) switching to the new system
 * 3) dependency resolution
 * 4) rigorous security and error-checking
 * 5) Tools:
 * 6) * command-line tools
 * 7) * GUI/web-interface
 * 8) (automated) tests for compatibility
 * 9) logging
 * 10) permissions (possibly a new role, group, etc.)
 * 11) flashy Web2.0 interface that makes people go 'oooooo'
 * 12) API modules
 * 13) distributed nature -- any package can be installed from any repository
 * 14) metadata

Ideas

 * one-click installation
 * an extension that turns a mediawiki instance into a repository for extensions
 * one extension to rule them all!
 * hosting extensions
 * a better Special:Version section
 * feedback on extensions in the form of
 * ratings (1-5 stars?!)
 * comments
 * ability to fork w/link to source code (github or tarball or other)
 * keyword search

Parts

 * Code to be added to core (eventually) that will handle extensions
 * An extension that turns a Mediawiki instance into a repository
 * MW does everything else, why not have it host it's own extensions?!

Metadata file
For the extension-manager to work correctly we'll need a manifest/metadata file that describes the extension. It will need to contain the following types of information in some parse-able format:
 * extension name
 * version
 * description
 * dependencies -must be previously installed or being installed at the same time
 * pre-dependencies - mus be previously installed
 * recommended - strong relationship with another extension
 * suggests - weak relationship
 * breaks - extensions this extension will break
 * conflicts
 * replaces
 * provides

Actions
The commands that a client will request and that the server/repository should handle.

Backend / Server
This code will turn Mediawiki into a repository for other extensions.

Frontend
This will (hopefully) be the godsend extension we are all looking for. It will handle all the extensions for a mediawiki instance.


 * user searches for extensions.
 * query goes to server as POST
 * this should be an API call
 * action=manageext, query=$search
 * server gets the query, searches through the table of extensions, returns results (as json or whatever)
 * user picks one ore more extensions to install or update
 * client mw sends a query to the server POST, with token
 * action=manageext, install=array($ext, $version), token=$token
 * server searches for required packages
 * find package
 * find prerequisite packages, loop recursively
 * do dependency-resolution, avoid dependency hell
 * send to the client


 * Also would be nice:
 * API module for installed extensions and their versions

Extension table
A table for all installed extensions. int          id varchar   name smallint version_major smallint version_minor smallint version_revision smallint version_build varchar  url varchar  repository