SCIENTIFIC-LINUX-USERS Archives

November 2016

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mark Whidby <[log in to unmask]>
Reply To:
Mark Whidby <[log in to unmask]>
Date:
Mon, 7 Nov 2016 11:12:16 +0000
Content-Type:
text/plain
Parts/Attachments:
text/plain (45 lines)
On Fri, 2016-11-04 at 11:59 +0100, David Sommerseth wrote:
> On 04/11/16 11:13, Todd Chester wrote:
> > On 11/03/2016 04:38 AM, Nico Kadel-Garcia wrote:
> > 
> >> Or, you could try what I do for backports. Install "mock", add
> >> yourself to the "mock" group, and run:
> >>
> >>           mock -r epel-7-x86_64 krusader-2.5.0-1.fc26.src.rpm
> >>
> >> Then install RPMs from /var/lib/mock/ or /var/cache/mock/
> > 
> > What is "mock"?
> 
> That is the a build tool which does all the RPM builds inside a fresh,
> autocreated chroot to ensure you get a clean build.  If the spec file is
> lacking needed dependencies, the build will fail.  Which again helps
> preventing creating an RPM package including dependencies which just
> happened to be installed.
> 
> Mock is what is used under the hood of Koji when Fedora packages are
> built (including Fedora EPEL) and the RHEL packages.
> 
> Mock also allows you to build RPMs for multiple distributions/versions
> on the same host.  The chroot will contain the proper version of
> libraries, compilers and linkers so it will match the environment the
> RPM is targeted at.
> 
> I highly encourage everyone using rpmbuild to use mock instead.  When a
> mock built package have completed, it will have a far higher success
> factor on all hosts it will be installed on.  Plus, it is built in a
> much "cleaner" and pristine environment.
> 
> 

I struggled with mock until I found this "getting started" guide:

http://blog.packagecloud.io/eng/2015/05/11/building-rpm-packages-with-mock/

I hope this helps someone as much as it helped me.

-- 
Mark Whidby
System Administrator/Operations
IT Services

ATOM RSS1 RSS2