开发者

creating a RPM to simply unpack a tar ball

开发者 https://www.devze.com 2023-01-18 06:05 出处:网络
I am writing a .spec file for a rpm that is simply going to unpack a tar ball into some directory on the filesystem

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.

Sh开发者_StackOverflowould 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?


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


Beter idea:

Use fpm to make your tarball into an RPM:

fpm -s tar -t rpm --name <rpm-name> --version <rpm-version> <tarball-file-name>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号