Packaging: extract venv (from pex) and packs (from archives) during rpm/deb post-install #6320
+55
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
pex_binary
BUILD metadata for building st2 venv #6307/opt/stackstorm/packs
and/usr/share/doc/st2/examples
.makeself_archive
for each pack to facilitate installation #6311The 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
/opt/stackstorm/install/st2*.pex
/opt/stackstorm/install/packs/*.tgz.run
/usr/share/st2/install/st2*.pex
/usr/share/st2/install/packs/*.tgz.run
/usr/share/st2/archives/st2*.pex
/usr/share/st2/archives/packs/*.tgz.run
/usr/share/doc/st2/install/st2*.pex
/usr/share/doc/st2/install/packs/*.tgz.run
/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?