Build Service/Concepts/AppDirectory

From openSUSE

(Difference between revisions)
Revision as of 12:50, 20 July 2009
Kfreitag (Talk | contribs)

� Previous diff
Revision as of 13:55, 20 July 2009
Kfreitag (Talk | contribs)

Next diff →
Line 20: Line 20:
independent of the package information to be reuseable. independent of the package information to be reuseable.
-===Example communication:===+===Distribution Information===
 + 
 +A call to the OBS API
GET /distributions GET /distributions
-returns an XML document like+returns a XML document like
<distributions> <distributions>
<distribution id="opensuse-11.0"> <distribution id="opensuse-11.0">
<name>openSUSE 11.0</name> <name>openSUSE 11.0</name>
- <icon width="16" height="16">http://opensuse.org/static/os11logo16.png"/>+ <icon width="8" height="8" url="http://opensuse.org/static/os11logo8.png"/>
 + <icon width="16" height="16" url="http://opensuse.org/static/os11logo16.png"/>
<link>http://www.opensuse.org</link> <link>http://www.opensuse.org</link>
</distribution> </distribution>
<distribution id="fedora-9"> <distribution id="fedora-9">
<name>Fedora 9</name> <name>Fedora 9</name>
- <icon width="16" height="16">http://opensuse.org/static/fed9logo16.png"/>+ <icon width="8" height="8" url="http://opensuse.org/static/fed9logo8.png"/>
 + <icon width="16" height="16" url="http://opensuse.org/static/fed9logo16.png"/>
<link>http://www.fedoraproject.org</link> <link>http://www.fedoraproject.org</link>
</distribution> </distribution>
</distributions> </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/<project>/<package>
 +
 + <binary_packages>
 + <package>
 + <name>kraft</name>
 + <summary lang="en">Kraft is software for people...</lang>
 + <summary lang="de">Kraft ist Software für Menschen, ...</lang>
 + <link type="ymp" distribution="opensuse-11">http://software.opensuse.org/ymp/home:kfreitag:Kraft/openSUSE_11.1/kraft.ymp</link>
 + <link type="yum" distribution="fedora-10">http://download.opensuse.org/repositories/home:/kfreitag:/Kraft/Fedora9/home:kfreitag:Kraft.repo
 + <link type="rpm" distribution="fedora-9">http://download.opensuse.org/repositories/home:/kfreitag:/Kraft/Fedora9/noarch/trmltools-1.1-5.4.noarch.rpm</link>
 + <link type="deb" distribution="ubuntu-804">http://download.opensuse.org/repositories/home:/kfreitag:/Kraft/xUbuntu_8.04/i386/kraft_0.32_i386.deb </link>
 + </package>
 + </binary_packages>
 +
 +The system can provide links to different types of packages or package meta information such as
 +rpm, deb, ymp or yum. The most convenient format is delivered back, depending on the capability of the distribution.

Revision as of 13:55, 20 July 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 /distributions

returns a XML document like

 <distributions>
   <distribution id="opensuse-11.0">
     <name>openSUSE 11.0</name>
     <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="fedora-9">
     <name>Fedora 9</name>
     <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/<project>/<package>

 <binary_packages>
   <package>
     <name>kraft</name>
     <summary lang="en">Kraft is software for people...</lang>  
     <summary lang="de">Kraft ist Software für Menschen, ...</lang>
     <link type="ymp" distribution="opensuse-11">http://software.opensuse.org/ymp/home:kfreitag:Kraft/openSUSE_11.1/kraft.ymp</link>
     <link type="yum" distribution="fedora-10">http://download.opensuse.org/repositories/home:/kfreitag:/Kraft/Fedora9/home:kfreitag:Kraft.repo 
     <link type="rpm" distribution="fedora-9">http://download.opensuse.org/repositories/home:/kfreitag:/Kraft/Fedora9/noarch/trmltools-1.1-5.4.noarch.rpm</link>  
     <link type="deb" distribution="ubuntu-804">http://download.opensuse.org/repositories/home:/kfreitag:/Kraft/xUbuntu_8.04/i386/kraft_0.32_i386.deb </link>
   </package>
 </binary_packages>

The system can provide links to different types of packages or package meta information such as rpm, deb, ymp or yum. The most convenient format is delivered back, depending on the capability of the distribution.