Make buildSRPMFromSCM faster?

Mattias Ellert mattias.ellert at fysast.uu.se
Sun Jul 20 05:10:40 UTC 2014


lör 2014-07-19 klockan 12:30 +0100 skrev Richard W.M. Jones:
> The first step of most Koji builds is buildSRPMFromSCM, where a
> .src.rpm file is built from the git repo.
> 
> Currently this involves completely building a mock buildroot
> containing all the BuildRequires, and running `rpmbuild -bs'.  This
> takes many minutes (especially when arm is chosen as a builder).

The buildroot for the buildSRPMFromSCM step is not even the full default
buildroot for the package build step and it doesn't install the BRs.

On my recent koji builds 'group install "srpm-build"' results in
"Install 10 Packages (+226 Dependent packages)" and no additional
packages are installed during the buildSRPMFromSCM step.

For the build step the 'group install "build"' results in "Install 24
Packages (+141 Dependent packages)" after which the BRs and their
dependencies are installed.

(These numbers are from rawhide.)

> It seems the reason for this is because the spec file has to be fully
> parsed in order to work out the Source lines.  Since Source lines
> might depend on RPM macros which might depend on any BuildRequire'd
> package, every BR package must be installed in the mock root.
> `rpmbuild -bs' takes seconds because it just bundles all the Source
> files with the spec file into an SRPM.

If there are such lines they will break since the BRs are not installed
during the buildSRPMFromSCM step.

> Is this really necessary?
> 
> Two shortcuts seem possible:
> 
> (1) Limit the use of macros in Source lines, so that only a simple,
> standard, perhaps pre-cached buildroot can be used.
> 
> (2) Perhaps uglier: Just build an SRPM that contains everything in
> dist-git + everything in the lookaside cache, and hope for the best ...
> 
> Thoughts?
> 
> Rich.

	Mattias

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4570 bytes
Desc: not available
URL: <http://lists.fedoraproject.org/pipermail/devel/attachments/20140720/4245bca8/attachment.bin>


More information about the devel mailing list