diff options
Diffstat (limited to '')
-rw-r--r-- | debian/patches/0004-Use-packaged-JS-and-CSS-resources-instead-of-pulling.patch | 63 | ||||
-rw-r--r-- | debian/patches/09_idl2wrs.patch | 55 | ||||
-rw-r--r-- | debian/patches/series | 2 |
3 files changed, 120 insertions, 0 deletions
diff --git a/debian/patches/0004-Use-packaged-JS-and-CSS-resources-instead-of-pulling.patch b/debian/patches/0004-Use-packaged-JS-and-CSS-resources-instead-of-pulling.patch new file mode 100644 index 00000000..e8d4e45f --- /dev/null +++ b/debian/patches/0004-Use-packaged-JS-and-CSS-resources-instead-of-pulling.patch @@ -0,0 +1,63 @@ +From: Uli Heilmeier <uh@heilmeier.eu> +Date: Wed, 6 Dec 2023 10:36:55 +0100 +Subject: Use packaged JS and CSS resources instead of downloading them + https://gitlab.com/wireshark/wireshark/-/issues/19013#note_1682959548 + +--- + ipmap.html | 20 +++++--------------- + 1 file changed, 5 insertions(+), 15 deletions(-) + +--- a/resources/share/wireshark/ipmap.html ++++ b/resources/share/wireshark/ipmap.html +@@ -2,15 +2,9 @@ + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0"> + <title>Wireshark: IP Location Map</title> +-<link rel="stylesheet" href="https://unpkg.com/leaflet@1.4.0/dist/leaflet.css" +- integrity="sha512-puBpdR0798OZvTTbP4A8Ix/l+A4dHDD0DGqYW6RQ+9jxkRFclaxxQb/SJAWZfWAkuyeQUytO7+7N4QKrDh+drA==" +- crossorigin=""> +-<link rel="stylesheet" href="https://unpkg.com/leaflet.markercluster@1.4.1/dist/MarkerCluster.Default.css" +- integrity="sha512-BBToHPBStgMiw0lD4AtkRIZmdndhB6aQbXpX7omcrXeG2PauGBl2lzq2xUZTxaLxYz5IDHlmneCZ1IJ+P3kYtQ==" +- crossorigin=""> +-<link rel="stylesheet" href="https://unpkg.com/leaflet.markercluster@1.4.1/dist/MarkerCluster.css" +- integrity="sha512-RLEjtaFGdC4iQMJDbMzim/dOvAu+8Qp9sw7QE4wIMYcg2goVoivzwgSZq9CsIxp4xKAZPKh5J2f2lOko2Ze6FQ==" +- crossorigin=""> ++<link rel="stylesheet" href="file:///usr/share/javascript/leaflet/leaflet.css"> ++<link rel="stylesheet" href="file:///usr/share/javascript/leaflet/MarkerCluster.Default.css"> ++<link rel="stylesheet" href="file:///usr/share/javascript/leaflet/MarkerCluster.css"> + <!-- + <link rel="stylesheet" href="https://unpkg.com/leaflet-measure@3.1.0/dist/leaflet-measure.css" + integrity="sha512-wgiKVjb46JxgnGNL6xagIy2+vpqLQmmHH7fWD/BnPzouddSmbRTf6xatWIRbH2Rgr2F+tLtCZKbxnhm5Xz0BcA==" +@@ -43,12 +37,14 @@ + .range-control-input { padding: 0; width: 130px; } + .range-control-input, .range-control-label { vertical-align: middle; } + </style> +-<script src="https://unpkg.com/leaflet@1.4.0/dist/leaflet.js" +- integrity="sha512-QVftwZFqvtRNi0ZyCtsznlKSWOStnDORoefr1enyq5mVL4tmKB3S/EnC3rRJcxCPavG10IcrVGSmPh6Qw5lwrg==" +- crossorigin=""></script> +-<script src="https://unpkg.com/leaflet.markercluster@1.4.1/dist/leaflet.markercluster.js" +- integrity="sha512-MQlyPV+ol2lp4KodaU/Xmrn+txc1TP15pOBF/2Sfre7MRsA/pB4Vy58bEqe9u7a7DczMLtU5wT8n7OblJepKbg==" +- crossorigin=""></script> ++<script> ++var failedLoad=false; ++function loadError() { ++ failedLoad = true; ++ } ++</script> ++<script src="file:///usr/share/javascript/leaflet/leaflet.js" onerror=loadError()></script> ++<script src="file:///usr/share/javascript/leaflet/leaflet.markercluster.js" onerror=loadError()></script> + <!-- + <script src="https://unpkg.com/leaflet-measure@3.1.0/dist/leaflet-measure.js" + integrity="sha512-ovh6EqS7MUI3QjLWBM7CY8Gu8cSM5x6vQofUMwKGbHVDPSAS2lmNv6Wq5es5WCz1muyojQxcc8rA3CvVjD2Z+A==" +@@ -372,6 +368,11 @@ + <input type="file" id="file-picker" accept=".json,.html"></label> + <p id="error-message"></p> + </div> ++<script> ++ if (failedLoad) { ++ showError("Failed to load leaflet. Please install packages libjs-leaflet and libjs-leaflet.markercluster."); ++ } ++</script> + <div id="map"></div> + <!-- + Wireshark will append a script tag (id="ipmap-data" type="application/json") diff --git a/debian/patches/09_idl2wrs.patch b/debian/patches/09_idl2wrs.patch new file mode 100644 index 00000000..58378032 --- /dev/null +++ b/debian/patches/09_idl2wrs.patch @@ -0,0 +1,55 @@ +From: Frederic Peters <fpeters@debian.org> +Date: Sun, 22 Dec 2019 00:18:56 +0100 +Subject: Do not try to locate wireshark_be.py and wireshark_gen.py in + +non-standard places. +--- + tools/idl2wrs | 33 --------------------------------- + 1 file changed, 33 deletions(-) + +diff --git a/tools/idl2wrs b/tools/idl2wrs +index 7a51f4b..134a256 100755 +--- a/tools/idl2wrs ++++ b/tools/idl2wrs +@@ -65,41 +65,8 @@ if [ $count -gt 1 ] ; then + exit 1; + fi + +-# +-# Run wireshark backend, looking for wireshark_be.py and wireshark_gen.py +-# in pythons's "site-packages" directory. If cannot find that, then +-# try looking in current directory. If still cannot, then exit with +-# error. +- +-if [ -f $PYTHONPATH/site-packages/wireshark_be.py ] && [ -f $PYTHONPATH/site-packages/wireshark_gen.py ]; then +- exec omniidl -p $PYTHONPATH/site-packages -b wireshark_be $@ +- /* not reached */ +-fi +- +-# Try current directory. +- +-if [ -f ./wireshark_be.py ] && [ -f ./wireshark_gen.py ]; then +- exec omniidl -p ./ -b wireshark_be $@ +- /* not reached */ +-fi +- +-# Could not find both wireshark_be.py AND wireshark_gen.py +-# So let's just try to run it without -p, hoping that the installation +-# set up a valid path. +- + exec omniidl -b wireshark_be $@ + +-old code: not reached +- +-echo "idl2wrs Error: Could not find both wireshark_be.py AND wireshark_gen.py." +-echo "Please ensure you have the PYTHONPATH variable set, or that wireshark_be.py " +-echo "and wireshark_gen.py exist in the current directory. " +-echo +-echo "On this system, PYTHONPATH is : $PYTHONPATH" +-echo +- +-exit 2 +- + + # + # Editor modelines - https://www.wireshark.org/tools/modelines.html diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 00000000..162876e7 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,2 @@ +09_idl2wrs.patch +0004-Use-packaged-JS-and-CSS-resources-instead-of-pulling.patch |