Skip to content

Conversation

@cognifloyd
Copy link
Member

@cognifloyd cognifloyd commented Mar 19, 2025

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

This PR is the last (planned) packaging PR that edits a deb maintainer script and an rpm scriptlet.

As noted in #6319, I did not expand the debhelper snippets and rpm macros that manage building the /opt/stackstorm/st2 virtualenv. Instead of expanding them, this PR replaces them with logic that is uniform for both deb and rpm. This replacement avoids the dh_virtualenv debhelper that is unsupported upstream, and skips the complexity of using the external tool we used in rpms.

This PR makes the rpm/deb post-install scripts:

The deb / rpm packages will need to place the pex and pack archives somewhere so that they are available during the when the post-install script runs. So, a big question is: Where should we put these files? Here are some options

Option Pex Archives Pack Archives
1 /opt/stackstorm/install/st2*.pex /opt/stackstorm/install/packs/*.tgz.run
2 /usr/share/st2/install/st2*.pex /usr/share/st2/install/packs/*.tgz.run
3 /usr/share/st2/archives/st2*.pex /usr/share/st2/archives/packs/*.tgz.run
4 /usr/share/doc/st2/install/st2*.pex /usr/share/doc/st2/install/packs/*.tgz.run
5 /usr/share/doc/st2/archives/st2*.pex /usr/share/doc/st2/archives/packs/*.tgz.run

This PR uses option 1. I think my second choice would be option 3. Any other ideas? Where should we put these install archives?

@cognifloyd cognifloyd added this to the pants milestone Mar 19, 2025
@cognifloyd cognifloyd self-assigned this Mar 19, 2025
@pull-request-size pull-request-size bot added the size/M PR that changes 30-99 lines. Good size to review. label Mar 19, 2025
@cognifloyd cognifloyd requested a review from a team March 19, 2025 23:12
@cognifloyd cognifloyd requested review from a team, amanda11, nzlosh, rush-skills and winem March 21, 2025 00:49
Copy link
Contributor

@amanda11 amanda11 left a comment

Choose a reason for hiding this comment

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

I agree with placement of pex file in /opt/stackstorm

Copy link
Contributor

@winem winem left a comment

Choose a reason for hiding this comment

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

I'd also prefer option 1 - having the pex file in /opt.

@cognifloyd cognifloyd merged commit b7f9b6a into master Mar 24, 2025
87 of 88 checks passed
@cognifloyd cognifloyd deleted the packaging-scriptlets_pex_and_packs branch March 24, 2025 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature pantsbuild refactor 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.

5 participants