summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-03-31 16:34:47 +0000
committerLudovic Courtès <ludo@gnu.org>2022-05-11 23:50:26 +0200
commite764b89a52171fd5ff6d22fdb562ceb60ec6a50a (patch)
treecc8cc0151e542a215675634e546687d00f210899 /gnu
parentd24ad3949127a938cad306f0524c120afe5e2e4f (diff)
downloadguix-e764b89a52171fd5ff6d22fdb562ceb60ec6a50a.tar.gz
gnu: libgit2: Update to 1.4.3.
* gnu/packages/version-control.scm (libgit2): Update to 1.4.3.
[source]: Adjust snippet to comment out the "10 years ago" test, which
was changed in 1.4.3 but is still problematic.
[arguments]: Add "-DUSE_SSH=ON".  Remove 'fix-hardcoded-paths' phase.
Adjust 'check' phase for new executable name.
(libgit2-1.3): New variable.
(libgit2-1.1): Inherit from 'libgit2-1.3'; inherit from its origin too.
* gnu/packages/crates-io.scm (rust-git2-0.13)[inputs]: Use LIBGIT2-1.3.
* gnu/packages/python-xyz.scm (python-pygit2)[propagated-inputs]: Likewise.

Co-authored-by: Maxime Devos <maximedevos@telenet.be>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/crates-io.scm2
-rw-r--r--gnu/packages/python-xyz.scm2
-rw-r--r--gnu/packages/version-control.scm66
3 files changed, 41 insertions, 29 deletions
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 7c55c7593e..136e5fe727 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -25048,7 +25048,7 @@ dirty state into your program.")
      `(("pkg-config" ,pkg-config)
        ("git" ,git-minimal)))           ;for a single test
     (inputs
-     (list libgit2 libssh2 openssl zlib))
+     (list libgit2-1.3 libssh2 openssl zlib))
     (home-page "https://github.com/rust-lang/git2-rs")
     (synopsis "Rust bindings to libgit2")
     (description
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 659538d193..299804ae3e 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -6137,7 +6137,7 @@ readable format.")
     (arguments
      '(#:tests? #f))            ; tests don't run correctly in our environment
     (propagated-inputs
-     (list python-cached-property python-cffi libgit2))
+     (list python-cached-property python-cffi libgit2-1.3))
     (native-inputs
      (list python-pytest))
     (home-page "https://github.com/libgit2/pygit2")
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 49b53789f9..d528a08e63 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -44,6 +44,7 @@
 ;;; Copyright © 2021 jgart <jgart@dismail.de>
 ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
 ;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com>
+;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -789,7 +790,7 @@ to GitHub contributions calendar.")
 (define-public libgit2
   (package
     (name "libgit2")
-    (version "1.3.0")
+    (version "1.4.3")
     (source (origin
               ;; Since v1.1.1, release artifacts are no longer offered (see:
               ;; https://github.com/libgit2/libgit2/discussions/5932#discussioncomment-1682729).
@@ -800,18 +801,18 @@ to GitHub contributions calendar.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0vgpb2175a5dhqiy1iwywwppahgqhi340i8bsvafjpvkw284vazd"))
+                "02x1a4zrzpzjd0yxnsi8njh5hgihc1iy1v4r0fnl8m4ckcgp6x2s"))
               (modules '((guix build utils)))
               (snippet
                '(begin
                   (delete-file-recursively "deps")
 
                   ;; The "refs:revparse::date" test is time-dependent: it
-                  ;; assumes "HEAD@{10 years ago}" doesn't match anything,
-                  ;; which is no longer true.  Adjust that test.
+                  ;; assumes "HEAD@{10 years ago}" matches a specific commit.
+                  ;; See <https://github.com/libgit2/libgit2/pull/6299>.
                   (substitute* "tests/refs/revparse.c"
-                    (("10 years ago")
-                     "100 years ago"))))))
+                    (("test_object.*10 years ago.*" all)
+                     (string-append "// " all "\n")))))))
     (build-system cmake-build-system)
     (outputs '("out" "debug"))
     (arguments
@@ -819,6 +820,7 @@ to GitHub contributions calendar.")
        (list "-DUSE_NTLMCLIENT=OFF" ;TODO: package this
              "-DREGEX_BACKEND=pcre2"
              "-DUSE_HTTP_PARSER=system"
+             "-DUSE_SSH=ON" ; cmake fails to find libssh if this is missing
              ,@(if (%current-target-system)
                    `((string-append
                       "-DPKG_CONFIG_EXECUTABLE="
@@ -829,18 +831,11 @@ to GitHub contributions calendar.")
                    '()))
        #:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'fix-hardcoded-paths
-           (lambda _
-             (substitute* "tests/repo/init.c"
-               (("#!/bin/sh") (string-append "#!" (which "sh"))))
-             (substitute* "tests/clar/fs.h"
-               (("/bin/cp") (which "cp"))
-               (("/bin/rm") (which "rm")))))
          ;; Run checks more verbosely, unless we are cross-compiling.
          (replace 'check
            (lambda* (#:key (tests? #t) #:allow-other-keys)
              (if tests?
-                 (invoke "./libgit2_clar" "-v" "-Q")
+                 (invoke "./libgit2_tests" "-v" "-Q")
                  ;; Tests may be disabled if cross-compiling.
                  (format #t "Test suite not run.~%")))))))
     (inputs
@@ -859,12 +854,39 @@ write native speed custom Git applications in any language with bindings.")
     ;; GPLv2 with linking exception
     (license license:gpl2)))
 
-(define-public libgit2-1.1
+(define-public libgit2-1.3
   (package
     (inherit libgit2)
-    (name "libgit2")
+    (version "1.3.0")
+    (source (origin
+              (inherit (package-source libgit2))
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/libgit2/libgit2")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name "libgit2" version))
+              (sha256
+               (base32
+                "0vgpb2175a5dhqiy1iwywwppahgqhi340i8bsvafjpvkw284vazd"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments libgit2)
+       ((#:phases _ '%standard-phases)
+        `(modify-phases %standard-phases
+           ;; Run checks more verbosely, unless we are cross-compiling.
+           (replace 'check
+             (lambda* (#:key (tests? #t) #:allow-other-keys)
+               (if tests?
+                   (invoke "./libgit2_clar" "-v" "-Q")
+                   ;; Tests may be disabled if cross-compiling.
+                   (format #t "Test suite not run.~%"))))))))))
+
+(define-public libgit2-1.1
+  (package
+    (inherit libgit2-1.3)
     (version "1.1.0")
     (source (origin
+              (inherit (package-source libgit2-1.3))
+              (file-name #f)                      ;use the default name
               (method url-fetch)
               (uri (string-append "https://github.com/libgit2/libgit2/"
                                   "releases/download/v" version
@@ -872,17 +894,7 @@ write native speed custom Git applications in any language with bindings.")
               (sha256
                (base32
                 "1fjdglkh04qv3b4alg621pxa689i0wlf8m7nf2755zawjr2zhwxd"))
-              (patches (search-patches "libgit2-mtime-0.patch"))
-              (snippet '(begin
-                          (delete-file-recursively "deps")
-
-                          ;; The "refs:revparse::date" test is time-dependent: it
-                          ;; assumes "HEAD@{10 years ago}" doesn't match anything,
-                          ;; which is no longer true.  Adjust that test.
-                          (substitute* "tests/refs/revparse.c"
-                            (("10 years ago")
-                             "100 years ago"))))
-              (modules '((guix build utils)))))))
+              (patches (search-patches "libgit2-mtime-0.patch"))))))
 
 (define-public git-crypt
   (package