Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

Commit 2f0e341

Browse files
author
Paulo Gomes
authored
Merge pull request #40 from pjbgf/bump-libgit2-1.5.0
Bump libgit2 to 1.5.0
2 parents 7119130 + 68507c0 commit 2f0e341

File tree

6 files changed

+16
-22
lines changed

6 files changed

+16
-22
lines changed

Dockerfile.libgit2-only

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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 \

Dockerfile.test-libgit2-only

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff 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

106107
ENV CGO_ENABLED=1
107108
RUN 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

127128
WORKDIR /root/smoketest
128129
COPY --from=build \
129-
/root/smoketest/static-test-runner .
130+
/root/smoketest/static-test-runner .
130131

131132
ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
132133

hack/static.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -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

77
TARGET_DIR="${TARGET_DIR:-/usr/local/$(xx-info triple)}"
88
BUILD_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

tests/smoketest/go.mod

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,13 @@ module github.com/fluxcd/golang-with-libgit2/tests/sample
22

33
go 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

157
require (
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

tests/smoketest/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3
3232
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
3333
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
3434
github.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=
3537
github.com/fluxcd/pkg/gittestserver v0.5.2 h1:Tt2g1C2b3DB4OM7ZX9hsj6scPdpnkl0xjH85ZkNvIzA=
3638
github.com/fluxcd/pkg/gittestserver v0.5.2/go.mod h1:QNv2arrHGReWIev8rp3Stg1JMq+xqT/lomSFZ2KfMBI=
3739
github.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
148150
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
149151
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
150152
github.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=
153153
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
154154
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
155155
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=

tests/smoketest/main.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff 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"

0 commit comments

Comments
 (0)