[ELGIS] Getting started with mock..

Mathieu Baudier mbaudier at argeo.org
Fri Nov 11 02:50:36 EST 2011


> I'd like to point out on spectool, which makes downloading sources more
> pleasent:

Cool! Didn't know this one.
I confess I reinvented this particular wheel in the automated builds...
(see below)

> Mathieu, why do you create the SRPM in Mock instead of straight with rpmbuild?

Actually I don't I discovered this feature of mock when writing the
first mail yesterday and Iput it because I thought it could be more
streamlined fro Tyler (and others) to have a consistent approach
through mock.

Of course you can use:
rpmbuild --nodeps -bs rpmbuild/SPECS/mypackage.spec
(with the sources in SOURCES)

--nodeps here is to avoid installing all the deps in your real (non
chrooted) environment, since mock will take care of this.

Whether I build on my workstation or on the servers, these are
environments which are used for our work, mostly around Java, and they
must stay clean and lean.

# NOTES ABOUT THE RPM FACTORY
(just for those interested)

As for the RPM factory, as you can see in SVN each package has its own
{SPECS, SOURCES, etc.} structure. Actually the RPM factory generates
rpmmacros / rpmrc files in the directory containing the path to the
directory as a %topdir.

So if I really need to, I actually use each package directory of the
SVN working copy has a standalone rpmbuild tree, so that I can modify
the spec files and the patches directly in SVN.

This RPM Factory is based on our (Argeo) own software (which is Free
Software) and the main focus is not to reinvent mock (or, hum,
spectool) even though it makes in configuration a bit easier, but
rather to focus on what comes after:
- provisioning of the local staging repo
- signing
- publication and storage
- etc.

As I told some of you already, I hope that it will soon be stable
enough for those interested to use it.
But even though, I'm using this system for more than a year with
ELGIS, I'm always making sure that it is easy to rebuild ELGIS only
with standard tools and regular scripts.

I'm really happy about 'spectool' and 'mock --buildsrpm' because I
will be able to dump some of the related code (beauty of Free
Software: the less code the better, whereas the "value" of proprietary
software is measured in code lines count :)


More information about the el mailing list