Latest revision |
Your text |
Line 1: |
Line 1: |
- | [http://mirrorer.alioth.debian.org/ reprepro] is a tool to create and manage debian package repositories. This page documents its installation on stage.maemo.org, the Maemo repository server. Note that this is not the tool that maemo.org uses. | + | [http://mirrorer.alioth.debian.org/ reprepro] is a tool to create and manage debian package repositories. This page documents its installation on stage.maemo.org, the Maemo repository server. |
| | | |
- | ''' Preparation ''' | + | ''' Preparations ''' |
| | | |
- | Before setting up the repositories, I read that it might be good idea to have a separate partitions for the repositories. From the reprepro man pages: "The most annoying problem not yet worked around is database corruption when the | + | Before setting up the repositories, it is a good idea to have a separate |
| + | partition for the repositories. From the reprepro man pages: "The most |
| + | annoying problem not yet worked around is database corruption when the |
| disk runs out of space. Ideally put the database on another partition to | | disk runs out of space. Ideally put the database on another partition to |
| avoid that." So it seems clear that a large disk is necessary for the package | | avoid that." So it seems clear that a large disk is necessary for the package |
- | repositories. | + | repositories. If one is going to create a replicated repository structure, |
| + | one can use drbd since that is now included in the linux kernel as of 2.6.33. |
| | | |
| reprepro has some dependencies, notably Berkeley DB, and it recommends | | reprepro has some dependencies, notably Berkeley DB, and it recommends |
| gnupg-agent and inoticoming. Using inotify and inoticoming to check for | | gnupg-agent and inoticoming. Using inotify and inoticoming to check for |
| incoming packages is also central to the repo system, it's worth noting that | | incoming packages is also central to the repo system, it's worth noting that |
- | inoticoming and reprepro are maintained and written by the same person. | + | inoticoming and reprepro are maintained and even written by the same person. |
- | | + | |
- | So, in short, I've installed these packages and their dependencies on the repository server: reprepro, libdb4.2, and inotincoming.
| + | |
- | | + | |
- | -- Note: explicitly stating libdb4.2 does not make much sense here. aptitude will get whatever version of that crappy lib reprepro needs just fine.
| + | |
- | | + | |
- | | + | |
- | ''' Set up '''
| + | |
- | | + | |
- | The first step I took was to create directories for the binary deb packages:
| + | |
- | | + | |
- | mkdir /srv/extras/
| + | |
- | mkdir /srv/extras-devel/
| + | |
- | mkdir /srv/extras-testing/
| + | |
- | | + | |
- | Here we're putting the directories under the /srv/ directory so that we can isolate them from the rest of our web content. I have installed nginx to serve the repos because it is small and fast.
| + | |
- | | + | |
- | -- Note: If you try this at home, it's usually a good idea to only make one repository and the different projects just different distributions within that. (Unless you have a reason against that, of course).
| + | |
- | | + | |
- | | + | |
- | ''' Configuration '''
| + | |
- | | + | |
- | To create a configuration file for reprepro, we need to create a "conf" dir for each of our top level directories. So for diablo extras, we'll have a configuration file called /srv/extras/conf/distributions. We can add a configuration for fremantle extras in the same file since you can have multiple distros per configuration. Here is my distribution file for 'diablo':
| + | |
- | | + | |
- | Origin: maemo.org
| + | |
- | Label: Maemo
| + | |
- | Suite: extras
| + | |
- | Codename: diablo
| + | |
- | Version: 0.1
| + | |
- | Architectures: i386 armel source
| + | |
- | Components: free non-free
| + | |
- | Description: Maemo.org package repositories for diablo
| + | |
- | Log: /var/log/repos/
| + | |
- | | + | |
- | ''' Logging '''
| + | |
- | | + | |
- | I have tried to make reprepro as verbose as possible, at least to start with. The logs are held in a directory along with the inoticoming logs in /var/log/repos/.
| + | |
- | | + | |
- | | + | |
- | ''' Adding packages '''
| + | |
- | | + | |
- | Now once we have reprepro set up, we can add a package this way:
| + | |
- | sudo reprepro -Vb . includedeb diablo /home/jeremiah/maemo-perl-packages/libv-perl_0.13-1_all.deb
| + | |
- | | + | |
- | The -b flag tells reprepro where its base dir is, here represented by the current dir (.) but you can export a variable with REPREPRO_BASE_DIR. Those type of directories are all configurable with reprepro and well documented in the man pages.
| + | |
- | | + | |
- | Here is the output from that command, showing how reprepro created the needed directories and also added a tracking database as well as exported indexes;
| + | |
- | | + | |
- | Created directory "./db"
| + | |
- | /home/jeremiah/maemo-perl-packages/libv-perl_0.13-1_all.deb: component guessed as 'free'
| + | |
- | Created directory "./pool"
| + | |
- | Created directory "./pool/free"
| + | |
- | Created directory "./pool/free/libv"
| + | |
- | Created directory "./pool/free/libv/libv-perl"
| + | |
- | Exporting indices...
| + | |
- | Created directory "./dists"
| + | |
- | Created directory "./dists/diablo"
| + | |
- | Created directory "./dists/diablo/free"
| + | |
- | Created directory "./dists/diablo/free/binary-i386"
| + | |
- | Created directory "./dists/diablo/free/binary-armel"
| + | |
- | Created directory "./dists/diablo/free/source"
| + | |
- | Created directory "./dists/diablo/non-free"
| + | |
- | Created directory "./dists/diablo/non-free/binary-i386"
| + | |
- | Created directory "./dists/diablo/non-free/binary-armel"
| + | |
- | Created directory "./dists/diablo/non-free/source"
| + | |
- | | + | |
- | | + | |
- | ''' More information '''
| + | |
- | | + | |
- | http://wiki.debian.org/HowToSetupADebianRepository<br>
| + | |
- | http://alioth.debian.org/scm/viewvc.php/*checkout*/mirrorer/docs/manual.html?revision=HEAD&root=mirrorer<br>
| + | |
- | http://www.debian-administration.org/articles/286<br>
| + | |
- | | + | |
- | [[Category:Software]]
| + | |