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

feat!: Enable multiarch snap builds for deployment on non-amd64 machines #2

Merged
merged 7 commits into from
Dec 13, 2023

Conversation

NucciTheBoss
Copy link
Collaborator

This pull request adds support for multiple architectures for the snap package build. New architectures include:

  • arm64
  • ppc64el
  • s390x
  • riscv64

This pull request also adds other changes such as shipping a prebuilt clingo within the snap, builds yq from source (to support riscv64 builds), and bumps Spack to version 0.21.0.

Signed-off-by: Jason C. Nucciarone <[email protected]>
Signed-off-by: Jason C. Nucciarone <[email protected]>
BREAKING CHANGE: Shell support scripts no longer lock-in `SPACK_PYTHON`
based on what the user has set in their environment. Instead, snap will
set SPACK_PYTHON to the Python interpreter bundled inside the snap. This
bundled Python interpreter provides the `clingo` module installed
during spack's bootstrap process.

Shell support patch now also patches out hints about enabling
powershell support as well as .batch suppor. bash/zsh/sh shell
support script now supports the $SPACK_COLOR env variable.

Signed-off-by: Jason C. Nucciarone <[email protected]>
BREAKING CHANGE: The spack snap now sets SPACK_PYTHON to be
python3 interpreter bundled inside the snap. This interpreter
provides the `clingo` module so that Spack does not pull
a prebuilt clingo during bootstrap.

Other changes:
  - Add support for arm64, armhf, ppc64el, s390x, and riscv64.
  - Add spack core and binary dependencies to stage packages
    to shorten Spack bootstrap time after installation.
  - Compile clingo to ship prebuilt concretizer with Spack. This
    removes the need to pull prebuilt binaries from Spack's remote
    mirrors/CI pipeline.
  - Compile yq since yq snap does not support riscv64 architecture.
    Once support is added, switch back to yq snap to decrease snap
    build time.

Signed-off-by: Jason C. Nucciarone <[email protected]>
The snap command in the `tox -e install` environment needed
to have `--classic` appended since the Spack snap is classically confined.
Also needed to prepend `sudo` to the zlib install/uninstall unit test
commands since Spack now installs to /var/spack.

Signed-off-by: Jason C. Nucciarone <[email protected]>
@NucciTheBoss NucciTheBoss merged commit c3e5ba1 into main Dec 13, 2023
3 checks passed
@NucciTheBoss NucciTheBoss deleted the enable-multiarch branch February 14, 2024 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant