Skip to content

Commit

Permalink
Fix: No .deb was built for Ubuntu 24.04
Browse files Browse the repository at this point in the history
This adds support in the packaging/Makefile and in the CI to build packages for Ubuntu 24.04
  • Loading branch information
hoh committed Jun 5, 2024
1 parent b63d248 commit df26f8b
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-deb-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:
- os: "ubuntu-22.04"
make_target: "all-podman-ubuntu-2204"
artifact_name: "aleph-vm.ubuntu-22.04.deb"
- os: "ubuntu-24.04"
make_target: "all-podman-ubuntu-2404"
artifact_name: "aleph-vm.ubuntu-24.04.deb"
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
20 changes: 20 additions & 0 deletions packaging/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,17 @@ all-podman-ubuntu-2204: version
file target/aleph-vm.deb
mv target/aleph-vm.deb target/aleph-vm.ubuntu-22.04.deb

all-podman-ubuntu-2404: version
cd .. && podman build -t localhost/aleph-vm-packaging-ubuntu-2404:latest -f ./packaging/ubuntu-24.04.dockerfile .
mkdir -p ./target
podman run --rm -ti \
-w /opt/packaging \
-v ./target:/opt/packaging/target \
localhost/aleph-vm-packaging-ubuntu-2404:latest \
make
file target/aleph-vm.deb
mv target/aleph-vm.deb target/aleph-vm.ubuntu-24.04.deb

# extract Python requirements from Debian 11 container
requirements-debian-11: all-podman-debian-11
podman run --rm -ti \
Expand Down Expand Up @@ -120,6 +131,15 @@ requirements-ubuntu-22.04: all-podman-ubuntu-2204
ubuntu:jammy \
bash -c "/opt/extract_requirements.sh /mnt/requirements-ubuntu-22.04.txt"

# extract Python requirements from Ubuntu 24.04 container
requirements-ubuntu-24.04: all-podman-ubuntu-2404
podman run --rm -ti \
-v ./target/aleph-vm.ubuntu-24.04.deb:/opt/packaging/target/aleph-vm.deb:ro \
-v ./extract_requirements.sh:/opt/extract_requirements.sh:ro \
-v ./requirements-ubuntu-24.04.txt:/mnt/requirements-ubuntu-24.04.txt \
ubuntu:noble \
bash -c "/opt/extract_requirements.sh /mnt/requirements-ubuntu-24.04.txt"

# run on host in order to sign with GPG
repository-bullseye:
cd ./repositories/bullseye && reprepro -Vb . includedeb bullseye ../../target/aleph-vm.debian-11.deb && cd ..
Expand Down
16 changes: 16 additions & 0 deletions packaging/ubuntu-24.04.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM ubuntu:24.04

RUN apt-get update && apt-get -y upgrade && apt-get install -y \
make \
git \
curl \
sudo \
python3-pip \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /opt
COPY ../src/aleph ./src/aleph
COPY ../packaging ./packaging
COPY ../kernels ./kernels

COPY ../examples/ ./examples

0 comments on commit df26f8b

Please sign in to comment.