Skip to content

Fix install dirs wrt binary relocatability #1624

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

Merged
merged 3 commits into from
May 7, 2021
Merged

Conversation

dominiklohmann
Copy link
Member

@dominiklohmann dominiklohmann commented May 3, 2021

📔 Description

This PR solves a multitude of issues we've had in one fell swoop:

  • Data, configuration and library dirs interpreted relative to the VAST binary file are no longer specified as fixed paths. E.g., we now support running integration tests and relocateable binaries on systems where the libary install directory is lib64 instead of lib.

  • Non-relocatable VAST binaries no longer look for configuration, schemas, and plugins in directories relative to the binary location.

  • Relocatable VAST binaries no longer look for configuration, schemas, and plugins in their original install directory, and instead always use paths relative to their binary location.

  • Non-relocatable VAST binaries on macOS were broken for a while. Since there is no use case for them we now always build relocatable binaries on macOS.

  • With --bare-mdoe enabled, VAST now unloads static plugins that are not explicitly specified in an explicitly specified configuration file. This allows for running VAST's test suites for static VAST binaries.

📝 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

FIle-by-file. Test carefully.

The plugin loading change can be tested by building the static binary with the PCAP plugin enabled, which fails the vast dump integration test without this change.

Note that this change is not of very high priority, so I don't mind this sitting a bit until we have time to test it carefully.

@dominiklohmann dominiklohmann added the bug Incorrect behavior label May 3, 2021
@dominiklohmann dominiklohmann requested a review from a team May 3, 2021 16:45
@dominiklohmann dominiklohmann force-pushed the topic/bare-mode branch 2 times, most recently from 4517122 to 7b315be Compare May 3, 2021 16:53
@dominiklohmann dominiklohmann force-pushed the topic/bare-mode branch 3 times, most recently from 9d0c3ec to cf7c101 Compare May 4, 2021 08:27
@dominiklohmann dominiklohmann requested review from tobim and removed request for a team May 4, 2021 08:27
@dominiklohmann dominiklohmann changed the title Add the bare mode to VAST Fix install dirs wrt binary relocatability May 4, 2021
@dominiklohmann dominiklohmann force-pushed the topic/bare-mode branch 3 times, most recently from 90aa01a to 7f3d60d Compare May 6, 2021 06:59
@tobim tobim self-assigned this May 6, 2021
Copy link
Member

@tobim tobim left a comment

Choose a reason for hiding this comment

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

I like the installdirs abstraction 👍
Just two small things that I think can be improved.

This commit solves a multitude of issues we've had in one fell swoop:

- Data, configuration and library dirs interpreted relative to the VAST binary
  file are no longer specified as fixed paths. E.g., we now support running
  integration tests and relocatable binaries on systems where the libary install
  directory is `lib64` instead of `lib`.

- Non-relocatable VAST binaries no longer look for configuration, schemas, and
  plugins in directories relative to the binary location.

- Relocatable VAST binaries no longer look for configuration, schemas, and
  plugins in their original install directory, and instead always use paths
  relative to their binary location.

- Non-relocatable VAST binaries on macOS were broken for a while. Since there is
  no use case for them we now always build relocatable binaries on macOS.

- With `--bare-mdoe` enabled, VAST now unloads static plugins that are not
  explicitly specified in an explicitly specified configuration file. This
  allows for running VAST's test suites for static VAST binaries.
The CMAKE_INSTALL_PREFIX can be overriden for installations, but we rely
on the paths we know at build time for non-relocatable builds. This adds
a custom installation step that detects such mismatches and fails the
installation.
@dominiklohmann dominiklohmann enabled auto-merge May 7, 2021 13:26
@dominiklohmann dominiklohmann merged commit 197b7ce into master May 7, 2021
@dominiklohmann dominiklohmann deleted the topic/bare-mode branch May 7, 2021 13:47
@tobim tobim removed their assignment Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants