From 932ff3b0ada9288996c54de7567f5f4e950bbabe Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Fri, 4 Aug 2023 00:32:40 +0200 Subject: [PATCH] pkg(credential-helpers): match min macos version Signed-off-by: CrazyMax --- pkg/credential-helpers/Dockerfile | 7 ++++--- pkg/credential-helpers/scripts/pkg-static-build.sh | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/credential-helpers/Dockerfile b/pkg/credential-helpers/Dockerfile index 31f2bb13..3d05f000 100644 --- a/pkg/credential-helpers/Dockerfile +++ b/pkg/credential-helpers/Dockerfile @@ -15,6 +15,7 @@ # limitations under the License. ARG XX_VERSION="1.2.1" +ARG OSXCROSS_VERSION="11.3-r7-debian" ARG DEBIAN_FRONTEND="noninteractive" # common args @@ -35,8 +36,8 @@ FROM scratch AS common-scripts # cross compilation helper FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx -# osxcross contains the MacOSX SDK for xx -FROM dockercore/golang-cross:xx-sdk-extras AS osxsdk +# osxcross contains the MacOSX cross toolchain for xx +FROM crazymax/osxcross:${OSXCROSS_VERSION} AS osxcross # go base image to retrieve /usr/local/go FROM ${GO_IMAGE}:${GO_VERSION}-${GO_IMAGE_VARIANT} AS go @@ -203,7 +204,7 @@ RUN --mount=type=bind,source=scripts/pkg-static-build.sh,target=/usr/local/bin/p --mount=type=bind,from=common-scripts,source=fix-cc.sh,target=/usr/local/bin/fix-cc \ --mount=type=bind,from=src,source=/src,target=/usr/local/src/credential-helpers \ --mount=type=bind,from=gocross,source=/usr/local/go,target=/usr/local/go,rw \ - --mount=from=osxsdk,target=/xx-sdk,src=/xx-sdk \ + --mount=type=bind,from=osxcross,src=/osxsdk,target=/xx-sdk \ OUTDIR=/out BUILDDIR=/build SRCDIR=/usr/local/src/credential-helpers pkg-static-build FROM builder-static-$TARGETOS AS builder-static diff --git a/pkg/credential-helpers/scripts/pkg-static-build.sh b/pkg/credential-helpers/scripts/pkg-static-build.sh index c7c9c912..04314425 100755 --- a/pkg/credential-helpers/scripts/pkg-static-build.sh +++ b/pkg/credential-helpers/scripts/pkg-static-build.sh @@ -49,6 +49,7 @@ case "$(xx-info os)" in go install std set -x pushd ${SRCDIR} + export "MACOSX_VERSION_MIN=$(make print-MACOSX_DEPLOYMENT_TARGET)" make build-osxkeychain VERSION="${GENVER_VERSION}" REVISION="${GENVER_COMMIT}" DESTDIR="${BUILDDIR}/${PKG_NAME}" make build-pass VERSION="${GENVER_VERSION}" REVISION="${GENVER_COMMIT}" DESTDIR="${BUILDDIR}/${PKG_NAME}" popd