User:DanielRenfro/ExtensionRepo

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

Rationale
Mediawiki has a robust system for implementing extensions, but currently lacks an integrated mechanism for managing them. Currently, installation, management and dependency-resolution is done manually, usually by a sysadmin or a staff member.

This topic has come up a number of times before...
 * Requests for comments:
 * Requests for comment/Extension release management
 * Requests for comment/Distribution and deployment
 * Jeroen De Dauw's Google Summer of Code 2010 proposal

Proposed Philosophy
Given the distributed nature of collaboration

Requirements

 * security!!!
 * don't break the current extensions
 * incentivize (with features) switching to the new system

Features

 * dependency resolution
 * rigorous security and error-checking
 * both GUI and command-line interface
 * integrated tests for compatibility
 * logging
 * permissions (possibly a new role, group, etc.)
 * flashy Web2.0 interface that makes people go 'oooooo'
 * API modules
 * distributed nature &mdash; any package can be installed from any repository

"It'd be cool if..." features

 * an Extension: namespace (NS_EXT) that's filled with auto-generated pages about each extension
 * provides a place to view information, urls, versions, rate the extension, leave feedback (?), etc.
 * 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
 * downloading class that supports:
 * resuming, timestamp checking, parallel downloads, cached file validation
 * FTP user limit autodetection
 * file://, ftp://, http://, https://, scp://, ftps://, ldap://, etc.
 * easy way to upload a new version of your extension to a repository (api?)

Technical details/notes

 * 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?!

Things I need to review

 * Package management in general
 * Debian package management
 * Homebrew
 * Smart Package Manager
 * CPAN
 * npm
 * http://en.opensuse.org/Package_management
 * The pros and cons of each package management system

Options/configuration

 * keep all old packages once updated or not (to save disk space)
 * turn off repository behavior (default is on)

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
 * licensing
 * checksum(s)
 * list of files
 * platform architecture info if that's an issue
 * when, where and whom built this software/extension

Repositories

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