summarylogtreecommitdiffstats
path: root/commit_f7956b4_partial.patch
diff options
context:
space:
mode:
authorHenry-Joseph Audéoud2021-12-13 10:38:59 +0100
committerHenry-Joseph Audéoud2021-12-13 14:53:31 +0100
commit8e66a412e0bb60c77a1710f5955f9967e0cb9ae9 (patch)
tree8dbf3e7ee997c7915aa3b318002970f3e3250520 /commit_f7956b4_partial.patch
parentecbe0ed2bf1b03c96f8c76d8d9cdcf159f1edf09 (diff)
downloadaur-8e66a412e0bb60c77a1710f5955f9967e0cb9ae9.tar.gz
upgpkg: python-ebtables 0.2.0-2
Split patch in two dedicated subpatches, backport one of them from upstream
Diffstat (limited to 'commit_f7956b4_partial.patch')
-rw-r--r--commit_f7956b4_partial.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/commit_f7956b4_partial.patch b/commit_f7956b4_partial.patch
new file mode 100644
index 000000000000..5aa01ebe40a4
--- /dev/null
+++ b/commit_f7956b4_partial.patch
@@ -0,0 +1,30 @@
+commit f7956b47ac1ffd209bafd8b20ff19bedaa6d0cad
+Author: Gabriele Fariello <gabriele.fariello@gmail.com>
+Date: Fri Mar 1 18:51:23 2019 +0000
+
+ Updated to make python3 compatible
+
+diff --git a/ebtables.py b/ebtables.py
+index e5903d8..eb562e3 100644
+--- a/ebtables.py
++++ b/ebtables.py
+@@ -85,7 +85,8 @@ _verify = """
+ void ebt_early_init_once(void);
+ """
+
+-_hash = hashlib.sha1('\0'.join([_cdef, _verify])).hexdigest()
++# Changed this to be python3 compatible which requires string encoding
++_hash = hashlib.sha1(_cdef.encode('utf-8') + _verify.encode('utf-8')).hexdigest()
+
+ ffi.cdef(_cdef)
+
+@@ -99,7 +100,8 @@ _ebtc = ffi.verify(_verify,
+ _ebtc.ebt_early_init_once()
+
+ _ebtc.ebt_silent = 1
+-_ebtc.ebt_errormsg[0] = '\0'
++# Changed this to be python3 compatible which requires string encoding
++_ebtc.ebt_errormsg[0] = '\0'.encode("ascii")
+
+
+ def _get_errormsg():