R-repo/setup for build

From Bioinformatics.Org Wiki

< R-repo
Revision as of 07:13, 11 May 2010 by Pingou (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

In overview, we perform the following steps:

In details below.



For creating our repo we use the following packages:

To install them, execute the following command as root:

yum install createrepo fedora-packager mock repoview

Once the packages installed, on CentOS you will need to run (with the user you are using for the builds):


This will create the tree needed for the construction of rpm. It will be similar to:

├── log
├── RPMS

We also need the following script:

Which can be downloaded here:


NB: After installing mock, you will need to add your user to the mock group. Without this step mock will not work properly when called as your user (it will ask for the root password which is not something you want).

Configure the system

In the following examples, I used ~/repo as the location of the local copy of the repository.

Here is the tree structure of ~/repo:

├── RPMS
│   ├── epel-5
│   ├── fedora-11
│   ├── fedora-12
│   ├── fedora-13
│   └── scratch

You should create the folders ~/repo/{SRPMS|RPMS} (or wherever you decide to put it). The various sub-folders under RPMS will be generated automatically by smock.

Retrieve the files from the CVS

R-repo has a cvs module on the cvs from bioinformatics.org

Please follow the instruction on Concurrent_Versions_System to use the CVS from bioinformatics.org.

Once you have set up your client and run the cvs co r-repo you will see this structure:

├── CVS
├── scripts
└── specs

The specs folder contains the spec file for all the rpm of r-repo.

The scripts file contains usefull scripts for the project.

Configure smock.pl


my $localrepo = $ENV{HOME} . "/public_html/smock/yum";


my $localrepo = $ENV{HOME} . "/repo/RPMS";

Configure mock

add to the list of repositories the following section



Generating the srpm

Because of the difference between the rpm version on RHEL and Fedora, we can not use the srpm from one onto the other. We therefore need to reconstruct the srpm from the spec file (reason why we use this specs folder in the cvs).

In order to do this, the script GenerateSrcRpmOfSpec.py will help you.

This script takes all the spec in the folder defined line 76, download the source and build the srpm.

So to rebuild all the srpm, just adapt the line 76 of the script to make it point to the specs folder from the cvs and run the script.

Test your setting

Before running on the complete list of SRPMs you might want to test if your settings are correct, to do so run:

smock.pl --arch=i386 --arch=x86_64 --distro=fedora-13 ~/repo/SRPMS/R-aaMI-1.0.1-1.fc12.src.rpm
smock.pl --arch=i386 --arch=x86_64 --distro=epel-5 ~/repo/SRPMS/R-aaMI-1.0.1-1.fc12.src.rpm

This will generate the cache for mock for these two distro and these two architectures.

If the builds pass, you will have the output in the folders:


If the builds failed, you will have all the logs in the folders:


Note that you can also monitor the builds while they are happening through this folder


Once you system is set-up and your tests have passed, you will be able to rebuild all the SRPM for the system and architecture of your choice using for example:

smock.pl --arch=i386 --arch=x86_64 --distro=fedora-13 ~/repo/SRPMS/*.src.rpm --keepgoing

(Be aware that it might take some days... ;-) ).

Building EPEL-5 on Fedora

Fedora has a newer version of rpm than RHEL, so far no big deal, except that among the changes are the switch from md5 to sha1!

This change makes rpm from Fedora and RHEL not being able to speak to each other. The simplest solution is then to regenerate the srpm using rpmbuild-md5.

This will generate a rpm which can be understand by epel-5 and therefore built in mock.

(As a side note, Fedora's builder uses a modified rpm version available at: http://infrastructure.fedoraproject.org/builder-rpms/x86_64/)

Personal tools
wiki navigation