From 6151a28de94fbf6a8d4e203b165e3bf734ec520c Mon Sep 17 00:00:00 2001 From: ensc Date: Feb 03 2005 08:40:44 +0000 Subject: - build the package with '--disable-zlib-vcheck' because RH is unable to apply a fix for a 5 month old and solved security issue. Please fill your comments at https://bugzilla.redhat.com/beta/show_bug.cgi?id=131385 - added 'BuildRequires: bc' (should work without also, but ./configure gives out ugly warnings else) 0.81-0.fdr.1 - updated to 0.81 - do not ship the 'clamd.milter' daemon anymore; clamav-milter supports an internal mode now which is enabled by default - updated -milter %%description 0.80-0.fdr.2 - s!cron.d/clamav!cron.d/clamav-update! in the %%description of the -update subpackage (https://bugzilla.fedora.us/show_bug.cgi?id=1715#c39) 0.80-0.fdr.1 - updated to 0.80 - removed DMS, FreeBSD-HOWTO and localized docs as it is not shipped anymore - buildrequire 'curl-devel' - renamed clamav.conf to clamd.conf (upstream change) - updated -initoff patch 0.75.1-0.fdr.1 - updated to 0.75.1 - use %%configure, the problems with the architecture specification seem to have passed (probably because of an autoconf update) - set mode 0600 for the cron-script (required by vixie-cron) - made the cronjob a spambot and send mail about deactivated freshclam service to nearly everybody... (root, postmaster, webmaster) - other fixes in the notification cronjob 0.75-0.fdr.1 - updated to 0.75 0.74-0.fdr.2 - moved /usr/bin/clamav-config from main into -devel 0.74-0.fdr.1 - updated to 0.74 0.73-0.fdr.1 - updated to 0.73 - added pkgconfig file 0.72-0.fdr.3 - notify the user about a deactivated clamav-update service - added clamd-gen script which generates template spec-files for services using clamd - copied template configuration files to %pkgdatadir/template (needed for clamd-gen) - moved the clamd-wrapper from %_initrddir to %{pkgdatadir}; a symlink will be provided for compatibility reasons - conditionalized building of the -milter subpackage ('--without milter' switch) to enable builds on RH73 (bug #1715, comment #5/#7) 0.72-0.fdr.2 - removed 'BuildRequires: dietlibc'; it was a leftover from the pre-use-signal era (before 0.70) (bug #1716) 0.72-0.fdr.1 - updated to 0.72 --- diff --git a/.cvsignore b/.cvsignore index 0196009..ff8c3c5 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1,3 @@ -clamav-0.71.tar.gz +clamav-*.tar.gz* +clamav-0.81.tar.gz +clamav-0.81.tar.gz.sig diff --git a/clamav-0.70-initoff.patch b/clamav-0.70-initoff.patch deleted file mode 100644 index c1e1860..0000000 --- a/clamav-0.70-initoff.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- clamav-0.70-rc/contrib/init/RedHat/clamav-milter.initoff 2004-02-10 23:44:49.000000000 +0100 -+++ clamav-0.70-rc/contrib/init/RedHat/clamav-milter 2004-02-10 23:45:28.000000000 +0100 -@@ -2,7 +2,7 @@ - # - # clamav-milter This script starts and stops the clamav-milter daemon - # --# chkconfig: 2345 91 30 -+# chkconfig: - 79 31 - # - # description: clamav-milter is a daemon which hooks into sendmail and routes - # email messages to clamav diff --git a/clamav-0.71.tar.gz.sig b/clamav-0.71.tar.gz.sig deleted file mode 100644 index 2d70446..0000000 Binary files a/clamav-0.71.tar.gz.sig and /dev/null differ diff --git a/clamav-0.80-initoff.patch b/clamav-0.80-initoff.patch new file mode 100644 index 0000000..7ef309e --- /dev/null +++ b/clamav-0.80-initoff.patch @@ -0,0 +1,11 @@ +--- clamav-0.70-rc/contrib/init/RedHat/clamav-milter.initoff 2004-02-10 23:44:49.000000000 +0100 ++++ clamav-0.70-rc/contrib/init/RedHat/clamav-milter 2004-02-10 23:45:28.000000000 +0100 +@@ -2,7 +2,7 @@ + # + # clamav-milter This script starts and stops the clamav-milter daemon + # +-# chkconfig: 2345 71 40 ++# chkconfig: - 71 40 + # + # description: clamav-milter is a daemon which hooks into sendmail and routes + # email messages to clamav diff --git a/clamav.spec b/clamav.spec index e264659..babe1b2 100644 --- a/clamav.spec +++ b/clamav.spec @@ -1,15 +1,24 @@ +## This package understands the following switches: +## --without milter ... deactivate the -milter subpackage + + +## Fedora Extras specific customization below... +%{!?release_func:%define release_func() %1} +## + + %define username clamav %define homedir %_var/lib/clamav %define freshclamlog %_var/log/freshclam.log %define milterlog %_var/log/clamd.milter %define milteruser clamilt %define milterstatedir %_var/run/clamav-milter -%define milterclamddir %_var/run/clamd.milter +%define pkgdatadir %_datadir/%name Summary: End-user tools for the Clam Antivirus scanner Name: clamav -Version: 0.71 -Release: 2 +Version: 0.81 +Release: %release_func 2 Epoch: 0 License: GPL Group: Applications/File @@ -25,11 +34,12 @@ Source7: clamd.SERVICE.init Source8: clamav-notify-servers Patch20: clamav-0.70-user.patch Patch21: clamav-0.70-path.patch -Patch22: clamav-0.70-initoff.patch +Patch22: clamav-0.80-initoff.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Requires: clamav-lib = %{epoch}:%{version}-%{release} Requires: data(clamav) -BuildRequires: zlib-devel bzip2-devel gmp-devel tcp_wrappers +BuildRequires: zlib-devel bzip2-devel gmp-devel tcp_wrappers curl-devel +BuildRequires: bc %package lib Summary: Dynamic libraries for the Clam Antivirus scanner @@ -39,7 +49,9 @@ Requires: data(clamav) %package devel Summary: Headerfiles and libraries for the Clam Antivirus scanner Group: Development/Libraries +Source100: clamd-gen Requires: clamav-lib = %{epoch}:%{version}-%{release} +Requires(pre): %_libdir/pkgconfig %package data Summary: The virus-signatures for clamav @@ -68,7 +80,6 @@ Requires: init(clamav-server) Provides: init(clamav-server) Requires: data(clamav) Requires: clamav-lib = %{epoch}:%{version}-%{release} -BuildRequires: dietlibc Requires(pre): %_initrddir Requires(postun): %_initrddir @@ -79,9 +90,7 @@ Group: System Environment/Daemons ## and -minit subpackages Requires: init(clamav-milter) Provides: init(clamav-milter) -BuildRequires: sendmail-devel -Requires(preun): clamav-server = %{epoch}:%{version}-%{release} -Requires(postun): clamav-server = %{epoch}:%{version}-%{release} +%{!?_without_milter:BuildRequires: sendmail-devel} Requires: sendmail Requires(pre): %_initrddir Requires(postun): %_initrddir @@ -104,6 +113,16 @@ the virus database from OpenAntiVirus, but contains additional signatures (including signatures for popular polymorphic viruses, too) and is KEPT UP TO DATE. +WARNING: this package was built with '--disable-zlib-vcheck' because Red Hat + is unable to apply a simple security fix within 5 months. On + failures or successful DOS attacks on your mailserver, please + blame RH but not fedora.us. + + See https://bugzilla.redhat.com/beta/show_bug.cgi?id=131385 and + http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0797 + for references + + %description lib This package contains dynamic libraries shared between applications using the Clam Antivirus scanner. @@ -120,7 +139,7 @@ ships a corresponding cron-job. %description update This package contains programs which can be used to update the clamav anti-virus database automatically. It uses the freshclam(1) utility for -this task. To activate it, uncomment the entry in /etc/cron.d/clamav. +this task. To activate it, uncomment the entry in /etc/cron.d/clamav-update. %description server ATTENTION: most users do not need this package; the main package has @@ -138,7 +157,6 @@ This package contains files which are needed to run the clamav-milter. It can be activated by adding | INPUT_MAIL_FILTER(`clamav', `S=local:%milterstatedir/clamav.sock, F=, T=S:4m;R:4m')dnl -| define(`confINPUT_MAIL_FILTERS', `clamav')dnl to your sendmail.mc. @@ -157,23 +175,35 @@ perl -pi -e 's!^(#?LogFile ).*!\1/var/log/clamd.!g; s!^#?(PidFile ).*!\1/var/run/clamd./clamd.pid!g; s!^#?(User ).*!\1!g; s! /usr/local/share/clamav,! %homedir,!g; - ' etc/clamav.conf + ' etc/clamd.conf perl -pi -e 's!^#(UpdateLogFile )!\1!g;' etc/freshclam.conf ## ------------------------------------------------------------ %build -#%%configure --disable-clamav --with-dbdir=/var/lib/clamav -## The %%configure macro can not be used since the script breaks on -## the old architecture specification +cat <"$f".tmp +cmp -s "$f" "$f".tmp || cat "$f".tmp >"$f" +rm -f "$f".tmp + ## prepare the update-files %{__install} -m644 -p %{SOURCE6} ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/clamav-update @@ -213,26 +257,28 @@ mkdir _doc_server touch ${RPM_BUILD_ROOT}%{freshclamlog} cat >${RPM_BUILD_ROOT}%{_sysconfdir}/cron.d/clamav-update <<"EOF" +## Adjust this line... +MAILTO=root,postmaster,webmaster,%username + ## It is ok to execute it as root; freshclam drops privileges and becomes ## user 'clamav' as soon as possible ## Note: replace 'MIN' and 'HOUR' with random values # MIN HOUR/3 * * * root %{_bindir}/freshclam --quiet && { test -x %{_sbindir}/clamav-notify-servers && exec %{_sbindir}/clamav-notify-servers || :; } -EOF +## Comment out or remove this line... +1 8 * * * %username /bin/sh -c 'echo "Please activate the clamav update in %_sysconfdir/cron.d/clamav-update" >&2' +EOF +%if 0%{!?_without_milter:1} #### The milter stuff function subst() { sed -e 's!!milter!g;s!!%milteruser!g;'"$3" "$1" >"$RPM_BUILD_ROOT$2" } -subst %SOURCE3 /etc/logrotate.d/clamd.milter -subst %SOURCE7 %_initrddir/clamd.milter -subst etc/clamav.conf /etc/clamd.d/milter.conf \ +subst etc/clamd.conf /etc/clamd.d/milter.conf \ 's!^##*\(\(LogFile\|LocalSocket\|PidFile\|User\)\s\|\(StreamSaveToDisk\|ScanMail\)$\)!\1!;' -chmod 0755 $RPM_BUILD_ROOT%_initrddir/clamd.milter -ln -s ./clamd $RPM_BUILD_ROOT%_sbindir/clamd.milter cat <$RPM_BUILD_ROOT%_sysconfdir/sysconfig/clamav-milter ## The '-blo' options might be usefully here -- especially for testing; see @@ -242,8 +288,9 @@ CLAMAV_USER='%milteruser' EOF %__install -p -m755 contrib/init/RedHat/clamav-milter $RPM_BUILD_ROOT%_initrddir/clamav-milter -touch $RPM_BUILD_ROOT%milterclamddir/{clamd.sock,clamd.pid,milter.sock} touch $RPM_BUILD_ROOT%milterstatedir/clamav.sock $RPM_BUILD_ROOT%milterlog +%endif # _without_milter + ## ------------------------------------------------------------ @@ -275,18 +322,14 @@ test "$1" != 0 || /usr/sbin/fedora-groupdel %{username} &>/dev/null || : %post milter /sbin/chkconfig --add clamav-milter -/sbin/chkconfig --add clamd.milter %preun milter test "$1" != 0 || %{_initrddir}/clamav-milter stop &>/dev/null || : -test "$1" != 0 || %{_initrddir}/clamd.milter stop &>/dev/null || : test "$1" != 0 || /sbin/chkconfig --del clamav-milter -test "$1" != 0 || /sbin/chkconfig --del clamd.milter %postun milter test "$1" != 0 || /usr/sbin/fedora-userdel %{milteruser} &>/dev/null || : test "$1" != 0 || /usr/sbin/fedora-groupdel %{milteruser} &>/dev/null || : -test "$1" = 0 || %{_initrddir}/clamd.milter condrestart >/dev/null || : test "$1" = 0 || %{_initrddir}/clamav-milter condrestart >/dev/null || : @@ -298,15 +341,9 @@ test "$1" = 0 || %{_initrddir}/clamav-milter condrestart >/dev/null || : %defattr(-,root,root,-) %doc AUTHORS BUGS COPYING ChangeLog FAQ NEWS TODO %doc docs/*.pdf -%doc docs/html docs/DMS docs/FreeBSD-HowTo -%lang(fr) %doc docs/French -%lang(ja) %doc docs/Japanese -%lang(pl) %doc docs/Polish -%lang(pt) %doc docs/Portugese -%lang(es) %doc docs/Spanish -%lang(tr) %doc docs/Turkish %doc %{_mandir}/man[15]/* %{_bindir}/* +%exclude %_bindir/clamav-config %exclude %_bindir/freshclam %exclude %_mandir/man1/freshclam* @@ -323,12 +360,20 @@ test "$1" = 0 || %{_initrddir}/clamav-milter condrestart >/dev/null || : %{_includedir}/* %{_libdir}/*.*a %{_libdir}/*.so +%dir %pkgdatadir +%pkgdatadir/template +%pkgdatadir/clamd-gen +%_libdir/pkgconfig/* +%_bindir/clamav-config ## ----------------------- %files data %defattr(-,%{username},%{username},-) %dir %{homedir} +# use %%config to keep files which were updated by 'freshclam' +# already. Without this tag, they would be overridden with older +# versions whenever a new -data package is installed. %config %verify(not size md5 mtime) %{homedir}/*.cvd ## ----------------------- @@ -338,7 +383,7 @@ test "$1" = 0 || %{_initrddir}/clamav-milter condrestart >/dev/null || : %_bindir/freshclam %_mandir/man1/freshclam* %config(noreplace) %verify(not mtime) %_sysconfdir/freshclam.conf -%config(noreplace) %verify(not mtime) %_sysconfdir/cron.d/* +%config(noreplace) %verify(not mtime) %attr(0600,root,root) %_sysconfdir/cron.d/* %config(noreplace) %verify(not mtime) %_sysconfdir/logrotate.d/* %ghost %attr(0664,root,%{username}) %verify(not size md5 mtime) %{freshclamlog} @@ -348,12 +393,15 @@ test "$1" = 0 || %{_initrddir}/clamav-milter condrestart >/dev/null || : %files server %defattr(-,root,root,-) %doc _doc_server/* -%doc etc/clamav.conf %doc %{_mandir}/man8/* %{_sbindir}/* -%config %{_initrddir}/clamd-wrapper +%_initrddir/clamd-wrapper +%dir %pkgdatadir %dir %{_sysconfdir}/clamd.d +%pkgdatadir/clamd-wrapper + +%if 0%{!?_without_milter:1} %exclude %_sbindir/*milter* %exclude %_mandir/man8/clamav-milter* @@ -364,18 +412,79 @@ test "$1" = 0 || %{_initrddir}/clamav-milter condrestart >/dev/null || : %doc clamav-milter/INSTALL %_sbindir/*milter* %_mandir/man8/clamav-milter* -%config %{_initrddir}/clamd.milter %config %{_initrddir}/clamav-milter %config(noreplace) %verify(not mtime) %{_sysconfdir}/clamd.d/milter.conf %config(noreplace) %verify(not mtime) %{_sysconfdir}/sysconfig/clamav-milter -%attr(0700,%milteruser,%milteruser) %dir %milterclamddir %attr(0700,%milteruser,%milteruser) %dir %milterstatedir -%ghost %milterclamddir/* %ghost %milterstatedir/* %ghost %attr(0620,root,%milteruser) %verify(not size md5 mtime) %milterlog - +%endif # _without_milter %changelog +* Fri Jan 28 2005 Enrico Scholz - 0:0.81-0.fdr.2 +- build the package with '--disable-zlib-vcheck' because RH is unable to + apply a fix for a 5 month old and solved security issue. Please fill + your comments at https://bugzilla.redhat.com/beta/show_bug.cgi?id=131385 +- added 'BuildRequires: bc' (should work without also, but ./configure + gives out ugly warnings else) + +* Fri Jan 28 2005 Enrico Scholz - 0:0.81-0.fdr.1 +- updated to 0.81 +- do not ship the 'clamd.milter' daemon anymore; clamav-milter supports + an internal mode now which is enabled by default +- updated -milter %%description + +* Thu Jan 20 2005 Enrico Scholz - 0:0.80-0.fdr.2 +- s!cron.d/clamav!cron.d/clamav-update! in the %%description of the -update + subpackage (https://bugzilla.fedora.us/show_bug.cgi?id=1715#c39) + +* Wed Nov 3 2004 Enrico Scholz - 0:0.80-0.fdr.1 +- updated to 0.80 +- removed DMS, FreeBSD-HOWTO and localized docs as it is not shipped anymore +- buildrequire 'curl-devel' +- renamed clamav.conf to clamd.conf (upstream change) +- updated -initoff patch + +* Tue Sep 14 2004 Enrico Scholz - 0:0.75.1-0.fdr.1 +- updated to 0.75.1 +- use %%configure, the problems with the architecture specification + seem to have passed (probably because of an autoconf update) +- set mode 0600 for the cron-script (required by vixie-cron) +- made the cronjob a spambot and send mail about deactivated freshclam + service to nearly everybody... (root, postmaster, webmaster) +- other fixes in the notification cronjob + +* Fri Jul 23 2004 Enrico Scholz - 0:0.75-0.fdr.1 +- updated to 0.75 + +* Thu Jul 15 2004 Enrico Scholz - 0:0.74-0.fdr.2 +- moved /usr/bin/clamav-config from main into -devel + +* Wed Jun 30 2004 Enrico Scholz - 0:0.74-0.fdr.1 +- updated to 0.74 + +* Mon Jun 14 2004 Enrico Scholz - 0:0.73-0.fdr.1 +- updated to 0.73 +- added pkgconfig file + +* Fri Jun 11 2004 Enrico Scholz - 0:0.72-0.fdr.3 +- notify the user about a deactivated clamav-update service +- added clamd-gen script which generates template spec-files for + services using clamd +- copied template configuration files to %pkgdatadir/template (needed + for clamd-gen) +- moved the clamd-wrapper from %_initrddir to %{pkgdatadir}; a symlink + will be provided for compatibility reasons +- conditionalized building of the -milter subpackage ('--without + milter' switch) to enable builds on RH73 (bug #1715, comment #5/#7) + +* Fri Jun 4 2004 Enrico Scholz - 0:0.72-0.fdr.2 +- removed 'BuildRequires: dietlibc'; it was a leftover from the + pre-use-signal era (before 0.70) (bug #1716) + +* Thu Jun 3 2004 Enrico Scholz - 0:0.72-0.fdr.1 +- updated to 0.72 + * Thu May 20 2004 Enrico Scholz - 0:0.71-0.fdr.2 - removed the randomization in the cronjob; it seems to be impossible to use the mod-operator (%%) there. Instead of, the user has to diff --git a/clamd-README b/clamd-README index 7d8e676..d717d39 100644 --- a/clamd-README +++ b/clamd-README @@ -1,7 +1,7 @@ To create individual clamd-instance take the following files and modify/copy them in the suggested way: -clamav.conf: +clamd.conf: * set LogFile, PidFile, LocalSocket and User to suitable values * place this file into /etc/clamd.d with a unique service-name; e.g. as /etc/clamd.d/.conf @@ -42,7 +42,7 @@ clamd.init: Additionally, a symlink must be set to clamd in a way like | # ln -s clamd /usr/sbin/clamd. and the directory for the socket file must be created (see 'LocalSocket' -in clamav.conf) +in clamd.conf) | # mkdir -p /var/run/clamd. diff --git a/clamd-gen b/clamd-gen new file mode 100755 index 0000000..cd4c61c --- /dev/null +++ b/clamd-gen @@ -0,0 +1,268 @@ +#! /bin/bash + +# Copyright (C) 2004 Enrico Scholz +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +function showHelp() +{ + echo \ +$"Usage: clamd-gen --service= --version= --release= + --license= --username=>USERNAME> +" + exit 0 +} + +function rpm.generatePreamble() +{ + cat < sysv +Requires(post): %name = %epoch:%version-%release +Requires(post): diffutils mktemp %__chkconfig +Requires(preun): %__chkconfig +Requires(pre): %_initrddir +Requires(postun): %_initrddir + +%package minit +Summary: minit initscripts for a %service clamav-server +Group: System Environment/Daemons +Provides: init(%name) = minit +Conflicts: init(%name) < minit +Conflicts: init(%name) > minit +Requires(post): %name = %epoch:%version-%release +Requires(post): diffutils mktemp +Requires(pre): minit-setup +Requires(postun): minit-setup +Requires(triggers): minit-tools + + +%description +Basic setup for a clamav server for '%service'. + + +%description sysv +Basic setup for a clamav server for '%service'. + +This package contains initscripts for SysV based systems. + + +%description minit +Basic setup for a clamav server for '%service'. + +This package contains initscripts for minit based systems. + +EOF +} + + +function rpm.genBody() +{ + cat <<"XEOFX" +%prep +%build + +%install +rm -rf $RPM_BUILD_ROOT +%__install -d -m755 $RPM_BUILD_ROOT{%minitsvcdir,%_sbindir,%rundir,/var/log} + +d=/usr/share/clamav/template + +function subst +{ + src=$d/$1 + dst=$RPM_BUILD_ROOT$2 + + %__install -d -m755 $(dirname "$dst") + sed -e 's!^\(#?LogFile \).*!\1%logfile!g; + s!^#?\(LocalSocket \).*!\1%rundir/clamd.sock!g; + s!^#?\(PidFile \).*!\1%rundir/clamd.pid!g; + s!!%service!g; + s!!%username!g;' "$src" >"$dst" + chmod --reference "$src" "$dst" +} + +subst clamd.conf %conffile +subst clamd.logrotate %_sysconfdir/logrotate.d/clamd.%service + +%if 0%{!?_without_sysv:1} +subst clamd.sysconfig %_sysconfdir/sysconfig/clamd.%service +subst clamd.init %_initrddir/clamd.%service +%endif + +ln -s clamd $RPM_BUILD_ROOT%_sbindir/clamd.%service + +touch $RPM_BUILD_ROOT%logfile +touch $RPM_BUILD_ROOT%rundir/clamd.sock + +%if 0%{!?_without_minit:1} +ln -s %_sbindir/clamd.%service $RPM_BUILD_ROOT%minitsvcdir/run +touch $RPM_BUILD_ROOT%minitsvcdir/respawn +cat <$RPM_BUILD_ROOT%minitsvcdir/params +-c +%conffile +EOF +%endif + +%clean +rm -rf $RPM_BUILD_ROOT + + +%triggerin minit -- %baseservice +minit-svc add services/clamd.%service services/%baseservice/ + +%triggerun minit -- %baseservice +test "$1" != 0 -a "$2" != 0 || \ + minit-svc del services/clamd.%service services/%baseservice/ + + +%post minit +d=$(mktemp /tmp/clamd.%service.XXXXXX) +sed -e 's!^#Foreground!Foreground!' "%conffile" >"$d" +grep -q '^Foreground' $d || echo 'Foreground' >>$d +cmp -s "$d" %conffile || cat "$d" >"%conffile" +rm -f "$d" + +%post sysv +d=$(mktemp /tmp/clamd.%service.XXXXXX) +sed -e 's!^Foreground!#Foreground!' "%conffile" >"$d" +cmp -s "$d" %conffile || cat "$d" >"%conffile" +rm -f "$d" + +%__chkconfig --add %name + + +%preun sysv +test "$1" != 0 || %__chkconfig --del %name + +XEOFX +} + + +function rpm.genFiles +{ + cat <<"EOF" +%files +%defattr(-,root,root,-) +%doc +%config(noreplace) %verify(not size md5 mtime) %attr(0620,root,%username) %logfile +%config(noreplace) %verify(not mtime) %conffile +%config(noreplace) %verify(not mtime) %_sysconfdir/logrotate.d/clamd.%service +%_sbindir/clamd.%service +%dir %attr(0700,%username,root) %rundir +%ghost %rundir/clamd.sock + + +%if 0%{!?_without_sysv:1} +%files sysv +%defattr(-,root,root,-) +%config %verify(not mtime) %_initrddir/clamd.%service +%config(noreplace) %verify(not mtime) %_sysconfdir/sysconfig/clamd.%service +%endif + + +%if 0%{!?_without_minit:1} +%files minit +%defattr(-,root,root,-) +%dir %minitsvcdir +%config(noreplace) %verify(not mtime) %minitsvcdir/params +%config %minitsvcdir/run + %minitsvcdir/respawn +%endif +EOF +} + + +SERVICE= +VERSION= +RELEASE= +LICENSE= +USERNAME= +tmp=$(getopt -o '' --long service:,version:,release:,license:,username:,help -n "$0" -- "$@") || exit 1 +eval set -- "$tmp" + +while true; do + case "$1" in + (--help) showHelp $0;; + (--service) SERVICE=$2; shift;; + (--version) VERSION=$2; shift;; + (--release) RELEASE=$2; shift;; + (--license) LICENSE=$2; shift;; + (--username) USERNAME=$2; shift;; + (--) shift; break;; + esac + shift +done + +for i in SERVICE VERSION RELEASE LICENSE USERNAME; do + eval tmp=\$${i} + test "$tmp" || { + echo $"No value for $i specified; assuming @${i}@" >&2; + eval $i=@${i}@; + } +done + + +rpm.generatePreamble +rpm.generateHeader +rpm.genBody +rpm.genFiles diff --git a/clamd.SERVICE.init b/clamd.SERVICE.init index 5906b10..9681351 100644 --- a/clamd.SERVICE.init +++ b/clamd.SERVICE.init @@ -4,4 +4,4 @@ # description: The clamd server running for CLAMD_SERVICE= -. /etc/init.d/clamd-wrapper +. /usr/share/clamav/clamd-wrapper diff --git a/sources b/sources index 32295b7..c9f586e 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -096cffd2633cbac5a14b7080b6f67a67 clamav-0.71.tar.gz +60081ddd9f29cbb8f0a2fe575e5a8afa clamav-0.81.tar.gz +b3c33479713c18794dfe83aa7397c604 clamav-0.81.tar.gz.sig