APT repository

From Wikitech
(Difference between revisions)
Jump to: navigation, search
(pbuilder)
(steps for new release)
Line 33: Line 33:
  
 
The package should now be available for deployment/installation on the target hosts, after they have done a <tt>apt-get update</tt>, of course.
 
The package should now be available for deployment/installation on the target hosts, after they have done a <tt>apt-get update</tt>, of course.
 +
 +
== Setup of a Wikimedia repository for a new Ubuntu release ==
 +
# <tt>export RELEASE=''release''</tt>
 +
# <tt>export VERSION=''version''</tt>
 +
# <tt>cd /srv/wikimedia/dists</tt>
 +
# <tt>mkdir $RELEASE-wikimedia && cd $RELEASE-wikimedia</tt>
 +
# <tt>for c in {main,multiverse,restricted,universe}; do mkdir $c; for a in {i386,amd64,source}; do mkdir $c/binary-$a; echo -e "Archive: $RELEASE-wikimedia\nVersion: $VERSION\nComponent:$c\nOrigin: Wikimedia\nLabel: Wikimedia\nArchitecture: $a" > $c/binary-$a/Release; done; mv $c/binary-source $c/source; done</tt>
 +
# Edit /root/update-repository to include the new release and run it
  
 
== See also ==
 
== See also ==

Revision as of 18:43, 1 November 2007

Wikimedia maintains its own APT repository, under http://apt.wikimedia.org/wikimedia which lives on khaldun. This repository contains Debian/Ubuntu packages modified for use by Wikimedia, and Wikimedia specific native packages, that don't exist elsewhere.

Contents

Using

To use this repository, the following lines need to be present in /etc/apt/sources.list:

## Wikimedia APT repository
deb http://apt.wikimedia.org/wikimedia dapper-wikimedia main restricted universe multiverse
deb-src http://apt.wikimedia.org/wikimedia dapper-wikimedia main restricted universe multiverse

Additionally, to make sure that the system prefers packages from this repository, and not packages from the origin distributions even if they have a higher version number, this APT source is "pinned" with a higher priority in /etc/apt/preferences:

Package: *
Pin: release o=Wikimedia
Pin-Priority: 1001

The Wikimedia repository is signed with the Wikimedia Archive Automatic Signing Key <root@wikimedia.org>. This public key must be installed in APT's GPG keyring for it to verify packages without nagging about it. This can be accomplished by installing the wikimedia-keyring package.

An automated installation of a Wikimedia server should take care of all of the above.

Updating the repository

To add packages to the Wikimedia repository, so they can be deployed on the servers, take the following steps.

Commit the debian/ directory of the package to Subversion, under:

svn.wikimedia.org/svnroot/mediawiki/trunk/debs/package basename/debian/

Make sure that the package is built on the relevant architectures (amd64, i386).

Create a directory /srv/wikimedia/pool/component/package basename/ on khaldun. E.g. /srv/wikimedia/pool/main/squid/ for the Squid packages.

Copy the binary .debs files, the .dsc file, the .tar.gz source tarball and the .diff.gz patchfile into the newly created directory.

Run:

# /root/update-repository

This will create new Package and Source files, and create a new Release file in the distribution root-directory, and sign it with the archive GPG key.

The package should now be available for deployment/installation on the target hosts, after they have done a apt-get update, of course.

Setup of a Wikimedia repository for a new Ubuntu release

  1. export RELEASE=release
  2. export VERSION=version
  3. cd /srv/wikimedia/dists
  4. mkdir $RELEASE-wikimedia && cd $RELEASE-wikimedia
  5. for c in {main,multiverse,restricted,universe}; do mkdir $c; for a in {i386,amd64,source}; do mkdir $c/binary-$a; echo -e "Archive: $RELEASE-wikimedia\nVersion: $VERSION\nComponent:$c\nOrigin: Wikimedia\nLabel: Wikimedia\nArchitecture: $a" > $c/binary-$a/Release; done; mv $c/binary-source $c/source; done
  6. Edit /root/update-repository to include the new release and run it

See also

  • pbuilder for building packages for different distribution versions and architectures
Personal tools
Namespaces

Variants
Actions
Navigation
Ops documentation
Wiki
Toolbox