Build Service/Concepts/AppDirectory

From openSUSE

(Difference between revisions)
Revision as of 17:32, 24 July 2009
Bauersman (Talk | contribs)
Binary Package Information
� Previous diff
Revision as of 11:50, 14 October 2009
Kfreitag (Talk | contribs)
Distribution Information
Next diff →
Line 24: Line 24:
A call to the OBS API A call to the OBS API
-GET /distributions+GET /public/distributions
returns a XML document like returns a XML document like

Revision as of 11:50, 14 October 2009

Application Directory Integration Interface

To attract projects to build in the Build Service we implement an interface that returns pathes to binary packages according to one project name and a list of package names.

The usecase is to invite application directory systems such as http://kde-apps.org to offer their user (in this case, the users are the people who maintain the directory entries upstream) the following service: If they build binary packages in the OBS, the directory app takes an OBS project- and package name. On the fly, the directory app uses the integration interface of the OBS with these two parameters and gets a list of the available binary packages for the package, see example structure below. The directory app can render a nice download box for the users to pick rpms from the OBS for their system.

To make it really convenient for the directory application, additionally there is detailed info about the available distros. It contains some descriptions, names and images the directory application may make use of. It goes completely independent of the package information to be reuseable.

Distribution Information

A call to the OBS API

GET /public/distributions

returns a XML document like

 <distributions>
   <distribution id="opensuse-11.0" vendor="opensuse" version="11.0">
     <name>openSUSE 11.0</name>
     <project>openSUSE:11.0</project>
     <repository>standard</repository>
     <icon width="8" height="8" url="os11logo8.png"/>
     <icon width="16" height="16" url="os11logo16.png"/>
     <link>http://www.opensuse.org</link>
   </distribution>
   <distribution id="opensuse-10.3" vendor="opensuse" version="10.3">
     <name>openSUSE 11.0</name>
     <project>openSUSE:10.3</project>
     <repository>standard</repository>
     <icon width="8" height="8" url="os10logo8.png"/>
     <icon width="16" height="16" url="os10logo16.png"/>
     <link>http://www.opensuse.org</link>
   </distribution>
   <distribution id="fedora-9" vendor="fedora" version="9">
     <name>Fedora 9</name>
     <project>Fedora:9</project>
     <repository>standard</repository>
     <icon width="8" height="8" url="fed9logo8.png"/>
     <icon width="16" height="16" url="fed9logo16.png"/>
     <link>http://www.fedoraproject.org</link>
   </distribution>
 </distributions>

which contains some interesting information about the distros.

There is no decent update mechanism for this file. The file should be fetched from the application directory application once a day or whenever an unknown id appears in the package information block (which does not cover changes of existing entries of course).

Binary Package Information

Information about the existing binary packages that are built from a source package in the OBS can be obtained by the following call

GET /binary_packages/home:kfreitag:Kraft/Kraft

which results in a xml document such as

 <package project="home:kfreitag:Kraft" package="Kraft">
   <name>Kraft</name>
   <description>Kraft is software for people...</description>
   <link type="ymp" distribution="opensuse-11" href="http://software.opensuse.org/ymp/home:kfreitag:Kraft/openSUSE_11.1/kraft.ymp"/>
   
   <link type="rpm" distribution="fedora-10" arch="i386" href="http://download.opensuse.org/repositories/home:/kfreitag:/Kraft/Fedora10/i386/kraft_0.32_i386.rpm"/>
   <link type="yum" distribution="fedora-10" href="http://download.opensuse.org/repositories/home:kfreitag:/Kraft/Fedora10/home:kfreitag:Kraft.repo"/>
   
   <link type="deb" distribution="ubuntu-804" arch="i386" href="http://download.opensuse.org/repositories/home:/kfreitag:/Kraft/xUbuntu_8.04/i386/kraft_0.32_i386.deb"/>
   <link type="deb" distribution="ubuntu-804" arch="x86_64" href="http://download.opensuse.org/repositories/home:/kfreitag:/Kraft/xUbuntu_8.04/x86_64/kraft_0.32_x86_64.deb"/>
   <link type="yum" distribution="ubuntu-804" href="http://download.opensuse.org/repositories/home:/kfreitag:/Kraft/xUbuntu_8.04/home:kfreitag:Kraft.repo"/>
 </package>

For each available distribution the xml contains one or more <link/> elements. The type and amount of returned links depends on the distribution:

  • all openSUSE distributions:

there is always a single architecture independent <link type="ymp"/> element.

  • all other distributions:

one or more link elements of type rpm or deb are returned, one for each available architecture. Additionally a yum/repo-md link is returned