The Mer Wiki now uses your Mer user account and password (create account on https://bugs.merproject.org/)


OBS projects setup

From Mer Wiki
(Difference between revisions)
Jump to: navigation, search
(Add rpm based dod)
 
Line 116: Line 116:
 
References :  
 
References :  
 
* http://en.opensuse.org/openSUSE:Build_Service_Concept_Download_on_Demand
 
* http://en.opensuse.org/openSUSE:Build_Service_Concept_Download_on_Demand
 +
 +
[[Category:obs]]

Latest revision as of 14:12, 18 January 2012

Contents

[edit] 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


[edit] Explain inter-OBS link

[edit] Download on Demand

[edit] 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 :
 <project name="openSUSE:11.4">
   <title>The openSUSE 11.4 distribution</title>
   <description>The openSUSE 11.4 distribution using download on demand from http://download.opensuse.org/distribution/11.4/repo/oss/suse/</description>
   <person userid="Admin" role="maintainer"/>
   <person userid="Admin" role="bugowner"/>
   <download mtype="rpmmd" arch="i586" baseurl="http://download.opensuse.org/distribution/11.4/repo/oss/suse/" metafile="primary.xml"/>
   <build>
     <disable/>
   </build>
   <publish>
     <disable/>
   </publish>
   <repository name="standard">
     <arch>i586</arch>
   </repository>
 </project>

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


[edit] 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 :
 <project name="Debian:6.0">
   <title>Debian stable (Squeeze)</title>
   <description>Debian 6.0 stable (Squeeze) using download and demand from http://debian.osuosl.org/debian/dists/squeeze</description>
   <person userid="Admin" role="maintainer"/>
   <person userid="Admin" role="bugowner"/>
   <download mtype="debmd" arch="i586" baseurl="http://debian.osuosl.org/debian/" metafile="Packages"/>
   <build>
     <disable/>
   </build>
   <publish>
     <disable/>
   </publish>
   <repository name="standard">
     <arch>i586</arch>
   </repository>
 </project>

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

References :

Personal tools