Setting up Ubuntu for Ubuntu development (upgrade)


In this post I’ll describe the way I upgrade my computers and my environment for working with Ubuntu development (if it can be call it that way…). I always run in my main computer the latest LTS version (lucid at this moment), and in my test machine the latest development version (precise),  I believe that there will one great day when I know enough to make development in the test machine and backports || SRU‘s for the stable one =3

Since I use a lot my main computer, I install there pbuilder/devs tools/virtualbox to modify packages for the development cycle, I only use my test machine for packages that require real hardware to be tested. So, the first thing I do when a new cycle starts is create a new directory for the cycle that is starting, precise for this example.

$ mkdir -pv misc/ubuntu/ubuntu-12.04 && cd misc/ubuntu/ubuntu-12.04
$ mkdir  -pv app  diffs  isos  merge  udw

I mantain my ubuntu related stuff with this hierarchy:

$ tree -L 2 misc/ubuntu
 ├── results/
 │   ├── lucid-amd64/
 │   ├── lucid-i386/
 │   ├── maverick-i386/
 │   ├── natty-i386/
 │   ├── oneiric-i386/
 │   └── sid-i386/
 ├── ubuntu-10.04/
 │   ├── app/
 │   ├── diffs/
 │   ├── isos/
 │   ├── merge/
 │   └── udw/
 ├── ubuntu-10.10/
 │   ├── app/
 │   ├── diffs/
 │   ├── isos/
 │   ├── merge/
 │   └── udw/
 ├── ubuntu-11.04/
 │   ├── app/
 │   ├── diffs/
 │   ├── isos/
 │   ├── merge/
 │   └── udw/
 └── ubuntu-11.10/
 ├── app/
 ├── diffs/
 ├── isos/
 ├── merge/
 └── udw/

Which can be disassemble it as follows:

results => contains the output of pbuilder (.debs ready to been tested), I’ve added a patch to copy the packages keeping my ID as the owner

ubuntu-version => which contains everything related to that version, isos, packages (FTBFS), udw logs, diffs (which are actually debdiffs, this is the classic format to send patches), and merges

Once the dirs have been created, I check the latest versions of some devs packages (ubuntu-dev-tools, ubuntu-qa-tools & ubuntu-security-tools)

$ bzr branch lp:ubuntu-dev-tools ~/misc/ubuntu/tools/ubuntu-dev-tools
$ bzr get \ \
$ bzr branch lp:ubuntu-security-tools \

With those tools under my fingers I can start downloading the last isos (to test them), I do this as soon as possible, and then I keep upgrading it once a week, I use the $ ./dl-ubuntu-test-iso script who comes with the ubuntu-qa-tools package. Before I run it I edit the ~/.dl-ubuntu-test-iso file, currently it looks like this, the parts that I change is RELEASE=”precise” and ISOROOT=”/home/chilicuil/misc/ubuntu/ubuntu-12.04/isos/” I only download the desktop | server and netbook versions, however the VARIANTS and FLAVORS variables can be edited to download more images. It will run faster if zsync is installed

$ cd ~/misc/ubuntu/tools/ubuntu-qa-tools/dl-ubuntu-test-iso && \
  ./dl-ubuntu-test-iso &

The next thing I do is to set up pbuilder, I’ve already wrote about it, so I’ll just point out what variables I modify in ~/.pbuilder, for each new release I change the UBUNTU_SUITES var:

UBUNTU_SUITES=(“oneiric” “natty” “lucid“) => UBUNTU_SUITES=(“precise” “oneiric” “natty” “lucid“)

And add the aliases to ~/.bashrc:

alias pbuilder.precise=’sudo DIST=precise pbuilder’

I also modify the /etc/bash_completion.d/pbuilder to get autocompletion:

[ “$have” ] && complete -F _pbuilder -o filenames pbuilder pbuilder.lucid pbuilder.maverick pbuilder.natty pbuilder.oneiric pbuilder.precise pbuilder.sid pbuilder.unstable

The complete file is here, finally I run:

$ pbuilder.precise create

To obtain the precise environment where packages would be build


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s