Subject: Collected Debian patches for dnsviz
Author: Debian DNS Maintainers <pkg-dns-devel@lists.alioth.debian.org>

The dnsviz package is maintained in Git rather than maintaining
patches as separate files, and separating the patches doesn't seem to
be worth the effort.  They are therefore all included in this single
Debian patch.

For full commit history and separated commits, see the packaging Git
repository.
--- dnsviz-0.8.2.orig/setup.py
+++ dnsviz-0.8.2/setup.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 from __future__ import unicode_literals
 
@@ -20,10 +20,21 @@ else:
     from setuptools.command.install import install
     from setuptools.command.build_py import build_py
 
-JQUERY_UI_PATH = "'http://code.jquery.com/ui/1.11.4/jquery-ui.min.js'"
-JQUERY_UI_CSS_PATH = "'http://code.jquery.com/ui/1.11.4/themes/redmond/jquery-ui.css'"
-JQUERY_PATH = "'http://code.jquery.com/jquery-1.11.3.min.js'"
-RAPHAEL_PATH = "'http://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.4/raphael-min.js'"
+# Requires libjs-jquery-ui
+JQUERY_UI_PATH = \
+    "'file:///usr/share/javascript/jquery-ui/jquery-ui.min.js'"
+
+# Requires libjs-jquery-ui-theme-redmond
+JQUERY_UI_CSS_PATH = \
+    "'file:///usr/share/javascript/jquery-ui-themes/redmond/jquery-ui.css'"
+
+# Requires libjs-jquery
+JQUERY_PATH = \
+    "'file:///usr/share/javascript/jquery/jquery.min.js'"
+
+# Requires libjs-raphael
+RAPHAEL_PATH = \
+    "'file:///usr/share/javascript/raphael/raphael.min.js'"
 
 def apply_substitutions(filename, install_prefix):
     assert filename.endswith('.in'), 'Filename supplied for customization must end with \'.in\': %s' % (filename)
--- dnsviz-0.8.2.orig/bin/dnsviz
+++ dnsviz-0.8.2/bin/dnsviz
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # This file is a part of DNSViz, a tool suite for DNS/DNSSEC monitoring,
 # analysis, and visualization.
--- dnsviz-0.8.2.orig/contrib/digviz
+++ dnsviz-0.8.2/contrib/digviz
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # This file is a part of DNSViz, a tool suite for DNS/DNSSEC monitoring,
 # analysis, and visualization.
--- dnsviz-0.8.2.orig/contrib/dnsviz-lg.cgi
+++ dnsviz-0.8.2/contrib/dnsviz-lg.cgi
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # This file is a part of DNSViz, a tool suite for DNS/DNSSEC monitoring,
 # analysis, and visualization.
--- dnsviz-0.8.2.orig/dnsviz/commands/graph.py
+++ dnsviz-0.8.2/dnsviz/commands/graph.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # This file is a part of DNSViz, a tool suite for DNS/DNSSEC monitoring,
 # analysis, and visualization.
--- dnsviz-0.8.2.orig/dnsviz/commands/grok.py
+++ dnsviz-0.8.2/dnsviz/commands/grok.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # This file is a part of DNSViz, a tool suite for DNS/DNSSEC monitoring,
 # analysis, and visualization.
--- dnsviz-0.8.2.orig/dnsviz/commands/lookingglass.py
+++ dnsviz-0.8.2/dnsviz/commands/lookingglass.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # This file is a part of DNSViz, a tool suite for DNS/DNSSEC monitoring,
 # analysis, and visualization.
--- dnsviz-0.8.2.orig/dnsviz/commands/print.py
+++ dnsviz-0.8.2/dnsviz/commands/print.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # This file is a part of DNSViz, a tool suite for DNS/DNSSEC monitoring,
 # analysis, and visualization.
--- dnsviz-0.8.2.orig/dnsviz/commands/probe.py
+++ dnsviz-0.8.2/dnsviz/commands/probe.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # This file is a part of DNSViz, a tool suite for DNS/DNSSEC monitoring,
 # analysis, and visualization.
--- dnsviz-0.8.2.orig/dnsviz/commands/query.py
+++ dnsviz-0.8.2/dnsviz/commands/query.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # This file is a part of DNSViz, a tool suite for DNS/DNSSEC monitoring,
 # analysis, and visualization.
