Since several of the Lumiera core developers run a Debian flavour as their primary development platform, it seems natural to care for the debian packaging of Lumiera ourselves. Moreover, we’ve declared Debian/Stable to be our reference platform — we’ll provide any additionally required, more recent packages through our own Debian Apt-Repository (Debian depot).
|
readers new to debian packages may want to have a look into our Debian build tutorial, describing the commands for building and the structure of a debian (source) package in general |
As our whole infrastructure relies heavily on the Git version management tool, it’s only natural also to organise the (debian) packaging with the help of Git. Fortunatlely, there is a nifty tool called git-buildpackage, written by Guido Günther exactly for this purpuse: It treats the debianisation as a branch in the Git repository, forking off the mainline at the release point.
For Lumiera, this debianisation branch is called deb and can be found in the git:/git.lumiera.org/lumiera/debian repository.
The SCons build generates a relocatable distribution directory structure, holding the main executable, additional tools and utilities, plus the core libraries and resources. Here relocatable means that this subtree can be moved and placed anywhere on the system. As long as the relative directory layout remains intact, the executables will be able to find and load the accompanying libraries and resources. By invoking the scons install target, this directory structure is placed into the installation target directory.
Actually, this lookup process at application startup is performed in two phases
in the first phase the main application locates the directly linked shared libraries. Especially those libraries belonging first class to the Lumiera application are built with a relative searche path (rpath with $ORIGIN token). These libraries are placed into the modules/ subfolder
after successfully launching the executable, the second phase performes a lookup programatically, starting from the path location of the executable, trying to find a setup.ini which defines additional plug-ins and resources to load. Notably, the GUI to launch is loaded as a plug-in through this mechanism. Moreover, this bootstrap configuration defines the additional platform and user configuration to load for further outfitting of the system.
This organisation is used as foundation for packaging and installing. The primariy application distribution structure will be located into a subfolder below /usr/lib/. Only the main application executable will be symlinked into /usr/bin/. The LSB explicitly allows for such a layout, which is typically used by large application bundles (OpenOffice, Gimp, Eclipse). Since the application startup encompasses two phases, loading the extended configuration programmatically after launching the application, such extended resources can easily be relocated into a separate folder below /usr/share/, as required by LSB.
Official releases are marked by a tag on the master branch. Usually, we’ll also fork a release branch at that point, featuring bugfixes only. From here we’ll merge to the debian branch
To (re)build the debian package
git clone git:/git.lumiera.org/lumiera/debian
mkdir pack.deb
cd debian
git-buildpackage --git-upstream-branch= RELEASE-TAG
— here RELEASE-TAG denotes the point in the Git history, which should become the reference source and be packaged into the *.orig.tar.gz. Usually, it’s just sufficient to use master for that purpose.
In addition to the packaging, we maintain a dedicated Apt-Repository for automated installation and upgrades. We try to build the package for several Debian derived distributions (like Ubuntu). → more on the repository organisation