[packages/python-pyclamav] - adjusted new-api patch to cover clamav 0.101; release 15
qboosh
qboosh at pld-linux.org
Tue Dec 11 18:18:55 CET 2018
commit d8fde091a725543759f353cfd34377ff674424c7
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Tue Dec 11 18:23:26 2018 +0100
- adjusted new-api patch to cover clamav 0.101; release 15
python-pyclamav-new-api.patch | 19 +++++++++++++++++++
python-pyclamav.spec | 20 +++++++++++---------
2 files changed, 30 insertions(+), 9 deletions(-)
---
diff --git a/python-pyclamav.spec b/python-pyclamav.spec
index eda44da..7f5d886 100644
--- a/python-pyclamav.spec
+++ b/python-pyclamav.spec
@@ -4,20 +4,21 @@ Summary: A Python interface to libclamav
Summary(pl.UTF-8): Interfejs Pythona do libclamav
Name: python-pyclamav
Version: 0.4.1
-Release: 14
-License: GPL
+Release: 15
+License: GPL v2+
Group: Libraries/Python
Source0: http://norman.free.fr/norman/python/pyclamav/pyclamav-%{version}.tar.gz
# Source0-md5: 9e1f29ea118bac87223ff4df3c077556
Patch0: %{name}-new-api.patch
URL: http://xael.org/norman/python/pyclamav/index.html
-BuildRequires: rpmbuild(macros) >= 1.710
-BuildRequires: clamav-devel >= 0:0.95
-BuildRequires: python
+BuildRequires: clamav-devel >= 0.95
+BuildRequires: pkgconfig
+BuildRequires: python >= 1:2.4
BuildRequires: python-devel >= 1:2.4
-BuildRequires: python-modules
+BuildRequires: python-modules >= 1:2.4
BuildRequires: rpm-pythonprov
-Requires: clamav >= 0:0.95
+BuildRequires: rpmbuild(macros) >= 1.714
+Requires: clamav >= 0.95
Requires: python
%pyrequires_eq python-modules
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -33,6 +34,7 @@ Interfejs Pythona do libclamav.
%patch0 -p1
%build
+CFLAGS="%{rpmcflags} $(pkg-config --cflags libclamav)"
%py_build
%install
@@ -49,9 +51,9 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc README.txt CHANGELOG
-%attr(755,root,root) %{py_sitedir}/*.so
+%attr(755,root,root) %{py_sitedir}/pyclamav.so
%dir %{_examplesdir}/%{name}-%{version}
%{_examplesdir}/%{name}-%{version}/example.py
%if "%{py_ver}" > "2.4"
-%{py_sitedir}/*.egg-info
+%{py_sitedir}/pyclamav-%{version}-py*.egg-info
%endif
diff --git a/python-pyclamav-new-api.patch b/python-pyclamav-new-api.patch
index 1cf77e1..1b7b11c 100644
--- a/python-pyclamav-new-api.patch
+++ b/python-pyclamav-new-api.patch
@@ -124,3 +124,22 @@
}
+--- pyclamav-0.4.1/pyclamav.c.orig 2018-12-10 21:43:22.642033238 +0100
++++ pyclamav-0.4.1/pyclamav.c 2018-12-11 17:39:55.224546828 +0100
+@@ -210,7 +210,16 @@
+ return NULL;
+ }
+
++#ifdef CL_SCAN_STDOPT
+ ret = cl_scanfile(file_to_scan, &virname, &size, engine, CL_SCAN_STDOPT);
++#else
++ {
++ struct cl_scan_options scanoptions = {CL_SCAN_GENERAL_HEURISTICS,
++ CL_SCAN_PARSE_ARCHIVE|CL_SCAN_PARSE_ELF|CL_SCAN_PARSE_PDF|CL_SCAN_PARSE_SWF|CL_SCAN_PARSE_HWP3|CL_SCAN_PARSE_XMLDOCS|CL_SCAN_PARSE_MAIL|CL_SCAN_PARSE_OLE2|CL_SCAN_PARSE_HTML|CL_SCAN_PARSE_PE,
++ 0,0,0};
++ ret = cl_scanfile(file_to_scan, &virname, &size, engine, &scanoptions);
++ }
++#endif
+
+ /* Test return code */
+ switch (ret) {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-pyclamav.git/commitdiff/d8fde091a725543759f353cfd34377ff674424c7
More information about the pld-cvs-commit
mailing list