Development Tools Overview and Requirements

eLxr leverages many common tools in the Debian environment.To create new or update an exiting application package, all you need is an eLxr 12 image, a text editor, and to be familiar with the following tools.

For successful package development, it is recommended that you install and be familiar with the packages in this section. Depending on your own development environment, and your role as a developer or maintainer, you may not require every tool listed here, but it is good practice to install and set them up as doing so can prevent issues resolving from an incomplete setup.

Once you have installed and set up each tool in this section, your /home directory configuration files should include the following.

# ls ~/.*
.bash_history  .devscripts  .gitconfig  .quiltrc-dpkg  .viminfo
.bashrc        .gbp.conf    .profile    .sbuildrc

Package Development Tools

To perform the package development tasks in this manual, you will need the following tools.

build-essential

This package is a requirement for creating and updating Debian (and eLxr) packages with source code.

For details, see Package: build-essential (12.10 and others).

The build-essential package is available in the eLxr repository.

debhelper-compat

This package is a requirement for using the debuild command to build multiarch packages. It is installed by default on eLxr 12 images, but to perform package development on a Linux host, such as Ubuntu, you will need to install it.

debmake

The debmake command is the helper script for the Debian packaging powering your eLxr 12 image. It provides support for mutliarch packages. Use it to create template files that you customize to help you ensure you don’t miss any requirements. An added benefit is that when the template files are used as generated, it helps to ensure your package is DEP-5 compliant.

For details on using debmake, see Generating and Modifying Package Template Files

For additional information on other available options, see Guide for Debian Maintainers: What is debmake?.

The debmake package is available in the eLxr repository.

devscripts with debuild and debsign

The debuild command is the wrapper script for the dpkg-buildpackage command. It helps ensure that your binary package is built using the proper environment variables.

For details on using debuild, see Building the Application Package.

For additional information on the many commands that comprise the debuild command, see Guide for Debian Maintainers: What is debuild?.

Install the devscripts package to add debuild* and debsign to your system. If you want to include verbose output for binary builds and checks, you can set up a ~/.devscripts file with defaults as described in Guide for Debian Maintainers: devscripts.

Git and git-buildpackage

Git is a requirement for developing eLxr directly from the GitLab repositories as described in the eLxr 12 Quick Start. It is an essential tool in today’s development environment and is widely used to maintain source control. Use the git-buildpackage command (alias gbp) to build a source package in a Git repository. It uses the sbuild command to perform the build.

As a result, you should create a ~/.gbp configuration file to set global configuration for using gbp. For details, see Guide for Debian Maintainers: git-buildpackage.

quilt

Use quilt to record modifications, such as patches, in your development system. Specifically, you must set up quilt to record changes in the debian/patches/ directory, as opposed the the default patches directory.

This includes updating your ~/.bashrc file and creating a ~/.quilt-dpkg file to specify directory parameters while using quilt with eLxr. This will help you avoid changing the default behavior if you use quilt to develop additional package types.

For details on making these updates, see Guide for Debian Maintainers: quilt.

reprepo

Use reprepo to create and manage your own package repository. Designed for Debian (and Elxr) packages, reprepo helps enure your package maintains the same folder structure used on eLxr package repository servers, and allows you to share your package with a specific team, or even publicly. You can use reprepo to generate OpenPGP keys for package signing, create an apt repository, sign packages, and more.

For additional information on using reprepo, see Debian Wiki: Debian Repository: SetupWithReprepo.

sbuild

Use sbuild to provide a clean build environment with a number of additional features for building your packages. You must install the additional required packages along with sbuild, including piuparts, autopkgtest, and lintian. For example:

$  sudo apt install sbuild piuparts autopkgtest lintian

In addition, you must also create a ~/.sbuildrc configuration file recommended by recent Debian practice at https://wiki.debian.org/SourceOnlyUpload. For details, see Guide for Debian Maintainers: sbuild.

tree

The tree command is a nice utility for displaying the folder structure of your development environment. It provides a snapshot of your package development folder set up and can help you resolve issues that arise from missing or misplaced package files.

The tree package is available in the eLxr repository.

Additional Set Up Requirements

Email

Many of the eLxr (Debian) development and maintenance tools use your email address and name for shell variables. Before you begin development, add the following lines to your ~./bashrc file.

DEBEMAIL="your.email.address@example.org"
DEBFULLNAME="Firstname Lastname"
export DEBEMAIL DEBFULLNAME

HTTP Proxy and Private Debian Repository

This helps to save bandwidth while accessing the package repository. You have a couple different options, including specialized and generic caching. A private repository helps by giving you a local folder for testing and maintaining your packages under development. For details, see Guide for Debian Maintainers: HTTP proxy.

Virtualization Tools

Virtual machines (VMs) are necessary for Docker deployments and for using QEMU to test your modified eLxr 12 image. To improve performance in VMs, especially with graphical applications, install virt-manager and qemu-kvm.