cargo-deb icon indicating copy to clipboard operation
cargo-deb copied to clipboard

Creating an empty folder

Open kpcyrd opened this issue 4 years ago • 3 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!

kpcyrd avatar May 11 '20 14:05 kpcyrd

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

kornelski avatar May 12 '20 22:05 kornelski

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

kpcyrd avatar May 12 '20 23:05 kpcyrd

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

ximon18 avatar Jul 30 '20 09:07 ximon18