From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id MOxZG0PU2GWNtAAA62LTzQ:P1 (envelope-from ) for ; Fri, 23 Feb 2024 18:22:11 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id MOxZG0PU2GWNtAAA62LTzQ (envelope-from ) for ; Fri, 23 Feb 2024 18:22:11 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=lW1QFcPw; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1708708931; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=YG+rtnIuKx/Un+nAQdeNMWun03XC1rasPRf76idEaTg=; b=QCoWExLReHFusd8NHP7r0ndaxvQY62cnESYIl+Mr1xrIRsNYtO+URBjhrS3GrphzB4DvWG JQdrgrUb/4tsjTio1mIRZcvB8wr8WIYRXq6EI++ZJr5/MX70oPMUTOOZJ3r70SSxGdlQOj HfKxZqPrSYMRbWM/cc5i5kFBVqihMn+ODq3zKeRaGrRarHHZri3kEFFOsBUy9FHGpVlEj8 JRcKTrtUTEHi07t1j+Rj6irgPtvIgCVORmJ0qkmSrwrkMHqPOKiIPqRZJuFmDwA5rGY5Tc ZToqPixH8I3c1uqSgFr3A8P5amxwHfdinw5e9S22EikUjmgZ6JCDVciZbncaNg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=lW1QFcPw; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1708708931; a=rsa-sha256; cv=none; b=snBWHrc9IMuxFSp1LnHc68pGORKHetR41RwKLco+BX390WBUeKvJZtNKjxaRdeTvy/+EZY 4U75WPXal6Ck4imdBAiQjRWtjPAt/4lQOcypK1UgVvF1nsCa8UPaeBtTS5ODOMCF061fb5 KqQqsKu2VwDEBOp7V4F6j3eXez/hHNskCq7ZjUd/RZXB9hUZAs9KlETQe95j85W8pT00vr Ogj8wdrNlmMKtOIZudE3S9XcLAJiREGcO4OzFTqW/yz1/0SYVxF3z6ZzTqQo7CLjkixN0D gX/5Yh4RolvA7oqyUAHQBA2eHNm9C7OseH1c2F6w+ojkeOQnBByDhISUgT/JOA== 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 D86BE14495 for ; Fri, 23 Feb 2024 18:22:10 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdY2J-0000pK-5Z; Fri, 23 Feb 2024 11:04:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rdXo2-00048Q-Vg for guix-patches@gnu.org; Fri, 23 Feb 2024 10:49:46 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rdXo2-0007Ft-MO; Fri, 23 Feb 2024 10:49:46 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rdXoN-0002BE-Ej; Fri, 23 Feb 2024 10:50:07 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#69328] [PATCH 08/12] svn-download: Use =?UTF-8?Q?=E2=80=98swh-download-directory-by-nar-hash=E2=80=99.?= Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, rekado@elephly.net, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Fri, 23 Feb 2024 15:50:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69328 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69328@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Christopher Baines , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 69328-submit@debbugs.gnu.org id=B69328.17087033938254 (code B ref 69328); Fri, 23 Feb 2024 15:50:07 +0000 Received: (at 69328) by debbugs.gnu.org; 23 Feb 2024 15:49:53 +0000 Received: from localhost ([127.0.0.1]:49267 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdXo8-00028x-BC for submit@debbugs.gnu.org; Fri, 23 Feb 2024 10:49:53 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52664) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdXnT-00021e-Vf for 69328@debbugs.gnu.org; Fri, 23 Feb 2024 10:49:17 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rdXmy-00078d-VK; Fri, 23 Feb 2024 10:48:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=YG+rtnIuKx/Un+nAQdeNMWun03XC1rasPRf76idEaTg=; b=lW1QFcPwxKzEEsKc2CHu kYc8+TZEyuV15ulFlnQFBbIw+NnGnQtN+1B2BfBo8E/swRaFuNZ8QuvcG10XUcuJMI1Ks6SO4qB9J 1+rnRUYDzKMapy5L63hYXeyzJqLykQFjG1PuLStpqXAnL3GbW6CG333Da1LAlwMwuIPWzdr8RcyZ6 punHKPKMrkcYB+HS7giGWDLNOo3LsyZLUzmUOXY4hT3ZUUanE/LhhpYr70zzu4nIgx1ndDb/YF+co Kad2BaoH+7s0Rc9x2+kJMzSwfcWUYSXoYE3V3ik++nMVnOp55anaFtO8PSLaXW/8HOBPiOxjknAV4 O7J1B/0OuLNIDg==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Fri, 23 Feb 2024 16:48:12 +0100 Message-ID: <39b18f26579e05e76613f0be62dd4d70860b4876.1708697539.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -3.17 X-Spam-Score: -3.17 X-Migadu-Queue-Id: D86BE14495 X-Migadu-Scanner: mx13.migadu.com X-TUID: qNmTzzBdL2vL Fixes . * guix/svn-download.scm (svn-fetch)[build]: Add ‘swh-download-directory-by-nar-hash’ call as a last resort. Import (guix swh). * guix/svn-download.scm (svn-multi-fetch)[build]: Likewise. Change-Id: Ifcb9be1e9c2b05ce172c44e45dcf3a3ea6df8e76 --- guix/svn-download.scm | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/guix/svn-download.scm b/guix/svn-download.scm index c6688908de..ed1379a09e 100644 --- a/guix/svn-download.scm +++ b/guix/svn-download.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014-2016, 2019, 2021-2023 Ludovic Courtès +;;; Copyright © 2014-2016, 2019, 2021-2024 Ludovic Courtès ;;; Copyright © 2014 Sree Harsha Totakura ;;; Copyright © 2017, 2019, 2021 Ricardo Wurmus ;;; @@ -94,12 +94,14 @@ (define* (svn-fetch ref hash-algo hash (with-imported-modules (source-module-closure '((guix build svn) (guix build download-nar) - (guix build utils))) + (guix build utils) + (guix swh))) (with-extensions (list guile-json guile-gnutls ;for (guix swh) guile-lzlib) #~(begin (use-modules (guix build svn) (guix build download-nar) + (guix swh) (ice-9 match)) (or (svn-fetch (getenv "svn url") @@ -111,7 +113,10 @@ (define* (svn-fetch ref hash-algo hash (_ #f)) #:user-name (getenv "svn user name") #:password (getenv "svn password")) - (download-nar #$output)))))) + (download-nar #$output) + (parameterize ((%verify-swh-certificate? #f)) + (swh-download-directory-by-nar-hash #$hash '#$hash-algo + #$output))))))) (mlet %store-monad ((guile (package->derivation guile system))) (gexp->derivation (or name "svn-checkout") build @@ -174,13 +179,15 @@ (define* (svn-multi-fetch ref hash-algo hash (with-imported-modules (source-module-closure '((guix build svn) (guix build download-nar) - (guix build utils))) + (guix build utils) + (guix swh))) (with-extensions (list guile-json guile-gnutls ;for (guix swh) guile-lzlib) #~(begin (use-modules (guix build svn) (guix build utils) (guix build download-nar) + (guix swh) (srfi srfi-1) (ice-9 match)) @@ -206,7 +213,10 @@ (define* (svn-multi-fetch ref hash-algo hash (begin (when (file-exists? #$output) (delete-file-recursively #$output)) - (download-nar #$output))))))) + (or (download-nar #$output) + (parameterize ((%verify-swh-certificate? #f)) + (swh-download-directory-by-nar-hash + #$hash '#$hash-algo #$output))))))))) (mlet %store-monad ((guile (package->derivation guile system))) (gexp->derivation (or name "svn-checkout") build -- 2.41.0