On Thu, Nov 18, 2010 at 1:55 PM, Jinze Xue <xuejinze(a)gmail.com> wrote:
A question ,
How to build from SCM?
I think there's no single answer to this question. I'll give you some
hints on what we do where I work.
Currently the RPM system is designed to build from a source rpm,
period. Hence, you need to build a source RPM and feed it into mock or
koji.
We've usually got a .spectemplate file on our SCM. This file contains
some tags, for example you can have something like ${SVN_REV} which is
then inserted in the .spectemplate as this:
Release: svn${SVN_REV}
Once the CI system has tested an SCM revision and it's good, it packs
the contents of such revision, takes the spectemplate, substitues
variable and creates a .spec file, which is then feeded to mock/koji
for srpm building. That .src.rpm then gets built again by mock/koji.
What's strange is that we actually need two build phases; the first is
done by the CI server, then there's a rebuild by mock or koji. It may
not be the fastest way to do it but it currently works.
--
Alan Franzoni
--
contact me at public(a)[mysurname].eu