[Mageia-webteam] Proposal for maintainers database API

Kosmas Chatzimichalis Kosmas at mach7x.com
Tue Mar 8 11:04:08 CET 2011


On 8 March 2011 08:48, Michael Scherer <misc at zarb.org> wrote:

> Le mardi 08 mars 2011 à 03:53 +0100, nicolas vigier a écrit :
> > Here is a proposal for an API that can be used on the maintainers
> > database, with the list of URLs and what they should do :
> >
> > ***
> > An html page with the list of all packages, and their maintainer :
> > http://maintdb.mageia.org/packages.html
> > As we have many packages, the page will be long, so maybe we want to
> > split the list by first letter of package name :
> > http://maintdb.mageia.org/packages_a.html
> > http://maintdb.mageia.org/packages_b.html
> > http://maintdb.mageia.org/packages_c.html
>
> Hi,
>
> Thee is other paging system in rails and similar framework, no need to
> specify this ( and I also think this is not part of a API ).
>


 Indeed that is the case, so we can have a paging system, with no need for
different pages.
 If on the other hand we want to split them by the first letter, again that
is possible.
 So we could try with the simple paging system and if people find it more
useful to have them split by name, we can do that later on.


>
> > The list of all packages and their maintainers, in text format :
> > http://maintdb.mageia.org/packages.txt
> > With the output like this :
> > package1:maintainerlogin1
> > package2:maintainerlogin2
> > package3:maintainerlogin3
> > ...
> >
> > ***
> > An html page to show the maintainer of one package (with
> > [packagename] replaced with the name of a package) :
> > http://maintdb.mageia.org/packages/[packagename].html
> > The same in text format :
> > http://maintdb.mageia.org/packages/[packagename].txt
> > With output like this (only one line):
> > packagename:maintainerlogin
> > If the package is unmaintained, it appears like this :
> > packagename:nobody
> > If the package does not exist, an empty file is returned.
>
> I would rather say :
> packagename:
>
> Using a name with a special meaning is just a special case to be placed
> everywhere.
>
>
 It currently uses the package id for displaying information, but I could
have a look to see if it's possible to have it using the package name, which
I have the feeling that it is.
At the moment you can find information about a package by using the All link
at the top.
There will also be a search box that gives the same information.
For finding information about a specific package the format used is:
url/spackage/id
(spackage was named like that to dinstinguish it from the compiled packages
- cpackage. If there is no need for compiled packages information as I've
seen somewhere that can be removed)


> > ***
> > The list of maintainers (all maintainers who maintain at least one
> > package) :
> > http://maintdb.mageia.org/people.html
> >
> > ***
> > The list of packages maintained by someone (with [loginname] replaced by
> > a login) :
> > http://maintdb.mageia.org/people/[loginname].html
> > And the same in text format :
> > http://maintdb.mageia.org/people/[loginname].txt
> > With the same format for output :
> > package1:loginname
> > package2:loginname
> > package3:loginname
> > ...
> > If the login does not exist, an empty file is returned.
>
> A REST API would give a 404, that's also something everybdy doing HTTP
> should grasp and understand.
>
>
 That's what is used at the moment (REST-404).
 For the list of maintainers the url is:
 http://maintdb.mageia.orgl/maintainers
The extra information in there about first name, surname can be removed.


> > ***
> > The list of unmaintained packages :
> > http://maintdb.mageia.org/people/nobody.html
> > And the same in text format :
> > http://maintdb.mageia.org/people/nobody.txt
> > With this output :
> > package1:nobody
> > package2:nobody
> > package3:nobody
> > ...
>
> I would use a different url for unmaintained packages rather than
> nobody. Adding special case is not very clean, as said before.
>

 I agree with Michael, and say that probably a url like:
 http://maintdb.mageia.org/umaintained
 would give the list of all umaintained packages


>
> > ***
> > The URL to add a package, used by the buildsystem when a package is
> > uploaded on the repository :
> > https://maintdb.mageia.org/admin/setnewpackage
> > Protected with basic http authentication (with a login/password that was
> > set in maintdb or apache configuration).
> > Accessed with a POST request and the following two arguments :
> > package: [packagename]
> > maintainer: [maintainername]
> > If the package already exists in the database, it is not updated.
> >
> > ***
> > The same as the previous URL, but the package maintainer is updated when
> > the package already exists in the database :
> > https://maintdb.mageia.org/admin/setpackage
>
> IMHO, it would be easier to have just 1 url :
>
> /upload/$package/$login/ ( and either protect this at http level, or
> using a key somewhere in the url )
>
>
 Agree. Either way is possible so if there a preferred way we can try that
first.


>
> > If we compare with the maintainers db website used at mandriva, their
> > version also has :
> >  - media name for each package, with pages to list packages from only
> >    one media
> >  - a search box to search for a package
> >  - links to bugzilla for each package
> > But I don't think we should store the media name in maintdb.
>
> That's indeed inflexible, if we want to have a package in more than one
> media.
>

 That shouldn't be any problem.
 We would only need to change the relationship between media and packages,
which is fine.
 Again, if we don't want it to look like the mandriva, then we are flexible
to decide how it would work and what we can display.
 We had to base it on something to start, but that could change easily.


>
> > maintdb should mainly be used in the following cases :
> >  - by sophie, mageia-app-db and other package databases which want to
> show
> >    maintainers of packages. They download the full list of packages and
> >    maintainers every day (or hours) from the text file, to synchronize
> >    with their database.
>
> So then we should ask them what they would prefer. I knw for usre that
> reusing the mandriva format, or the fedora format will ease the work on
> sophie side.
>
>
 Not sure which format was used before, but again I don't see any problem
using whatever makes it easier for people that use it.
 Let me know what you would like it to do and then I'll try and do it.


Kosmas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/mageia-webteam/attachments/20110308/bec52acb/attachment-0001.html>


More information about the Mageia-webteam mailing list