[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Reducing lintian messages on mod_tile



On Friday, 19 July 2019 10:32:39 IDT Sebastiaan Couwenberg wrote:
> > 0001-Use-libjs-openlayers-to-solve-privacy-preach-lintian.patch
> 
> Instead of requiring javascript-common to expose openlayers via HTTP,
> you can add a symlink to it in usr/share/libapache2-mod-tile and modify
> the HTML to use a relative link. This will make it work without
> javascript-common as well as work locally.
> 
> To fix the privacy-breach-generic it may be better to include a copy of
> OpenStreetMap.js in the package which will need to be updated when it
> changes on osm.org.
> 

Thank you for your review, I thought actually dropping that bit fully  - 
because I do not see any reason why to have an "updated" interface from 
upstream if package is done with a finite version.

I have pasted a patch that does exactly that bellow (as the list now forbid 
attachments).

>From d80cfd345c3552b2e0fb71c0d1f56b020d8beafb Mon Sep 17 00:00:00 2001
From: Boris Shtrasman <boris@example.com>
Date: Sat, 20 Jul 2019 20:34:13 +0300
Subject: [PATCH] Remove load of OpenStreetMap.js, use OpenLayers.js as it
 already provide it. This solve W: libapache2-mod-tile: privacy-breach-generic
 usr/share/libapache2-mod-tile/slippymap.html

---
 debian/changelog                            |  2 ++
 debian/patches/privacy-breach-generic.patch | 17 +++++++++++++++++
 debian/patches/series                       |  1 +
 3 files changed, 20 insertions(+)
 create mode 100644 debian/patches/privacy-breach-generic.patch

diff --git a/debian/changelog b/debian/changelog
index 35e2bbe..a58cc5c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -21,6 +21,8 @@ libapache2-mod-tile (0.4+git20170108-e25bfdb-1) UNRELEASED; 
urgency=medium
   * Update libapache2-mod-tile packaging for 2.4.
   * Add override for web-application-depends-on-apache2-data-package.
   * Don't install site configuration.
+  * Do not load external file for OSM, use libjs-openlayers js file for OSM js
+    class
 
  -- Bas Couwenberg <sebastic@debian.org>  Sun, 14 Jul 2019 13:26:28 +0200
 
diff --git a/debian/patches/privacy-breach-generic.patch b/debian/patches/
privacy-breach-generic.patch
new file mode 100644
index 0000000..ff1415d
--- /dev/null
+++ b/debian/patches/privacy-breach-generic.patch
@@ -0,0 +1,17 @@
+OpenLayers.OSM is alerady included in OpenLayers.js, this fixes the need to 
load another file
+--- a/slippymap.html
++++ b/slippymap.html
+@@ -6,12 +6,7 @@
+          (here we bring it from the remote site, but you could
+          easily serve up this javascript yourself) -->
+     <script src="openlayers/OpenLayers.js"></script>
+- 
+-    <!-- bring in the OpenStreetMap OpenLayers layers.
+-         Using this hosted file will make sure we are kept up
+-         to date with any necessary changes -->
+-    <script src="http://www.openstreetmap.org/openlayers/
OpenStreetMap.js"></script>
+- 
++
+     <script type="text/javascript">
+ // Start position for the map (hardcoded here for simplicity)
+         var lat=47.7;
diff --git a/debian/patches/series b/debian/patches/series
index 0c60eef..f41af0e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ iniparser.patch
 openlayers.patch
 spelling-errors.patch
 manpage-section-mismatch.patch
+privacy-breach-generic.patch
-- 
2.20.1





Reply to: