GNU bug report logs -
#74845
Guix racket: binaries installed via "raco pkg install" missing --config directory
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 74845 in the body.
You can then email your comments to 74845 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#74845
; Package
guix
.
(Fri, 13 Dec 2024 03:08:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Suhail Singh <suhailsingh247 <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Fri, 13 Dec 2024 03:08:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello Guix,
Currently, binaries installed via "raco" (included in Guix's "racket"
package) don't include the -G / --config configuration option specifying
the "Main configuration directory". This is problematic.
Specifically, when installing "rash" via raco using the below:
#+begin_src sh
raco pkg install rash
#+end_src
The resulting rash-repl binary is missing the -G configuration option in
the call to the racket binary. Invoking the installed rash-repl binary
results in the following error:
#+begin_src sh
standard-module-name-resolver: collection not found
for module path: (lib "rash/repl.rkt")
collection: "rash"
in collection directories:
${HOME}/.local/share/racket/8.14/collects
/gnu/store/vn20i9xk22czljr9drwzwpgw209l49s8-racket-vm-cs-8.14/opt/racket-vm/collects/
#+end_src
Adding the -G configuration option similar to what's included in the
"raco" script itself, fixes the above error.
The executable scripts (at least on linux) seem to be generated via
make-unix-launcher in ./racket/collects/launcher/launcher.rkt . What's
unclear is the best way in which to address this issue. For one thing,
the -G configuration option in the "raco" script (which addressed the
issue in the rash-repl script above) references the store location of
the racket guix package. However, the launcher.rkt (which contains the
definition of make-unix-launcher) file is compiled as part of
racket-vm-cs (which is an input of racket).
--
Suhail
Information forwarded
to
philip <at> philipmcgrath.com, bug-guix <at> gnu.org
:
bug#74845
; Package
guix
.
(Tue, 17 Dec 2024 05:40:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 74845 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/patches/racket-launcher-config-dir.patch: New file. With this
patch, packages installed at runtime via raco have configuration directory
correctly set.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/racket.scm (%racket-origin): Use it.
Change-Id: Ibba2d73b72a66e58a3c51dad8cf4fbf0c8969c4e
---
gnu/local.mk | 1 +
.../patches/racket-launcher-config-dir.patch | 33 +++++++++++++++++++
gnu/packages/racket.scm | 1 +
3 files changed, 35 insertions(+)
create mode 100644 gnu/packages/patches/racket-launcher-config-dir.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index ffb8eb6d29..774cc97a83 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2124,6 +2124,7 @@ dist_patch_DATA = \
%D%/packages/patches/rpcbind-CVE-2017-8779.patch \
%D%/packages/patches/rtags-separate-rct.patch \
%D%/packages/patches/racket-chez-scheme-bin-sh.patch \
+ %D%/packages/patches/racket-launcher-config-dir.patch \
%D%/packages/patches/racket-rktio-bin-sh.patch \
%D%/packages/patches/remake-impure-dirs.patch \
%D%/packages/patches/restartd-update-robust.patch \
diff --git a/gnu/packages/patches/racket-launcher-config-dir.patch b/gnu/packages/patches/racket-launcher-config-dir.patch
new file mode 100644
index 0000000000..575e3b6151
--- /dev/null
+++ b/gnu/packages/patches/racket-launcher-config-dir.patch
@@ -0,0 +1,33 @@
+From 6b3aed3d71ea9481762de7bd42395704176b6625 Mon Sep 17 00:00:00 2001
+From: Suhail <suhail <at> bayesians.ca>
+Date: Mon, 16 Dec 2024 15:07:55 -0500
+Subject: [PATCH v2] racket: raco: Ensure launchers of packages include config
+ directory.
+
+---
+ racket/collects/launcher/launcher.rkt | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/racket/collects/launcher/launcher.rkt b/racket/collects/launcher/launcher.rkt
+index 0faacec4ce..2c77d55caf 100644
+--- a/racket/collects/launcher/launcher.rkt
++++ b/racket/collects/launcher/launcher.rkt
+@@ -405,7 +405,14 @@
+ [x-flags? (and (eq? kind 'mred)
+ (eq? (cross-system-type) 'unix)
+ (not (script-variant? variant)))]
+- [flags (let ([m (assq 'wm-class aux)])
++ [flags (let ([m (assq 'wm-class aux)]
++ [flags (if (or (member "-G" flags)
++ (member "--config" flags))
++ flags
++ (list* "-G"
++ (format "~a"
++ (find-system-path 'config-dir))
++ flags))])
+ (if m
+ (list* "-J" (cdr m) flags)
+ flags))]
+--
+2.47.1
+
diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm
index 1016915b47..75f333c468 100644
--- a/gnu/packages/racket.scm
+++ b/gnu/packages/racket.scm
@@ -214,6 +214,7 @@ (define %racket-origin
(base32 "0hg113fnd4nkvisf0ia9b367h02xfww9kysnb6fc6iac059lpard"))
(file-name (git-file-name "racket" %racket-version))
(patches (search-patches "racket-chez-scheme-bin-sh.patch"
+ "racket-launcher-config-dir.patch"
"racket-rktio-bin-sh.patch"))
(modules '((guix build utils)))
(snippet
base-commit: 2e8a8b3ddb4ca31b918d63ff2957c6da1424a2a9
Information forwarded
to
philip <at> philipmcgrath.com, leo <at> famulari.name, bug-guix <at> gnu.org
:
bug#74845
; Package
guix
.
(Sun, 16 Feb 2025 02:51:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 74845 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/patches/racket-launcher-config-dir.patch: New file. With this
patch, packages installed at runtime via raco have configuration directory
correctly set.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/racket.scm (%racket-origin): Use it.
Change-Id: Ibba2d73b72a66e58a3c51dad8cf4fbf0c8969c4e
---
gnu/local.mk | 1 +
.../patches/racket-launcher-config-dir.patch | 65 +++++++++++++++++++
gnu/packages/racket.scm | 1 +
3 files changed, 67 insertions(+)
create mode 100644 gnu/packages/patches/racket-launcher-config-dir.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index bbe6fe4fce..9690bbe647 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2165,6 +2165,7 @@ dist_patch_DATA = \
%D%/packages/patches/rpcbind-CVE-2017-8779.patch \
%D%/packages/patches/rtags-separate-rct.patch \
%D%/packages/patches/racket-chez-scheme-bin-sh.patch \
+ %D%/packages/patches/racket-launcher-config-dir.patch \
%D%/packages/patches/racket-rktio-bin-sh.patch \
%D%/packages/patches/reduce-unbundle-libffi.patch \
%D%/packages/patches/remake-impure-dirs.patch \
diff --git a/gnu/packages/patches/racket-launcher-config-dir.patch b/gnu/packages/patches/racket-launcher-config-dir.patch
new file mode 100644
index 0000000000..9a1eec6e8b
--- /dev/null
+++ b/gnu/packages/patches/racket-launcher-config-dir.patch
@@ -0,0 +1,65 @@
+From 6b3aed3d71ea9481762de7bd42395704176b6625 Mon Sep 17 00:00:00 2001
+From: Suhail <suhail <at> bayesians.ca>
+Date: Mon, 16 Dec 2024 15:07:55 -0500
+Subject: [PATCH v2] racket: raco: Ensure launchers of packages include config
+ directory.
+
+Currently, binaries installed via "raco" (included in Guix's "racket" package)
+don't include the -G / --config configuration option specifying the "Main
+configuration directory". This is problematic.
+
+Specifically, when installing "rash" via raco using the below:
+
+#+begin_src sh
+ raco pkg install rash
+#+end_src
+
+The resulting rash-repl binary (which is missing the -G configuration option
+in the call to the racket binary), when invoked, results in the following
+error:
+
+#+begin_src sh
+ standard-module-name-resolver: collection not found
+ for module path: (lib "rash/repl.rkt")
+ collection: "rash"
+ in collection directories:
+ ${HOME}/.local/share/racket/8.14/collects
+ /gnu/store/vn20i9xk22czljr9drwzwpgw209l49s8-racket-vm-cs-8.14/opt/racket-vm/collects/
+#+end_src
+
+Adding the -G configuration option in the call to the racket binary fixes the
+above error.
+
+The executable scripts (at least on linux) are generated via
+make-unix-launcher in ./racket/collects/launcher/launcher.rkt . The patch
+below ensures that the -G flag is added to such launcher scripts. The patch
+is conservative in that it allows it to be overwritten by callers of
+launcher.rkt as desired.
+
+---
+ racket/collects/launcher/launcher.rkt | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/racket/collects/launcher/launcher.rkt b/racket/collects/launcher/launcher.rkt
+index 0faacec4ce..2c77d55caf 100644
+--- a/racket/collects/launcher/launcher.rkt
++++ b/racket/collects/launcher/launcher.rkt
+@@ -405,7 +405,14 @@
+ [x-flags? (and (eq? kind 'mred)
+ (eq? (cross-system-type) 'unix)
+ (not (script-variant? variant)))]
+- [flags (let ([m (assq 'wm-class aux)])
++ [flags (let ([m (assq 'wm-class aux)]
++ [flags (if (or (member "-G" flags)
++ (member "--config" flags))
++ flags
++ (list* "-G"
++ (format "~a"
++ (find-system-path 'config-dir))
++ flags))])
+ (if m
+ (list* "-J" (cdr m) flags)
+ flags))]
+--
+2.47.1
+
diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm
index 2ff1d159fa..30c8e4df53 100644
--- a/gnu/packages/racket.scm
+++ b/gnu/packages/racket.scm
@@ -214,6 +214,7 @@ (define %racket-origin
(base32 "1lci426vvi64s077vwkxdgpkda4aggafxz52k7km2p8ngwmg9f78"))
(file-name (git-file-name "racket" %racket-version))
(patches (search-patches "racket-chez-scheme-bin-sh.patch"
+ "racket-launcher-config-dir.patch"
"racket-rktio-bin-sh.patch"))
(modules '((guix build utils)))
(snippet
base-commit: 1afbf48b250f667ce45de40a6c275e3e42ade67c
Reply sent
to
Leo Famulari <leo <at> famulari.name>
:
You have taken responsibility.
(Sun, 16 Feb 2025 04:01:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Suhail Singh <suhailsingh247 <at> gmail.com>
:
bug acknowledged by developer.
(Sun, 16 Feb 2025 04:01:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 74845-done <at> debbugs.gnu.org (full text, mbox):
On Mon, Dec 16, 2024 at 03:25:48PM -0500, Suhail Singh wrote:
> * gnu/packages/patches/racket-launcher-config-dir.patch: New file. With this
> patch, packages installed at runtime via raco have configuration directory
> correctly set.
> * gnu/local.mk (dist_patch_DATA): Register it.
> * gnu/packages/racket.scm (%racket-origin): Use it.
Thanks! Pushed as 696f2acbc7ba0ab7874d7ee4766135b623f88424
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 16 Mar 2025 11:24:16 GMT)
Full text and
rfc822 format available.
This bug report was last modified 107 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.