From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id SPfREbwgwF/MNAAA0tVLHw (envelope-from ) for ; Thu, 26 Nov 2020 21:40:12 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 6Cy6DbwgwF+JQAAAbx9fmQ (envelope-from ) for ; Thu, 26 Nov 2020 21:40:12 +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 8FE7D9403A8 for ; Thu, 26 Nov 2020 21:40:11 +0000 (UTC) Received: from localhost ([::1]:48948 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kiOzp-0006Qf-NX for larch@yhetil.org; Thu, 26 Nov 2020 16:40:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34102) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kiOzi-0006QY-I8 for bug-guix@gnu.org; Thu, 26 Nov 2020 16:40:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:59749) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kiOzi-00023y-AN for bug-guix@gnu.org; Thu, 26 Nov 2020 16:40:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kiOzi-00071K-7c for bug-guix@gnu.org; Thu, 26 Nov 2020 16:40:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#44835: gnu/ci.go: Embeds build path, breaking reproducible builds Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 26 Nov 2020 21:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44835 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Vagrant Cascadian Received: via spool by 44835-submit@debbugs.gnu.org id=B44835.160642676026926 (code B ref 44835); Thu, 26 Nov 2020 21:40:02 +0000 Received: (at 44835) by debbugs.gnu.org; 26 Nov 2020 21:39:20 +0000 Received: from localhost ([127.0.0.1]:43062 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kiOz1-00070D-1g for submit@debbugs.gnu.org; Thu, 26 Nov 2020 16:39:19 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43972) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kiOyy-0006zy-Mk for 44835@debbugs.gnu.org; Thu, 26 Nov 2020 16:39:17 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51560) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kiOyt-0001iv-34; Thu, 26 Nov 2020 16:39:11 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=45266 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kiOys-0005d9-6r; Thu, 26 Nov 2020 16:39:10 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87r1ojgzdh.fsf@yucca> Date: Thu, 26 Nov 2020 22:39:08 +0100 In-Reply-To: <87r1ojgzdh.fsf@yucca> (Vagrant Cascadian's message of "Mon, 23 Nov 2020 20:19:54 -0800") Message-ID: <87blfj23yb.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mathieu Othacehe , 44835@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.26 X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-TUID: TGxTea760SIk --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi! Vagrant Cascadian skribis: > My *wild* guess is it maybe has something to do with the use of > canonicalize-path: > > (define (find-current-checkout arguments) > "Find the first checkout of ARGUMENTS that provided the current file. > Return #f if no such checkout is found." > (let ((current-root > (canonicalize-path > (string-append (dirname (current-filename)) "/..")))) > (find (lambda (argument) > (and=3D> (assq-ref argument 'file-name) > (lambda (name) > (string=3D? name current-root)))) arguments))) =E2=80=98canonicalize-path=E2=80=99 is called at run time, so that=E2=80=99= s fine. However, =E2=80=98current-filename=E2=80=99 is a macro that captures the source file= name at build time, so it=E2=80=99s the likely culprit here. I was going to go with something like: --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/gnu/ci.scm b/gnu/ci.scm index 5548d9560e..0bacfbe025 100644 --- a/gnu/ci.scm +++ b/gnu/ci.scm @@ -488,7 +488,8 @@ valid." Return #f if no such checkout is found." (let ((current-root (canonicalize-path - (string-append (dirname (current-filename)) "/..")))) + (string-append (dirname (search-path %load-path "gnu/ci.scm")) + "/..")))) (find (lambda (argument) (and=> (assq-ref argument 'file-name) (lambda (name) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable =E2=80=A6 but I don=E2=80=99t think we can assume that the checkout is in t= he =E2=80=98%load-path=E2=80=99 when this code is executed. WDYT, Mathieu? Looking at f71b0a0012d46bd30ead1a14ed58fd59647415e2, which introduced this, there might be other options too. Thanks, Ludo=E2=80=99. --=-=-=--