Skip to content

Commit

Permalink
Merge pull request #41 from Maegereg/main
Browse files Browse the repository at this point in the history
Add jammy
  • Loading branch information
matt9j authored Aug 8, 2023
2 parents 944f408 + 4f6a33b commit 1b0fe9d
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 1 deletion.
35 changes: 35 additions & 0 deletions pkg/crossplatform/Dockerfile-jammy
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM ubuntu:jammy

# Add ubuntu ports repos and make ubuntu default repos architecture specific.
# Ubuntu does the world the great service of hosting different architectures at
# different domains, without specifying that their repos are architecture
# specific in the sources list :/
RUN mv /etc/apt/sources.list /etc/apt/sources.list.original
COPY ./pkg/crossplatform/cross-compile-sources-list-jammy /etc/apt/sources.list

# Add required cross-compiler architectures
RUN dpkg --add-architecture arm64
RUN apt-get update

# Install dependencies and cross compile toolchain
RUN DEBIAN_FRONTEND=noninteractive apt-get install --yes apt-utils
# The dockerfile currently assumes an amd64 build machine.
RUN DEBIAN_FRONTEND=noninteractive apt-get install --yes make git curl gcc-aarch64-linux-gnu gcc gettext-base libsystemd-dev libsystemd-dev:arm64

# Install the rust toolchain
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > sh.rustup.rs

RUN sh sh.rustup.rs -y --quiet
ENV PATH="/root/.cargo/bin:${PATH}"

RUN rustup target add aarch64-unknown-linux-gnu
RUN rustup target add x86_64-unknown-linux-gnu

COPY ./ /workspace
COPY ./pkg/crossplatform/docker-entrypoint.sh /workspace

WORKDIR /workspace

RUN cargo fetch

ENTRYPOINT ["/usr/bin/env", "bash", "/workspace/docker-entrypoint.sh", "ubuntu22.04", "jammy"]
2 changes: 1 addition & 1 deletion pkg/crossplatform/build_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import shutil
import subprocess

DISTRIBUTIONS = ["buster", "bionic", "focal", "bullseye"]
DISTRIBUTIONS = ["buster", "bionic", "focal", "bullseye", "jammy"]


def _setup_workspace(workspace_path):
Expand Down
9 changes: 9 additions & 0 deletions pkg/crossplatform/cross-compile-sources-list-jammy
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
deb [arch=amd64,i386] http://us.archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
deb [arch=amd64,i386] http://us.archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
deb [arch=amd64,i386] http://us.archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
deb [arch=amd64,i386] http://security.ubuntu.com/ubuntu jammy-security main restricted universe multiverse

deb [arch=arm64,armhf,ppc64el,s390x] http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe multiverse
deb [arch=arm64,armhf,ppc64el,s390x] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe multiverse
deb [arch=arm64,armhf,ppc64el,s390x] http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted universe multiverse
deb [arch=arm64,armhf,ppc64el,s390x] http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse

0 comments on commit 1b0fe9d

Please sign in to comment.