Control: tags 938671 + patch
Control: tags 938671 + pending

Dear maintainer,

I've prepared an NMU for tlsh (versioned as 3.4.4+20151206-1.2) and
uploaded it to DELAYED/7. Please feel free to tell me if I
should delay it longer.

Regards.

diff -Nru tlsh-3.4.4+20151206/debian/changelog tlsh-3.4.4+20151206/debian/changelog
--- tlsh-3.4.4+20151206/debian/changelog	2019-01-06 09:56:51.000000000 -0500
+++ tlsh-3.4.4+20151206/debian/changelog	2019-10-17 17:41:52.000000000 -0400
@@ -1,3 +1,10 @@
+tlsh (3.4.4+20151206-1.2) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Drop python2 support; Closes: #938671
+
+ -- Sandro Tosi <[email protected]>  Thu, 17 Oct 2019 17:41:52 -0400
+
 tlsh (3.4.4+20151206-1.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru tlsh-3.4.4+20151206/debian/control tlsh-3.4.4+20151206/debian/control
--- tlsh-3.4.4+20151206/debian/control	2019-01-06 09:53:50.000000000 -0500
+++ tlsh-3.4.4+20151206/debian/control	2019-10-17 17:40:12.000000000 -0400
@@ -5,12 +5,10 @@
 Build-Depends: cmake,
                debhelper (>= 9),
                dh-python,
-               libpython-all-dev,
                libpython3-all-dev,
-               python-all-dev:any,
                python3-all-dev:any,
-               python-docutils,
-               python-setuptools
+               python3-docutils,
+               python3-setuptools
 Rules-Requires-Root: no
 Standards-Version: 3.9.6
 Homepage: https://github.com/trendmicro/tlsh
@@ -61,20 +59,6 @@
  .
  This package contains the development headers and the static library.
 
-Package: python-tlsh
-Section: python
-Architecture: any
-Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends}
-Description: fuzzy hashing library - Python module
- The Trend Micro Locality Sensitive Hash is a fuzzy hash algorithm that can be
- used to compare similar but not identical files.
- .
- Identifying near duplicates and similar files is known to be useful to
- identify malware samples with similar binary file structure, variants of spam
- email, or backups with corrupted files.
- .
- This package contains the Python module.
-
 Package: python3-tlsh
 Section: python
 Architecture: any
diff -Nru tlsh-3.4.4+20151206/debian/rules tlsh-3.4.4+20151206/debian/rules
--- tlsh-3.4.4+20151206/debian/rules	2016-01-16 08:47:10.000000000 -0500
+++ tlsh-3.4.4+20151206/debian/rules	2019-10-17 17:40:33.000000000 -0400
@@ -3,7 +3,7 @@
 export PYBUILD_NAME = tlsh
 
 %:
-	dh $@ --with=python2,python3 --buildsystem=cmake
+	dh $@ --with=python3 --buildsystem=cmake
 
 override_dh_auto_build:
 	dh_auto_build --buildsystem=cmake
@@ -13,9 +13,6 @@
 	dh_auto_install --buildsystem=cmake
 	dh_auto_install --sourcedirectory=py_ext --buildsystem=pybuild
 
-override_dh_python2:
-	dh_python2 -O--sourcedirectory=py_ext -O--buildsystem=pybuild
-
 override_dh_python3:
 	dh_python3 -O--sourcedirectory=py_ext -O--buildsystem=pybuild
 
diff -Nru tlsh-3.4.4+20151206/debian/tests/control tlsh-3.4.4+20151206/debian/tests/control
--- tlsh-3.4.4+20151206/debian/tests/control	2016-01-16 08:47:10.000000000 -0500
+++ tlsh-3.4.4+20151206/debian/tests/control	2019-10-17 17:40:51.000000000 -0400
@@ -1,9 +1,6 @@
 Tests: use-tlsh-unittest
 Depends: tlsh-tools
 
-Tests: use-python-tlsh
-Depends: python-tlsh
-
 Tests: use-python3-tlsh
 Depends: python3-tlsh
 
diff -Nru tlsh-3.4.4+20151206/debian/tests/use-python-tlsh tlsh-3.4.4+20151206/debian/tests/use-python-tlsh
--- tlsh-3.4.4+20151206/debian/tests/use-python-tlsh	2015-12-14 09:04:58.000000000 -0500
+++ tlsh-3.4.4+20151206/debian/tests/use-python-tlsh	1969-12-31 19:00:00.000000000 -0500
@@ -1,36 +0,0 @@
-#!/usr/bin/python
-
-from __future__ import print_function
-
-import sys
-import tlsh
-
-def compute_hash(path):
-    h = tlsh.Tlsh()
-    with open(path, 'rb') as f:
-        for buf in iter(lambda: f.read(512), b''):
-            h.update(buf)
-    h.final()
-    return h
-
-def compare_files(left_path, right_path):
-    left_hash = compute_hash(left_path)
-    right_hash = compute_hash(right_path)
-    return left_hash.diff(right_hash)
-
-def main():
-    score = compare_files('debian/tests/data/file1', 'debian/tests/data/file1')
-    print('Identical:', score)
-    if score != 0:
-        raise Exception('Should be identical')
-    score = compare_files('debian/tests/data/file1', 'debian/tests/data/file2')
-    print('Similar:', score)
-    if score >= 40:
-        raise Exception('Should be similar')
-    score = compare_files('debian/tests/data/file1', 'debian/tests/data/quick')
-    print('Different:', score)
-    if score <= 300:
-        raise Exception('Should be different')
-
-if __name__ == '__main__':
-    main()

Reply via email to