Skip to content

Commit

Permalink
s390x: build fedora binaries for peerpod
Browse files Browse the repository at this point in the history
Fixes: confidential-containers#1640

Signed-off-by: Qi Feng Huo <[email protected]>
  • Loading branch information
Qi Feng Huo committed Jan 26, 2024
1 parent 926146b commit 36c50c2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion podvm-mkosi/mkosi.presets/system/mkosi.conf.d/fedora.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Distribution=fedora

[Distribution]
Distribution=fedora
Release=38
Release=39

[Content]
CleanPackageMetadata=true
Expand Down
2 changes: 1 addition & 1 deletion podvm/Dockerfile.podvm_binaries.fedora
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
ARG BUILDER_IMG

FROM --platform=$TARGETPLATFORM ${BUILDER_IMG} AS podvm_builder
FROM ${BUILDER_IMG} AS podvm_builder

ARG CLOUD_PROVIDER
ARG PODVM_DISTRO=rhel
Expand Down
13 changes: 4 additions & 9 deletions podvm/Dockerfile.podvm_builder.fedora
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
#
# Build binaries for mkosi podvm image
#
FROM multiarch/qemu-user-static:s390x-6.1.0-8 as qemu
FROM --platform=$TARGETPLATFORM registry.fedoraproject.org/fedora:39

COPY --from=qemu /usr/bin/qemu-s390x-static /usr/bin
FROM registry.fedoraproject.org/fedora:38

ARG ARCH="amd64"
ARG YQ_ARCH="amd64"
# PROTOC_ARCH="x86_64" | "s390x_64"
ARG PROTOC_ARCH="x86_64"
ARG GO_VERSION="1.20.12"
ARG PROTOC_VERSION="3.11.4"
ARG RUST_VERSION="1.72.0"
ARG YQ_VERSION="v4.35.1"
# amd64: YQ_CHECKSUM="sha256:bd695a6513f1196aeda17b174a15e9c351843fb1cef5f9be0af170f2dd744f08"
# s390x: YQ_CHECKSUM="sha256:4e6324d08630e7df733894a11830412a43703682d65a76f1fc925aac08268a45"
ARG YQ_CHECKSUM="sha256:bd695a6513f1196aeda17b174a15e9c351843fb1cef5f9be0af170f2dd744f08"

RUN dnf groupinstall -y 'Development Tools' && \
Expand All @@ -43,8 +43,3 @@ RUN unzip protoc-${PROTOC_VERSION}-linux-${PROTOC_ARCH}.zip -d /usr/local && rm
WORKDIR /src

ENV GOPATH /src

# for debug
COPY . /src/cloud-api-adaptor

WORKDIR /src/cloud-api-adaptor/podvm
4 changes: 4 additions & 0 deletions podvm/Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,11 @@ $(SKOPEO_SRC):
$(call git_clone_repo_ref,$(SKOPEO_REPO),$(SKOPEO_SRC),$(SKOPEO_VERSION))

$(SKOPEO_BIN): $(SKOPEO_SRC)
ifeq ($(ARCH),s390x)
cd "$(SKOPEO_SRC)" && CC=gcc $(MAKE) bin/skopeo
else
cd "$(SKOPEO_SRC)" && CC= $(MAKE) bin/skopeo
endif

# The umoci release page only publishes amd64 binaries. https://github.com/opencontainers/umoci/releases
$(UMOCI_SRC):
Expand Down

0 comments on commit 36c50c2

Please sign in to comment.