[packages/apache-mod_clamav] - added clamav patch (fix build with clamav 0.101); release 3
qboosh
qboosh at pld-linux.org
Tue Dec 11 21:17:38 CET 2018
commit 971c2e7bc83c5555d5b2abe9cdf5e6b558eca779
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Tue Dec 11 21:22:01 2018 +0100
- added clamav patch (fix build with clamav 0.101); release 3
apache-mod_clamav-clamav.patch | 19 +++++++++++++++++++
apache-mod_clamav.spec | 16 +++++++++-------
2 files changed, 28 insertions(+), 7 deletions(-)
---
diff --git a/apache-mod_clamav.spec b/apache-mod_clamav.spec
index 13ecec8..3da784a 100644
--- a/apache-mod_clamav.spec
+++ b/apache-mod_clamav.spec
@@ -4,21 +4,23 @@ Summary: An Apache virus scanning filter
Summary(pl.UTF-8): Filtr skanera antywirusowego dla Apache'a
Name: apache-mod_%{mod_name}
Version: 0.23
-Release: 2
-License: GPL
+Release: 3
+License: GPL v2
Group: Networking/Daemons/HTTP
Source0: http://software.othello.ch/mod_clamav/mod_%{mod_name}-%{version}.tar.gz
# Source0-md5: 32c7b285dfdff5d13371b92ebe73b352
Source1: %{name}.conf
+Patch0: %{name}-clamav.patch
URL: http://software.othello.ch/mod_clamav/
BuildRequires: %{apxs}
BuildRequires: apache-devel >= 2.0
BuildRequires: apr-devel >= 1:1.0
BuildRequires: apr-util-devel >= 1:1.0
-BuildRequires: autoconf
+BuildRequires: autoconf >= 2.12
BuildRequires: automake
BuildRequires: clamav-devel
BuildRequires: libtool
+BuildRequires: pkgconfig
BuildRequires: rpmbuild(macros) >= 1.268
Requires: apache(modules-api) = %apache_modules_api
Requires: apache-mod_proxy
@@ -40,14 +42,14 @@ skanera antywirusowego Clamav.
%prep
%setup -q -n mod_%{mod_name}-%{version}
+%patch0 -p1
%build
%{__libtoolize}
%{__aclocal}
%{__autoconf}
%{__automake}
-
-CPPFLAGS="-I `/usr/bin/apr-1-config --includedir` -I `/usr/bin/apu-1-config --includedir`"
+CPPFLAGS="-I$(/usr/bin/apr-1-config --includedir) -I$(/usr/bin/apu-1-config --includedir) $(pkg-config --cflags libclamav)"
%configure \
--with-apxs=%{apxs}
%{__make}
@@ -73,5 +75,5 @@ fi
%files
%defattr(644,root,root,755)
%doc AUTHORS ChangeLog mod_clamav.html NEWS README TODO
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf
-%attr(755,root,root) %{_pkglibdir}/*.so
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_clamav.conf
+%attr(755,root,root) %{_pkglibdir}/mod_clamav.so
diff --git a/apache-mod_clamav-clamav.patch b/apache-mod_clamav-clamav.patch
new file mode 100644
index 0000000..5dce293
--- /dev/null
+++ b/apache-mod_clamav-clamav.patch
@@ -0,0 +1,19 @@
+--- mod_clamav-0.23/filter.c.orig 2009-04-11 01:32:37.000000000 +0200
++++ mod_clamav-0.23/filter.c 2018-12-11 21:11:10.654402097 +0100
+@@ -142,8 +142,16 @@
+ switch (rec->mode) {
+ case MOD_CLAMAV_LOCAL:
+ /* virus scan using local clamav library */
++#ifdef CL_SCAN_ARCHIVE
+ return cl_scanfile(ctx->filename, virname, (unsigned long *)len,
+ rec->common->local->engine, CL_SCAN_ARCHIVE);
++#else
++ {
++ struct cl_scan_options scanoptions = {0, CL_SCAN_PARSE_ARCHIVE, 0, 0, 0};
++ return cl_scanfile(ctx->filename, virname, (unsigned long *)len,
++ rec->common->local->engine, &scanoptions);
++ }
++#endif
+ break;
+ case MOD_CLAMAV_DAEMON:
+ /* set reasonable defaults for virname */
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/apache-mod_clamav.git/commitdiff/971c2e7bc83c5555d5b2abe9cdf5e6b558eca779
More information about the pld-cvs-commit
mailing list