I have this build process that create rpms for a set of linux distributions.
This creation is taking so much time and for this I’m optimizing it. I’ve study rpmbuild and realize that rpmbuild takes a tarball and extract it to start the build process.
There is a way to avoid use tarball?? Cause I already begin the process with the sources, then I compress it in a tarball and this seems useless since rpmbuild works on sources, not tarballs
Three basic ways to go about this:
--short-circuitswitch torpmbuildto skip directly to the build step.SourceXX:in the spec file, and place all those files in therpmbuild/SOURCES/directory%setupmacro with some intelligenceOption 1 lets you temporarily work around having to extract the tarball each time, which is ideal for development. Option 2 bypasses the notion of having a tarball to begin with, but becomes cumbersome when you have lots and lots of files. Option 3 is when regular builds of the package happen, and it’s a large source file, such as the linux kernel. The EL6 kernel .spec file does this:
Basically, extract the kernel sources and name it something else. Upon next build, check for that. If it’s there, don’t extract the source, just make a copy.