I would love to have smaller deb files.
Does debian support that? (If you point me at a deb package that uses xz or the internal tarballs, that'd be easiest way for me to get started)
from the manpage deb(5): "The third, last required member is named data.tar. It contains the filesystem as a tar archive, either not compressed (supported since dpkg 1.10.24), or compressed with gzip (with .gz extension), xz (with .xz extension, supported since dpkg 1.15.6), bzip2 (with .bz2 extension, supported since dpkg 1.10.24) or lzma (with .lzma extension, supported since dpkg 1.13.25)."
mine on ubuntu 12.04 is 220.127.116.11 so I think it does... dunno if anyone uses it. My packages are 71 mb in tar.gz and go down to around 50mb with .xz, I think it will save me a lot of download time.
awesome, thanks! This should be pretty easy to do.
- support compression types in for data.tar in deb packages. Default
continues to be gzip. (#235)
tentative support is in master, are you able to test? Will do some tests on my end as is.
% ruby bin/fpm -s dir -t deb -n fizzle --deb-compression xz /etc/motd
% ar t fizzle_1.0_amd64.deb | grep data
% ar p fizzle_1.0_amd64.deb data.tar.xz | file -
/dev/stdin: xz compressed data
% ar p fizzle_1.0_amd64.deb data.tar.xz | xz -d | file -
/dev/stdin: POSIX tar archive (GNU)
Seems ok to me, will try to find a debian/ubuntu system to test this on.
the code looks fine, I will test it here... why does the option you add is named --compression on the code if it is really --deb_compression?
../fpm/bin/../lib/fpm/package/deb.rb:22: warning: already initialized constant COMPRESSION_TYPES
../fpm/bin/../lib/fpm/package/dir.rb:130:in utime': Operation not permitted - /tmp/package-dir-staging20120615-13194-jjq9zl/opt/venv/lib/python2.7/config (Errno::EPERM)
from ../fpm/bin/../lib/fpm/package/dir.rb:120:in copy'
from /usr/lib/ruby/1.8/find.rb:39:in find'
from /usr/lib/ruby/1.8/find.rb:38:in find'
from ../fpm/bin/../lib/fpm/package/dir.rb:34:in input'
from ../fpm/bin/../lib/fpm/package/dir.rb:32:in input'
from ../fpm/bin/../lib/fpm/command.rb:247:in each'
from /usr/lib/ruby/gems/1.8/gems/clamp-0.3.1/lib/clamp/command.rb:64:in run'
utime': Operation not permitted - /tmp/package-dir-staging20120615-13194-jjq9zl/opt/venv/lib/python2.7/config (Errno::EPERM)
Just to be clear, the master fpm appears to be complaining about COMPRESSION_TYPES and is breaking on trying utime on Ubuntu (the same error I had on OSX when it was trying to copy and delete symbolic links).
the 'utime not permitted' problem should have been fixed by now. Also the 'COMPRESSION_TYPES' thing is just a harmless warning.
Can you reproduce the utime failure on the latest fpm?
harmless warning == exit 2, not exit 0, unfortunately :(
I'll rephrase. The "COMPRESSION_TYPES" warning is not a reason fpm or ruby will abort or exit.
Here's an example:
% ruby -e 'FOO = 123; FOO = 234; puts "GOT HERE"'
-e:1: warning: already initialized constant FOO
% echo $?
Notice how 'GOT HERE' is printed and the exit code is zero :)
@ampledata - if you are having issues, please include the full error output.
STOP TYPING SO FAST. Actually you're right, I was receiving a misleading exit for another reason. Comment rescinded.
Closing since --deb-compression flag has been available since fpm 0.4.11