Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to using CMake GNUInstallDirs module for install path handling. #17308

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Ferroin
Copy link
Member

@Ferroin Ferroin commented Apr 1, 2024

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:

  • If they are using our native packages, there should be no visible difference.
  • If they are using our Docker images, there should be no visible differences.
  • If they are building locally, but installing to /, there should be no visible difference.
  • If they are using our static builds, every path currently under /opt/netdata/usr will instead be under /opt/netdata.
  • If they are building locally, but installing to a prefix other than /, than any paths currently under usr/ 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.

@Ferroin
Copy link
Member Author

Ferroin commented Apr 3, 2024

Rebased to pick up fixes in master branch for unit tests.

@Ferroin
Copy link
Member Author

Ferroin commented Apr 25, 2024

Rebased to resolve merge conflicts and pick up latest changes in master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build Build system (autotools and cmake). area/ci area/packaging Packaging and operating systems support area/tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Building with --prefix=/foo installs files to /foo/usr when it should not do so.
1 participant