Home Wiki > openSUSE:Build Service Concept AppDirectory
Sign up | Login

openSUSE:Build Service Concept AppDirectory

tagline: From openSUSE

Application directory integration interface

To attract projects to build in the Build Service we implement an interface that returns paths 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 reusable.

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>
     <reponame>openSUSE_11.0</reponame>
     <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 10.3</name>
     <project>openSUSE:10.3</project>
     <reponame>openSUSE_10.3</reponame>
     <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>
     <reponame>Fedora_9</reponame>
     <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 /public/binary_packages/openSUSE:Tools/osc

which results in a xml document such as


 <package package="osc" project="openSUSE:Tools">
   <title>openSUSE (build service) commander</title>
   <description>Commandline client for the openSUSE build service.</description>
   <binaries>
     <list distribution="fedora-11">
       <repository url="http://download.opensuse.org/repositories/openSUSE:/Tools/Fedora_11/openSUSE:Tools.repo"/>
       <rpm arch="i386" url="http://download.opensuse.org/repositories/openSUSE:/Tools/Fedora_11/i386/osc-0.123-18.1.i386.rpm"/>
       <rpm arch="x86_64" url="http://download.opensuse.org/repositories/openSUSE:/Tools/Fedora_11/x86_64/osc-0.123-18.1.x86_64.rpm"/>
     </list>
     <list distribution="ubuntu-9.04">
       <repository url="http://download.opensuse.org/repositories/openSUSE:/Tools/xUbuntu_9.04/"/>
       <deb arch="amd64" url="http://download.opensuse.org/repositories/openSUSE:/Tools/xUbuntu_9.04/amd64/osc_0.117-1_amd64.deb"/>
       <deb arch="i386" url="http://download.opensuse.org/repositories/openSUSE:/Tools/xUbuntu_9.04/i386/osc_0.117-1_i386.deb"/>
     </list>
     <list distribution="opensuse-Factory">
       <ymp url="http://software.opensuse.org/ymp/openSUSE:/Tools/openSUSE_Factory/osc.ymp"/>
       <repository url="http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_Factory/openSUSE:Tools.repo"/>
       <rpm arch="noarch" url="http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_Factory/noarch/osc-0.122-14.2.noarch.rpm"/>
       <rpm arch="noarch" url="http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_Factory/noarch/osc-0.122-14.1.noarch.rpm"/>
     </list>
   </binaries>
 </package>


For each available distribution the xml contains a list of one or more elements. The type and amount of returned links depends on the distribution:

  • all distributions:

one or more rpm or deb elements are returned, one for each available architecture and subpackage. Additionally a repository element is returned with the repository url.

  • all openSUSE distributions:

we provide an additional <ymp> element if the packagename matches one of the binary rpms.