Developer Cheatsheet

This is adapted from the excellent documentation prepared by the Mythbuntu project.

The Ubuntu MATE project is split up into many components that are intertwined with Ubuntu components. Eventually it will be broken up enough that each component can be modified without requiring many modifications to Ubuntu or common core components.

This document explains how the project is organized. It was last updated as of Ubuntu MATE 15.04, so some content reflects how thing should be once Ubuntu MATE is official, and therefore may change from time to time.

Getting Started

Before starting, you should familiarize yourself with the following subsections:

  • Team Basics
  • Version Control Basics
  • Packaging Basics

Live CD

The LiveCD contains the following (critical) items:

  • A “casper” directory containing a live squashfs, initrd, and list of manifests.
  • A “pool” and “dists” directory that contain a pool of installable archives.
  • A “.disk” directory containing a UUID that matches the initrd in casper/

Other items are contained on the LiveCD, but not important to the critical functionality.

This squashfs is generated by the livecd-rootfs project. It’s code can be viewed at

bzr get lp:livecd-rootfs

The build keys off of the three tasks ubuntu-mate-core, ubuntu-mate-desktop andubuntu-mate-live`. These will be discussed further in the Meta Packages & Seeds section.

The LiveCD menu structure, pool and graphics are both generated from the Ubuntu debian-cd

bzr branch.bzr get lp:~ubuntu-cdimage/debian-cd/ubuntu
  • The graphics are located at data/RELEASE/ubuntu-mate.png and data/RELEASE/ubuntu-mate.pcx
  • The default preseed file is located at data/RELEASE/preseed/ubuntu-mate/ubuntu-mate.seed

The pool is populated using the seeds described in Meta Packages & Seeds later in this document.

Currently, the Squashfs & Live CD are built on a daily cron job and published at 1:06AM CST at
http://cdimages.ubuntu.com/ubuntu-mate/daily-live

If there are problems with the squashfs build, the details can be found at: http://people.canonical.com/~ubuntu-archive/livefs-build-logs/vivid/ubuntu-mate/

If there are problems with the LiveCD build, the details can be found at: http://people.canonical.com/~ubuntu-archive/cd-build-logs/ubuntu-mate/vivid/

Functionality

The LiveCD works like a live system thanks to a kernel module called “aufs”. It creates a union filesystem between a read-only squashfs and a temporary filesystem in the system’s RAM. The size of this tmpfs is determined by the amount of memory in the computer.

You will notice the behavior of the live environment is customized to be a little bit different than that of a fully installed system. This is caused by two packages.

The first package is casper. Casper is a collection of scripts that get ran early in the boot from initrd that will make customizations that are only sitting in the tmpfs. You can fetch casper from the Ubuntu bzr branch:

bzr get lp:ubuntu/casper

Generally things like creating a live cd user, and preventing services from starting happen here. Ubuntu-MATE makes no modifications to casper.

Meta Packages & Seeds

A seed is a text file used to declare what packages will be included for a given task or metapackage. A task is used for the initial installation during a squashfs build or from a d-i installation.

Information about how seeds work can be found on the Ubuntu wiki:

https://wiki.ubuntu.com/SeedManagement

For Ubuntu-MATE, the seeds can be found at:

bzr get lp:~ubuntu-mate-dev/ubuntu-seeds/ubuntu-mate.vivid

Here’s the basics:

Syntax

  • Starting with " *" means that something is a dependency
  • Starting with " * (" and ending with “)” means that it’s a recommends
  • Starting with “Task” means that this is a task related key
  • Everything else are treated as comments

Seeds

  • core: This seed is used for generating the list of things included in the ubuntu-mate-core metapackage and task. It has a dependency on all stuff in the Ubuntu platform ‘minimal’ seed.
  • desktop: This seed is used for generating the list of things included in the ubuntu-mate-desktop metapackage and task. It has a dependency on all stuff in the ubuntu-mate-core seed.
  • live: This seed is used for generating the list of things included in the ubuntu-mate-live metapackage ans task. It has a dependency on all stuff in the ubuntu-mate-desktop seed.
  • ship-live: This seed is used by debian-cd for populating the pool with packages to be placed directly on the media.

A metapackage is used to transition users to new packages that should be included in the install. Whenever a change is made to the ‘desktop’ or ‘live’ seeds, the metapackages should be regenerated. The metapackage bzr branch can be found at:

bzr get lp:~ubuntu-mate-dev/ubuntu-mate/ubuntu-mate-meta

Making changes to this branch will require that you have a recent version of germinate installed as well as the package devscripts.

The update mechanism can be ran by running ./update from the root of the bzr branch. This will read the data in ./update.cfg and use it to determine where to fetch the seeds from as well as archive information. Make sure that you have set dist properly in update.cfg before running this. The end result cause debian/changelog to be incremented with the new changes and each of the lists to call out the appropriate packages.

If there are problems with extra packages being included, that shouldn’t be, view these URLs to figure out where the dependency problem is generated:

Default Settings

The Ubuntu MATE default settings package provides all the default settings. It can be fetched from:

bzr get lp:~ubuntu-mate-dev/ubuntu-mate/ubuntu-mate-settings
2 Likes