O'Reilly logo

Ubuntu Hacks by Bill Childers, Kyle Rankin, Jonathan Oxer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hack #65. Create Your Own Package Repository

Create and manage a package repository for distributing your own Ubuntu packages.

Ubuntu uses online package repositories to locate available software and then download it to your computer for installation. If you create your own Ubuntu packages, you can install them directly using dpkg [Hack #57], but that's not very convenient when you want to make your packages publicly available or install them on a large number of computers. The solution is to build your own package repository, just like the ones used to distribute the official Ubuntu packages, and populate it with your own custom packages. Once your packages have been published in a repository, anyone can then use it to install your packages using any of the standard package-management tools such as apt, Synaptic, or Adept. All they need to do is add the address of your repository to their system [Hack #60].

This also makes it much easier for users of your software to stay up-to-date because their system will be able to automatically detect new versions of your packages and ask them if they want to update.

Anatomy of a Repository

An Ubuntu package repository is actually quite simple. In its simplest form, it can be just a number of packages placed on a web or FTP server along with a special Packages.gz file that describes them. Each package is a self-contained .deb file that can be downloaded and installed on a computer, while the Packages file acts as a directory for the packages in ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required