Control: tag -1 + pending
Control: tag -1 + patch

Dear maintainer,

I've prepared an NMU for tulip (versioned as 3.1.0-4.1) and
uploaded it to DELAYED/2. Please feel free to tell me if I
should delay it longer.

I attach the patch that I applied. This is the same as proposed
in [0]. I made some tests in the package and all seems to be good.

[0] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1067598

-- 
cheers,
        Emmanuel Arias

 ⢀⣴⠾⠻⢶⣦⠀
 ⣾⠁⢠⠒⠀⣿⡁  eam...@debian.org
 ⢿⡄⠘⠷⠚⠋⠀  OpenPGP: 13796755BBC72BB8ABE2AEB5 FA9DEC5DE11C63F1                    
 
 ⠈⠳⣄
diff -Nru wfuzz-3.1.0/debian/changelog wfuzz-3.1.0/debian/changelog
--- wfuzz-3.1.0/debian/changelog	2024-01-21 23:55:39.000000000 -0300
+++ wfuzz-3.1.0/debian/changelog	2024-07-15 22:40:19.000000000 -0300
@@ -1,3 +1,12 @@
+wfuzz (3.1.0-4.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Apply patch to remove use of distutils and imp (Closes: #1067598, #1066009).
+    - Remove python3-distutils from build dependency.
+    - Thanks ginggs for patch.
+
+ -- Emmanuel Arias <eam...@debian.org>  Mon, 15 Jul 2024 22:40:19 -0300
+
 wfuzz (3.1.0-4) unstable; urgency=medium
 
   * Team upload
diff -Nru wfuzz-3.1.0/debian/control wfuzz-3.1.0/debian/control
--- wfuzz-3.1.0/debian/control	2024-01-21 23:55:39.000000000 -0300
+++ wfuzz-3.1.0/debian/control	2024-07-15 22:39:54.000000000 -0300
@@ -19,8 +19,7 @@
 
 Package: wfuzz
 Architecture: all
-Depends: python3-distutils,
-         python3-pycurl,
+Depends: python3-pycurl,
          python3-pyparsing,
          ${misc:Depends},
          ${python3:Depends}
diff -Nru wfuzz-3.1.0/debian/patches/python3.12.patch wfuzz-3.1.0/debian/patches/python3.12.patch
--- wfuzz-3.1.0/debian/patches/python3.12.patch	1969-12-31 21:00:00.000000000 -0300
+++ wfuzz-3.1.0/debian/patches/python3.12.patch	2024-07-15 22:39:09.000000000 -0300
@@ -0,0 +1,83 @@
+Description: Avoid the use of distutils and imp
+ No longer available in Python 3.12
+Bug-Debian: https://bugs.debian.org/1066009
+Bug-Debian: https://bugs.debian.org/1067598
+Author: Graham Inggs <gin...@debian.org>
+Last-Update: 2024-03-25
+
+--- a/src/wfuzz/externals/moduleman/loader.py
++++ b/src/wfuzz/externals/moduleman/loader.py
+@@ -1,6 +1,6 @@
+ import inspect
+ import logging
+-import imp
++import importlib
+ import os.path
+ 
+ 
+@@ -52,14 +52,13 @@
+         """
+         self.__logger.debug("__load_py_from_file. START, file=%s" % (filename,))
+ 
+-        dirname, filename = os.path.split(filename)
+-        fn = os.path.splitext(filename)[0]
+-        exten_file = None
++        fn = os.path.splitext(os.path.split(filename)[1])[0]
+         module = None
+ 
+         try:
+-            exten_file, filename, description = imp.find_module(fn, [dirname])
+-            module = imp.load_module(fn, exten_file, filename, description)
++            spec = importlib.util.spec_from_file_location(fn, filename)
++            module = importlib.util.module_from_spec(spec)
++            spec.loader.exec_module(module)
+         except ImportError as msg:
+             self.__logger.critical(
+                 "__load_py_from_file. Filename: %s Exception, msg=%s" % (filename, msg)
+@@ -73,9 +72,6 @@
+             )
+             # raise msg
+             pass
+-        finally:
+-            if exten_file:
+-                exten_file.close()
+ 
+         if module is None:
+             return
+--- a/src/wfuzz/plugin_api/base.py
++++ b/src/wfuzz/plugin_api/base.py
+@@ -10,11 +10,24 @@
+ 
+ import sys
+ import os
+-from distutils import util
+ 
+ # python 2 and 3: iterator
+ from builtins import object
+ 
++def strtobool(val):
++    """Convert a string representation of truth to true (1) or false (0).
++
++    True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values
++    are 'n', 'no', 'f', 'false', 'off', and '0'.  Raises ValueError if
++    'val' is anything else.
++    """
++    val = val.lower()
++    if val in ('y', 'yes', 't', 'true', 'on', '1'):
++        return 1
++    elif val in ('n', 'no', 'f', 'false', 'off', '0'):
++        return 0
++    else:
++        raise ValueError("invalid truth value {!r}".format(val))
+ 
+ # Util methods for accessing search results
+ class BasePlugin:
+@@ -74,7 +87,7 @@
+         )
+ 
+     def _bool(self, value):
+-        return bool(util.strtobool(value))
++        return bool(strtobool(value))
+ 
+ 
+ class BasePrinter:
diff -Nru wfuzz-3.1.0/debian/patches/series wfuzz-3.1.0/debian/patches/series
--- wfuzz-3.1.0/debian/patches/series	2024-01-21 23:55:39.000000000 -0300
+++ wfuzz-3.1.0/debian/patches/series	2024-07-15 22:39:18.000000000 -0300
@@ -3,3 +3,4 @@
 add-sys-path-append
 upgrade-doc-installation.patch
 pr347.patch
+python3.12.patch

Attachment: signature.asc
Description: PGP signature

Reply via email to