--- dnsviz-0.8.2.orig/doc/Makefile
+++ dnsviz-0.8.2/doc/Makefile
@@ -20,7 +20,7 @@ ICONWIDTH = 25
 icons: $(ICONPNGFILES)
 
 $(ICONPNGFILES): $(IMGDIR)/%.png: $(SRCDIR)/%.svg
-	$(INKSCAPE) -z -w $(ICONWIDTH) -e $@ $<
+	$(INKSCAPE) --batch-process --export-width=$(ICONWIDTH) --export-filename=$@ $<
 
 # make banner png 220x100 file from logo.svg
 LOGOSVGFILE = $(SRCDIR)/logo.svg
@@ -41,13 +41,13 @@ LOGOFAVICONHEIGHT = 16
 logo: $(LOGOBANNERPNGFILE) $(LOGOICONPNGFILE) $(LOGOFAVICONPNGFILE)
 
 $(LOGOBANNERPNGFILE): $(LOGOSVGFILE)
-	cat $< | sed 's/viewBox="0 0 504 252"/viewBox="$(LOGOBANNERVIEWBOX)"/' | $(INKSCAPE) -z -h $(LOGOBANNERHEIGHT) -e $@ /dev/stdin
+	sed 's/viewBox="0 0 504 252"/viewBox="$(LOGOBANNERVIEWBOX)"/' < $< | $(INKSCAPE) --pipe --batch-process --export-height=$(LOGOBANNERHEIGHT) --export-filename=$@
 
 $(LOGOICONPNGFILE): $(LOGOSVGFILE)
-	cat $< | sed 's/viewBox="0 0 504 252"/viewBox="$(LOGOICONVIEWBOX)"/' | $(INKSCAPE) -z -h $(LOGOICONHEIGHT) -e $@ /dev/stdin
+	sed 's/viewBox="0 0 504 252"/viewBox="$(LOGOICONVIEWBOX)"/' < $< | $(INKSCAPE) --pipe --batch-process --export-height=$(LOGOICONHEIGHT) --export-filename=$@
 
 $(LOGOFAVICONPNGFILE): $(LOGOSVGFILE)
-	cat $< | sed 's/viewBox="0 0 504 252"/viewBox="$(LOGOFAVICONVIEWBOX)"/' | $(INKSCAPE) -z -h $(LOGOFAVICONHEIGHT) -e $@ /dev/stdin
+	sed 's/viewBox="0 0 504 252"/viewBox="$(LOGOFAVICONVIEWBOX)"/' < $< | $(INKSCAPE) --pipe --batch-process --export-height=$(LOGOFAVICONHEIGHT) --export-filename=$@
 
 .PHONY: clean
 
--- /dev/null
+++ dnsviz-0.8.2/dnsviz/config.py
@@ -0,0 +1,38 @@
+#
+# This file is a part of DNSViz, a tool suite for DNS/DNSSEC monitoring,
+# analysis, and visualization.
+# Created by Casey Deccio (casey@deccio.net)
+#
+# Copyright 2014-2016 Verisign, Inc.
+#
+# Copyright 2016-2019 Casey Deccio
+#
+# DNSViz is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# DNSViz is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with DNSViz.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from __future__ import unicode_literals
+
+import os
+import sys
+
+_prefix = ''
+if hasattr(sys, 'real_prefix') and not _prefix:
+    DNSVIZ_INSTALL_PREFIX = sys.prefix
+else:
+    DNSVIZ_INSTALL_PREFIX = _prefix
+DNSVIZ_SHARE_PATH = os.path.join(DNSVIZ_INSTALL_PREFIX, 'share', 'dnsviz')
+JQUERY_PATH = 'file:///usr/share/javascript/jquery/jquery.min.js'
+JQUERY_UI_PATH = 'file:///usr/share/javascript/jquery-ui/jquery-ui.min.js'
+JQUERY_UI_CSS_PATH = 'file:///usr/share/javascript/jquery-ui-themes/redmond/jquery-ui.css'
+RAPHAEL_PATH = 'file:///usr/share/javascript/raphael/raphael.min.js'
