summaryrefslogtreecommitdiff
path: root/gnu/packages/version-control.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-03-27 23:46:28 +0200
committerLudovic Courtès <ludo@gnu.org>2017-03-28 00:32:37 +0200
commita48a1071a686b250bf8b7982ca0ce8dda1d93c61 (patch)
tree38f17af2b10d7ba3697bd85c9cb405c24f77be33 /gnu/packages/version-control.scm
parentbc4a2b853c92b29d8590db711dbd8bd1bc22db3d (diff)
downloadguix-patches-a48a1071a686b250bf8b7982ca0ce8dda1d93c61.tar
guix-patches-a48a1071a686b250bf8b7982ca0ce8dda1d93c61.tar.gz
gnu: libgit2: Patch use-after-free.
* gnu/packages/patches/libgit2-use-after-free.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/version-control.scm (libgit2)[inputs]: Add it. [arguments] <#:phases>: Add 'apply-patch' phase.
Diffstat (limited to 'gnu/packages/version-control.scm')
-rw-r--r--gnu/packages/version-control.scm14
1 files changed, 13 insertions, 1 deletions
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 0e04f1a1c3..57589c04aa 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -342,13 +342,25 @@ everything from small to very large projects with speed and efficiency.")
(("/bin/cp") (which "cp"))
(("/bin/rm") (which "rm")))
#t))
+ (add-after 'unpack 'apply-patch
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; XXX: For some reason adding the patch in 'patches', which
+ ;; leads to a new tarball with all timestamps reset and ordering
+ ;; by name (slightly different file order compared to the
+ ;; original tarball) leads to an obscure Python error while
+ ;; running 'generate.py':
+ ;; 'Module' object has no attribute 'callbacks'
+ ;; Thus, apply the patch here, which minimizes disruption.
+ (let ((patch (assoc-ref inputs "patch")))
+ (zero? (system* "patch" "-p1" "--force" "--input" patch)))))
;; Run checks more verbosely.
(replace 'check
(lambda _ (zero? (system* "./libgit2_clar" "-v" "-Q")))))))
(inputs
`(("libssh2" ,libssh2)
("libcurl" ,curl)
- ("python" ,python-wrapper)))
+ ("python" ,python-wrapper)
+ ("patch" ,(search-patch "libgit2-use-after-free.patch"))))
(native-inputs
`(("pkg-config" ,pkg-config)))
(propagated-inputs