GNU bug report logs

#27211 [PATCH: core-updates] gnu: packages: libgit2: fix build and test runs

PackageSource(s)Maintainer(s)
guix-patches PTS Buildd Popcon
Reply or subscribe to this bug. View this bug as an mbox, status mbox, or maintainer mbox

Report forwarded to guix-patches@gnu.org:
bug#27211; Package guix-patches. (Sat, 03 Jun 2017 15:19:01 GMT) (full text, mbox, link).


Acknowledgement sent to Sergei Trofimovich <slyfox@inbox.ru>:
New bug report received and forwarded. Copy sent to guix-patches@gnu.org. (Sat, 03 Jun 2017 15:19:01 GMT) (full text, mbox, link).


Message #5 received at submit@debbugs.gnu.org (full text, mbox, reply):

From: Sergei Trofimovich <slyfox@inbox.ru>
To: guix-patches@gnu.org
Cc: Sergei Trofimovich <slyfox@inbox.ru>
Subject: [PATCH: core-updates] gnu: packages: libgit2: fix build and test runs
Date: Sat, 3 Jun 2017 16:17:58 +0100
This commit reverts 'patch' hack introduced in
a48a1071a686b250bf8b7982ca0ce8dda1d93c61 and fixes
bug in clar test framework.

Patch is proposed to clar upstream as
https://github.com/vmg/clar/pull/78

* gnu/local.mk: add libgit2-0.25.1-mtime-0.patch
* gnu/packages/patches/libgit2-0.25.1-mtime-0.patch: new file
* gnu/packages/version-control.scm: remove 'patch' hack and apply
  libgit2-0.25.1-mtime-0.patch to fix tests

Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
---
 gnu/local.mk                                      |  1 +
 gnu/packages/patches/libgit2-0.25.1-mtime-0.patch | 13 +++++++++++++
 gnu/packages/version-control.scm                  | 18 ++++--------------
 3 files changed, 18 insertions(+), 14 deletions(-)
 create mode 100644 gnu/packages/patches/libgit2-0.25.1-mtime-0.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 95efe60ed..aacf9b020 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -720,6 +720,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/libevent-2.1-dns-tests.patch		\
   %D%/packages/patches/libevent-2.1-skip-failing-test.patch	\
   %D%/packages/patches/libextractor-ffmpeg-3.patch		\
+  %D%/packages/patches/libgit2-0.25.1-mtime-0.patch		\
   %D%/packages/patches/libgit2-use-after-free.patch		\
   %D%/packages/patches/libffi-3.2.1-complex-alpha.patch		\
   %D%/packages/patches/libjxr-fix-function-signature.patch	\
diff --git a/gnu/packages/patches/libgit2-0.25.1-mtime-0.patch b/gnu/packages/patches/libgit2-0.25.1-mtime-0.patch
new file mode 100644
index 000000000..8ea018103
--- /dev/null
+++ b/gnu/packages/patches/libgit2-0.25.1-mtime-0.patch
@@ -0,0 +1,13 @@
+clar has a bug on fils with mtime=0 where
+it skips file parsing phase.
+
+https://github.com/vmg/clar/pull/78
+diff --git a/tests/generate.py b/tests/generate.py
+index b639c8f..111ca41 100644
+--- a/tests/generate.py
++++ b/tests/generate.py
+@@ -63,3 +63,3 @@ class Module(object):
+ 
+-        self.mtime = 0
++        self.mtime = None # guix sets all file mtimes to '0'
+         self.enabled = True
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index cd684c04e..e82e04053 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -335,7 +335,9 @@ everything from small to very large projects with speed and efficiency.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "1cdwcw38frc1wf28x5ppddazv9hywc718j92f3xa3ybzzycyds3s"))))
+                "1cdwcw38frc1wf28x5ppddazv9hywc718j92f3xa3ybzzycyds3s"))
+              (patches (search-patches "libgit2-use-after-free.patch"
+                                       "libgit2-0.25.1-mtime-0.patch"))))
     (build-system cmake-build-system)
     (arguments
      `(#:phases
@@ -348,25 +350,13 @@ 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)
-       ("patch" ,(search-patch "libgit2-use-after-free.patch"))))
+       ("python" ,python-wrapper)))
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (propagated-inputs
-- 
2.13.0





Information forwarded to guix-patches@gnu.org:
bug#27211; Package guix-patches. (Sat, 03 Jun 2017 23:01:01 GMT) (full text, mbox, link).


Message #8 received at 27211@debbugs.gnu.org (full text, mbox, reply):

From: ludo@gnu.org (Ludovic Courtès)
To: Sergei Trofimovich <slyfox@inbox.ru>
Cc: 27211@debbugs.gnu.org
Subject: Re: bug#27211: [PATCH: core-updates] gnu: packages: libgit2: fix build and test runs
Date: Sun, 04 Jun 2017 01:00:13 +0200
Hello,

Sergei Trofimovich <slyfox@inbox.ru> skribis:

> This commit reverts 'patch' hack introduced in
> a48a1071a686b250bf8b7982ca0ce8dda1d93c61 and fixes
> bug in clar test framework.
>
> Patch is proposed to clar upstream as
> https://github.com/vmg/clar/pull/78
>
> * gnu/local.mk: add libgit2-0.25.1-mtime-0.patch
> * gnu/packages/patches/libgit2-0.25.1-mtime-0.patch: new file
> * gnu/packages/version-control.scm: remove 'patch' hack and apply
>   libgit2-0.25.1-mtime-0.patch to fix tests
>
> Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>

Woow, good catch!

I’ve pushed it to ‘master’ (I adjusted the commit log and the comment in
the patch) since few packages depend on libgit2 according to ‘guix
refresh -l’.

Thanks!

Ludo’.




Added tag(s) fixed. Request was from ludo@gnu.org (Ludovic Courtès) to control@debbugs.gnu.org. (Sat, 03 Jun 2017 23:01:01 GMT) (full text, mbox, link).


bug closed, send any further explanations to 27211@debbugs.gnu.org and Sergei Trofimovich <slyfox@inbox.ru> Request was from ludo@gnu.org (Ludovic Courtès) to control@debbugs.gnu.org. (Sat, 03 Jun 2017 23:01:02 GMT) (full text, mbox, link).


bug archived. Request was from Debbugs Internal Request <help-debbugs@gnu.org> to internal_control@debbugs.gnu.org. (Sun, 02 Jul 2017 11:24:04 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


debbugs.gnu.org maintainers <help-debbugs@gnu.org>. Last modified: Mon Nov 4 22:08:59 2024; Machine Name: wallace-server

GNU bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.