How to set up a simple deb repository: Distilled Instructions


This is tutorial for setting the most simple working deb repository, tested on Linux Mint 10 (Ubuntu 10.10, in other words).
I used reprepro for this task -  an utility to create and manage Debian repositories. You can get it from standard repositories:
sudo apt-get install reprepro
Now, to actual repo creation.
I was creating a repository at /var/www/repo/, you can create it anywhere, as long as Apache is able to reach it.
mkdir /var/www/repo/
cd /var/www/repo/ # base directory for reprepro
mkdir conf/ # directory for reprepro configuration files
echo '
Origin: <project name>
Label: <project name>
Codename: <osrelease> # maverick, in my case
Architectures: i386 amd64
Components: main
Description: <description>
# if you need to distribute packages for more os versions (natty, for example)
# just add another block, separated by empty line
' > conf/distributions
reprepro -v export <osrelease>
It's done! Now you can add your packages by using
reprepro -v includedeb <osrelease> /path/to/your/deb/file.deb
Note that all commands should be run from base directory of your repo, or with --basedir option supplied.

To use your newly created repositry, fire up Synaptic, go to Settings -> Repositories -> Other Software -> Add... and type following in:
deb http://path.to.your.machine/repo <osrelease> main
In this tutorial, I skipped all the gory details and security concerns, so if you want more explanations and security advice, you can read more detailed how-to here.

Comments

Popular posts from this blog

How to create your own simple 3D render engine in pure Java

Solving quadruple dependency injection problem in Angular

Better CLI option parsing in Scala