Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Added
to pants' use of PEX lockfiles. This is not a user-facing addition.
#6118 #6141 #6133 #6120 #6181 #6183 #6200 #6237 #6229 #6240 #6241 #6244 #6251 #6253
#6254 #6258 #6259 #6260 #6269 #6275 #6279 #6278 #6282 #6283 #6273 #6287 #6306 #6307
#6311 #6314 #6315 #6317 #6319 #6312 #6320 #6321 #6323 #6324 #6325 #6326
#6311 #6314 #6315 #6317 #6319 #6312 #6320 #6321 #6323 #6324 #6325 #6326 #6327
Contributed by @cognifloyd
* Build of ST2 EL9 packages #6153
Contributed by @amanda11
Expand Down
4 changes: 4 additions & 0 deletions packaging/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ nfpm_deb_package(
"./deb/scripts",
"./deb/systemd:services",
"./common/systemd:generators",
"./common:dirs",
"./common:symlinks",
],
scripts=dict(
preinstall="deb/scripts/pre-install.sh",
Expand Down Expand Up @@ -66,6 +68,8 @@ nfpm_rpm_package(
"./rpm/scripts",
"./rpm/systemd:services",
"./common/systemd:generators",
"./common:dirs",
"./common:symlinks",
],
scripts=dict(
preinstall="rpm/scripts/pre-install.sh",
Expand Down
73 changes: 73 additions & 0 deletions packaging/common/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
nfpm_content_dirs(
name="root_dirs",
dirs=[
# "/etc/bash_completion.d",
# "/etc/logrotate.d",
Comment on lines +4 to +5
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).

"/etc/st2",
"/opt/stackstorm",
"/opt/stackstorm/st2",
"/usr/share/doc/st2",
],
file_owner="root",
file_group="root",
file_mode="rwxr-xr-x",
)

nfpm_content_dirs(
name="packs_group_dirs",
dirs=[
"/opt/stackstorm/packs",
"/opt/stackstorm/virtualenvs",
"/usr/share/doc/st2/examples",
],
file_owner="root",
file_group=ST2_PACKS_GROUP,
file_mode="rwxrwxr-x",
Comment on lines +23 to +25
Copy link
Member Author

Choose a reason for hiding this comment

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

)

nfpm_content_dirs(
name="st2_user_dirs",
dirs=[
"/opt/stackstorm/configs",
"/opt/stackstorm/exports",
"/opt/stackstorm/overrides",
"/var/log/st2",
"/var/run/st2",
],
file_owner=ST2_SVC_USER,
file_group="root",
file_mode="rwxr-xr-x",
Comment on lines +37 to +39
Copy link
Member Author

Choose a reason for hiding this comment

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

)

target(
name="dirs",
dependencies=[
":root_dirs",
":packs_group_dirs",
":st2_user_dirs",
],
)
Comment on lines +42 to +49
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.


nfpm_content_symlinks(
name="symlinks",
symlinks=[
# the symlink src will be made available during post-install script
(f"/opt/stackstorm/st2/bin/{cmd}", f"/usr/bin/{cmd}")
for cmd in (
"st2",
"st2-trigger-refire",
"st2-rule-tester",
"st2-run-pack-tests",
"st2-register-content",
"st2-apply-rbac-definitions",
"st2-bootstrap-rmq",
"st2-generate-symmetric-crypto-key",
"st2-self-check",
"st2-track-result",
"st2-validate-pack-config",
"st2ctl",
)
],
file_owner="root",
file_group="root",
)
Loading