commit 24a4616af1bbb2cf96ff639c5ea673db3bd54e10 Author: Juan Orti Alcaine <j.orti.alcaine@xxxxxxxxx> Date: Mon Feb 17 08:33:11 2014 +0100 Update to version 2.8.1, fix missing dependencies - Update to version 2.8.1 - Add missing dependencies - Place tmpfiles conf in _tmpfilesdir - Use _localstatedir macro - Change clamd socket location to /var/run/clamd.amavisd/clamd.sock .gitignore | 1 + amavis-clamd.conf | 4 +- amavis-clamd.sysconfig | 2 +- amavisd-conf.patch | 2 +- amavisd-new-tmpfiles.conf | 2 +- amavisd-new.spec | 52 ++++++++++++++++++++++++++------------------ sources | 2 +- 7 files changed, 38 insertions(+), 27 deletions(-) --- diff --git a/.gitignore b/.gitignore index dbef4e0..f9a91ae 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ amavisd-new-2.8.0.tar.gz +/amavisd-new-2.8.1.tar.gz diff --git a/amavis-clamd.conf b/amavis-clamd.conf index 0449325..a84b8ef 100644 --- a/amavis-clamd.conf +++ b/amavis-clamd.conf @@ -7,7 +7,7 @@ LogFacility LOG_MAIL # This option allows you to save a process identifier of the listening # daemon (main thread). -PidFile /var/run/amavisd/clamd.pid +PidFile /var/run/clamd.amavisd/clamd.pid # Remove stale socket after unclean shutdown. # Default: disabled @@ -17,4 +17,4 @@ FixStaleSocket yes User amavis # Path to a local socket file the daemon will listen on. -LocalSocket /var/spool/amavisd/clamd.sock +LocalSocket /var/run/clamd.amavisd/clamd.sock diff --git a/amavis-clamd.sysconfig b/amavis-clamd.sysconfig index 55fb40a..875534d 100644 --- a/amavis-clamd.sysconfig +++ b/amavis-clamd.sysconfig @@ -1,3 +1,3 @@ CLAMD_CONFIGFILE=/etc/clamd.d/amavisd.conf -CLAMD_SOCKET=/var/spool/amavisd/clamd.sock +CLAMD_SOCKET=/var/run/clamd.amavisd/clamd.sock CLAMD_OPTIONS= diff --git a/amavisd-conf.patch b/amavisd-conf.patch index ef1b7a1..5cb5e23 100644 --- a/amavisd-conf.patch +++ b/amavisd-conf.patch @@ -92,7 +92,7 @@ -# # this entry; when running chrooted one may prefer a socket under $MYHOME. + ### http://www.clamav.net/ + ['ClamAV-clamd', -+ \&ask_daemon, ["CONTSCAN {}\n", "/var/spool/amavisd/clamd.sock"], ++ \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamd.amavisd/clamd.sock"], + qr/\bOK$/m, qr/\bFOUND$/m, + qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ], + # NOTE: run clamd under the same user as amavisd - or run it under its own diff --git a/amavisd-new-tmpfiles.conf b/amavisd-new-tmpfiles.conf index 082b271..fac3b2f 100644 --- a/amavisd-new-tmpfiles.conf +++ b/amavisd-new-tmpfiles.conf @@ -1,2 +1,2 @@ d /var/run/amavisd 755 amavis amavis - -d /var/run/clamd.amavisd 755 amavis amavis - +d /var/run/clamd.amavisd 770 amavis clamupdate - diff --git a/amavisd-new.spec b/amavisd-new.spec index 491f45a..710ed1b 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -2,8 +2,8 @@ Summary: Email filter with virus scanner and spamassassin support Name: amavisd-new -Version: 2.8.0 -Release: 8%{?prerelease:.%{prerelease}}%{?dist} +Version: 2.8.1 +Release: 1%{?prerelease:.%{prerelease}}%{?dist} # LDAP schema is GFDL, some helpers are BSD, core is GPLv2+ License: GPLv2+ and BSD and GFDL Group: Applications/System @@ -26,7 +26,9 @@ Patch2: amavisd-condrestart.patch # sent upstream to amavis-users ML 2013-05-10. -adamw Patch3: amavisd-new-2.8.0-init_network.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -Requires: /usr/sbin/clamd, /etc/clamd.d +BuildRequires: systemd +Requires: clamav-server +Requires: clamav-server-sysvinit Requires: /usr/sbin/tmpwatch, /etc/cron.daily Requires: /usr/bin/ar Requires: altermime @@ -76,9 +78,11 @@ Requires: perl(Mail::SpamAssassin) Requires: perl(Net::DNS) Requires: perl(Net::LDAP) Requires: perl(Net::SSLeay) +Requires: perl(Net::Server) Requires: perl(NetAddr::IP) Requires: perl(Razor2::Client::Version) Requires: perl(Socket6) +Requires: perl(Unix::Syslog) Requires: perl(URI) Requires(pre): shadow-utils Requires(post): /sbin/chkconfig @@ -90,6 +94,7 @@ BuildArch: noarch Group: Applications/System Summary: Exports amavisd SNMP data Requires: %{name} = %{version}-%{release} +Requires: perl(NetSNMP::OID) Requires(post): /sbin/chkconfig Requires(preun): /sbin/service, /sbin/chkconfig Requires(postun): /sbin/service @@ -122,7 +127,7 @@ alerting purposes. %patch3 -p1 install -p -m 644 %{SOURCE4} %{SOURCE5} README_FILES/ -sed -e 's,/var/amavis/amavisd.sock\>,/var/spool/amavisd/amavisd.sock,' -i amavisd-release +sed -e 's,/var/amavis/amavisd.sock\>,%{_localstatedir}/spool/amavisd/amavisd.sock,' -i amavisd-release %build @@ -145,12 +150,11 @@ install -D -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/clamd.d/amavisd.co install -D -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/clamd.amavisd install -D -p -m 755 %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/amavisd -mkdir -p $RPM_BUILD_ROOT/var/spool/amavisd/{tmp,db,quarantine} -touch $RPM_BUILD_ROOT/var/spool/amavisd/clamd.sock -mkdir -p $RPM_BUILD_ROOT/var/run/{amavisd,clamd.amavisd} +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/amavisd/{tmp,db,quarantine} +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/{amavisd,clamd.amavisd} %if 0%{?fedora}%{?rhel} > 6 -install -D -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d/amavisd-new.conf +install -D -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_tmpfilesdir}/amavisd-new.conf %endif %clean @@ -158,7 +162,10 @@ rm -rf $RPM_BUILD_ROOT %pre getent group amavis > /dev/null || %{_sbindir}/groupadd -r amavis -getent passwd amavis > /dev/null || %{_sbindir}/useradd -r -g amavis -d /var/spool/amavisd -s /sbin/nologin -c "User for amavisd-new" amavis +getent passwd amavis > /dev/null || \ + %{_sbindir}/useradd -r -g amavis -d %{_localstatedir}/spool/amavisd -s /sbin/nologin \ + -c "User for amavisd-new" amavis +exit 0 %preun if [ $1 -eq 0 ]; then @@ -206,19 +213,15 @@ fi %{_sbindir}/amavisd %{_sbindir}/clamd.amavisd %{_bindir}/amavisd-* -%dir %attr(710,amavis,amavis) /var/spool/amavisd -%dir %attr(700,amavis,amavis) /var/spool/amavisd/tmp -%dir %attr(700,amavis,amavis) /var/spool/amavisd/db -%dir %attr(700,amavis,amavis) /var/spool/amavisd/quarantine -%ghost /var/spool/amavisd/clamd.sock +%dir %attr(710,amavis,amavis) %{_localstatedir}/spool/amavisd +%dir %attr(700,amavis,amavis) %{_localstatedir}/spool/amavisd/tmp +%dir %attr(700,amavis,amavis) %{_localstatedir}/spool/amavisd/db +%dir %attr(700,amavis,amavis) %{_localstatedir}/spool/amavisd/quarantine %if 0%{?fedora}%{?rhel} > 6 -%attr(644,root,root) %{_sysconfdir}/tmpfiles.d/amavisd-new.conf -%ghost %dir %attr(755,amavis,amavis) /var/run/amavisd -%ghost %dir %attr(755,amavis,amavis) /var/run/clamd.amavisd -%else -%dir %attr(755,amavis,amavis) /var/run/amavisd -%dir %attr(755,amavis,amavis) /var/run/clamd.amavisd +%attr(644,root,root) %{_tmpfilesdir}/amavisd-new.conf %endif +%dir %attr(755,amavis,amavis) %{_localstatedir}/run/amavisd +%dir %attr(770,amavis,clamupdate) %{_localstatedir}/run/clamd.amavisd %files snmp %defattr(-,root,root,-) @@ -227,6 +230,13 @@ fi %{_sbindir}/amavisd-snmp-subagent %changelog +* Sun Feb 16 2014 Juan Orti Alcaine <jorti@xxxxxxxxxxxxxxxxx> 2.8.1-1 +- Update to version 2.8.1 +- Add missing dependencies +- Place tmpfiles conf in _tmpfilesdir +- Use _localstatedir macro +- Change clamd socket location to /var/run/clamd.amavisd/clamd.sock + * Mon Dec 02 2013 Robert Scheck <robert@xxxxxxxxxxxxxxxxx> 2.8.0-8 - Commented ripole(1) decoder as the binary is not packaged - Commented tnef(1) decoder as the perl module is a dependency @@ -289,7 +299,7 @@ fi - Update to 2.6.2. - Drop smtpdaemon dependency (BZ# 438078). -* Wed Jul 15 2008 Steven Pritchard <steve@xxxxxxxxx> 2.6.1-1 +* Tue Jul 15 2008 Steven Pritchard <steve@xxxxxxxxx> 2.6.1-1 - Update to 2.6.1. - Require Crypt::OpenSSL::RSA, Digest::SHA, Digest::SHA1, IO::Socket::SSL, Mail::DKIM, Net::SSLeay, NetAddr::IP, and Socket6. diff --git a/sources b/sources index 3c85930..5cf05b1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9851ce19f0c8fcab36f254c4e0251618 amavisd-new-2.8.0.tar.gz +f6f9abd1aac05521bdcb3754d09f5314 amavisd-new-2.8.1.tar.gz -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/perl-devel