OBS projects setup

Building for different targets in OBS
You might want to build packages for different targets like Debian or Opensuse. There are two ways to do that :


 * inter-OBS link provided by build.opensuse.org


 * download on demand against a static repository

rpm based distros

 * Choose a fast mirror of the repository you want to build against. It has to be static as cached information will not be refreshed automatically by OBS.

openSUSE:11.4 I use http://download.opensuse.org/distribution/11.4/repo/oss/suse/


 * Locate the primary.xml file for the repo. For 11.4 i586 it is at :

http://download.opensuse.org/distribution/11.4/repo/oss/suse/repodata/7c353c94f2b5e712734964e9a5a5b9f1695c81be4b285084ced08d4253995f13-primary.xml.gz


 * Create a project using the web UI or the osc. For example to create a toplevel Debian:6.0 using osc :

osc -A apiurl meta prj -e openSUSE:11.4


 * Fill the project meta similar to the following xml :

 The openSUSE 11.4 distribution The openSUSE 11.4 distribution using download on demand from http://download.opensuse.org/distribution/11.4/repo/oss/suse/    i586

Notes :


 * mtype is rpmmd for rpm based repositories
 * arch matches this repository and Packages file to an OBS scheduler, so i586 will be handeled by the i586 scheduler
 * baseurl is used to construct the URL of the packages mentioned in the primary.xml file


 * in the OBS backend create a directory :

mkdir -p /srv/obs/build/openSUSE:11.4/standard/i586/:full cd /srv/obs/build/openSUSE:11.4/standard/i586/:full wget http://download.opensuse.org/distribution/11.4/repo/oss/suse/repodata/7c353c94f2b5e712734964e9a5a5b9f1695c81be4b285084ced08d4253995f13-primary.xml.gz gunzip 7c353c94f2b5e712734964e9a5a5b9f1695c81be4b285084ced08d4253995f13-primary.xml.gz  mv 7c353c94f2b5e712734964e9a5a5b9f1695c81be4b285084ced08d4253995f13-primary.xml primary.xml.gz  chown -R obsrun:obsrun /srv/obs/build/openSUSE:11.4 obs_admin --rescan-repository openSUSE:11.4 standard i586


 * create a prjconf for this distro. For debian there is one at https://build.opensuse.org/project/prjconf?project=openSUSE:11.4

deb based distros

 * Choose a fast mirror of the repository you want to build against. It has to be static as cached information will not be refreshed automatically by OBS.

Debian stable I use http://debian.osuosl.org/debian/


 * Locate the Packages file for the dist and architecture you want. For squeeze (stable) i386 it is at :

http://debian.osuosl.org/debian/dists/squeeze/main/binary-i386/Packages.gz


 * Create a project using the web UI or the osc. For example to create a toplevel Debian:6.0 using osc :

osc -A apiurl meta prj -e Debian:6.0


 * Fill the project meta similar to the following xml :

 Debian stable (Squeeze) Debian 6.0 stable (Squeeze) using download and demand from http://debian.osuosl.org/debian/dists/squeeze    i586

Notes :


 * mtype is debmd for deb based repositories
 * arch matches this repository and Packages file to an OBS scheduler, so debian i386 will be handeled by the i586 scheduler
 * baseurl is used to construct the URL of the packages mentioned in the Packages file


 * in the OBS backend create a directory :

mkdir -p /srv/obs/build/Debian:6.0/standard/i586/:full cd /srv/obs/build/Debian:6.0/standard/i586/:full wget http://debian.osuosl.org/debian/dists/squeeze/main/binary-i386/Packages.gz gunzip Packages.gz  chown -R obsrun:obsrun /srv/obs/build/Debian:6.0 obs_admin --rescan-repository Debian:6.0 standard i586


 * create a prjconf for this distro. For debian there is one at https://build.opensuse.org/project/prjconf?project=Debian:6.0

References :
 * http://en.opensuse.org/openSUSE:Build_Service_Concept_Download_on_Demand