Packaging: Add directories and symlinks to deb/rpm packages#6327
Packaging: Add directories and symlinks to deb/rpm packages#6327cognifloyd merged 5 commits intomasterfrom
Conversation
| # "/etc/bash_completion.d", | ||
| # "/etc/logrotate.d", |
There was a problem hiding this comment.
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).
| file_owner="root", | ||
| file_group=ST2_PACKS_GROUP, | ||
| file_mode="rwxrwxr-x", |
| file_owner=ST2_SVC_USER, | ||
| file_group="root", | ||
| file_mode="rwxr-xr-x", |
| target( | ||
| name="dirs", | ||
| dependencies=[ | ||
| ":root_dirs", | ||
| ":packs_group_dirs", | ||
| ":st2_user_dirs", | ||
| ], | ||
| ) |
There was a problem hiding this comment.
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.
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:
nfpm_deb_packageandnfpm_rpm_package) was added in Packaging: Add basic BUILD metadata for rpm/deb packages #6325 along with the deb maintainer scripts and rpm scriptlets.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_directoriesandnfpm_content_symlinksto BUILD metadata and then make thenfpm_*_packagetargets depend on them.Directories are defined st2-packages.git here:
Symlinks are defined in st2-packages.git here: