mmstick / cargo-deb

A cargo subcommand that generates Debian packages from information in Cargo.toml

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Corrupt (tar) package

elwerene opened this issue · comments

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.

Looks like our lzma compressor is incompatible :(

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

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

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