From patchwork Fri May 8 17:39:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre Neidhardt X-Patchwork-Id: 21935 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9644C27BBE3; Fri, 8 May 2020 18:40:13 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2 autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 11ED127BBE1 for ; Fri, 8 May 2020 18:40:13 +0100 (BST) Received: from localhost ([::1]:32884 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jX6yq-0000Ul-JK for patchwork@mira.cbaines.net; Fri, 08 May 2020 13:40:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49880) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jX6yh-0000R2-E4 for guix-patches@gnu.org; Fri, 08 May 2020 13:40:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34705) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jX6yh-0006iQ-52 for guix-patches@gnu.org; Fri, 08 May 2020 13:40:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jX6yh-00087V-33 for guix-patches@gnu.org; Fri, 08 May 2020 13:40:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41135] [PATCH 1/4] build: asdf-build-system: Use SBCL source in CL packages. References: <20200508064827.1270-1-mail@ambrevar.xyz> In-Reply-To: <20200508064827.1270-1-mail@ambrevar.xyz> Resent-From: Pierre Neidhardt Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 08 May 2020 17:40:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41135 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41135@debbugs.gnu.org Received: via spool by 41135-submit@debbugs.gnu.org id=B41135.158895959831182 (code B ref 41135); Fri, 08 May 2020 17:40:03 +0000 Received: (at 41135) by debbugs.gnu.org; 8 May 2020 17:39:58 +0000 Received: from localhost ([127.0.0.1]:46249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jX6yb-00086m-TY for submit@debbugs.gnu.org; Fri, 08 May 2020 13:39:58 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:40743) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jX6yZ-000863-5u for 41135@debbugs.gnu.org; Fri, 08 May 2020 13:39:56 -0400 Received: from localhost.localdomain (moi44-1-78-199-129-170.fbx.proxad.net [78.199.129.170]) (Authenticated sender: mail@ambrevar.xyz) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 4F42E100002 for <41135@debbugs.gnu.org>; Fri, 8 May 2020 17:39:47 +0000 (UTC) From: Pierre Neidhardt Date: Fri, 8 May 2020 19:39:37 +0200 Message-Id: <20200508173940.20147-1-mail@ambrevar.xyz> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * 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 | 54 ++++++++++++++++++++++++++++---- 2 files changed, 52 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..25dd031962 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,53 @@ 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 compile package (e.g. SBCL) +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 pkgname) + (if (string-index pkgname #\-) + (string-drop pkgname (1+ (string-index pkgname #\-))) + pkgname)) + (define parent + (match (assoc package-name inputs + (lambda (key alist-car) + (let* ((alt-key (no-prefix key)) + (alist-car (no-prefix alist-car))) + (or (string=? alist-car key) + (string=? alist-car alt-key))))) + (#f #f) + (p (cdr p)))) + (define parent-name + (and parent + (package-name->name+version (strip-store-file-name parent)))) + (define parent-source + (and parent + (string-append parent "/share/common-lisp/" + (string-take parent-name + (string-index parent-name #\-)) + "-source"))) + + (define (first-subdirectory directory) ; From gnu-build-system. + "Return the file name of the first sub-directory of DIRECTORY." + (match (scandir directory + (lambda (file) + (and (not (member file '("." ".."))) + (file-is-directory? (string-append directory "/" + file))))) + ((first . _) first))) + (define source-directory + (if (and parent-source + (file-exists? parent-source)) + (string-append parent-source "/" (first-subdirectory parent-source)) + ".")) + + (with-directory-excursion source-directory + (copy-files-to-output output package-name))) (define* (copy-source #:key outputs asd-system-name #:allow-other-keys) "Copy the source to the library output." From patchwork Fri May 8 17:39:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre Neidhardt X-Patchwork-Id: 21934 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 7F26827BBE1; Fri, 8 May 2020 18:40:11 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2 autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 9ACA127BBE3 for ; Fri, 8 May 2020 18:40:10 +0100 (BST) Received: from localhost ([::1]:32790 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jX6yo-0000RJ-4z for patchwork@mira.cbaines.net; Fri, 08 May 2020 13:40:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49874) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jX6yg-0000Qi-NX for guix-patches@gnu.org; Fri, 08 May 2020 13:40:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34703) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jX6yg-0006iI-EG for guix-patches@gnu.org; Fri, 08 May 2020 13:40:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jX6yg-00087G-92 for guix-patches@gnu.org; Fri, 08 May 2020 13:40:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41135] [PATCH 2/4] gnu: cl-dexador: Fix build with new sbcl-package->cl-source-package function. Resent-From: Pierre Neidhardt Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 08 May 2020 17:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41135 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41135@debbugs.gnu.org Received: via spool by 41135-submit@debbugs.gnu.org id=B41135.158895959731168 (code B ref 41135); Fri, 08 May 2020 17:40:02 +0000 Received: (at 41135) by debbugs.gnu.org; 8 May 2020 17:39:57 +0000 Received: from localhost ([127.0.0.1]:46245 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jX6yb-00086Y-Dm for submit@debbugs.gnu.org; Fri, 08 May 2020 13:39:57 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:50927) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jX6yZ-000864-79 for 41135@debbugs.gnu.org; Fri, 08 May 2020 13:39:56 -0400 Received: from localhost.localdomain (moi44-1-78-199-129-170.fbx.proxad.net [78.199.129.170]) (Authenticated sender: mail@ambrevar.xyz) by relay11.mail.gandi.net (Postfix) with ESMTPSA id EFC14100004 for <41135@debbugs.gnu.org>; Fri, 8 May 2020 17:39:48 +0000 (UTC) From: Pierre Neidhardt Date: Fri, 8 May 2020 19:39:38 +0200 Message-Id: <20200508173940.20147-2-mail@ambrevar.xyz> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200508173940.20147-1-mail@ambrevar.xyz> References: <20200508173940.20147-1-mail@ambrevar.xyz> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/lisp-xyz.scm (cl-dexador)[arguments]: Remove 'reset-gzip-timestamps phase. --- gnu/packages/lisp-xyz.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm index 4f406ded66..6a199c32f9 100644 --- a/gnu/packages/lisp-xyz.scm +++ b/gnu/packages/lisp-xyz.scm @@ -5861,8 +5861,8 @@ neat APIs and connection-pooling. It is meant to supersede Drakma.") ;; asdf-build-system/source has its own phases and does not inherit ;; from asdf-build-system/sbcl phases. (modify-phases %standard-phases/source - (add-after 'unpack 'fix-permissions - (lambda _ (make-file-writable "t/data/test.gz") #t))))))) + ;; Already done in SBCL package. + (delete 'reset-gzip-timestamps)))))) (define-public ecl-dexador (sbcl-package->ecl-package sbcl-dexador)) From patchwork Fri May 8 17:39:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre Neidhardt X-Patchwork-Id: 21933 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 330D727BBE4; Fri, 8 May 2020 18:40:11 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2 autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 97B8727BBE1 for ; Fri, 8 May 2020 18:40:10 +0100 (BST) Received: from localhost ([::1]:32794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jX6yo-0000RR-2g for patchwork@mira.cbaines.net; Fri, 08 May 2020 13:40:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49878) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jX6yh-0000Qw-1b for guix-patches@gnu.org; Fri, 08 May 2020 13:40:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34704) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jX6yg-0006iM-Ow for guix-patches@gnu.org; Fri, 08 May 2020 13:40:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jX6yg-00087N-Lv for guix-patches@gnu.org; Fri, 08 May 2020 13:40:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41135] [PATCH 3/4] gnu: cl-iolib: Propagate libfixposix or else it won't compile. Resent-From: Pierre Neidhardt Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 08 May 2020 17:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41135 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41135@debbugs.gnu.org Received: via spool by 41135-submit@debbugs.gnu.org id=B41135.158895959831175 (code B ref 41135); Fri, 08 May 2020 17:40:02 +0000 Received: (at 41135) by debbugs.gnu.org; 8 May 2020 17:39:58 +0000 Received: from localhost ([127.0.0.1]:46247 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jX6yb-00086f-Lw for submit@debbugs.gnu.org; Fri, 08 May 2020 13:39:57 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:57329) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jX6yZ-000866-60 for 41135@debbugs.gnu.org; Fri, 08 May 2020 13:39:56 -0400 Received: from localhost.localdomain (moi44-1-78-199-129-170.fbx.proxad.net [78.199.129.170]) (Authenticated sender: mail@ambrevar.xyz) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 70B8B100006 for <41135@debbugs.gnu.org>; Fri, 8 May 2020 17:39:49 +0000 (UTC) From: Pierre Neidhardt Date: Fri, 8 May 2020 19:39:39 +0200 Message-Id: <20200508173940.20147-3-mail@ambrevar.xyz> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200508173940.20147-1-mail@ambrevar.xyz> References: <20200508173940.20147-1-mail@ambrevar.xyz> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/lisp-xyz.scm (cl-iolib)[propagated-inputs]: Add libfixposix. --- gnu/packages/lisp-xyz.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm index 6a199c32f9..f8685f8ce1 100644 --- a/gnu/packages/lisp-xyz.scm +++ b/gnu/packages/lisp-xyz.scm @@ -5562,7 +5562,13 @@ and @code{kqueue(2)}), a pathname library and file-system utilities.") ((#:asd-system-name _) "iolib"))))) (define-public cl-iolib - (sbcl-package->cl-source-package sbcl-iolib)) + (let ((parent (sbcl-package->cl-source-package sbcl-iolib))) + (package + (inherit parent) + (propagated-inputs + ;; Need header to compile. + `(("libfixposix" ,libfixposix) + ,@(package-propagated-inputs parent)))))) (define-public sbcl-ieee-floats (let ((commit "566b51a005e81ff618554b9b2f0b795d3b29398d")