Skip to content

Commit

Permalink
podvm_binaries: Add fedora cross-build support
Browse files Browse the repository at this point in the history
Add fedora-like OS support for cross-build-extras
  • Loading branch information
stevenhorsman committed Sep 11, 2024
1 parent 5a69519 commit df84ac7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/cloud-api-adaptor/podvm/Dockerfile.podvm_binaries.fedora
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ ENV IMAGE_CHECKSUM="none"
COPY . /src

WORKDIR /src/cloud-api-adaptor/podvm
# Installs add-ons for foreign target, if required
RUN ./hack/cross-build-extras.sh

RUN LIBC=gnu make binaries

Expand Down
11 changes: 9 additions & 2 deletions src/cloud-api-adaptor/podvm/hack/cross-build-extras.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,12 @@ libc=$([[ $ARCH =~ s390x ]] && echo "gnu" || echo "musl")
rustTarget="$ARCH-unknown-linux-$libc"

rustup target add "$rustTarget"
apt install -y "qemu-system-$ARCH"
apt install -y "gcc-$ARCH-linux-$libc"

source /etc/os-release || source /usr/lib/os-release
if [[ ${ID_LIKE:-} == *"debian"* ]]; then
apt install -y "qemu-system-$ARCH"
apt install -y "gcc-$ARCH-linux-$libc"
elif [[ "${ID_LIKE:-}" =~ "fedora" ]]; then
dnf install -y "qemu-system-$ARCH"
dnf install -y "gcc-$ARCH-linux-$libc"
fi

0 comments on commit df84ac7

Please sign in to comment.