-
Notifications
You must be signed in to change notification settings - Fork 346
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
#43: Add a rake task to compress binaries with UPX #47
base: master
Are you sure you want to change the base?
Conversation
…of the gem packing task. It's safe to run multiple times - already-compressed files will be detected and skipped.
This would be great to see merged. @zakird any suggestions to getting this moved along? |
I believe this solves a blocker related to update_to_0.12.5 - let's get it merged. |
@k3rni I've merged PR #49, and the built gem for that is around 250mb (instead of 171 as claimed here, but probably because it's changed since you looked). I'd love to add this, but after making some adjustments to this (unpacking the .gz files, running upx over them all), and re-creating the gem, it only comes out 9Mb smaller (241mb), and gzipping the ups-compressed binaries comes out pretty much the same (as I'm sure is expected). Am I doing something wrong? I'd love to get this working, as a 250mb gem is huge. |
You are correct in that both versions result in a gem file of roughly the same size. UPX uses basically the same compression method as gzip, it just keeps the files executable directly, with no additional unpacking step required. The changes to Those error conditions listed are strictly conjecture - haven't tested that. So feel free to keep the current solution and discard this, as the goals were achieved anyway :) |
Closing due to inactivity and the issue being solved elsewhere. |
Reopening because I think we want to do this. I've had a number of reports from people having trouble uncompressing the gzipped files, especially on systems with restricted filesystems. |
It's been added to the gem package task's prerequisites, so the binaries will be changed locally and then packed into the gem. This PR doesn't contain the packed binaries themselves. My idea is that we should grab and store the upstream binaries untouched, but ship the compact versions with this gem.
Gemfile size before packing: 171MB
After packing: 45MB
Also, the task is safe to run multiple times - already-compressed files will be detected and skipped (using
upx -t
).