Packaging/Repository maintenance

From GEANT2-JRA1 Wiki

Contents

Introduction

This section describes how to setup and maintain the RPM and DEB repositories.

I have 2 virtual machines, Ubuntu 8.04 and Fedora 9, which I use to build a repository. Then I rsync with ssh to a remove http server.

Deb based repository

I use reprepro to create the repository. It is not available in ubuntu, so if you use ubuntu you have to download it from Alioth project.

First you need to create a config file. We use a testing an a stable repository, but because these can change (every next release will be the stable release) they need a code name. For now these are 'ben' for testing and 'henk' for stable. This is the same as debian and ubuntu releases.

so choose a place for your repos (you can move it anytime):

$ mkdir ~/repos
$ mkdir ~/repos/conf

fill ~repos/conf/distributions with config for repositories:

Origin: Gijs Molenaar
Label: perfSONAR
Suite: testing
Codename: ben
Architectures: i386 source
Components: main 
Description: perfSONAR apt repository

Origin: Gijs Molenaar
Label: perfSONAR
Suite: stable
Codename: henk
Version: 3.1
Architectures: i386 source
Components: main
Description: perfSONAR apt repository

Now you can add deb packages to this repository with the repro command. Best is to use the debian dsc files of packages, but you can also add only the deb files.

in repo folder (~/repos) do:

reprepro -Vb . include ben <path_to_dsc file>

or

reprepro -Vb . includedeb ben <path_to_deb file>

If the distros name/version is wrong you can add --ignore=wrongdistribution flag. See reprepro --help for more info.

That's all actually. You can remove packages with:

reprepro remove <distr> <packagename>

RPM based repository

We use yum-arch to create repository.

$ mkdir repos/testing/i386/Packages
$ mkdir repos/testing/source/Packages

Put packages in i386/packages. Put SRPMS in source/packages.

run:

createrepo repos/testing/i386
createrepo repos/testing/source

And that's all. When you add/remove packages, rerun createrepo.

Sync to webserver

I use rsync (-r -v) to put all the repository files and meta files to the webserver, but it is also possible to do all the work directly on the server.

Documentation

Personal tools