Skip to content
This repository has been archived by the owner on May 19, 2022. It is now read-only.

How to include image and video files in assets #169

Open
ApurvaSolanki54 opened this issue Apr 7, 2021 · 5 comments
Open

How to include image and video files in assets #169

ApurvaSolanki54 opened this issue Apr 7, 2021 · 5 comments

Comments

@ApurvaSolanki54
Copy link

I am packaging my application in deb file and there are some images and videos to include in deb file which I have included using assets like below in cargo.toml file but while installing I am getting error.

[package.metadata.deb]
assets = [
["webserver.jpg","/var/","777"],
["Video.mp4","/var/","777"],
["background_stat2.png","/var/","777"]
]

dpkg-deb (subprocess): decompressing archive member: lzma error: unexpected end of input
dpkg-deb: error: subprocess returned error exit status 2
dpkg: error processing archive bro_rust_0.1.0_amd64.deb (--install):
cannot copy extracted data for 'var/background_stat2.png' to '/var/background_stat2.png.dpkg-new': unexpected end of file or stream
Errors were encountered while processing:
bro_rust_0.1.0_amd64.deb

@kornelski
Copy link
Collaborator

777 permission means it's an executable file.

But I'm surprised it complains about EOF. That doesn't seem to be related to file type at all.

@ApurvaSolanki54
Copy link
Author

I have also tried permission 664 but it gave me same error.

@jtk18
Copy link
Contributor

jtk18 commented May 25, 2021

I'm getting the same thing with .tar.gz files included in my deb package.

cannot copy extracted data for 'opt/app/app-files-1.1.0.tar.gz' to '/opt/app/app-files-1.1.0.tar.gz.dpkg-new': unexpected end of file or stream

I'm starting to dig in to see what's going on.

@jtk18
Copy link
Contributor

jtk18 commented May 27, 2021

So, I reinstalled using cargo install --no-default-features cargo-deb, and the re-generated deb file with this version installs without the decompression error. I'm guessing it's a bug in xz2.

@kornelski
Copy link
Collaborator

can you try decompressing manually? ar -x the deb file to get data.tar.xz, and see if your system's unxz can decompress it?

I wonder if cargo-deb's library creates invalid or incompatible xz files.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants