GNU bug report logs -
#59073
[PATCH] gnu: r-minimal: Avoid referencing /gnu/store/[^-]+-glibc-[^-]+-static.
Previous Next
Reported by: Christopher Baines <mail <at> cbaines.net>
Date: Sun, 6 Nov 2022 09:07:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 59073 in the body.
You can then email your comments to 59073 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#59073
; Package
guix-patches
.
(Sun, 06 Nov 2022 09:07:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Christopher Baines <mail <at> cbaines.net>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Sun, 06 Nov 2022 09:07:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
As this causes the following error when computing a cross-compilation
derivation for r-minimal and related packages.
I think this is coming from the string appearing in the sources section of the
derivation, but not being a valid store path.
* gnu/packages/statistics.scm (r-minimal)[arguments]: Split string involving
/gnu/store.
---
gnu/packages/statistics.scm | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index 2d4dbe4a31..43988ad00e 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -470,7 +470,11 @@ (define-public r-minimal
"util-macros"
"graphite2"))
"|"
- "/gnu/store/[^-]+-glibc-[^-]+-static"
+ ;; Be careful when including store paths in the
+ ;; build script, since they might be treated as
+ ;; references
+ "/gnu/store"
+ "/[^-]+-glibc-[^-]+-static"
")/lib")) ""))))))))))))
(define-public rmath-standalone
--
2.37.3
Information forwarded
to
guix-patches <at> gnu.org
:
bug#59073
; Package
guix-patches
.
(Mon, 07 Nov 2022 09:30:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 59073 <at> debbugs.gnu.org (full text, mbox):
Hi,
On dim., 06 nov. 2022 at 10:05, Christopher Baines <mail <at> cbaines.net> wrote:
> * gnu/packages/statistics.scm (r-minimal)[arguments]: Split string involving
> /gnu/store.
It would imply rebuild many packages, no? master, staging or
core-updates?
> ---
> gnu/packages/statistics.scm | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
> index 2d4dbe4a31..43988ad00e 100644
> --- a/gnu/packages/statistics.scm
> +++ b/gnu/packages/statistics.scm
> @@ -470,7 +470,11 @@ (define-public r-minimal
> "util-macros"
> "graphite2"))
> "|"
> - "/gnu/store/[^-]+-glibc-[^-]+-static"
> + ;; Be careful when including store paths in the
> + ;; build script, since they might be treated as
> + ;; references
> + "/gnu/store"
> + "/[^-]+-glibc-[^-]+-static"
> ")/lib")) ""))))))))))))
LGTM.
Cheers,
simon
Information forwarded
to
guix-patches <at> gnu.org
:
bug#59073
; Package
guix-patches
.
(Mon, 07 Nov 2022 09:34:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 59073 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
zimoun <zimon.toutoune <at> gmail.com> writes:
> Hi,
>
> On dim., 06 nov. 2022 at 10:05, Christopher Baines <mail <at> cbaines.net> wrote:
>
>> * gnu/packages/statistics.scm (r-minimal)[arguments]: Split string involving
>> /gnu/store.
>
> It would imply rebuild many packages, no? master, staging or
> core-updates?
It does, my plan was/is to ask Ricardo if he could maybe include it when
pushing the next big batch of r related changes?
Chris
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#59073
; Package
guix-patches
.
(Mon, 07 Nov 2022 21:38:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 59073 <at> debbugs.gnu.org (full text, mbox):
Christopher Baines <mail <at> cbaines.net> skribis:
> As this causes the following error when computing a cross-compilation
> derivation for r-minimal and related packages.
Which error? :-)
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#59073
; Package
guix-patches
.
(Mon, 07 Nov 2022 23:00:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 59073 <at> debbugs.gnu.org (full text, mbox):
Hi Chris,
On lun., 07 nov. 2022 at 10:32, Christopher Baines <mail <at> cbaines.net> wrote:
> It does, my plan was/is to ask Ricardo if he could maybe include it when
> pushing the next big batch of r related changes?
I am preparing a Bioconductor upgrade, so it could be part of it.
Ricardo, WDYT?
Cheers,
simon
Information forwarded
to
guix-patches <at> gnu.org
:
bug#59073
; Package
guix-patches
.
(Tue, 08 Nov 2022 07:41:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 59073 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Ludovic Courtès <ludo <at> gnu.org> writes:
> Christopher Baines <mail <at> cbaines.net> skribis:
>
>> As this causes the following error when computing a cross-compilation
>> derivation for r-minimal and related packages.
>
> Which error? :-)
Good spot, I've updated the patch/commit message.
But it's this:
→ guix build --target=aarch64-linux-gnu r-minimal
guix build: error: path ‘/gnu/store/[^-]+-glibc-[^-]+-static’ is not valid
I'm not sure why this seems to only affect cross derivations. It's not
the only problem that's happened for cross derivations though, so it
might be good to expand the linting to cover them (maybe even for just
one common target like aarch64-linux-gnu).
Thanks,
Chris
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#59073
; Package
guix-patches
.
(Tue, 08 Nov 2022 07:41:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 59073 <at> debbugs.gnu.org (full text, mbox):
As this causes the following error when computing a cross-compilation
derivation for r-minimal and related packages:
guix build: error: path ‘/gnu/store/[^-]+-glibc-[^-]+-static’ is not valid
I think this is coming from the string appearing in the builder and thus the
sources section of the derivation, but not being a valid store path.
* gnu/packages/statistics.scm (r-minimal)[arguments]: Split string involving
/gnu/store.
---
gnu/packages/statistics.scm | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index 2d4dbe4a31..43988ad00e 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -470,7 +470,11 @@ (define-public r-minimal
"util-macros"
"graphite2"))
"|"
- "/gnu/store/[^-]+-glibc-[^-]+-static"
+ ;; Be careful when including store paths in the
+ ;; build script, since they might be treated as
+ ;; references
+ "/gnu/store"
+ "/[^-]+-glibc-[^-]+-static"
")/lib")) ""))))))))))))
(define-public rmath-standalone
--
2.37.3
Information forwarded
to
guix-patches <at> gnu.org
:
bug#59073
; Package
guix-patches
.
(Tue, 08 Nov 2022 13:11:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 59073 <at> debbugs.gnu.org (full text, mbox):
Hi,
Christopher Baines <mail <at> cbaines.net> skribis:
> → guix build --target=aarch64-linux-gnu r-minimal
> guix build: error: path ‘/gnu/store/[^-]+-glibc-[^-]+-static’ is not valid
Interesting bug!
I pushed a fix and explanation:
--8<---------------cut here---------------start------------->8---
commit 3bd4b92f55f40119349e39902a9b800de98040d2
build-system/gnu: Turn #:phases into a gexp when cross-compiling.
Previously, we'd get this error:
$ guix build --target=aarch64-linux-gnu r-minimal -d --no-grafts
guix build: error: path ‘/gnu/store/[^-]+-glibc-[^-]+-static’ is not valid
This is because the sexp would be passed as an input of the surrounding
gexp in 'gnu-cross-build', and thus
"/gnu/store/[^-]+-glibc-[^-]+-static" would be interpreted as a source
file name, as in this example:
scheme@(guix gexp)> #~(foo #$(list 'whatever "/gnu/store/[^-]+-glibc-[^-]+-static"))
$11 = #<gexp (foo #<gexp-input (whatever "/gnu/store/[^-]+-glibc-[^-]+-static"):out>) 7f098badec30>
scheme@(guix gexp)> (gexp-inputs $11)
$12 = (#<gexp-input "/gnu/store/[^-]+-glibc-[^-]+-static":out>)
Fixes <https://issues.guix.gnu.org/59073>.
Reported by Christopher Baines <mail <at> cbaines.net>.
* guix/build-system/gnu.scm (gnu-cross-build): When PHASES is a pair,
pass it through 'sexp->gexp'.
--8<---------------cut here---------------end--------------->8---
That said, this code is bogus:
1. We should refrain from using non-literal strings as patterns in
‘substitute*’.
2. We should call ‘%store-directory’ from (guix build utils) instead
of hardcoding “/gnu/store”.
Both of these should be fixed at some point.
Thanks,
Ludo’.
bug closed, send any further explanations to
59073 <at> debbugs.gnu.org and Christopher Baines <mail <at> cbaines.net>
Request was from
Ludovic Courtès <ludo <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Tue, 08 Nov 2022 13:11:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#59073
; Package
guix-patches
.
(Tue, 08 Nov 2022 21:40:01 GMT)
Full text and
rfc822 format available.
Message #31 received at 59073 <at> debbugs.gnu.org (full text, mbox):
Hi,
On Tue, 08 Nov 2022 at 14:09, Ludovic Courtès <ludo <at> gnu.org> wrote:
> Interesting bug!
>
> I pushed a fix and explanation:
Oh! :-)
> That said, this code is bogus:
>
> 1. We should refrain from using non-literal strings as patterns in
> ‘substitute*’.
What does it mean “non-literal string” here?
Cheers,
simon
Information forwarded
to
guix-patches <at> gnu.org
:
bug#59073
; Package
guix-patches
.
(Thu, 10 Nov 2022 14:08:02 GMT)
Full text and
rfc822 format available.
Message #34 received at 59073 <at> debbugs.gnu.org (full text, mbox):
Hi,
zimoun <zimon.toutoune <at> gmail.com> skribis:
>> That said, this code is bogus:
>>
>> 1. We should refrain from using non-literal strings as patterns in
>> ‘substitute*’.
>
> What does it mean “non-literal string” here?
A string that is not a literal (or constant, if you prefer).
This is OK:
(substitute* f
((".*") …))
This is not:
(substitute* f
(((string-append "." (star))) …))
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#59073
; Package
guix-patches
.
(Fri, 11 Nov 2022 09:56:02 GMT)
Full text and
rfc822 format available.
Message #37 received at 59073 <at> debbugs.gnu.org (full text, mbox):
Hi,
On jeu., 10 nov. 2022 at 15:07, Ludovic Courtès <ludo <at> gnu.org> wrote:
> A string that is not a literal (or constant, if you prefer).
>
> This is OK:
>
> (substitute* f
> ((".*") …))
>
> This is not:
>
> (substitute* f
> (((string-append "." (star))) …))
Thanks for explaining.
Cheers,
simon
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 09 Dec 2022 12:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 249 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.