Package: release.debian.org
Severity: normal
User: release.debian....@packages.debian.org
Usertags: unblock

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Please unblock package leaflet-markercluster

[ Reason ]
leaflet-markercluster/1.4.1~dfsg-10 does not work at all for its main
purpose:

JavaScript code can be structured 3 different ways: a) for server-side
Node.js use, or for client-side browser either b) in old-style UMD form
or in new-style ESM form.

Officially upstream, Leaflet and leaflet-markercluster provides only
old-style UMD form, so that form is generally expected from users and
must work for the package to be considered in working shape.

Patches exist to also support new-style ESM form, while still supporting
old-style as well.

Leaflet in Debian includes such patches, and leaflet-markercluster since
1.4.1~dfsg-9 does as well but the patches used turns out to not work as
intended and broke old-style form.

leaflet-markercluster/1.4.1~dfsg-10 has switched to a different patch set
and has been tested to properly work in old-style UMD form.


[ Impact ]
leaflet-markercluster/1.4.1~dfsg-9 now in testing fails to work for the
official use in old-style UMD form.

Concretely within the realm of Debian itself, it seems that this will
affect the package wireshark (but seemingly for an arguably exotic use
requiring custom configuration to enable a Maxmind GeoIP dataset).

[ Tests ]
Tested that the map http://purism.biks.dk/world/staff/ (authored by me)
works.

