From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id GIJHKL6Dk2E6zgAAgWs5BA (envelope-from ) for ; Tue, 16 Nov 2021 11:11:10 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id yEfgI76Dk2EEKgAAbx9fmQ (envelope-from ) for ; Tue, 16 Nov 2021 10:11:10 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5695B21A2B for ; Tue, 16 Nov 2021 11:11:09 +0100 (CET) Received: from localhost ([::1]:36570 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mmvQi-0001Yt-IT for larch@yhetil.org; Tue, 16 Nov 2021 05:11:08 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49116) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmvQd-0001YI-C4 for guix-patches@gnu.org; Tue, 16 Nov 2021 05:11:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:45756) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mmvQd-0006pR-3j for guix-patches@gnu.org; Tue, 16 Nov 2021 05:11:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mmvQc-0003NB-Fa; Tue, 16 Nov 2021 05:11:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51888] [PATCH 0/1] import: opam: Warn instead of leave when fetching fails. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: julien@lepiller.eu, guix-patches@gnu.org Resent-Date: Tue, 16 Nov 2021 10:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51888 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51888@debbugs.gnu.org Cc: zimoun , julien@lepiller.eu X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: julien@lepiller.eu Received: via spool by submit@debbugs.gnu.org id=B.163705745812954 (code B ref -1); Tue, 16 Nov 2021 10:11:02 +0000 Received: (at submit) by debbugs.gnu.org; 16 Nov 2021 10:10:58 +0000 Received: from localhost ([127.0.0.1]:57301 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmvQY-0003Mr-9C for submit@debbugs.gnu.org; Tue, 16 Nov 2021 05:10:58 -0500 Received: from lists.gnu.org ([209.51.188.17]:38220) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmvQX-0003Mj-D9 for submit@debbugs.gnu.org; Tue, 16 Nov 2021 05:10:57 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49114) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmvQX-0001Y7-95 for guix-patches@gnu.org; Tue, 16 Nov 2021 05:10:57 -0500 Received: from [2a00:1450:4864:20::335] (port=52047 helo=mail-wm1-x335.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mmvQR-0006oh-QI for guix-patches@gnu.org; Tue, 16 Nov 2021 05:10:56 -0500 Received: by mail-wm1-x335.google.com with SMTP id z200so16392857wmc.1 for ; Tue, 16 Nov 2021 02:10:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fa89j6TUgPDYEkSByPtZj/A4Gya1GurwrtdSNVk+fkE=; b=MkUBz3bVK6BGB69PYkqx2ZfRXDNx1IElhBxaS+Lfxu3SUCWSB+O4DKnj7GTcXmP+Qx cs8ozrk5NaLMs3s/XtUfKwnXcdO3AACP5/97dDDbENRR/GTklEpn5tACe+IQ6xDTKbUb XQjztXITbyjYos3kYifTy3QE+tw30lb5zAwmix/4pXEXAOvZUg3ZyghuxEoORYwmpFqL KTaguoPwqejsJpXk8+lnoE5px8mtSYZNRKKLOoqvWlVhuNMg/U8uLRJ6cYRaNFLknwHf 0G6kYvzPgN3g6VDiVY0qkDzt7CR6GxpbgBqbhCo24N8tdxi48Z8xlNyivB5o2OXz0MS5 fd9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fa89j6TUgPDYEkSByPtZj/A4Gya1GurwrtdSNVk+fkE=; b=QuW6ylfFQlw3dPFhEkqhD7b9RzKNPWkE6yjkVKL0fx52Rv1Qyj01L85gT6ihgPEGUV KPY0S6QoQif3ePJ9VfNtD3k349qVX5NIcijYNCK7oihlbqL7uuqb03sSb6Vpex2ezgql VnLxI70vJWSyDZFtE/YLgjgI6ZKph6a4Kwqq8AdUm6vzd1RNtVora01XPenbmhgijo4i hbc+sGwbVilKbwMQtrCm5a0iI8VKiv6Hy6RJjwKEAT5LzPB6e1wBeqf4myT0729Vw/YS JIaaOM56Z4xZXaX6+CummY2/V4a06hCskdnCvJEn6kmk9+QG4fJ8FQFZOgH/X4/ig62V RB9A== X-Gm-Message-State: AOAM531n8UEitFVWFYcTIwAW85mC8ThbUJchDuglExmd0KwEMjMpG5Yy Rp3eogc3OHfdAbJA2hyUiXjORssthKM= X-Google-Smtp-Source: ABdhPJwwk+V3NNziGlqRNqfHO4VxWCT4KgBsmQsdFA0m6ecqPkRFFQbL1k75CLHNlH8kZ2RqqkTAjQ== X-Received: by 2002:a05:600c:190b:: with SMTP id j11mr6223874wmq.112.1637057449855; Tue, 16 Nov 2021 02:10:49 -0800 (PST) Received: from localhost.localdomain ([193.48.40.110]) by smtp.gmail.com with ESMTPSA id f15sm2410256wmg.30.2021.11.16.02.10.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Nov 2021 02:10:49 -0800 (PST) From: zimoun Date: Tue, 16 Nov 2021 11:10:43 +0100 Message-Id: <20211116101043.58471-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::335 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x335.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1637057470; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=fa89j6TUgPDYEkSByPtZj/A4Gya1GurwrtdSNVk+fkE=; b=DHUBrsFNdq3hSkhqTOBOEH4/JGFFtFqVhwJNUXNjdF0AupZEOv8SKAgpBTnzU0sVBEUB55 o8zD1LNFepTrJE/KUcqbWiAh3gdezzD+RduJTLKkA6s85dEP89g4rG4pxw2jDj1bRYyaHr 7nc/JwUh/qi1Kz3Hvr67JXuCXCKxPcfZ/e/RmWC6oWryaKoWfgIhdEQfy4S+RiTmSHIIxG g+tvRIGeSASxfmA3FArk1MYr1QVmWemuWOmJbRiqUlOlcD8l065+SLPIHD5ID9hHMuX3Xs QdQ5B5gZOUzWkHkFyjTxZwNhCD0YMGqZsZDbarNhHU0lsnPfvKl6wuhCdcsbqQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637057470; a=rsa-sha256; cv=none; b=XJSOoB/kTYUOSC5wq/qtTqrm8t5ZnJQGBQjDj28iuitYDC/jOQENvAC5/iFWtQLlX3v3Op OKWHfxgCtFBAH0d8ab7JYqDFe0ahDPb1MqN7SoVxh3HhzhbIUsBleh0LswXTFIZGOPGKov oYnpTXlStuG4v83MRnem3e2Vd8nnSzGX4AitBpt6tJ/sYfgVqge0pL8YH1vG1cjLSRd5aO wYwyUr4Nf+FD5B69aqWokEQwntunynmWQJYB1LLa3SsBvY2dEiIvzyaziuyU5nTXNKVszx vZSoFIrVmvAFY/v9ASGSbszJDJYVo2LQdgzk+CDX1yCl03p7DX8mW/F8tyOFeg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=MkUBz3bV; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.95 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=MkUBz3bV; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 5695B21A2B X-Spam-Score: -1.95 X-Migadu-Scanner: scn1.migadu.com X-TUID: THJW2nkJubax Hi, It is possible to use another OPAM repository when importing, for instance "guix import opam --repo=https://coq.inria.fr/opam/released" -- although Coq packages are generally not built using OCaml or Dune build-system, another story. :-) Or even, a package using OCaml or Dune build system but not included in Opam repositories supported by Guix. However, if this package uses OCaml or Dune build system, then 'refresh' leaves which is annoying. For instance, consider: --8<---------------cut here---------------start------------->8--- $ guix lint -L /tmp/pkgs example /tmp/pkgs/mine.scm:8:2: example@0 : champ de licence invalide /tmp/pkgs/mine.scm:23:14: example@0 : le synopsis ne devrait pas commencer par un nom de paquet /tmp/pkgs/mine.scm:22:15: example@0 : Erreur de certificat TLS : X.509 server certificate for 'exmaple.org' does not match: C=US,ST=California,L=test,O=testexample,OU=testexample,CN=testexp guix lint: erreur : le paquet « example » est introuvable --8<---------------cut here---------------end--------------->8--- The trivial patch instead turns this error to a warning which allows to run all the checkers: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix lint -L /tmp/pkgs example /tmp/pkgs/mine.scm:8:2: example@0: invalid license field /tmp/pkgs/mine.scm:23:14: example@0: synopsis should not start with the package name /tmp/pkgs/mine.scm:22:15: example@0: TLS certificate error: X.509 server certificate for 'exmaple.org' does not match: C=US,ST=California,L=test,O=testexample,OU=testexample,CN=testexp guix lint: warning: opam: package 'example' not found /tmp/pkgs/mine.scm:12:6: warning: failed to fetch Git repository for example /tmp/pkgs/mine.scm:12:6: example@0: updater 'opam' failed to find upstream releases /tmp/pkgs/mine.scm:12:6: example@0: scheduled Software Heritage archival --8<---------------cut here---------------end--------------->8--- here 'archival'. Note that the failure is correctly handled by 'lint' when the early leave skips. Note that it could be better that 'opam-fetch' raises an error in order to be catched by caller and thus make all the UI consistent. However, this requires a revamp of all inporters... Cheers, simon Example of file /tmp/pkgs/mine.scm: --8<---------------cut here---------------start------------->8--- (define-module (mine) #:use-module (guix packages) #:use-module (guix build-system ocaml) #:use-module (guix git-download)) (define-public example (package (name "example") (version "0") (source (origin (method git-fetch) (uri (git-reference (url "https://example.org") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0m5si9dsv96z92gy4xaqz8mzyz8zp7j1sp542l0wzsp5xgyfpc7i")))) (build-system ocaml-build-system) (home-page "https://exmaple.org") (synopsis "Example") (description "This is an exmaple.") (license #f))) --8<---------------cut here---------------end--------------->8--- zimoun (1): import: opam: Warn instead of leave when fetching fails. guix/import/opam.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: 122396075f12b013b6bde56dafb895587b95bc9d -- 2.32.0