Patch attached for completeness.  I assume this won't be ported to python3, so 
this is irrelevant, but if it is, this needs to be done too.

Scott K

Note: Despite the NMU style debian/changelog, I do not intend to NMU this 
package.
diff -Nru bley-2.0.0/debian/changelog bley-2.0.0/debian/changelog
--- bley-2.0.0/debian/changelog	2015-01-09 02:11:09.000000000 -0500
+++ bley-2.0.0/debian/changelog	2020-01-30 19:57:12.000000000 -0500
@@ -1,3 +1,10 @@
+bley (2.0.0-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Port to use publicsuffix2 (Closes: #950290)
+
+ -- Scott Kitterman <sc...@kitterman.com>  Thu, 30 Jan 2020 19:57:12 -0500
+
 bley (2.0.0-2) unstable; urgency=medium
 
   * drop dnsbl.ahbl.org from the config, it was shut down and produces
diff -Nru bley-2.0.0/debian/patches/publicsuffix2_port.patch bley-2.0.0/debian/patches/publicsuffix2_port.patch
--- bley-2.0.0/debian/patches/publicsuffix2_port.patch	1969-12-31 19:00:00.000000000 -0500
+++ bley-2.0.0/debian/patches/publicsuffix2_port.patch	2020-01-30 19:57:12.000000000 -0500
@@ -0,0 +1,47 @@
+Description: Use publicsuffix2
+Author: Scott Kitterman <sc...@kitterman.com>
+Bug-Debian: https://bugs.debian.org/950290
+Origin: vendor
+Forwarded: no
+Last-Update: 2020-01-31
+
+--- bley-2.0.0.orig/bleyhelpers.py
++++ bley-2.0.0/bleyhelpers.py
+@@ -29,9 +29,9 @@ import spf
+ import re
+ import ipaddr
+ try:
+-    import publicsuffix
++    import publicsuffix2
+ except ImportError:
+-    publicsuffix = None
++    publicsuffix2 = None
+ 
+ publicsuffixlist = None
+ 
+@@ -67,11 +67,11 @@ def domain_from_host(host):
+     @return:     the extracted domain
+     '''
+ 
+-    if publicsuffix:
++    if publicsuffix2:
+         global publicsuffixlist
+         if publicsuffixlist is None:
+-            publicsuffixlist = publicsuffix.PublicSuffixList()
+-        domain = publicsuffixlist.get_public_suffix(host)
++            publicsuffixlist = publicsuffix2.PublicSuffixList()
++        domain = publicsuffixlist2.get_public_suffix(host)
+     else:
+         d = host.split('.')
+         if len(d) > 1:
+--- bley-2.0.0.orig/setup.py
++++ bley-2.0.0/setup.py
+@@ -34,7 +34,7 @@ setup(
+     extras_require={
+         'PostgreSQL backend': ['psycopg2'],
+         'MySQL backend': ['MySQL-python'],
+-        'publicsuffix.org support': ['publicsuffix'],
++        'publicsuffix.org support': ['publicsuffix2'],
+     },
+     data_files=[
+         ('/etc/bley', ['bley.conf.example',
diff -Nru bley-2.0.0/debian/patches/series bley-2.0.0/debian/patches/series
--- bley-2.0.0/debian/patches/series	2015-01-09 02:11:09.000000000 -0500
+++ bley-2.0.0/debian/patches/series	2020-01-30 19:57:12.000000000 -0500
@@ -1,2 +1,3 @@
 01-debian_config_and_paths.patch
 drop-dnsbl.ahbl.org-from-the-config.patch
+publicsuffix2_port.patch

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to