creating a RPM to simply unpack a tar ball

MK. picture MK. · Sep 27, 2010 · Viewed 7.7k times · Source

I am writing a .spec file for a rpm that is simply going to unpack a tar ball into some directory on the filesystem

So where do I put the original tar ball? All the examples I have seen download the original tar ball from the internet. But that is not so in my case.

Should I put the tar ball in the %files section so that it becomes part of the rpm? If so then how do I reference it in the %setup macro which is going to unpack it?

Answer

m1tk4 picture m1tk4 · Sep 29, 2010

Tarball inside RPM - bad idea. What you should do is unpack the tarball in the %install phase to the appropriate places in the temporary fake root folder, then list all the contents in %files. RPM compresses the contents so you are not losing anything on the size of the RPM, but the files contained in your new RPM are now tracked for changes and can be verified (rpm -qV).