From af0b5e6c3d906a23a200acd9d4dcf9c79e4d8c20 Mon Sep 17 00:00:00 2001 From: Paulo Gomes Date: Wed, 15 Dec 2021 17:19:54 +0000 Subject: [PATCH 1/5] Revert default git2go and libgit2 versions Signed-off-by: Paulo Gomes --- Makefile | 2 +- hack/Makefile | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 8933ba9..7ed4e3f 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ STATIC_TEST_TAG := test PLATFORMS ?= linux/amd64,linux/arm/v7,linux/arm64 BUILD_ARGS ?= -GIT2GO_TAG ?= v33.0.1 +GIT2GO_TAG ?= v31.6.1 .PHONY: build build: diff --git a/hack/Makefile b/hack/Makefile index 79a70f6..300dc0c 100644 --- a/hack/Makefile +++ b/hack/Makefile @@ -15,8 +15,8 @@ INSTALL_LIBDIR ?= $(INSTALL_PREFIX)/lib/$(shell xx-info triple) endif BUILD_TYPE ?= "RelWithDebInfo" FLAGS ?= -USE_HTTPS ?= OFF -USE_SSH ?= OFF +USE_HTTPS ?= OpenSSL +USE_SSH ?= ON USE_BUNDLED_ZLIB ?= OFF BUILD_SHARED_LIBS ?= ON @@ -24,7 +24,7 @@ BUILD_SHARED_LIBS ?= ON CMAKE_VERSION ?= 3.21.3 # Libgit2 version to be compiled and installed. -LIBGIT2_VERSION ?= 1.3.0 +LIBGIT2_VERSION ?= 1.1.1 # In some scenarios libgit2 needs to be checked out to a specific commit. # This takes presidence over LIBGIT_VERSION if defined. # Ref: https://github.com/libgit2/git2go/issues/834 From e956d926ecf81df499a3c7b913c8bb65a3159f91 Mon Sep 17 00:00:00 2001 From: Paulo Gomes Date: Wed, 15 Dec 2021 17:20:25 +0000 Subject: [PATCH 2/5] Make 'USE_BUNDLED_ZLIB' configurable Signed-off-by: Paulo Gomes --- hack/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/Makefile b/hack/Makefile index 300dc0c..18cabeb 100644 --- a/hack/Makefile +++ b/hack/Makefile @@ -127,7 +127,7 @@ $(LIBGIT2): -DBUILD_CLAR:BOOL:BOOL=OFF \ -DTHREADSAFE:BOOL=ON \ -DBUILD_SHARED_LIBS:BOOL=$(BUILD_SHARED_LIBS) \ - -DUSE_BUNDLED_ZLIB:BOOL=OFF \ + -DUSE_BUNDLED_ZLIB:BOOL=$(USE_BUNDLED_ZLIB) \ -DUSE_HTTP_PARSER:STRING=builtin \ -DREGEX_BACKEND:STRING=builtin \ -DUSE_HTTPS:STRING=$(USE_HTTPS) \ From db40a1b444389c361f72c021045248b1ced189e9 Mon Sep 17 00:00:00 2001 From: Stefan Prodan Date: Sat, 4 Dec 2021 11:25:44 +0200 Subject: [PATCH 3/5] Delete dockerignore as it breaks in CI Signed-off-by: Stefan Prodan --- .dockerignore | 2 -- .github/workflows/build.yaml | 4 +++- Dockerfile | 2 +- Dockerfile.test | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) delete mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index a116ad4..0000000 --- a/.dockerignore +++ /dev/null @@ -1,2 +0,0 @@ -**/** -!hack/ diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c266cc9..c2b7d63 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -23,8 +23,9 @@ jobs: - 5000:5000 steps: - name: Checkout - id: checkout uses: actions/checkout@v2 + - name: Unshallow + run: git fetch --prune --unshallow - name: Set up QEMU id: qemu uses: docker/setup-qemu-action@v1 @@ -54,6 +55,7 @@ jobs: key: ${{ runner.os }}-buildx-ghcache-${{ github.sha }} restore-keys: | ${{ runner.os }}-buildx-ghcache- + - run: cat ./hack/Makefile - name: Build candidate image id: build_candidate uses: docker/build-push-action@v2 diff --git a/Dockerfile b/Dockerfile index ae5b0f9..42f068d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,3 @@ FROM scratch -COPY hack/Makefile Makefile +COPY ./hack/Makefile Makefile diff --git a/Dockerfile.test b/Dockerfile.test index 2930eab..8fd0f05 100644 --- a/Dockerfile.test +++ b/Dockerfile.test @@ -12,7 +12,7 @@ FROM gostable AS go-linux FROM go-${TARGETOS} AS build-base-bullseye COPY --from=xx / / -COPY hack/Makefile /libgit2/Makefile +COPY ./hack/Makefile /libgit2/Makefile RUN make -C /libgit2/ cmake From 4e0f275c1b9febd6f3d2f23b98bd67a0eae6ef47 Mon Sep 17 00:00:00 2001 From: Stefan Prodan Date: Sat, 4 Dec 2021 11:15:11 +0200 Subject: [PATCH 4/5] Update Go to v1.17.3 Signed-off-by: Stefan Prodan --- Dockerfile.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.test b/Dockerfile.test index 8fd0f05..9ab5b7a 100644 --- a/Dockerfile.test +++ b/Dockerfile.test @@ -1,6 +1,6 @@ # This Dockerfile tests the hack/Makefile output against git2go. ARG BASE_VARIANT=bullseye -ARG GO_VERSION=1.16.8 +ARG GO_VERSION=1.17.3 ARG XX_VERSION=1.0.0-rc.2 FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx From cbe6e79ed828d9b2da23199d69e35d1696c09e7c Mon Sep 17 00:00:00 2001 From: Paulo Gomes Date: Wed, 15 Dec 2021 17:59:33 +0000 Subject: [PATCH 5/5] Update GO_VERSION to 1.17.5 Signed-off-by: Paulo Gomes --- Dockerfile.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.test b/Dockerfile.test index 9ab5b7a..0c3c239 100644 --- a/Dockerfile.test +++ b/Dockerfile.test @@ -1,6 +1,6 @@ # This Dockerfile tests the hack/Makefile output against git2go. ARG BASE_VARIANT=bullseye -ARG GO_VERSION=1.17.3 +ARG GO_VERSION=1.17.5 ARG XX_VERSION=1.0.0-rc.2 FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx