From unknown Wed Jun 18 23:05:08 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#62551 <62551@debbugs.gnu.org> To: bug#62551 <62551@debbugs.gnu.org> Subject: Status: Added new transformation option: --with-configure-flag Reply-To: bug#62551 <62551@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:05:08 +0000 retitle 62551 Added new transformation option: --with-configure-flag reassign 62551 guix-patches submitter 62551 Sarthak Shah severity 62551 normal tag 62551 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 30 15:53:00 2023 Received: (at submit) by debbugs.gnu.org; 30 Mar 2023 19:53:00 +0000 Received: from localhost ([127.0.0.1]:59469 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1phyKS-0003RO-5h for submit@debbugs.gnu.org; Thu, 30 Mar 2023 15:53:00 -0400 Received: from lists.gnu.org ([209.51.188.17]:41834) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1phyKQ-0003RG-5t for submit@debbugs.gnu.org; Thu, 30 Mar 2023 15:52:59 -0400 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 1phyKP-0004Kk-Ne for guix-patches@gnu.org; Thu, 30 Mar 2023 15:52:57 -0400 Received: from mail-qv1-xf2b.google.com ([2607:f8b0:4864:20::f2b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1phyKN-0000F0-QG; Thu, 30 Mar 2023 15:52:57 -0400 Received: by mail-qv1-xf2b.google.com with SMTP id o44so14980063qvo.4; Thu, 30 Mar 2023 12:52:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680205973; h=cc:to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=iH+1m2TVBNlICFO0MtMvQdfdvY4XRfM7Fyh6XcEcXig=; b=ZdN2mJzGHC/syokgGBGHIz6ukqXP8oqLnio1EAIDjUIHw2uSfPnkCpXDuy/Mn+hRHs RRxyG4mMcrasYFvEsEqh24lz8/V3RbNHemu4dsElXGy3k3mfULMu3ikYHVhlgdXGaJXs b25L2W9llkjnwnTovBEi/1tqhyPLY3sNw/P+RlEfnPkhw9WAv+xcOd4kzAOil0Zr/TVe dLD7GJnicwDYWc+M+husJu6ECuYrfM0Ce59EbXj1Uv2Rc7VdSDHVhZgEUpZQVTpBnyS7 s8gdsqV85XXvMVjGAp+VjxiViyqax8oPsT1fdgf3JEoEVDpZE1rB/5gkjrpo8ofMgIxl SRTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680205973; h=cc:to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=iH+1m2TVBNlICFO0MtMvQdfdvY4XRfM7Fyh6XcEcXig=; b=z8acUPX8Iu7fiyYVKd2lbGh73seciniL5PQizxyRZSN5jLKnrtlASZSB0USwfa+kqV R0sV2507m8L6ZV+CXDHRguoAq5dUMnZuxgKht1tNC49EKe/mg89gr1wOlxZovFwVXCpJ VagHmbIswGDYMJkYgoHUkHy9ZdZhEy+ojBJK8m/Y9TiN54zW4weTm4Cn2uD+MzcG7t0s bhVej7tErcNteUdPuqEWBQq2B4EGzZGDAcSke18y2YGzv+jj5k2uhJYdKnv25ipENtzT UE3g+d/Y78nYPGLJh3TXb3UlYvNm752IlDFnHELIWMAVAF0rErXOQ5/GBYnODav8NCCb jNpQ== X-Gm-Message-State: AAQBX9fYGekaPXTLBPcZEMQeTRXqV7O5zmGFpOuea9OkYVHR5dhwUI2E EeQpTskqYGBNxykMhY0e1+3HQrgsnq4DtrfL6zO53rOZLNO6kA== X-Google-Smtp-Source: AKy350as23g4+MvnmWlPwPXcHzTC3CprChmI9gQrSYGGZfAN6xUhUB0t0HFwRWU10CG//69ldxHo9xKZN3Oc7h9zZfI= X-Received: by 2002:ad4:4d4e:0:b0:571:e9d3:24a9 with SMTP id m14-20020ad44d4e000000b00571e9d324a9mr4215918qvm.10.1680205972890; Thu, 30 Mar 2023 12:52:52 -0700 (PDT) MIME-Version: 1.0 From: Sarthak Shah Date: Fri, 31 Mar 2023 01:22:41 +0530 Message-ID: Subject: Added new transformation option: --with-configure-flag To: guix-patches@gnu.org Content-Type: multipart/alternative; boundary="00000000000029ea0b05f823700a" Received-SPF: pass client-ip=2607:f8b0:4864:20::f2b; envelope-from=shahsarthakw@gmail.com; helo=mail-qv1-xf2b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: =?UTF-8?Q?Ludovic_Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --00000000000029ea0b05f823700a Content-Type: text/plain; charset="UTF-8" This patch adds a new transformation option that lets the user specify a package to add an extra #:configure-flags value to. Functionally, it is quite similar to the --with-patch transform. Currently, I've generated a list of build systems that do not support #:configure-flags that this transform checks against, but this could be improved by making the transform check if any given transform has the #:configure-flags keyword in its arguments. Please test this patch if possible; my preliminary testing indicates that it is working, however it could fail for edge cases I have not considered. CCing Ludovic as he might be interested in this. --- guix/transformations.scm | 70 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/guix/transformations.scm b/guix/transformations.scm index 8ff472ad21..8f260807dc 100644 --- a/guix/transformations.scm +++ b/guix/transformations.scm @@ -676,6 +676,70 @@ (define rewrite (rewrite obj) obj))) +(define (transform-package-configure-flag specs) + "Return a procedure that, when passed a package and a flag, adds the flag to #:configure-flags in the package's +'arguments' field." + (define (package-with-configure-flag p extra-flag) + (package/inherit p + (arguments + (substitute-keyword-arguments (package-arguments p) + ((#:configure-flags list-of-flags (quote '())) + ;; here extra-flag takes the form (--extra-flag) + ;; hence it must be spliced to avoid eval errors + `(cons* ,@extra-flag ,list-of-flags)))))) + + (define (coalesce-alist alist) + ;; Coalesce multiple occurrences of the same key in ALIST. + (let loop ((alist alist) + (keys '()) + (mapping vlist-null)) + (match alist + (() + (map (lambda (key) + (cons key (vhash-fold* cons '() key mapping))) + (delete-duplicates (reverse keys)))) + (((key . value) . rest) + (loop rest + (cons key keys) + (vhash-cons key value mapping)))))) + + (define %BUILD-SYSTEMS-WITHOUT-CONFIGURE-FLAGS + ;; These build systems do not have a #:configure-flags parameter +'(android-ndk asdf/sbcl asdf/ecl asdf/source cargo channel chicken clojure copy dub dune elm emacs go guile julia linux-module maven minetest-mod minify node perl rakudo rebar ruby scons texlive tree-sitter trivial)) + + (define (build-system-supports-flags? spec) + ;; XXX: a more sophisticated approach could be added that checks the given build system for a configure-flags option + ;; if a new build system is added, it needs to be added to the %BUILD-SYSTEMS-WITHOUT-CONFIGURE-FLAGS list manually + (not (member (build-system-name (package-build-system spec)) + %BUILD-SYSTEMS-WITHOUT-CONFIGURE-FLAGS))) + + (define cflags + ;; Spec/flag alist. + (coalesce-alist + (map (lambda (spec) + (match (string-tokenize spec %not-equal) + ((spec flag) + (cons spec flag)) + (_ + (raise (formatted-message + (G_ "~a: invalid package configure-flags specification") + spec))))) + specs))) + + (define rewrite + (package-input-rewriting/spec + (map (match-lambda + ((spec . flags) + (cons spec (cut package-with-configure-flag <> flags)))) + cflags))) + + (lambda (obj) + (if (and + (package? obj) + (build-system-supports-flags? obj)) + (rewrite obj) + obj))) + (define (patched-source name source patches) "Return a file-like object with the given NAME that applies PATCHES to SOURCE. SOURCE must itself be a file-like object of any type, including @@ -845,6 +909,7 @@ (define %transformations (tune . ,transform-package-tuning) (with-debug-info . ,transform-package-with-debug-info) (without-tests . ,transform-package-tests) + (with-configure-flag . ,transform-package-configure-flag) (with-patch . ,transform-package-patches) (with-latest . ,transform-package-latest) (with-version . ,transform-package-version))) @@ -915,6 +980,8 @@ (define micro-architecture (parser 'with-debug-info)) (option '("without-tests") #t #f (parser 'without-tests)) + (option '("with-configure-flag") #t #f + (parser 'with-configure-flag)) (option '("with-patch") #t #f (parser 'with-patch)) (option '("with-latest") #t #f @@ -952,6 +1019,9 @@ (define (show-transformation-options-help/detailed) (display (G_ " --with-patch=PACKAGE=FILE add FILE to the list of patches of PACKAGE")) + (display (G_ " + --with-configure-flag=PACKAGE=FLAG + add FLAG to the list of #:configure-flags of PACKAGE")) (display (G_ " --with-latest=PACKAGE use the latest upstream release of PACKAGE")) -- 2.40.0 --00000000000029ea0b05f823700a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
This patch adds a new transformation option= that lets the user specify a package to add an extra #:configure-flags val= ue to. Functionally, it is quite similar to the --with-patch transform.
=
Currently, I've generated a list of build systems that do not sup= port #:configure-flags that this transform checks against, but this could b= e improved by making the transform check if any given transform has the #:c= onfigure-flags keyword in its arguments.
Please test this patch if= possible; my preliminary testing indicates that it is working, however it = could fail for edge cases I have not considered.
CCing Ludovic as = he might be interested in this.

