Switch to using CMake GNUInstallDirs module for install path handling. #17308
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This brings us in-line with best current practices for handling of install paths in CMake.
Fixes #13242 (finally), as well as all of the secondary issues derived from that, and significantly simplifies creation of third-party packages of Netdata.
For end users:
/
, there should be no visible difference./opt/netdata/usr
will instead be under/opt/netdata
./
, than any paths currently underusr/
under the prefix will instead be under the root of the prefix.In the last two cases, the change is non-breaking unless the user is using custom plugins or dashboard files, hard-coding the path to things we put under libexec (such aas the updater/uninstaller), or is doing strange things with our installs that they should not be.
Test Plan
Preliminary testing involves checking that CI passes on this PR.
Additional Info
This MUST NOT be included in a patch release, as it involves breaking changes for some users.
This also needs to be actively talked up both in the release notes and in other locations before we merge it.
Target release for inclusion, assuming no issues are discovered, is v1.47.0, with plans to merge shortly after v1.46.0.