tags:

views:

15

answers:

1

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?

Thanks!

+1  A: 

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).

m1tk4
The above answer is correct, just wanted to add/clarify: list the tar ball as a Source (eg: Source00: example.tar.bz2), then unpack it (if necessary) in %setup, install it in %install (cp stuff into buildroot), list files in %files.