---
=C2= =A0guix/transformations.scm | 70 ++++++++++++++++++++++++++++++++++++++++=C2=A01 file changed, 70 insertions(+)

diff --git a/guix/transform= ations.scm b/guix/transformations.scm
index 8ff472ad21..8f260807dc 10064= 4
--- a/guix/transformations.scm
+++ b/guix/transformations.scm
@@= -676,6 +676,70 @@ (define rewrite
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(re= write obj)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0obj)))
=C2=A0
+(defin= e (transform-package-configure-flag specs)
+ =C2=A0"Return a proced= ure that, when passed a package and a flag, adds the flag to #:configure-fl= ags in the package's
+'arguments' field."
+ =C2=A0(d= efine (package-with-configure-flag p extra-flag)
+ =C2=A0 =C2=A0(package= /inherit p
+ =C2=A0 =C2=A0 =C2=A0(arguments
+ =C2=A0 =C2=A0 =C2=A0 (s= ubstitute-keyword-arguments (package-arguments p)
+ =C2=A0 =C2=A0 =C2=A0= =C2=A0 ((#:configure-flags list-of-flags (quote '()))
+ =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0;; here extra-flag takes the form (--extra-flag)+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; hence it must be spliced to avoid e= val errors
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0`(cons* ,@extra-flag ,lis= t-of-flags))))))
+
+ =C2=A0(define (coalesce-alist alist)
+ =C2=A0= =C2=A0;; Coalesce multiple occurrences of the same key in ALIST.
+ =C2= =A0 =C2=A0(let loop ((alist alist)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 (keys '())
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 (mapping vlist-null))
+ =C2=A0 =C2=A0 =C2=A0(match alist
+ = =C2=A0 =C2=A0 =C2=A0 =C2=A0(()
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 (map (lambd= a (key)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(cons k= ey (vhash-fold* cons '() key mapping)))
+ =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(delete-duplicates (reverse keys))))
+ =C2=A0 = =C2=A0 =C2=A0 =C2=A0(((key . value) . rest)
+ =C2=A0 =C2=A0 =C2=A0 =C2= =A0 (loop rest
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (cons = key keys)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (vhash-cons= key value mapping))))))
+
+ =C2=A0(define %BUILD-SYSTEMS-WITHOUT-CON= FIGURE-FLAGS =C2=A0
+ =C2=A0 =C2=A0;; These build systems do not have a= #:configure-flags parameter
+'(android-ndk asdf/sbcl asdf/ecl asdf/= source cargo channel chicken clojure copy dub dune elm emacs go guile julia= linux-module maven minetest-mod minify node perl rakudo rebar ruby scons t= exlive tree-sitter trivial))
+ =C2=A0
+ =C2=A0(define (build-system-s= upports-flags? spec)
+ =C2=A0 =C2=A0;; XXX: a more sophisticated approac= h could be added that checks the given build system for a configure-flags o= ption
+ =C2=A0 =C2=A0;; if a new build system is added, it needs to be a= dded to the %BUILD-SYSTEMS-WITHOUT-CONFIGURE-FLAGS list manually
+ =C2= =A0 =C2=A0(not (member (build-system-name (package-build-system spec))
+= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 %BUILD-SYSTEMS-WIT= HOUT-CONFIGURE-FLAGS)))
+ =C2=A0
+ =C2=A0(define cflags
+ =C2=A0 = =C2=A0;; Spec/flag alist.
+ =C2=A0 =C2=A0(coalesce-alist
+ =C2=A0 =C2= =A0 (map (lambda (spec)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(matc= h (string-tokenize spec %not-equal)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0((spec flag)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 (cons spec flag))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0(_
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (raise (formatt= ed-message
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 (G_ "~a: invalid package configure-flags specificati= on")
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 spec)))))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0specs)))=
+ =C2=A0
+ =C2=A0(define rewrite
+ =C2=A0 =C2=A0(package-input-re= writing/spec
+ =C2=A0 =C2=A0 (map (match-lambda
+ =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0((spec . flags)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 (cons spec (cut package-with-configure-flag <> flags)))= )
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cflags)))
+
+ =C2=A0(lambda = (obj)
+ =C2=A0 =C2=A0(if (and
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 (package?= obj)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 (build-system-supports-flags? obj))<= br>+ =C2=A0 =C2=A0 =C2=A0 =C2=A0(rewrite obj)
+ =C2=A0 =C2=A0 =C2=A0 =C2= =A0obj)))
+
=C2=A0(define (patched-source name source patches)
=C2= =A0 =C2=A0"Return a file-like object with the given NAME that applies = PATCHES to
=C2=A0SOURCE.=C2=A0 SOURCE must itself be a file-like object = of any type, including
@@ -845,6 +909,7 @@ (define %transformations
= =C2=A0 =C2=A0 =C2=A0(tune . ,transform-package-tuning)
=C2=A0 =C2=A0 =C2= =A0(with-debug-info . ,transform-package-with-debug-info)
=C2=A0 =C2=A0 = =C2=A0(without-tests . ,transform-package-tests)
+ =C2=A0 =C2=A0(with-co= nfigure-flag . ,transform-package-configure-flag)
=C2=A0 =C2=A0 =C2=A0(w= ith-patch =C2=A0. ,transform-package-patches)
=C2=A0 =C2=A0 =C2=A0(with-= latest . ,transform-package-latest)
=C2=A0 =C2=A0 =C2=A0(with-version . = ,transform-package-version)))
@@ -915,6 +980,8 @@ (define micro-architec= ture
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0(parser 'with-debug-info))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0(option '("without-tests") #t #f
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(parser 'without-tests)= )
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(option '("with-configure= -flag") #t #f
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0(parser 'with-configure-flag))
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(option '("with-patch") #t #f
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(parser 'wit= h-patch))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(option '("w= ith-latest") #t #f
@@ -952,6 +1019,9 @@ (define (show-transformatio= n-options-help/detailed)
=C2=A0 =C2=A0(display (G_ "
=C2=A0 =C2= =A0 =C2=A0 =C2=A0--with-patch=3DPACKAGE=3DFILE
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 add FILE= to the list of patches of PACKAGE"))
+ =C2=A0(display (G_ "+ =C2=A0 =C2=A0 =C2=A0--with-configure-flag=3DPACKAGE=3DFLAG
+ =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 add FLAG to the list of #:configure-flags of PACKAGE"))
=C2=A0 = =C2=A0(display (G_ "
=C2=A0 =C2=A0 =C2=A0 =C2=A0--with-latest=3DPAC= KAGE
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 use the latest upstream release of PACKAGE"))=
--
2.40.0


--00000000000029ea0b05f823700a-- From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 30 15:57:03 2023 Received: (at 62551) by debbugs.gnu.org; 30 Mar 2023 19:57:03 +0000 Received: from localhost ([127.0.0.1]:59476 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1phyON-0003Yd-7h for submit@debbugs.gnu.org; Thu, 30 Mar 2023 15:57:03 -0400 Received: from mail-qt1-f182.google.com ([209.85.160.182]:36703) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1phyOK-0003Y5-No for 62551@debbugs.gnu.org; Thu, 30 Mar 2023 15:57:01 -0400 Received: by mail-qt1-f182.google.com with SMTP id hf2so19666046qtb.3 for <62551@debbugs.gnu.org>; Thu, 30 Mar 2023 12:57:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680206215; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=DWIuX/3AB9if/x3TrjURV8zTwa8m+w1T63ibpt6o0lA=; b=qc+V+6CnVgSRNqf7rHWGMlT1X2v63FuUyP7abD0gjSTY0nX0F8R7axRVtjnBoTtW+2 3SaNh6x3eMgpqqBFyqWVTXdo8sTyx38yymjdb0yg57k+i8MyXvcc0x2BNOg+R7ALffno BOJmUvkX4kITZ1p91Wk/YcIooMXzKCtoOc0/rjGCXjufH9Wf+8ffsvYGwdzxZMON0c55 mGQ5a7OhhicSn+/h1yYaAFg6SCSNU7HhUy1WRC8BTJtEzCyFHcVPti+C3ptmdDPu187e Onyy9OArNR+uUe+K3v4joUh7RW8BPogGcs/SVW5I4c48DnFFAmMdjlMo6Pz5EDByaIjt 7vbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680206215; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=DWIuX/3AB9if/x3TrjURV8zTwa8m+w1T63ibpt6o0lA=; b=e88bmbSLALgALXlfR8OtP4254/Ma3mXXDz2cPM3LkEsKoUQjsUnfTjKig+34YDPQcT ovEOdn+56wr5OLzRruAbzzjiOSZsaUfjizBvcCf4ZfY0rjZcJ183qcq0sVE7fGMjBqUW umI59PMYJqfJydG1pZYDefuE0mkvkyPUqvwXqpGdb8VbsfzXdo2qXgBcag+96kyL4Njh vcZudB7+Vn1r/Fvh9maIyO7AlpTumyxbCnEMLMomlIRchKg2jbdkkHAbYPddLEnrUkIa +nYmKWhL+WOY661ld3Ez+5+yZrkGeEmxpMzE1UNQp5vnQBnGX22iZH4TpkI24KL+lswf 1iTg== X-Gm-Message-State: AO0yUKUpeMgRHBmkGi9lMIni9gkRK1LrPPC8wnwpqxlI132hot5JSi5D PFlRlzP++WNUWgvCNAteUdWFjcUz0NE90n/AdrFdUmxUBYMv+g== X-Google-Smtp-Source: AK7set/xUrbxt3X9wdiU2bUqQxOZ3yOWkHErig7agg7f2Y1fOm14TJFRN5+mIooZQYcJdsCJn5/AljPn0kHBTOHiCRA= X-Received: by 2002:a05:622a:1823:b0:3d8:c6c1:2925 with SMTP id t35-20020a05622a182300b003d8c6c12925mr8766768qtc.10.1680206214885; Thu, 30 Mar 2023 12:56:54 -0700 (PDT) MIME-Version: 1.0 From: Sarthak Shah Date: Fri, 31 Mar 2023 01:26:43 +0530 Message-ID: Subject: (updated with changelog formatting) To: 62551@debbugs.gnu.org Content-Type: multipart/alternative; boundary="00000000000096764e05f8237e96" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 62551 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --00000000000096764e05f8237e96 Content-Type: text/plain; charset="UTF-8" * guix/transformations.scm (transform-package-configure-flag): New function, changes to %transformations and show-transformation-options-help/detailed --- guix/transformations.scm | 70 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/guix/transformations.scm b/guix/transformations.scm index 8ff472ad21..8f260807dc 100644 --- a/guix/transformations.scm +++ b/guix/transformations.scm @@ -676,6 +676,70 @@ (define rewrite (rewrite obj) obj))) +(define (transform-package-configure-flag specs) + "Return a procedure that, when passed a package and a flag, adds the flag to #:configure-flags in the package's +'arguments' field." + (define (package-with-configure-flag p extra-flag) + (package/inherit p + (arguments + (substitute-keyword-arguments (package-arguments p) + ((#:configure-flags list-of-flags (quote '())) + ;; here extra-flag takes the form (--extra-flag) + ;; hence it must be spliced to avoid eval errors + `(cons* ,@extra-flag ,list-of-flags)))))) + + (define (coalesce-alist alist) + ;; Coalesce multiple occurrences of the same key in ALIST. + (let loop ((alist alist) + (keys '()) + (mapping vlist-null)) + (match alist + (() + (map (lambda (key) + (cons key (vhash-fold* cons '() key mapping))) + (delete-duplicates (reverse keys)))) + (((key . value) . rest) + (loop rest + (cons key keys) + (vhash-cons key value mapping)))))) + + (define %BUILD-SYSTEMS-WITHOUT-CONFIGURE-FLAGS + ;; These build systems do not have a #:configure-flags parameter +'(android-ndk asdf/sbcl asdf/ecl asdf/source cargo channel chicken clojure copy dub dune elm emacs go guile julia linux-module maven minetest-mod minify node perl rakudo rebar ruby scons texlive tree-sitter trivial)) + + (define (build-system-supports-flags? spec) + ;; XXX: a more sophisticated approach could be added that checks the given build system for a configure-flags option + ;; if a new build system is added, it needs to be added to the %BUILD-SYSTEMS-WITHOUT-CONFIGURE-FLAGS list manually + (not (member (build-system-name (package-build-system spec)) + %BUILD-SYSTEMS-WITHOUT-CONFIGURE-FLAGS))) + + (define cflags + ;; Spec/flag alist. + (coalesce-alist + (map (lambda (spec) + (match (string-tokenize spec %not-equal) + ((spec flag) + (cons spec flag)) + (_ + (raise (formatted-message + (G_ "~a: invalid package configure-flags specification") + spec))))) + specs))) + + (define rewrite + (package-input-rewriting/spec + (map (match-lambda + ((spec . flags) + (cons spec (cut package-with-configure-flag <> flags)))) + cflags))) + + (lambda (obj) + (if (and + (package? obj) + (build-system-supports-flags? obj)) + (rewrite obj) + obj))) + (define (patched-source name source patches) "Return a file-like object with the given NAME that applies PATCHES to SOURCE. SOURCE must itself be a file-like object of any type, including @@ -845,6 +909,7 @@ (define %transformations (tune . ,transform-package-tuning) (with-debug-info . ,transform-package-with-debug-info) (without-tests . ,transform-package-tests) + (with-configure-flag . ,transform-package-configure-flag) (with-patch . ,transform-package-patches) (with-latest . ,transform-package-latest) (with-version . ,transform-package-version))) @@ -915,6 +980,8 @@ (define micro-architecture (parser 'with-debug-info)) (option '("without-tests") #t #f (parser 'without-tests)) + (option '("with-configure-flag") #t #f + (parser 'with-configure-flag)) (option '("with-patch") #t #f (parser 'with-patch)) (option '("with-latest") #t #f @@ -952,6 +1019,9 @@ (define (show-transformation-options-help/detailed) (display (G_ " --with-patch=PACKAGE=FILE add FILE to the list of patches of PACKAGE")) + (display (G_ " + --with-configure-flag=PACKAGE=FLAG + add FLAG to the list of #:configure-flags of PACKAGE")) (display (G_ " --with-latest=PACKAGE use the latest upstream release of PACKAGE")) -- 2.40.0 --00000000000096764e05f8237e96 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

* guix/transformations.scm (transform-packa= ge-configure-flag): New function, changes to %transformations and show-tran= sformation-options-help/detailed
---
=C2=A0guix/transformations.= scm | 70 ++++++++++++++++++++++++++++++++++++++++
=C2=A01 file changed, = 70 insertions(+)

diff --git a/guix/transformations.scm b/guix/transf= ormations.scm
index 8ff472ad21..8f260807dc 100644
--- a/guix/transfor= mations.scm
+++ b/guix/transformations.scm
@@ -676,6 +676,70 @@ (defi= ne rewrite
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(rewrite obj)
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0obj)))
=C2=A0
+(define (transform-package-con= figure-flag specs)
+ =C2=A0"Return a procedure that, when passed a = package and a flag, adds the flag to #:configure-flags in the package's=
+'arguments' field."
+ =C2=A0(define (package-with-conf= igure-flag p extra-flag)
+ =C2=A0 =C2=A0(package/inherit p
+ =C2=A0 = =C2=A0 =C2=A0(arguments
+ =C2=A0 =C2=A0 =C2=A0 (substitute-keyword-argum= ents (package-arguments p)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 ((#:configure-f= lags list-of-flags (quote '()))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= ;; here extra-flag takes the form (--extra-flag)
+ =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0;; hence it must be spliced to avoid eval errors
+ =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0`(cons* ,@extra-flag ,list-of-flags))))))
++ =C2=A0(define (coalesce-alist alist)
+ =C2=A0 =C2=A0;; Coalesce mult= iple occurrences of the same key in ALIST.
+ =C2=A0 =C2=A0(let loop ((al= ist alist)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (keys '= ;())
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (mapping vlist-n= ull))
+ =C2=A0 =C2=A0 =C2=A0(match alist
+ =C2=A0 =C2=A0 =C2=A0 =C2= =A0(()
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 (map (lambda (key)
+ =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(cons key (vhash-fold* cons &#= 39;() key mapping)))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(= delete-duplicates (reverse keys))))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0(((key = . value) . rest)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 (loop rest
+ =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (cons key keys)
+ =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (vhash-cons key value mapping))))))<= br>+
+ =C2=A0(define %BUILD-SYSTEMS-WITHOUT-CONFIGURE-FLAGS =C2=A0
+= =C2=A0 =C2=A0;; These build systems do not have a #:configure-flags parame= ter
+'(android-ndk asdf/sbcl asdf/ecl asdf/source cargo channel chic= ken clojure copy dub dune elm emacs go guile julia linux-module maven minet= est-mod minify node perl rakudo rebar ruby scons texlive tree-sitter trivia= l))
+ =C2=A0
+ =C2=A0(define (build-system-supports-flags? spec)
+= =C2=A0 =C2=A0;; XXX: a more sophisticated approach could be added that che= cks the given build system for a configure-flags option
+ =C2=A0 =C2=A0;= ; if a new build system is added, it needs to be added to the %BUILD-SYSTEM= S-WITHOUT-CONFIGURE-FLAGS list manually
+ =C2=A0 =C2=A0(not (member (bui= ld-system-name (package-build-system spec))
+ =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 %BUILD-SYSTEMS-WITHOUT-CONFIGURE-FLAGS)))+ =C2=A0
+ =C2=A0(define cflags
+ =C2=A0 =C2=A0;; Spec/flag alist.<= br>+ =C2=A0 =C2=A0(coalesce-alist
+ =C2=A0 =C2=A0 (map (lambda (spec)+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(match (string-tokenize spec %n= ot-equal)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0((spec flag)=
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (cons spec flag))+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(_
+ =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (raise (formatted-message
+ =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (G_ &= quot;~a: invalid package configure-flags specification")
+ =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 spec)= ))))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0specs)))
+ =C2=A0
+ =C2= =A0(define rewrite
+ =C2=A0 =C2=A0(package-input-rewriting/spec
+ =C2= =A0 =C2=A0 (map (match-lambda
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0((spec . flags)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (cons spe= c (cut package-with-configure-flag <> flags))))
+ =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0cflags)))
+
+ =C2=A0(lambda (obj)
+ =C2=A0 =C2= =A0(if (and
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 (package? obj)
+ =C2=A0 =C2= =A0 =C2=A0 =C2=A0 (build-system-supports-flags? obj))
+ =C2=A0 =C2=A0 = =C2=A0 =C2=A0(rewrite obj)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0obj)))
+
= =C2=A0(define (patched-source name source patches)
=C2=A0 =C2=A0"Re= turn a file-like object with the given NAME that applies PATCHES to
=C2= =A0SOURCE.=C2=A0 SOURCE must itself be a file-like object of any type, incl= uding
@@ -845,6 +909,7 @@ (define %transformations
=C2=A0 =C2=A0 =C2= =A0(tune . ,transform-package-tuning)
=C2=A0 =C2=A0 =C2=A0(with-debug-in= fo . ,transform-package-with-debug-info)
=C2=A0 =C2=A0 =C2=A0(without-te= sts . ,transform-package-tests)
+ =C2=A0 =C2=A0(with-configure-flag . ,t= ransform-package-configure-flag)
=C2=A0 =C2=A0 =C2=A0(with-patch =C2=A0.= ,transform-package-patches)
=C2=A0 =C2=A0 =C2=A0(with-latest . ,transfo= rm-package-latest)
=C2=A0 =C2=A0 =C2=A0(with-version . ,transform-packag= e-version)))
@@ -915,6 +980,8 @@ (define micro-architecture
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(parser '= with-debug-info))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(option '= ("without-tests") #t #f
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(parser 'without-tests))
+ =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(option '("with-configure-flag") #t #= f
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(parse= r 'with-configure-flag))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(o= ption '("with-patch") #t #f
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(parser 'with-patch))
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(option '("with-latest"= ) #t #f
@@ -952,6 +1019,9 @@ (define (show-transformation-options-help/d= etailed)
=C2=A0 =C2=A0(display (G_ "
=C2=A0 =C2=A0 =C2=A0 =C2=A0= --with-patch=3DPACKAGE=3DFILE
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 add FILE to the list of pa= tches of PACKAGE"))
+ =C2=A0(display (G_ "
+ =C2=A0 =C2=A0 = =C2=A0--with-configure-flag=3DPACKAGE=3DFLAG
+ =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 add FLAG to the= list of #:configure-flags of PACKAGE"))
=C2=A0 =C2=A0(display (G_ = "
=C2=A0 =C2=A0 =C2=A0 =C2=A0--with-latest=3DPACKAGE
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 use the latest upstream release of PACKAGE"))
--
2.40.0<= br>

--00000000000096764e05f8237e96-- From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 30 19:00:16 2023 Received: (at control) by debbugs.gnu.org; 30 Mar 2023 23:00:16 +0000 Received: from localhost ([127.0.0.1]:59814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pi1Fg-0005Sr-1G for submit@debbugs.gnu.org; Thu, 30 Mar 2023 19:00:16 -0400 Received: from smtpm1.myservices.hosting ([185.26.105.232]:37158) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pi1Ff-0005Sk-1j for control@debbugs.gnu.org; Thu, 30 Mar 2023 19:00:15 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm1.myservices.hosting (Postfix) with ESMTP id 1B898207FC for ; Fri, 31 Mar 2023 01:00:13 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id A3D0B8009A for ; Fri, 31 Mar 2023 01:00:10 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id quAab374MQkf for ; Fri, 31 Mar 2023 01:00:10 +0200 (CEST) Received: from [192.168.1.239] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 53A0380098 for ; Fri, 31 Mar 2023 01:00:10 +0200 (CEST) Message-ID: <74912071-f536-c8bc-4711-db295b4da0e6@makinata.eu> Date: Fri, 31 Mar 2023 00:00:01 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Content-Language: en-US To: control From: Bruno Victal Subject: control-msg Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) # done with 5c131aff691fa1cb0fafe71b5f2795902ae056a7 close 55819 # control fail? close 45449 # no longer relevant close 33078 # tags tags 62551 patch tags 62503 patch tags 62461 patch tags 62443 patch tags 62428 patch tags 61226 patch tags 59893 patch tags 59852 patch tags 49451 patch tags 49207 patch tags 44258 patch quit From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 31 08:34:42 2023 Received: (at 62551) by debbugs.gnu.org; 31 Mar 2023 12:34:43 +0000 Received: from localhost ([127.0.0.1]:60642 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1piDxq-0007zL-Hm for submit@debbugs.gnu.org; Fri, 31 Mar 2023 08:34:42 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36400) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1piDxo-0007z7-Dz for 62551@debbugs.gnu.org; Fri, 31 Mar 2023 08:34:41 -0400 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 1piDxg-000253-PB; Fri, 31 Mar 2023 08:34:35 -0400 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=RHwQzRVAFqIoodcc4iGrQw8WU6GdxktqIMX9mLso3BA=; b=gSgn0ZJAN0bz3iHsx29u ux4sBG/mtc2c9w3waDVDf9ByESN5yLFtz7zFk2l2GFwZzYHuhrtWEMSBlU3AurY3ppVP4SCdIE8Ss vtcM37GWehVmkeveJuHFKrAUVDtwGkuZ6Ou4AEz1wMlXXXydzDbqkm4AXmYQSGJ6o0W0U6p+jOtA5 O2ep+UMnllP+mp/ubSnvi8c1fyaivKv/Nzu2/JGAKRzBAbnp6cVZ4qLmUzXR/hGu7NguC6A2zdO+o Ay80qCe88XkEcB7Rr5zgFxDvlF6PkDJNCsDcwDs4GF4KNgH1TihqHWF3/nLUZnQiKwfkKyjLZaDw5 mhX7AfrQ6pGqLg==; Received: from [193.50.110.123] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1piDxg-0001Ie-3g; Fri, 31 Mar 2023 08:34:32 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Sarthak Shah Subject: Re: bug#62551: Added new transformation option: --with-configure-flag References: Date: Fri, 31 Mar 2023 14:34:30 +0200 In-Reply-To: (Sarthak Shah's message of "Fri, 31 Mar 2023 01:22:41 +0530") Message-ID: <87355l5cbt.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-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 62551 Cc: 62551@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello! Sarthak Shah skribis: > This patch adds a new transformation option that lets the user specify a > package to add an extra #:configure-flags value to. Functionally, it is > quite similar to the --with-patch transform. > Currently, I've generated a list of build systems that do not support > #:configure-flags that this transform checks against, but this could be > improved by making the transform check if any given transform has the > #:configure-flags keyword in its arguments. > Please test this patch if possible; my preliminary testing indicates that > it is working, however it could fail for edge cases I have not considered. > CCing Ludovic as he might be interested in this. Nice, that=E2=80=99s a great start! > + (define (package-with-configure-flag p extra-flag) > + (package/inherit p > + (arguments > + (substitute-keyword-arguments (package-arguments p) > + ((#:configure-flags list-of-flags (quote '())) > + ;; here extra-flag takes the form (--extra-flag) > + ;; hence it must be spliced to avoid eval errors > + `(cons* ,@extra-flag ,list-of-flags)))))) =E2=80=9CNowadays=E2=80=9D we=E2=80=99d use gexps, like so: #~(cons* #$extra-flags #$list-of-flags) > + (define (coalesce-alist alist) > + ;; Coalesce multiple occurrences of the same key in ALIST. This seems to be pasted from somewhere else; we might want to factorize it (not your fault of course, but something to keep in mind.) > + (define %BUILD-SYSTEMS-WITHOUT-CONFIGURE-FLAGS > + ;; These build systems do not have a #:configure-flags parameter > +'(android-ndk asdf/sbcl asdf/ecl asdf/source cargo channel chicken cloju= re In general, the =E2=80=98name=E2=80=99 field of build systems is purely inf= ormational and I would suggest not relying on it. Actually, I would probably not perform any check at all. After all, the =E2=80=9Ccontract=E2=80=9D we have with users of transformation options is = that it=E2=80=99s =E2=80=9Cat their own risk=E2=80=9D: these options build a new package that may or may = not =E2=80=9Cwork=E2=80=9D, broadly speaking. Then we could think of a more sophisticated approach where build systems would have a field listing supported flags or something along these lines. But again, I would not bother about it for now. The rest looks great! Have you been able to test it on actual packages? (I haven=E2=80=99t taken = the time yet.) What we=E2=80=99d like to have, in addition to this, is two things: 1. Unit tests in =E2=80=98tests/transformations.scm=E2=80=99, similar to = those of other transformations. Check out on how to run the test suite. 2. A few lines in =E2=80=98doc/guix.texi=E2=80=99 describing the new opti= on, under =E2=80=9CPackage Transformation Options=E2=80=9D. Could you give it a try? Anyways, kudos for this first step! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 31 20:17:21 2023 Received: (at 62551) by debbugs.gnu.org; 1 Apr 2023 00:17:21 +0000 Received: from localhost ([127.0.0.1]:34866 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1piOvp-000654-43 for submit@debbugs.gnu.org; Fri, 31 Mar 2023 20:17:21 -0400 Received: from mail-qk1-f175.google.com ([209.85.222.175]:33560) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1piOvn-00064i-IQ for 62551@debbugs.gnu.org; Fri, 31 Mar 2023 20:17:20 -0400 Received: by mail-qk1-f175.google.com with SMTP id bs13so7458228qkb.0 for <62551@debbugs.gnu.org>; Fri, 31 Mar 2023 17:17:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680308234; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=x0KeU+6dEGauqEn05/OOsgon1Jz+nsrZMZIwt6Zranw=; b=YaPaTJYKwO2Q+RNFkuf8w7K9pnjmG2UU0NrpD1dCqADiZ0xoLBlB031TKYsnCKXviS yOXPv9UTOiK6YwlgnIHojpDb+1jlqE9A72UdXkFoSS3BHVxab4cwoX2M4UKg9hrRLxMc FO3hZUykKpHyqFMp+4XjAwgiIRLLtm8VrLvthk0gH8NQZ5cHelKMlfnXmGAPFJXn2XCi WNB0yG3omgqLi8ZffGvvQ+Kts/i69R83lp4zkCyEfWemlPf2y0Oxg7E9PuTVwWxQaf4P XMAS9d9tbDkE1GkqNOHKiOtgldLp+blN0cOCBAPIaxiRFeE2iuhLTCWomAQKDAQw3l4x O0KA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680308234; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=x0KeU+6dEGauqEn05/OOsgon1Jz+nsrZMZIwt6Zranw=; b=UeduXv4F9wMn/ZLVB6UZ0PYeUbohogSWrzXMw2GeC3t/kdtgpI7W1jLwue2sY6hpx6 T6BVmQbi/jundLsA14pkJ47ra3XqGHBqR13Whw6ApLPliu7Gs3QcrWUv06BlxbHNmrwB vKU7yDzCSnvoJbHqFrE7RABfKf0ZfNeyLzgZoTkPV8EZnLI5DFLkYgbe3gZZd1Ovb3ow 4Xn2uxxvP8CB07er5hQzETQiQKfEBtrPbuSDeerQxri6XNEw5rLfSeR1jboxJ5KzU5yt 2N8IAjYqmon6tWxCFWax2ZYUjzcuUZ0Q8E+EzLeLym5X2aNl9E892EkN7eqWAxnlAlSm cZcA== X-Gm-Message-State: AO0yUKV3sk/yMuGAckb/BszubaMZhCZQTKAGynj5Yin/MLS8n3stg9tG jYIJ+FL5Xrx5r3kyWwrJLMWow+FTTnfKfVmv60mT/LalbW0H3g== X-Google-Smtp-Source: AK7set9xi1c7nypzQLh51r4aaBnM1ZgbzthVIT+DrDvlS764pwAUbzpQTBNL808IRww6ZtdbuUBLvrL5OTz+hiKcwiQ= X-Received: by 2002:a05:620a:44d5:b0:746:b32:a43d with SMTP id y21-20020a05620a44d500b007460b32a43dmr6644257qkp.11.1680308233693; Fri, 31 Mar 2023 17:17:13 -0700 (PDT) MIME-Version: 1.0 References: <87355l5cbt.fsf@gnu.org> In-Reply-To: <87355l5cbt.fsf@gnu.org> From: Sarthak Shah Date: Sat, 1 Apr 2023 05:47:00 +0530 Message-ID: Subject: Re: bug#62551: Added new transformation option: --with-configure-flag To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Content-Type: multipart/alternative; boundary="00000000000061ef5f05f83b3f29" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 62551 Cc: 62551@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --00000000000061ef5f05f83b3f29 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hey Ludovic, Thanks for the comments! > =E2=80=9CNowadays=E2=80=9D we=E2=80=99d use gexps, like so: > #~(cons* #$extra-flags #$list-of-flags) Noted, I will follow this in the updated patch. > This seems to be pasted from somewhere else; we might want to factorize it (not your fault of course, but something to keep in mind.) It was indeed copied over from the with-patches segment, as I thought it would be useful to check if a configure-flag is being passed again. I think it is not particularly necessary as we assume that the user knows what they are doing when they are using transforms, so I will omit it in the updated patch. > In general, the =E2=80=98name=E2=80=99 field of build systems is purely i= nformational and I would suggest not relying on it. Yes, and I've factored that in in the current patch- I have obtained the actual 'name' parameters of each of the given build systems through grepping. However, I agree with you in thinking that it might not be necessary at all- I wrote this as a 'stopgap' of sorts anyways. I would like to update it with a sophisticated checking mechanism at a later date that actually checks if the build system supports configure-flags if necessary. > Have you been able to test it on actual packages? (I haven=E2=80=99t take= n the time yet.) This is the part where I've been having the most trouble actually; I haven't been able to find suitable methods for testing this, so for now I've used two methods for testing if it works: 1) printing the arguments of the rewritten package record with display 2) comparing the hashes of patches built with and without configure-flags Both tests seem to agree that it is working, however I would really appreciate more rigorous testing by someone else or suggestions on how to test it more rigorously. For one, I have been unable to actually check if a feature is getting added/removed by adding configure-flags because I haven't been able to find a suitable package to test it with. If possible, that would be a very clear indication of it working. > What we=E2=80=99d like to have, in addition to this, is two things: > ... > Could you give it a try? Sure, I will include these changes with the updated patch. I will try to submit it in about a week, as I would like to test it more rigorously first. Happy hacking! Sarthak (cel7t) --00000000000061ef5f05f83b3f29 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
<= div>
Hey Ludovic,
Thanks for the comments!

> =E2=80=9CNowa= days=E2=80=9D we=E2=80=99d use gexps, like so:
>=C2=A0 #~(cons* #$ext= ra-flags #$list-of-flags)
Noted, I will follow this in the updated= patch.

> This seems to be pasted from somewhere else; we might w= ant to factorize it (not your fault of course, but something to keep in min= d.)
It was indeed copied over from the with-patches segment, as I = thought it would be useful to check if a configure-flag is being passed aga= in. I think it is not particularly necessary as we assume that the user kno= ws what they are doing when they are using transforms, so I will omit it in= the updated patch.

> In general, the =E2=80=98name=E2=80=99 fiel= d of build systems is purely informational and I would suggest not relying = on it.
Yes, and I've factored that in in the current patch- I = have obtained the actual 'name' parameters of each of the given bui= ld systems through grepping. However, I agree with you in thinking that it = might not be necessary at all- I wrote this as a 'stopgap' of sorts= anyways. I would like to update it with a sophisticated checking mechanism= at a later date that actually checks if the build system supports configur= e-flags if necessary.

> Have you been able to test it on ac= tual packages? (I haven=E2=80=99t taken the
time yet.)
This is the part where I've been having the most tr= ouble actually; I haven't been able to find suitable methods for testin= g this, so for now I've used two methods for testing if it works:
1) printing the arguments of the rewritten package record with display<= br>
2) comparing the hashes of patches built with and without configur= e-flags
Both tests seem to agree that it is working, however I wou= ld really appreciate more rigorous testing by someone else or suggestions o= n how to test it more rigorously.
For one, I have been unable= to actually check if a feature is getting added/removed by adding configur= e-flags because I haven't been able to find a suitable package to test = it with.
If possible, that would be a very clear indication of it worki= ng.

