Setting up a repository

Radek Pazdera edited this page May 7, 2014 · 3 revisions

Before anything else, you need to initialise your repository. This can be quite a complex task, but worry not, dr will guide you through the whole process and set it up automatically. It will generate the GPG key pair and also prepare an isolated build environment where the packages will be built.

To make sure there is enough entropy available on the system when the GPG pair is generated, make sure to run the following command before running dr init:

sudo rngd -r /dev/urandom

After that, run

dr init <location-of-your-new-repo>

dr will ask you several questions and proceed to preparing the build environment. The whole process can take up to 30 minutes to complete depending on your internet connection.

Creating a repo with dr

Making your repo public

Unfortunately, dr currently won't help you in any way with hosting the repo. You'll need to set up a web server and make the archive/ subdirectory public. In our case its ~/example/archive. Please make sure you don't include any other parts of the repo! Doing that will reveal sensitive information that are not ment to be public.

However, there is a serve feature is in our backlog #28.


As there can be several repositories present on a single system (you can run dr init as many times as you like), you need to tell dr which one it should use by default. Otherwise, we would have to type --repo ~/example with every single command. There are two place where you set this up:

  • either system-wide in the /etc/dr.conf file
  • or per-user in the ~/.dr.conf

Both files are simple YAML documents with the following format:

default_repo: "example"

  - name: "example"
    location: "/home/radek/example"
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.