Skip to content

Commit 2a9fb6a

Browse files
committed
WIP
1 parent 3da77e3 commit 2a9fb6a

File tree

4 files changed

+19
-9
lines changed

4 files changed

+19
-9
lines changed

.github/workflows/build-deb-package.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ jobs:
3939
with:
4040
toolchain: stable
4141

42+
- name: Build the sevctl binary
43+
run: |
44+
cd packaging && make sevctl-podman
45+
mkdir -p ./aleph-vm/opt
46+
cp -p ./target/sevctl ./aleph-vm/opt/sevctl
47+
4248
- run: |
4349
cd packaging && make ${{ matrix.make_target }} && cd ..
4450
ls packaging/target

packaging/Makefile

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,15 @@ debian-package-code:
1818
pip3 install --target ./aleph-vm/opt/aleph-vm/ 'aleph-message==0.4.4' 'eth-account==0.10' 'sentry-sdk==1.31.0' 'qmp==1.1.0' 'superfluid==0.2.1' 'sqlalchemy[asyncio]>=2.0' 'aiosqlite==0.19.0' 'alembic==1.13.1' 'aiohttp_cors==0.7.0' 'pyroute2==0.7.12'
1919
python3 -m compileall ./aleph-vm/opt/aleph-vm/
2020

21-
debian-package-resources: firecracker-bins vmlinux download-ipfs-kubo target/sevctl
21+
debian-package-resources: firecracker-bins vmlinux download-ipfs-kubo # target/sevctl
2222
rm -fr ./aleph-vm/opt/firecracker
2323
mkdir -p ./aleph-vm/opt/firecracker
2424
cp -pr ./target/vmlinux.bin ./aleph-vm/opt/firecracker/
2525
cp -pr ./target/firecracker ./aleph-vm/opt/firecracker/
2626
cp -pr ./target/jailer ./aleph-vm/opt/firecracker/
2727
cp -pr ./target/kubo/kubo ./aleph-vm/opt/kubo
28-
cp -pr ./target/sevctl ./aleph-vm/opt/sevctl
28+
# build sevctl in a separate step since building it requires a recent Rust compiler
29+
# cp -pr ./target/sevctl ./aleph-vm/opt/sevctl
2930

3031
firecracker-bins: target-dir build-dir
3132
mkdir -p ./build/firecracker-release
@@ -55,10 +56,14 @@ target/sevctl:
5556
sevctl-podman:
5657
# Build sevctl inside an OCI Image with an upstream version of Rust.
5758
# sevctl requires a version of Rust more recent than the one available in Debian stable.
58-
podman build -t sevctl-builder-debian-12 -f ./debian-12-sevctl.dockerfile .
59-
podman run --rm -v $(PWD)/target:/target sevctl-builder-debian-12
60-
# Test the binary
61-
./target/sevctl -V
59+
cd .. && podman build -t localhost/aleph-vm-packaging-debian-12:latest -f ./packaging/debian-12.dockerfile .
60+
mkdir -p ./target
61+
podman run --rm -ti \
62+
-w /opt/packaging \
63+
-v ./target:/opt/packaging/target \
64+
localhost/aleph-vm-packaging-debian-12:latest \
65+
make target/sevctl
66+
file target/sevctl
6267

6368
version:
6469
python3 ./version_from_git.py --inplace deb aleph-vm/DEBIAN/control

packaging/debian-11.dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
FROM rust:bullseye
1+
FROM rust:1.79.0-bullseye
22

33
RUN apt-get update && apt-get -y upgrade && apt-get install -y \
44
make \
55
git \
66
curl \
77
sudo \
88
python3-pip \
9-
cargo \
109
&& rm -rf /var/lib/apt/lists/*
1110

1211
WORKDIR /opt

packaging/debian-12.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM rust:bookworm
1+
FROM rust:1.79.0-bookworm
22

33
RUN apt-get update && apt-get -y upgrade && apt-get install -y \
44
make \

0 commit comments

Comments
 (0)