OpenSuse Build Service

m (Fremantle)
(Undo revision 34022 by lbt (Talk))
Line 1: Line 1:
[[/Installation | Installing OpenSuse Build Service]] is a prerequisite for setting up a specific OBS project.
[[/Installation | Installing OpenSuse Build Service]] is a prerequisite for setting up a specific OBS project.
-
 
-
In a closed environment you use what's in the SDK and you get your own little space; talking to others is discouraged and sharing and re-use outside the blessed area is frowned upon. This dictatorial style has the advantage of making life easier for the vendor. In an open world we have more interactions... and as students of networks know: increased connectivity brings increased complexity as well as increased benefits.  So this is an initial proposal for the organisation of OBS build projects and packages to support a QA process into an app-store / Extras or garage -like environment.  I'll introduce some basic OBS concepts and then describe how this might work. I would like this to raise awareness of some potential complexities that we may face and get some thoughts on how to deal with them.
 
-
 
-
 
-
OBS Intro
 
-
 
-
Lets set out some basics about the OBS.
 
-
 
-
  1. It's a build system. You put source on it and say "use this repository" and it builds a minimal SDK-like chroot using the deb/rpms it finds in that repository
 
-
  2. It has packages - a package corresponds to a tarball and a spec/dsc
 
-
  3. It has projects - a project is like a directory with packages
 
-
  4. When a package is built it is 'published' from the project where it was uploaded into a corresponding repository (which can be used to build other projects)
 
-
  5. The repositories can also be used by devices to download binary packages.
 
-
 
-
The 'trick' then, is to set up a structure of projects that we can use to support the publishing and sharing activities that we need.
 
-
 
-
 
-
Our Goals
 
-
 
-
We want to allow freedom for developers to develop;
 
-
 
-
We want to provide excellent quality assured applications for our "app store";
 
-
 
-
We want to extend the core distro with a community supported Surrounds area for libraries and packages that are depended upon by more than one application.
 
-
 
-
 
-
Individual Homes
 
-
 
-
You'll start by uploading and building a package in your "home" directory (which can have a structure underneath it for multiple projects). This will allow you to build against any of the main distros; any group/community projects or even any other community member home projects. Oh, and they can use your code as a baseline too. Once built your code is automatically published to a repo on the community downloads server.
 
-
 
-
 
-
 
-
This is a lot like the Ubuntu PPA solution.
 
-
 
-
 
-
 
-
At that point you can stop if you want. You have a complete set of repositories (1/subproject). No painful QA processes. No 'fragmentation'. But equally your repo(s) will needed to be manually added to a device in order for it to appear in any apt-get/zypper/yum etc.
 
-
 
-
 
-
A huge benefit here is that to get at a development version of an application you use a specific repository, not a mishmash of randomly unstable packages like Extras-devel.
 
-
 
-
 
-
Community Repository - Extras
 
-
 
-
If you'd like your application to appear in the Extras repo which is pre-installed on devices then you can submit to the QA process.
 
-
 
-
 
-
First you register for the package name (a thought occurs... should this namespace be the same as the distro package namespace?), then submit your code to the distro promoter; there it is QA checked, copied to Extras:Testing, built, QA'ed again and becomes available in the Testing repository.
 
-
 
-
 
-
<here be dragons>
 
-
 
-
The community testers then approve your code.
 
-
 
-
</dragons>
 
-
 
-
 
-
Once approved the code is built or copied to Extras:Stable a final time
 
-
 
-
 
-
General Building
 
-
 
-
 
-
First off we need to build against releases of vanilla distros; these all support both i586 & arm
 
-
 
-
 
-
MeeGo:name-number
 
-
 
-
Maemo:Fremantle
 
-
 
-
Maemo:Harmattan
 
-
 
-
 
-
I anticipate that there will be a community library around MeeGo (like MUD for Maemo or Universe for Ubuntu). These would cover that
 
-
 
-
 
-
MeeGo:name-number:Surrounds
 
-
 
-
Maemo:Fremantle:Surrounds
 
-
 
-
Maemo:Harmattan:Surrounds
 
-
 
-
 
-
Or, for more platform oriented users we may need to build against bleeding edge codesets:
 
