Reprepro

From Wikitech
Revision as of 11:57, 19 November 2010 by Mark (Talk | contribs)

Jump to: navigation, search

Reprepro is a tool for managing APT repositories. It's definitely much more versatile than the simple script update-repository that we have been using before.

Reprepro is able to manage multiple repositories for multiple distribution versions and one package pool. It can process updates from an incoming directory, copy package (references) between distribution versions, list all packages and/or package versions available in the repository, etc.

Reprepro maintains an internal database (a .DBM file) of the contents of the repository, which makes it quite fast and efficient.

It's installed from the Debian package reprepro, and is configured using the files in /srv/wikimedia/conf/. I added an environment variable to /etc/environment for convenience:

REPREPRO_BASE_DIR=/srv/wikimedia

Contents

HOWTO

This section explains the most commonly needed actions/tasks involving reprepro.

List all package versions in the repositories

For a given package name, use

reprepro ls packagename

For example:

# reprepro ls puppet
puppet | 2.6.1-0ubuntu1~ppa1~hardy3 |  hardy-wikimedia | amd64, source
puppet | 2.6.1-0ubuntu1~ppa1~lucid1 |  lucid-wikimedia | amd64, source

This shows that there are two different builds of the same package version in the repositories hardy-wikimedia and lucid-wikimedia. There is clearly no puppet package in the karmic-wikimedia repository.

To see all packages in a given distribution, use

reprpro list distribution-name

To find all packages in all repositories, use

reprepro dumpreferences

or a variant thereof (see reprepro help or man reprepro).

Automatically import files from an incoming/ directory

Reprepro can automatically import packages from an upload directory, as long as all the package fields are setup correctly with the right distribution and component names. It's also vital that the .changes files are present. When all these conditions are met, and all these files have been uploaded to /srv/wikimedia/incoming (e.g. using dupload), you can use:

# reprepro processincoming default

It uses the rules defined in the file /srv/wikimedia/conf/incoming

If the package is rejected by reprepro because one of the package control fields are wrong, or you want to override them for some other reason, use an override file (see below).

It's best to check whether the /srv/wikimedia/incoming/ directory is empty after using procesincoming, because reprepro should have moved/deleted all imported files. Any remaining files have not been processed.

Importing packages

It's always best to have reprepro fully manage all package aspects using the .changes that was created during the build of the package (e.g. using Pbuilder). When the .changes file is present along with all files list therein, reprepro can handle it all with the reprepro include command:

Removing packages

Using the override file

Copying between distributions

Document

  • target distributions for building
  • distribution suffixes for version numbers (and append, nor replace)
    • but ~ appended is lower version
  • override files
  • dupload
  • importing unmodified (Debian) packages into 'backports'
  • reprepro copy
Personal tools
Namespaces

Variants
Actions
Navigation
Ops documentation
Wiki
Toolbox