From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Lepiller Subject: bug#37332: opam->guix-package test fails Date: Sat, 07 Sep 2019 22:28:24 +0200 Message-ID: <67BBCB85-953E-4BF5-B4A9-11858438961F@lepiller.eu> References: <20190907102159.uhjnhfhxormkfk4o@wz.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:37112) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6hKR-0001jk-UF for bug-guix@gnu.org; Sat, 07 Sep 2019 16:29:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i6hKQ-0002RN-Je for bug-guix@gnu.org; Sat, 07 Sep 2019 16:29:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57526) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i6hKQ-0002R9-FV for bug-guix@gnu.org; Sat, 07 Sep 2019 16:29:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i6hKQ-0008Gc-AL for bug-guix@gnu.org; Sat, 07 Sep 2019 16:29:02 -0400 Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Message-ID: In-Reply-To: <20190907102159.uhjnhfhxormkfk4o@wz.localdomain> 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: Wiktor =?UTF-8?Q?=C5=BBelazny?= , 37332-done@debbugs.gnu.org Le 7 septembre 2019 12:22:00 GMT+02:00, "Wiktor =C5=BBelazny" a =C3=A9crit : >My first post here=2E I=E2=80=99m assuming the bug number is going to be = added >automatically=2E My apologies in advance, if it=E2=80=99s not=2E > >I=E2=80=99m under GNU Guix SD (a new user), preparing to contribute my fi= rst >package=2E While following [1], I=E2=80=99m getting FAIL for opam->guix-p= ackage >after invoking `make check` in the Guix source tree=2E > >The relevant part of the test log: > > FAIL: tests/opam > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > test-name: opam->guix-package > location: /home/w/vurv/guix-git/tests/opam=2Escm:71 > source: > + (test-assert > + "opam->guix-package" > + (mock ((guix import utils) > + url-fetch > + (lambda (url file-name) > + (match url > + ("https://example=2Eorg/foo-1=2E0=2E0=2Etar=2Egz" > + (begin > + (mkdir-p "foo-1=2E0=2E0") > + (system* "tar" "czvf" file-name "foo-1=2E0=2E0/= ") > + (delete-file-recursively "foo-1=2E0=2E0") > + (set! test-source-hash >+ (call-with-input-file file-name >port-sha256)))) > + (_ (error "Unexpected URL: " url))))) > + (let ((my-package > + (string-append > + test-repo > + "/packages/foo/foo=2E1=2E0=2E0"))) > + (mkdir-p my-package) > + (with-output-to-file > + (string-append my-package "/opam") > + (lambda _ (format #t "~a" test-opam-file)))) > + (mock ((guix import opam) > + get-opam-repository > + (lambda _ test-repo)) > + (match (opam->guix-package "foo") > + (('package > + ('name "ocaml-foo") > + ('version "1=2E0=2E0") > + ('source > + ('origin > + ('method 'url-fetch) >+ ('uri >"https://example=2Eorg/foo-1=2E0=2E0=2Etar=2Egz") > + ('sha256 ('base32 (? string? hash))))) > + ('build-system 'ocaml-build-system) > + ('inputs > + ('quasiquote >+ (("ocaml-zarith" ('unquote >'ocaml-zarith))))) > + ('native-inputs > + ('quasiquote >+ (("ocaml-alcotest" ('unquote >'ocaml-alcotest)) > + ("ocamlbuild" ('unquote 'ocamlbuild))))) > + ('home-page "https://example=2Eorg/") > + ('synopsis "Some example package") >+ ('description "This package is just an >example=2E") > + ('license #f)) > + (string=3D? >+ (bytevector->nix-base32-string >test-source-hash) > + hash)) > + (x (pk 'fail x #f)))))) > foo-1=2E0=2E0/ > >;;; (fail (package (name "ocaml-foo") (version "1=2E0=2E0") (source (orig= in >(method url-fetch) (uri "https://example=2Eorg/foo-1=2E0=2E0=2Etar=2Egz")= (sha256 >(base32 "1krpnm4j5f8xi2h6jaq3v97alv9dz7v2mdw53a8sycw4i97qxkaq")))) >(build-system ocaml-build-system) (propagated-inputs (quasiquote >(("ocaml-zarith" (unquote ocaml-zarith))))) (native-inputs (quasiquote >(("ocaml-alcotest" (unquote ocaml-alcotest)) ("ocamlbuild" (unquote >ocamlbuild))))) (home-page "https://example=2Eorg/") (synopsis "Some >example package") (description "This package is just an example=2E") >(license #f)) #f) > actual-value: #f > result: FAIL > >Software versions: > > GNU Guix: 66d2133 for invoking `guix environment`, d550845 for the > tested source tree > GNU Guile: 2=2E2=2E4 > Guile-Gcrypt: 0=2E1=2E0 > GnuTLS: 3=2E6=2E5 > Guile-SQLite3: 0=2E1=2E0 > Guile-Git: 0=2E2=2E0 > Guile-JSON: 1=2E2=2E0 > zlib: 1=2E2=2E11 > GNU Make: 4=2E2=2E1 > >In the mailing list archives, I can see some recurring opam/ocaml >issues, but I=E2=80=99m not familiar with any of those, so I cannot judge= what >the problem could be=2E I will appreciate any hints=2E > >W=C5=BB > >[1]: https://guix=2Egnu=2Eorg/manual/en/html_node/Building-from-Git=2Ehtm= l Thanks for the report! I recently changed the importer to use propagated i= nputs instead of inputs and forgot about the test=2E I just pushed 1d03a91 = which fixes the test=2E