Unpacking SRPMs

Florian Weimer fweimer at redhat.com
Fri May 17 20:31:44 UTC 2013

On 05/17/2013 09:36 PM, Adam Williamson wrote:
> On Fri, 2013-05-17 at 16:37 +0200, Florian Weimer wrote:
>> I'd like some scriptable way to unpack SRPMs up and including to the
>> %prep stage.  Ideally, the results would end up in a directory I
>> specify, and intermediate directories which only contain a single
>> subdirectory are skipped.  (The eventual goal is to run two such
>> directory tress through diff -uraN, and I want to avoid spurious
>> differences due to an update from foo-1.2 to foo-1.3.)
>> I've already learned the hard way that I need to use something like mock
>> because some %prep script assume that build requires are installed.  But
>> mock does not appear to support an option to stop after the %prep stage.
>> Unpacking SRPMs seems to be fairly common operation.  Has something like
>> this already been implemented?
> 'fedpkg prep'
> (though it might have trouble in the case you mention with
> buildrequires.)

Indeed.  And the stock version needs the Git repository (which isn't 
part of the SRPM, obviously).

Florian Weimer / Red Hat Product Security Team

More information about the devel mailing list