[R-repo-dev] Setup for build Was: Re: Update

Pierre-Yves pingou at pingoured.fr
Wed May 5 02:24:56 EDT 2010

On Tue, 2010-05-04 at 22:49 +0100, Dan Bolser wrote:
> Should I create the directory structure (somewhere) to match what you
> have? (Section beginning "There is the tree structure of ~/repo:"). I
> see later on you say 'Create the folder ~/repo/RPMS'... I'll return to
> this in a question below.

You only need to create the folders:
mkdir -p ~/repo/{SRPMS,RPMS}

> I'm confused by the section 'Configure mock'. What's mock? 

mock is a tool to build RPM via a chroot environment.
This mean that it builds the package in a 'protected' environment where
are only the packages that are required by the packages to build.
Therefore if you miss a dependency, it will fail to build (while it
would build with rpmbuild if you have the missing dependency installed
on your system).

> (And where
> is its configuration file?) What's all that stuff under /etc/mock/? I
> don't know which file I should edit :-(

The config files are indeed in /etc/mock. You edit the one that are
interesting for you.
So for Centos you are interested by:
> centos-5-i386.cfg 
> centos-5-x86_64.cfg
Via these two files you can build rpm in a chroot environment for
(Note that in my example I give epel-5, you might have to change this to

> I'm not saying the instructions need to explain all details, just give
> a clear path to dummies like me ;-)

That's good, as I said, feel free to ask questions :-)

> Section "Retrieve the srpm". You use the bioinformatics.org folder
> relative to your home dir on that box. The full path would be better
> here. (D'oh... I see what you're doing now!)

> Seems the files are not owned by the r-repo group?

I will try to fix the group permission as Jeff suggested.

> I'm syncing directly into the directory 'SRPMS' that I created by
> copying the tree structure of the repo in your diagram. Is that
> correct? It isn't clear from your notes. If I'm doing it right, let me
> know, and I'll edit the page.

It is correct if you get all the src.rpm in the SRPMS folder.

> Now for a more general question... Does the above apply to Centos? I
> notice that all the SRPM are tagged ".fc12.src.rpm". Is this just an
> error? How come source is vendor specific?

Well, this is the big question. As I mentioned at the bottom of the
page, the version of rpm has changed between Fedora and RHEL switching
from md5 to sha1.
Therefore, rhel's rpm might not be able to read the src.rpm compiled by
fedora. The solution is then to install the src.rpm and to recompile the
mkdir ~/repo/SPECS
vim .rpmmacros
-> change 
%_specdir to %(echo $HOME)/repo/SPECS/
%_srcrpmdir     %(echo $HOME)/repo/SRPMS/

rpm -i ~/repo/SRPMS/*.src.rpm
rm ~/repo/SRPMS/*src.rpm
rpmbuild -bs ~/repo/SPECS

vim .rpmmacros
-> change %_specdir and %_srcrpmdir to their original value (or remove
the new lines)

Then you can re-test smock.

Hope that helps,


More information about the R-repo-dev mailing list