Ubuntu Debian Packaging

Kria SOM App Store Applications Developer Deployment Guide for Ubuntu (UG1630)

Document ID
UG1630
Release Date
2023-08-11
Revision
1.0 English

All Debian based Linux distribution like Ubuntu supports the package installation through binary Debian files. The Debian files (.deb) can be installed locally or through remote archives using apt family of programs (apt, apt-get, apt-cache, aptitude). Apart from regular Debian software package repositories, Ubuntu also provides Personal Package Archive (PPA) based user package hosting. Refer to the Ubuntu Packaging Guide for details on an Ubuntu development flow. The remote hosting provides easy way to maintain and upgrade the Debian packages. Before working with Debian packages for Ubuntu, it is important to understand the distinction between source and binary packages.

Binary packages (DEB) are archive files (ar) containing all the files that the package will install (binaries, libraries, configurations, documentation, etc.) along with the metadata required by the packaging system (apt) to install and maintain those packages. These packages are usually maintained by the OS vendor in a package repository and installed/updated on the system by the user with a package manager such as apt.

Source packages (files *.orig.tar.gz (sources), *.debian.tar.gz (changes for package build), and .dsc (contains the name of the package and other information)) contain all the sources and metadata required to build a working binary package. The source package is uploaded and compiled by a build server, and is then made available through the PPA.

Depending on the constraints of the chosen Debian package host, the developer either needs to upload binary packages (.deb files) or the source version of the package. This guide highlights both the basic Debian source package creation as well as the basic Debian binary packaging process. Refer to the Debian packaging wiki for details on the source package generation tutorial. This Practical Guide is a good Debian binary package generation guide.