Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def packageBuildSteps = [
}
]

packageBuildSteps << images.collectEntries { generatePackageSteps(it) }
// packageBuildSteps << images.collectEntries { generatePackageSteps(it) }

pipeline {
agent none
Expand Down
6 changes: 5 additions & 1 deletion Makefile.win
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,17 @@ endif

.PHONY: checkout
checkout: src
echo GIT VERSION
git version
@git -C src/github.com/containerd/containerd fetch --depth 1 origin "$(REF)"
@git -C src/github.com/containerd/containerd checkout -q FETCH_HEAD
@git -C src/github.com/containerd/containerd config --add safe.directory C:/gopath/src/github.com/containerd/containerd

# Windows builder, only difference is we installed make
windows-image: checkout
docker build \
--pull \
--no-cache \
--build-arg GOLANG_IMAGE=$(GOLANG_IMAGE) \
-t dockereng/containerd-windows-builder \
-f dockerfiles/win.dockerfile \
Expand All @@ -49,7 +53,7 @@ build/windows/%.exe: windows-image
-v "$(CURDIR)/build/windows:C:/gopath/src/github.com/containerd/containerd/bin" \
-w "C:/gopath/src/github.com/containerd/containerd" \
dockereng/containerd-windows-builder \
make bin/$*
powershell.exe '$$env:GIT_TRACE2 = "1"; make REVISION=$$(git rev-parse HEAD) -d bin/$*'

build/windows/containerd.zip: build/windows/containerd.exe build/windows/ctr.exe
Powershell.exe Compress-Archive -Force -Path 'build/windows/*.exe' -DestinationPath '$@'
Expand Down
18 changes: 18 additions & 0 deletions dockerfiles/deb.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,24 @@ RUN apt-get update -q && apt-get install -y --no-install-recommends \
lsb-release \
&& rm -rf /var/lib/apt/lists/*

# FIXME(vvoland): workaround for building on arm64 without ld.gold
#
# go1.21 and up have a patch that enforces the use of ld.gold to work around
# a bug in GNU binutils. See;
# - https://github.com/golang/go/issues/22040.
# - https://github.com/golang/go/commit/cd77738198ffe0c4a1db58352c89f9b2d2a4e85e
#
# Debian Trixie and up has a fixed version of binutils, and no longer requires that
# patch, but will fail without ld.gold installed;
#
# /usr/bin/gcc -s -Wl,-z,relro -pie -Wl,-z,now -Wl,-z,nocopyreloc -fuse-ld=gold -Wl,--build-id=0x180b1b07171bd43d595eecf91a69ed0ef8a1e41f -o $WORK/b001/exe/a.out -rdynamic /tmp/go-link-443338093/go.o /tmp/go-link-443338093/000000.o /tmp/go-link-443338093/000001.o /tmp/go-link-443338093/000002.o /tmp/go-link-443338093/000003.o /tmp/go-link-443338093/000004.o /tmp/go-link-443338093/000005.o /tmp/go-link-443338093/000006.o /tmp/go-link-443338093/000007.o /tmp/go-link-443338093/000008.o /tmp/go-link-443338093/000009.o /tmp/go-link-443338093/000010.o /tmp/go-link-443338093/000011.o /tmp/go-link-443338093/000012.o /tmp/go-link-443338093/000013.o /tmp/go-link-443338093/000014.o /tmp/go-link-443338093/000015.o /tmp/go-link-443338093/000016.o /tmp/go-link-443338093/000017.o /tmp/go-link-443338093/000018.o /tmp/go-link-443338093/000019.o /tmp/go-link-443338093/000020.o /tmp/go-link-443338093/000021.o /tmp/go-link-443338093/000022.o /tmp/go-link-443338093/000023.o /tmp/go-link-443338093/000024.o /tmp/go-link-443338093/000025.o /tmp/go-link-443338093/000026.o /tmp/go-link-443338093/000027.o /tmp/go-link-443338093/000028.o /tmp/go-link-443338093/000029.o /tmp/go-link-443338093/000030.o /tmp/go-link-443338093/000031.o /tmp/go-link-443338093/000032.o -O2 -g -lresolv -O2 -g -lpthread -O2 -g -ldl -O2 -g -O2 -g -O2 -g -ldl
# collect2: fatal error: cannot find 'ld'
#
# Since Trixie, binutils-gold is no longer installed as a part of the binutils package and needs to be installed separately.
#
# As a workaround; install binutils-gold if it's not installed
RUN if [ "$(dpkg --print-architecture)" = 'arm64' ] && ! command -v ld.gold; then apt-get update && apt-get install -y binutils-gold; fi

# Install build dependencies and build scripts
COPY --link --from=go-md2man /go/bin/go-md2man /go/bin/go-md2man
COPY --link debian/ debian/
Expand Down
4 changes: 2 additions & 2 deletions dockerfiles/rpm.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ FROM redhat-base AS fedora-base
# - https://src.fedoraproject.org/rpms/golang/blob/a867bd88a656c1d6e91e7b18bab696dc3fcf1e77/f/0006-Default-to-ld.bfd-on-ARM64.patch
# - https://src.fedoraproject.org/rpms/golang/c/a867bd88a656c1d6e91e7b18bab696dc3fcf1e77?branch=rawhide
#
# As a workaround; install binutils-gold
RUN if [ "$(arch)" = 'aarch64' ] && [ $(source /etc/os-release && echo "${VERSION_ID%.*}") -ge 41 ]; then dnf -y install binutils-gold; fi
# As a workaround; install binutils-gold if it's not installed
RUN if [ "$(rpm --query --queryformat='%{ARCH}' rpm)" = 'aarch64' ] && ! command -v ld.gold; then dnf -y install binutils-gold; fi

FROM ${BUILD_IMAGE} AS amzn-base
RUN yum install -y yum-utils rpm-build git
Expand Down
2 changes: 2 additions & 0 deletions dockerfiles/win.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ RUN iex ((new-object net.webclient).DownloadString('https://chocolatey.org/inst
choco feature disable --name showDownloadProgress; \
choco install -y make; \
choco install -y mingw --version 10.2.0 --allow-downgrade

RUN git config --global --add safe.directory '*'