From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id eOqOBIl+omPzAgEAbAwnHQ (envelope-from ) for ; Wed, 21 Dec 2022 04:33:29 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 0IiOBIl+omPRhQAA9RJhRA (envelope-from ) for ; Wed, 21 Dec 2022 04:33:29 +0100 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 A966F2DDA0 for ; Wed, 21 Dec 2022 04:33:27 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p7pPH-0005xY-R6; Tue, 20 Dec 2022 22:04:35 -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 1p7pPG-0005wW-NP for guix-devel@gnu.org; Tue, 20 Dec 2022 22:04:34 -0500 Received: from singpolyma.net ([2607:5300:60:9e74:1000::]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p7pPF-0000NB-7F for guix-devel@gnu.org; Tue, 20 Dec 2022 22:04:34 -0500 Received: by singpolyma.net (Postfix, from userid 1000) id F049E4861948; Wed, 21 Dec 2022 03:04:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=singpolyma.net; s=iweb; t=1671591869; bh=hGqxJ9MqMHb5ejtgtxDgbo2nDHhKyeuNkwFEOZvQ/ps=; h=Date:From:To:Cc:Subject:From; b=I7VWneIczZTvPAtw5Qr7shhFVNw2donQYATr4Iohfpaihy8p/Pxcy0WUph6QuLtHK tPy9W1zMVJFMbJulOXqEDYOF5SZXo80/QJfn+a6m7XOObDfFw4Omy8p3nxER056X2T XP/gmo53o2b50oCLmfaEFgjLToD4zZog3EAqGmi8= Date: Tue, 20 Dec 2022 22:04:29 -0500 From: Stephen Paul Weber To: guix-devel@gnu.org Cc: 0@psycoti.ca Subject: git-fetch without a hash Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="kRSp7VrkuKNm/Szv" Content-Disposition: inline Jabber-ID: singpolyma@singpolyma.net OpenPGP: id=CE519CDE; url=https://singpolyma.net/public.asc X-URL: https://singpolyma.net Received-SPF: pass client-ip=2607:5300:60:9e74:1000::; envelope-from=singpolyma@singpolyma.net; helo=singpolyma.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=singpolyma.net header.s=iweb header.b=I7VWneIc; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (strict)" header.from=singpolyma.net (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671593607; a=rsa-sha256; cv=none; b=Zu6ayQ8cTC5CQ/Qcvnekm8iW2DPFH53vBfhd4BbIe66UsIdD6G9y11k93fRrNsP3zjqS8h Fq/lsxrcwKZmBO9CMrFMw/PmmevgCBN8GTdDtyT5TDY8Gu6bDVQpRBdZMFQD9yXjRiEYLv SGH/RJFxKDNQMdl/fXKazfqWXRppVSRP/O05aUeyEz4YErc6GSFPMIxT28dPhwq6k8c480 V6rnU5xga1WDCX+rw0h2JKTBO0WKiKv1WkWN7nRO7XqtlJAZ5VZ6AVsJObKHyxlzlowrYW 5UX3E7FG8qNnafltCsPtMTBILp3/93cAgd7rwMrZvhMLOecDziujgVxUu1UZWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671593607; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature:openpgp:openpgp; bh=ktitlC94rJDUh0UireBs/uejBlUzWJ6a8KHeZC0/guY=; b=QckBkQNtOVyS59d7S4Q8thPFXUTUnxV5kvXWiy8Fg4noNCpfKM8rw+1OLXTMR3K9WyLsoq KKI20/GnB69Dl7Qht0a1Kvq6k6b3GIAig2RBgPOr4gXz/Q2CGShKwWB/fY8aNQKm3+h27n d7IHznA8d4O6R88TMV++SIbt57cvEChVcmmbB5nw21EzTEd0oRNRkGri+5XO8hIivAugNe 0u6Bq6yiFYO8EWYhHWEJjWiEOHy0ZKSaSAE91ZxGo+Pstifwra07HW2+vVNjCgmXGMbEiG z/uktDI8bbDSZJ6RV1VE5OC2Db7qJzJ1uboVSKc06VwZRaXKIJnEeHWy2BDqfg== X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=singpolyma.net header.s=iweb header.b=I7VWneIc; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (strict)" header.from=singpolyma.net (policy=none) X-Migadu-Spam-Score: 4.81 X-Spam-Score: 4.81 X-Migadu-Queue-Id: A966F2DDA0 X-TUID: 5xngw6ZN1fcU --kRSp7VrkuKNm/Szv Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Guix! It seem that url-fetch will work without a hash (that is, with (sha256 #f))= =20 but git-fetch will not. As near as I can tell this is because git-fetch uses a fixed derivation=20 build going via nix/build.cc stuff which contains this line: if (i.second.hash =3D=3D "") fixedOutput =3D false; And this results in /etc/resolv.conf not getting written and DNS resolution= =20 failing. Now, I *think* by my reading that it is intended for *only* fixed-output=20 derivations to have network access, because otherwise the operation would b= e=20 impure? And then url-fetch is just not actually ending up in a build container and= =20 so it works even when it isn't fixed-output? However, there's no real reason that git-fetch *needs* to be fixed-output i= n=20 terms of having a hash pre-defined, at least for local development and othe= r=20 purposes. So is there a way around this? If having a way around it is not= =20 desirable should url-fetch consider this an error as well? Finally, *if* git-fetch should not allow this, the current error message is= =20 beyond confusing (DNS resolution fails during git fetch and it tries to fal= l=20 back to SWH). So should git-fetch check for hash of #f and raise at that= =20 point with a better error message in that case? --kRSp7VrkuKNm/Szv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEWeaCw+rzmiEMpzU00RwpEc5RnN4FAmOid7kACgkQ0RwpEc5R nN5uLA//UtiMn5NgKQTpsd3xS1ruAhxcZ0ATDIFVL09mviQqzvg5rVsqJFr30ZPn 6cE5il/pBlImJuAWR+ok+/Yj6uhNEVjZQRYcOR1eoxYQsOZ++t5dLTLVgfvi6yZM yfvFEMu71jpK6x3XonLbfzwO8bBp9sZZnQMduBCwLz4R93jK4ELnChIrH5Rd0lan Gmlc5tISKqqXsFOn3Q9NI8nfNBMdaAeMxVkmwKVXsvPXdFUSmTTrnhU1Bg79VoZ3 2UQRsYPaRhGMyFqYmIpf/TKTDzQGa5QoSleQEnGOL39xqjXqMYPywP6/n+KTxSHw VWy/41ECgXX2o/7O5rz84CZrkQJG11xyOwfGxjIwYFN2WpVgG8Vt+7PM6eTRokwQ 93RHMGKTgdsCPq+kkq/Fsv7M7PbYhP5k8ZLL23XUUSYRT+SOR1J0ch1X1Rx8U/7a iwHTzkgoPFbyRP7A1eM6gnMO9xlY659lVd8oRNFiQzulL4bB+fz/fGX1dhaQsz/t a6aG2WatVL0dvcf6j+SL1WziXnFUMALM3hECpv+HuXWtPU0mm97ikwSzunC8sopL 6dIPdqTpGz2L3AhRCkj1WvsxLuvmpj1LAbHIOzGUMRB398jUBpHIMHvCY6c3zlGB V+eFwygUcRBjFxMLHWto3VOO28DEj+x4SWxYpbMRxpPDBKojP0I= =0HVo -----END PGP SIGNATURE----- --kRSp7VrkuKNm/Szv--