FS#17213 - Add UPX compression as a packaging option
Attached to Project:
Pacman
Opened by Bryce (bruce) - Friday, 20 November 2009, 01:42 GMT
Last edited by Allan McRae (Allan) - Saturday, 25 June 2011, 12:54 GMT
Opened by Bryce (bruce) - Friday, 20 November 2009, 01:42 GMT
Last edited by Allan McRae (Allan) - Saturday, 25 June 2011, 12:54 GMT
|
Details
Summary:
Add an option to automatically use UPX to compress binaries during the makepkg packaging phase. I understand that this isn't necessarily a feature anyone else desires, but I was bored and was fiddling and came up with a patch that (seems to) work and thought I might post it somewhere :) I have tested it successfully building a few packages, and will test it more as time goes on :) Cheers :) ps. UPX seems to gracefully fail if it can't successfully compress the file, so it shouldn't break anything. I hope. (This is for version 3.3.3, but that isn't an option in "Reported Version".) |
This task depends upon
Closed by Allan McRae (Allan)
Saturday, 25 June 2011, 12:54 GMT
Reason for closing: Implemented
Additional comments about closing: http://projects.archlinux.org/pacman.git /commit/?id=b803a33a
Saturday, 25 June 2011, 12:54 GMT
Reason for closing: Implemented
Additional comments about closing: http://projects.archlinux.org/pacman.git /commit/?id=b803a33a
A few comments :
1) don't use pacman -Q upx, use type upx and then use upx. or just check for /usr/bin/upx executable.
2) the patch is reversed : new vs old instead of old vs new
3) you should make a patch against the git version, but in this case it probably does not matter since the new code is quite independent from the rest
Anyway, just address these comments if your patch is going to be merged and you are asked to address them.
Attached an updated version which addresses your concerns :)
I've been using it since I submitted it, and it seems to be working fine :)
Cheers
I was having a look at upx in more detail and found that compression flags can be set in the UPX environment variable, so I updated the patch to allow it to be set in makepkg.conf (for example to use lzma compression).
Cheers :)
Cheers :)
I am pulling together a bunch of old makepkg patches at the moment so will make sure this gets done. Really this time!
Cheers :-)
Umm, just as a random aside, the latest patch has lzma compression in the example as a config option, turns out it appears to have worse performance than normal, so I'd suggest not actually having that there :-)
And cheers again, I was just thinking the other day that I'd never figured out what had happened to this :-p
@Bryce: can you test this? Also, provided further details for the contribution line if you wish them to be added.
Based on Dan's feedback, could this be a solution?
(My git-foo isn't great, so attaching as a format-patch and just as a diff :-s )
aPatch.patch (4 KiB)
I will post this patch and the check_software one to the mailing list soon.