From a10083b2084627ee99b7ffa7691a1d4c642bb2ba Mon Sep 17 00:00:00 2001 From: Milan Bouchet-Valat Date: Sun, 28 Nov 2021 22:53:00 +0100 Subject: [PATCH 1/9] Upgrade libgit2 to 1.3.0 --- L/LibGit2/build_tarballs.jl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/L/LibGit2/build_tarballs.jl b/L/LibGit2/build_tarballs.jl index 0d728494934..13eabbfe65d 100644 --- a/L/LibGit2/build_tarballs.jl +++ b/L/LibGit2/build_tarballs.jl @@ -1,12 +1,12 @@ using BinaryBuilder name = "LibGit2" -version = v"1.2.3" +version = v"1.3.0" # Collection of sources required to build libgit2 sources = [ GitSource("https://github.com/libgit2/libgit2.git", - "7f4fa178629d559c037a1f72f79f79af9c1ef8ce"), + "b7bad55e4bb0a285b073ba5e02b01d3f522fc95d"), DirectorySource("./bundled"), ] @@ -16,7 +16,6 @@ cd $WORKSPACE/srcdir/libgit2*/ atomic_patch -p1 $WORKSPACE/srcdir/patches/libgit2-agent-nonfatal.patch atomic_patch -p1 $WORKSPACE/srcdir/patches/libgit2-hostkey.patch -atomic_patch -p1 $WORKSPACE/srcdir/patches/libgit2-continue-zlib.patch BUILD_FLAGS=( -DCMAKE_BUILD_TYPE=Release @@ -64,5 +63,5 @@ dependencies = [ ] # Build the tarballs, and possibly a `build.jl` as well. -build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.6") +build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.8") From a54f928003da112cac7af5ae6f38f6c767edbc2b Mon Sep 17 00:00:00 2001 From: Milan Bouchet-Valat Date: Sun, 28 Nov 2021 22:53:30 +0100 Subject: [PATCH 2/9] Delete libgit2-continue-zlib.patch --- .../patches/libgit2-continue-zlib.patch | 43 ------------------- 1 file changed, 43 deletions(-) delete mode 100644 L/LibGit2/bundled/patches/libgit2-continue-zlib.patch diff --git a/L/LibGit2/bundled/patches/libgit2-continue-zlib.patch b/L/LibGit2/bundled/patches/libgit2-continue-zlib.patch deleted file mode 100644 index 023b8265187..00000000000 --- a/L/LibGit2/bundled/patches/libgit2-continue-zlib.patch +++ /dev/null @@ -1,43 +0,0 @@ -commit 99ddda527b0e1964898c2bc9fbc23ea7afe96ae5 -Author: Edward Thomson -Date: Tue Dec 15 23:03:03 2020 +0000 - - pack: continue zlib while we can make progress - - Continue the zlib stream as long as we can make progress; stop when we - stop getting output _or_ when zlib stops taking input from us. - - (cherry picked from commit 93f61c5a9f638e76189cef2dbde7839a9af5ff54) - -diff --git a/src/pack.c b/src/pack.c -index 1b5cf670f..1a208a051 100644 ---- a/src/pack.c -+++ b/src/pack.c -@@ -841,7 +841,7 @@ static int packfile_unpack_compressed( - - do { - size_t bytes = buffer_len - total; -- unsigned int window_len; -+ unsigned int window_len, consumed; - unsigned char *in; - - if ((in = pack_window_open(p, mwindow, *position, &window_len)) == NULL) { -@@ -857,10 +857,15 @@ static int packfile_unpack_compressed( - - git_mwindow_close(mwindow); - -- if (!bytes) -- break; -+ consumed = window_len - (unsigned int)zstream.in_len; -+ -+ if (!bytes && !consumed) { -+ git_error_set(GIT_ERROR_ZLIB, "error inflating zlib stream"); -+ error = -1; -+ goto out; -+ } - -- *position += window_len - zstream.in_len; -+ *position += consumed; - total += bytes; - } while (!git_zstream_eos(&zstream)); - From 30b1d8e6a8232f3db3c291b469a28f56321a22f8 Mon Sep 17 00:00:00 2001 From: Milan Bouchet-Valat Date: Sun, 28 Nov 2021 23:01:42 +0100 Subject: [PATCH 3/9] Update libgit2-hostkey.patch --- .../bundled/patches/libgit2-hostkey.patch | 44 +------------------ 1 file changed, 2 insertions(+), 42 deletions(-) diff --git a/L/LibGit2/bundled/patches/libgit2-hostkey.patch b/L/LibGit2/bundled/patches/libgit2-hostkey.patch index f07d4d1e0a1..167222b1c3e 100644 --- a/L/LibGit2/bundled/patches/libgit2-hostkey.patch +++ b/L/LibGit2/bundled/patches/libgit2-hostkey.patch @@ -1,48 +1,8 @@ -diff --git a/include/git2/cert.h b/include/git2/cert.h -index e8cd2d180..54293cd31 100644 ---- a/include/git2/cert.h -+++ b/include/git2/cert.h -@@ -111,6 +111,14 @@ typedef struct { - * have the SHA-256 hash of the hostkey. - */ - unsigned char hash_sha256[32]; -+ -+ /** -+ * Hostkey itself. -+ */ -+ int hostkey_type; -+ size_t hostkey_len; -+ unsigned char hostkey[1024]; -+ - } git_cert_hostkey; - - /** diff --git a/src/transports/ssh.c b/src/transports/ssh.c -index f4ed05bb1..ec6366a5f 100644 +index 471c3273ed..5ed7278ed6 100644 --- a/src/transports/ssh.c +++ b/src/transports/ssh.c -@@ -523,6 +523,7 @@ static int _git_ssh_setup_conn( - git_credential *cred = NULL; - LIBSSH2_SESSION* session=NULL; - LIBSSH2_CHANNEL* channel=NULL; -+ char *host_and_port; - - t->current_stream = NULL; - -@@ -566,6 +567,12 @@ post_extract: - - cert.parent.cert_type = GIT_CERT_HOSTKEY_LIBSSH2; - -+ key = libssh2_session_hostkey(session, &cert.hostkey_len, &cert.hostkey_type); -+ bzero(&cert.hostkey, sizeof(cert.hostkey)); -+ if (cert.hostkey_len > sizeof(cert.hostkey)) -+ cert.hostkey_len = sizeof(cert.hostkey); -+ memcpy(&cert.hostkey, key, cert.hostkey_len); -+ - #ifdef LIBSSH2_HOSTKEY_HASH_SHA256 - key = libssh2_hostkey_hash(session, LIBSSH2_HOSTKEY_HASH_SHA256); - if (key != NULL) { -@@ -597,7 +604,15 @@ post_extract: +@@ -636,7 +636,15 @@ post_extract: cert_ptr = &cert; From b229ceef001e6b809bfb7f2bfc755510cd8d4008 Mon Sep 17 00:00:00 2001 From: Milan Bouchet-Valat Date: Sun, 28 Nov 2021 23:07:59 +0100 Subject: [PATCH 4/9] Update libgit2-hostkey.patch --- L/LibGit2/bundled/patches/libgit2-hostkey.patch | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/L/LibGit2/bundled/patches/libgit2-hostkey.patch b/L/LibGit2/bundled/patches/libgit2-hostkey.patch index 167222b1c3e..8be5e5cc92e 100644 --- a/L/LibGit2/bundled/patches/libgit2-hostkey.patch +++ b/L/LibGit2/bundled/patches/libgit2-hostkey.patch @@ -1,8 +1,16 @@ diff --git a/src/transports/ssh.c b/src/transports/ssh.c -index 471c3273ed..5ed7278ed6 100644 +index 471c3273ed..32189d0979 100644 --- a/src/transports/ssh.c +++ b/src/transports/ssh.c -@@ -636,7 +636,15 @@ post_extract: +@@ -525,6 +525,7 @@ static int _git_ssh_setup_conn( + git_credential *cred = NULL; + LIBSSH2_SESSION *session=NULL; + LIBSSH2_CHANNEL *channel=NULL; ++ char *host_and_port; + + t->current_stream = NULL; + +@@ -636,7 +637,15 @@ post_extract: cert_ptr = &cert; From 99a1e63a7d1b5cb6733fd45c4ef989bf08d879ee Mon Sep 17 00:00:00 2001 From: "Viral B. Shah" Date: Sun, 30 Jan 2022 14:16:04 -0500 Subject: [PATCH 5/9] Pin MbedTLS to 2.28 --- L/LibGit2/build_tarballs.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/L/LibGit2/build_tarballs.jl b/L/LibGit2/build_tarballs.jl index 13eabbfe65d..e2785557848 100644 --- a/L/LibGit2/build_tarballs.jl +++ b/L/LibGit2/build_tarballs.jl @@ -58,7 +58,7 @@ products = [ # Dependencies that must be installed before this package can be built dependencies = [ - Dependency("MbedTLS_jll", v"2.24.0"), + Dependency("MbedTLS_jll", v"2.28.0"), Dependency("LibSSH2_jll"), ] From e235fa6bb3a1d32458cd525d20a6a260b0036cd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Sun, 30 Jan 2022 19:18:54 +0000 Subject: [PATCH 6/9] Update L/LibGit2/build_tarballs.jl --- L/LibGit2/build_tarballs.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/L/LibGit2/build_tarballs.jl b/L/LibGit2/build_tarballs.jl index e2785557848..261e24964bf 100644 --- a/L/LibGit2/build_tarballs.jl +++ b/L/LibGit2/build_tarballs.jl @@ -58,7 +58,7 @@ products = [ # Dependencies that must be installed before this package can be built dependencies = [ - Dependency("MbedTLS_jll", v"2.28.0"), + Dependency("MbedTLS_jll"; compat="~2.28.0"), Dependency("LibSSH2_jll"), ] From 2e4276df59e2f352f0b4343a3112ba1ebd2a744b Mon Sep 17 00:00:00 2001 From: "Viral B. Shah" Date: Mon, 7 Feb 2022 13:34:56 -0500 Subject: [PATCH 7/9] Update build_tarballs.jl --- L/LibGit2/build_tarballs.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/L/LibGit2/build_tarballs.jl b/L/LibGit2/build_tarballs.jl index 261e24964bf..8312a99e3ec 100644 --- a/L/LibGit2/build_tarballs.jl +++ b/L/LibGit2/build_tarballs.jl @@ -59,7 +59,7 @@ products = [ # Dependencies that must be installed before this package can be built dependencies = [ Dependency("MbedTLS_jll"; compat="~2.28.0"), - Dependency("LibSSH2_jll"), + Dependency("LibSSH2_jll"; compat="~1.10.1"), ] # Build the tarballs, and possibly a `build.jl` as well. From b1cb2ebae8fa3aac0fe4c29ca87d9b6265ce9fc0 Mon Sep 17 00:00:00 2001 From: "Viral B. Shah" Date: Mon, 7 Feb 2022 13:39:40 -0500 Subject: [PATCH 8/9] Update build_tarballs.jl --- L/LibGit2/build_tarballs.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/L/LibGit2/build_tarballs.jl b/L/LibGit2/build_tarballs.jl index 8312a99e3ec..7ec231492b7 100644 --- a/L/LibGit2/build_tarballs.jl +++ b/L/LibGit2/build_tarballs.jl @@ -49,7 +49,7 @@ make install # These are the platforms we will build for by default, unless further # platforms are passed in on the command line -platforms = supported_platforms(;experimental=true) +platforms = supported_platforms() # The products that we will ensure are always built products = [ From 38702d6f0d271fd8115ad4ba32c695492606e0fd Mon Sep 17 00:00:00 2001 From: "Viral B. Shah" Date: Mon, 7 Feb 2022 16:03:10 -0500 Subject: [PATCH 9/9] Update L/LibGit2/build_tarballs.jl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Mosè Giordano --- L/LibGit2/build_tarballs.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/L/LibGit2/build_tarballs.jl b/L/LibGit2/build_tarballs.jl index 7ec231492b7..a7c5fef898f 100644 --- a/L/LibGit2/build_tarballs.jl +++ b/L/LibGit2/build_tarballs.jl @@ -59,7 +59,7 @@ products = [ # Dependencies that must be installed before this package can be built dependencies = [ Dependency("MbedTLS_jll"; compat="~2.28.0"), - Dependency("LibSSH2_jll"; compat="~1.10.1"), + Dependency("LibSSH2_jll"; compat="1.10.1"), ] # Build the tarballs, and possibly a `build.jl` as well.