-
 
-
MeeGo:Trunk
 
-
 
-
MeeGo:snap:latest
 
-
 
-
MeeGo:snap:w13
 
-
 
-
Maemo:Harmattan:alpha1
 
-
 
-
[[/Fremantle_Setup|Setting up Fremantle]]
 
= Fremantle =
= Fremantle =

Revision as of 11:07, 8 May 2010

Installing OpenSuse Build Service is a prerequisite for setting up a specific OBS project.


Contents

Fremantle

This currently refers to some inaccessible repos. I'll open them up as I get time.

Approach:

  • Copy all Nokia Fremantle Binaries to Fremantle:1.1:Std
  • Create Fremantle:1.1:Bootstrap/<pkg> to create packages (use useforbuild = no?)
  • Create Fremantle:1.1:Loaded to include additional binaries needed by OBS
  • Create Fremantle:1.1 as the nominal target for :Extras and the main prjconf

(see https://projects.maemo.org/trac/maemoobs/wiki/Fremantle too)

Setup the projects:

Fremantle:1.1:Std

 # Specify the OBS we're working on
 API=http://api17/

 # Get the Fremantle binaries
 mkdir -p /Downloads/fremantle1.1/
 cd /Downloads/fremantle1.1/
 wget -e robots=off --accept \*.deb --mirror --no-parent --progress=dot \
  --no-host-directories --cut-dirs=2 -nv \
  http://repository.maemo.org /pool/fremantle-update2/

 # Prepare for the :full dir for the OBS
 mkdir all all/all all/armel all/i386
 find free non-free -name *armel.deb | xargs -I@ ln @ all/armel
 find free non-free -name *i386.deb | xargs -I@ ln @ all/i386
 find free non-free -name *all.deb | xargs -I@ ln @ all/all

 # On an OBS client
 osc -A $API meta prj Fremantle:1.1:Std -F - <<XML
 <project name="Fremantle:1.1:Std">
   <title>Fremantle 1.1</title>
   <description>
 The standard binaries from Nokia
   </description>
   <person role="maintainer" userid="Admin"/>
   <person role="bugowner" userid="Admin"/>
   <build>
     <enable/>
   </build>
   <publish>
     <disable/>
   </publish>
   <debuginfo>
     <disable/>
   </debuginfo>
   <repository name="standard">
     <arch>armv7el</arch>
     <arch>i586</arch>
   </repository>
 </project>
XML

# Back on OBS server
# Copy the binaries into the new project
cd /srv/obs/build/Fremantle\:1.1\:Std/standard/
mkdir -p i586/:full armv7el/:full

ln /Downloads/fremantle1.1/all/armel/* armv7el/:full/
ln /Downloads/fremantle1.1/all/all/* armv7el/:full/

ln /Downloads/fremantle1.1/all/i386/* i586/:full/
ln /Downloads/fremantle1.1/all/all/* i586/:full/

/usr/lib/obs/server/bs_admin --rescan-repository Fremantle:1.1:Std standard i586
/usr/lib/obs/server/bs_admin --rescan-repository Fremantle:1.1:Std standard armv7el
/usr/lib/obs/server/bs_admin --rescan-repository Fremantle:1.1:Std standard armv5el

chown -R obsrun:obsrun /srv/obs/build/Fremantle*

Fremantle:1.1:Bootstrap

# On an OBS client
osc -A $API meta prj Fremantle:1.1:Bootstrap -F - <<XML
<project name="Fremantle:1.1:Std">
  <title>Fremantle 1.1</title>
  <description>
The standard binaries from Nokia
  </description>
  <person role="maintainer" userid="Admin"/>
  <person role="bugowner" userid="Admin"/>
  <build>
    <enable/>
  </build>
  <publish>
    <disable/>
  </publish>
  <debuginfo>
    <disable/>
  </debuginfo>
  <useforbuild>
    <disable/>
  </useforbuild>
  <repository name="Debian_5.0_standard">
    <path project="openSUSE.org:Debian:5.0" repository="standard"/>
    <arch>armv5el</arch>
    <arch>armv7el</arch>
    <arch>i586</arch>
  </repository>
  <repository name="Ubunty_9.04_standard">
    <path project="openSUSE.org:Ubuntu:9.04" repository="standard"/>
    <arch>armv5el</arch>
    <arch>armv7el</arch>
    <arch>i586</arch>
  </repository>
</project>
XML

This project has <useforbuild> disabled. This means that a package built in this project will not attempt to resolve dependencies from peer packages.

Now ensure the Ubuntu/Debian bootstrapped armv5el binaries are copied to the armv7el repo
 echo ExportFilter: armel\.deb$ armv5el | osc -A $API meta prjconf Fremantle:1.1:Bootstrap -F -


Fremantle:1.1:Loaded

This project

 osc -A $API meta prj Fremantle:1.1:Loaded -F - <<XML
<project name="Fremantle:1.1:Loaded">
  <title>Fremantle 1.1 Loaded</title>
  <description>
This project contains all the binaries used in addition to the
standard Nokia ones. They are built in Fremantle:1.1:Bootstrap and
then copied into here.
  </description>
  <person role="maintainer" userid="Admin"/>
  <person role="bugowner" userid="Admin"/>
  <build>
    <enable/>
  </build>
  <publish>
    <disable/>
  </publish>
  <debuginfo>
    <disable/>
  </debuginfo>
  <repository name="standard">
    <arch>armv7el</arch>
    <arch>i586</arch>
  </repository>
</project>
XML

Fremantle:1.1

This project is used as a target by applications. It is a multi-path project looking first in :Loaded and then in :Std

osc -A $API meta prj Fremantle:1.1 -F - <<XML
<project name="Fremantle:1.1">
  <title>Fremantle 1.1</title>
  <description>
This project is the OBS Fremantle target.  It is based on the standard
Nokia binaries with some additional binaries needed for Fremantle.
  </description>
  <person role="maintainer" userid="Admin"/>
  <person role="bugowner" userid="Admin"/>
  <build>
    <enable/>
  </build>
  <publish>
    <disable/>
  </publish>
  <debuginfo>
    <disable/>
  </debuginfo>
  <repository name="standard">
    <path project="Fremantle:1.1:Loaded" repository="standard"/>
    <path project="Fremantle:1.1:Std" repository="standard"/>
    <arch>armv7el</arch>
    <arch>i586</arch>
  </repository>
</project>
XML

Since this project is a target it needs a prjconf: https://dvcs.projects.maemo.org/git/?p=OBS/maemoConf;a=blob_plain;f=Maemo_Fremantle.conf;h=818bd5a0c9136d13e1bb698cfcf861f64522b1d1;hb=573b391ccecd8fef6e4f5328a272a3ab1c4cdee5


Extras

Binaries for :Loaded

scratchbox-fake
osc -A $API meta pkg Fremantle:1.1:Bootstrap scratchbox-fake -e
osc -A $API co Fremantle:1.1:Bootstrap scratchbox-fake
cd Fremantle:1.1:Bootstrap/scratchbox-fake
git clone git@dvcs.projects.maemo.org:OBS/fremantle-deltas/scratchbox-fake
cd scratchbox-fake
dpkg-buildpackage -S -uc -us
cd ..
osc addremove
osc commit -m"From git"

busybox

This just provides 'su' through busybox-login.

Stskeeps reports that there's a login pkg inside Nokia that would be better.

osc -A $API meta pkg Fremantle:1.1:Bootstrap busybox -e
osc -A $API co Fremantle:1.1:Bootstrap busybox
cd Fremantle:1.1:Bootstrap/busybox
git clone git@dvcs.projects.maemo.org:OBS/fremantle-deltas/busybox
cd busybox
dpkg-buildpackage -S -uc -us
cd ..
osc addremove
osc commit -m"From git"

fakeroot

osc -A $API meta pkg Fremantle:1.1:Bootstrap fakeroot -e
osc -A $API co Fremantle:1.1:Bootstrap fakeroot
cd Fremantle:1.1:Bootstrap/fakeroot
git clone git@dvcs.projects.maemo.org:OBS/fremantle-deltas/fakeroot
cd fakeroot
dpkg-buildpackage -S -uc -us
cd ..
osc addremove
osc commit -m"From git"