This repository was archived by the owner on Dec 16, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +16
-22
lines changed Expand file tree Collapse file tree 6 files changed +16
-22
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ RUN apk add --no-cache \
1515 linux-headers \
1616 perl \
1717 cmake \
18+ python3-dev \
1819 pkgconfig \
1920 gcc \
2021 musl-dev \
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ RUN apk add --no-cache \
1515 linux-headers \
1616 perl \
1717 cmake \
18+ python3-dev \
1819 pkgconfig \
1920 gcc \
2021 musl-dev \
@@ -105,10 +106,10 @@ COPY --from=libs /usr/local/ /usr/local/
105106
106107ENV CGO_ENABLED=1
107108RUN export LIBRARY_PATH="/usr/local/$(xx-info triple)" && \
108- export PKG_CONFIG_PATH="/usr/local/$(xx-info triple)/lib/pkgconfig" && \
109- export FLAGS="$(pkg-config --static --libs --cflags libgit2)" && \
110- export CGO_LDFLAGS="${FLAGS} -static" && \
111- xx-go build \
109+ export PKG_CONFIG_PATH="/usr/local/$(xx-info triple)/lib/pkgconfig" && \
110+ export FLAGS="$(pkg-config --static --libs --cflags libgit2)" && \
111+ export CGO_LDFLAGS="${FLAGS} -static" && \
112+ xx-go build \
112113 -ldflags "-s -w" \
113114 -tags 'netgo,osusergo,static_build' \
114115 -o static-test-runner -trimpath main.go
@@ -126,7 +127,7 @@ RUN apk add git
126127
127128WORKDIR /root/smoketest
128129COPY --from=build \
129- /root/smoketest/static-test-runner .
130+ /root/smoketest/static-test-runner .
130131
131132ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
132133
Original file line number Diff line number Diff line change 22
33set -euxo pipefail
44
5- LIBGIT2_URL=" ${LIBGIT2_URL:- https:// github.com/ libgit2/ libgit2/ archive/ refs/ tags/ v1.3.2 .tar.gz} "
5+ LIBGIT2_URL=" ${LIBGIT2_URL:- https:// github.com/ libgit2/ libgit2/ archive/ refs/ tags/ v1.5.0 .tar.gz} "
66
77TARGET_DIR=" ${TARGET_DIR:-/ usr/ local/ $(xx-info triple)} "
88BUILD_ROOT_DIR=" ${BUILD_ROOT_DIR:-/ build} "
@@ -55,11 +55,13 @@ function build_libgit2_only(){
5555 -DCMAKE_C_FLAGS=-fPIC \
5656 -DUSE_SSH:BOOL=OFF \
5757 -DHAVE_LIBSSH2_MEMORY_CREDENTIALS:BOOL=OFF \
58- -DDEPRECATE_HARD:BOOL=ON \
58+ -DDEPRECATE_HARD:BOOL=OFF \
5959 -DUSE_BUNDLED_ZLIB:BOOL=ON \
6060 -DUSE_HTTPS:STRING:BOOL=OFF \
6161 -DREGEX_BACKEND:STRING=builtin \
6262 -DCMAKE_BUILD_TYPE=" RelWithDebInfo" \
63+ -DBUILD_TESTS:BOOL=OFF \
64+ -DPYTHON_EXECUTABLE=" /usr/bin/python3" \
6365 ..
6466
6567 cmake --build . --target install
Original file line number Diff line number Diff line change @@ -2,21 +2,13 @@ module github.com/fluxcd/golang-with-libgit2/tests/sample
22
33go 1.19
44
5- // A temporary fork of git2go was created to enable use
6- // of libgit2 without thread support to fix:
7- // fluxcd/image-automation-controller/#339.
8- //
9- // This can be removed once libgit2/git2go#918 is merged.
10- //
11- // The fork automatically releases new patches based on upstream:
12- // https://github.com/pjbgf/git2go/commit/d72e39cdc20f7fe014ba73072b01ba7b569e9253
13- replace github.com/libgit2/git2go/v33 => github.com/pjbgf/git2go/v33 v33.0.9-nothread-check
5+ replace github.com/libgit2/git2go/v34 => github.com/fluxcd/git2go/v34 v34.0.0
146
157require (
168 github.com/fluxcd/pkg/gittestserver v0.5.2
179 github.com/fluxcd/pkg/ssh v0.3.2
1810 github.com/fluxcd/source-controller v0.24.4
19- github.com/libgit2/git2go/v33 v33 .0.9
11+ github.com/libgit2/git2go/v34 v34 .0.0
2012 golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f
2113)
2214
Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3
3232github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473 /go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4 =
3333github.com/envoyproxy/protoc-gen-validate v0.1.0 /go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c =
3434github.com/evanphx/json-patch v4.12.0+incompatible /go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk =
35+ github.com/fluxcd/git2go/v34 v34.0.0 h1:08PEpdbsLO4sUTvFKuxmt6xBowaqObro9veChBWFwa8 =
36+ github.com/fluxcd/git2go/v34 v34.0.0 /go.mod h1:blVco2jDAw6YTXkErMMqzHLcAjKkwF0aWIRHBqiJkZ0 =
3537github.com/fluxcd/pkg/gittestserver v0.5.2 h1:Tt2g1C2b3DB4OM7ZX9hsj6scPdpnkl0xjH85ZkNvIzA =
3638github.com/fluxcd/pkg/gittestserver v0.5.2 /go.mod h1:QNv2arrHGReWIev8rp3Stg1JMq+xqT/lomSFZ2KfMBI =
3739github.com/fluxcd/pkg/ssh v0.3.2 h1:HZlDF6Qu4yplsU4Tisv6hxsRIbIOwwr7rKus8/Q/Dn0 =
@@ -148,8 +150,6 @@ github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGV
148150github.com/onsi/gomega v1.7.1 /go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY =
149151github.com/onsi/gomega v1.10.1 /go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo =
150152github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw =
151- github.com/pjbgf/git2go/v33 v33.0.9-nothread-check h1:gSK7FaLECIM3VSuBOAsVZQtWd+51iTB5lv9RyxhOYMk =
152- github.com/pjbgf/git2go/v33 v33.0.9-nothread-check /go.mod h1:KdpqkU+6+++4oHna/MIOgx4GCQ92IPCdpVRMRI80J+4 =
153153github.com/pkg/errors v0.8.1 /go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0 =
154154github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4 =
155155github.com/pkg/errors v0.9.1 /go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0 =
Original file line number Diff line number Diff line change @@ -18,9 +18,7 @@ import (
1818 "hash"
1919 "time"
2020
21- // git2go must be aligned with libgit2 version:
22- // https://github.com/libgit2/git2go#which-go-version-to-use
23- git2go "github.com/libgit2/git2go/v33"
21+ git2go "github.com/libgit2/git2go/v34"
2422
2523 "github.com/fluxcd/pkg/gittestserver"
2624 "github.com/fluxcd/pkg/ssh"
You can’t perform that action at this time.
0 commit comments