mmstick / cargo-deb

A cargo subcommand that generates Debian packages from information in Cargo.toml
615 stars 50 forks source link

Creating an empty folder #124

Open kpcyrd opened 4 years ago

kpcyrd commented 4 years ago

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!

kornelski commented 4 years ago

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

kpcyrd commented 4 years ago

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

ximon18 commented 4 years ago

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