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

ZeekPluginDynamic: Handle DIST_FILES in CMake #116

Merged
merged 2 commits into from
Jul 2, 2024

Conversation

awelzel
Copy link
Contributor

@awelzel awelzel commented Jun 27, 2024

Move path wrangling of DIST files from zeek-plugin-create-package.sh into CMake logic.

New logic: Relative paths have all leading ../ components strip to determine the location within the resulting tarball. This also removes the assumption of having build/ located within the source directory (and zeek-plugin-create-package.sh running from build/).

The quirky part is that the script deletes the produced files after creating the tarball.

@awelzel
Copy link
Contributor Author

awelzel commented Jun 27, 2024

@bbannier - this is what maybe could work for zeek/package-template#37 (review) in the future. Is this more in the direction you were thinking of?

ZeekPluginDynamic.cmake Outdated Show resolved Hide resolved
@awelzel awelzel force-pushed the topic/awelzel/dynamic-plugin-dist-files branch 2 times, most recently from ab54fa5 to 57b0d06 Compare June 27, 2024 16:09
Move path wrangling of DIST files from zeek-plugin-create-package.sh
into CMake logic.

New logic: Location of files in dist is based relative to the PROJECT_SOURCE_DIR.
This removes the assumption of having build/ located within the source directory
(and zeek-plugin-create-package.sh running from build/).
@awelzel awelzel force-pushed the topic/awelzel/dynamic-plugin-dist-files branch from 57b0d06 to c5eac15 Compare June 27, 2024 16:32
@awelzel awelzel marked this pull request as ready for review June 27, 2024 16:32
Copy link
Member

@bbannier bbannier left a comment

Choose a reason for hiding this comment

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

🚀

@awelzel
Copy link
Contributor Author

awelzel commented Jul 2, 2024

🚀

Grumble - this subtly changes how we deal with symlinks: Having README a symlink as README.md will place README.md into the tarball due to the resolving the path. I think this would be better with ABSOLUTE rather than REALPATH. I'll try.

There's a pattern of README -> README.md symlinking. Using
README as dist file should not package the README.md file.
@awelzel awelzel force-pushed the topic/awelzel/dynamic-plugin-dist-files branch from 2e20322 to cc9de7b Compare July 2, 2024 17:36
@awelzel awelzel merged commit d996924 into master Jul 2, 2024
1 check passed
@awelzel awelzel deleted the topic/awelzel/dynamic-plugin-dist-files branch July 2, 2024 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants