Skip to content
Merged
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 #6327
#6311 #6314 #6315 #6317 #6319 #6312 #6320 #6321 #6323 #6324 #6325 #6326 #6327 #6328
Contributed by @cognifloyd
* Build of ST2 EL9 packages #6153
Contributed by @amanda11
Expand Down
6 changes: 6 additions & 0 deletions packaging/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ nfpm_deb_package(
"./common/systemd:generators",
"./common:dirs",
"./common:symlinks",
":st2_venv@parametrize=py38",
":default_packs",
":extra_packs",
],
scripts=dict(
preinstall="deb/scripts/pre-install.sh",
Expand Down Expand Up @@ -70,6 +73,9 @@ nfpm_rpm_package(
"./common/systemd:generators",
"./common:dirs",
"./common:symlinks",
":st2_venv@parametrize=py38",
":default_packs",
":extra_packs",
],
scripts=dict(
preinstall="rpm/scripts/pre-install.sh",
Expand Down
25 changes: 25 additions & 0 deletions packaging/BUILD.packs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# These are packs that should be installed with the default ST2 install.
_DEFAULT_PACKS = (
"chatops",
"core",
"default",
"linux",
"packs",
)

# These are packs that should NOT be installed with the default ST2 install.
_EXTRA_PACKS = (
"debug",
"examples",
"hello_st2",
)

# :archive_for_npfm targets created by st2_pack_archive() macro (see pants-plugins/macros.py)
target(
name="default_packs",
dependencies=[f"//contrib/{pack}:archive_for_nfpm" for pack in _DEFAULT_PACKS],
)
target(
name="extra_packs",
dependencies=[f"//contrib/{pack}:archive_for_nfpm" for pack in _EXTRA_PACKS],
)
22 changes: 22 additions & 0 deletions packaging/BUILD.venv
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,25 @@ pex_binary(
**_pex_py3("10"),
**_pex_py3("11"),
)


def _venv_py3(minor: str):
return parametrize(
f"py3{minor}",
dependencies=[f":st2.pex@parametrize=py3{minor}"],
src=f"st2-py3{minor}.pex", # relative to this BUILD file
)


nfpm_content_file(
name="st2_venv",
description="Pex file that system packages can use to generate /opt/stackstorm/st2",
file_owner="root",
file_group="root",
file_mode="rwxr-x---",
dst="/opt/stackstorm/install/st2.pex", # or st2-py3*.pex
**_venv_py3("8"),
**_venv_py3("9"),
**_venv_py3("10"),
**_venv_py3("11"),
)
10 changes: 10 additions & 0 deletions pants-plugins/macros.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,16 @@ def st2_pack_archive(**kwargs):
output_path=f"packaging/packs/{pack_name}.tgz.run",
)

nfpm_content_file( # noqa: F821
name="archive_for_nfpm",
dependencies=[":archive"],
src=f"packaging/packs/{pack_name}.tgz.run",
dst=f"/opt/stackstorm/install/packs/{pack_name}.tgz.run",
file_owner="root",
file_group=ST2_PACKS_GROUP,
file_mode="rwxr-x---",
)


def st2_shell_sources_and_resources(**kwargs):
"""This creates a shell_sources and a resources target.
Expand Down
Loading