Reprepro

From Wikitech
(Difference between revisions)
Jump to: navigation, search
(HOWTO)
(Automatically import files from an incoming/ directory)
Line 33: Line 33:
  
 
=== Automatically import files from an <tt>incoming/</tt> directory ===
 
=== Automatically import files from an <tt>incoming/</tt> 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 <tt>.changes</tt> files are present. When all these conditions are met, you can use:
+
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 <tt>.changes</tt> files are present. When all these conditions are met, and all these files have been uploaded to <tt>/srv/wikimedia/incoming</tt> (e.g. using <tt>dupload</tt>), you can use:
 +
# reprepro processincoming default
 +
 
 +
It uses the rules defined in the file <tt>/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).
  
 
==Document==
 
==Document==

Revision as of 11:53, 19 November 2010

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).

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