From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id QNduLkcj/2SldgEAauVa8A:P1 (envelope-from ) for ; Mon, 11 Sep 2023 16:25:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id QNduLkcj/2SldgEAauVa8A (envelope-from ) for ; Mon, 11 Sep 2023 16:25:11 +0200 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 87EE048017 for ; Mon, 11 Sep 2023 16:25:11 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=ry2Fq4eZ; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1694442311; 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=lgd1VrghGcFnkob0HT8OwrhqRwdtNyRBFmXiiUyfdSU=; b=IzokVuQuwSEBe/GdEljwhRK/flrlF+TbFmeZlKPe5PB61SQKlHVSB+tdFOYvAGPz5JQuc8 hj5M2vIcbLE4VGmPD7xiiOmtYuejmlyCk1rhcu0UzVpDVNkyZmF9+ec9tsWtWM7z1uPk6l iWBnjZvH/+EdBPg7zcM+q5p2A02chwc7SJDcPFAz92hiovMRiDKMvXUMtHGTCqQr+uSs0E FLEKJruEQriQMWsW7EX9D42F+Fd9s6ekhRWUiPFrk1r89qAirefUGgOhf7sEGl1BQvDVmF dfY8WJgRpXdikG1jmdq8JfjSsWiKjSiRnA1Zh/hBUTts+1inkI6c42H+WEftVw== 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=ry2Fq4eZ; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1694442311; a=rsa-sha256; cv=none; b=Uo1UpjqOqK7jYwDCW4s5KMkiac55p0BnYdnPKc6ZGawYBFVuJsumSVzJYXN+7mtl/xIY3E Gp6c8baHKZ9gTBoDrbAsOVZz/noYkc84Qr6EKEzKL2DgPgIueGeeSrtbbFvScuheGbpzW1 FhqcsB4klQwGD5Ch+4VIyG+eVJtqmL+ZKBiDcVU7ZdCoCC3LP/fGah1di9EP0ScF0rwIFD K4BQHRQcTi80Zx+BNDLyVkx3+Z5RixPXpPxHz1Z6gHZFyG9NGcrvwqe2KFYzMH4G2OwDbc d2jJRUZD8oukFrT5i3Lu6Fo0kIrsRd0dpxymdHULu9rZMUOX/bbMEYV9YhSVpw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qfhqV-00039H-Si; Mon, 11 Sep 2023 10:24:59 -0400 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 1qfhqU-00038t-6q for guix-patches@gnu.org; Mon, 11 Sep 2023 10:24:58 -0400 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 1qfhqT-0002hm-V1 for guix-patches@gnu.org; Mon, 11 Sep 2023 10:24:57 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qfhqX-0006dY-Vo for guix-patches@gnu.org; Mon, 11 Sep 2023 10:25:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65866] [PATCH 0/8] Add built-in builder for Git checkouts Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 11 Sep 2023 14:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 65866 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65866@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.169444226225461 (code B ref -1); Mon, 11 Sep 2023 14:25:01 +0000 Received: (at submit) by debbugs.gnu.org; 11 Sep 2023 14:24:22 +0000 Received: from localhost ([127.0.0.1]:54249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qfhpq-0006cX-17 for submit@debbugs.gnu.org; Mon, 11 Sep 2023 10:24:21 -0400 Received: from lists.gnu.org ([2001:470:142::17]:32830) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qfhpl-0006cE-CH for submit@debbugs.gnu.org; Mon, 11 Sep 2023 10:24:17 -0400 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 1qfhpX-0002l0-9K for guix-patches@gnu.org; Mon, 11 Sep 2023 10:23:59 -0400 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 1qfhpW-0002cM-Ac; Mon, 11 Sep 2023 10:23:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=lgd1VrghGcFnkob0HT8OwrhqRwdtNyRBFmXiiUyfdSU=; b=ry2Fq4eZIW4m+u ckRi/NvUvzqtUTLztFlwsmEDUZ8pI4er9qiJLcyDGFjFwKB5KtRFtOffBrsjaZ/nT+dE5PAH/qTCf RGlpWmsERgGTbJUDTJu69ylZdsUiTQG8s0E3Ts44E1nZiOBTJ0FqhWJFPJHy92TcfWlxIp6c53v54 vZirMioyN5rEzYjwkgBosJGzGl0UxV8NmHSkiXuBB/OjUmTndBiBTB3OhuTxBmETqRYNb3w1321MW bm8U08xz8WOIpSWA8jjwICMHQDPJoRZbzoJF9/2IacBLb2s8T3s+UKmOH+l//KLtMjQ1sxL3vTQd4 OEC7ok7hPC/w7VrwCQGw==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Mon, 11 Sep 2023 16:23:42 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 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-Scanner: mx1.migadu.com X-Migadu-Spam-Score: -5.92 X-Spam-Score: -5.92 X-Migadu-Queue-Id: 87EE048017 X-TUID: zXMXnQhmgh3p Hello Guix! This patch series is a first step towards getting Git out of derivation graphs when it’s only used to fetch source code (origins with ‘git-fetch’), with the goal of fixing: https://issues.guix.gnu.org/63331 The is similar to how we solved the problem for regular file downloads: we add a new “builtin:git-download” builder for derivations, which is implemented on the daemon size by the ‘guix perform-download’ helper. That command uses the same code that is currently used by ‘git-fetch’. Eventually, when users are all running recent versions of ‘guix-daemon’ with support for “builtin:git-download” (2–4 years from now?), we’ll be able to use “builtin:git-download” unconditionally and thus be sure there are no risks of derivation cycles. Note that the patch series adds a hard dependency on Git. This is because the existing ‘git-fetch’ code depends on Git, which is itself motivated by the fact that Git supports shallow clones and libgit2/Guile-Git doesn’t. As a side effect, this dependency will prove useful to address . Thoughts? Ludo’. Ludovic Courtès (8): git-download: Move fallback code to (guix build git). git-download: Honor the ‘GUIX_DOWNLOAD_FALLBACK_TEST’ environment variable. perform-download: Remove unused one-argument clause. daemon: Add “git-download” built-in builder. build: Add dependency on Git. perform-git-download: Use the ‘git’ command captured at configure time. git-download: Use “builtin:git-download” when available. tests: Assume ‘git’ is always available. configure.ac | 7 ++ doc/guix.texi | 1 + guix/build/git.scm | 44 ++++++++++- guix/config.scm.in | 6 +- guix/git-download.scm | 122 ++++++++++++++++++------------ guix/scripts/perform-download.scm | 59 +++++++++++---- guix/self.scm | 10 ++- nix/libstore/builtins.cc | 5 +- tests/builders.scm | 29 ++++++- tests/channels.scm | 7 +- tests/derivations.scm | 94 ++++++++++++++++++++++- tests/git-authenticate.scm | 1 - tests/git.scm | 10 --- tests/import-git.scm | 18 ----- 14 files changed, 308 insertions(+), 105 deletions(-) base-commit: a4c35c607cfd7d6b0bad90cfcc46188d489e1754 -- 2.41.0