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 \
  http://bazaar.launchpad.net/~ubuntu-bugcontrol/ubuntu-qa-tools/master \
  ~/misc/ubuntu/tools/ubuntu-qa-tools
$ bzr branch lp:ubuntu-security-tools \
  ~/misc/ubuntu/tools/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


UGJ / DF (México)

I had being looking forward for participating in a UGJ for a while, the idea behinds it sounds like a lot of fun for me, and the reports from other parts of the world, where it was hosted, really made it more desirable, so I waited to see if someone else popped up and organized something near my area but unfortunately no one made it (during 2 cycles), so I decide to organize it  for myself and get done one of the items in my Ubuntu TODO list.

http://www.flickr.com/photos/67103741@N07/show/


The ubuntu packaging guide

Browsing around I came to the ubuntu packaging guide, a work in progress, with lots of interesting tips and howto’s about what people need to get started with ubuntu development (I really hope someone could document how to work with merges and FTBFS bugs, still no light for me), now I’ll just record how I ‘compile’ it, in case wanted to add something and I forget how to test it xD

I’m running Ubuntu lucid (10.04 also known as the LTS version), and I only had to:

#download the source

$ bzr branch lp:ubuntu-packaging-guide

#install sphinx ( http://sphinx.pocoo.org/ )

$ sudo apt-get install python-sphinx

#produce the documentation

$ make html #or make latexpdf, check the Makefile out for more options

I know nothing about sphinx but looking at the files I suppose the *.rst are whom produce the files…

Still no idea how to get the .deb package from it, but thanks to tumbleweed from #ubuntu-motu to show me how simple getting the docs actually was >_>’ (even without the .deb package), i10n is still in progress at mainstream

Not a lot had happened for me, the alpha group is having a lot of more comments, but still not sure if it’s having the success it was suppose to have, the final iso testing for natty has been started, the oneiric (the next ubuntu version) topics also have started, the newletters seems dead, people talked about unity till the last minute…

The blogs I keep reading and that I really, really recommend are:

http://raphaelhertzog.com/

http://daniel.holba.ch/blog/

…going back to what people call ‘reality’ =(


Follow

Get every new post delivered to your Inbox.