Package: release.debian.org Severity: normal X-Debbugs-Cc: [email protected] Control: affects -1 + src:jupyterlab User: [email protected] Usertags: unblock
Please unblock package jupyterlab I prepare a working version of jupyterlab. [ Reason ] The -6 version is not working at all due to an issue in the packaging, which was fixed by Jeremy-lal #1102558 I also fixed a few remaining issue, wchih prevented jupyterlab from being well integrated. I switch to the upstream build system, instead of the Debian home made setuptools conf. This way all expected files are installed. [ Impact ] A non working jupyterlab. 5when starting the application the browser present a blanck screen due to #1102558. [ Tests ] I installed this version in our institut synchrotron-soleil, and I can confirme thaht it works. To test you can install jupyterlab and run this command jupyter-lab it should open a browser and present a working jupyter lab application. [ Risks ] not a great risque, since the current version is non focntionnal. [ Checklist ] [X] all changes are documented in the d/changelog [X] I reviewed all changes and I approve them [X] attach debdiff against the package in testing [ Other info ] Sorry I updated the patches series with gbp-pq and it seems that it changed one patch metadata. unblock jupyterlab/4.0.11+ds1+~cs11.25.27-7
diff -Nru jupyterlab-4.0.11+ds1+~cs11.25.27/debian/changelog jupyterlab-4.0.11+ds1+~cs11.25.27/debian/changelog --- jupyterlab-4.0.11+ds1+~cs11.25.27/debian/changelog 2025-04-02 18:46:10.000000000 +0200 +++ jupyterlab-4.0.11+ds1+~cs11.25.27/debian/changelog 2025-06-05 14:45:20.000000000 +0200 @@ -1,3 +1,25 @@ +jupyterlab (4.0.11+ds1+~cs11.25.27-7) unstable; urgency=medium + + * Team upload + [ Jérémy Lal ] + * Fix build of bundled browser module (Closes: #1102558). + Adds a webpack plugin to support modules prefixed by "node:". + + [ Picca Frédéric-Emmanuel ] + * switch to the upstream (hatchling) build system. + - now jupyterlab is well integrated with jupyterhub + - do not install examples at the wrong place. + - the Python dist-info are right. + * Bug fix: "missing four files from upstream distribution", thanks to + Julian Gilbey (Closes: #1101429). + * Bug fix: "advertises Python package version as 0.0.0", thanks to + Julian Gilbey (Closes: #1086709). + * Bug fix: "installs examples into dist-packages", thanks to Piotr + Ożarowski (Closes: #1102934). + * d/control: B-D on webpack (>= 5.97.1+dfsg1+~cs11.18.27-3~) + + -- Picca Frédéric-Emmanuel <[email protected]> Thu, 05 Jun 2025 14:45:20 +0200 + jupyterlab (4.0.11+ds1+~cs11.25.27-6) unstable; urgency=medium * Declare compliance with policy 4.7.2 diff -Nru jupyterlab-4.0.11+ds1+~cs11.25.27/debian/clean jupyterlab-4.0.11+ds1+~cs11.25.27/debian/clean --- jupyterlab-4.0.11+ds1+~cs11.25.27/debian/clean 2025-04-02 18:46:10.000000000 +0200 +++ jupyterlab-4.0.11+ds1+~cs11.25.27/debian/clean 1970-01-01 01:00:00.000000000 +0100 @@ -1,29 +0,0 @@ -.pybuild/ -builder/lib/ -buildutils/lib/ -buildutils/*/lib/ -dev_mode/schemas/ -dev_mode/static/ -dev_mode/themes/ -duplicate-package-checker-webpack-plugin/lib/ -galata/extension/lib/ -galata/lib/ -jupyter-ydoc/javascript/lib/ - -jupyterlab/galata/@jupyterlab/ -jupyterlab/schemas/ -jupyterlab/staging/build/ -jupyterlab/static/ -jupyterlab/style.js -jupyterlab/themes/ - - -packages/nbconvert-css/style/ -packages/*/lib/ -packages/*/tsconfig.tsbuildinfo - -node_modules/ -*/node_modules/ -*/*/node_modules/ -*/tsconfig.tsbuildinfo -*/*/tsconfig.tsbuildinfo diff -Nru jupyterlab-4.0.11+ds1+~cs11.25.27/debian/control jupyterlab-4.0.11+ds1+~cs11.25.27/debian/control --- jupyterlab-4.0.11+ds1+~cs11.25.27/debian/control 2025-04-02 18:46:10.000000000 +0200 +++ jupyterlab-4.0.11+ds1+~cs11.25.27/debian/control 2025-06-05 14:45:20.000000000 +0200 @@ -7,7 +7,7 @@ Testsuite: autopkgtest-pkg-nodejs Build-Depends: debhelper-compat (= 13) , dh-nodejs (>= 0.15.22~) - , dh-python (>= 2.20160609~) + , dh-sequence-python3 , node-ajv (>= 8) , node-babel7 , node-codemirror-autocomplete @@ -110,6 +110,7 @@ , node-y-codemirror , node-y-protocols , node-yjs + , pybuild-plugin-pyproject , python3-all , python3-async-lru , python3-hatch-jupyter-builder @@ -117,8 +118,7 @@ , python3-jupyterlab-server , python3-notebook , python3-notebook-shim - , python3-setuptools - , webpack + , webpack (>= 5.97.1+dfsg1+~cs11.18.27-3~) , yarnpkg Standards-Version: 4.7.2 Homepage: https://github.com/jupyterlab/jupyterlab diff -Nru jupyterlab-4.0.11+ds1+~cs11.25.27/debian/patches/0001-setuptools-list-packages-to-build.patch jupyterlab-4.0.11+ds1+~cs11.25.27/debian/patches/0001-setuptools-list-packages-to-build.patch --- jupyterlab-4.0.11+ds1+~cs11.25.27/debian/patches/0001-setuptools-list-packages-to-build.patch 2025-04-02 18:46:10.000000000 +0200 +++ jupyterlab-4.0.11+ds1+~cs11.25.27/debian/patches/0001-setuptools-list-packages-to-build.patch 1970-01-01 01:00:00.000000000 +0100 @@ -1,24 +0,0 @@ -From: Roland Mas <[email protected]> -Date: Wed, 25 Oct 2023 08:01:12 +0200 -Subject: setuptools: list packages to build - ---- - pyproject.toml | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/pyproject.toml b/pyproject.toml -index 59c4b56..5862575 100644 ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -308,3 +308,11 @@ ignore = [ - "packages/services/examples/node/main.py" = ["RUF012"] - # T201 `print` found - "scripts/i18n_check.py" = ["T201"] -+ -+#[tool.setuptools] -+#packages = ['jupyterlab'] -+ -+[tool.setuptools.packages.find] -+where = ["."] -+#include = ["pkg*"] # alternatively: `exclude = ["additional*"]` -+#namespaces = false diff -Nru jupyterlab-4.0.11+ds1+~cs11.25.27/debian/patches/fix-build.patch jupyterlab-4.0.11+ds1+~cs11.25.27/debian/patches/fix-build.patch --- jupyterlab-4.0.11+ds1+~cs11.25.27/debian/patches/fix-build.patch 2025-04-02 18:46:10.000000000 +0200 +++ jupyterlab-4.0.11+ds1+~cs11.25.27/debian/patches/fix-build.patch 2025-06-05 14:45:20.000000000 +0200 @@ -9,11 +9,9 @@ dev_mode/webpack.config.js | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) -diff --git a/builder/src/webpack-plugins.ts b/builder/src/webpack-plugins.ts -index 0c97ce0..5d97394 100644 --- a/builder/src/webpack-plugins.ts +++ b/builder/src/webpack-plugins.ts -@@ -242,6 +242,7 @@ export namespace WPPlugin { +@@ -242,6 +242,7 @@ for (const mod of modules) { report.packages.push({ name: mod.name || '', @@ -21,11 +19,9 @@ versionInfo: mod.packageJson.version || '', licenseId: mod.licenseId || '', extractedText: mod.licenseText || '' -diff --git a/dev_mode/webpack.config.js b/dev_mode/webpack.config.js -index 4beb160..70c9ed9 100644 --- a/dev_mode/webpack.config.js +++ b/dev_mode/webpack.config.js -@@ -9,8 +9,8 @@ const Handlebars = require('handlebars'); +@@ -9,8 +9,8 @@ const HtmlWebpackPlugin = require('html-webpack-plugin'); const webpack = require('webpack'); const merge = require('webpack-merge').default; @@ -36,7 +32,20 @@ const baseConfig = require('@jupyterlab/builder/lib/webpack.config.base'); const { ModuleFederationPlugin } = webpack.container; -@@ -272,9 +272,9 @@ const plugins = [ +@@ -243,7 +243,12 @@ + shared[pkg].singleton = true; + } + ++const nodePrefixReg = /^node:/; ++ + const plugins = [ ++ new webpack.NormalModuleReplacementPlugin(nodePrefixReg, res => { ++ res.request = res.request.replace(nodePrefixReg, ''); ++ }), + new WPPlugin.NowatchDuplicatePackageCheckerPlugin({ + verbose: true, + exclude(instance) { +@@ -272,9 +277,9 @@ }) ]; @@ -49,3 +58,18 @@ module.exports = [ merge(baseConfig, { +--- a/jupyterlab/staging/webpack.config.js ++++ b/jupyterlab/staging/webpack.config.js +@@ -242,7 +242,12 @@ + shared[pkg].singleton = true; + } + ++const nodePrefixReg = /^node:/; ++ + const plugins = [ ++ new webpack.NormalModuleReplacementPlugin(nodePrefixReg, res => { ++ res.request = res.request.replace(nodePrefixReg, ''); ++ }), + new WPPlugin.NowatchDuplicatePackageCheckerPlugin({ + verbose: true, + exclude(instance) { diff -Nru jupyterlab-4.0.11+ds1+~cs11.25.27/debian/patches/fix-webpack.patch jupyterlab-4.0.11+ds1+~cs11.25.27/debian/patches/fix-webpack.patch --- jupyterlab-4.0.11+ds1+~cs11.25.27/debian/patches/fix-webpack.patch 2025-04-02 18:46:10.000000000 +0200 +++ jupyterlab-4.0.11+ds1+~cs11.25.27/debian/patches/fix-webpack.patch 1970-01-01 01:00:00.000000000 +0100 @@ -1,30 +0,0 @@ -Description: fix regression in commonjs build -Author: Yadd <[email protected]> -Bug-Debian: https://bugs.debian.org/1101851 -Forwarded: not-needed -Last-Update: 2025-04-02 - ---- a/dev_mode/webpack.prod.minimize.config.js -+++ b/dev_mode/webpack.prod.minimize.config.js -@@ -36,6 +36,9 @@ - }) - ] - }, -+ externals: { -+ 'node:crypto': 'commonjs crypto', -+ }, - plugins: [ - new WPPlugin.JSONLicenseWebpackPlugin({ - excludedPackageTest: packageName => ---- a/jupyterlab/staging/webpack.prod.minimize.config.js -+++ b/jupyterlab/staging/webpack.prod.minimize.config.js -@@ -37,6 +37,9 @@ - }) - ] - }, -+ externals: { -+ 'node:crypto': 'commonjs crypto', -+ }, - plugins: [ - new WPPlugin.JSONLicenseWebpackPlugin({ - excludedPackageTest: packageName => diff -Nru jupyterlab-4.0.11+ds1+~cs11.25.27/debian/patches/reproducible.patch jupyterlab-4.0.11+ds1+~cs11.25.27/debian/patches/reproducible.patch --- jupyterlab-4.0.11+ds1+~cs11.25.27/debian/patches/reproducible.patch 2025-04-02 18:46:10.000000000 +0200 +++ jupyterlab-4.0.11+ds1+~cs11.25.27/debian/patches/reproducible.patch 2025-06-05 14:45:20.000000000 +0200 @@ -44,7 +44,7 @@ "build:prod:minimize": "webpack --config webpack.prod.minimize.config.js", --- a/dev_mode/webpack.config.js +++ b/dev_mode/webpack.config.js -@@ -276,6 +276,7 @@ +@@ -281,6 +281,7 @@ // plugins.push(new BundleAnalyzerPlugin()); //} @@ -52,7 +52,7 @@ module.exports = [ merge(baseConfig, { mode: 'development', -@@ -285,7 +286,7 @@ +@@ -290,7 +291,7 @@ output: { path: path.resolve(buildDir), publicPath: '{{page_config.fullStaticUrl}}/', @@ -113,7 +113,7 @@ "build:prod:minimize": "webpack --config webpack.prod.minimize.config.js", --- a/jupyterlab/staging/webpack.config.js +++ b/jupyterlab/staging/webpack.config.js -@@ -271,6 +271,7 @@ +@@ -276,6 +276,7 @@ }) ]; @@ -121,7 +121,7 @@ module.exports = [ merge(baseConfig, { mode: 'development', -@@ -280,7 +281,7 @@ +@@ -285,7 +286,7 @@ output: { path: path.resolve(buildDir), publicPath: '{{page_config.fullStaticUrl}}/', diff -Nru jupyterlab-4.0.11+ds1+~cs11.25.27/debian/patches/series jupyterlab-4.0.11+ds1+~cs11.25.27/debian/patches/series --- jupyterlab-4.0.11+ds1+~cs11.25.27/debian/patches/series 2025-04-02 18:46:10.000000000 +0200 +++ jupyterlab-4.0.11+ds1+~cs11.25.27/debian/patches/series 2025-06-05 14:45:20.000000000 +0200 @@ -1,4 +1,3 @@ -0001-setuptools-list-packages-to-build.patch 0002-drop-useless-and-unavailable-plugins.patch 0003-Use-system-provided-yarn.js.patch fix-package-list.patch @@ -11,4 +10,3 @@ fix-babel-config.patch reproducible.patch CVE-2024-43805.patch -fix-webpack.patch diff -Nru jupyterlab-4.0.11+ds1+~cs11.25.27/debian/rules jupyterlab-4.0.11+ds1+~cs11.25.27/debian/rules --- jupyterlab-4.0.11+ds1+~cs11.25.27/debian/rules 2025-04-02 18:46:10.000000000 +0200 +++ jupyterlab-4.0.11+ds1+~cs11.25.27/debian/rules 2025-06-05 14:45:20.000000000 +0200 @@ -15,53 +15,56 @@ export NODE_ENV=production %: - dh $@ --with python3 --buildsystem=pybuild + dh $@ -execute_after_dh_auto_configure: +override_dh_auto_configure: dh_auto_configure --buildsystem=nodejs + dh_auto_configure --buildsystem=pybuild -execute_after_dh_auto_build: +override_dh_auto_build: # Replace html-loader preprocessing grep -lr '<%= require(.html-loader'|./debian/html-loader.pl # Update build links ln -s ../../packages/fileeditor-extension node_modules/@jupyterlab/ || true # Build duplicate-package-checker-webpack-plugin cd duplicate-package-checker-webpack-plugin && sh -ex ../debian/nodejs/duplicate-package-checker-webpack-plugin/build + # Build @jupyterlab/* libraries + # activating the next line + # dh_auto_build --buildsystem=nodejs + # produce this error during the build + # dh_auto_build: warning: Max loop command exceed, aborting + # dh_auto_build: warning: Max loop command exceed, aborting + # instead call directly the nodejs build script sh -ex debian/nodejs/build - cd jupyterlab/staging && \ - webpack --config webpack.prod.minimize.config.js -execute_after_dh_auto_install: - # Install Node.js libraries + dh_auto_build --buildsystem=pybuild + +override_dh_auto_install: dh_auto_install --buildsystem=nodejs + dh_auto_install --buildsystem=pybuild + execute_after_dh_install: - mkdir -p $(JUPYTERLAB_DIR) - for i in $(shell py3versions -s) ; do \ - ln -s ../../../python3/dist-packages/jupyterlab/staging \ - ../../../python3/dist-packages/jupyterlab/node-version-check.js \ - debian/jupyterlab/usr/lib/$$i/dist-packages/jupyterlab/ || true; \ - cp -f jupyterlab/staging/yarn.js \ - debian/jupyterlab/usr/lib/$$i/dist-packages/jupyterlab/staging/; \ - done - set -e ; TMPDIR=$$(mktemp -d) ; \ - HOME=$$TMPDIR PYTHONPATH=$(CURDIR)/debian/jupyterlab/usr/lib/python$(PYVERS)/dist-packages/ \ - debian/jupyterlab/usr/bin/jupyter-lab build ; \ - rm -r $$TMPDIR/ - set -e; for i in $(BUILD_EXTENSIONS) ; do \ - echo Building extension $$i ; \ - TMPDIR=$$(mktemp -d) ; \ - HOME=$$TMPDIR \ - PATH=`pwd`/debian/jupyterlab/usr/bin/:$$PATH \ - PYTHONPATH=$(CURDIR)/debian/jupyterlab/usr/lib/python$(PYVERS)/dist-packages/ \ - debian/jupyterlab/usr/bin/jupyter-labextension build $$i ; \ - rm -r $$TMPDIR/ ; \ - done - # Clean temporary files - rm -rf `find debian/jupyterlab -name __pycache__ -o -name node_modules` + # move /usr/etc files into /etc + mv -f debian/jupyterlab/usr/etc debian/jupyterlab/ + + # add the missing .js.map files ??? + cp -f debian/jupyterlab/usr/lib/python3/dist-packages/jupyterlab/staging/build/*.js.map \ + debian/jupyterlab/usr/share/jupyter/lab/static + + # link instead of copy (to save space) + rm -rf /usr/lib/python3/dist-packages/jupyterlab/static + dh_link -p jupyterlab /usr/share/jupyter/lab/static /usr/lib/python3/dist-packages/jupyterlab/static + rm -rf /usr/lib/python3/dist-packages/jupyterlab/schemas + dh_link -p jupyterlab /usr/share/jupyter/lab/schemas /usr/lib/python3/dist-packages/jupyterlab/schemas + rm -rf /usr/lib/python3/dist-packages/jupyterlab/themes + dh_link -p jupyterlab /usr/share/jupyter/lab/themes /usr/lib/python3/dist-packages/jupyterlab/themes + + # remove unwanted files find debian/jupyterlab -name build_log.json -delete rm -rf debian/jupyterlab/usr/lib/python3/dist-packages/jupyterlab/staging/build + rm -rf debian/jupyterlab/usr/lib/python3/dist-packages/jupyterlab/staging/node_modules override_dh_auto_test: @echo "Tests disabled because of missing depends"

