Building Ubuntu packages of MAASΒΆ

Using a virtual machine from a cloud provider seems to be easier and less hassle than using a local VM or LXC container, but the same recipe ought to apply.

You need to build on the same OS that the package will be targeted to, so use a Precise instance to make packages for Precise, for example.

  1. Start up an instance, log in, and bring it up to date:

    sudo apt-get update && sudo apt-get upgrade
    
  2. Get the appropriate packaging branch:

    bzr branch lp:~maas-maintainers/maas/packaging{...}
    

    The MAAS Maintainers own all the official MAAS branches.

  3. Move into the new branch directory.

  4. Check that all the build dependencies are installed. The dependencies are defined in debian/control:

    fgrep -i build-depends -A 10 debian/control
    

    This will yield, for example:

    Build-Depends: debhelper (>= 8.1.0~),
                   dh-apport,
                   po-debconf,
                   python (>= 2.7),
                   python-distribute,
                   python-django
    Standards-Version: 3.9.3
    ...
    

    Install these dependencies:

    sudo apt get install \
        debhelper dh-apport po-debconf python \
        python-distribute python-django
    
  5. Edit debian/changelog so it contains:

    • the right upstream revision number in the version,
    • the series you’re building for; if UNRELEASED appears in the first entry, s/UNRELEASED/trusty/ (or the series you want),
    • the name and email address that correspond to the PGP key you want to use to sign the package; these appear near the end of the topmost entry.
  6. Build:

    bzr bd -S -- -uc -us
    

    The latter options tell it not to sign the files. You need to do this because the remote machine will not have your GPG key.

  7. Sign the build on your local machine:

    debsign -r user@host '~/*.changes'
    

    where user@host is an SSH string for accessing the remote instance. This will scp the changes and dsc locally, sign them, and put them back.

  8. On the remote instance you can optionally upload to a PPA:

    dput -fu ppa:maas-maintainers/name-of-ppa *.changes
    
MAAS logo

MAAS

Metal As A Service.



Related Topics

This Page