Role: to state who is maintaining what package.
See http://maintainers.mandriva.com (although its source is unlicensed, hence the need here).
Contents
Application information
- Gitorius git repository: http://gitorious.org/mageia-maintainers-database-r2
- Redmine issue tracker: [1]
- Staging/Test server: http://www.maintdb2.mageia.org.uk/
- Bugzilla: Maintainers Db
Who is in charge?
- development: kosmas, rda
- prod: rda, sysadmin
Status
- Listing packages, all, orphans, by maintainers is OK.
- Listing maintainers, all and for a given package is OK.
- POSTing a maintainer/package relationship is OK.
- Bugzilla may call http://maintdb/maintainers?for=package
- json return format is OK.
- maintainers db schema update is OK (first_name, surname, email: removed; uid: added)
- removed cpackage
- renamed spackage in package
TODO
By order of priority:
- sort maintainers by admin status in queries
- search (for package AND maintainer)
- graphic design
- DELETEing a relationship is not written
- several filter, see spec actions below
- manage web-based permissions (admin may manually edit/break relations? - use https://github.com/wvanbergen/http_status_exceptions ?)
Specs / actions
Generic rules:
- app expects and returns UTF-8.
- this spec is still incomplete but should allow for starting.
- if a list/get method returns an empty set, a 404 http status code should be returned as well as the empty set.
- users/maintainers are identified by their _login_ (or uid) that is not expected to change - we do not store their real name, neither their email address for now
Generic filters for every method:
- format={json,txt} if specified, should return a json document, instead of an HTML one
Returned formats:
- "json" for JSON (useful for Javascript consumers: Bugzilla at least)
- "txt" for text format: tab-separated values (see format used by Mandriva maintdb)
- "html" for HTML (default) Web UI (no need to specify it).
Add a new package / Notify a package action by someone
Private method. This is expected to be called by the buildsystem, to notify that someone pushed a package.
POST https://maintdb/packages
with POST vars:
- key - string - private key for remote system
- package - string - name of the package pushed
- uid - string - login of the user pushing the package
Once called, this should:
- add or update the package record in db
- return a 201 status code in case of success, forbidden if key doesn't match, bad request if missing params
List packages
Public method.
GET https://maintdb/packages
Returns a list such as:
- packagename / maintainers login / last successful submission date
Available filters to be passed in query string:
- only={orphans|unmaintained,maintained} returns only unmaintained or maintained packages
- by={username} returns only packages maintained by this user
- limit={int}, page={int} for pagination purpose
If a package is unmaintained, a single "nobody" maintainer login must be used.
Count packages
Public method.
GET https://maintdb/packages/count
Returns an integer
Same filters as "List packages".
List maintainers
Public method.
GET https://maintdb/maintainers
Returns a list such as:
- username / maintained packages count / last commit date / url to maintained packages list
Available filters:
- only=maintainers returns only active maintainers (who have at least one package)
- for={packagename} returns the active maintainers for this package
- limit={int}, page={int} for pagination purpose
Break a maintainer/package association
Private method called remotely by the build system or locally by the web app.
DELETE https://maintdb/maintainers?maintainer=login&package=packageName&key=
with query string vars:
- maintainer=login & package=packageName (association to break)
- by_user=login & by_pass=pass (user commanding the break; must auth correctly, must be same as maintainer or an admin user)
TODO
- ?
Old stuff
Entities/relations
Entities:
- a person (id, name, email)
- a source package (id, name, last commit timestamp, in which media, active or not)
- a package (id, source package id, name)
Relations:
- a source package may be maintained by several persons, of which one should be admin
- a source package may be compiled into several packages
This app should publish:
- all registered person that maintain at least one package
- all registered packages and their maintenance status (active or not)
- for a given person, all related packages/teams
- for a given package, source package and/or all related persons
- statistics about maintainers and packages
v0:
- for a given source package, we want to know who maintains it (can be several persons), last activity (commit) on this package and consequent RPMs
- for a given person, we want to know what packages are maintained by
- we want to make and break such links between people and packages
- implicit groups
v0.1:
- logging in (authentication against Mageia LDAP)
- self manage ones links
- add packages manually?
later?
- have a primary maintainer
- restrictions:
- if no maintainer is set: anyone can grab and will also be the primary maintainer
- if no primary maintainer is set; noone can grab anything; but other maintainers can grab primary maintainership
- if maintainers are set: then person might want to grab maintainership (not primary), but should be allowed by primary maintainer (optional)
- restrictions:
- add-hoc, explicit groups