- The packages are being managed by a user called Jason, who does not have root permissions.
- The following packages are already installed on your system: gnupg apt-utils.
- From time to time this blog post may not use obvious short cuts, this is being done intentionally.
Setting up the repository directory
The first step is to create the directory structure.
The other directories will be created as needed by the tool that adds packages to the repo, reprepro. Therefore you do not need to worry about them.
Setting up httpd
Regardless of what httpd you choose to use, you want to allow for HTTP access to the /home/jason/apt-repo directory.
For apache use the following directory defintion:
Adding packages to the repo is very easy:
You must tell your clients machines to use the new repo in order to fetch packages from it:
Almost .... did you get an error about your repository being unsigned? Read on!
Signing the repo
Dpkg packages do not have the ability to be individually signed the way RPM packages do. Instead, the package publisher must sign the contents of the repo the package comes in order to validate the authenticity of the package.
The first step is to create a GPG key used to sign the repo. In the section below, the material in CAPS is example user input.
If you haven't done so already, secure the permissions of your .gnupg directory.
We want to add the following line to the distributions file:
You need to publish your key and have the clients install it in order to use it. You can extract it like so:
Future blog posts:
Multi component repos
Pass-phrase less repos (dangerous! but easy to manage in trusted environments)
Custom dpkg packages
Easy backporting of dpkg packages