rpmbuild change compression format

前端 未结 4 755
面向向阳花
面向向阳花 2020-12-14 02:41

I try to pack some map files for our geoserver in an internal rpm package. For the build part, this is just to copy the files. I think this works as expected. But it takes t

4条回答
  •  时光说笑
    2020-12-14 03:02

    I was working with some RPM stuff today and accidentally stumbled upon the answer for ya!

    Put these in your spec file:

    %define _source_payload w0.gzdio
    %define _binary_payload w0.gzdio
    

    That will still use gzip but pass it -0 for a level, which should just store. On my RPM, it made it grow from 21MB to 76MB, so I'm pretty sure this is your answer!

    BTW, I found that in one of the macro files - you can also do bzdio and any number from 0 to 9 to use bzip2. This was on RHEL4; later versions of RPM seem to support more compression options; but again, for what you want, the above should be what you need.

提交回复
热议问题