From c46af774112d5b4b99ab17af90593ecb7ad8b33113ed021571b9123c28ffd9ba Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Thu, 27 Oct 2022 15:19:08 +0000 Subject: [PATCH 1/2] - Add notebook-pr6580+pr6578-404errors.patch * fix 404 errors at startup * gh#jupyter/notebook#6580 -- custom preload * gh#jupyter/notebook#6578 -- jquery from nbclassic OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-notebook?expand=0&rev=51 --- notebook-pr6578+pr6580-404errors.patch | 60 ++++++++++++++++++++++++++ python-notebook.changes | 8 ++++ python-notebook.spec | 4 +- 3 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 notebook-pr6578+pr6580-404errors.patch diff --git a/notebook-pr6578+pr6580-404errors.patch b/notebook-pr6578+pr6580-404errors.patch new file mode 100644 index 0000000..7a637ae --- /dev/null +++ b/notebook-pr6578+pr6580-404errors.patch @@ -0,0 +1,60 @@ +From f68d5198b006108c860d27918720fdf6a7ab48bd Mon Sep 17 00:00:00 2001 +From: RRosio +Date: Fri, 14 Oct 2022 09:13:31 -0700 +Subject: [PATCH] update dependency path in static template + +--- + notebook/templates/page.html | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/notebook/templates/page.html b/notebook/templates/page.html +index 2237319037..927694e937 100644 +--- a/notebook/templates/page.html ++++ b/notebook/templates/page.html +@@ -7,7 +7,7 @@ + {% block title %}Jupyter Notebook{% endblock %} + {% block favicon %}{% endblock %} + +- ++ + + + +@@ -39,7 +39,7 @@ + text: 'components/requirejs-text/text', + bootstrap: 'components/bootstrap/dist/js/bootstrap.min', + bootstraptour: 'components/bootstrap-tour/build/js/bootstrap-tour.min', +- 'jquery-ui': 'components/jquery-ui/jquery-ui.min', ++ 'jquery-ui': 'components/jquery-ui/dist/jquery-ui.min', + moment: 'components/moment/min/moment-with-locales', + codemirror: 'components/codemirror', + termjs: 'components/xterm.js/xterm', + +From ab71610669e7548f2e9050f98da80cf1eba675ae Mon Sep 17 00:00:00 2001 +From: Eric Charles +Date: Sun, 16 Oct 2022 11:36:45 +0200 +Subject: [PATCH] Ensure custom preload is correctly handled + +diff --git a/notebook/templates/page.html b/notebook/templates/page.html +index 927694e937..fb5d642f4e 100644 +--- a/notebook/templates/page.html ++++ b/notebook/templates/page.html +@@ -98,6 +98,18 @@ + } + }) + ++ // error-catching custom-preload.js shim. ++ define("custom-preload", function (require, exports, module) { ++ try { ++ var custom = require('custom/custom-preload'); ++ console.debug('loaded custom-preload.js'); ++ return custom; ++ } catch (e) { ++ console.error("error loading custom-preload.js", e); ++ return {}; ++ } ++ }) ++ + document.nbjs_translations = {{ nbjs_translations|safe }}; + document.documentElement.lang = navigator.language.toLowerCase(); + diff --git a/python-notebook.changes b/python-notebook.changes index 89f335e..a3c1b52 100644 --- a/python-notebook.changes +++ b/python-notebook.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Oct 27 15:11:59 UTC 2022 - Ben Greiner + +- Add notebook-pr6580+pr6578-404errors.patch + * fix 404 errors at startup + * gh#jupyter/notebook#6580 -- custom preload + * gh#jupyter/notebook#6578 -- jquery from nbclassic + ------------------------------------------------------------------- Wed Oct 26 10:54:30 UTC 2022 - Ben Greiner diff --git a/python-notebook.spec b/python-notebook.spec index f40b603..35a726d 100644 --- a/python-notebook.spec +++ b/python-notebook.spec @@ -43,6 +43,8 @@ Group: Development/Languages/Python URL: https://github.com/jupyter/notebook Source0: https://files.pythonhosted.org/packages/source/n/notebook/notebook-%{version}.tar.gz Source100: python-notebook-rpmlintrc +# PATCH-FIX-UPSTREAM notebook-pr6578+pr6580-404errors.patch gh#jupyter/notebook#6578 gh#jupyter/notebook#6580 +Patch1: notebook-pr6578+pr6580-404errors.patch BuildRequires: %{python_module jupyter-packaging >= 0.9} BuildRequires: %{python_module nbclassic >= 0.4.0} BuildRequires: %{python_module setuptools} @@ -164,7 +166,7 @@ interactive computing. This package pulls in the LaTeX dependencies for the Jupyter Notebook. %prep -%setup -q -n notebook-%{version} +%autosetup -p1 -n notebook-%{version} # unpin nbclassic (see https://github.com/jupyter/notebook/pull/6593) sed -i 's/nbclassic==/nbclassic>=/' setup.py From 6aa56730475c4f0d838c7b69e60ea36d72ca14e19e890d5c56395effda5a0c03 Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Thu, 27 Oct 2022 15:22:21 +0000 Subject: [PATCH 2/2] - Add notebook-pr6578+pr6580-404errors.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-notebook?expand=0&rev=52 --- python-notebook.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-notebook.changes b/python-notebook.changes index a3c1b52..2452445 100644 --- a/python-notebook.changes +++ b/python-notebook.changes @@ -1,7 +1,7 @@ ------------------------------------------------------------------- Thu Oct 27 15:11:59 UTC 2022 - Ben Greiner -- Add notebook-pr6580+pr6578-404errors.patch +- Add notebook-pr6578+pr6580-404errors.patch * fix 404 errors at startup * gh#jupyter/notebook#6580 -- custom preload * gh#jupyter/notebook#6578 -- jquery from nbclassic