kornelski / cargo-deb

A cargo subcommand that generates Debian packages from information in Cargo.toml
https://lib.rs/cargo-deb
MIT License
404 stars 48 forks source link

cargo deb does not handle links files #92

Open mikael-hermansson-icomera opened 1 year ago

mikael-hermansson-icomera commented 1 year ago

I have an application which using a symlinks to select what mode it should run: . Meaning the debian package need to install a symlinks.

Normally dh_helper has a file named package.links which is readed by the helper and creates a symlink in the deb package the symlink is then unpacked when package is installed on the target.

This does not seem to work with cargo help first try was:

[package.metadata.deb] maintainer-scripts = "debian/"

But this does not care about the links file. Probably cause this is not correct since it is not a script.

A second try:

conf-files = ["links"]

Still could not get it to work.

The work around is currently to add a debian/postinst and add a ln -fs to the script. But this feels wrong. It would be nice if cargo deb also handled the dh_links feature.

Alternative a toml setting:

[package.metadata.deb] links=[..] # similar to assets...

Or maybe this is already supported and I am missing something?