New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need new option to control RPM compression level #1675
Comments
|
I'm happy to create the change and submit for review if the fpm owners tell me which solution they like. |
jsolomon8080
pushed a commit
to jsolomon8080/fpm
that referenced
this issue
Jan 14, 2020
jordansissel#1675 The value can be a number from 0 to 9 inclusive. The default mirrors the current behavior of 9. If the --rpm-compression value is set to "none", this value is ignored. Setting the value to 5 sped up RPM creation on my RPM from 9 to 3 minutes.
|
I implemented option 2 in #1676 |
jordansissel
pushed a commit
that referenced
this issue
Mar 8, 2020
#1675 The value can be a number from 0 to 9 inclusive. The default mirrors the current behavior of 9. If the --rpm-compression value is set to "none", this value is ignored. Setting the value to 5 sped up RPM creation on my RPM from 9 to 3 minutes.
|
Looks like this should be closed now, since #1676 is merged. CC @jsolomon8080 |
|
Closing. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The default "_binary_payload" setting for fpm RPM generation is "w9.gzdio".
I'm generating a very large RPM using fpm and with that setting, the package takes 9 minutes to create. The same fpm command produces a debian package in 3 minutes.
When I use "--rpm-compression none", the RPM creation time drops to 2 minutes but the package size doubles.
If I hack lib/fpm/package/rpm.rb and change the gzip default value to w5.gzdio, the RPM takes 3 minutes and is within 10MB of the size of the original package.
The RPM default on my system is w2.xzdio while the xz default in fpm is w9.xzdio.
My first suggestion would be crank down the fpm defaults from 9 to 4 or 5 across the board.
If fpm wants to keep the compression levels cranked all the way up, then I would like a way to override the level so I can save 6 minutes every time I create my RPM.
I tried specifying --rpm-rpmbuild-define "_binary_payload w5.gzdio" but that doesn't work because you can't override a macro definition on the rpmbuild command line that already is defined in the spec file.
In summary, I can see tackling this a few ways:
Change the default to level 5. Done
Specify a new option --rpm-compression-level that defaults to 9 but can be set from 0 to 9 and will be used as number next to the "w" in "w9.gzdio".
Specify the spec file macro to respect some new define like "_custom_binary_payload" that someone could set via the command line (using --rpm-rpmbuild-define) and will override the given value of _binary_payload if set. Something like:
%define _binary_payload %{?_custom_binary_payload}%{?!_custom_binary_payload:<%= payload_compression %>}
The text was updated successfully, but these errors were encountered: