This section covers how to setup a new reprepro hosting server content.
This section is about setting up and create a new hosting repository.
The first thing to do is to install reprepro. To do that, simply use apt-get:
$ sudo apt-get install reprepro -yNormally, you should have built your DEB package standing by for submissions. You need a .deb package standing by for hosting practice.
Let's map out the required repository structure. They are 4 critical directories:
basedir - stands for base directory. It is the fallback directory to work with. Usually, you want to set this path to the root of the repository.outdir - stands for output directory. It is the output directory to host the server. Usually, you want to set this path to the static path of the hosting server, like releases/deb for URI like www.example.com/release/deb.confdir - stands for configuration directory. It is the configurations directory to produce the output. Usually you want to set this path to somewhere hidden to the repository like .configs/reprepro.dbdir - stands for database directory. It is the database directory to hold the repository's past data. Usually you want to set this path somewhere hidden like .configs/reprepro.Overall, your repository structure looks something as such (not a rule, but a reference):
repo // basedir path +-- static hosting server directory +-- ... +-- static +-- releases +-- deb // outdir path +-- .configs +-- reprepro // confdir and dbdir pathInside the confdir path, create a directory called conf that holds all your reprepro configurations. Hence, the structure looks something as such based on the example above:
repo // basedir path +-- static hosting server directory +-- ... +-- static +-- releases +-- deb // outdir path +-- .configs +-- reprepro // confdir and dbdir path +-- confOnce done, the next few steps are creating necessary configuration files based on the reprepro man page: https://manpages.debian.org/jessie/reprepro/reprepro.1.en.html#CONFIG_FILES
The compulsory config file is Distributions. The path and filename should be:
<confdir>/conf/distributionsThis is the file where it lists all the OS and CPU architecture compatibility for all distributions. There are a few important elements as specified by the manual, and highly recommended to be included:
Origin - [OPTIONAL] the URI to download the package.Label - [OPTIONAL] a label for APT to sort things out (and you to verify the output).Description - [OPTIONAL] describe the release server when user queries via apt.Codename - [COMPULSORY] the one word code-name for your software release. Suite - [OPTIONAL] the suite name for the deb package distribution tag like stable, testing, and unstable in Debian; xenial, artful, zerus in Ubuntu (see "IMPORTANT NOTE" below for details) .Architecture - [COMPULSORY] a list of supported architectures separated by space. The package must have the associated architecture in order to get imported into the server. Example: i386 amd64 armhf for package that has i386, amd64, or armhf as architecture.Components - [COMPULSORY] a list of repository's supporting components. Example: main contrib non-freeSignWith - [OPTIONAL] the GnuPG key ID used to sign the deb package. This is for verification and identification usage between your server and your user.To create multiple distributions, you simply leave a space between each distribution.
This produces the following example output using Debian distribution suite against the git tri-branches practices:
Origin: www.myapp.com/releases/debLabel: MyApp Deb PackageCodename: masterSuite: stableArchitectures: i386 amd64 armhfComponents: mainDescription: MyApp is a test DEB server for distributing DEB package.SignWith: 5143B...YOUR GPG KEY ID...8191AOrigin: www.myapp.com/releases/debLabel: MyApp Deb PackageCodename: stagingSuite: testingArchitectures: i386 amd64 armhfComponents: mainDescription: MyApp is a test DEB server for distributing DEB package.SignWith: 5143B...YOUR GPG KEY ID...8191AOrigin: www.myapp.com/releases/debLabel: MyApp Deb PackageCodename: nextSuite: unstableArchitectures: i386 amd64 armhfComponents: mainDescription: MyApp is a test DEB server for distributing DEB package.SignWith: 5143B...YOUR GPG KEY ID...8191AWhere your user can include your apt server with the following address:
deb www.myapp.com/releases/deb master maindeb www.myapp.com/releases/deb staging maindeb www.myapp.com/releases/deb next mainIMPORTANT NOTE
Codename and Suite are both used by reprepro to populate a built deb package. However, depending on your build system's operating system, the deb packager builder will not tolerate unknown distribution name such as 'master' above.
Hence, it is always a practice that the Suite in reprepro matches the deb packager builder's distribution tag while freeing up the Codename for your own release codes. Example on some Debian-based operating system:
deb package builder: distribution = stableCodename = your choice of word (e.g. master for master branch)Suite = stabledistribution = xenialmaster for master branch)xenialThere are other non-related setup needs to be done before you can tell your users to use it.
Once done, you may start testing your server. To include a deb package into the server, please follow the following page (recommended right-click and open new tab in case you need to amend the configurations):