Subject: Easily build Mir's rdepends against local Mir packages

From: Christopher James Halse Rogers <[email-masked]>
Date: Thu, 07 Aug 2014 09:02:19 +1000

Hey all!

As seen on IRC last night:

18:22 <camako> Seems like we need a way to replicate what the silos are 
doing - building mir, creating packages from it, installing them, and 
then building downstreams... I.e. not just building downstreams using 
mir binaries, but using mir packages......

Fortunately, this has an easy solution!

Using the magic of sbuild, you can build your Mir packages, create a 
repository out of them, and automatically use them to build other 
packages.

First, create a Utopic chroot with ‘mk-sbuild --eatmydata utopic’.

The attached schroot configuration files have the appropriate 
configuration. The 60-,80- files need to go in /etc/schroot/setup.d and 
sbuild-utopic-amd64 goes in /etc/schroot/chroots.d.

You'll need to edit the sbuild-utopic-amd64 config to make 
local.repository point at the sbuild output directory (Mine is set as 
$build_dir='/home/chris/Builds'; in ~/.sbuildrc).

You can now build the Mir packages in your chroot with a command like 
“sbuild -j9 -d utopic mir_0.6.0-0ubuntu1.dsc” and then build (eg) 
qtmir against those packages with “sbuild -j9 -d utopic-local 
qtmir_0.0.0~sillyversionstring.dsc”

---

From: Michał Sawicz <[email-masked]>
Date: Thu, 07 Aug 2014 09:04:08 +0200

W dniu 07.08.2014 o 01:02, Christopher James Halse Rogers pisze:
> repository out of them, and automatically use them to build other packages.

Check out https://wiki.ubuntu.com/SimpleSbuild for this, too!

RAOF, maybe you could add some of your tweaks there? Love the optional 
local repo and dynamic proxy.

===

There's more, too, you can x-build for devices this way, quite a lot 
faster than natively on devices. Unfortunately that breaks often, 'cause 
it's not part of our daily routine. Currently it's broken due to the 
forced 4.9 dependency¹.

Other available niceties include: shm (whole build happens in RAM), 
ccache (shared between chroots and chroot runs), you can create 
pre-populated chroots with all the build deps for your project 
preinstalled (I use btrfs snapshots for those to save space). The world 
is your oyster!

¹ https://bugs.launchpad.net/bugs/1353855

HTH,
--
Sq