Skip to content

Conversation

@cognifloyd
Copy link
Member

This PR is working towards doing packaging via pantsbuild. Eventually, I hope to archive and stop using st2-packages.git.

Previous PRs in this series:

This PR defines the metadata for the directories and symlinks that the deb/rpm packages should install. To do this, we need to add nfpm_content_directories and nfpm_content_symlinks to BUILD metadata and then make the nfpm_*_package targets depend on them.

Directories are defined st2-packages.git here:

Symlinks are defined in st2-packages.git here:

@cognifloyd cognifloyd added this to the pants milestone Apr 5, 2025
@cognifloyd cognifloyd self-assigned this Apr 5, 2025
@pull-request-size pull-request-size bot added the size/M PR that changes 30-99 lines. Good size to review. label Apr 5, 2025
Comment on lines +4 to +5
# "/etc/bash_completion.d",
# "/etc/logrotate.d",
Copy link
Member Author

Choose a reason for hiding this comment

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

This is defined in https://github.com/StackStorm/st2-packages/blob/master/packages/st2/debian/st2.dirs but I don't think they're necessary. When we add the files that go in these directories, the directories will be implicitly added, and we don't have specific permissions to set on these directories as we assume they will be created by the relevant package that owns the directory.

So, I left it commented out. I can either remove them now, or we can remove them once the files that go in these directories get registered (in a follow-up PR).

Comment on lines +23 to +25
file_owner="root",
file_group=ST2_PACKS_GROUP,
file_mode="rwxrwxr-x",
Copy link
Member Author

Choose a reason for hiding this comment

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

Comment on lines +37 to +39
file_owner=ST2_SVC_USER,
file_group="root",
file_mode="rwxr-xr-x",
Copy link
Member Author

Choose a reason for hiding this comment

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

Comment on lines +42 to +49
target(
name="dirs",
dependencies=[
":root_dirs",
":packs_group_dirs",
":st2_user_dirs",
],
)
Copy link
Member Author

Choose a reason for hiding this comment

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

Each set of directories above (:root_dirs, :packs_group_dirs, :st2_user_dirs) defines the relevant permissions. They are separate targets because those permissions differ. Then, this target makes it easy to depend on all of the directories in the nfpm_*_packages targets.

@cognifloyd cognifloyd enabled auto-merge (squash) April 5, 2025 22:31
@cognifloyd cognifloyd requested review from a team, amanda11, guzzijones, rush-skills and winem April 6, 2025 14:54
@cognifloyd cognifloyd merged commit 5de36c7 into master Apr 6, 2025
90 of 91 checks passed
@cognifloyd cognifloyd deleted the packaging-nfpm_contents-dirs_links branch April 6, 2025 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement pantsbuild size/M PR that changes 30-99 lines. Good size to review. st2-packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants