From 9ac23506d5562f37733a26f7c534f770a1c2bc81 Mon Sep 17 00:00:00 2001 From: Audrey Dutcher Date: Sat, 11 Jan 2025 18:57:29 -0700 Subject: [PATCH 01/14] libgit2: 1.8.4 -> 1.9.0 --- pkgs/development/libraries/libgit2/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/libgit2/default.nix b/pkgs/development/libraries/libgit2/default.nix index 72c52ea899eb2..354424444f65b 100644 --- a/pkgs/development/libraries/libgit2/default.nix +++ b/pkgs/development/libraries/libgit2/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "libgit2"; - version = "1.8.4"; + version = "1.9.0"; # also check the following packages for updates: python3Packages.pygit2 and libgit2-glib outputs = ["lib" "dev" "out"]; @@ -31,12 +31,12 @@ stdenv.mkDerivation (finalAttrs: { owner = "libgit2"; repo = "libgit2"; rev = "v${finalAttrs.version}"; - hash = "sha256-AVhDq9nC2ccwFYJmejr0hmnyV4AxZLamuHktYPlkzUs="; + hash = "sha256-v32yGMo5oFEl6HUdg8czCsCLDL+sy9PPT0AEWmKxUhk="; }; cmakeFlags = [ "-DREGEX_BACKEND=pcre2" - "-DUSE_HTTP_PARSER=system" + "-DUSE_HTTP_PARSER=llhttp" "-DUSE_SSH=ON" (lib.cmakeBool "USE_GSSAPI" withGssapi) "-DBUILD_SHARED_LIBS=${if staticBuild then "OFF" else "ON"}" @@ -44,6 +44,9 @@ stdenv.mkDerivation (finalAttrs: { "-DDLLTOOL=${stdenv.cc.bintools.targetPrefix}dlltool" # For ws2_32, refered to by a `*.pc` file "-DCMAKE_LIBRARY_PATH=${stdenv.cc.libc}/lib" + ] ++ lib.optionals stdenv.hostPlatform.isOpenBSD [ + # openbsd headers fail with default c90 + "-DCMAKE_C_STANDARD=99" ]; nativeBuildInputs = [ cmake python3 pkg-config ]; From 396775bc8df7d6c9043009438928e6aa53b47d69 Mon Sep 17 00:00:00 2001 From: Audrey Dutcher Date: Sat, 11 Jan 2025 18:58:08 -0700 Subject: [PATCH 02/14] python3Packages.pygit2: 1.16.0 -> 1.17.0 --- .../python-modules/pygit2/default.nix | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/pkgs/development/python-modules/pygit2/default.nix b/pkgs/development/python-modules/pygit2/default.nix index 9f0e68834fc1d..30630b83e3b41 100644 --- a/pkgs/development/python-modules/pygit2/default.nix +++ b/pkgs/development/python-modules/pygit2/default.nix @@ -6,7 +6,6 @@ cached-property, cffi, fetchPypi, - fetchpatch, isPyPy, libgit2, pycparser, @@ -17,29 +16,16 @@ buildPythonPackage rec { pname = "pygit2"; - version = "1.16.0"; + version = "1.17.0"; pyproject = true; disabled = pythonOlder "3.9"; src = fetchPypi { inherit pname version; - hash = "sha256-eymmeWuqFfyJ1EOsjVF3VBHZseWwbcQNRYxWyFdrSKI="; + hash = "sha256-+ivAULLC0+c7VNbVQceSF4Vho0TwfkCfUy1buXrHuJQ="; }; - patches = [ - # fix for GCC 14 - (fetchpatch { - url = "https://github.com/libgit2/pygit2/commit/eba710e45bb40e18641c6531394bb46631e7f295.patch"; - hash = "sha256-GFFzGVd/9+AcwicwOtBghhonijMp08svXTUZ/4/LmtI="; - }) - # temp fix for Python 3.13 until next release after 1.16.0 - (fetchpatch { - url = "https://github.com/libgit2/pygit2/commit/7f143e1c5beec01ec3429aa4db12435ac02977d3.patch"; - hash = "sha256-2SiFFPWVVo9urKRu64AejjTZMoXo2r+v1OwEIF+AzNo="; - }) - ]; - preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' export DYLD_LIBRARY_PATH="${libgit2}/lib" ''; From dbb5895438288b947d3989b5eb1563d0efc4c4df Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 22 Jan 2025 04:07:42 +0000 Subject: [PATCH 03/14] libgit2-glib: add patch for libgit2 1.9.0 --- .../li/libgit2-glib/libgit2-1.9.0.patch | 153 ++++++++++++++++++ pkgs/by-name/li/libgit2-glib/package.nix | 10 +- 2 files changed, 157 insertions(+), 6 deletions(-) create mode 100644 pkgs/by-name/li/libgit2-glib/libgit2-1.9.0.patch diff --git a/pkgs/by-name/li/libgit2-glib/libgit2-1.9.0.patch b/pkgs/by-name/li/libgit2-glib/libgit2-1.9.0.patch new file mode 100644 index 0000000000000..e4d8f8f1915a6 --- /dev/null +++ b/pkgs/by-name/li/libgit2-glib/libgit2-1.9.0.patch @@ -0,0 +1,153 @@ +From 46bad01581bca5bc64f6499eb1222ff067721a63 Mon Sep 17 00:00:00 2001 +From: Dominique Leuenberger +Date: Fri, 5 Apr 2024 10:28:16 +0200 +Subject: [PATCH 1/2] build: Fix build against, and require, libgit2 1.8.0 + +--- + libgit2-glib/ggit-clone-options.c | 1 + + libgit2-glib/ggit-cred-ssh-interactive.c | 2 +- + libgit2-glib/ggit-remote-callbacks.h | 1 + + libgit2-glib/ggit-repository.c | 4 ++-- + libgit2-glib/ggit-types.h | 3 ++- + meson.build | 2 +- + 6 files changed, 8 insertions(+), 5 deletions(-) + +diff --git a/libgit2-glib/ggit-clone-options.c b/libgit2-glib/ggit-clone-options.c +index b47fdb1..30c7d86 100644 +--- a/libgit2-glib/ggit-clone-options.c ++++ b/libgit2-glib/ggit-clone-options.c +@@ -19,6 +19,7 @@ + */ + + #include ++#include + #include + + #include "ggit-clone-options.h" +diff --git a/libgit2-glib/ggit-cred-ssh-interactive.c b/libgit2-glib/ggit-cred-ssh-interactive.c +index 4f60f8b..0bdca95 100644 +--- a/libgit2-glib/ggit-cred-ssh-interactive.c ++++ b/libgit2-glib/ggit-cred-ssh-interactive.c +@@ -191,7 +191,7 @@ callback_wrapper (const char *name, + { + gchar *text; + +- text = g_strndup (prompts[i].text, prompts[i].length); ++ text = g_strndup ((const gchar *)prompts[i].text, prompts[i].length); + + wprompts[i] = ggit_cred_ssh_interactive_prompt_new (wname, + winstruction, +diff --git a/libgit2-glib/ggit-remote-callbacks.h b/libgit2-glib/ggit-remote-callbacks.h +index 3005ff4..2340712 100644 +--- a/libgit2-glib/ggit-remote-callbacks.h ++++ b/libgit2-glib/ggit-remote-callbacks.h +@@ -24,6 +24,7 @@ + + #include + #include ++#include + #include + + G_BEGIN_DECLS +diff --git a/libgit2-glib/ggit-repository.c b/libgit2-glib/ggit-repository.c +index bf099f6..936c6fc 100644 +--- a/libgit2-glib/ggit-repository.c ++++ b/libgit2-glib/ggit-repository.c +@@ -3182,7 +3182,7 @@ ggit_repository_create_commit (GgitRepository *repository, + message, + _ggit_native_get (tree), + parent_count, +- (const git_commit **)parents_native); ++ (gpointer)parents_native); + + g_free (parents_native); + +@@ -3323,7 +3323,7 @@ ggit_repository_create_commit_buffer(GgitRepository *repository, + message, + _ggit_tree_get_tree (tree), + parent_count, +- (git_commit const **)parents_native); ++ (gpointer)parents_native); + + g_free (parents_native); + +diff --git a/libgit2-glib/ggit-types.h b/libgit2-glib/ggit-types.h +index 7e28975..2a2ed99 100644 +--- a/libgit2-glib/ggit-types.h ++++ b/libgit2-glib/ggit-types.h +@@ -355,7 +355,8 @@ typedef enum + GGIT_CONFIG_LEVEL_XDG = 3, + GGIT_CONFIG_LEVEL_GLOBAL = 4, + GGIT_CONFIG_LEVEL_LOCAL = 5, +- GGIT_CONFIG_LEVEL_APP = 6, ++ GGIT_CONFIG_LEVEL_WORKTREE = 6, ++ GGIT_CONFIG_LEVEL_APP = 7, + GGIT_CONFIG_LEVEL_HIGHEST = -1 + } GgitConfigLevel; + +diff --git a/meson.build b/meson.build +index e54a8b4..c21107d 100644 +--- a/meson.build ++++ b/meson.build +@@ -126,7 +126,7 @@ glib_dep = dependency('glib-2.0', version: '>=' + glib_req) + gobject_dep = dependency('gobject-2.0', version: '>=' + glib_req) + gio_dep = dependency('gio-2.0', version: '>=' + glib_req) + +-libgit2_dep = dependency('libgit2', version: '>= 0.25.0') ++libgit2_dep = dependency('libgit2', version: '>= 1.8.0') + + # XXX: Not nice, but probably our best option + enable_gir = get_option('introspection') and find_program('g-ir-scanner', required: false).found() +-- +GitLab + + +From 93685d4297e425af67ac6888d6b66dfbcd4b95c8 Mon Sep 17 00:00:00 2001 +From: Rui Chen +Date: Mon, 13 Jan 2025 21:23:50 -0500 +Subject: [PATCH 2/2] chore: support libgit2 1.9 + +Signed-off-by: Rui Chen +--- + libgit2-glib/ggit-types.h | 4 ++-- + meson.build | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/libgit2-glib/ggit-types.h b/libgit2-glib/ggit-types.h +index 2a2ed99..184c3e6 100644 +--- a/libgit2-glib/ggit-types.h ++++ b/libgit2-glib/ggit-types.h +@@ -990,8 +990,7 @@ typedef enum + + typedef enum + { +- GGIT_CHECKOUT_NONE = 0, +- GGIT_CHECKOUT_SAFE = (1u << 0), ++ GGIT_CHECKOUT_SAFE = 0, + GGIT_CHECKOUT_FORCE = (1u << 1), + GGIT_CHECKOUT_RECREATE_MISSING = (1u << 2), + GGIT_CHECKOUT_ALLOW_CONFLICTS = (1u << 4), +@@ -1010,6 +1009,7 @@ typedef enum + GGIT_CHECKOUT_CONFLICT_STYLE_DIFF3 = (1u << 21), + GGIT_CHECKOUT_DONT_REMOVE_EXISTING = (1u << 22), + GGIT_CHECKOUT_DONT_WRITE_INDEX = (1u << 23), ++ GGIT_CHECKOUT_NONE = (1u << 30), + GGIT_CHECKOUT_UPDATE_SUBMODULES = (1u << 16), + GGIT_CHECKOUT_UPDATE_SUBMODULES_IF_CHANGED = (1u << 17) + } GgitCheckoutStrategy; +diff --git a/meson.build b/meson.build +index c21107d..9cd26f8 100644 +--- a/meson.build ++++ b/meson.build +@@ -126,7 +126,7 @@ glib_dep = dependency('glib-2.0', version: '>=' + glib_req) + gobject_dep = dependency('gobject-2.0', version: '>=' + glib_req) + gio_dep = dependency('gio-2.0', version: '>=' + glib_req) + +-libgit2_dep = dependency('libgit2', version: '>= 1.8.0') ++libgit2_dep = dependency('libgit2', version: '>= 1.9.0') + + # XXX: Not nice, but probably our best option + enable_gir = get_option('introspection') and find_program('g-ir-scanner', required: false).found() +-- +GitLab + diff --git a/pkgs/by-name/li/libgit2-glib/package.nix b/pkgs/by-name/li/libgit2-glib/package.nix index aad8fec365cde..0cf43dd934298 100644 --- a/pkgs/by-name/li/libgit2-glib/package.nix +++ b/pkgs/by-name/li/libgit2-glib/package.nix @@ -33,12 +33,10 @@ stdenv.mkDerivation rec { }; patches = [ - (fetchpatch { - name = "support-libgit2-1.8.patch"; - # https://gitlab.gnome.org/GNOME/libgit2-glib/-/merge_requests/40 - url = "https://gitlab.gnome.org/GNOME/libgit2-glib/-/commit/a76fdf96c3af9ce9d21a3985c4be8a1aa6eea661.patch"; - hash = "sha256-ysU8pAixyftensfEC9bE0RUFMPMei0jYT26WKN5uOFE="; - }) + # See: + # * + # * + ./libgit2-1.9.0.patch ]; nativeBuildInputs = [ From 8d1b72de7e150e4acbcca0da4faed3ec4140f50e Mon Sep 17 00:00:00 2001 From: Emily Date: Tue, 21 Jan 2025 17:38:33 +0000 Subject: [PATCH 04/14] =?UTF-8?q?libgit2:=20add=20upstream=20patch=20for?= =?UTF-8?q?=20case=E2=80=90sensitive=20build=20directories?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/libraries/libgit2/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/libraries/libgit2/default.nix b/pkgs/development/libraries/libgit2/default.nix index 354424444f65b..e385221731606 100644 --- a/pkgs/development/libraries/libgit2/default.nix +++ b/pkgs/development/libraries/libgit2/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchFromGitHub +, fetchpatch , cmake , pkg-config , python3 @@ -34,6 +35,14 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-v32yGMo5oFEl6HUdg8czCsCLDL+sy9PPT0AEWmKxUhk="; }; + patches = [ + (fetchpatch { + name = "libgit2-darwin-case-sensitive-build.patch"; + url = "https://github.com/libgit2/libgit2/commit/1b348a31349e847b1d8548281aa92f26b9783f2f.patch"; + hash = "sha256-CBaUuEr3nPdUuOdyJtmPgyqR0MNnVyOFYbYXF3ncupU="; + }) + ]; + cmakeFlags = [ "-DREGEX_BACKEND=pcre2" "-DUSE_HTTP_PARSER=llhttp" From 5a47d957a54c8fd8758169a939a9ff35bb24888f Mon Sep 17 00:00:00 2001 From: Emily Date: Tue, 21 Jan 2025 16:50:27 +0000 Subject: [PATCH 05/14] nixVersions.{nix_2_25,git}: remove obsolete `libgit2` patches --- pkgs/tools/package-management/nix/default.nix | 24 - .../libgit2-mempack-thin-packfile.patch | 282 ------ ...2-packbuilder-callback-interruptible.patch | 930 ------------------ 3 files changed, 1236 deletions(-) delete mode 100644 pkgs/tools/package-management/nix/patches/libgit2-mempack-thin-packfile.patch delete mode 100644 pkgs/tools/package-management/nix/patches/libgit2-packbuilder-callback-interruptible.patch diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index 5abbfb440ca24..d44115464f361 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -8,7 +8,6 @@ , fetchFromGitHub , fetchpatch2 , runCommand -, buildPackages , Security , storeDir ? "/nix/store" @@ -85,28 +84,6 @@ let requiredSystemFeatures = [ ]; }; - libgit2-thin-packfile = libgit2.overrideAttrs (args: { - nativeBuildInputs = args.nativeBuildInputs or [] - # gitMinimal does not build on Windows. See packbuilder patch. - ++ lib.optionals (!stdenv.hostPlatform.isWindows) [ - # Needed for `git apply`; see `prePatch` - buildPackages.gitMinimal - ]; - # Only `git apply` can handle git binary patches - prePatch = args.prePatch or "" - + lib.optionalString (!stdenv.hostPlatform.isWindows) '' - patch() { - git apply - } - ''; - # taken from https://github.com/NixOS/nix/tree/master/packaging/patches - patches = (args.patches or []) ++ [ - ./patches/libgit2-mempack-thin-packfile.patch - ] ++ lib.optionals (!stdenv.hostPlatform.isWindows) [ - ./patches/libgit2-packbuilder-callback-interruptible.patch - ]; - }); - common = args: callPackage (import ./common.nix ({ inherit lib fetchFromGitHub; } // args)) @@ -114,7 +91,6 @@ let inherit Security storeDir stateDir confDir; boehmgc = boehmgc-nix; aws-sdk-cpp = if lib.versionAtLeast args.version "2.12pre" then aws-sdk-cpp-nix else aws-sdk-cpp-old-nix; - libgit2 = if lib.versionAtLeast args.version "2.25.0" then libgit2-thin-packfile else libgit2; }; # https://github.com/NixOS/nix/pull/7585 diff --git a/pkgs/tools/package-management/nix/patches/libgit2-mempack-thin-packfile.patch b/pkgs/tools/package-management/nix/patches/libgit2-mempack-thin-packfile.patch deleted file mode 100644 index fb74b1683136b..0000000000000 --- a/pkgs/tools/package-management/nix/patches/libgit2-mempack-thin-packfile.patch +++ /dev/null @@ -1,282 +0,0 @@ -commit 9bacade4a3ef4b6b26e2c02f549eef0e9eb9eaa2 -Author: Robert Hensing -Date: Sun Aug 18 20:20:36 2024 +0200 - - Add unoptimized git_mempack_write_thin_pack - -diff --git a/include/git2/sys/mempack.h b/include/git2/sys/mempack.h -index 17da590a3..3688bdd50 100644 ---- a/include/git2/sys/mempack.h -+++ b/include/git2/sys/mempack.h -@@ -44,6 +44,29 @@ GIT_BEGIN_DECL - */ - GIT_EXTERN(int) git_mempack_new(git_odb_backend **out); - -+/** -+ * Write a thin packfile with the objects in the memory store. -+ * -+ * A thin packfile is a packfile that does not contain its transitive closure of -+ * references. This is useful for efficiently distributing additions to a -+ * repository over the network, but also finds use in the efficient bulk -+ * addition of objects to a repository, locally. -+ * -+ * This operation performs the (shallow) insert operations into the -+ * `git_packbuilder`, but does not write the packfile to disk; -+ * see `git_packbuilder_write_buf`. -+ * -+ * It also does not reset the memory store; see `git_mempack_reset`. -+ * -+ * @note This function may or may not write trees and blobs that are not -+ * referenced by commits. Currently everything is written, but this -+ * behavior may change in the future as the packer is optimized. -+ * -+ * @param backend The mempack backend -+ * @param pb The packbuilder to use to write the packfile -+ */ -+GIT_EXTERN(int) git_mempack_write_thin_pack(git_odb_backend *backend, git_packbuilder *pb); -+ - /** - * Dump all the queued in-memory writes to a packfile. - * -diff --git a/src/libgit2/odb_mempack.c b/src/libgit2/odb_mempack.c -index 6f27f45f8..0b61e2b66 100644 ---- a/src/libgit2/odb_mempack.c -+++ b/src/libgit2/odb_mempack.c -@@ -132,6 +132,35 @@ cleanup: - return err; - } - -+int git_mempack_write_thin_pack(git_odb_backend *backend, git_packbuilder *pb) -+{ -+ struct memory_packer_db *db = (struct memory_packer_db *)backend; -+ const git_oid *oid; -+ size_t iter = 0; -+ int err = -1; -+ -+ /* TODO: Implement the recency heuristics. -+ For this it probably makes sense to only write what's referenced -+ through commits, an option I've carved out for you in the docs. -+ wrt heuristics: ask your favorite LLM to translate https://git-scm.com/docs/pack-heuristics/en -+ to actual normal reference documentation. */ -+ while (true) { -+ err = git_oidmap_iterate(NULL, db->objects, &iter, &oid); -+ if (err == GIT_ITEROVER) { -+ err = 0; -+ break; -+ } -+ if (err != 0) -+ return err; -+ -+ err = git_packbuilder_insert(pb, oid, NULL); -+ if (err != 0) -+ return err; -+ } -+ -+ return 0; -+} -+ - int git_mempack_dump( - git_buf *pack, - git_repository *repo, -diff --git a/tests/libgit2/mempack/thinpack.c b/tests/libgit2/mempack/thinpack.c -new file mode 100644 -index 000000000..604a4dda2 ---- /dev/null -+++ b/tests/libgit2/mempack/thinpack.c -@@ -0,0 +1,196 @@ -+#include "clar_libgit2.h" -+#include "git2/indexer.h" -+#include "git2/odb_backend.h" -+#include "git2/tree.h" -+#include "git2/types.h" -+#include "git2/sys/mempack.h" -+#include "git2/sys/odb_backend.h" -+#include "util.h" -+ -+static git_repository *_repo; -+static git_odb_backend * _mempack_backend; -+ -+void test_mempack_thinpack__initialize(void) -+{ -+ git_odb *odb; -+ -+ _repo = cl_git_sandbox_init_new("mempack_thinpack_repo"); -+ -+ cl_git_pass(git_mempack_new(&_mempack_backend)); -+ cl_git_pass(git_repository_odb(&odb, _repo)); -+ cl_git_pass(git_odb_add_backend(odb, _mempack_backend, 999)); -+ git_odb_free(odb); -+} -+ -+void _mempack_thinpack__cleanup(void) -+{ -+ cl_git_sandbox_cleanup(); -+} -+ -+/* -+ Generating a packfile for an unchanged repo works and produces an empty packfile. -+ Even if we allow this scenario to be detected, it shouldn't misbehave if the -+ application is unaware of it. -+*/ -+void test_mempack_thinpack__empty(void) -+{ -+ git_packbuilder *pb; -+ int version; -+ int n; -+ git_buf buf = GIT_BUF_INIT; -+ -+ git_packbuilder_new(&pb, _repo); -+ -+ cl_git_pass(git_mempack_write_thin_pack(_mempack_backend, pb)); -+ cl_git_pass(git_packbuilder_write_buf(&buf, pb)); -+ cl_assert_in_range(12, buf.size, 1024 /* empty packfile is >0 bytes, but certainly not that big */); -+ cl_assert(buf.ptr[0] == 'P'); -+ cl_assert(buf.ptr[1] == 'A'); -+ cl_assert(buf.ptr[2] == 'C'); -+ cl_assert(buf.ptr[3] == 'K'); -+ version = (buf.ptr[4] << 24) | (buf.ptr[5] << 16) | (buf.ptr[6] << 8) | buf.ptr[7]; -+ /* Subject to change. https://git-scm.com/docs/pack-format: Git currently accepts version number 2 or 3 but generates version 2 only.*/ -+ cl_assert_equal_i(2, version); -+ n = (buf.ptr[8] << 24) | (buf.ptr[9] << 16) | (buf.ptr[10] << 8) | buf.ptr[11]; -+ cl_assert_equal_i(0, n); -+ git_buf_dispose(&buf); -+ -+ git_packbuilder_free(pb); -+} -+ -+#define LIT_LEN(x) x, sizeof(x) - 1 -+ -+/* -+ Check that git_mempack_write_thin_pack produces a thin packfile. -+*/ -+void test_mempack_thinpack__thin(void) -+{ -+ /* Outline: -+ - Create tree 1 -+ - Flush to packfile A -+ - Create tree 2 -+ - Flush to packfile B -+ -+ Tree 2 has a new blob and a reference to a blob from tree 1. -+ -+ Expectation: -+ - Packfile B is thin and does not contain the objects from packfile A -+ */ -+ -+ -+ git_oid oid_blob_1; -+ git_oid oid_blob_2; -+ git_oid oid_blob_3; -+ git_oid oid_tree_1; -+ git_oid oid_tree_2; -+ git_treebuilder *tb; -+ -+ git_packbuilder *pb; -+ git_buf buf = GIT_BUF_INIT; -+ git_indexer *indexer; -+ git_indexer_progress stats; -+ char pack_dir_path[1024]; -+ -+ char sbuf[1024]; -+ const char * repo_path; -+ const char * pack_name_1; -+ const char * pack_name_2; -+ git_str pack_path_1 = GIT_STR_INIT; -+ git_str pack_path_2 = GIT_STR_INIT; -+ git_odb_backend * pack_odb_backend_1; -+ git_odb_backend * pack_odb_backend_2; -+ -+ -+ cl_assert_in_range(0, snprintf(pack_dir_path, sizeof(pack_dir_path), "%s/objects/pack", git_repository_path(_repo)), sizeof(pack_dir_path)); -+ -+ /* Create tree 1 */ -+ -+ cl_git_pass(git_blob_create_from_buffer(&oid_blob_1, _repo, LIT_LEN("thinpack blob 1"))); -+ cl_git_pass(git_blob_create_from_buffer(&oid_blob_2, _repo, LIT_LEN("thinpack blob 2"))); -+ -+ -+ cl_git_pass(git_treebuilder_new(&tb, _repo, NULL)); -+ cl_git_pass(git_treebuilder_insert(NULL, tb, "blob1", &oid_blob_1, GIT_FILEMODE_BLOB)); -+ cl_git_pass(git_treebuilder_insert(NULL, tb, "blob2", &oid_blob_2, GIT_FILEMODE_BLOB)); -+ cl_git_pass(git_treebuilder_write(&oid_tree_1, tb)); -+ -+ /* Flush */ -+ -+ cl_git_pass(git_packbuilder_new(&pb, _repo)); -+ cl_git_pass(git_mempack_write_thin_pack(_mempack_backend, pb)); -+ cl_git_pass(git_packbuilder_write_buf(&buf, pb)); -+ cl_git_pass(git_indexer_new(&indexer, pack_dir_path, 0, NULL, NULL)); -+ cl_git_pass(git_indexer_append(indexer, buf.ptr, buf.size, &stats)); -+ cl_git_pass(git_indexer_commit(indexer, &stats)); -+ pack_name_1 = strdup(git_indexer_name(indexer)); -+ cl_assert(pack_name_1); -+ git_buf_dispose(&buf); -+ git_mempack_reset(_mempack_backend); -+ git_indexer_free(indexer); -+ git_packbuilder_free(pb); -+ -+ /* Create tree 2 */ -+ -+ cl_git_pass(git_treebuilder_clear(tb)); -+ /* blob 1 won't be used, but we add it anyway to test that just "declaring" an object doesn't -+ necessarily cause its inclusion in the next thin packfile. It must only be included if new. */ -+ cl_git_pass(git_blob_create_from_buffer(&oid_blob_1, _repo, LIT_LEN("thinpack blob 1"))); -+ cl_git_pass(git_blob_create_from_buffer(&oid_blob_3, _repo, LIT_LEN("thinpack blob 3"))); -+ cl_git_pass(git_treebuilder_insert(NULL, tb, "blob1", &oid_blob_1, GIT_FILEMODE_BLOB)); -+ cl_git_pass(git_treebuilder_insert(NULL, tb, "blob3", &oid_blob_3, GIT_FILEMODE_BLOB)); -+ cl_git_pass(git_treebuilder_write(&oid_tree_2, tb)); -+ -+ /* Flush */ -+ -+ cl_git_pass(git_packbuilder_new(&pb, _repo)); -+ cl_git_pass(git_mempack_write_thin_pack(_mempack_backend, pb)); -+ cl_git_pass(git_packbuilder_write_buf(&buf, pb)); -+ cl_git_pass(git_indexer_new(&indexer, pack_dir_path, 0, NULL, NULL)); -+ cl_git_pass(git_indexer_append(indexer, buf.ptr, buf.size, &stats)); -+ cl_git_pass(git_indexer_commit(indexer, &stats)); -+ pack_name_2 = strdup(git_indexer_name(indexer)); -+ cl_assert(pack_name_2); -+ git_buf_dispose(&buf); -+ git_mempack_reset(_mempack_backend); -+ git_indexer_free(indexer); -+ git_packbuilder_free(pb); -+ git_treebuilder_free(tb); -+ -+ /* Assertions */ -+ -+ assert(pack_name_1); -+ assert(pack_name_2); -+ -+ repo_path = git_repository_path(_repo); -+ -+ snprintf(sbuf, sizeof(sbuf), "objects/pack/pack-%s.pack", pack_name_1); -+ git_str_joinpath(&pack_path_1, repo_path, sbuf); -+ snprintf(sbuf, sizeof(sbuf), "objects/pack/pack-%s.pack", pack_name_2); -+ git_str_joinpath(&pack_path_2, repo_path, sbuf); -+ -+ /* If they're the same, something definitely went wrong. */ -+ cl_assert(strcmp(pack_name_1, pack_name_2) != 0); -+ -+ cl_git_pass(git_odb_backend_one_pack(&pack_odb_backend_1, pack_path_1.ptr)); -+ cl_assert(pack_odb_backend_1->exists(pack_odb_backend_1, &oid_blob_1)); -+ cl_assert(pack_odb_backend_1->exists(pack_odb_backend_1, &oid_blob_2)); -+ cl_assert(!pack_odb_backend_1->exists(pack_odb_backend_1, &oid_blob_3)); -+ cl_assert(pack_odb_backend_1->exists(pack_odb_backend_1, &oid_tree_1)); -+ cl_assert(!pack_odb_backend_1->exists(pack_odb_backend_1, &oid_tree_2)); -+ -+ cl_git_pass(git_odb_backend_one_pack(&pack_odb_backend_2, pack_path_2.ptr)); -+ /* blob 1 is already in the packfile 1, so packfile 2 must not include it, in order to be _thin_. */ -+ cl_assert(!pack_odb_backend_2->exists(pack_odb_backend_2, &oid_blob_1)); -+ cl_assert(!pack_odb_backend_2->exists(pack_odb_backend_2, &oid_blob_2)); -+ cl_assert(pack_odb_backend_2->exists(pack_odb_backend_2, &oid_blob_3)); -+ cl_assert(!pack_odb_backend_2->exists(pack_odb_backend_2, &oid_tree_1)); -+ cl_assert(pack_odb_backend_2->exists(pack_odb_backend_2, &oid_tree_2)); -+ -+ pack_odb_backend_1->free(pack_odb_backend_1); -+ pack_odb_backend_2->free(pack_odb_backend_2); -+ free((void *)pack_name_1); -+ free((void *)pack_name_2); -+ git_str_dispose(&pack_path_1); -+ git_str_dispose(&pack_path_2); -+ -+} diff --git a/pkgs/tools/package-management/nix/patches/libgit2-packbuilder-callback-interruptible.patch b/pkgs/tools/package-management/nix/patches/libgit2-packbuilder-callback-interruptible.patch deleted file mode 100644 index c67822ff755eb..0000000000000 --- a/pkgs/tools/package-management/nix/patches/libgit2-packbuilder-callback-interruptible.patch +++ /dev/null @@ -1,930 +0,0 @@ -commit e9823c5da4fa977c46bcb97167fbdd0d70adb5ff -Author: Robert Hensing -Date: Mon Aug 26 20:07:04 2024 +0200 - - Make packbuilder interruptible using progress callback - - Forward errors from packbuilder->progress_cb - - This allows the callback to terminate long-running operations when - the application is interrupted. - -diff --git a/include/git2/pack.h b/include/git2/pack.h -index 0f6bd2ab9..bee72a6c0 100644 ---- a/include/git2/pack.h -+++ b/include/git2/pack.h -@@ -247,6 +247,9 @@ typedef int GIT_CALLBACK(git_packbuilder_progress)( - * @param progress_cb Function to call with progress information during - * pack building. Be aware that this is called inline with pack building - * operations, so performance may be affected. -+ * When progress_cb returns an error, the pack building process will be -+ * aborted and the error will be returned from the invoked function. -+ * `pb` must then be freed. - * @param progress_cb_payload Payload for progress callback. - * @return 0 or an error code - */ -diff --git a/src/libgit2/pack-objects.c b/src/libgit2/pack-objects.c -index b2d80cba9..7c331c2d5 100644 ---- a/src/libgit2/pack-objects.c -+++ b/src/libgit2/pack-objects.c -@@ -932,6 +932,9 @@ static int report_delta_progress( - { - int ret; - -+ if (pb->failure) -+ return pb->failure; -+ - if (pb->progress_cb) { - uint64_t current_time = git_time_monotonic(); - uint64_t elapsed = current_time - pb->last_progress_report_time; -@@ -943,8 +946,10 @@ static int report_delta_progress( - GIT_PACKBUILDER_DELTAFICATION, - count, pb->nr_objects, pb->progress_cb_payload); - -- if (ret) -+ if (ret) { -+ pb->failure = ret; - return git_error_set_after_callback(ret); -+ } - } - } - -@@ -976,7 +981,10 @@ static int find_deltas(git_packbuilder *pb, git_pobject **list, - } - - pb->nr_deltified += 1; -- report_delta_progress(pb, pb->nr_deltified, false); -+ if ((error = report_delta_progress(pb, pb->nr_deltified, false)) < 0) { -+ GIT_ASSERT(git_packbuilder__progress_unlock(pb) == 0); -+ goto on_error; -+ } - - po = *list++; - (*list_size)--; -@@ -1124,6 +1132,10 @@ struct thread_params { - size_t depth; - size_t working; - size_t data_ready; -+ -+ /* A pb->progress_cb can stop the packing process by returning an error. -+ When that happens, all threads observe the error and stop voluntarily. */ -+ bool stopped; - }; - - static void *threaded_find_deltas(void *arg) -@@ -1133,7 +1145,12 @@ static void *threaded_find_deltas(void *arg) - while (me->remaining) { - if (find_deltas(me->pb, me->list, &me->remaining, - me->window, me->depth) < 0) { -- ; /* TODO */ -+ me->stopped = true; -+ GIT_ASSERT_WITH_RETVAL(git_packbuilder__progress_lock(me->pb) == 0, NULL); -+ me->working = false; -+ git_cond_signal(&me->pb->progress_cond); -+ GIT_ASSERT_WITH_RETVAL(git_packbuilder__progress_unlock(me->pb) == 0, NULL); -+ return NULL; - } - - GIT_ASSERT_WITH_RETVAL(git_packbuilder__progress_lock(me->pb) == 0, NULL); -@@ -1175,8 +1192,7 @@ static int ll_find_deltas(git_packbuilder *pb, git_pobject **list, - pb->nr_threads = git__online_cpus(); - - if (pb->nr_threads <= 1) { -- find_deltas(pb, list, &list_size, window, depth); -- return 0; -+ return find_deltas(pb, list, &list_size, window, depth); - } - - p = git__mallocarray(pb->nr_threads, sizeof(*p)); -@@ -1195,6 +1211,7 @@ static int ll_find_deltas(git_packbuilder *pb, git_pobject **list, - p[i].depth = depth; - p[i].working = 1; - p[i].data_ready = 0; -+ p[i].stopped = 0; - - /* try to split chunks on "path" boundaries */ - while (sub_size && sub_size < list_size && -@@ -1262,7 +1279,7 @@ static int ll_find_deltas(git_packbuilder *pb, git_pobject **list, - (!victim || victim->remaining < p[i].remaining)) - victim = &p[i]; - -- if (victim) { -+ if (victim && !target->stopped) { - sub_size = victim->remaining / 2; - list = victim->list + victim->list_size - sub_size; - while (sub_size && list[0]->hash && -@@ -1286,7 +1303,7 @@ static int ll_find_deltas(git_packbuilder *pb, git_pobject **list, - } - target->list_size = sub_size; - target->remaining = sub_size; -- target->working = 1; -+ target->working = 1; /* even when target->stopped, so that we don't process this thread again */ - GIT_ASSERT(git_packbuilder__progress_unlock(pb) == 0); - - if (git_mutex_lock(&target->mutex)) { -@@ -1299,7 +1316,7 @@ static int ll_find_deltas(git_packbuilder *pb, git_pobject **list, - git_cond_signal(&target->cond); - git_mutex_unlock(&target->mutex); - -- if (!sub_size) { -+ if (target->stopped || !sub_size) { - git_thread_join(&target->thread, NULL); - git_cond_free(&target->cond); - git_mutex_free(&target->mutex); -@@ -1308,7 +1325,7 @@ static int ll_find_deltas(git_packbuilder *pb, git_pobject **list, - } - - git__free(p); -- return 0; -+ return pb->failure; - } - - #else -@@ -1319,6 +1336,7 @@ int git_packbuilder__prepare(git_packbuilder *pb) - { - git_pobject **delta_list; - size_t i, n = 0; -+ int error; - - if (pb->nr_objects == 0 || pb->done) - return 0; /* nothing to do */ -@@ -1327,8 +1345,10 @@ int git_packbuilder__prepare(git_packbuilder *pb) - * Although we do not report progress during deltafication, we - * at least report that we are in the deltafication stage - */ -- if (pb->progress_cb) -- pb->progress_cb(GIT_PACKBUILDER_DELTAFICATION, 0, pb->nr_objects, pb->progress_cb_payload); -+ if (pb->progress_cb) { -+ if ((error = pb->progress_cb(GIT_PACKBUILDER_DELTAFICATION, 0, pb->nr_objects, pb->progress_cb_payload)) < 0) -+ return git_error_set_after_callback(error); -+ } - - delta_list = git__mallocarray(pb->nr_objects, sizeof(*delta_list)); - GIT_ERROR_CHECK_ALLOC(delta_list); -@@ -1345,31 +1365,33 @@ int git_packbuilder__prepare(git_packbuilder *pb) - - if (n > 1) { - git__tsort((void **)delta_list, n, type_size_sort); -- if (ll_find_deltas(pb, delta_list, n, -+ if ((error = ll_find_deltas(pb, delta_list, n, - GIT_PACK_WINDOW + 1, -- GIT_PACK_DEPTH) < 0) { -+ GIT_PACK_DEPTH)) < 0) { - git__free(delta_list); -- return -1; -+ return error; - } - } - -- report_delta_progress(pb, pb->nr_objects, true); -+ error = report_delta_progress(pb, pb->nr_objects, true); - - pb->done = true; - git__free(delta_list); -- return 0; -+ return error; - } - --#define PREPARE_PACK if (git_packbuilder__prepare(pb) < 0) { return -1; } -+#define PREPARE_PACK error = git_packbuilder__prepare(pb); if (error < 0) { return error; } - - int git_packbuilder_foreach(git_packbuilder *pb, int (*cb)(void *buf, size_t size, void *payload), void *payload) - { -+ int error; - PREPARE_PACK; - return write_pack(pb, cb, payload); - } - - int git_packbuilder__write_buf(git_str *buf, git_packbuilder *pb) - { -+ int error; - PREPARE_PACK; - - return write_pack(pb, &write_pack_buf, buf); -diff --git a/src/libgit2/pack-objects.h b/src/libgit2/pack-objects.h -index bbc8b9430..380a28ebe 100644 ---- a/src/libgit2/pack-objects.h -+++ b/src/libgit2/pack-objects.h -@@ -100,6 +100,10 @@ struct git_packbuilder { - uint64_t last_progress_report_time; - - bool done; -+ -+ /* A non-zero error code in failure causes all threads to shut themselves -+ down. Some functions will return this error code. */ -+ volatile int failure; - }; - - int git_packbuilder__write_buf(git_str *buf, git_packbuilder *pb); -diff --git a/tests/libgit2/pack/cancel.c b/tests/libgit2/pack/cancel.c -new file mode 100644 -index 000000000..a0aa9716a ---- /dev/null -+++ b/tests/libgit2/pack/cancel.c -@@ -0,0 +1,240 @@ -+#include "clar_libgit2.h" -+#include "futils.h" -+#include "pack.h" -+#include "hash.h" -+#include "iterator.h" -+#include "vector.h" -+#include "posix.h" -+#include "hash.h" -+#include "pack-objects.h" -+ -+static git_repository *_repo; -+static git_revwalk *_revwalker; -+static git_packbuilder *_packbuilder; -+static git_indexer *_indexer; -+static git_vector _commits; -+static int _commits_is_initialized; -+static git_indexer_progress _stats; -+ -+extern bool git_disable_pack_keep_file_checks; -+ -+static void pack_packbuilder_init(const char *sandbox) { -+ _repo = cl_git_sandbox_init(sandbox); -+ /* cl_git_pass(p_chdir(sandbox)); */ -+ cl_git_pass(git_revwalk_new(&_revwalker, _repo)); -+ cl_git_pass(git_packbuilder_new(&_packbuilder, _repo)); -+ cl_git_pass(git_vector_init(&_commits, 0, NULL)); -+ _commits_is_initialized = 1; -+ memset(&_stats, 0, sizeof(_stats)); -+ p_fsync__cnt = 0; -+} -+ -+void test_pack_cancel__initialize(void) -+{ -+ pack_packbuilder_init("small.git"); -+} -+ -+void test_pack_cancel__cleanup(void) -+{ -+ git_oid *o; -+ unsigned int i; -+ -+ cl_git_pass(git_libgit2_opts(GIT_OPT_ENABLE_FSYNC_GITDIR, 0)); -+ cl_git_pass(git_libgit2_opts(GIT_OPT_DISABLE_PACK_KEEP_FILE_CHECKS, false)); -+ -+ if (_commits_is_initialized) { -+ _commits_is_initialized = 0; -+ git_vector_foreach(&_commits, i, o) { -+ git__free(o); -+ } -+ git_vector_free(&_commits); -+ } -+ -+ git_packbuilder_free(_packbuilder); -+ _packbuilder = NULL; -+ -+ git_revwalk_free(_revwalker); -+ _revwalker = NULL; -+ -+ git_indexer_free(_indexer); -+ _indexer = NULL; -+ -+ /* cl_git_pass(p_chdir("..")); */ -+ cl_git_sandbox_cleanup(); -+ _repo = NULL; -+} -+ -+static int seed_packbuilder(void) -+{ -+ int error; -+ git_oid oid, *o; -+ unsigned int i; -+ -+ git_revwalk_sorting(_revwalker, GIT_SORT_TIME); -+ cl_git_pass(git_revwalk_push_ref(_revwalker, "HEAD")); -+ -+ while (git_revwalk_next(&oid, _revwalker) == 0) { -+ o = git__malloc(sizeof(git_oid)); -+ cl_assert(o != NULL); -+ git_oid_cpy(o, &oid); -+ cl_git_pass(git_vector_insert(&_commits, o)); -+ } -+ -+ git_vector_foreach(&_commits, i, o) { -+ if((error = git_packbuilder_insert(_packbuilder, o, NULL)) < 0) -+ return error; -+ } -+ -+ git_vector_foreach(&_commits, i, o) { -+ git_object *obj; -+ cl_git_pass(git_object_lookup(&obj, _repo, o, GIT_OBJECT_COMMIT)); -+ error = git_packbuilder_insert_tree(_packbuilder, -+ git_commit_tree_id((git_commit *)obj)); -+ git_object_free(obj); -+ if (error < 0) -+ return error; -+ } -+ -+ return 0; -+} -+ -+static int fail_stage; -+ -+static int packbuilder_cancel_after_n_calls_cb(int stage, uint32_t current, uint32_t total, void *payload) -+{ -+ -+ /* Force the callback to run again on the next opportunity regardless -+ of how fast we're running. */ -+ _packbuilder->last_progress_report_time = 0; -+ -+ if (stage == fail_stage) { -+ int *calls = (int *)payload; -+ int n = *calls; -+ /* Always decrement, including past zero. This way the error is only -+ triggered once, making sure it is picked up immediately. */ -+ --*calls; -+ if (n == 0) -+ return GIT_EUSER; -+ } -+ -+ return 0; -+} -+ -+static void test_cancel(int n) -+{ -+ -+ int calls_remaining = n; -+ int err; -+ git_buf buf = GIT_BUF_INIT; -+ -+ /* Switch to a small repository, so that `packbuilder_cancel_after_n_calls_cb` -+ can hack the time to call the callback on every opportunity. */ -+ -+ cl_git_pass(git_packbuilder_set_callbacks(_packbuilder, &packbuilder_cancel_after_n_calls_cb, &calls_remaining)); -+ err = seed_packbuilder(); -+ if (!err) -+ err = git_packbuilder_write_buf(&buf, _packbuilder); -+ -+ cl_assert_equal_i(GIT_EUSER, err); -+} -+void test_pack_cancel__cancel_after_add_0(void) -+{ -+ fail_stage = GIT_PACKBUILDER_ADDING_OBJECTS; -+ test_cancel(0); -+} -+ -+void test_pack_cancel__cancel_after_add_1(void) -+{ -+ cl_skip(); -+ fail_stage = GIT_PACKBUILDER_ADDING_OBJECTS; -+ test_cancel(1); -+} -+ -+void test_pack_cancel__cancel_after_delta_0(void) -+{ -+ fail_stage = GIT_PACKBUILDER_DELTAFICATION; -+ test_cancel(0); -+} -+ -+void test_pack_cancel__cancel_after_delta_1(void) -+{ -+ fail_stage = GIT_PACKBUILDER_DELTAFICATION; -+ test_cancel(1); -+} -+ -+void test_pack_cancel__cancel_after_delta_0_threaded(void) -+{ -+#ifdef GIT_THREADS -+ git_packbuilder_set_threads(_packbuilder, 8); -+ fail_stage = GIT_PACKBUILDER_DELTAFICATION; -+ test_cancel(0); -+#else -+ cl_skip(); -+#endif -+} -+ -+void test_pack_cancel__cancel_after_delta_1_threaded(void) -+{ -+#ifdef GIT_THREADS -+ git_packbuilder_set_threads(_packbuilder, 8); -+ fail_stage = GIT_PACKBUILDER_DELTAFICATION; -+ test_cancel(1); -+#else -+ cl_skip(); -+#endif -+} -+ -+static int foreach_cb(void *buf, size_t len, void *payload) -+{ -+ git_indexer *idx = (git_indexer *) payload; -+ cl_git_pass(git_indexer_append(idx, buf, len, &_stats)); -+ return 0; -+} -+ -+void test_pack_cancel__foreach(void) -+{ -+ git_indexer *idx; -+ -+ seed_packbuilder(); -+ -+#ifdef GIT_EXPERIMENTAL_SHA256 -+ cl_git_pass(git_indexer_new(&idx, ".", GIT_OID_SHA1, NULL)); -+#else -+ cl_git_pass(git_indexer_new(&idx, ".", 0, NULL, NULL)); -+#endif -+ -+ cl_git_pass(git_packbuilder_foreach(_packbuilder, foreach_cb, idx)); -+ cl_git_pass(git_indexer_commit(idx, &_stats)); -+ git_indexer_free(idx); -+} -+ -+static int foreach_cancel_cb(void *buf, size_t len, void *payload) -+{ -+ git_indexer *idx = (git_indexer *)payload; -+ cl_git_pass(git_indexer_append(idx, buf, len, &_stats)); -+ return (_stats.total_objects > 2) ? -1111 : 0; -+} -+ -+void test_pack_cancel__foreach_with_cancel(void) -+{ -+ git_indexer *idx; -+ -+ seed_packbuilder(); -+ -+#ifdef GIT_EXPERIMENTAL_SHA256 -+ cl_git_pass(git_indexer_new(&idx, ".", GIT_OID_SHA1, NULL)); -+#else -+ cl_git_pass(git_indexer_new(&idx, ".", 0, NULL, NULL)); -+#endif -+ -+ cl_git_fail_with( -+ git_packbuilder_foreach(_packbuilder, foreach_cancel_cb, idx), -1111); -+ git_indexer_free(idx); -+} -+ -+void test_pack_cancel__keep_file_check(void) -+{ -+ assert(!git_disable_pack_keep_file_checks); -+ cl_git_pass(git_libgit2_opts(GIT_OPT_DISABLE_PACK_KEEP_FILE_CHECKS, true)); -+ assert(git_disable_pack_keep_file_checks); -+} -diff --git a/tests/resources/small.git/HEAD b/tests/resources/small.git/HEAD -new file mode 100644 -index 0000000000000000000000000000000000000000..cb089cd89a7d7686d284d8761201649346b5aa1c -GIT binary patch -literal 23 -ecmXR)O|w!cN=+-)&qz&7Db~+TEG|hc;sO9;xClW2 - -literal 0 -HcmV?d00001 - -diff --git a/tests/resources/small.git/config b/tests/resources/small.git/config -new file mode 100644 -index 0000000000000000000000000000000000000000..07d359d07cf1ed0c0074fdad71ffff5942f0adfa -GIT binary patch -literal 66 -zcmaz}&M!)h<>D+#Eyypk5{uv*03B5png9R* - -literal 0 -HcmV?d00001 - -diff --git a/tests/resources/small.git/description b/tests/resources/small.git/description -new file mode 100644 -index 0000000000000000000000000000000000000000..498b267a8c7812490d6479839c5577eaaec79d62 -GIT binary patch -literal 73 -zcmWH|%S+5nO;IRHEyyp$t+PQ$;d2LNXyJgRZve!Elw`VEGWs$&r??@ -Q$yWgB0LrH#Y0~2Y0PnOK(EtDd - -literal 0 -HcmV?d00001 - -diff --git a/tests/resources/small.git/hooks/applypatch-msg.sample b/tests/resources/small.git/hooks/applypatch-msg.sample -new file mode 100755 -index 0000000000000000000000000000000000000000..dcbf8167fa503f96ff6a39c68409007eadc9b1f3 -GIT binary patch -literal 535 -zcmY+AX;Q;542A#a6e8^~FyI8r&I~hf2QJ{GO6(?HuvEG*+#R{4EI%zhfA8r{j%sh$ -zHE~E-UtQd8{bq4@*S%jq3@bmxwQDXGv#o!N`o3AHMw3xD)hy0#>&E&zzl%vRffomqo=v6>_2NRa#TwDdYvTVQyueO*15Nlo%=#DXgC0bhF3vTa`LQGaO9;jeD$OP?~ -za$G4Q{z+Q_{5V?5h;a-noM$P{<>Q~j4o7u%#P6^o^16{y*jU=-K8GYD_dUtdj4FSx -zSC0C!DvAnv%S!4dgk -XB^)11aoGMJPCqWs%IS0YSv(eBT&%T6 - -literal 0 -HcmV?d00001 - -diff --git a/tests/resources/small.git/hooks/commit-msg.sample b/tests/resources/small.git/hooks/commit-msg.sample -new file mode 100755 -index 0000000000000000000000000000000000000000..f3780f92349638ebe32f6baf24c7c3027675d7c9 -GIT binary patch -literal 953 -zcmaJy@-{3h^^Cx;#d0zEA@DDc$nY4ez&|=%jTg@_HU*ub=!!y$xW09TSjlj -z(`I@QCsM`!9&80$I98wsQ8yK#)Orb<8re8FjkKh630D$QUDwi~(gkX=RunYm$rDjk -zlp%RUSnzA#6yjdG5?T?2DcYKp+v_lts0ljn&bh3J0bD5@N@1UKZ190O6ZeWr-BuZ^ -zWRebCX%(%=Xoj#(xYk1Cjtr!=tyBesf@m6}8zY6Ijbz9i9ziI_jG9MvR -zDH*e>^ga9IR?2wrSrAVm;eButj4Y>7(E2?b~jsu>& -zRKCJ7bp#19sqYh627wD%D9R$8=Ml$TNlumDypl~$jBu*G>5fIR^FB0h0Ex&TGZNr> -zL5hs1_K>taRb!|ThN9ns7^@4MXKP+6aGI_UK)T-M#rcP$;kN(Vcf#P)+5GzWa{l@J -z>-E{`$1iiNVYxq27}j;uo%;)r3kJI2xCFF~Ux;$Q%) -wjbk6JlDCM`jU&P+UVOvg`|iYl<7~9k>HHB4I;pdlQ=I-^$DrHaN$@lH1?P!0U;qFB - -literal 0 -HcmV?d00001 - -diff --git a/tests/resources/small.git/hooks/fsmonitor-watchman.sample b/tests/resources/small.git/hooks/fsmonitor-watchman.sample -new file mode 100755 -index 0000000000000000000000000000000000000000..41184ebc318c159f51cd1ebe2290559805df89d8 -GIT binary patch -literal 4777 -zcmbtYYi}F368$Xwipg4lq(BeHMvzvH-4;n7DGJBPqq#tw3aed8+IU5-m)yvL>;Cqh -z8FFRGj$`9CA8aoJ?j^$%==FV``-=rhLcPW`McSytRm~mEO7_&_cAVZrf1fFy*ha@8oe%*-aBYE -zcjzZg>LOkgxuUr-XJnHyD;zmPnRaSc#!k_P*d_BttRdc+J6G7za5#+^Y1nkc2Oowk`ya47uUR3Feu?B(w;S{(VYzxh}q-=#zP@uxSx{wbyPUMFU;K(06)$o{07&3yI?q{GqMcQ1c_^M<0< -zF4acAV)Il-V(rCTC1(;bsZ*}bl8dmejAk~yb`B}!^0;g^(o9kGUfZfDOvyp@x4OQt -zSgWh6T|3eq;9MFs8-#z+FDM1h(IjRUP|``PxupgJ7CUHOH90gbgl^2~97`?_X{P)) -zB*$r1cDlF-%azKND}?Gv`2K8-9v5e`gQoft=j?T<&a13c^!wY_$D`5z-X1g?ty&6- -zQN50{8?bUk9AI->^W@~~nkOghHIC2YN+AXkLQG_2-{Pq3%{`3KUMeG$iIn%%^6*NYb -zn|_BdV#C)n4565VccX;uT8&z3vSi!HXGbUj2B!R -zdz~&#fk#L-&k$fLwo$4?>12g@AXOKFekuo#6EHB%gmpD?1eyh%N8s{2wGoTu -z*@6cEZ^ZW!FAF_|JL`NkV7k}0ow|-2jHwbgH0;c@Dq*o?@&c*HnGdyx6^su8Qk%2{ -z*ye(dxO*6-&>qn1+zw}tc6;=sOX{4WB=VqjTS^))y1jlX2Q;=e!qMmFA5lC$#;BxC -z=Y%tRpWxb+_uQAvAw7Q{HGV#R$xb&udLCzZ+HN?kTyB};1EJ8UlQ5!>5eGW@)RX0n -zkjj>EF!3=0Gl^8dzv$B^NMGRxJoqN4A`xq-@wCbrx*u2NmIJ1xZ%H -zh;{|4T3(!E9sY#Ni(wUJYs1MmIc9bl)(4Nl3_wD_BWB>i<1S(LX7m*{Q7PU$muMS* -zM!%0EZx-Vw=Zey;erC?SNxF;pY@^A%-krqzfLV2meBp1vWdyArFYn`DD19T)Hw(?n -z)}{NP(Lk(o*?gl#B@pP7^*r|=;PIDT4|F#{2Hzh-AL0Rv$6uT;n|WzE4=slK?on@(fZeGhRgQCu56qB -z{+n81Az96qnQjMY*-*r-KV*7;Z#4QuJRJJV$M^KdldiMhj?ImK6~FvwJ*L5a){QoM=L5TYHkGO1$UrO3`a>{?Opw|b -zG(#59NQ#jFL9v~vgOVkM@^^(^A}onOE))yWEwhIlk&{ZyseZ^O0b=w8&O=BK{k<5B -k^Q-B@eG}LeHrquz%(SVEp_N)VhYZikCW__82JXfD17`J9Qvd(} - -literal 0 -HcmV?d00001 - -diff --git a/tests/resources/small.git/hooks/pre-applypatch.sample b/tests/resources/small.git/hooks/pre-applypatch.sample -new file mode 100755 -index 0000000000000000000000000000000000000000..625837e25f91421b8809a097f4a3103dd387ef31 -GIT binary patch -literal 481 -zcmY+ATTa6;5Jms9iouO45IBJXEg&Jm9@v1LPHMM_ZR|;#6tQh$71hSXq*MxP;V& -zj0cY7SCL=x4`a46sF)C>94Gk%=3q$W2s;j6iHtB2$R0%gix4oK@&T~=ALd_o*CKxt -I-`Pv{1Bpzc>;M1& - -literal 0 -HcmV?d00001 - -diff --git a/tests/resources/small.git/hooks/pre-commit.sample b/tests/resources/small.git/hooks/pre-commit.sample -new file mode 100755 -index 0000000000000000000000000000000000000000..10b39b2e26981b8f87ea424e735ef87359066dbb -GIT binary patch -literal 1706 -zcmZuxU2ohr5PY_N#pZ0-F<{-v&v-X^RA+u>k}E$4d&uD7=g_fA8+pNNV=4s0|iD3p<=DTXClTS -zXV23tJ;ECmN@M0j@zUAKEYW@3bv!SeYZ8ZH`YQNTApFVNc;F|9r5p4TqGs=>8E?6y -zi|gY{iM#PG1nL?UE9YCnWTk72kgZPG*Usqw!~Qd3c?~@w2?%eg@~)+VlSs6N5Yf2^ -zz;owF#K#r^&KMq1A`oqVGFpD&-!Pv|Rc -zO3KSqA@h9nSc%bm`0)Amk6*J}@14J*1-219l%%7D!Pl}UK>|lVi0Dfgu2jN3WC!uL -z0ej??b2iSehVgdnWHmZV4kUo*QL#aiIp}U=9x)IXk}JJ7VQ;CI9Rtn5e0VcjbYcVt+`x5D+svCGD;Z5hm*E$jSEQZ%SQ(}oLgslTvrKK@9Qf#b!hajVFnp9@oIix;NcI9Wk -xjnh0ya!AWet{I7YpD;y6HXyzI*lfSvH=o6*7mJZPkuaYpm>vzZ`wyGEBtOQPo|pgt - -literal 0 -HcmV?d00001 - -diff --git a/tests/resources/small.git/hooks/pre-push.sample b/tests/resources/small.git/hooks/pre-push.sample -new file mode 100755 -index 0000000000000000000000000000000000000000..02cbd80c287f959fe33975bb66c56293e3f5b396 -GIT binary patch -literal 1431 -zcmaJ>U60!~5PUX&#a1@z9B{IIZkjLT0t5kq9#8~D(I5{+8&J~9;#ndUk~-ZT`r|uG -z$#K$$J{TsKs*LP1}9!GoZ@4I4myMMG_di|of -z%?llx{O8TS-#^;(OioEmPy%kwWQBA1OMzV{hsQ8XFzS1k!~YQoLa5 -zhtP1fA$q6VmMbbAC_9)4I628k*O5J$NR19uHe4QYDK<==I~SQk)Nu%xQ~KH -z53w=!ke(FGb_PpnZfd*+hnXDTn;2*`u^~;?+5C~cn?bRka7NR%06%e6O91{MAgN6J -zmlO8{Biw4&wr&&(z4p3eln`E}XR9m9bNYZ7Ibrg(4yZIXrfgD7N*AFD7L3YSM#j}% -zo__rOS5fr;@8UM<6cl+cv_$YB$PQ&9dv($eM*))g!_cu!QcSh-mqE9i#QDZT)=o#` -z?8!RtE?w6p?GkGZ-6yt_p~5~4ecu|Sf^)6096%h*q-eNiEA1;Xwg)p~Q&iGSG7-IQ -z9aII&`ps$WOojFA`*bjGkFk|E@sHHuD}W^d`7YJ3YE^zrQnqR -zGoq?;YGKe)93o|_=^f%3U1KYZGPOXRRxK7w`UUbMMa3<86OmVH!EKP$8RCrn9mWX+ -zC?9yF!fRVLmud3hF<}x;;sR}f(*r}6Gap3fR6zLHR~kbMgD{98N`L+r&?3p~*0+FX -zcAL%j=(SO}xTJUTvA`&Lf`2mv4koPG9&|;2+68$XxiXKL@ma;l5d2^5Ba_rPh_DHI-u1#&_upttZXp;no03$20|NFiM -zK#D#xQ>!Z3JkX8T-LDVm!B5j7y_{;JDmmTTef+K1oIiPzeEr+Ai*<2PUgnG4^ZB>p -z_fkAvoR1emuf~ri^K$-px=4#D-vY9w& -z`bCv#2zVn=YnJyeNey(Y -zRh`9vtLw~A+5zsjp|W0Nsa|29Rm!B>OoG5a+vi;ari8O>KkU!KAWg_fa3btK2x*_@ -z0bEc7J;Ubghm}n9bOi(Sv_B66nQ7U)J7f0fO}8Wuf*uorcIgEG -zOHc|-V6+HlRhOP}?Cn?@5iwSl43abmBA^2lyL$+cpabCGVES+v^j^FO_}?FIp%En%Ll?Z*7*}TwrZyg5OSZ9rY-`aU~Mc-jjv{Ll)FLMgtB4ujktfQ`Xhqrka -zT=P!A;9w^;Z?PqpLwOLu=cj3L>TdUKw2;DMu)`oVkj}#bcDx4tYg=j%D`+i{W~fVM -zVmZ>W9VMyin9c-0KzI_;iZ-g|OyzuG`Yq%(%dvl;ifnVr0;jWE&S`z|rQu=!yHBBO -zx`OJ;oOQ(KKM<$(bC38o>pD0%|HA(E0TRw7qj$fJ_pRN+7Nm>dSC(gLg{(`t+5Z=?o+}wXU4tHy+&%F&aRhFebeEhR2R5|$#Ycbp^w@t -zTl%=f1t=w+WpJzF<|CE@?SCNAz)%9?w33lQ8vrHJqPfH9@}qs*QXOG71W=ylx;wOB -zcx!Bj^)Yy6WX$a^vBkBJ5CobqlaDx_B0c<3b+8)f84LCrt;e;qxc+7>VbwVK{skNv!wvBiTa^9Iu -zkwP;VK)jH$WJ{`MRwAA9fal!y0dtV;FWg8PTkWU>CwnqD>1ZX2B@;$DlX%C5MI+}{ -z9xQVnffR*~v2KAUj*hCdgul~`bk#mk`o>zk9)<2Uc8?hUZAEvd!`9em)~$Z)zev>w^8 -zyAgCP_$&Y)7HSQ84`xG}OeTavaEswwF|8Xpi5iZzZa@hCiv(J-%bfFC&)HLlO+Rhw -zG6g?9eL5&A!SuJnQ6}LxG%tU+@vZ`i+!+Rz6iYvsTdhnPo7lW{m-}{hya@viX4)XZ -zngaw+j;gloB#|UwI@8sOmQpc`h+bicQJnQIB5eifIMQNgD2+oai33m!34~xU|0Azj -zhu$8z+T5^;Pxx@d{N)pzOJLSa^e;aDf$W%N5XcOf!mGC9l9j$Ev2h6N+6ZQC+CJzl -zaM7?S!SrFLS2DASjj(h6y1WN3N?|bmqmyzm!&nLoE|`rKBOc_yDF$a#FsUn!IQf(t -zdC&Us(kQz*7mvH^j*^MC@>wTDb}g%~sx*ng#>{@lR=XG-Z5_ -z#<9*Oh0joMzt;nS)ObAp)347`D=}r-;nV!TbIq&xrGRGsF6fZg+!VkfUei@_&l-M& -zPqQ+Dw)RV}+)I8RuqAxa`Pv8e&!_gXS=e2-un>=Ktn}-;%lLZxaVn?Q>yZCb2R3Wk -z77zr%;Rq&h|2ncqyKYmFI0148JVY7Q$V5p=dWj+Qqpu%i|xp2C=WaOb2Wudn^h0EcD%$p9YVU1fnoRV9`(cy(vv6K>FXS!2jY>1GnU--7)4usH&K -zao*&P^@9~YmUe|ZdLW@C>H;!*Vt3>Nw4M*;=?j(TBD#O@XCv0|MEhA;z}kTFRv@`tPHhp=&Yh -zg%Zhg4i7o_k{a5i&f5;tZ==%}^Sn4aD_6%qs_XAuJt&EumdH4Yu`UjT<-+XHTuHss+b -YOmM2;hq8Egm*4=7_P9T{21QBYH*F=mfB*mh - -literal 0 -HcmV?d00001 - -diff --git a/tests/resources/small.git/hooks/prepare-commit-msg.sample b/tests/resources/small.git/hooks/prepare-commit-msg.sample -new file mode 100755 -index 0000000000000000000000000000000000000000..b1970da1b6d3f42f00069fd17c325de72cda812e -GIT binary patch -literal 1702 -zcmb_cTW{Mo6n>t6#i?x6xmZ$SFLf{QfG*3r0L?Pg?px55l8$UTGO3bO;spKi{V3XX -z))weX0X>M9bNMcZ-6yG%>(n}JI2|25dr}WZBP@ih?JX^+@ -zu#5O48P>yRX(mfDIhYP)doc1&TADZa@ZGpusJ$6G+e$ZMcmC -zoOosDQPS}l{H?YPsq(4;0SGkATa9eeqAaDcjq8n2wALbFwU@2i@FAaRV!=uw-nwx1gKn2SvY -z>Ff>;2sg!+Hxfkwv1lsiii=p6WenF=5)6LZcQaZ=aS_}+-4Y&?!@HWh|<^gJ21!|T@+%On#w6azxPHV}XsRbe*w -zR_TZ2XEsQa1lPK~biYqg@0-RW@5J1@=<87cFzEUABdCoFH2CZo?}l(Z*!OFqUxo>K -z_d`l#4d9|H6;VPT{X?^{VJ>oL|D7K{BJwwqB>`YcPoGk+9hbvHnoQ{EM|kPgD_`wk -zKm4#2xu;-y`RAm!=L_BnLvJ8$AZm8@?)v<%vwvsw8AF2x6!mTT;c72A_~U9nIq0ST -zv)N0!I!^1p=g8-RQfx5)E_Mb_4I2vtQpI30XZ&t-9h5!Hn - -literal 0 -HcmV?d00001 - -diff --git a/tests/resources/small.git/hooks/push-to-checkout.sample b/tests/resources/small.git/hooks/push-to-checkout.sample -new file mode 100755 -index 0000000000000000000000000000000000000000..a80611e18896f212c390d845e49a3f6d5693b41d -GIT binary patch -literal 2840 -zcmai0U31$u5PXh)#YOS7cE^-rw@uolNhe9&aUS|HtvhX>G$45tVUYj>fRdF?|9kfU -zNR~aG=E)WbEbeyq7JTw}ZuHIE2kUtL<AoeCNptd-NM1aZLhESzC;I`+Ns -zfmNNjdAp^W8#Q*}l>CT7RB9F5(BbI8ly2l~+E};JW|>&d1)=epZ-8vm8ppkbEVn#R -zt30a5A-c(YQR8eM5%;|UAnO>rt!&@x@G@yp+92%w-}%(5P_+P&Wf_zb$f-Qrl5(7z -z2ah(bkE;!DK(&aAMuQ%1TS>ai?wSXCOCSj=_}8x4IbCx^$}9q)whwv)SBt| -zg#MX4;;Oau`m=MI9(^&zPbueY@~>3*ixX%mvR5m_1&nAg@ZKvY1E$O}&EtLiG;mhV -z1xhMIm~fGjmf_#{62f`y;09?I7M1W2tWQvz<}i9lR>OpQyUJi45_&*pQus&EkwY<> -zI|ZAx=*3i9a-)g)hXkvO7>UJ5MNgL(Z+-wpXVcgbSgpmFmbf1~DPA(OVGI&FNLeIE -zNH!_aiH$vsif$_j7=T2{cS(!DOI`~bn@)vSd-0d7xL=DF;UNP|tW}4ih>DvHtu9tY_pbJ6x(6E*hxgC -zzNDao%qlr-IE%YGbS4hF!n!on7#W3$bX-_hbZAaws^nHu#)Dx=WzdbJ>AKzAy@T$x -zSWE^x9+|TEHVEPyaPYa0DOChp?AeHSBBDbZNokQpAY{lE!7geZI=jV)G^2@l)&91Zb1+`T+oq9wWF -zRV~kGTGce0O~p^6mj{kT5kL(pv>r;Lvd7VDX*P>A^Th`$3cWO0L81p4Ysdo3ZP1(SrR-peEdTo;-@bkB((G -zPHYQXUL!@Q$e(OQ;R9r%@Afz+50I7>*^^c&&|E*r-jN)LH=pM4AqMwWxSv|nqjddE -Z4{_hwv8!W(T -zYw`X3V>TCdnSD1ru8&`j=2DIPbCT@SnIgUw>$+lEYP}+x8(BMYnr=iT3*ndq)xzaV -z>I+qjv}vC#8_9M+b1p#uNS0M0)q

