Mailinglist Archive: opensuse-buildservice (332 mails)

< Previous Next >
[opensuse-buildservice] Integrating OBS with Subversion - Cray's solution
I've recently uploaded the tools developed at Cray to work with OBS and
Subversion to gitorious at http://www.gitorious.org/cray-obs. If
there's interest in any of the features in this code I'll try to merge
it to the official OBS. Cray's tools includes svndownstream, which we
use to package up Subversion workareas into a format digestible by OBS,
among other things.

Some cool features added to obs-server and osc with svndownstream:

svndownstream ls
- Shows all packages in OBS that use the source from this workarea.
Follows links backwards and forwards.

Example:

You're in the kernel Subversion workarea. It supplies the source for
kernel-source directly. kernel-source is then linked in OBS to all the
kernel-<flavor> packages as the flavors use the same source, just
different specs. There also is a kernel:trunk:debug project where, we
do some additional debug option, so this is an indirect link of
kernel:trunk:debug/kernel-cray_gem_c -> kernel:trunk:debug/kernel-source
-> kernel:trunk/kernel-source. So, all the links are followed.

kernel/linux/trunk> svndownstream ls

kernel:trunk kernel-source
kernel:trunk kernel-cray_gem_c
kernel:trunk kernel-cray_ss_c
kernel:trunk kernel-cray_gem_s
kernel:trunk kernel-syms
kernel:trunk kernel-cray_ss_s
kernel:trunk:debug kernel-source
kernel:trunk:debug kernel-cray_gem_c
kernel:trunk:debug kernel-cray_ss_c
kernel:trunk:debug kernel-cray_gem_s
kernel:trunk:debug kernel-syms
kernel:trunk:debug kernel-cray_ss_s

Well, that's great, now the develop can tell what they can build using
just the source in kernel/linux/trunk, but what if they want to check
what's going to be rebuilt if they check in that code. This could be
important if they are doing a change that could impact all the kernel
module packages (kmps) that depend on the kernel. In that case there's
svndownstream dependents

svndownstream dependents
- Perform actions on dependents.

Dependents are anything that (in)directly BuildRequires a package or
(in)directly Requires a package, so that the dependent package would be
rebuilt if you changed the source in Subversion. There are numerous
subcommands (it works a lot like osc meta in that way), but as an intro:

svndownstream dependents list
- This command will display a dependency tree (and optionally write it
to a file)

Example:
This is just an excerpt, but the real dependency tree is huge for the
kernel


svndownstream dependents list --collapse repository \
--collapse architecture
...
kernel:trunk/kernel-source
virtual-cluster:danube/cray-virtual-cluster
XT:trunk:ss/cray-job
XT:trunk:ss/cray-account
...

The --collapse flags tell the server to ignore repository and
architecture differences so it only looks for dependencies between
project/package pairs.

One cool bit about the output is svndownstream dependents list supports
the graph format used by graphviz, so you can make visualizations of
dependencies. Good for figuring out where to sever dependencies by
breaking up packages to make builds faster or happen less often.

The dependency calculations use a MySQL database in the server backend
to cache the dependencies calculated in bs_sched. You can see the
majority of those changes in
http://www.gitorious.org/cray-obs/obs-server/commit/00705dba7a409d766ac28d5213dca0a3405a96ee
.


--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages