[CentOS] noob question about mock

Tue Jan 4 14:32:09 UTC 2011
Michael Gliwinski <Michael.Gliwinski at henderson-group.com>

On Thursday 30 Dec 2010 14:11:20 Ryan Wagoner wrote:
> On Thu, Dec 30, 2010 at 8:51 AM,  <nux at li.nux.ro> wrote:
> > Hi,
> > 
> > Been recently more and more tempted to use mock for building rpms, but
> > looking at it I have one problem. As far as I could read about it, mock
> > essentially rebuilds srpms so to use it I would need a separate
> > "classical" build environment to create those srpms in the first place.
> > Am I right or did I get something terribly wrong?
> 
> You can use rpmbuild -bs --nodeps to build the SRPM without the
> dependency checking. The SRPM is just a compilation of the spec,
> source code, and patches.

Actually, mock can build an SRPM from spec file and dir with sources:

  $ mock --buildsrpm --spec=/path/to/spec --source=/path/to/src/dir

I've been using it at least since 1.0.5, which is definitely in EPEL, not sure 
if it was available in older versions.  Sure it may require some scripting 
around it to automate it but it has the advantage of verifying build depends, 
etc. so it's worth it IMO.


-- 
Michael Gliwinski
Henderson Group Information Services
9-11 Hightown Avenue, Newtownabby, BT36 4RT
Phone: 028 9034 3319

**********************************************************************************************
The information in this email is confidential and may be legally privileged.  It is intended solely for the addressee and access to the email by anyone else is unauthorised.
If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful.
When addressed to our clients, any opinions or advice contained in this e-mail are subject to the terms and conditions expressed  in the governing client engagement leter or contract.
If you have received this email in error please notify support at henderson-group.com

John Henderson (Holdings) Ltd
Registered office: 9 Hightown Avenue, Mallusk, County Antrim, Northern Ireland, BT36 4RT.
Registered in Northern Ireland
Registration Number NI010588
Vat No.: 814 6399 12
*********************************************************************************