Add single empty file config.yml. Put it into pmm-submodules repository. Install it to <insert proper path there, /usr/local/percona/something> only if this file is not present. Do not replace it or change permissions otherwise.
But it seems we do overwrite that file (/usr/local/percona/pmm-agent.yaml) on Debian/Ubuntu . That needs to be checked and fixed.
After discussion with Evgeniy Patlan, we decided on the following:
- pmm-agent.yaml is not a part of the package (in a technical sense). That allows us not to overwrite that file during the upgrade, do not ask the user for confirmation during the upgrade, do not "fix" (actually, break) file permissions during the upgrade.
- We do create that (empty) file if it does not exist during installation; we use hooks for that.
- We do remove that file when purge or equivalent option is used; we use hooks for that.
- Upgrade from any previous version to the version with this change (to be released as a part of beta7) will remove pmm-agent.yaml for the last time. That will happen on all distributions.