Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packaging: extract venv (from pex) and packs (from archives) during rpm/deb post-install #6320

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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, winem, nzlosh, rush-skills and amanda11 March 21, 2025 00:49
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.

2 participants