Package: release.debian.org
User: release.debian....@packages.debian.org
Usertags: pu
Tags: stretch
Severity: normal

Please find attached the proposed update to python-clamav for Stretch as
part of the clamav transition, #924278.

Sebastian
diff -Nru python-clamav-0.4.1/debian/changelog 
python-clamav-0.4.1/debian/changelog
--- python-clamav-0.4.1/debian/changelog        2016-02-06 01:27:01.000000000 
+0100
+++ python-clamav-0.4.1/debian/changelog        2019-03-10 20:49:14.000000000 
+0100
@@ -1,3 +1,12 @@
+python-clamav (0.4.1-8+deb9u1) stretch; urgency=medium
+
+  [ Scott Kitterman ]
+  * Add d/p/python-clamav-add-support-for-clamav-0.101.0.patch to that
+    python-clamav builds/works with clamav 101.1 and newer (Closes: #920959)
+  * Bump libclamav-dev build-depends to match
+
+ -- Sebastian Andrzej Siewior <sebast...@breakpoint.cc>  Sun, 10 Mar 2019 
20:49:14 +0100
+
 python-clamav (0.4.1-8) unstable; urgency=medium
 
   [ Jakub Wilk ]
diff -Nru python-clamav-0.4.1/debian/control python-clamav-0.4.1/debian/control
--- python-clamav-0.4.1/debian/control  2016-02-05 08:03:06.000000000 +0100
+++ python-clamav-0.4.1/debian/control  2019-03-10 20:49:14.000000000 +0100
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Debian Python Modules Team 
<python-modules-t...@lists.alioth.debian.org>
 Uploaders: Scott Kitterman <sc...@kitterman.com>
-Build-Depends: debhelper (>= 9), libclamav-dev (>= 0.95), python-all-dev (>= 
2.6.5-2~), dh-python
+Build-Depends: debhelper (>= 9), libclamav-dev (>= 0.101.1), python-all-dev 
(>= 2.6.5-2~), dh-python
 X-Python-Version: >= 2.3
 Standards-Version: 3.9.7
 Homepage: http://xael.org/pages/projects.html
diff -Nru 
python-clamav-0.4.1/debian/patches/python-clamav-add-support-for-clamav-0.101.0.patch
 
python-clamav-0.4.1/debian/patches/python-clamav-add-support-for-clamav-0.101.0.patch
--- 
python-clamav-0.4.1/debian/patches/python-clamav-add-support-for-clamav-0.101.0.patch
       1970-01-01 01:00:00.000000000 +0100
+++ 
python-clamav-0.4.1/debian/patches/python-clamav-add-support-for-clamav-0.101.0.patch
       2019-03-10 20:49:14.000000000 +0100
@@ -0,0 +1,40 @@
+From: Sebastian Andrzej Siewior <sebast...@breakpoint.cc>
+Date: Wed, 30 Jan 2019 23:22:55 +0100
+Subject: [PATCH] python-clamav: add support for clamav 0.101.0
+
+CL_SCAN_GENERAL_ALLMATCHES with all parses should do what CL_SCAN_STDOPT
+did.
+
+Signed-off-by: Sebastian Andrzej Siewior <sebast...@breakpoint.cc>
+---
+ pyclamav.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/pyclamav.c b/pyclamav.c
+index 7ccd57239b97..0315c62ea81a 100644
+--- a/pyclamav.c
++++ b/pyclamav.c
+@@ -191,6 +191,7 @@ static PyObject *pyclamav_scanfile(PyObject *self, 
PyObject *args)
+   char *file_to_scan;
+   unsigned long int size = 0;
+   const char *virname;
++  struct cl_scan_options scan_options;
+   int ret = 0;
+ 
+   /* Raise exception if database error */
+@@ -209,8 +210,11 @@ static PyObject *pyclamav_scanfile(PyObject *self, 
PyObject *args)
+     PyErr_SetString(PyExc_ValueError,  "Argument is not a filename");
+     return NULL;     
+   }
++  memset(&scan_options, 0, sizeof(scan_options));
++  scan_options.general = CL_SCAN_GENERAL_ALLMATCHES;
++  scan_options.parse = ~0;
+ 
+-  ret = cl_scanfile(file_to_scan, &virname, &size, engine, CL_SCAN_STDOPT);
++  ret = cl_scanfile(file_to_scan, &virname, &size, engine, &scan_options);
+ 
+   /* Test return code */
+   switch (ret) {
+-- 
+2.11.0
+
diff -Nru python-clamav-0.4.1/debian/patches/series 
python-clamav-0.4.1/debian/patches/series
--- python-clamav-0.4.1/debian/patches/series   2016-02-05 07:39:16.000000000 
+0100
+++ python-clamav-0.4.1/debian/patches/series   2019-03-10 20:49:14.000000000 
+0100
@@ -1 +1,2 @@
 clamav-095-compat.patch
+python-clamav-add-support-for-clamav-0.101.0.patch

Reply via email to