ExtraPackageBuilding

How to build the extra packages for a stable release

This wiki page describes how to prepare the extra packages required for a new Ubuntu kernel release. The intended audience is Ubuntu Kernel Core Developers performing this task, or others interested in the process.

-meta packages

The -meta git trees (for example, the ubuntu-precise-meta package) contains a README file detailing how to prepare and build the source package. Here's a summary of these instructions.

After checking out a tree, it is necessary to add a changelog version entry to file meta-source/debian/changelog. This new entry shall include:

  • An ABI (and version minor number!) bump;
  • The series (e.g., precise);
  • A changelog entry stating the ABI bump.

Example of adding changelog entry using dch:

    $ dch -i -c meta-source/debian/changelog

Just duplicate the previous one and edit.

  • Be sure to change the version and ABI number
  • Change UNRELEASED to the appropriate release name.

Here's an example of an entry:

linux-meta (3.2.0.32.35) precise; urgency=low

  [ Luis Henriques ]

  * Bump ABI

 -- Luis Henriques <luis.henriques@canonical.com>  Tue, 25 Sep 2012 10:34:58 +0100

Then, just commit this change and tag it:

    $ git add meta-source/debian/changelog
    $ git commit -s -m "UBUNTU: Ubuntu-3.2.0.32.35"
    $ git tag -s -m Ubuntu-3.2.0.32.35 Ubuntu-3.2.0.32.35

To build the source package, just run 'make' on the top-level directory. The Makefile will do its best to figure out the correct version to use with the dpkg-buildpackage command. In case it fails to find the correct version, the variable LAST_VERSION can be used to overide it:

    $ LAST_VERSION=3.2.0.31.34 make

Please refer to the README file for further details.

-ports packages

The -ports package (for example, the one from Lucid) is built in the same way as the -meta package. The only difference is that the tag to be applied to the git tree uses a different convention: the 'ports-' prefix shall be used to tag the release. For example:

    $ git tag -s -m ports-Ubuntu-2.6.32.45.37 ports-Ubuntu-2.6.32.45.37

-lbm packages

These three packages are prepared in a similar way. After checking out a git tree, the first thing to do is to start a new release:

    $ git clean -fxd
    $ fakeroot debian/rules clean
    $ fakeroot debian/rules startnewrelease
    $ git add debian/changelog
    $ git commit -s -F debian/commit-templates/newrelease

Then, it is necessary to bump the ABI number. Just edit the debian/changelog file and increment the ABI number. Also, replace "UNRELEASED" by the series (e.g., "oneiric") and commit:

    $ git add debian/changelog
    $ git commit -s -F debian/commit-templates/bumpabi

It is now necessary to insert all the changes into the changelog

    $ fakeroot debian/rules insertchanges

At this point, it is necessary to review the changelog and eventually add a new entry referring to an ABI bump. Finally, just commit and tag:

    $ git add debian/changelog
    $ git commit -s -m "UBUNTU: Ubuntu-3.0.0-17.10"
    $ git tag -s -m Ubuntu-3.0.0-17.10 Ubuntu-3.0.0-17.10

NOTE: if there are no changes to the package, we can fold all the commits into a single one, instead of the usual 3 (start release, bump abi, release). In the case of no changes, you can run dch and commit the new ABI and tag

Example of adding changelog entry using dch:

    $ "dch -i -c debian/changelog

To generate the source package for -lbm packages, use:

    $ git clean -fxd
    $ fakeroot debian/rules clean
    $ dpkg-buildpackage -S -us -uc -sa -I -i -v<updates-version>

-signed packages

Starting with Quantal, a new git tree (ubuntu-quantal-signed) has been introduced. After checking out this tree, there is a script 'update-version' which shall be used to sync with the main linux package.

This package can (and should be) uploaded at the same time as the main linux package; it has binary dependencies in it to make it build in the right order.

To run the script, the path to the main linux package tree has to be passed as argument:

    $ update-version ../ubuntu-quantal

NOTE: for lts-quantal-signed, be sure to point to the precise repo with the lts-quantal branch checked out

The update-version script will print out the commit and tagging commands that shall be executed manually.

Finally, just build the source package using dpkg-buildpackage:

    $ git clean -fxd
    $ fakeroot debian/rules clean
    $ dpkg-buildpackage -S -us -uc -sa -I -i -v<updates-version>

-backport packages

The example here is for Precise, backported from Quantal

Check out the Precise backport kernel (in the precise tree)

    $ git checkout lts-backport-quantal
    $ git fetch origin; git fetch origin lts-backport-quantal; git reset --hard FETCH_HEAD

Now update the tree

    $ ./debian.quantal/etc/update-from-quantal-master

Locate the tracking bug for the Quantal release, and in the first comment in the bug, find the bug number for this backport kernel. The text in the bug will look like this:

    Backport packages from packages here can be worked on, the following tracking bugs were opened for them:
    linux-lts-quantal (precise) - bug 1157270

Now, edit debian.quantal/changelog:

  • change the tracking bug entry to be the bug number you just identified
  • update the changelog entry timestamp (in vi, ""call Finalise()")

Add all the files, commit, and tag

    $ git add -u
    $ git commit -s -m "UBUNTU: Ubuntu-lts-<changelog-version>"
    $ git tag -s -m Ubuntu-lts-<changelog-version> Ubuntu-lts-<changelog-version>

Please note that, starting with Trusty, the commit message and tag formats have changed slightly:

  • The commit message include the '~<series number>'; for example: 'Ubuntu-lts-3.16.0-23.31~14.04.2'

  • The tag also include the series number, but since the '~' is not legal in git tags, it is replaced by '_'; for example: 'Ubuntu-lts-3.16.0-23.31_14.04.2'

You'll have to force push to the origin repo.

    $ git push --force-with-lease

Don't forget to push the tag too.

    $ git push origin Ubuntu-lts-<changelog-version>

To generate the package, use the command like:

    $ git clean -fxd
    $ fakeroot debian/rules clean
    $ dpkg-buildpackage -S -I -i -uc -us -v<quantal-updates-version>

NOTE:

The <quantal-updates-version> is the latest version of the quantal kernel in updates. This is done because the changelog in the backport kernel has these versions in it, and the correct list of changes will be generated in the .changes file.

KernelTeam/StableHandbook/ExtraPackageBuilding (last edited 2014-10-28 17:23:12 by henrix)