From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id CLStGNwAtV7afwAA0tVLHw (envelope-from ) for ; Fri, 08 May 2020 06:49:00 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id qO/CNugAtV4EGAAA1q6Kng (envelope-from ) for ; Fri, 08 May 2020 06:49:12 +0000 Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:470:142::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 AD8AC940C01 for ; Fri, 8 May 2020 06:49:10 +0000 (UTC) Received: from localhost ([::1]:37980 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWwoo-0006Ud-Vu for larch@yhetil.org; Fri, 08 May 2020 02:49:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52842) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWwog-0006TB-Ut for guix-patches@gnu.org; Fri, 08 May 2020 02:49:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:32932) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jWwog-0001IS-K4 for guix-patches@gnu.org; Fri, 08 May 2020 02:49:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jWwog-00064X-HO for guix-patches@gnu.org; Fri, 08 May 2020 02:49:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41135] [PATCH 1/3] build: asdf-build-system: Use SBCL source in CL packages. Resent-From: Pierre Neidhardt Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 08 May 2020 06:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41135 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41135@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.158892052723318 (code B ref -1); Fri, 08 May 2020 06:49:02 +0000 Received: (at submit) by debbugs.gnu.org; 8 May 2020 06:48:47 +0000 Received: from localhost ([127.0.0.1]:44478 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWwoR-000642-J7 for submit@debbugs.gnu.org; Fri, 08 May 2020 02:48:47 -0400 Received: from lists.gnu.org ([209.51.188.17]:42868) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWwoQ-00063u-1D for submit@debbugs.gnu.org; Fri, 08 May 2020 02:48:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52758) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWwoO-00066L-LG for guix-patches@gnu.org; Fri, 08 May 2020 02:48:45 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:36901) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWwoM-0000Rr-Rj for guix-patches@gnu.org; Fri, 08 May 2020 02:48:44 -0400 X-Originating-IP: 78.199.129.170 Received: from localhost.localdomain (moi44-1-78-199-129-170.fbx.proxad.net [78.199.129.170]) (Authenticated sender: mail@ambrevar.xyz) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 234941C0006 for ; Fri, 8 May 2020 06:48:38 +0000 (UTC) From: Pierre Neidhardt Date: Fri, 8 May 2020 08:48:27 +0200 Message-Id: <20200508064827.1270-1-mail@ambrevar.xyz> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=217.70.183.197; envelope-from=mail@ambrevar.xyz; helo=relay5-d.mail.gandi.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/08 02:48:39 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -1.1 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -2.1 (--) 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" X-Scanner: scn0 X-Spam-Score: 3.99 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 2001:470:142::17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Scan-Result: default: False [3.99 / 13.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.49886130114186]; HAS_XOIP(0.00)[]; DWL_DNSWL_FAIL(0.00)[2001:470:142::17:server fail]; R_SPF_ALLOW(-0.20)[+ip6:2001:470:142::/48:c]; R_MISSING_CHARSET(2.50)[]; TO_DN_NONE(0.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.10), country: US(-0.00), ip: 2001:470:142::17(-0.50)]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_IN_DNSWL_FAIL(0.00)[2001:470:142::17:server fail]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:22989, ipnet:2001:470:142::/48, country:US]; R_DKIM_NA(0.00)[]; TAGGED_FROM(0.00)[larch=yhetil.org]; ARC_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[mail@ambrevar.xyz,guix-patches-bounces@gnu.org]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[ambrevar.xyz]; HAS_LIST_UNSUB(-0.01)[]; RCPT_COUNT_ONE(0.00)[1]; RECEIVED_SPAMHAUS_PBL(0.00)[78.199.129.170:received]; MID_CONTAINS_FROM(1.00)[]; RCVD_COUNT_SEVEN(0.00)[10]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: ipBZg1SlEyNI * guix/build/asdf-build-system.scm (copy-files-to-output): Don't attempt to reset timestamps on files without write access. (install): When parent SBCL package is in the inputs, use its source. This way we get possibly patched sources in CL packages as well (e.g. for FFI). This is also useful for sources that generate files on load-op, like cl-unicode. * guix/build-system/asdf.scm (package-with-build-system): Forward the SBCL parent as a native input so that it can be used in the install phase above. --- guix/build-system/asdf.scm | 5 ++++- guix/build/asdf-build-system.scm | 34 ++++++++++++++++++++++++++------ 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/guix/build-system/asdf.scm b/guix/build-system/asdf.scm index f794bf006b..630b99e2bf 100644 --- a/guix/build-system/asdf.scm +++ b/guix/build-system/asdf.scm @@ -230,7 +230,10 @@ set up using CL source package conventions." ((#:phases phases) (list phases-transformer phases)))) (inputs (new-inputs package-inputs)) (propagated-inputs (new-propagated-inputs)) - (native-inputs (new-inputs package-native-inputs)) + (native-inputs (append (if target-is-source? + (list (list (package-name pkg) pkg)) + '()) + (new-inputs package-native-inputs))) (outputs (if target-is-source? '("out") (package-outputs pkg))))) diff --git a/guix/build/asdf-build-system.scm b/guix/build/asdf-build-system.scm index f3f4b49bcf..5a512d5332 100644 --- a/guix/build/asdf-build-system.scm +++ b/guix/build/asdf-build-system.scm @@ -85,7 +85,8 @@ valid." ;; files before compiling. (for-each (lambda (file) (let ((s (lstat file))) - (unless (eq? (stat:type s) 'symlink) + (unless (or (eq? (stat:type s) 'symlink) + (not (access? file W_OK))) (utime file 0 0 0 0)))) (find-files source #:directories? #t)) (copy-recursively source target #:keep-mtime? #t) @@ -97,12 +98,33 @@ valid." (find-files target "\\.asd$")) #t)) -(define* (install #:key outputs #:allow-other-keys) - "Copy and symlink all the source files." +(define* (install #:key inputs outputs #:allow-other-keys) + "Copy and symlink all the source files. +The source files are taken from the corresponding SBCL package if it's present +in the native-inputs." (define output (assoc-ref outputs "out")) - (copy-files-to-output output - (package-name->name+version - (strip-store-file-name output)))) + (define package-name + (package-name->name+version + (strip-store-file-name output))) + (define no-prefix-name (string-drop package-name (string-length "cl-"))) + (define sbcl-source (or (assoc-ref inputs (string-append "sbcl-" no-prefix-name)) + (assoc-ref inputs (string-append "sbcl-" package-name)))) + + (define source-directory + (if sbcl-source + (find file-exists? + (list (string-append sbcl-source + "/share/common-lisp/sbcl-source/" + no-prefix-name) + (string-append sbcl-source + "/share/common-lisp/sbcl-source/" + package-name) + ".")) + ".")) + (with-directory-excursion source-directory + (copy-files-to-output output + (package-name->name+version + (strip-store-file-name output))))) (define* (copy-source #:key outputs asd-system-name #:allow-other-keys) "Copy the source to the library output." -- 2.25.1