> What we=E2=80=99d like to have, in addition to t= his, is two things:
> ...
> Could you give it a try?
Sure, I will include the= se changes with the updated patch.

I will try to submit it in = about a week, as I would like to test it more rigorously first.

=
Happy hacking!
Sarthak (cel7t)
--00000000000061ef5f05f83b3f29-- From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 25 08:23:00 2023 Received: (at 62551) by debbugs.gnu.org; 25 Apr 2023 12:23:00 +0000 Received: from localhost ([127.0.0.1]:51579 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prHhD-0005GK-Vs for submit@debbugs.gnu.org; Tue, 25 Apr 2023 08:23:00 -0400 Received: from mail-qk1-f171.google.com ([209.85.222.171]:54577) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prHhC-0005G6-1S for 62551@debbugs.gnu.org; Tue, 25 Apr 2023 08:22:58 -0400 Received: by mail-qk1-f171.google.com with SMTP id af79cd13be357-74e17099772so498456385a.1 for <62551@debbugs.gnu.org>; Tue, 25 Apr 2023 05:22:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682425372; x=1685017372; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=ERKT9++bwnUku9gwYRrOCP66Cw+0yj3S4LlwaHw5SeA=; b=pG2Usxo/DwX3RoAVUHAfuo6jpzpJiNwFFQQ6cwIFn7piGGt+Eokf7QdL6PQal/Pm6F r814X0iNkNjl5EUcMkblXM8vH4wjErfLeJsgi2XTpVmik0kTXZQ8l48g4fye6mXcTfHm QocnHPyRVRdSk0de1Hz+1vUcAWmz44KCRnTBs9GYruucloJhvJ8aIbRhSYfR0kvoHznc 92Y2v69ps3viTJStMdUdDjvnGntCHl8g2Il33W2+6b2WDQRjNT9gFt5Noxb3zeCm62ud vU+zkI/wlXTNaByFsMsDDCPxnBggQPG36iYkwYBZKbSZ/dk7poTIQIWOgW8jPAqGZTHe h6jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682425372; x=1685017372; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ERKT9++bwnUku9gwYRrOCP66Cw+0yj3S4LlwaHw5SeA=; b=WCcwoiWr/BvXZwJx+Zck6Fj1IJXXEqK2ErPMh55HYYC1OWLUOriID1m5h02oWOilOX E3tGKgiLsVs1tcAU+HTkUaoTCbk/eII5Gk4Qi3Uj0DdExf9YHdS3GlxPxEIRyNsaH0md HSDLmEhiRgKEd5p5/Hg6CG6JR7yEUQcfs2YYUIjY8PAOQqN9kB5xXeYEMc+rUMoklZXt l3XucLk/TH8NJqXO2KDksBMNn1qhCcGUQLqEsfFv2k01ZXvs7i5xnGRlwl1Sto6iAya+ rvaXKL6rjMo6xlF4FCaWxPuOww2nrws5qGQABBMbw0AO1WLdJcF9fR/NEsxmqMmIuqY6 u07g== X-Gm-Message-State: AAQBX9fbV0df7kbyBT34gFraN29I20C2UD08JesVrDvhzYXjYnmaQrJi j8D15v+9znAop+zCD+cJkxbcaNpLxHLGA8okzn6bHcc14mW+lA== X-Google-Smtp-Source: AKy350Y5aAQfijjGczpcs3JjVmgCZg7vhJD+qF5t510owXR7EjC7gHhJs2PbMTQmZNYsq+AkRNp9r85XYchW3GE4d60= X-Received: by 2002:a05:6214:21a1:b0:5e9:5602:3af0 with SMTP id t1-20020a05621421a100b005e956023af0mr27505856qvc.46.1682425372073; Tue, 25 Apr 2023 05:22:52 -0700 (PDT) MIME-Version: 1.0 From: Sarthak Shah Date: Tue, 25 Apr 2023 17:52:10 +0530 Message-ID: Subject: Updated patch - with changes, documentation and tests. To: 62551@debbugs.gnu.org Content-Type: multipart/alternative; boundary="000000000000a9f73d05fa282e1a" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 62551 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000a9f73d05fa282e1a Content-Type: text/plain; charset="UTF-8" * doc/guix.texi (--with-configure-flag): Added documentation for --with-configure-flag * guix/transformations.scm (transform-package-configure-flag): New function, changes to %transformations and show-transformation-options-help/detailed * tests/transformations.scm (test-equal "options-transformation, with-configure-flag"): Added a test for --with-configure-flag --- doc/guix.texi | 19 ++++++++++++++ guix/transformations.scm | 53 +++++++++++++++++++++++++++++++++++++++ tests/transformations.scm | 10 +++++++- 3 files changed, 81 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index c49e51b72e..627a468b62 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -12859,6 +12859,25 @@ guix build coreutils --with-patch=glibc=./glibc-frob.patch In this example, glibc itself as well as everything that leads to Coreutils in the dependency graph is rebuilt. +@item --with-configure-flag=@var{package}=@var{configure-flag} +Add @var{configure-flag} to the list of configure-flags applied to +the arguments of @var{package}, where @var{package} is a spec such as +@code{guile@@3.1} or @code{glibc}. The build system of @var{package} +must support the argument @code{#:configure-flags}. + +For example, the command below builds GNU Hello with the +configure-flag @code{--disable-nls}: + +@example +guix build hello --with-configure-flag=hello=--disable-nls +@end example + +@quotation Warning +Currently, there is a primitive check for whether the build system +supports the argument @code{#:configure-flags} or not, however +users should not rely on it. +@end quotation + @cindex upstream, latest version @item --with-latest=@var{package} @itemx --with-version=@var{package}=@var{version} diff --git a/guix/transformations.scm b/guix/transformations.scm index 8ff472ad21..27fb0cb646 100644 --- a/guix/transformations.scm +++ b/guix/transformations.scm @@ -676,6 +676,53 @@ (define rewrite (rewrite obj) obj))) +(define (transform-package-configure-flag specs) + "Return a procedure that, when passed a package and a flag, adds the flag to #:configure-flags in the package's +'arguments' field." + (define (package-with-configure-flag p extra-flag) + (package/inherit p + (arguments + (substitute-keyword-arguments (package-arguments p) + ((#:configure-flags list-of-flags (quote '())) + #~(cons* #$extra-flag #$list-of-flags)))))) + + + (define %BUILD-SYSTEMS-WITHOUT-CONFIGURE-FLAGS + ;; These build systems do not have a #:configure-flags parameter +'(android-ndk asdf/sbcl asdf/ecl asdf/source cargo channel chicken clojure copy dub dune elm emacs go guile julia linux-module maven minetest-mod minify node perl rakudo rebar ruby scons texlive tree-sitter trivial)) + + (define (build-system-supports-flags? spec) + ;; XXX: a more sophisticated approach could be added that checks the given build system for a configure-flags option + ;; if a new build system is added, it needs to be added to the %BUILD-SYSTEMS-WITHOUT-CONFIGURE-FLAGS list manually + (not (member (build-system-name (package-build-system spec)) + %BUILD-SYSTEMS-WITHOUT-CONFIGURE-FLAGS))) + + (define cflags + ;; Spec/flag alist. + (map (lambda (spec) + (match (string-tokenize spec %not-equal) + ((spec flag) + (cons spec flag)) + (_ + (raise (formatted-message + (G_ "~a: invalid package configure-flags specification") + spec))))) + specs)) + + (define rewrite + (package-input-rewriting/spec + (map (match-lambda + ((spec . flags) + (cons spec (cut package-with-configure-flag <> flags)))) + cflags))) + + (lambda (obj) + (if (and + (package? obj) + (build-system-supports-flags? obj)) + (rewrite obj) + obj))) + (define (patched-source name source patches) "Return a file-like object with the given NAME that applies PATCHES to SOURCE. SOURCE must itself be a file-like object of any type, including @@ -845,6 +892,7 @@ (define %transformations (tune . ,transform-package-tuning) (with-debug-info . ,transform-package-with-debug-info) (without-tests . ,transform-package-tests) + (with-configure-flag . ,transform-package-configure-flag) (with-patch . ,transform-package-patches) (with-latest . ,transform-package-latest) (with-version . ,transform-package-version))) @@ -915,6 +963,8 @@ (define micro-architecture (parser 'with-debug-info)) (option '("without-tests") #t #f (parser 'without-tests)) + (option '("with-configure-flag") #t #f + (parser 'with-configure-flag)) (option '("with-patch") #t #f (parser 'with-patch)) (option '("with-latest") #t #f @@ -952,6 +1002,9 @@ (define (show-transformation-options-help/detailed) (display (G_ " --with-patch=PACKAGE=FILE add FILE to the list of patches of PACKAGE")) + (display (G_ " + --with-configure-flag=PACKAGE=FLAG + add FLAG to the list of #:configure-flags of PACKAGE")) (display (G_ " --with-latest=PACKAGE use the latest upstream release of PACKAGE")) diff --git a/tests/transformations.scm b/tests/transformations.scm index 1fa2c0bba8..31fd042d31 100644 --- a/tests/transformations.scm +++ b/tests/transformations.scm @@ -33,7 +33,7 @@ (define-module (test-transformations) #:use-module ((guix gexp) #:select (local-file? local-file-file computed-file? computed-file-gexp - gexp-input-thing)) + gexp-input-thing gexp->approximate-sexp)) #:use-module (guix ui) #:use-module (guix utils) #:use-module (guix git) @@ -408,6 +408,14 @@ (define (package-name* obj) (package-full-name grep)) (package-arguments (package-replacement dep0)))))))) +(test-equal "options->transformation, with-configure-flag" + '(cons* "--flag" '()) + (let* ((p (dummy-package "foo" + (build-system gnu-build-system))) + (t (options->transformation '((with-configure-flag . "foo=--flag"))))) + (let ((new (t p))) + (gexp->approximate-sexp (cadr (memq #:configure-flags (package-arguments new))))))) + (test-assert "options->transformation, without-tests" (let* ((dep (dummy-package "dep")) (p (dummy-package "foo" -- 2.40.0 --000000000000a9f73d05fa282e1a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
* doc/guix.texi (--with-configure-flag): Added d= ocumentation for --with-configure-flag
* guix/transformations.scm = (transform-package-configure-flag): New function, changes to %transformatio= ns and show-transformation-options-help/detailed
* tests/transform= ations.scm (test-equal "options-transformation, with-configure-flag&qu= ot;): Added a test for --with-configure-flag
--= -
=C2=A0doc/guix.texi =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | 19 +++= +++++++++++
=C2=A0guix/transformations.scm =C2=A0| 53 ++++++++++++++++++= +++++++++++++++++++++
=C2=A0tests/transformations.scm | 10 +++++++-
= =C2=A03 files changed, 81 insertions(+), 1 deletion(-)

diff --git a/= doc/guix.texi b/doc/guix.texi
index c49e51b72e..627a468b62 100644
---= a/doc/guix.texi
+++ b/doc/guix.texi
@@ -12859,6 +12859,25 @@ guix bu= ild coreutils --with-patch=3Dglibc=3D./glibc-frob.patch
=C2=A0In this ex= ample, glibc itself as well as everything that leads to
=C2=A0Coreutils = in the dependency graph is rebuilt.
=C2=A0
+@item --with-configure-fl= ag=3D@var{package}=3D@var{configure-flag}
+Add @var{configure-flag} to t= he list of configure-flags applied to
+the arguments of @var{package}, = where @var{package} is a spec such as
+@code{guile@@3.1} or @code{glibc= }. The build system of @var{package}
+must support the argument @code{#= :configure-flags}.
+
+For example, the command below builds GNU Hell= o with the
+configure-flag @code{--disable-nls}:
+
+@example
+= guix build hello --with-configure-flag=3Dhello=3D--disable-nls
+@end exa= mple
+
+@quotation Warning
+Currently, there is a primitive check = for whether the build system
+supports the argument @code{#:configure-f= lags} or not, however
+users should not rely on it.
+@end quotation<= br>+
=C2=A0@cindex upstream, latest version
=C2=A0@item --with-latest= =3D@var{package}
=C2=A0@itemx --with-version=3D@var{package}=3D@var{vers= ion}
diff --git a/guix/transformations.scm b/guix/transformations.scmindex 8ff472ad21..27fb0cb646 100644
--- a/guix/transformations.scm
+= ++ b/guix/transformations.scm
@@ -676,6 +676,53 @@ (define rewrite
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(rewrite obj)
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0obj)))
=C2=A0
+(define (transform-package-configure-flag sp= ecs)
+ =C2=A0"Return a procedure that, when passed a package and a = flag, adds the flag to #:configure-flags in the package's
+'argu= ments' field."
+ =C2=A0(define (package-with-configure-flag p e= xtra-flag)
+ =C2=A0 =C2=A0(package/inherit p
+ =C2=A0 =C2=A0 =C2=A0(a= rguments
+ =C2=A0 =C2=A0 =C2=A0 (substitute-keyword-arguments (package-a= rguments p)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 ((#:configure-flags list-of-fl= ags (quote '()))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0#~(cons* #$extr= a-flag #$list-of-flags))))))
+
+
+ =C2=A0(define %BUILD-SYSTEMS-WI= THOUT-CONFIGURE-FLAGS =C2=A0
+ =C2=A0 =C2=A0;; These build systems do n= ot have a #:configure-flags parameter
+'(android-ndk asdf/sbcl asdf/= ecl asdf/source cargo channel chicken clojure copy dub dune elm emacs go gu= ile julia linux-module maven minetest-mod minify node perl rakudo rebar rub= y scons texlive tree-sitter trivial))
+ =C2=A0
+ =C2=A0(define (build= -system-supports-flags? spec)
+ =C2=A0 =C2=A0;; XXX: a more sophisticate= d approach could be added that checks the given build system for a configur= e-flags option
+ =C2=A0 =C2=A0;; if a new build system is added, it need= s to be added to the %BUILD-SYSTEMS-WITHOUT-CONFIGURE-FLAGS list manually+ =C2=A0 =C2=A0(not (member (build-system-name (package-build-system spec= ))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 %BUILD-SYST= EMS-WITHOUT-CONFIGURE-FLAGS)))
+ =C2=A0
+ =C2=A0(define cflags
+ = =C2=A0 =C2=A0;; Spec/flag alist.
+ =C2=A0 =C2=A0 (map (lambda (spec)
= + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(match (string-tokenize spec %no= t-equal)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0((spec flag)<= br>+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (cons spec flag))
= + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(_
+ =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (raise (formatted-message
+ =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (G_ &quo= t;~a: invalid package configure-flags specification")
+ =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 spec))))= )
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0specs))
+ =C2=A0
+ =C2=A0(de= fine rewrite
+ =C2=A0 =C2=A0(package-input-rewriting/spec
+ =C2=A0 = =C2=A0 (map (match-lambda
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0((s= pec . flags)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (cons spec (cut= package-with-configure-flag <> flags))))
+ =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0cflags)))
+
+ =C2=A0(lambda (obj)
+ =C2=A0 =C2=A0(if = (and
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 (package? obj)
+ =C2=A0 =C2=A0 =C2= =A0 =C2=A0 (build-system-supports-flags? obj))
+ =C2=A0 =C2=A0 =C2=A0 = =C2=A0(rewrite obj)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0obj)))
+
=C2=A0(d= efine (patched-source name source patches)
=C2=A0 =C2=A0"Return a f= ile-like object with the given NAME that applies PATCHES to
=C2=A0SOURCE= .=C2=A0 SOURCE must itself be a file-like object of any type, including
= @@ -845,6 +892,7 @@ (define %transformations
=C2=A0 =C2=A0 =C2=A0(tune .= ,transform-package-tuning)
=C2=A0 =C2=A0 =C2=A0(with-debug-info . ,tran= sform-package-with-debug-info)
=C2=A0 =C2=A0 =C2=A0(without-tests . ,tra= nsform-package-tests)
+ =C2=A0 =C2=A0(with-configure-flag . ,transform-p= ackage-configure-flag)
=C2=A0 =C2=A0 =C2=A0(with-patch =C2=A0. ,transfor= m-package-patches)
=C2=A0 =C2=A0 =C2=A0(with-latest . ,transform-package= -latest)
=C2=A0 =C2=A0 =C2=A0(with-version . ,transform-package-version)= ))
@@ -915,6 +963,8 @@ (define micro-architecture
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(parser 'with-debug= -info))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(option '("wit= hout-tests") #t #f
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0(parser 'without-tests))
+ =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0(option '("with-configure-flag") #t #f
+ =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(parser 'wit= h-configure-flag))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(option '= ;("with-patch") #t #f
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(parser 'with-patch))
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(option '("with-latest") #t #f
= @@ -952,6 +1002,9 @@ (define (show-transformation-options-help/detailed)=C2=A0 =C2=A0(display (G_ "
=C2=A0 =C2=A0 =C2=A0 =C2=A0--with-patc= h=3DPACKAGE=3DFILE
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 add FILE to the list of patches of P= ACKAGE"))
+ =C2=A0(display (G_ "
+ =C2=A0 =C2=A0 =C2=A0--wi= th-configure-flag=3DPACKAGE=3DFLAG
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 add FLAG to the list of #:= configure-flags of PACKAGE"))
=C2=A0 =C2=A0(display (G_ "
= =C2=A0 =C2=A0 =C2=A0 =C2=A0--with-latest=3DPACKAGE
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 use t= he latest upstream release of PACKAGE"))
diff --git a/tests/transfo= rmations.scm b/tests/transformations.scm
index 1fa2c0bba8..31fd042d31 10= 0644
--- a/tests/transformations.scm
+++ b/tests/transformations.scm<= br>@@ -33,7 +33,7 @@ (define-module (test-transformations)
=C2=A0 =C2=A0= #:use-module ((guix gexp)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0#:select (local-file? local-file-file
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0computed-file? computed-file-gexp
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0gexp-input-th= ing))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0gexp-input-thing gexp->approximate-sexp))
= =C2=A0 =C2=A0#:use-module (guix ui)
=C2=A0 =C2=A0#:use-module (guix util= s)
=C2=A0 =C2=A0#:use-module (guix git)
@@ -408,6 +408,14 @@ (define = (package-name* obj)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(package-full-name grep))
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(package-arguments (package= -replacement dep0))))))))
=C2=A0
+(test-equal "options->trans= formation, with-configure-flag"
+ =C2=A0'(cons* "--flag&qu= ot; '())
+ =C2=A0(let* ((p =C2=A0 (dummy-package "foo"
= + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(build-system gnu-= build-system)))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 (t =C2=A0 (options->tra= nsformation '((with-configure-flag . "foo=3D--flag")))))
+= =C2=A0 =C2=A0(let ((new (t p)))
+ =C2=A0 =C2=A0 =C2=A0(gexp->approxi= mate-sexp (cadr (memq #:configure-flags (package-arguments new)))))))
+<= br>=C2=A0(test-assert "options->transformation, without-tests"=
=C2=A0 =C2=A0(let* ((dep (dummy-package "dep"))
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 (p =C2=A0 (dummy-package "foo"
-- 2.40.0
--000000000000a9f73d05fa282e1a-- From debbugs-submit-bounces@debbugs.gnu.org Thu May 04 10:26:01 2023 Received: (at 62551) by debbugs.gnu.org; 4 May 2023 14:26:01 +0000 Received: from localhost ([127.0.0.1]:51648 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puZuC-0000Gt-L0 for submit@debbugs.gnu.org; Thu, 04 May 2023 10:26:01 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:6075) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puZu9-0000GW-GD for 62551@debbugs.gnu.org; Thu, 04 May 2023 10:25:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=from:to:cc:subject:references:date:in-reply-to: message-id:mime-version; bh=LNN/nECRn1DL3EN40fyk/w/3p3hU61LCX3B8bO7Jdc8=; b=cthFjw1rWasAbkbfcf51zzK3xt0MoszoZ+R/OATyJ/DSTOt+SsRzp0jW n0RRxnM50j/541unicHpxfkVBpHfsNQAUPLkcfuhwKu9Eb+gyw0ef9Iil PsgygaMzAMJhEvCACEQkxL70faiouXY2ubfLOkmNYyNCrtmoJrOOOVcZl Q=; Authentication-Results: mail3-relais-sop.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=ludovic.courtes@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="5.99,249,1677538800"; d="scan'208";a="55126644" Received: from 91-160-117-201.subs.proxad.net (HELO ribbon) ([91.160.117.201]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 May 2023 16:25:51 +0200 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Sarthak Shah Subject: Re: bug#62551: Added new transformation option: --with-configure-flag References: Date: Thu, 04 May 2023 16:25:49 +0200 In-Reply-To: (Sarthak Shah's message of "Tue, 25 Apr 2023 17:52:10 +0530") Message-ID: <87y1m4p40i.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 62551 Cc: 62551@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Sarthak, Sarthak Shah skribis: > * doc/guix.texi (--with-configure-flag): Added documentation for > --with-configure-flag > * guix/transformations.scm (transform-package-configure-flag): New > function, changes to %transformations and > show-transformation-options-help/detailed > * tests/transformations.scm (test-equal "options-transformation, > with-configure-flag"): Added a test for --with-configure-flag Nice! I made the superficial changes below, which can be summarized like this: =E2=80=A2 Allow for equal signs in the configure flag itself. =E2=80=A2 Remove build system check: we don=E2=80=99t do that for the oth= er options; instead, document the limitation and leave it up to the user. =E2=80=A2 Tweak the style of the system test to avoid =E2=80=98cadr=E2=80= =99 (info "(guix) Data Types and Pattern Matching"). =E2=80=A2 Add a CMake example in the manual and tweak wording. I=E2=80=99ll follow up with a news entry so people who run =E2=80=98guix pu= ll=E2=80=99 can learn about the new option. Great work, thank you! Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/doc/guix.texi b/doc/guix.texi index ff0e62053b..55221a10c3 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -12919,23 +12919,33 @@ Package Transformation Options In this example, glibc itself as well as everything that leads to Coreutils in the dependency graph is rebuilt. -@item --with-configure-flag=@var{package}=@var{configure-flag} -Add @var{configure-flag} to the list of configure-flags applied to -the arguments of @var{package}, where @var{package} is a spec such as -@code{guile@@3.1} or @code{glibc}. The build system of @var{package} -must support the argument @code{#:configure-flags}. +@cindex configure flags, changing them +@item --with-configure-flag=@var{package}=@var{flag} +Append @var{flag} to the configure flags of @var{package}, where +@var{package} is a spec such as @code{guile@@3.0} or @code{glibc}. The +build system of @var{package} must support the @code{#:configure-flags} +argument. -For example, the command below builds GNU Hello with the -configure-flag @code{--disable-nls}: +For example, the command below builds GNU@tie{}Hello with the +configure flag @code{--disable-nls}: @example guix build hello --with-configure-flag=hello=--disable-nls @end example -@quotation Warning -Currently, there is a primitive check for whether the build system -supports the argument @code{#:configure-flags} or not, however -users should not rely on it. +The following command passes an extra flag to @command{cmake} as it +builds @code{lapack}: + +@example +guix build lapack \ + --with-configure-flag=lapack=-DBUILD_COMPLEX=OFF +@end example + +@quotation Note +Under the hood, this option works by passing the +@samp{#:configure-flags} argument to the build system of the package of +interest (@pxref{Build Systems}). Most build systems support that +option but some do not. In that case, an error is raised. @end quotation @cindex upstream, latest version diff --git a/guix/transformations.scm b/guix/transformations.scm index 9cbac5df9e..943b2768c6 100644 --- a/guix/transformations.scm +++ b/guix/transformations.scm @@ -677,49 +677,42 @@ (define (transform-package-tests specs) obj))) (define (transform-package-configure-flag specs) - "Return a procedure that, when passed a package and a flag, adds the flag to #:configure-flags in the package's -'arguments' field." + "Return a procedure that, when passed a package and a flag, adds the flag to +#:configure-flags in the package's 'arguments' field." (define (package-with-configure-flag p extra-flag) (package/inherit p (arguments (substitute-keyword-arguments (package-arguments p) - ((#:configure-flags list-of-flags (quote '())) - #~(cons* #$extra-flag #$list-of-flags)))))) + ((#:configure-flags flags #~'()) + ;; Add EXTRA-FLAG to the end so it can potentially override FLAGS. + #~(append #$flags '(#$extra-flag))))))) - - (define %BUILD-SYSTEMS-WITHOUT-CONFIGURE-FLAGS - ;; These build systems do not have a #:configure-flags parameter -'(android-ndk asdf/sbcl asdf/ecl asdf/source cargo channel chicken clojure copy dub dune elm emacs go guile julia linux-module maven minetest-mod minify node perl rakudo rebar ruby scons texlive tree-sitter trivial)) - - (define (build-system-supports-flags? spec) - ;; XXX: a more sophisticated approach could be added that checks the given build system for a configure-flags option - ;; if a new build system is added, it needs to be added to the %BUILD-SYSTEMS-WITHOUT-CONFIGURE-FLAGS list manually - (not (member (build-system-name (package-build-system spec)) - %BUILD-SYSTEMS-WITHOUT-CONFIGURE-FLAGS))) - - (define cflags + (define configure-flags ;; Spec/flag alist. - (map (lambda (spec) - (match (string-tokenize spec %not-equal) - ((spec flag) - (cons spec flag)) - (_ - (raise (formatted-message - (G_ "~a: invalid package configure-flags specification") - spec))))) - specs)) + (map (lambda (spec) + ;; Split SPEC on the first equal sign (the configure flag might + ;; contain equal signs, as in '-DINTSIZE=32'). + (let ((equal (string-index spec #\=))) + (match (and equal + (list (string-take spec equal) + (string-drop spec (+ 1 equal)))) + ((spec flag) + (cons spec flag)) + (_ + (raise (formatted-message + (G_ "~a: invalid package configure flag specification") + spec)))))) + specs)) (define rewrite (package-input-rewriting/spec (map (match-lambda ((spec . flags) (cons spec (cut package-with-configure-flag <> flags)))) - cflags))) + configure-flags))) (lambda (obj) - (if (and - (package? obj) - (build-system-supports-flags? obj)) + (if (package? obj) (rewrite obj) obj))) @@ -1004,7 +997,7 @@ (define (show-transformation-options-help/detailed) add FILE to the list of patches of PACKAGE")) (display (G_ " --with-configure-flag=PACKAGE=FLAG - add FLAG to the list of #:configure-flags of PACKAGE")) + append FLAG to the configure flags of PACKAGE")) (display (G_ " --with-latest=PACKAGE use the latest upstream release of PACKAGE")) diff --git a/tests/transformations.scm b/tests/transformations.scm index 31fd042d31..704818b9ed 100644 --- a/tests/transformations.scm +++ b/tests/transformations.scm @@ -409,12 +409,15 @@ (define* (depends-on-toolchain? p #:optional (toolchain "gcc-toolchain")) (package-arguments (package-replacement dep0)))))))) (test-equal "options->transformation, with-configure-flag" - '(cons* "--flag" '()) + '(append '() '("--flag=42")) (let* ((p (dummy-package "foo" (build-system gnu-build-system))) - (t (options->transformation '((with-configure-flag . "foo=--flag"))))) + (t (options->transformation + '((with-configure-flag . "foo=--flag=42"))))) (let ((new (t p))) - (gexp->approximate-sexp (cadr (memq #:configure-flags (package-arguments new))))))) + (match (package-arguments new) + ((#:configure-flags flags) + (gexp->approximate-sexp flags)))))) (test-assert "options->transformation, without-tests" (let* ((dep (dummy-package "dep")) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu May 04 10:26:03 2023 Received: (at control) by debbugs.gnu.org; 4 May 2023 14:26:03 +0000 Received: from localhost ([127.0.0.1]:51652 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puZuF-0000HQ-As for submit@debbugs.gnu.org; Thu, 04 May 2023 10:26:03 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:6075) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puZuB-0000GW-Qp for control@debbugs.gnu.org; Thu, 04 May 2023 10:26:00 -0400 Authentication-Results: mail3-relais-sop.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=ludo@gnu.org; dmarc=fail (p=none dis=none) d=gnu.org X-IronPort-AV: E=Sophos;i="5.99,249,1677538800"; d="scan'208";a="55126666" Received: from 91-160-117-201.subs.proxad.net (HELO ribbon) ([91.160.117.201]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 May 2023 16:25:59 +0200 Date: Thu, 04 May 2023 16:25:58 +0200 Message-Id: <87wn1op409.fsf@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #62551 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) close 62551 quit From debbugs-submit-bounces@debbugs.gnu.org Fri May 05 07:59:35 2023 Received: (at 62551) by debbugs.gnu.org; 5 May 2023 11:59:35 +0000 Received: from localhost ([127.0.0.1]:53330 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puu61-0000OO-SS for submit@debbugs.gnu.org; Fri, 05 May 2023 07:59:35 -0400 Received: from relay.yourmailgateway.de ([185.244.194.184]:33793) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puu5l-0000Nx-NZ for 62551@debbugs.gnu.org; Fri, 05 May 2023 07:59:32 -0400 Received: from relay01-mors.netcup.net (localhost [127.0.0.1]) by relay01-mors.netcup.net (Postfix) with ESMTPS id 4QCTkC75GZz8wq7; Fri, 5 May 2023 13:59:15 +0200 (CEST) Authentication-Results: relay01-mors.netcup.net; dkim=permerror (bad message/signature format) Received: from policy01-mors.netcup.net (unknown [46.38.225.35]) by relay01-mors.netcup.net (Postfix) with ESMTPS id 4QCTkC6QD7z7wZd; Fri, 5 May 2023 13:59:15 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at policy01-mors.netcup.net X-Spam-Flag: NO X-Spam-Score: -2.9 X-Spam-Level: X-Spam-Status: No, score=-2.9 required=6.31 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9] autolearn=ham autolearn_force=no Received: from mxe217.netcup.net (unknown [10.243.12.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by policy01-mors.netcup.net (Postfix) with ESMTPS id 4QCTkC24Pxz8t2h; Fri, 5 May 2023 13:59:15 +0200 (CEST) Received: from florianrock64 (ip92344de0.dynamic.kabel-deutschland.de [146.52.77.224]) by mxe217.netcup.net (Postfix) with ESMTPSA id 00D8A81175; Fri, 5 May 2023 13:59:12 +0200 (CEST) From: "pelzflorian (Florian Pelz)" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#62551] Added new transformation option: --with-configure-flag References: <87y1m4p40i.fsf_-_@gnu.org> Date: Fri, 05 May 2023 13:59:11 +0200 In-Reply-To: <87y1m4p40i.fsf_-_@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s?= =?utf-8?Q?=22's?= message of "Thu, 04 May 2023 16:25:49 +0200") Message-ID: <87ttwr3s6o.fsf@pelzflorian.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Rspamd-Queue-Id: 00D8A81175 X-Spamd-Result: default: False [-5.56 / 15.00]; BAYES_HAM(-5.46)[99.89%]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:3209, ipnet:146.52.0.0/16, country:DE]; RCVD_COUNT_ZERO(0.00)[0]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; FREEMAIL_CC(0.00)[gmail.com,debbugs.gnu.org] X-Rspamd-Server: rspamd-worker-8404 X-NC-CID: t/8VjHzfTilmcqln95uHNEKv73I61VBNhTgp1ar/0iJ6qOj636QvhKzE X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 62551 Cc: 62551@debbugs.gnu.org, Sarthak Shah X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi all. This option indeed is great work, however when testing the CMake example from the news entry, it fails to build. Is it just me? It seems like it should work. Ludo, are you maybe using a lapack from another channel? Regards, Florian From unknown Wed Jun 18 23:05:08 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 03 Jun 2023 11:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator