KernelMaintenance

Differences between revisions 38 and 39
Revision 38 as of 2013-05-09 08:40:43
Size: 5805
Editor: h-4-180
Comment:
Revision 39 as of 2013-05-09 08:41:41
Size: 5852
Editor: h-4-180
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
<<Include(UbuntuStudio/Navigation/Header)>>

Howto for maintaining the linux-lowlatency kernel

The plan for maintaining kernels 12.04 and 12.10 is to keep the source at github, and have apw at UTK pull from there.

The plan for 13.04 is to use a PPA at launchpad (owned by ubuntustudio-kernel team)

All of the below is preliminary notes.

Prerequisites

If doing maintenance from a ubuntu machine

sudo apt-get install ubuntu-dev-tools debhelper build-essential kernel-wedge kernel-package fakeroot
sudo apt-get build-dep linux-lowlatency

Make sure you have a gpg signing key ready.

First Setup

Get the Source

Clone Linus main linux tree into a bare git reporitory.

git clone --bare git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linus-linux.git

Clone Ubuntu generic trees using Linus tree as reference. The master tree we use will be ubuntu generic.

git clone --reference linus-linux.git git://kernel.ubuntu.com/ubuntu/ubuntu-precise.git ubuntu-precise-lowlatency
git clone --reference linus-linux.git git://kernel.ubuntu.com/ubuntu/ubuntu-quantal.git ubuntu-quantal-lowlatency

In each repo, add the lowlatency remote, and create a new branch for it (you'll need ssh access):

git remote add lowlatency git@github.com:zequence/ubuntu-<release>-lowlatency.git
git fetch lowlatency
git fetch --tags lowlatency
git checkout -b lowlatency lowlatency/lowlatency

You'll now have the main linux vanilla tree that Linus maintains, and three much smaller Ubuntu linux-generic trees (precise, quantal, raring), which share objects with the tree they refer to (linus-linux.git), each containing a branch for lowlatency.

Update Process

When a tracker bug appears, like this one: LP: #1095799, it is good time to prepare the linux-lowlatency source tree. (In this case, we are updating linux-lowlatency-precise)

First, make sure Linus vanilla tree is up to date.

~/repos/linus-linux.git$ git fetch

Now, in our ubuntu-precise-lowlatency repo, switch to master (ubuntu-generic) and update that.

~/repos/ubuntu-precise-lowlatency$ git checkout master
~/repos/ubuntu-precise-lowlatency$ git pull origin master
~/repos/ubuntu-precise-lowlatency$ git fetch origin master --tags

Now head to the lowlatency tree, and begin with cleanup (make sure we are in the lowlatency branch). The clean up also adds some extra files, which we will NOT add to the git tree. This procedure is needed in order to have the update script work(next step).

~/repos/ubuntu-precise-lowlatency$ git checkout lowlatency
~/repos/ubuntu-precise-lowlatency$ fakeroot debian/rules clean

Now, were going to do much of the maintenance procedure automatically, by using a script. Basically, it does a rebase against the generic kernel source, and does some nice looking git commits, as well as prepares the debian package for a new release version.

~/repos/ubuntu-precise-lowlatency$ ./debian.lowlatency/etc/update-from-master

If all went fine, the last two lines...

*** verify and tag the release.
    git tag -s -m Lowlatency-3.2.0-36.35 Lowlatency-3.2.0-36.35

...tell you to do a git tag, but before we do that, we need to add one more thing.

Edit the debian changelog, to include the tracker bug

nano debian.lowlatency/changelog

Make it look something like this (with the correct bug report)

linux-lowlatency (3.2.0-36.35) precise-proposed; urgency=low

  [ Kaj Ailomaa ]

  * rebase to Ubuntu-3.2.0-36.56
  * Release Tracking Bug
    - LP: #1095799

Now, we need to redo the last commit by doing:

git commit -a --amend

Now, we do the tag:

git tag -s -m Lowlatency-<version> Lowlatency-<version>

Push to the lowlatency repo. Only push the recent lowlatency tag.

git push --force lowlatency lowlatency

And then just the one tag

git push lowlatency Lowlatency-<version>

All done.

First push to a new remote

First, set up the new remote. For example, calling it zequence. Then do initial pushes for both master and lowlatency branches. (using the git adress here only as example, as it should be ).

git remote add zequence <repo_url>
git push -u lowlatency master
git push -u lowlatency lowlatency
git push lowlatency lowlatency --tags

Building the Packages

Build the kernel source

For each kernel, make sure you have the orig tarball in the parent folder. Get them with:

pull-lp-source linux-lowlatency precise
pull-lp-source linux-lowlatency quantal
etc..

Then, to build the source package, we first clean

git clean -x -d -f

In order to upload to PPA later, we need to remove "-proposed" from the release pocket description. So, initially, the top of the changelog will look something like this:

linux-lowlatency (3.2.0-42.46) precise-proposed; urgency=low

Remove "-proposed", and the result is:

linux-lowlatency (3.2.0-42.46) precise; urgency=low

Now, let's build the package. In order for the list of changes to be accurate in the build, we need to specify which version we are updating from.
Sometimes there will be last minute updates to the source after a kernel already landed in the -proposed release pocket (see all available repos for /etc/apt/sources.list), and when doing the update, there will be no ABI bump. Also, there may already be a kernel in the -proposed pocket waiting to be released. In this situation, use the last published version in the -updates pocket as reference, and not -proposed (the kernel in -proposed won't be published since an update is now expected).

UbuntuStudio/KernelMaintenance (last edited 2013-07-29 12:43:45 by 212)