Saturday 26 June 2010

Creating a TRIVIAL DEBIAN REPOSITORY

This howto shows the way to create a trivial debian repository. Just a simple collection of deb package files.

There are two debian repository types: automatic and trivial.

Automatic repos are more complex. We are going to deal with trivial ones.

A trivial repository is composed of a root directory and one or more subdirectories.
No database server is needed.

This trivial repository is good enough to host a few packages, e.g creating a repo with your /var/cache/apt/archives deb packages and burn a cd or store them in a removible drive.

Trivial repos do not follow the standard debian repo directory structure, so we will have to specify the exact path in sources.list file.


CREATING MY TRIVIAL REPO STRUCTURE:

Our repo will consist of MyRepo root directory with binary subdirectory.

$mkdir -p /path/to/MyRepo
$cd /path/to/MyRepo
$mkdir binary

We place there the deb packages our repo will provide.
I.e: we copy packages from the apt cache:
$rsync -vP /var/cache/apt/archives/*.deb /path/to/MyRepo/binary
$cd .. # we move to repo root directory.


CREATE PACKAGES CONFIGURATION FILE