From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id UHTAOdVmy19LAwAA0tVLHw (envelope-from ) for ; Sat, 05 Dec 2020 10:54:13 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id yPKWNdVmy18OGQAAB5/wlQ (envelope-from ) for ; Sat, 05 Dec 2020 10:54:13 +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 AEB9294036A for ; Sat, 5 Dec 2020 10:54:12 +0000 (UTC) Received: from localhost ([::1]:35488 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1klVCc-0002YD-9g for larch@yhetil.org; Sat, 05 Dec 2020 05:54:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45192) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1klVCU-0002Y1-HX for bug-guix@gnu.org; Sat, 05 Dec 2020 05:54:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:35071) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1klVCU-0001Xf-9p for bug-guix@gnu.org; Sat, 05 Dec 2020 05:54:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1klVCU-0001cR-7N for bug-guix@gnu.org; Sat, 05 Dec 2020 05:54:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#45017: asdf-build-system packages have priority over user ones Resent-From: Guillaume Le Vaillant Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 05 Dec 2020 10:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45017 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Pierre Neidhardt Received: via spool by 45017-submit@debbugs.gnu.org id=B45017.16071655906162 (code B ref 45017); Sat, 05 Dec 2020 10:54:02 +0000 Received: (at 45017) by debbugs.gnu.org; 5 Dec 2020 10:53:10 +0000 Received: from localhost ([127.0.0.1]:46617 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1klVBS-0001as-8o for submit@debbugs.gnu.org; Sat, 05 Dec 2020 05:53:10 -0500 Received: from mout02.posteo.de ([185.67.36.66]:51273) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1klVBN-0001aZ-53 for 45017@debbugs.gnu.org; Sat, 05 Dec 2020 05:52:57 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 411412400FB for <45017@debbugs.gnu.org>; Sat, 5 Dec 2020 11:52:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1607165566; bh=c6ZNz6wFqZKqmuDFAg6rgDquz4TqOBaQwym1AyO+5P4=; h=From:To:Cc:Subject:Date:From; b=nSIA6+zWlmgZwKYhA8p+pNlWjez3k4vhDCgjEgKrlhqcmmB1K7RjwBBISBKqZf+lZ Bktpd0G9XOn6OzDSyp1zDoFK55D/CpeFJ8dWtccm48itIdqPb7ND8FRsaQP3rI4c++ FGPYJjZo2Gd/WlwRpRcy1fs7/XxlWIAikQM2LcmPJ36IQorOALus2qarQq/aDURgGa gULCIOxhiEK0Gn/PrpOtFNKIvZ1zyz0JHdMWRKhSNjfnG3ngLgGyJY6O47/fM2LyxP kAcji61WPRyu7o73JEOWfNCN8I3NvLY3CBYRGfRL7gE/du15QxzxGhXNwtDr4AsEXP AOBGMAmZ0vBiQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Cp5y42dMrz9rxQ; Sat, 5 Dec 2020 11:52:43 +0100 (CET) References: <87wnxzmdiy.fsf@ambrevar.xyz> <87im9j2j06.fsf@yamatai> <87360nm5b1.fsf@ambrevar.xyz> <87ft4n2cax.fsf@yamatai> <874kl0sjbe.fsf@ambrevar.xyz> <87y2ick1sm.fsf@yamatai> User-agent: mu4e 1.4.13; emacs 27.1 From: Guillaume Le Vaillant In-reply-to: <87y2ick1sm.fsf@yamatai> Date: Sat, 05 Dec 2020 11:52:43 +0100 Message-ID: <87v9dgjzic.fsf@yamatai> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 45017@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: -2.79 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=posteo.net header.s=2017 header.b=nSIA6+zW; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); 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-Migadu-Queue-Id: AEB9294036A X-Spam-Score: -2.79 X-Migadu-Scanner: ns3122888.ip-94-23-21.eu X-TUID: cKQS1Z0F+cv3 --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Updated patches in attachment. Do you see something else to fix or improve? --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-cl-asdf-Improve-priorities-of-configuration-file.patch Content-Transfer-Encoding: quoted-printable From=20757b4f4a84fdbcbd26148f2a170d84ba8c128c7a Mon Sep 17 00:00:00 2001 From: Guillaume Le Vaillant Date: Thu, 3 Dec 2020 14:52:02 +0100 Subject: [PATCH 1/6] gnu: cl-asdf: Improve priorities of configuration file search. * gnu/packages/patches/cl-asdf-config-directories.patch: New file. * gnu/local.mk (dist_PATCH_DATA): Add it. * gnu/packages/lisp.scm (cl-asdf)[native-inputs]: Add it. [arguments]: Apply the new patch. Co-authored-by: Pierre Neidhardt =2D-- gnu/local.mk | 1 + gnu/packages/lisp.scm | 28 ++++-------- .../patches/cl-asdf-config-directories.patch | 44 +++++++++++++++++++ 3 files changed, 53 insertions(+), 20 deletions(-) create mode 100644 gnu/packages/patches/cl-asdf-config-directories.patch diff --git a/gnu/local.mk b/gnu/local.mk index 28ad119846..f838ebe1fa 100644 =2D-- a/gnu/local.mk +++ b/gnu/local.mk @@ -868,6 +868,7 @@ dist_patch_DATA =3D \ %D%/packages/patches/cdrtools-3.01-mkisofs-isoinfo.patch \ %D%/packages/patches/ceph-disable-cpu-optimizations.patch \ %D%/packages/patches/chmlib-inttypes.patch \ + %D%/packages/patches/cl-asdf-config-directories.patch \ %D%/packages/patches/clamav-config-llvm-libs.patch \ %D%/packages/patches/clamav-system-tomsfastmath.patch \ %D%/packages/patches/clang-3.5-libc-search-path.patch \ diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index e4c963070e..0038cb0dca 100644 =2D-- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -90,6 +90,9 @@ (sha256 (base32 "1hpx30f6yrak15nw992k7x3pn75ahvjs04n4f134k68mhgs62km2")))) (build-system trivial-build-system) + (native-inputs + `(("config-patch" ,@(search-patches "cl-asdf-config-directories.patch= ")) + ("patch" ,patch))) (arguments `(#:modules ((guix build utils) (guix build lisp-utils)) @@ -101,28 +104,13 @@ (asdf-install (string-append out %source-install-prefix "/source/asdf/")) (src-asdf (string-append (assoc-ref %build-inputs "source"= ))) =2D (dst-asdf (string-append asdf-install "asdf.lisp"))) + (dst-asdf (string-append asdf-install "asdf.lisp")) + (patch (string-append (assoc-ref %build-inputs "patch") + "/bin/patch")) + (config-patch (assoc-ref %build-inputs "config-patch"))) (mkdir-p asdf-install) (copy-file src-asdf dst-asdf) =2D ;; Patch ASDF to make it read the configuration files in all =2D ;; the direcories listed in '$XDG_CONFIG_DIRS' instead of just =2D ;; the first. =2D (substitute* dst-asdf =2D (("\\(xdg-config-pathname \\*source-registry-directory\\* d= irection\\)") =2D "`(:source-registry =2D ,@(loop =2D for dir in (xdg-config-dirs =2D \"common-lisp/source-registry.conf.d/\= ") =2D collect `(:include ,dir)) =2D :inherit-configuration)") =2D (("\\(xdg-config-pathname \\*output-translations-directory\= \* direction\\)") =2D "`(:output-translations =2D ,@(loop =2D for dir in (xdg-config-dirs =2D \"common-lisp/asdf-output-translations= .conf.d/\") =2D collect `(:include ,dir)) =2D :inherit-configuration)"))) =2D #t))) + (invoke patch "-p1" "-i" config-patch dst-asdf))))) (home-page "https://common-lisp.net/project/asdf/") (synopsis "Another System Definition Facility") (description diff --git a/gnu/packages/patches/cl-asdf-config-directories.patch b/gnu/pa= ckages/patches/cl-asdf-config-directories.patch new file mode 100644 index 0000000000..2b1b51932c =2D-- /dev/null +++ b/gnu/packages/patches/cl-asdf-config-directories.patch @@ -0,0 +1,44 @@ +Search for ASDF configuration files first in user directories, and then in +Guix profiles. + +diff -ru a/asdf-3.3.4.lisp b/asdf-3.3.4.lisp +--- a/asdf-3.3.4.lisp 2020-02-14 20:16:22.000000000 +0100 ++++ b/asdf-3.3.4.lisp 2020-12-05 11:09:56.066229482 +0100 +@@ -12535,10 +12535,15 @@ + (find-preferred-file (system-config-pathnames *output-translations-fi= le*) + :direction direction)) + (defun user-output-translations-directory-pathname (&key (direction :in= put)) +- (xdg-config-pathname *output-translations-directory* direction)) +- (defun system-output-translations-directory-pathname (&key (direction := input)) +- (find-preferred-file (system-config-pathnames *output-translations-di= rectory*) ++ (find-preferred-file (list (xdg-config-home *output-translations-dire= ctory*)) + :direction direction)) ++ (defun system-output-translations-directory-pathname (&key (direction := input)) ++ `(:output-translations ++ ,@(loop :for dir :in (filter-pathname-set ++ (xdg-config-dirs ++ "common-lisp/asdf-output-translations.conf.d= /")) ++ :collect `(:include ,dir)) ++ :inherit-configuration)) + (defun environment-output-translations () + (getenv "ASDF_OUTPUT_TRANSLATIONS")) +=20 +@@ -12921,10 +12926,15 @@ + (find-preferred-file (system-config-pathnames *source-registry-file*) + :direction direction)) + (defun user-source-registry-directory (&key (direction :input)) +- (xdg-config-pathname *source-registry-directory* direction)) +- (defun system-source-registry-directory (&key (direction :input)) +- (find-preferred-file (system-config-pathnames *source-registry-direct= ory*) ++ (find-preferred-file (list (xdg-config-home *source-registry-director= y*)) + :direction direction)) ++ (defun system-source-registry-directory (&key (direction :input)) ++ `(:source-registry ++ ,@(loop :for dir :in (filter-pathname-set ++ (xdg-config-dirs ++ "common-lisp/source-registry.conf.d/")) ++ :collect `(:include ,dir)) ++ :inherit-configuration)) + (defun environment-source-registry () + (getenv "CL_SOURCE_REGISTRY")) +=20 =2D-=20 2.29.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-gnu-ccl-Use-system-ASDF-instead-of-bundled-one.patch Content-Transfer-Encoding: quoted-printable From=2053a63ff01929f4afe0d841ee9f4a09a5514b0ca8 Mon Sep 17 00:00:00 2001 From: Guillaume Le Vaillant Date: Fri, 4 Dec 2020 10:29:34 +0100 Subject: [PATCH 2/6] gnu: ccl: Use system ASDF instead of bundled one. * gnu/packages/lisp.scm (ccl)[native-inputs]: Add cl-asdf. [arguments]: Add 'replace-asdf' phase. [native-search-paths]: Add XDG_CONFIG_DIRS and XDG_DATA_DIRS. =2D-- gnu/packages/lisp.scm | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index 0038cb0dca..a4cbc28ffc 100644 =2D-- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -603,7 +603,8 @@ statistical profiler, a code coverage tool, and many ot= her extensions.") "0x4bjx6cxsjvxyagijhlvmc7jkyxifdvz5q5zvz37028va65243c") (_ "15l7cfa4a7jkfwdzsfm4q3n22jnb57imxahpql3h77xin57v1gbz"))= )))))) (native-inputs =2D `(("m4" ,m4))) + `(("cl-asdf" ,cl-asdf) + ("m4" ,m4))) (arguments `(#:tests? #f ;no 'check' target #:modules ((ice-9 match) @@ -615,6 +616,16 @@ statistical profiler, a code coverage tool, and many o= ther extensions.") (add-after 'unpack 'unpack-image (lambda* (#:key inputs #:allow-other-keys) (invoke "tar" "xzvf" (assoc-ref inputs "ccl-bootstrap")))) + (add-after 'unpack 'replace-asdf + ;; Use system ASDF instead of bundled one. + (lambda* (#:key inputs #:allow-other-keys) + (let* ((cl-asdf (assoc-ref inputs "cl-asdf")) + (guix-asdf (string-append + cl-asdf + "/share/common-lisp/source/asdf/asdf.lisp"= )) + (contrib-asdf "tools/asdf.lisp")) + (delete-file contrib-asdf) + (copy-file guix-asdf contrib-asdf)))) (delete 'configure) (add-before 'build 'pre-build ;; Enter the source directory for the current platform's lisp @@ -678,6 +689,13 @@ statistical profiler, a code coverage tool, and many o= ther extensions.") "exec -a \"$0\" " libdir kernel " \"$@\"\n")))) (chmod wrapper #o755)) #t))))) + (native-search-paths + (list (search-path-specification + (variable "XDG_DATA_DIRS") + (files '("share"))) + (search-path-specification + (variable "XDG_CONFIG_DIRS") + (files '("etc"))))) (supported-systems '("i686-linux" "x86_64-linux" "armhf-linux")) (home-page "https://ccl.clozure.com/") (synopsis "Common Lisp implementation") =2D-=20 2.29.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0003-gnu-clisp-Use-system-ASDF-instead-of-bundled-one.patch Content-Transfer-Encoding: quoted-printable From=20a855535add82bf0ba4cacf84a526be38f8230440 Mon Sep 17 00:00:00 2001 From: Guillaume Le Vaillant Date: Fri, 4 Dec 2020 10:48:41 +0100 Subject: [PATCH 3/6] gnu: clisp: Use system ASDF instead of bundled one. * gnu/packages/lisp.scm (clisp)[native-inputs]: Add cl-asdf. [arguments]: Add 'replace-asdf' phase. [native-search-paths]: Add XDG_CONFIG_DIRS and XDG_DATA_DIRS. =2D-- gnu/packages/lisp.scm | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index a4cbc28ffc..2ec4da8fbb 100644 =2D-- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -322,6 +322,8 @@ supporting ASDF, Sockets, Gray streams, MOP, and other = useful components.") (sha256 (base32 "0k2dmgl0miz3767iks4p0mvp6xw0ysyxhjpklyh11j010rmh6hqb")))) (build-system gnu-build-system) + (native-inputs + `(("cl-asdf" ,cl-asdf))) (inputs `(("libffcall" ,libffcall) ("ncurses" ,ncurses) ("readline" ,readline) @@ -356,7 +358,24 @@ supporting ASDF, Sockets, Gray streams, MOP, and other= useful components.") (("/bin/sh") "sh")) (substitute* '("src/clisp-link.in") (("/bin/pwd") "pwd")) =2D #t))))) + #t)) + (add-after 'unpack 'replace-asdf + ;; Use system ASDF instead of bundled one. + (lambda* (#:key inputs #:allow-other-keys) + (let* ((cl-asdf (assoc-ref inputs "cl-asdf")) + (guix-asdf (string-append + cl-asdf + "/share/common-lisp/source/asdf/asdf.lisp"= )) + (contrib-asdf "modules/asdf/asdf.lisp")) + (delete-file contrib-asdf) + (copy-file guix-asdf contrib-asdf))))))) + (native-search-paths + (list (search-path-specification + (variable "XDG_DATA_DIRS") + (files '("share"))) + (search-path-specification + (variable "XDG_CONFIG_DIRS") + (files '("etc"))))) (home-page "https://clisp.sourceforge.io/") (synopsis "A Common Lisp implementation") (description =2D-=20 2.29.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0004-gnu-ecl-Simplify-replace-asdf-phase.patch Content-Transfer-Encoding: quoted-printable From=205b3ae58f494a1728143b85abb5ef5655f04499d7 Mon Sep 17 00:00:00 2001 From: Guillaume Le Vaillant Date: Sat, 5 Dec 2020 10:11:38 +0100 Subject: [PATCH 4/6] gnu: ecl: Simplify 'replace-asdf' phase. * gnu/packages/lisp.scm (ecl)[arguments]: Remove unused 'out' variable in 'replace-asdf' phase. =2D-- gnu/packages/lisp.scm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index 2ec4da8fbb..a540174c88 100644 =2D-- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -250,12 +250,11 @@ interface to the Tk widget system.") (delete 'check) (add-after 'unpack 'replace-asdf ;; Use system ASDF instead of bundled one. =2D (lambda* (#:key inputs outputs #:allow-other-keys) + (lambda* (#:key inputs #:allow-other-keys) (let* ((cl-asdf (assoc-ref inputs "cl-asdf")) (guix-asdf (string-append cl-asdf "/share/common-lisp/source/asdf/asdf.lisp"= )) =2D (out (string-append (assoc-ref outputs "out"))) (contrib-asdf "contrib/asdf/asdf.lisp")) (copy-file guix-asdf contrib-asdf)) #t)) =2D-=20 2.29.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0005-gnu-sbcl-Simplify-replace-asdf-phase.patch Content-Transfer-Encoding: quoted-printable From=20466d7cdbee216df3fa298196228e265d9431dcfa Mon Sep 17 00:00:00 2001 From: Guillaume Le Vaillant Date: Sat, 5 Dec 2020 10:22:42 +0100 Subject: [PATCH 5/6] gnu: sbcl: Simplify 'replace-asdf' phase. * gnu/packages/lisp.scm (sbcl)[arguments]: Remove unused 'out' variable in 'replace-asdf' phase. =2D-- gnu/packages/lisp.scm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index a540174c88..3d446290a7 100644 =2D-- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -444,12 +444,11 @@ an interpreter, a compiler, a debugger, and much more= .") ;; of ASDF we use to build software; therefore, replace the con= trib ;; ASDF with the version packaged into Guix. ;; [1] - https://bugs.launchpad.net/sbcl/+bug/1823442 =2D (lambda* (#:key inputs outputs #:allow-other-keys) + (lambda* (#:key inputs #:allow-other-keys) (let* ((cl-asdf (assoc-ref inputs "cl-asdf")) (guix-asdf (string-append cl-asdf "/share/common-lisp/source/asdf/asdf.lisp"= )) =2D (out (string-append (assoc-ref outputs "out"))) (contrib-asdf "contrib/asdf/asdf.lisp")) (copy-file guix-asdf contrib-asdf)) #t)) =2D-=20 2.29.2 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCX8tmew8cZ2x2QHBvc3Rl by5uZXQACgkQa+ggit8h/j8QHgD+KL5dSHMlzdz2UNWf6fJAqmfXkq5//Q5yfXvh PznRA9wA/i71IMC7cNvar6Hr9mc9sXdQc9jRZwNy+S/Fu8lFoISs =7zdY -----END PGP SIGNATURE----- --==-=-=--