mmstick / cargo-deb

A cargo subcommand that generates Debian packages from information in Cargo.toml
615 stars 50 forks source link

Corrupt (tar) package #190

Closed elwerene closed 3 years ago

elwerene commented 3 years ago

Some of my crates can't be packaged with cargo-deb as the resulting tar archive is corrupt.

I made a minimal example: https://github.com/elwerene/cargo-deb-missing-files

Clone it and run ./test.sh.

On my computer I get this output as there's missing files in the tar archive:

$ ./test.sh 
warning: description field is missing in Cargo.toml
warning: license field is missing in Cargo.toml
    Finished release [optimized] target(s) in 0.00s
./bla_0.1.0_amd64.deb
dpkg-deb (subprocess): decompressing archive member: lzma error: unexpected end of input
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
dpkg-deb: error: subprocess tar returned error exit status 2

I played around with file sizes and discovered, that it was no problem to have 10000 files with 10 bytes each, but more than a couple of files with 10k bytes each fail.

kornelski commented 3 years ago

Looks like our lzma compressor is incompatible :(

You can compile the create without default features which will disable lzma.

elwerene commented 3 years ago

I'm on Cent OS 8.

$ rpm -qa |grep -i xz
xz-libs-5.2.4-3.el8.x86_64
xz-5.2.4-3.el8.x86_64
elwerene commented 3 years ago

I can confirm it is fixed in the current version. Thanks!