8!3p_LRQ0MA3M`!2foxzRUjbFY@}O~(ki=S -zqscnq8cU*dY)D$$cqE}n)V0yIk>CNKHCrndOtSP*HbOb;nbwAHSb;R+gs^?^Dve%) -zoW}t(*D}$>O3ab0TS^-;J|u&sb-PkZzo#kn*#xYt(;FGuwzSb^g&RDiGcOz9TB;Hu`nJh)$W=C=XCSm2AY=$w3G3P-V#Oo+N*;#2 -z4ijJ-pBZ=;T(RTgp_HYrD!uW-dTMfkuqY5jwOy)~gM;#=P^i{!l7`pXTS^s(&^{RU -zydaw}OpS#^D1cXM8?FW+fh`t7D(g;yr6|}fdaNtZBx3hlK~IpkTu3!Qq%R+zAo#t}Bs8^3$vHD+-TGT@`F>H1Cc#WAVW;&$S6%fE2d6@kLS0g&ihIM{}0z -z8#XhD>b>3{(BH|Px7}&lJ4%y1v(CihZJx@8MPoGdl*BJGD;usf*iS7%;{Joe; -zNFuBa>*~o&qETDPo~u&~$FxE1xb^x&(CbE`Y3GfsibL2rl+L;>P6j&Y3U>K$mkp*6 -zd`Q{<^+^&;GskGjwD-%!boR&i-TCA9UOR|@=GYb5x#+dhd7fkaVIR^pol`Mv+rUbmZ43dVL6^S7g3{NsPiG$iy$5EDB% -z6KIgnb$H(n&t3e4E6d4V7w^B?JS}JkG)PM6+X3Co`SQs($O*AA+MG~{S7RJ=cy-l& -z>~%3y`tjfx2>uOutB_^s -ziwG=e=ch|FQ0IkN91US7rhdQkXhwwt$gU0WEVDjo=IPb+?6PC=s8}J*ua(Ms))`UL -fi$|vMHn?H_tSE3ettp-hLlsZCxaLX8(nU;bVRB;Ce6@s#eu2|WvLz>- -zvy(&>Gyfp@+BtKnpqWkKi^+v{4jn_pNw_zeuxETifiGO|)w}OANj2n2D^K=o3j6P6uOL70#cbA{uzWXDlk1wr9GV1X(2W{RuTvjXV -zCmd8u -zH%V`94=q3)Dk)PHNrnFC(T1)Om6f{Usj;u1R->&XoCYVK2V3ZlgZuF?N}1+33OER*x -z*9Z=L=zI8CN>A_^jYjt0F$psO$sL=38q5q|SG)qCN6{^>RFh5E&l5GZ$pEahnF&d+ -z5c>64t}uJPkf~_!VUj#&N%nC-gUMj%=@B=!V>&}xtj2%@-mOm#rQUSJ3(ccmc+fza -znZ#uxF>N?QN5UrIEd!5RgHEfW#;(nKYF+D<*rdshJ$X-z2OZ2X;)nn@KSVdVhaA?}@3;6gZxb4v -zozoWSr{{+!h}zGpumG3H`=AvWpm^9kW;J$Jp^Xl*?8ckr`fqN%c|Z;VC0|cM4vSrk -zH_O8Yvh85nvJp^;``wo8=z0f`FWg?`>gO#y1hjX1{}rTlg9rwIKia8eyGexA3GnuR -z`Rg~XZoW;0pA)vI8=p5!+6sIn#C^FCvR>ffv39h6SCNi9v);%WD;WZ`of_MgwyRWy -z-yY%n*Y>X89W-v4`Ff%bx$Vkn}$!Ay}rnY6F$m-Kg*KD_+;Lx#g4|^&N -I02NaX#p`nv=Kufz - -literal 0 -HcmV?d00001 - -diff --git a/tests/resources/small.git/objects/af/5626b4a114abcb82d63db7c8082c3c4756e51b b/tests/resources/small.git/objects/af/5626b4a114abcb82d63db7c8082c3c4756e51b -new file mode 100644 -index 0000000000000000000000000000000000000000..822bc151862ec3763cf2d3fa2372b93bbd3a4b65 -GIT binary patch -literal 30 -mcmb>0i}&W3IZ_@1U=^!a~EV1casc=c+{&un1qQN*i9hD|0|m(2n|iwp*q%W -z%N;b$hu%cM`$TMo*~EnC1BFP&Pfj~;jZVKXQ96s_PhV<-XAROi+@-v8dBLUa`!;GB -k^iXlEv8$>R)1G>9th&t3j;s7J{?^9n|7U^`%mXoWC24Q^m!3%@{ - -literal 0 -HcmV?d00001 - From a6ef617de7a7b1514095bbf19e53e8ed80495c7a Mon Sep 17 00:00:00 2001 From: Emily Date: Tue, 21 Jan 2025 19:04:43 +0000 Subject: [PATCH 06/14] jujutsu: add patch for libgit2 1.9.0 --- pkgs/by-name/ju/jujutsu/libgit2-1.9.0.patch | 52 +++++++++++++++++++++ pkgs/by-name/ju/jujutsu/package.nix | 8 +++- 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 pkgs/by-name/ju/jujutsu/libgit2-1.9.0.patch diff --git a/pkgs/by-name/ju/jujutsu/libgit2-1.9.0.patch b/pkgs/by-name/ju/jujutsu/libgit2-1.9.0.patch new file mode 100644 index 0000000000000..fc68f2ffe0f40 --- /dev/null +++ b/pkgs/by-name/ju/jujutsu/libgit2-1.9.0.patch @@ -0,0 +1,52 @@ +From b4f936ac302ee835aa274e4dd186b436781d5d2f Mon Sep 17 00:00:00 2001 +From: Rui Chen +Date: Thu, 9 Jan 2025 09:51:47 -0500 +Subject: [PATCH] chore(deps): update git2 to use libgit2 1.9 + +Signed-off-by: Rui Chen +--- + Cargo.lock | 8 ++++---- + Cargo.toml | 2 +- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/Cargo.lock b/Cargo.lock +index 69398f4d6d..3ec8dfdacc 100644 +--- a/Cargo.lock ++++ b/Cargo.lock +@@ -913,9 +913,9 @@ checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" + + [[package]] + name = "git2" +-version = "0.19.0" ++version = "0.20.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724" ++checksum = "3fda788993cc341f69012feba8bf45c0ba4f3291fcc08e214b4d5a7332d88aff" + dependencies = [ + "bitflags", + "libc", +@@ -2109,9 +2109,9 @@ checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" + + [[package]] + name = "libgit2-sys" +-version = "0.17.0+1.8.1" ++version = "0.18.0+1.9.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "10472326a8a6477c3c20a64547b0059e4b0d086869eee31e6d7da728a8eb7224" ++checksum = "e1a117465e7e1597e8febea8bb0c410f1c7fb93b1e1cddf34363f8390367ffec" + dependencies = [ + "cc", + "libc", +diff --git a/Cargo.toml b/Cargo.toml +index 0fc4393cb5..b955fd6aa1 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -46,7 +46,7 @@ dirs = "5.0.1" + dunce = "1.0.5" + either = "1.13.0" + futures = "0.3.31" +-git2 = { version = "0.19.0", features = [ ++git2 = { version = "0.20.0", features = [ + # Do *not* disable this feature even if you'd like dynamic linking. Instead, + # set the environment variable `LIBGIT2_NO_VENDOR=1` if dynamic linking must + # be used (this will override the Cargo feature), and allow static linking diff --git a/pkgs/by-name/ju/jujutsu/package.nix b/pkgs/by-name/ju/jujutsu/package.nix index 2ed77e0269426..2811ed8d2d683 100644 --- a/pkgs/by-name/ju/jujutsu/package.nix +++ b/pkgs/by-name/ju/jujutsu/package.nix @@ -36,7 +36,13 @@ rustPlatform.buildRustPackage { }; useFetchCargoVendor = true; - cargoHash = "sha256-NmffqayPfRZhNCihEsjKhoVi5KeMCNbmsGAzC/oKcHs="; + + cargoPatches = [ + # + ./libgit2-1.9.0.patch + ]; + + cargoHash = "sha256-RiiIF9XFwXDgGSPvUMFOft4nH8PR1L3nZ+0s4QPobs8="; nativeBuildInputs = [ installShellFiles From 3a051e393cb8cc9cc82c14c5ee8f67b39dfea14c Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 22 Jan 2025 04:28:10 +0000 Subject: [PATCH 07/14] cargo-update: 16.0.0 -> 16.1.0 Diff: https://diff.rs/cargo-update/16.0.0/16.1.0 Changelog: https://github.com/nabijaczleweli/cargo-update/releases/tag/v16.1.0 --- pkgs/by-name/ca/cargo-update/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ca/cargo-update/package.nix b/pkgs/by-name/ca/cargo-update/package.nix index 42afbf23a7489..5b389029c8973 100644 --- a/pkgs/by-name/ca/cargo-update/package.nix +++ b/pkgs/by-name/ca/cargo-update/package.nix @@ -17,15 +17,15 @@ rustPlatform.buildRustPackage rec { pname = "cargo-update"; - version = "16.0.0"; + version = "16.1.0"; src = fetchCrate { inherit pname version; - hash = "sha256-jLv/9Fvg+1HNIhfm0D/vvMR9J+Enztj9rXQE1kZITGI="; + hash = "sha256-bdIFenNMW5iDQaKS2+lMYVVfc0zpbYNOHQqczpjBNC4="; }; useFetchCargoVendor = true; - cargoHash = "sha256-uoLs1CMNI0N0MpjTdpxDFubg6dgK57DVrxltF4HvG1k="; + cargoHash = "sha256-KujJB9o5+yHu6mEQOvzGUcBS6/fh/jcnt7/FbUPLefg="; nativeBuildInputs = [ From 6b2fda72283edd3b593ea7baae0a7694ba66eae2 Mon Sep 17 00:00:00 2001 From: Audrey Dutcher Date: Wed, 22 Jan 2025 13:47:28 -0700 Subject: [PATCH 08/14] gex: bump version of libgit2 --- pkgs/by-name/ge/gex/package.nix | 2 +- pkgs/by-name/ge/gex/patch-libgit2.patch | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/ge/gex/package.nix b/pkgs/by-name/ge/gex/package.nix index 2003ac6fc2000..53a20c7308a3c 100644 --- a/pkgs/by-name/ge/gex/package.nix +++ b/pkgs/by-name/ge/gex/package.nix @@ -41,7 +41,7 @@ rustPlatform.buildRustPackage rec { ]; useFetchCargoVendor = true; - cargoHash = "sha256-LCmc0yYuy51r2wHEzsJMfssCElG1AbnLLWYYnbk0Ddw="; + cargoHash = "sha256-4ejtMCuJOwT5bJQZaPQ1OjrB5O70we77yEXk9RmhywE="; meta = with lib; { description = "Git Explorer: cross-platform git workflow improvement tool inspired by Magit"; diff --git a/pkgs/by-name/ge/gex/patch-libgit2.patch b/pkgs/by-name/ge/gex/patch-libgit2.patch index df7bd7cdff246..d540c71fa456c 100644 --- a/pkgs/by-name/ge/gex/patch-libgit2.patch +++ b/pkgs/by-name/ge/gex/patch-libgit2.patch @@ -17,10 +17,10 @@ index 5101c2e..0cb59d2 100644 [[package]] name = "git2" -version = "0.18.1" -+version = "0.19.0" ++version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbf97ba92db08df386e10c8ede66a2a0369bd277090afd8710e19e38de9ec0cd" -+checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724" ++checksum = "3fda788993cc341f69012feba8bf45c0ba4f3291fcc08e214b4d5a7332d88aff" dependencies = [ "bitflags 2.3.3", "libc", @@ -29,10 +29,10 @@ index 5101c2e..0cb59d2 100644 [[package]] name = "libgit2-sys" -version = "0.16.1+1.7.1" -+version = "0.17.0+1.8.1" ++version = "0.18.0+1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2a2bb3680b094add03bb3732ec520ece34da31a8cd2d633d1389d0f0fb60d0c" -+checksum = "10472326a8a6477c3c20a64547b0059e4b0d086869eee31e6d7da728a8eb7224" ++checksum = "e1a117465e7e1597e8febea8bb0c410f1c7fb93b1e1cddf34363f8390367ffec" dependencies = [ "cc", "libc", @@ -45,7 +45,7 @@ index 26cef3f..f947945 100644 crossterm = { version = "0.27.0", features = ["serde"] } dirs = "5.0.1" -git2 = { version = "0.18.1", default-features = false } -+git2 = { version = "0.19.0", default-features = false } ++git2 = { version = "0.20.0", default-features = false } itertools = "0.11.0" nom = "7.1.3" paste = "1.0.14" From e57355e04054979b1ee976c472a73cd87884e158 Mon Sep 17 00:00:00 2001 From: Audrey Dutcher Date: Wed, 22 Jan 2025 14:12:17 -0700 Subject: [PATCH 09/14] cargo-generate: add upstream patch to bump libgit2 version --- pkgs/by-name/ca/cargo-generate/package.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/ca/cargo-generate/package.nix b/pkgs/by-name/ca/cargo-generate/package.nix index a6a013570c64e..3c4d01d28f370 100644 --- a/pkgs/by-name/ca/cargo-generate/package.nix +++ b/pkgs/by-name/ca/cargo-generate/package.nix @@ -2,6 +2,7 @@ lib, rustPlatform, fetchFromGitHub, + fetchpatch, pkg-config, libgit2, openssl, @@ -22,7 +23,16 @@ rustPlatform.buildRustPackage rec { }; useFetchCargoVendor = true; - cargoHash = "sha256-bYxUqgFiO0SuttVFvHIX+Dorno5n4jK+2ck89ngssBM="; + + cargoPatches = [ + (fetchpatch { + name = "git2-version.patch"; + url = "https://github.com/cargo-generate/cargo-generate/commit/be2237177ee7ae996e2991189b07a5d211cd0d01.patch"; + hash = "sha256-F/o1EeDBfRhIB8atpOHoc6ZnUFCyD1QkCERv4m/YeWE="; + }) + ]; + + cargoHash = "sha256-5cfROJQWIhQNMbDhaCs2bfv4I3KDWcXBsmbbbDQ331s="; nativeBuildInputs = [ pkg-config ]; From 9ef4c2889647ea36466c44b0d248011307f20b52 Mon Sep 17 00:00:00 2001 From: Audrey Dutcher Date: Wed, 22 Jan 2025 15:04:13 -0700 Subject: [PATCH 10/14] git-mit: add upstream patch for libgit2 version bump --- pkgs/by-name/gi/git-mit/package.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/gi/git-mit/package.nix b/pkgs/by-name/gi/git-mit/package.nix index f065a7964fa35..41511664af937 100644 --- a/pkgs/by-name/gi/git-mit/package.nix +++ b/pkgs/by-name/gi/git-mit/package.nix @@ -1,6 +1,7 @@ { lib , rustPlatform , fetchFromGitHub +, fetchpatch , pkg-config , libgit2 , openssl @@ -24,7 +25,16 @@ rustPlatform.buildRustPackage { }; useFetchCargoVendor = true; - cargoHash = "sha256-sdAs8zJlmTqapWJNDck9YUHIiXhi0Ji6smejE5jEQXQ="; + + cargoPatches = [ + (fetchpatch { + name = "libgit2-update.patch"; + url = "https://github.com/PurpleBooth/git-mit/pull/1543/commits/3e82a4f5017972c7d28151a468bb71fe7d2279e0.patch"; + hash = "sha256-M9RpZHjOpZZqdHQe57LwMZ9zX6/4BNg3ymz8H3qupFk="; + }) + ]; + + cargoHash = "sha256-uoS6vmHmOVkHS81mrsbbXqP/dAC/FNHAlpTDHSa632k="; nativeBuildInputs = [ pkg-config ]; From c868f57c9a71dea5bb905aacff9772622f5c0568 Mon Sep 17 00:00:00 2001 From: Audrey Dutcher Date: Wed, 22 Jan 2025 16:18:05 -0700 Subject: [PATCH 11/14] edopro: add patch from upstream to fix libgit2 version bump --- pkgs/by-name/ed/edopro/package.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/by-name/ed/edopro/package.nix b/pkgs/by-name/ed/edopro/package.nix index adf1c896b0d3b..f77e13b189495 100644 --- a/pkgs/by-name/ed/edopro/package.nix +++ b/pkgs/by-name/ed/edopro/package.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchFromGitHub, + fetchpatch, fetchzip, makeWrapper, premake5, @@ -140,6 +141,14 @@ let sqlite ]; + patches = [ + (fetchpatch { + name = "libgit2-version.patch"; + url = "https://github.com/edo9300/edopro/commit/f8ddbfff51231827a8dd1dcfcb2dda85f50a56d9.patch"; + hash = "sha256-w9VTmWfw6vEyVvsOH+AK9lAbUOV+MagzGQ3Wa5DCS/U="; + }) + ]; + # nixpkgs' gcc stack currently appears to not support LTO postPatch = '' substituteInPlace premake5.lua \ From 97975c25ad1492f9d920959b014086a0af6467ca Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 22 Jan 2025 23:15:51 +0000 Subject: [PATCH 12/14] git-warp-time: 0.8.4 -> 0.8.5 Diff: https://github.com/alerque/git-warp-time/compare/None...v0.8.5 Changelog: https://github.com/alerque/git-warp-time/raw/v0.8.5/CHANGELOG.md --- pkgs/by-name/gi/git-warp-time/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/gi/git-warp-time/package.nix b/pkgs/by-name/gi/git-warp-time/package.nix index ff50317d8ec8e..a4f19641adf04 100644 --- a/pkgs/by-name/gi/git-warp-time/package.nix +++ b/pkgs/by-name/gi/git-warp-time/package.nix @@ -17,17 +17,17 @@ stdenv.mkDerivation (finalAttrs: { pname = "git-warp-time"; - version = "0.8.4"; + version = "0.8.5"; src = fetchurl { url = "https://github.com/alerque/git-warp-time/releases/download/v${finalAttrs.version}/git-warp-time-${finalAttrs.version}.tar.zst"; - hash = "sha256-Xh30nA77cJ7+UfKlIslnyD+93AtnQ+8P3sCFsG0DAUk="; + hash = "sha256-bt94Y1EIcLzz1v2Nwyde63y6FWD+iaFkoEYoQpWVWGY="; }; cargoDeps = rustPlatform.fetchCargoTarball { inherit (finalAttrs) pname version src; nativeBuildInputs = [ zstd ]; - hash = "sha256-bmClqtH1xU2KOKVbCOrgN14jpLKiA2ZMzWwrOiufwnQ="; + hash = "sha256-qUhMTuvli4hUyHrFWmyaB1Rc/DS9Epae9S/mp6c9LSw="; }; nativeBuildInputs = [ From a6e9cf8cb3c8e27d9ccdea1f2268aed25f2acdf2 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 22 Jan 2025 23:37:28 +0000 Subject: [PATCH 13/14] guile-git: add patches for `libgit2` 1.9.0 --- ...e-field-from-config-entry-on-libgit2.patch | 80 ++++++++++++++++++ ...te-refs-field-to-remote-callbacks-on.patch | 84 +++++++++++++++++++ pkgs/by-name/gu/guile-git/package.nix | 5 ++ 3 files changed, 169 insertions(+) create mode 100644 pkgs/by-name/gu/guile-git/0001-structs-Omit-free-field-from-config-entry-on-libgit2.patch create mode 100644 pkgs/by-name/gu/guile-git/0002-structs-Add-update-refs-field-to-remote-callbacks-on.patch diff --git a/pkgs/by-name/gu/guile-git/0001-structs-Omit-free-field-from-config-entry-on-libgit2.patch b/pkgs/by-name/gu/guile-git/0001-structs-Omit-free-field-from-config-entry-on-libgit2.patch new file mode 100644 index 0000000000000..ce3db57c0bf98 --- /dev/null +++ b/pkgs/by-name/gu/guile-git/0001-structs-Omit-free-field-from-config-entry-on-libgit2.patch @@ -0,0 +1,80 @@ +From cc70ed70b19a712babd834806d6fc700b20c020a Mon Sep 17 00:00:00 2001 +From: Emily +Date: Wed, 22 Jan 2025 23:25:51 +0000 +Subject: [PATCH 1/2] =?UTF-8?q?structs:=20Omit=20=E2=80=98free=E2=80=99=20?= + =?UTF-8?q?field=20from=20=E2=80=98%config-entry=E2=80=99=20on=20libgit2?= + =?UTF-8?q?=201.9+.?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +* configure.ac: Check for the ‘free’ field of ‘git_config_entry’. +* git/configuration.scm.in (%have-config-entry-free?): New variable. +* git/structs.scm (%config-entry): Omit ‘free’ field conditionally. +--- + configure.ac | 10 ++++++++++ + git/configuration.scm.in | 4 ++++ + git/structs.scm | 4 +++- + 3 files changed, 17 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index b04ca6b..7f8f0b9 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -87,6 +87,16 @@ else + fi + AC_SUBST([HAVE_CONFIG_ENTRY_BACKEND_TYPE]) + ++dnl Does 'git_config_entry' have 'free'? Removed in 1.9. ++AC_CHECK_MEMBER([git_config_entry.free], [], [], ++ [[#include ]]) ++if test "x$ac_cv_member_git_config_entry_free" = "xyes"; then ++ HAVE_CONFIG_ENTRY_FREE="#true" ++else ++ HAVE_CONFIG_ENTRY_FREE="#false" ++fi ++AC_SUBST([HAVE_CONFIG_ENTRY_FREE]) ++ + dnl Does 'git_diff_options' have 'oid_type'? It's new in 1.7. + AC_CHECK_MEMBER([git_diff_options.oid_type], [], [], + [[#include ]]) +diff --git a/git/configuration.scm.in b/git/configuration.scm.in +index e10b195..864b9ff 100644 +--- a/git/configuration.scm.in ++++ b/git/configuration.scm.in +@@ -24,6 +24,7 @@ + %have-fetch-options-depth? + %have-diff-options-oid-type? + %have-config-entry-backend-type? ++ %have-config-entry-free? + %have-GIT_OPT_SET_SERVER_CONNECT_TIMEOUT? + %have-GIT_OPT_SET_HOMEDIR? + %have-GIT_OPT_SET_USER_AGENT_PRODUCT?)) +@@ -48,6 +49,9 @@ + (define %have-config-entry-backend-type? + @HAVE_CONFIG_ENTRY_BACKEND_TYPE@) + ++(define %have-config-entry-free? ++ @HAVE_CONFIG_ENTRY_FREE@) ++ + (define %have-GIT_OPT_SET_SERVER_CONNECT_TIMEOUT? + @HAVE_GIT_OPT_SET_SERVER_CONNECT_TIMEOUT@) + +diff --git a/git/structs.scm b/git/structs.scm +index beebd11..b35ae6d 100644 +--- a/git/structs.scm ++++ b/git/structs.scm +@@ -505,7 +505,9 @@ + '()) + (include-depth ,unsigned-int) + (level ,int) ;git_config_level_t +- (free ,(bs:pointer int)) ++ ,@(if %have-config-entry-free? ++ `(free ,(bs:pointer int)) ++ '()) + ,@(if %have-config-entry-backend-type? + '() + `((payload ,(bs:pointer int))))))) ;removed in 1.8 +-- +2.47.0 + diff --git a/pkgs/by-name/gu/guile-git/0002-structs-Add-update-refs-field-to-remote-callbacks-on.patch b/pkgs/by-name/gu/guile-git/0002-structs-Add-update-refs-field-to-remote-callbacks-on.patch new file mode 100644 index 0000000000000..34de2004bb43d --- /dev/null +++ b/pkgs/by-name/gu/guile-git/0002-structs-Add-update-refs-field-to-remote-callbacks-on.patch @@ -0,0 +1,84 @@ +From 595b850c85f55592b94d2218a12084fd7050b508 Mon Sep 17 00:00:00 2001 +From: Emily +Date: Wed, 22 Jan 2025 23:55:45 +0000 +Subject: [PATCH 2/2] =?UTF-8?q?structs:=20Add=20=E2=80=98update-refs?= + =?UTF-8?q?=E2=80=99=20field=20to=20=E2=80=98%remote-callbacks=E2=80=99=20?= + =?UTF-8?q?on=20libgit2=201.9+.?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +* configure.ac: Check for the ‘update_refs’ field of +‘git_remote_callbacks’. +* git/configuration.scm.in (%have-remote-callbacks-update-refs?): New +variable. +* git/structs.scm (%remote-callbacks): Add ‘update-refs’ field +conditionally. +--- + configure.ac | 10 ++++++++++ + git/configuration.scm.in | 4 ++++ + git/structs.scm | 5 ++++- + 3 files changed, 18 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 7f8f0b9..a2575f4 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -107,6 +107,16 @@ else + fi + AC_SUBST([HAVE_DIFF_OPTIONS_OID_TYPE]) + ++dnl Does 'git_remote_callbacks' have 'update_refs'? New in 1.9. ++AC_CHECK_MEMBER([git_remote_callbacks.update_refs], [], [], ++ [[#include ]]) ++if test "x$ac_cv_member_git_remote_callbacks_update_refs" = "xyes"; then ++ HAVE_REMOTE_CALLBACKS_UPDATE_REFS="#true" ++else ++ HAVE_REMOTE_CALLBACKS_UPDATE_REFS="#false" ++fi ++AC_SUBST([HAVE_REMOTE_CALLBACKS_UPDATE_REFS]) ++ + dnl 'GIT_OPT_SET_SERVER_CONNECT_TIMEOUT' & co. are new in 1.7. + GUILE_GIT_CHECK_DECLARATION([GIT_OPT_SET_SERVER_CONNECT_TIMEOUT]) + +diff --git a/git/configuration.scm.in b/git/configuration.scm.in +index 864b9ff..1e82c24 100644 +--- a/git/configuration.scm.in ++++ b/git/configuration.scm.in +@@ -25,6 +25,7 @@ + %have-diff-options-oid-type? + %have-config-entry-backend-type? + %have-config-entry-free? ++ %have-remote-callbacks-update-refs? + %have-GIT_OPT_SET_SERVER_CONNECT_TIMEOUT? + %have-GIT_OPT_SET_HOMEDIR? + %have-GIT_OPT_SET_USER_AGENT_PRODUCT?)) +@@ -52,6 +53,9 @@ + (define %have-config-entry-free? + @HAVE_CONFIG_ENTRY_FREE@) + ++(define %have-remote-callbacks-update-refs? ++ @HAVE_REMOTE_CALLBACKS_UPDATE_REFS@) ++ + (define %have-GIT_OPT_SET_SERVER_CONNECT_TIMEOUT? + @HAVE_GIT_OPT_SET_SERVER_CONNECT_TIMEOUT@) + +diff --git a/git/structs.scm b/git/structs.scm +index b35ae6d..664a7c1 100644 +--- a/git/structs.scm ++++ b/git/structs.scm +@@ -670,7 +670,10 @@ type to 'specified for this to take effect." + (transport ,(bs:pointer uint8)) + (remote-ready ,(bs:pointer void)) + (payload ,(bs:pointer uint8)) +- (resolve-url ,(bs:pointer uint8))))) ++ (resolve-url ,(bs:pointer uint8)) ++ ,@(if %have-remote-callbacks-update-refs? ++ `((update-refs ,(bs:pointer uint8))) ++ '())))) + + (define-record-type + (%make-remote-callbacks bytestructure) +-- +2.47.0 + diff --git a/pkgs/by-name/gu/guile-git/package.nix b/pkgs/by-name/gu/guile-git/package.nix index d7ee5344530e3..3765bc06f034d 100644 --- a/pkgs/by-name/gu/guile-git/package.nix +++ b/pkgs/by-name/gu/guile-git/package.nix @@ -20,6 +20,11 @@ stdenv.mkDerivation rec { hash = "sha256-lFBoA1VBJRHcZkP3h2gnlXQrMjDFWS4jl9RlF8VVf/Q="; }; + patches = [ + ./0001-structs-Omit-free-field-from-config-entry-on-libgit2.patch + ./0002-structs-Add-update-refs-field-to-remote-callbacks-on.patch + ]; + strictDeps = true; nativeBuildInputs = [ autoreconfHook guile pkg-config texinfo From a50178ff9bda96cbda4519321a0122f11e0b2fb9 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 22 Jan 2025 23:37:28 +0000 Subject: [PATCH 14/14] guile-git: enable tests on Darwin --- pkgs/by-name/gu/guile-git/package.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/gu/guile-git/package.nix b/pkgs/by-name/gu/guile-git/package.nix index 3765bc06f034d..dd4f15c50af22 100644 --- a/pkgs/by-name/gu/guile-git/package.nix +++ b/pkgs/by-name/gu/guile-git/package.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ libgit2 scheme-bytestructures ]; - doCheck = !stdenv.hostPlatform.isDarwin; + doCheck = true; makeFlags = [ "GUILE_AUTO_COMPILE=0" ]; enableParallelBuilding = true; @@ -45,6 +45,8 @@ stdenv.mkDerivation rec { sed -i -e '94i (test-skip 1)' ./tests/proxy.scm ''; + __darwinAllowLocalNetworking = true; + meta = with lib; { description = "Bindings to Libgit2 for GNU Guile"; homepage = "https://gitlab.com/guile-git/guile-git";