kornelski / cargo-deb

Make Debian packages directly from Rust/Cargo projects
https://lib.rs/cargo-deb
MIT License
431 stars 52 forks source link

Don't compress symlinks #140

Closed LeChatP closed 2 months ago

LeChatP commented 2 months ago

Hello,

I propose a fix to avoid compressing on symlinks as it should not be compressed. Symlinks in documentation folder is necessary for example when we have multiple binaries with a single man page.

Thank you for this cool tool.

LeChatP commented 2 months ago

This fix do not work. I think I do not understand the source code. Let's add another postinst step on my project instead.

kornelski commented 2 months ago

By default we are following symlinks and compress them as regular files. There's preserve-symlinks option that is required for symlink assets to exist.

LeChatP commented 2 months ago

I don't know where but I think there is a mess with symlinks when they are in the manual path. I activated the option and my symlink is still being compressed and goes in panic

kornelski commented 2 months ago

Can you make an example project that demonstrates the bug?

LeChatP commented 2 months ago

Here you go : https://github.com/LeChatP/symlink-bug Error message : cargo-deb: Symlink unexpectedly used to read file data

LeChatP commented 2 months ago

My workaround is to compress the man by myself and do symlink with "gz" extension

kornelski commented 2 months ago

Fixed in 90636b80fea0d38bbbcbfda263ab0450f03f97c7