[packagers] clamav.spec patch suggestion

Who Knows quien-sabe at metaorg.com
Tue May 2 13:49:11 CEST 2006


I proposed the patch below once before, but perhaps it was overlooked, 
misunderstood or ignored. Regardless I'll submit again.

A FIXME note in the current clamav.spec notes that clamd must run as 
user vscan under amavis, which seems only half correct to me. Yes clamd 
must run as the same user that amavisd runs as which is the amavis user 
by default as created by the current amavis-new.spec/rpm. The only issue 
I see with the current clamd implementation is that when running as 
another user clamd cannot write to the /var/run/clamav directory. My 
solution was to add the amavis user ( or whatever user the amavis/clamd 
daemon pair run as) to the clamav group. Then ensure the /var/run/clamav 
directory has group write priviledges. The current clamav.spec/rpm 
forces me to fix that permmision following every upgrade or install. The 
patch below corrects that situation.

Regards,
Jim

--- svn-rpmforge/rpms/clamav/clamav.spec        2006-05-01 
01:08:57.000000000 -0700
+++ /dar/packages/trunk/clamav/clamav.spec      2006-05-02 
04:38:20.468508734 -0700
@@ -3,7 +3,6 @@
 # Upstream: <clamav-devel$lists,sf,net>

 ### FIXME: Sysv script does not have condrestart option (redo sysv script)
-### FIXME: amavisd-new requires clamd to run as user vscan, solution needed
 ### REMINDER: Look and sync with Petr Kristof's work

 %{?el2:%define _without_milter 1}
@@ -227,7 +226,7 @@
 touch %{buildroot}%{_localstatedir}/log/clamav/freshclam.log
 touch %{buildroot}%{_localstatedir}/log/clamav/clamd.log

-%{__install} -d -m0755 %{buildroot}%{_localstatedir}/run/clamav/
+%{__install} -d -m0775 %{buildroot}%{_localstatedir}/run/clamav/

 %post
 /sbin/ldconfig 2>/dev/null
@@ -314,7 +313,7 @@
 %{_bindir}/clamdscan

 %defattr(0644, clamav, clamav, 0755)
-%{_localstatedir}/run/clamav/
+%attr(0775, clamav, clamav) %{_localstatedir}/run/clamav/
 %dir %{_localstatedir}/clamav/
 %exclude %{_localstatedir}/clamav/*
 %dir %{_localstatedir}/log/clamav/



More information about the packagers mailing list