From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 QOJjM1RLvGMeWAAAbAwnHQ (envelope-from ) for ; Mon, 09 Jan 2023 18:13:56 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id GDWAMlRLvGNsAwEAG6o9tA (envelope-from ) for ; Mon, 09 Jan 2023 18:13:56 +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 7A0ED346F for ; Mon, 9 Jan 2023 18:13:56 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pEviJ-00068A-Gy; Mon, 09 Jan 2023 12:13:36 -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 1pEviI-00067B-0D for guix-devel@gnu.org; Mon, 09 Jan 2023 12:13:34 -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 1pEviH-0004X9-Lc; Mon, 09 Jan 2023 12:13:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=jpEY+7CNL1g8cTBy7L/PNQQiIgY4vY28e2n4otmrJX4=; b=IcNj8qvS18TadK6/Kg+h /jcEY1ranXYeX43fQtMdlfFzG1z628qZQkbjEFSH79pfz1bruz1+9/A/LM6UPQRmj6LRCzwQXwkAg B6LbMJbCShDb2uP3Cm2nj12eLH9SIu1KWbPHppBfX5c9UM9jD1QnOAydTN8IoYC4F9oqsoNjEfbVr phdlz+TjkjKHOV+wr//bFbgyDOs/9mJdK0OZKzHB2WxCl7gJ0UnV154HrSOv89+6RYv/5NaSqmLUC 8nJ2+OAx1yktu1u2asIaFUK+y4KtUmnt6IPvW60fj/shpZU1ZWTW3+Q2TGTIqlQHwyTouSLEjuEcy 2jnR3LgU7QzoVQ==; Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pEviH-00052g-8n; Mon, 09 Jan 2023 12:13:33 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Stephen Paul Weber Cc: guix-devel@gnu.org, 0@psycoti.ca Subject: Re: git-fetch without a hash References: <87h6xo2wz8.fsf@gnu.org> <87o7rf715e.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: =?utf-8?Q?D=C3=A9cadi?= 20 =?utf-8?Q?Niv=C3=B4se?= an 231 de la =?utf-8?Q?R=C3=A9volution=2C?= jour du Van X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 09 Jan 2023 18:13:31 +0100 In-Reply-To: <87o7rf715e.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Tue, 03 Jan 2023 22:34:37 +0100") Message-ID: <87fscjr5qc.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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-Seal: i=1; s=key1; d=yhetil.org; t=1673284436; a=rsa-sha256; cv=none; b=KLhSbXXw0b232BdBbLEGWXYpw1Gy7bAboVH8kQgKp7NJOO30qHa9zz5O1sf3gVPCFToWOr NPeZfnpE7IxyEihjyuZSe1ch8/lGUNrxeHkMlazpQjjbdn2QvF/rkbg4oEJKplCXcKnTlh aBvXjfoFtKnukXwePe+z6HZiSLgNPCa6mDNhjjGPvmdxy/hYjNEd+umqi4gr8QUea5ykDO SIJtrxcbyN2pJG6bpn75j8VeaQYnxOMGv9xAFCkqRgzmrNNEfPNsYGqOB8ZUjdc+bjP6ht 0IV+yGxza9TaAdvDgvPdx+/EeLxHLAIgIRvrDsz7cfAVAG1Cio4REwvvNUDcjA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=IcNj8qvS; 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=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673284436; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=jpEY+7CNL1g8cTBy7L/PNQQiIgY4vY28e2n4otmrJX4=; b=oVopx+1xbZlDjcP0zAR8ZBDjA5naTyjGZpHfxhs23gVUmUFy6bnIYb802rkW3NCiJZ15fS YkX14Obb6kFfr7DcUImPe3kzQUr0ZWstJDZpUDWWUwAA92ouaBdYfGTcvNBJVoiX+p5src 2cDhzhCQf2b+gcwzzx8H7t7m61mVlWf0kwLPhy6hRwJoxx2Qcm2piP2BLWGnV5ipGtkPvJ R4BQmwJPBky32QKiSr0FyMyVK64a6VsJJVZom7R0ebWcV89WAw62DX3TdnuruWouUKCxeR +CwtPk7PjaEbEW3bO8n31ecP3T33rSZUKtvNFxOovQBwHkscqSWOvsEFuKkyOA== X-Spam-Score: -8.83 X-Migadu-Queue-Id: 7A0ED346F Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=IcNj8qvS; 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=pass (policy=none) header.from=gnu.org X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -8.83 X-TUID: aHSGoCHBXeTX Hi, Ludovic Court=C3=A8s skribis: > scheme@(guile-user)> ,lower (origin > (method url-fetch) > (uri "mirror://gnu/hello/hello-2.12.1.tar.gz") > (sha256 #f)) > $6 =3D # /gnu/store/xfc7gsn10j09bi89ldbpfbppfkcldfy9-hello-2.12.= 1.tar.gz 7f3ff487c000> > scheme@(guile-user)> (derivation-outputs $6) > $7 =3D (("out" . #< path: "/gnu/store/xfc7gsn10j09bi89= ldbpfbppfkcldfy9-hello-2.12.1.tar.gz" hash-algo: sha256 hash: #f recursive?= : #f>)) > scheme@(guile-user)> (fixed-output-derivation? $6) > $8 =3D #f > > As it turns out, guix-daemon turns off the chroot for all built-in > builders, fixed-output or not; quoth =E2=80=98build.cc=E2=80=99: > > /* Note: built-in builders are *not* running in a chroot environment = so > that we can easily implement them in Guile without having it as a > derivation input (they are running under a separate build user, > though). */ > useChroot =3D settings.useChroot && !isBuiltin(drv); > > I was actually surprised to see this, this wasn=E2=80=99t really intended= . The > good news is that this is safe AFAICS: there=E2=80=99s only one built-in = builder > to date, and that=E2=80=99s =E2=80=9Cdownload=E2=80=9D. After investigating, I found that =E2=80=98guix perform-download=E2=80=99 a= lready has a check in place: (unless (and algo hash) (leave (G_ "~a is not a fixed-output derivation~%") (derivation-file-name drv))) The check wasn=E2=80=99t working because =E2=80=98hash=E2=80=99 was #vu8() = instead of #f. This is fixed in 5d24e57a611b43ff68700379338b899f62d198cc. Once we update the =E2=80=98guix=E2=80=99 package, the daemon will no longe= r accept =E2=80=98url-fetch=E2=80=99 downloads with hash =3D #f. Thanks again for reporting this oddity! Ludo=E2=80=99.