unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars-Dominik Braun <lars@6xq.net>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: Alexander Asteroth <alexander.asteroth@h-brs.de>, 52139@debbugs.gnu.org
Subject: bug#52139: jupyter trying to modify /gnu/store
Date: Mon, 13 Dec 2021 09:20:37 +0100	[thread overview]
Message-ID: <YbcCVVTC6L5+QV8g@noor.fritz.box> (raw)
In-Reply-To: <87k0g94i2m.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1147 bytes --]

Hi Ludo,

> But precisely: as Alexander wrote, when JUPYTER_CONFIG_DIR points to the
> store, jupyterlab cannot drop a config file there.  Or am I missing
> something?
sorry, my message was unclear here. The config file is written at
build time.

> BTW, if JUPYTER_CONFIG_DIR is meant to contain a directory name, as
> opposed to a colon-separated search path, we should make this change:
Looking at the documentation[1] again this is correct, but I feel we
should use JUPYTER_CONFIG_PATH instead, because it supports
colon-delimited entries, see attached patch. However that does not get
rid of error messages like these, when trying to use Settings→JupyterLab
Theme for example:

[W 08:10:14.476 LabApp] 500 PUT /lab/api/workspaces/lab?1639383014500 (127.0.0.1): [Errno 30] Read-only file system: '/gnu/store/8q7wdpdddfqh46plbbsa3rwci5092n5y-profile/etc/jupyter/lab'

So it seems that JUPYTER_CONFIG_PATH overrides the default
JUPYTER_CONFIG_DIR, when the latter is not set. Or maybe guix-science’s
jupyterlab is simply too old – not sure right now.

Cheers,
Lars

[1] https://jupyter.readthedocs.io/en/latest/use/jupyter-directories.html

[-- Attachment #2: jupyter-core-config-path.patch --]
[-- Type: text/x-diff, Size: 1466 bytes --]

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index db2ab8e5f0..450d17208f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -8478,7 +8478,7 @@ (define-public python-jupyter-core
     ;; search paths.
     (native-search-paths
      (list (search-path-specification
-            (variable "JUPYTER_CONFIG_DIR")
+            (variable "JUPYTER_CONFIG_PATH")
             (files '("etc/jupyter")))
            (search-path-specification
             (variable "JUPYTER_PATH")
@@ -12145,8 +12145,6 @@ (define-public python-nbconvert
              (when tests?
                ;; Some tests invoke the installed nbconvert binary.
                (add-installed-pythonpath inputs outputs)
-               ;; Tries to write to this path.
-               (unsetenv "JUPYTER_CONFIG_DIR")
                ;; Tests depend on templates installed to output.
                (setenv "JUPYTER_PATH"
                        (string-append
@@ -12254,6 +12252,8 @@ (define-public python-notebook
                ;; Some tests do not expect all files to be installed in the
                ;; same directory, but JUPYTER_PATH contains multiple entries.
                (unsetenv "JUPYTER_PATH")
+               ;; Interferes with tests that check paths.
+               (unsetenv "JUPYTER_CONFIG_PATH")
                ;; Some tests need HOME
                (setenv "HOME" "/tmp")
                (with-directory-excursion "/tmp"

  reply	other threads:[~2021-12-13  8:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-27 10:14 bug#52139: jupyter trying to modify /gnu/store Alexander Asteroth
2021-11-27 16:31 ` Alexander Asteroth
2021-12-10 13:27   ` Ludovic Courtès
2021-12-10 13:59     ` Alexander Asteroth
2021-12-11  9:36     ` Lars-Dominik Braun
2021-12-11 12:46       ` Alexander Asteroth
2021-12-12 21:41       ` Ludovic Courtès
2021-12-13  8:20         ` Lars-Dominik Braun [this message]
2021-12-14 15:06           ` Ludovic Courtès
2021-12-16  9:16             ` Lars-Dominik Braun
     [not found]       ` <8735mzpaep.fsf@h-brs.de>
2021-12-21 13:48         ` Lars-Dominik Braun
2021-11-28  1:08 ` bug#52139: (no subject) jgart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YbcCVVTC6L5+QV8g@noor.fritz.box \
    --to=lars@6xq.net \
    --cc=52139@debbugs.gnu.org \
    --cc=alexander.asteroth@h-brs.de \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).