From df395eefa55d4846ca7c6438c92a370ab3f4249c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Tue, 18 Mar 2025 11:34:39 +0100 Subject: [PATCH 01/23] dockerfiles/rpm: Test userspace arch instead of the kernel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `arch` tests the kernel, not the userspace (thanks Tianon!) Signed-off-by: Paweł Gronowski --- dockerfiles/rpm.dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerfiles/rpm.dockerfile b/dockerfiles/rpm.dockerfile index 51d8d109..cfd35a77 100644 --- a/dockerfiles/rpm.dockerfile +++ b/dockerfiles/rpm.dockerfile @@ -75,7 +75,7 @@ FROM redhat-base AS fedora-base # - 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 +RUN if [ "$(rpm --query --queryformat='%{ARCH}' rpm)" = 'aarch64' ] && [ $(source /etc/os-release && echo "${VERSION_ID%.*}") -ge 41 ]; then dnf -y install binutils-gold; fi FROM ${BUILD_IMAGE} AS amzn-base RUN yum install -y yum-utils rpm-build git From 45f63bf8d4510e3398dc546ad9c474ef9fd0339e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Mon, 17 Mar 2025 19:31:51 +0100 Subject: [PATCH 02/23] dockerfiles/rpm: Simplify binutils-gold condition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace the Fedora version check with the actual check for the `ld.gold` linker availability. Go hardcoded workaround **always** forces the `ld.gold` linker on arm64. Signed-off-by: Paweł Gronowski --- dockerfiles/rpm.dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dockerfiles/rpm.dockerfile b/dockerfiles/rpm.dockerfile index cfd35a77..6bdbe0b0 100644 --- a/dockerfiles/rpm.dockerfile +++ b/dockerfiles/rpm.dockerfile @@ -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 [ "$(rpm --query --queryformat='%{ARCH}' rpm)" = '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 From 61a83ca458dcc44d8932504fd56f8cb198562bec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Mon, 17 Mar 2025 19:28:03 +0100 Subject: [PATCH 03/23] dockerfiles/deb: Install binutils-gold on arm64 if needed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On Debian Trixie and newer versions, binutils-gold is no longer included in the base binutils package and must be installed separately. Without this component, the build fails on arm64 with "collect2: fatal error: cannot find 'ld'" error. Go has a hardcoded workaround where it forces usage of ld.gold on ARM64. It was only needed for ld 2.40, and Trixie is already on 2.44 but the workaround hasn't been removed from the upstream Go code yet. We need to make sure that ld.gold is available when building for Trixie on arm64. This is the same case as with Fedora 41: b1534837b42f81528c4228e6518dee0df0662583 Signed-off-by: Paweł Gronowski --- dockerfiles/deb.dockerfile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/dockerfiles/deb.dockerfile b/dockerfiles/deb.dockerfile index 6c2b2dcb..f771655a 100644 --- a/dockerfiles/deb.dockerfile +++ b/dockerfiles/deb.dockerfile @@ -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/ From e8a2c059359dcde775109f36ce456436250be71a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Tue, 18 Mar 2025 16:35:05 +0100 Subject: [PATCH 04/23] windows: fix git ownership error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds the all paths to safe directories to address the "dubious ownership" error when building containerd in Windows container: ``` fatal: detected dubious ownership in repository at 'C:/gopath/src/github.com/containerd/containerd' 'C:/gopath/src/github.com/containerd/containerd' is owned by: NT AUTHORITY/SYSTEM (S-1-5-18) but the current user is: User Manager/ContainerAdministrator (S-1-5-93-2-1) ``` Signed-off-by: Paweł Gronowski --- Makefile.win | 1 + dockerfiles/win.dockerfile | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Makefile.win b/Makefile.win index fca03739..f574ca41 100644 --- a/Makefile.win +++ b/Makefile.win @@ -30,6 +30,7 @@ endif checkout: src @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 diff --git a/dockerfiles/win.dockerfile b/dockerfiles/win.dockerfile index f903459e..60c4858c 100644 --- a/dockerfiles/win.dockerfile +++ b/dockerfiles/win.dockerfile @@ -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 '*' From 19b6f813bff60c13f1086ca0a92e64b726ed6683 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Tue, 18 Mar 2025 16:41:00 +0100 Subject: [PATCH 05/23] debug; log git version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Gronowski --- Makefile.win | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile.win b/Makefile.win index f574ca41..0d676d67 100644 --- a/Makefile.win +++ b/Makefile.win @@ -28,6 +28,8 @@ 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 From 5fcb90ef2f447fd7cf1b196ece687e7e3fbfedaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Tue, 18 Mar 2025 16:43:39 +0100 Subject: [PATCH 06/23] debug; jenkins jus windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Gronowski --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 73216f3a..2b0562b1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -82,7 +82,7 @@ def packageBuildSteps = [ } ] -packageBuildSteps << images.collectEntries { generatePackageSteps(it) } +// packageBuildSteps << images.collectEntries { generatePackageSteps(it) } pipeline { agent none From f715f9600748130e8164dc5b4a23f255adcc5c63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Tue, 18 Mar 2025 17:18:33 +0100 Subject: [PATCH 07/23] windows: debug makefile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Gronowski --- Makefile.win | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.win b/Makefile.win index 0d676d67..5fe479a7 100644 --- a/Makefile.win +++ b/Makefile.win @@ -52,7 +52,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/$* + make -d bin/$* build/windows/containerd.zip: build/windows/containerd.exe build/windows/ctr.exe Powershell.exe Compress-Archive -Force -Path 'build/windows/*.exe' -DestinationPath '$@' From 4523224f1bf14d622ed336602bbc7218abb5e33f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Tue, 18 Mar 2025 17:34:02 +0100 Subject: [PATCH 08/23] dir git MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Gronowski --- Makefile.win | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.win b/Makefile.win index 5fe479a7..5643f036 100644 --- a/Makefile.win +++ b/Makefile.win @@ -52,7 +52,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 -d bin/$* + cmd.exe /S /C "dir && make -d bin/$*" build/windows/containerd.zip: build/windows/containerd.exe build/windows/ctr.exe Powershell.exe Compress-Archive -Force -Path 'build/windows/*.exe' -DestinationPath '$@' From 1ccc2fb6695f1207746ed9d25d9cb7a596deaecf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Tue, 18 Mar 2025 18:49:38 +0100 Subject: [PATCH 09/23] inline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Gronowski --- Makefile.win | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Makefile.win b/Makefile.win index 5643f036..0537a5cf 100644 --- a/Makefile.win +++ b/Makefile.win @@ -46,13 +46,7 @@ windows-image: checkout build/windows/%.exe: windows-image Powershell.exe New-Item -ItemType Directory -Force -Path build/windows/ - docker run \ - --rm \ - -v "$(CURDIR)/src/:C:/gopath/src" \ - -v "$(CURDIR)/build/windows:C:/gopath/src/github.com/containerd/containerd/bin" \ - -w "C:/gopath/src/github.com/containerd/containerd" \ - dockereng/containerd-windows-builder \ - cmd.exe /S /C "dir && make -d bin/$*" + docker run --rm -v "$(CURDIR)/src/:C:/gopath/src" -v "$(CURDIR)/build/windows:C:/gopath/src/github.com/containerd/containerd/bin" -w "C:/gopath/src/github.com/containerd/containerd" dockereng/containerd-windows-builder cmd.exe /S /C "dir && make -d bin/$*" build/windows/containerd.zip: build/windows/containerd.exe build/windows/ctr.exe Powershell.exe Compress-Archive -Force -Path 'build/windows/*.exe' -DestinationPath '$@' From 4070ee6263a20cab57edaaa1eab15087469fd47b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Tue, 18 Mar 2025 18:53:21 +0100 Subject: [PATCH 10/23] spaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Gronowski --- Makefile.win | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.win b/Makefile.win index 0537a5cf..0bbbcdb9 100644 --- a/Makefile.win +++ b/Makefile.win @@ -46,7 +46,7 @@ windows-image: checkout build/windows/%.exe: windows-image Powershell.exe New-Item -ItemType Directory -Force -Path build/windows/ - docker run --rm -v "$(CURDIR)/src/:C:/gopath/src" -v "$(CURDIR)/build/windows:C:/gopath/src/github.com/containerd/containerd/bin" -w "C:/gopath/src/github.com/containerd/containerd" dockereng/containerd-windows-builder cmd.exe /S /C "dir && make -d bin/$*" + docker run --rm -v "$(CURDIR)/src/:C:/gopath/src" -v "$(CURDIR)/build/windows:C:/gopath/src/github.com/containerd/containerd/bin" -w "C:/gopath/src/github.com/containerd/containerd" dockereng/containerd-windows-builder cmd.exe /S /C " dir && make -d bin/$*" build/windows/containerd.zip: build/windows/containerd.exe build/windows/ctr.exe Powershell.exe Compress-Archive -Force -Path 'build/windows/*.exe' -DestinationPath '$@' From ed96f0665fca7294f80c18b05a64107e0c140ec6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Tue, 18 Mar 2025 19:05:58 +0100 Subject: [PATCH 11/23] asdf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Gronowski --- Makefile.win | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.win b/Makefile.win index 0bbbcdb9..c1a4ffe4 100644 --- a/Makefile.win +++ b/Makefile.win @@ -46,7 +46,7 @@ windows-image: checkout build/windows/%.exe: windows-image Powershell.exe New-Item -ItemType Directory -Force -Path build/windows/ - docker run --rm -v "$(CURDIR)/src/:C:/gopath/src" -v "$(CURDIR)/build/windows:C:/gopath/src/github.com/containerd/containerd/bin" -w "C:/gopath/src/github.com/containerd/containerd" dockereng/containerd-windows-builder cmd.exe /S /C " dir && make -d bin/$*" + docker run --rm -v "$(CURDIR)/src/:C:/gopath/src" -v "$(CURDIR)/build/windows:C:/gopath/src/github.com/containerd/containerd/bin" -w "C:/gopath/src/github.com/containerd/containerd" dockereng/containerd-windows-builder cmd.exe /C "dir && make -d bin/$*" build/windows/containerd.zip: build/windows/containerd.exe build/windows/ctr.exe Powershell.exe Compress-Archive -Force -Path 'build/windows/*.exe' -DestinationPath '$@' From 2eb1d01a83499badc0d4b28bfec65fcfcc5855d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Tue, 18 Mar 2025 19:11:14 +0100 Subject: [PATCH 12/23] pls send help MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Gronowski --- Makefile.win | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile.win b/Makefile.win index c1a4ffe4..6d689c49 100644 --- a/Makefile.win +++ b/Makefile.win @@ -46,7 +46,13 @@ windows-image: checkout build/windows/%.exe: windows-image Powershell.exe New-Item -ItemType Directory -Force -Path build/windows/ - docker run --rm -v "$(CURDIR)/src/:C:/gopath/src" -v "$(CURDIR)/build/windows:C:/gopath/src/github.com/containerd/containerd/bin" -w "C:/gopath/src/github.com/containerd/containerd" dockereng/containerd-windows-builder cmd.exe /C "dir && make -d bin/$*" + docker run \ + --rm \ + -v "$(CURDIR)/src/:C:/gopath/src" \ + -v "$(CURDIR)/build/windows:C:/gopath/src/github.com/containerd/containerd/bin" \ + -w "C:/gopath/src/github.com/containerd/containerd" \ + dockereng/containerd-windows-builder \ + cmd.exe /C dir "&&" make -d bin/$* build/windows/containerd.zip: build/windows/containerd.exe build/windows/ctr.exe Powershell.exe Compress-Archive -Force -Path 'build/windows/*.exe' -DestinationPath '$@' From eec515fb2eb460d453cc0c3fe0dba9778ff671e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Tue, 18 Mar 2025 19:14:31 +0100 Subject: [PATCH 13/23] powershell? MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Gronowski --- Makefile.win | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.win b/Makefile.win index 6d689c49..9b25e9fa 100644 --- a/Makefile.win +++ b/Makefile.win @@ -52,7 +52,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 \ - cmd.exe /C dir "&&" make -d bin/$* + powershell.exe Get-ChildItem build/windows/containerd.zip: build/windows/containerd.exe build/windows/ctr.exe Powershell.exe Compress-Archive -Force -Path 'build/windows/*.exe' -DestinationPath '$@' From dde1d2355c09578dd93ee42745e272d7af44e17a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Tue, 18 Mar 2025 19:23:34 +0100 Subject: [PATCH 14/23] list on host MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Gronowski --- Makefile.win | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.win b/Makefile.win index 9b25e9fa..3e13a517 100644 --- a/Makefile.win +++ b/Makefile.win @@ -46,6 +46,7 @@ windows-image: checkout build/windows/%.exe: windows-image Powershell.exe New-Item -ItemType Directory -Force -Path build/windows/ + Powershell.exe Get-ChildItem -Path "$(CURDIR)/src/github.com/containerd/containerd" docker run \ --rm \ -v "$(CURDIR)/src/:C:/gopath/src" \ From b6c11f6f91290bb6a2d8434ffc1a231b6b78ee51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Tue, 18 Mar 2025 19:28:01 +0100 Subject: [PATCH 15/23] list dot git MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Gronowski --- Makefile.win | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile.win b/Makefile.win index 3e13a517..c113a877 100644 --- a/Makefile.win +++ b/Makefile.win @@ -47,6 +47,8 @@ windows-image: checkout build/windows/%.exe: windows-image Powershell.exe New-Item -ItemType Directory -Force -Path build/windows/ Powershell.exe Get-ChildItem -Path "$(CURDIR)/src/github.com/containerd/containerd" + Powershell.exe Get-ChildItem -Path "$(CURDIR)/src/github.com/containerd/containerd/.git" + Powershell.exe Get-ChildItem -Path ".git" docker run \ --rm \ -v "$(CURDIR)/src/:C:/gopath/src" \ From 0e933661dc6cab78e183ae72865c376e73ee877c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Tue, 18 Mar 2025 19:33:19 +0100 Subject: [PATCH 16/23] force MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Gronowski --- Makefile.win | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.win b/Makefile.win index c113a877..102d8b19 100644 --- a/Makefile.win +++ b/Makefile.win @@ -46,7 +46,7 @@ windows-image: checkout build/windows/%.exe: windows-image Powershell.exe New-Item -ItemType Directory -Force -Path build/windows/ - Powershell.exe Get-ChildItem -Path "$(CURDIR)/src/github.com/containerd/containerd" + Powershell.exe Get-ChildItem -Force -Path "$(CURDIR)/src/github.com/containerd/containerd" Powershell.exe Get-ChildItem -Path "$(CURDIR)/src/github.com/containerd/containerd/.git" Powershell.exe Get-ChildItem -Path ".git" docker run \ @@ -55,7 +55,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 \ - powershell.exe Get-ChildItem + powershell.exe Get-ChildItem -Force build/windows/containerd.zip: build/windows/containerd.exe build/windows/ctr.exe Powershell.exe Compress-Archive -Force -Path 'build/windows/*.exe' -DestinationPath '$@' From 088b35b9bc0b1d7fe7c1b8301b7548bee4cd95e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Tue, 18 Mar 2025 19:36:18 +0100 Subject: [PATCH 17/23] list and make MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Gronowski --- Makefile.win | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Makefile.win b/Makefile.win index 102d8b19..42e0927d 100644 --- a/Makefile.win +++ b/Makefile.win @@ -46,16 +46,13 @@ windows-image: checkout build/windows/%.exe: windows-image Powershell.exe New-Item -ItemType Directory -Force -Path build/windows/ - Powershell.exe Get-ChildItem -Force -Path "$(CURDIR)/src/github.com/containerd/containerd" - Powershell.exe Get-ChildItem -Path "$(CURDIR)/src/github.com/containerd/containerd/.git" - Powershell.exe Get-ChildItem -Path ".git" docker run \ --rm \ -v "$(CURDIR)/src/:C:/gopath/src" \ -v "$(CURDIR)/build/windows:C:/gopath/src/github.com/containerd/containerd/bin" \ -w "C:/gopath/src/github.com/containerd/containerd" \ dockereng/containerd-windows-builder \ - powershell.exe Get-ChildItem -Force + powershell.exe "Get-ChildItem -Force; make -d bin/$*" build/windows/containerd.zip: build/windows/containerd.exe build/windows/ctr.exe Powershell.exe Compress-Archive -Force -Path 'build/windows/*.exe' -DestinationPath '$@' From 5f002b235f3479c9448c1629fd97ee49897be5b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Wed, 19 Mar 2025 12:08:53 +0100 Subject: [PATCH 18/23] debug git status MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Gronowski --- Makefile.win | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.win b/Makefile.win index 42e0927d..dfe02d36 100644 --- a/Makefile.win +++ b/Makefile.win @@ -52,7 +52,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 \ - powershell.exe "Get-ChildItem -Force; make -d bin/$*" + powershell.exe '$env:GIT_TRACE2 = "1"; git status' build/windows/containerd.zip: build/windows/containerd.exe build/windows/ctr.exe Powershell.exe Compress-Archive -Force -Path 'build/windows/*.exe' -DestinationPath '$@' From 1691820b9e3b3cc78cc097c6019f62f4b0ed2e2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Wed, 19 Mar 2025 12:44:55 +0100 Subject: [PATCH 19/23] escape? MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Gronowski --- Makefile.win | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.win b/Makefile.win index dfe02d36..49a6c45a 100644 --- a/Makefile.win +++ b/Makefile.win @@ -52,7 +52,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 \ - powershell.exe '$env:GIT_TRACE2 = "1"; git status' + powershell.exe '\$env:GIT_TRACE2 = "1"; git status' build/windows/containerd.zip: build/windows/containerd.exe build/windows/ctr.exe Powershell.exe Compress-Archive -Force -Path 'build/windows/*.exe' -DestinationPath '$@' From 97f3bfe03afc2a20fd19824f6a339a5ef9a07da1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Wed, 19 Mar 2025 12:51:37 +0100 Subject: [PATCH 20/23] escape2? MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Gronowski --- Makefile.win | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.win b/Makefile.win index 49a6c45a..4ba278e0 100644 --- a/Makefile.win +++ b/Makefile.win @@ -52,7 +52,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 \ - powershell.exe '\$env:GIT_TRACE2 = "1"; git status' + powershell.exe '$$env:GIT_TRACE2 = "1"; git status' build/windows/containerd.zip: build/windows/containerd.exe build/windows/ctr.exe Powershell.exe Compress-Archive -Force -Path 'build/windows/*.exe' -DestinationPath '$@' From 6ed5f6a802e368d41721fa16345a9dc940af5876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Wed, 19 Mar 2025 12:56:04 +0100 Subject: [PATCH 21/23] add diff and make MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Gronowski --- Makefile.win | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.win b/Makefile.win index 4ba278e0..431d9540 100644 --- a/Makefile.win +++ b/Makefile.win @@ -52,7 +52,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 \ - powershell.exe '$$env:GIT_TRACE2 = "1"; git status' + powershell.exe '$$env:GIT_TRACE2 = "1"; git status; git version; git diff --no-ext-diff; make -d bin/$*' build/windows/containerd.zip: build/windows/containerd.exe build/windows/ctr.exe Powershell.exe Compress-Archive -Force -Path 'build/windows/*.exe' -DestinationPath '$@' From 580a84db32f56f3f4aed5d42323074ec324e27a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Wed, 19 Mar 2025 13:09:51 +0100 Subject: [PATCH 22/23] set revision explicitly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Gronowski --- Makefile.win | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.win b/Makefile.win index 431d9540..ce9ec057 100644 --- a/Makefile.win +++ b/Makefile.win @@ -52,7 +52,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 \ - powershell.exe '$$env:GIT_TRACE2 = "1"; git status; git version; git diff --no-ext-diff; make -d 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 '$@' From c6c0c8cb642f05eb6fbe2ed65232ad2a0856e238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Wed, 19 Mar 2025 13:13:33 +0100 Subject: [PATCH 23/23] bust build cache MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Gronowski --- Makefile.win | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.win b/Makefile.win index ce9ec057..d7ffee7a 100644 --- a/Makefile.win +++ b/Makefile.win @@ -38,6 +38,7 @@ checkout: src windows-image: checkout docker build \ --pull \ + --no-cache \ --build-arg GOLANG_IMAGE=$(GOLANG_IMAGE) \ -t dockereng/containerd-windows-builder \ -f dockerfiles/win.dockerfile \