ctron / rpm-builder

Maven RPM builder plugin
https://ctron.github.io/rpm-builder
Eclipse Public License 2.0
55 stars 32 forks source link

Allow setting compression level for RPMs #31

Open makeamark1 opened 6 years ago

makeamark1 commented 6 years ago

It would be useful if the RPM builder Maven plug-in provided a way to the compression level for generated RPMs. This could also be used to completely disable compression of RPM files, which makes them more suitable for use with content-addressable storage and transfer mechanisms (see for example https://github.com/systemd/casync) which make optimizations using similarities between different versions of files. Applying compression to the RPM makes it difficult to find common chunks with a previous version of the same RPM file and eliminates possible savings in transfer bandwidth and storage utilization from reusing chunks common to both files. Being able to speed up the transfer of RPM files between hosts can be especially useful in development mode, when multiple iterations produce many similar versions of large RPM files.

Compression can be disabled using the following statements in an RPM spec file:

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

But how can this be translated to the RPM builder Maven plug-in? It would be great if it could be exposed as a setting. But if that is not possible, then perhaps add documentation on how it can be achieved otherwise. If pointers are given to what the best approach would be, I can try to come up with a patch and a pull request.

ctron commented 6 years ago

Yes. That would indeed be a great addition.

If you could come up with a PR, that would be awesome! Right now this is not possible.

ctron commented 5 years ago

I think the basic functionality for that would now be available, coming from PR eclipse/packagedrone#133 … so it should only be a matter of wiring this up.