GNU bug report logs - #28138
bug build python-pygit2 on guix 0.13

Previous Next

Package: guix;

Reported by: Adrien Marin <adrien.marin <at> ensea.fr>

Date: Fri, 18 Aug 2017 15:09:01 UTC

Severity: normal

Done: Marius Bakke <mbakke <at> fastmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 28138 in the body.
You can then email your comments to 28138 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#28138; Package guix. (Fri, 18 Aug 2017 15:09:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Adrien Marin <adrien.marin <at> ensea.fr>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Fri, 18 Aug 2017 15:09:01 GMT) Full text and rfc822 format available.

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

From: Adrien Marin <adrien.marin <at> ensea.fr>
To: bug-guix <at> gnu.org
Subject: bug build python-pygit2 on guix 0.13
Date: Fri, 18 Aug 2017 16:26:04 +0200 (CEST)
[Message part 1 (text/plain, inline)]
Hi, 

yesterday ,I updated guix and try to install my package's new version and the install fail because of pygit2 error. 

I've found a bug with the package python-pygit2 when I tried to build it: 

" #error You need a compatible libgit2 version (v0.25.x)" 

so I change in the definition of python-pygit2, in propagated input : 

("libgit2" ,libgit2) ---> ("libgit2-0.25.1" ,libgit2-0.25.1) 

and add the definition of libgit2-0.25.1 in my own package 



after that, i get another issue during the build of python-pygit2, during the check phase : 

>ERROR: test_describe_pattern (test.test_describe.DescribeTest)
>----------------------------------------------------------------------
>Traceback (most recent call last):
>  File "/tmp/guix-build-python-pygit2-0.25.0.drv-0/pygit2-0.25.0/test/test_describe.py", line 70, in test_describe_pattern
>   self.assertEqual('public/tag2-2-g2be5719', self.repo.describe(pattern='public/*'))
>  File "/tmp/guix-build-python-pygit2-0.25.0.drv-0/pygit2-0.25.0/pygit2/repository.py", line 728, in describe
>    check_error(err)
>  File "/tmp/guix-build-python-pygit2-0.25.0.drv-0/pygit2-0.25.0/pygit2/errors.py", line 64, in check_error
>    raise GitError(message)
>_pygit2.GitError: Cannot describe - No reference found, cannot describe anything.
>
>----------------------------------------------------------------------
>Ran 266 tests in 11.741s
>
>FAILED (errors=1)
>phase `check' failed after 18.0 seconds
>builder for `/gnu/store/1f3nya5lmmwxyhvc6yalzyn2irwrpkk9-python-pygit2-0.25.0.drv' failed with exit code 1
>@ build-failed /gnu/store/1f3nya5lmmwxyhvc6yalzyn2irwrpkk9-python-pygit2-0.25.0.drv - 1 builder for `/gnu/store/1f3nya5lmmwxyhvc6yalzyn2irwrpkk9-python-pygit2-0.25.0.drv' failed with exit code 1
>guix build: error: build failed: build of `/gnu/store/1f3nya5lmmwxyhvc6yalzyn2irwrpkk9-python-pygit2-0.25.0.drv' failed 

so I looked the dependencies of python-pygit2 and saw that python-cffi changed version in guix 0.13 than my old version 

so I force the 1.4.2 version of python-cffi in the definition of pygit2 AND IT'S WORKING!! 


there is the definition of olds version for python-cffi and libgit2 

