From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adrien Marin Subject: bug#28138: bug build python-pygit2 on guix 0.13 Date: Fri, 18 Aug 2017 16:26:04 +0200 (CEST) Message-ID: <447268654.49439.1503066364939.JavaMail.zimbra@ensea.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=_5e84e7f8-1efd-4e97-bcfa-05922953a6e9" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41467) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1diitX-0004U0-GM for bug-guix@gnu.org; Fri, 18 Aug 2017 11:09:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1diitS-0002Su-F5 for bug-guix@gnu.org; Fri, 18 Aug 2017 11:09:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:35813) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1diitS-0002SP-B6 for bug-guix@gnu.org; Fri, 18 Aug 2017 11:09:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1diitR-0006GJ-T4 for bug-guix@gnu.org; Fri, 18 Aug 2017 11:09:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57924) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1diiDy-0007pL-6y for bug-guix@gnu.org; Fri, 18 Aug 2017 10:26:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1diiDu-0005RG-Tp for bug-guix@gnu.org; Fri, 18 Aug 2017 10:26:10 -0400 Received: from smtpout02-ext2.partage.renater.fr ([194.254.241.33]:58189 helo=smtpout20.partage.renater.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1diiDu-0005OW-Js for bug-guix@gnu.org; Fri, 18 Aug 2017 10:26:06 -0400 Received: from zmtaout02.partage.renater.fr (zmtaout02.partage.renater.fr [194.254.241.30]) by smtpout20.partage.renater.fr (Postfix) with ESMTP id 56645BFA8E for ; Fri, 18 Aug 2017 16:26:05 +0200 (CEST) Received: from zmtaout02.partage.renater.fr (localhost [127.0.0.1]) by zmtaout02.partage.renater.fr (Postfix) with ESMTPS id 5426820029 for ; Fri, 18 Aug 2017 16:26:05 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zmtaout02.partage.renater.fr (Postfix) with ESMTP id 480BB20050 for ; Fri, 18 Aug 2017 16:26:05 +0200 (CEST) Received: from zmtaout02.partage.renater.fr ([127.0.0.1]) by localhost (zmtaout02.partage.renater.fr [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id HLu9Ol0tfQQ8 for ; Fri, 18 Aug 2017 16:26:05 +0200 (CEST) Received: from zstore23-etu.partage.renater.fr (zstore23-etu.partage.renater.fr [10.254.241.61]) by zmtaout02.partage.renater.fr (Postfix) with ESMTP id 30D4620029 for ; Fri, 18 Aug 2017 16:26:05 +0200 (CEST) List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 28138@debbugs.gnu.org --=_5e84e7f8-1efd-4e97-bcfa-05922953a6e9 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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))) --=_5e84e7f8-1efd-4e97-bcfa-05922953a6e9 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Hi,

=
yesterday ,I updated guix and try to install my package's new ve= rsion 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 pro= pagated input :

("libgit2" ,libgit2)  ---> ("= libgit2-0.25.1" ,libgit2-0.25.1)
=
and add the definiti= on 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 :
<= br data-mce-bogus=3D"1">
>ERROR: test_describe_pat=
tern (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/t=
est_describe.py", line 70, in test_describe_pattern
>   self.assertEqual('public/tag2-2-g2be5719', self.repo.describe(patter=
n=3D'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=3D1)
>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-pygit=
2-0.25.0.drv - 1 builder for `/gnu/store/1f3nya5lmmwxyhvc6yalzyn2irwrpkk9-p=
ython-pygit2-0.25.0.drv' failed with exit code 1
>guix build: error: build failed: build of `/gnu/store/1f3nya5lmmwxyhvc6=
yalzyn2irwrpkk9-python-pygit2-0.25.0.drv' failed

so I looked the dependencies of python-pygit2 and sa= w 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 AN= D IT'S WORKING!!


there is the definition of olds version for pyt= hon-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" ve= rsion))
(sha256
(base32 "161rj52rzi3880lij17d6i9kvgkiw= jilrqjs8405k8sf6ryif7cg"))))
(build-system python-build-system)
(outputs '("out" "doc"))
(inputs
`(("libffi" ,libffi)= ))
(propagated-inputs ; required at run-time
`(("python-p= ycparser" ,python-pycparser)))
(native-inputs
`(("pkg-conf= ig" ,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 (stri= ng-append (assoc-ref outputs "doc") "/share"))
(doc (s= tring-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")
(synop= sis "Foreign function interface for Python")

(description = "Foreign Function Interface for Python calling C code.")
(license l= icense:expat)))


--=_5e84e7f8-1efd-4e97-bcfa-05922953a6e9--