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

Normalize GNUInstallDirs for external plugins #1786

Merged
merged 3 commits into from Jul 20, 2021

Conversation

dominiklohmann
Copy link
Member

@dominiklohmann dominiklohmann commented Jul 19, 2021

📔 Description

Plugins built against an installed VAST expect relative GNUInstallDirs, which some package managers (looking at you, Nix) stupidly set to absolute paths. This patch externalizes our normalization we do for VAST normally and applies it to all dynamic plugins.

📝 Checklist

  • All user-facing changes have changelog entries.
  • The changes are reflected on docs.tenzir.com/vast, if necessary.
  • The PR description contains instructions for the reviewer, if necessary.

🎯 Review Instructions

Test it locally by setting -D CMAKE_INSTALL_PREFIX=${PWD}/build.install -D CMAKE_INSTALL_LIBDIR=${PWD}/build.install/lib or similar.

Plugins built against an installed VAST expect relative GNUInstallDirs,
which some package managers (looking at you, Nix) stupidly set to
absolute paths. This patch externalizes our normalization we do for VAST
normally and applies it to all dynamic plugins.
@dominiklohmann dominiklohmann force-pushed the topic/normalize-install-dirs-plugins branch from df9d9fc to 579b1d6 Compare July 19, 2021 08:37
Comment on lines 25 to 26
# stupid thing where they put absolute paths into variables that are
# supposed to be interpreted as relative to the install preifx.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is too strong. The documentation explicitly states:

... However, an absolute path is also allowed.

In some cases absolute paths make sense, and we should probably only do this in relocatable mode for plugins too.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I toned the comment down, and made the requested change.

Additionally, this stops the copying of bundled schemas to the build
directory for non-reloctable installations, which may not be executed
from the build directory context anyways, and makes them function for
`CMAKE_INSTALL_DATADIR` other than `share`.
@tobim
Copy link
Member

tobim commented Jul 20, 2021

Tested with the static build locally.

@tobim tobim mentioned this pull request Jul 20, 2021
3 tasks
@dominiklohmann dominiklohmann merged commit 3ac1c92 into master Jul 20, 2021
@dominiklohmann dominiklohmann deleted the topic/normalize-install-dirs-plugins branch July 20, 2021 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants