Understanding .apk-new protected files behavior
My projects is made of several scripts and docker compose file, installed in /usr/local/myproject/
.
The user can alter docker-compose behavior by editing a /usr/local/myproject/docker-compose.override.yaml
file that is installed by default with pretty much everything commented out, they can go in and add their own configuration.
The problem is that this file gets overwritten with a package update, my assumption after doing some research is that apk doesn't consider this file a being protected and assumes it has to be overwritten with the package version.
What I would like, is instead to replace the file if it has been untouched, or if it has, copy the distribution file as .apk-new
which seems to be the standard behavior regarding configuration files.
I'm thinking the path I use isn't considered as appropriate for APK to adopt protected mode.
- Is there a way to indicate APK that a given file is a configuration file and shouldn't be overwritten ?
- Where can I find more information about that feature ? (does it look at specific folders, specific file extensions ?)
Thanks for your help.