define-public libgit2
  (package
    (name "libgit2")
    (version "0.25.1")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://github.com/libgit2/libgit2/"
                                  "archive/v" version ".tar.gz"))
              (file-name (string-append name "-" version ".tar.gz"))
              (sha256
               (base32
                "1cdwcw38frc1wf28x5ppddazv9hywc718j92f3xa3ybzzycyds3s"))))
    (build-system cmake-build-system)
    (arguments
     `(#: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")))
             #t))
         ;; Run checks more verbosely.
         (replace 'check
           (lambda _ (zero? (system* "./libgit2_clar" "-v" "-Q")))))))
    (inputs
     `(("libssh2" ,libssh2)
       ("libcurl" ,curl)
       ("python" ,python-wrapper)
       ("openssl" ,openssl)))
    (native-inputs
     `(("pkg-config" ,pkg-config)))
    (home-page "https://libgit2.github.com/")
    (synopsis "Library providing Git core methods")
    (description
     "Libgit2 is a portable, pure C implementation of the Git core methods
provided as a re-entrant linkable library with a solid API, allowing you to
write native speed custom Git applications in any language with bindings.")
    ;; GPLv2 with linking exception
    (license license:gpl2))) 

(define-public python-cffi-1.4.2 
(package 
(name "python-cffi") 
(version "1.4.2") 
(source 
(origin 
(method url-fetch) 
(uri (pypi-uri "cffi" version)) 
(sha256 
(base32 "161rj52rzi3880lij17d6i9kvgkiwjilrqjs8405k8sf6ryif7cg")))) 
(build-system python-build-system) 
(outputs '("out" "doc")) 
(inputs 
`(("libffi" ,libffi))) 
(propagated-inputs ; required at run-time 
`(("python-pycparser" ,python-pycparser))) 
(native-inputs 
`(("pkg-config" ,pkg-config) 
("python-sphinx" ,python-sphinx) 
("python-pytest" ,python-pytest))) 
(arguments 
`(#:phases 
(alist-cons-after 
'install 'install-doc 
(lambda* (#:key outputs #:allow-other-keys) 
(let* ((data (string-append (assoc-ref outputs "doc") "/share")) 
(doc (string-append data "/doc/" ,name "-" ,version)) 
(html (string-append doc "/html"))) 
(with-directory-excursion "doc" 
(system* "make" "html") 
(mkdir-p html) 
(copy-recursively "build/html" html)) 
(copy-file "LICENSE" (string-append doc "/LICENSE")))) 
%standard-phases))) 
(home-page "http://cffi.readthedocs.org") 
(synopsis "Foreign function interface for Python") 
(description 
"Foreign Function Interface for Python calling C code.") 
(license license:expat))) 


[Message part 2 (text/html, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#28138; Package guix. (Fri, 18 Aug 2017 19:45:01 GMT) Full text and rfc822 format available.

Message #8 received at 28138 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: Adrien Marin <adrien.marin <at> ensea.fr>, 28138 <at> debbugs.gnu.org
Subject: Re: bug#28138: bug build python-pygit2 on guix 0.13
Date: Fri, 18 Aug 2017 21:43:53 +0200
[Message part 1 (text/plain, inline)]
Adrien Marin <adrien.marin <at> ensea.fr> writes:

> Hi, 
>
> yesterday ,I updated guix and try to install my package's new version and the install fail because of pygit2 error. 
>
> I've found a bug with the package python-pygit2 when I tried to build it: 
>
> " #error You need a compatible libgit2 version (v0.25.x)" 
>
> so I change in the definition of python-pygit2, in propagated input : 
>
> ("libgit2" ,libgit2) ---> ("libgit2-0.25.1" ,libgit2-0.25.1) 
>
> and add the definition of libgit2-0.25.1 in my own package 
>
>
>
> after that, i get another issue during the build of python-pygit2, during the check phase : 
>
>>ERROR: test_describe_pattern (test.test_describe.DescribeTest)
>>----------------------------------------------------------------------
>>Traceback (most recent call last):
>>  File "/tmp/guix-build-python-pygit2-0.25.0.drv-0/pygit2-0.25.0/test/test_describe.py", line 70, in test_describe_pattern
>>   self.assertEqual('public/tag2-2-g2be5719', self.repo.describe(pattern='public/*'))
>>  File "/tmp/guix-build-python-pygit2-0.25.0.drv-0/pygit2-0.25.0/pygit2/repository.py", line 728, in describe
>>    check_error(err)
>>  File "/tmp/guix-build-python-pygit2-0.25.0.drv-0/pygit2-0.25.0/pygit2/errors.py", line 64, in check_error
>>    raise GitError(message)
>>_pygit2.GitError: Cannot describe - No reference found, cannot describe anything.
>>
>>----------------------------------------------------------------------
>>Ran 266 tests in 11.741s
>>
>>FAILED (errors=1)
>>phase `check' failed after 18.0 seconds
>>builder for `/gnu/store/1f3nya5lmmwxyhvc6yalzyn2irwrpkk9-python-pygit2-0.25.0.drv' failed with exit code 1
>>@ build-failed /gnu/store/1f3nya5lmmwxyhvc6yalzyn2irwrpkk9-python-pygit2-0.25.0.drv - 1 builder for `/gnu/store/1f3nya5lmmwxyhvc6yalzyn2irwrpkk9-python-pygit2-0.25.0.drv' failed with exit code 1
>>guix build: error: build failed: build of `/gnu/store/1f3nya5lmmwxyhvc6yalzyn2irwrpkk9-python-pygit2-0.25.0.drv' failed 
>
> so I looked the dependencies of python-pygit2 and saw that python-cffi changed version in guix 0.13 than my old version 
>
> so I force the 1.4.2 version of python-cffi in the definition of pygit2 AND IT'S WORKING!! 

Hi Adrien,

Sorry you had to go through this trouble!  But your workaround is pretty
impressive :-)  It's the way to go if you want to use the existing Guix
package definition with custom versions.

Note that you can inherit package definitions so that you (typically)
only have to override the source, instead of copying the whole thing.

Anyway, I went ahead and updated pygit2 to 0.26, which matches the
current libgit2 version and also is compatible with python-cffi-1.10.
Can you try to pull 'master' and see if it works for you?

Thanks for the report!
[signature.asc (application/pgp-signature, inline)]

Reply sent to Marius Bakke <mbakke <at> fastmail.com>:
You have taken responsibility. (Tue, 07 Apr 2020 19:14:01 GMT) Full text and rfc822 format available.

Notification sent to Adrien Marin <adrien.marin <at> ensea.fr>:
bug acknowledged by developer. (Tue, 07 Apr 2020 19:14:01 GMT) Full text and rfc822 format available.

Message #13 received at 28138-done <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: Adrien Marin <adrien.marin <at> ensea.fr>, 28138-done <at> debbugs.gnu.org
Subject: Re: bug#28138: bug build python-pygit2 on guix 0.13
Date: Tue, 07 Apr 2020 21:13:42 +0200
This was fixed a long time ago, closing.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 06 May 2020 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 354 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.