[ 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

unblock leaflet-markercluster/1.4.1~dfsg-10


-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEn+Ppw2aRpp/1PMaELHwxRsGgASEFAmCBNxkACgkQLHwxRsGg
ASHEig/8CoGI6N58GoheKfhgq1hcorxTiQyYf2MeFEopRnJFWSLMYI4Qkk0j0tn6
dOjft4fYIuD9D2pcpyh1rdO68zAWfgsjRTjBZc+uEvTUig/AM/PZinMc2saWoD+b
IwmLeHt/wRbuPj8r6Q5SGKeJgDI1f3yAKc1R9Y1t85oMAKgA2ztVFpp2m554xKuA
aoXof8obBDmrgCC832SnOvapgNZ/Vll9xiFEeCavyTOKVrYR4m2Bj0X4h58NviJC
2RUIjHAUt8KMqHFGIIIjrqEWU28wUO3cqvGeJkPkpnNIONvfogzLDlnCxQJ9U9q2
beWKBLidpFMDYJ8xMUxZfKxr6z3X0qWsBjhyslX6RdTY5Y8sGKAW1HWNdjeVaTNm
Rzn8K0JTeZygNex71vXp6U3rSLx2qyVNZcROFHGJDam2EiaGcDIUK44s+ysaZkJ9
M/ECvjFudo980GZ3EiUA2glWpVqZymEmCUY80z5+nRntoy9XY6MoDL7TkcIyrLHg
8z35/SnX1sRtOc61Sw2wqxFHRCPA7FxQhLNKiqdH4aTKVonpjPv04fAIT7y7iVvg
SocFCRSzOn3OuQhUDGhWWXSg9kKXj0tgRajR4xSrUTbrlZHufVtgHGnV4rAGkAK1
8dY/b2TQ3RN6mpyJvk2+OQ8cgSTowVlXFLbT3bbGA5Uzb+RrCDU=
=GPQY
-----END PGP SIGNATURE-----
diff -Nru leaflet-markercluster-1.4.1~dfsg/debian/changelog 
leaflet-markercluster-1.4.1~dfsg/debian/changelog
--- leaflet-markercluster-1.4.1~dfsg/debian/changelog   2020-12-02 
22:08:03.000000000 +0100
+++ leaflet-markercluster-1.4.1~dfsg/debian/changelog   2021-04-21 
12:23:19.000000000 +0200
@@ -1,3 +1,13 @@
+leaflet-markercluster (1.4.1~dfsg-10) unstable; urgency=medium
+
+  * add patch cherry-picked from upstream pull request
+    to avoid global L using Rollup plugin inject,
+    and stop use earlier more invasive yet non-working patch;
+    build-depend on node-rollup-plugin-inject;
+    closes: bug#987128
+
+ -- Jonas Smedegaard <d...@jones.dk>  Wed, 21 Apr 2021 12:23:19 +0200
+
 leaflet-markercluster (1.4.1~dfsg-9) unstable; urgency=medium
 
   * use brotli compression suffix .brotli
diff -Nru leaflet-markercluster-1.4.1~dfsg/debian/control 
leaflet-markercluster-1.4.1~dfsg/debian/control
--- leaflet-markercluster-1.4.1~dfsg/debian/control     2020-12-02 
22:07:39.000000000 +0100
+++ leaflet-markercluster-1.4.1~dfsg/debian/control     2021-04-21 
11:46:33.000000000 +0200
@@ -8,6 +8,7 @@
 Build-Depends:
  brotli,
  debhelper-compat (= 12),
+ node-rollup-plugin-inject,
  node-rollup-plugin-json,
  pandoc <!nodoc>,
  pigz,
diff -Nru 
leaflet-markercluster-1.4.1~dfsg/debian/patches/0~020200121~60a6e18.patch 
leaflet-markercluster-1.4.1~dfsg/debian/patches/0~020200121~60a6e18.patch
--- leaflet-markercluster-1.4.1~dfsg/debian/patches/0~020200121~60a6e18.patch   
1970-01-01 01:00:00.000000000 +0100
+++ leaflet-markercluster-1.4.1~dfsg/debian/patches/0~020200121~60a6e18.patch   
2021-04-21 11:46:33.000000000 +0200
@@ -0,0 +1,44 @@
+Description: Do not rely on global L
+Origin: https://github.com/m1gu3l/Leaflet.markercluster/commit/60a6e18
+Bug: https://github.com/Leaflet/Leaflet.markercluster/pull/984
+Author: Michal Przybys <michal.przy...@tomtom.com>
+Last-Update: 2020-01-21
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/build/rollup-config.js
++++ b/build/rollup-config.js
+@@ -1,6 +1,7 @@
+ 
+ // Config file for running Rollup in "normal" mode (non-watch)
+ 
++import inject from '@rollup/plugin-inject';
+ import rollupGitVersion from 'rollup-plugin-git-version'
+ import json from 'rollup-plugin-json'
+ 
+@@ -36,8 +37,14 @@
+               legacy: true, // Needed to create files loadable by IE8
+               name: 'Leaflet.markercluster',
+               sourcemap: true,
++              globals: {
++                      "leaflet": "L"
++              }
+       },
+       plugins: [
+               release ? json() : rollupGitVersion(),
++              inject({
++                      L: "leaflet"
++              })
+       ],
+ };
+--- a/package.json
++++ b/package.json
+@@ -19,7 +19,8 @@
+               "leaflet": "^1.3.1",
+               "mocha": "~1.10.0",
+               "phantomjs-prebuilt": "^2.1.14",
+-              "rollup": "1.3.2",
++              "rollup": "1.29.1",
++              "@rollup/plugin-inject": "^4.0.0",
+               "rollup-plugin-git-version": "0.2.1",
+               "rollup-plugin-json": "3.1.0",
+               "uglify-js": "~2.3.6"
diff -Nru 
leaflet-markercluster-1.4.1~dfsg/debian/patches/0~020200123~9c56a46.patch 
leaflet-markercluster-1.4.1~dfsg/debian/patches/0~020200123~9c56a46.patch
--- leaflet-markercluster-1.4.1~dfsg/debian/patches/0~020200123~9c56a46.patch   
1970-01-01 01:00:00.000000000 +0100
+++ leaflet-markercluster-1.4.1~dfsg/debian/patches/0~020200123~9c56a46.patch   
2021-04-21 11:46:33.000000000 +0200
@@ -0,0 +1,19 @@
+Description: Declare leaflet as external to avoid buildtime warning
+Origin: https://github.com/m1gu3l/Leaflet.markercluster/commit/9c56a46
+Bug: https://github.com/Leaflet/Leaflet.markercluster/pull/984
+Author: Michal Przybys <michal.przy...@tomtom.com>
+Last-Update: 2020-01-23
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/build/rollup-config.js
++++ b/build/rollup-config.js
+@@ -41,6 +41,9 @@
+                       "leaflet": "L"
+               }
+       },
++      external: [
++              "leaflet"
++      ],
+       plugins: [
+               release ? json() : rollupGitVersion(),
+               inject({
diff -Nru 
leaflet-markercluster-1.4.1~dfsg/debian/patches/1001_build_ES_module.patch 
leaflet-markercluster-1.4.1~dfsg/debian/patches/1001_build_ES_module.patch
--- leaflet-markercluster-1.4.1~dfsg/debian/patches/1001_build_ES_module.patch  
2020-06-14 09:55:56.000000000 +0200
+++ leaflet-markercluster-1.4.1~dfsg/debian/patches/1001_build_ES_module.patch  
2021-04-21 11:46:33.000000000 +0200
@@ -6,7 +6,7 @@
 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
 --- a/build/rollup-config.js
 +++ b/build/rollup-config.js
-@@ -29,7 +29,7 @@
+@@ -30,7 +30,7 @@
  
  export default {
        input: 'src/index.js',
@@ -15,9 +15,9 @@
                banner,
                file: 'dist/leaflet.markercluster-src.js',
                format: 'umd',
-@@ -37,6 +37,12 @@
-               name: 'Leaflet.markercluster',
-               sourcemap: true,
+@@ -41,6 +41,12 @@
+                       "leaflet": "L"
+               }
        },
 +      {
 +              banner,
@@ -25,12 +25,12 @@
 +              format: 'es',
 +              sourcemap: true,
 +      }],
-       plugins: [
-               release ? json() : rollupGitVersion(),
+       external: [
+               "leaflet"
        ],
 --- a/package.json
 +++ b/package.json
-@@ -28,6 +28,7 @@
+@@ -29,6 +29,7 @@
                "leaflet": "~1.3.1"
        },
        "main": "dist/leaflet.markercluster-src.js",
diff -Nru leaflet-markercluster-1.4.1~dfsg/debian/patches/2001_avoid_git.patch 
leaflet-markercluster-1.4.1~dfsg/debian/patches/2001_avoid_git.patch
--- leaflet-markercluster-1.4.1~dfsg/debian/patches/2001_avoid_git.patch        
2020-06-14 09:55:56.000000000 +0200
+++ leaflet-markercluster-1.4.1~dfsg/debian/patches/2001_avoid_git.patch        
2021-04-21 11:46:33.000000000 +0200
@@ -7,10 +7,10 @@
 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
 --- a/build/rollup-config.js
 +++ b/build/rollup-config.js
-@@ -1,12 +1,8 @@
- 
+@@ -2,12 +2,8 @@
  // Config file for running Rollup in "normal" mode (non-watch)
  
+ import inject from '@rollup/plugin-inject';
 -import rollupGitVersion from 'rollup-plugin-git-version'
  import json from 'rollup-plugin-json'
  
diff -Nru leaflet-markercluster-1.4.1~dfsg/debian/patches/series 
leaflet-markercluster-1.4.1~dfsg/debian/patches/series
--- leaflet-markercluster-1.4.1~dfsg/debian/patches/series      2020-06-14 
09:55:56.000000000 +0200
+++ leaflet-markercluster-1.4.1~dfsg/debian/patches/series      2021-04-21 
11:46:33.000000000 +0200
@@ -1,5 +1,7 @@
 020190228~d3379c0.patch
-0~20200325~25c8a74.patch
+0~020200121~60a6e18.patch
+0~020200123~9c56a46.patch
+#0~20200325~25c8a74.patch
 1001_build_ES_module.patch
 2001_avoid_git.patch
 2002_privacy.patch

Reply via email to