Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo deb does not handle links files #92

Open
mikael-hermansson-icomera opened this issue May 26, 2023 · 1 comment
Open

cargo deb does not handle links files #92

mikael-hermansson-icomera opened this issue May 26, 2023 · 1 comment

Comments

@mikael-hermansson-icomera

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?

@dcampbell24
Copy link
Contributor

Did you try setting

[package.metadata.deb]
preserve-symlinks = true

I like the idea of having a symlinks = [["target", "link-name"]], so you don't have to have already created the symlink.

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

No branches or pull requests

2 participants