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

Commit d1182f7

Browse files
committed
Update libgit2 to v1.3.0
This commit updates `libgit2` to `v1.3.0`, and the `git2go` version which is being tested against to `v33.0.1`. The default build configuration has changed to no longer depend on OpenSSL or LibSSH2, as native Go transport is now working for `git2go`. Signed-off-by: Hidde Beydals <hello@hidde.co>
1 parent 170222b commit d1182f7

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ STATIC_TEST_TAG := test
55
PLATFORMS ?= linux/amd64,linux/arm/v7,linux/arm64
66
BUILD_ARGS ?=
77

8-
GIT2GO_TAG ?= v31.6.1
8+
GIT2GO_TAG ?= v33.0.1
99

1010
.PHONY: build
1111
build:

hack/Makefile

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ INSTALL_LIBDIR ?= $(INSTALL_PREFIX)/lib/$(shell xx-info triple)
1515
endif
1616
BUILD_TYPE ?= "RelWithDebInfo"
1717
FLAGS ?=
18-
USE_HTTPS ?= OpenSSL
19-
USE_SSH ?= ON
18+
USE_HTTPS ?= OFF
19+
USE_SSH ?= OFF
2020

2121
# Cmake version to be installed.
2222
CMAKE_VERSION ?= 3.21.3
2323

2424
# Libgit2 version to be compiled and installed.
25-
LIBGIT2_VERSION ?= 1.1.1
25+
LIBGIT2_VERSION ?= 1.3.0
2626
# In some scenarios libgit2 needs to be checked out to a specific commit.
2727
# This takes presidence over LIBGIT_VERSION if defined.
2828
# Ref: https://github.com/libgit2/git2go/issues/834
@@ -65,19 +65,27 @@ ifeq (debian,$(XX_VENDOR))
6565
# certain key formats).
6666
# Ref: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=668271
6767
# Ref: https://github.com/ARMmbed/mbedtls/issues/2452#issuecomment-802683144
68+
DEPENDENCIES = zlib1g-dev
69+
ifneq ("OFF",$(USE_HTTPS))
70+
DEPENDENCIES += libssl-dev
71+
endif
72+
ifneq ("OFF",$(USE_SSH))
73+
DEPENDENCIES += libssh2-1-dev
74+
endif
6875
dependencies:
6976
set -e; \
7077
echo "deb http://deb.debian.org/debian sid main" > /etc/apt/sources.list.d/sid.list \
7178
&& echo "deb-src http://deb.debian.org/debian sid main" /etc/apt/sources.list.d/sid.list \
7279
&& xx-apt update \
73-
&& xx-apt -t sid install --no-install-recommends -y zlib1g-dev libssl-dev libssh2-1-dev
80+
&& xx-apt -t sid install --no-install-recommends -y $(DEPENDENCIES)
7481
endif
7582
.PHONY: dependencies
7683

7784
libgit2: $(LIBGIT2)
7885
.PHONY: libgit2
7986

8087
ifdef HAS_BREW
88+
ifneq ("OFF",$(USE_HTTPS))
8189
HAS_OPENSSL := $(shell brew --prefix openssl@1.1)
8290
# NB: the OPENSSL_LDFLAGS ensures the path is included in the libgit2.pc
8391
# file. As a standard brew installation doesn't appear to be system wide
@@ -87,11 +95,14 @@ ifdef HAS_OPENSSL
8795
PKG_CONFIG_PATH := $(PKG_CONFIG_PATH):$(HAS_OPENSSL)/lib/pkgconfig
8896
FLAGS += -DOPENSSL_LDFLAGS:STRING='-L $(HAS_OPENSSL)/lib'
8997
endif
98+
endif
99+
ifneq ("OFF",$(USE_SSH))
90100
HAS_LIBSSH2 := $(shell brew --prefix libssh2)
91101
ifdef HAS_LIBSSH2
92102
PKG_CONFIG_PATH := $(PKG_CONFIG_PATH):$(HAS_LIBSSH2)/lib/pkgconfig
93103
endif
94104
endif
105+
endif
95106

96107
$(LIBGIT2):
97108
set -e; \

0 commit comments

Comments
 (0)