Category: DevOps

When we talk about Debian we must talk in the superlative. One of the reasons why Google and International Space Station are choosing Debian as their default Linux distribution is because it has (by far) the biggest package collection. At the time of writing this document, there are 61801 packages in Debian Sid (Unstable/Development distribution).

But as with many things in life, your greatest asset can be also your biggest liability—unless you take things under control. As an example, people usually complain how package versions in Debian “Stable” are too old, and they are spot on right ignorant. The author of this document has never used Debian “Stable” outside of production and has solely relied on some of the ingenious mechanisms provided by Debian, which when properly configured can provide you with unlimited possibilities.

APT Pinning

Pinning allows you to install and run package versions from other (Testing/Unstable/Experimental) Debian branches without having to upgrade the whole distribution to that particular branch.

Example 1:

You are running Debian 7.2 (Wheezy), and you want latest “libjmagick6-java” version (i.e: 6.6.9), however you only see the version which is present in Stable repository (6.2.6). When you look for the package on Debian packages, you can see that the version you want is present in Testing/Unstable.

Preface

This document was composed in aim to briefly reflect on Debian packaging system (dpkg) and provide information on how Debian packages are automatically created and managed (uploaded) using Maven/Ant. Scope of the document implies that the reader already has basic knowledge of Debian/dpkg and/or Maven/Ant. Even though there are concise theoretical explanation, author tried the “teach by examples” approach, thus you’ll be able to find plethora of code examples.Debian packet creation is more then just a simple hack which consists of putting right files into right directories, there’s also lot of parts of packing process which weren’t explained in depth. I highly advise you read the official Debian New Maintainers’ Guide to get a full understanding on what was tried to be said here.

Since intention of this document is to be as straightforward as possible, for your assistance some parts have been marked as:

“Technical²”, providing additional technical insight, isn’t absolutely necessary and can even be skipped: