Blog Post

Debian Packaging 101

I have recently decided to concentrate more on the development side of Linux, more importantly Ubuntu, KDE, and now Debian. The first stage I will cover in my endeavors will be packaging. Packaging consists of taking the upstream tarballs (programname-version.tar.gz or .tar.bz2) and converting them into packages that can easily be installed in Ubuntu as well as Debian without you having to compile (configure, make, make install) or worrying about dependencies. A successful package that a majority of you are used to in Ubuntu and Debian look like programname_version.deb. Some of you have even done a successfull dpkg -i programname_version.deb for an application that either is not in the repositories or was updated and packaged somewhere else. Well this post is to cover the necessities before you jump in and go nuts trying to figure out how to correctly create a package.

First things first! Reading material, and how and where you read it, we don’t need to know 🙂

  1. Debian New Maintainer’s Guide
  2. Debian Developer’s Reference
  3. Debian Policy Manual
  4. Ubuntu Packaging Guide

I would advise to try and read the documents in this order. Some of these guides are even available to be installed on your Ubuntu or Debian system. The Ubuntu Packaging Guide is named packaging-guide, the Debian Policy Manual is named debian-policy and there is also another Debian guide named debian-reference that also has a lot of good general Debian information.

Once you have read through these guides and are about ready to take a go at it, I would also like to recommend https://wiki.ubuntu.com/MOTU for more information which of course pertains mainly to Ubuntu. Seeing as we are just now starting a new development cycle, 90% of the work involved right now is with merging and syncing with Debian. So look over that documentation which is located in the wiki as well.

I will go ahead and save you some time and list the packages you should install in order to start your career in packaging. Since packaging is pretty much 110% command line oriented, I will give you the command to install via the command line:
sudo apt-get install build-essential devscripts debhelper dh-make diff patch gnupg fakeroot lintian linda pbuilder cdbs

Another utility you will need is debootstrap, and the latest version of it as well. To get the latest version download it from HERE. Grab the latest version (as of 2007-05-18 the latest version is 0.3.3.3ubuntu3) and then install it:
sudo dpkg -i /dir/to/deboostrap_x_x_x.deb
Replace the x’s with the correct version information.

Now you have all of the tools you will need to start building packages. Read the material, check the man pages for the applications you have just installed, and make sure you are comfortable with the command line. Also, if you haven’t created your GPG (gnupg) key yet, I suggest you do that now as you will need it in order to sign the packages you create. This is necessary for all packaging. If you are unsure howto, please read the GNU Privacy Guard (GPG) Howto.

Any question you may have is welcomed in the following locations:

  • #ubuntu-motu on IRC (Freenode) for Ubuntu Packaging
  • #debian-mentors on IRC (OFTC) for Debian Packaging
  • Ubuntu MOTU Mailing List – please subscribe – email address listed on linked page
  • Debian Mentors Mailing List – please subscribe – email address listed on linked page

Hopefully are are still awake! If so, please scour the websites of both Debian and Ubuntu, specifically their wikis. Thanks for staying awake!

This entry was posted in Development, Linux and tagged , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.
  • Subscribe to nixternal.com

     Subscribe in a reader

    Or, subscribe via email:
    Enter your email address:

  • Archives


semidetached
semidetached
semidetached
semidetached
%d bloggers like this: