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

Creating an empty folder

kpcyrd opened this issue · comments

Hello!

I'm trying to create an empty folder in /etc/ that is going to hold config files that the user is going to write.

This could be implemented with:

assets = [
    # binary
    ["target/release/foo", "usr/bin/", "755"],
    # directory
    ["etc/my/empty/folder/", "755"],
]

thanks!

How does that work in Debian? Is it enough to just make the dir in the tarball?

Yes. If you want lintian to be happy you'd also need to add an override for package-contains-empty-directory:
https://lintian.debian.org/tags/package-contains-empty-directory.html

If you are using a systemd unit you can also use the ConfigurationDirectory directive.