Skip to content

Commit

Permalink
fix(all): add parts definition to install rustc compiler
Browse files Browse the repository at this point in the history
The `rustc` compiler is required by the cryptography Python package
since all charm dependencies are pulled as source packages rather than
as pre-built wheels. The parts declarations will not be required when
`jwtctl` is implemented, but until then, the `rustc` compiler is required
to successfully pack the Slurm charms.

Signed-off-by: Jason C. Nucciarone <[email protected]>
  • Loading branch information
NucciTheBoss committed Nov 8, 2024
1 parent 648e032 commit 81a19ff
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 14 deletions.
14 changes: 14 additions & 0 deletions charms/slurmctld/charmcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Copyright 2020 Omnivector Solutions, LLC
# See LICENSE file for licensing details.

name: slurmctld
summary: |
Slurmctld, the central management daemon of Slurm.
Expand Down Expand Up @@ -43,6 +44,19 @@ bases:
channel: "22.04"
architectures: [amd64]

parts:
charm:
charm-requirements: ["requirements.txt"]
override-build: |
cp /usr/bin/rustc-1.80 /usr/bin/rustc
craftctl default
build-packages:
- libffi-dev
- libssl-dev
- rustc-1.80
- cargo
- pkg-config
- git

config:
options:
Expand Down
13 changes: 12 additions & 1 deletion charms/slurmd/charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,18 @@ bases:
architectures: [amd64]

parts:
charm: {}
charm:
charm-requirements: [ "requirements.txt" ]
override-build: |
cp /usr/bin/rustc-1.80 /usr/bin/rustc
craftctl default
build-packages:
- libffi-dev
- libssl-dev
- rustc-1.80
- cargo
- pkg-config
- git
nhc:
plugin: nil
build-packages:
Expand Down
30 changes: 22 additions & 8 deletions charms/slurmdbd/charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@ links:
source:
- https://github.com/charmed-hpc/slurm-charms

requires:
database:
interface: mysql_client

provides:
slurmctld:
interface: slurmdbd

bases:
- build-on:
- name: ubuntu
Expand All @@ -41,3 +33,25 @@ bases:
- name: ubuntu
channel: "22.04"
architectures: [amd64]

parts:
charm:
charm-requirements: ["requirements.txt"]
override-build: |
cp /usr/bin/rustc-1.80 /usr/bin/rustc
craftctl default
build-packages:
- libffi-dev
- libssl-dev
- rustc-1.80
- cargo
- pkg-config
- git

requires:
database:
interface: mysql_client

provides:
slurmctld:
interface: slurmdbd
24 changes: 19 additions & 5 deletions charms/slurmrestd/charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ links:
source:
- https://github.com/charmed-hpc/slurm-charms

provides:
slurmctld:
interface: slurmrestd
limit: 1

assumes:
- juju

Expand All @@ -36,3 +31,22 @@ bases:
- name: ubuntu
channel: "22.04"
architectures: [amd64]

parts:
charm:
charm-requirements: ["requirements.txt"]
override-build: |
cp /usr/bin/rustc-1.80 /usr/bin/rustc
craftctl default
build-packages:
- libffi-dev
- libssl-dev
- rustc-1.80
- cargo
- pkg-config
- git

provides:
slurmctld:
interface: slurmrestd
limit: 1

0 comments on commit 81a19ff

Please sign in to comment.