Architecture specific change in rpms/clamav.git
by githook-noreplyï¼ fedoraproject.org
The package rpms/clamav.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/clamav.git/commit/?id=f5659018a4a...
https://src.fedoraproject.org/cgit/rpms/clamav.git/commit/?id=162c660fd5b...
https://src.fedoraproject.org/cgit/rpms/clamav.git/commit/?id=656658e8d6f...
https://src.fedoraproject.org/cgit/rpms/clamav.git/commit/?id=1b188a1f3f1...
https://src.fedoraproject.org/cgit/rpms/clamav.git/commit/?id=14d21bc46d3....
Change:
-%ifnarch s390 s390x
+%ifnarch s390 s390x
+%ifnarch s390 s390x
-%ifnarch s390 s390x
+%ifnarch s390 s390x
Thanks.
Full change:
============
commit c93e477aa420f38a4421934d407eb576adb57473
Merge: c67bf0c 162c660
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Sat Jan 27 02:21:29 2018 +0000
Merge branch 'el6'
commit 162c660fd5b57e919c56c0bd981e25adbb01d65d
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Fri Jan 26 22:54:22 2018 +0000
Clamav 0.99.3 with git "merge" master
i.e.: git diff HEAD..master | patch -p1
and git add ChangeLog-rpm.old README.fedora clamav-0.98-umask.patch clamav-0.99-private.patch clamav-milter.systemd clamav-milter.sysv clamav-milter.upstart clamav-update.crond clamav-update.logrotate clamd-README clamd-gen clamd-wrapper clamd.SERVICE.init clamd.scan.upstart clamd.sysconfig clamd@.service clamd(a)scan.service freshclam-sleep freshclam.sysconfig llvm-glibc.patch
and again git diff HEAD..master | patch -p1
patching file clamd-gen
patching file freshclam-sleep
diff --git a/.gitignore b/.gitignore
index d87d52b..0c8b00b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
-/clamd-wrapper.tar.bz2
/clamav-*-norar.tar.xz
/main*.cvd
/daily*.cvd
/bytecode-278.cvd
+/bytecode-319.cvd
diff --git a/ChangeLog-rpm.old b/ChangeLog-rpm.old
new file mode 100644
index 0000000..44c8556
--- /dev/null
+++ b/ChangeLog-rpm.old
@@ -0,0 +1,279 @@
+* Tue Dec 12 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.7-1
+- updated to 0.88.7
+
+* Sun Nov 5 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.6-1
+- updated to 0.88.6
+
+* Wed Oct 18 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.5-1
+- updated to 0.88.5 (SECURITY); fixes CVE-2006-4182, CVE-2006-5295
+- added patch to set '__attribute__ ((visibility("hidden")))' for
+ exported MD5_*() functions (fixes #202043)
+
+* Thu Oct 05 2006 Christian Iseli <Christian.Iseli(a)licr.org> 0.88.4-4
+ - rebuilt for unwind info generation, broken in gcc-4.1.1-21
+
+* Thu Sep 21 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.4-3
+- splitted SysV initscripts of -milter and -server into own subpackages
+
+* Fri Sep 15 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.4-2
+- rebuilt
+
+* Tue Aug 8 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.4-1
+- updated to 0.88.4 (SECURITY)
+
+* Wed Jul 12 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
+- removed the clamdscan(1) manpage from the -server subpackage
+
+* Sat Jul 8 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
+- removed a superfluous '}'
+- removed some code which was relevant for FC-3 only
+
+* Sat Jul 8 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.3-1
+- updated to 0.88.3
+- updated to new fedora-usermgmt macros
+
+* Tue May 16 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.2-2
+- cleanups: removed unneeded curlies, use plain command instead of
+ %%__XXX macro, whitespace cleanup, removed unneeded versioned
+ dependencies
+- added a 'Requires(post): group(clamav)' dependencies for -update and
+ added the corresponding Provides: to -data
+- removed the %%_without_milter conditional; you won't gain anything
+ when milter would be disabled at buildtime
+
+* Sun Apr 30 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.2-1
+- updated to 0.88.2 (SECURITY)
+- rediffed patches; most issues handled by 0.88.1-2 are fixed in
+ 0.88.2
+
+* Mon Apr 24 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.1-2
+- added patch which fixes some classes of compiler warnings; at least
+ the using of implicitly declared functions was reported to cause
+ segfaults on AMD64 (brought to my attention by Marc Perkel)
+- added patch which fixes wrong usage of strncpy(3) in unrarlib.c
+
+* Thu Apr 06 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.1-1
+- updated to 0.88.1 (SECURITY)
+
+* Sat Feb 18 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88-2
+- rebuilt for FC5
+
+* Tue Jan 10 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88-1
+- updated to 0.88
+- added pseudo-versions for the 'init(...)' provides as a first step
+ for the support of alternative initmethods
+
+* Tue Nov 15 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.87.1-2
+- moved 'freshclam.conf.5' man page into the -update subpackage (#173221)
+- ship 'clamd.conf.5' man page in the -server subpackage *too*. The
+ same file is contained in multiple packages now, but this man-page
+ can not be removed from the base package because it also applies to
+ 'clamdscan' there (#173221).
+
+* Fri Nov 4 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.87.1-1
+- updated to 0.87.1
+
+* Sat Sep 17 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.87-1
+- updated to 0.87 (SECURITY)
+- removed -timeout patch; it is solved upstream
+- reverted the -exim changes; they add yet more complexity, their
+ functionality can go into an own package and they contained flaws
+
+* Fri Sep 9 2005 David Woodhouse <dwmw2(a)infradead.org> - 0.86.2-5
+- Add clamav-exim configuration package
+
+* Fri Jul 29 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.86.2-4
+- [milter] create the milter-logfile in the %%post scriptlet
+- [milter] reverted the change of the default child_timeout value; it
+ was set to 5 minutes in 0.86.2 which conflicts with the internal
+ mode where a timeout must not be set. So, the clamav-milter would
+ not run with the default configuration
+
+* Thu Jul 28 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.86.2-3
+- Fixed calculation of sleep duration; on some systems/IPs, `hostid`
+ results in a negative number which is retained by the bash
+ modulo-operation. So the sleep may get a negative number of seconds
+ being interpreted as an option. This version makes sure that the
+ module-operations returns a non-negative value. [BZ #164494, James
+ Wilkinson]
+- added support for a /usr/sbin/clamav-notify-servers.local hook; this
+ file will be executed (source'd) before all other actions and can
+ abort the entire processing by invoking 'exit'
+
+* Mon Jul 25 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.86.2-2
+- updated to 0.86.2 (SECURITY)
+- changed the freshclam updating mechanism (again); now, it consists
+ of a crontab which does not need to be changed and a helper script
+ (freshclam-sleep). This helper script is configured by
+ /etc/sysconfig/freshclam
+
+* Sat Jun 25 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.86.1-2
+- updated to 0.86.1
+- fixed randomization in %%post scriptlet: hour should be a range but
+ not a single number
+
+* Tue Jun 21 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.86-1
+- updated to 0.86
+- randomize freshclam startup times in -update's %%post script (suggested
+ by Stephen Smoogen); this requires some more Requires(post): also
+
+* Wed May 18 2005 Warren Togami <wtogami(a)redhat.com> - 0.85.1-4
+- fix dist tagging the way Enrico wants it
+
+* Tue May 17 2005 Oliver Falk <oliver(a)linux-kernel.at> - 0.85.1-2
+- Rebuild
+
+* Tue May 17 2005 Oliver Falk <oliver(a)linux-kernel.at> - 0.85.1-1
+- Update
+
+* Sat May 14 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.85-0
+- updated to 0.85
+
+* Sun May 1 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.84-0
+- updated to 0.84
+
+* Fri Apr 7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
+- rebuilt
+
+* Tue Feb 15 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.83-1
+- updated to 0.83
+
+* Tue Feb 8 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.82-1
+- updated to 0.82
+- minor spec cleanups
+
+* Fri Jan 28 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 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 <enrico.scholz(a)informatik.tu-chemnitz.de> - 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 <enrico.scholz(a)informatik.tu-chemnitz.de> - 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 <enrico.scholz(a)informatik.tu-chemnitz.de> - 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 <enrico.scholz(a)informatik.tu-chemnitz.de> - 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 <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.75-0.fdr.1
+- updated to 0.75
+
+* Thu Jul 15 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.74-0.fdr.2
+- moved /usr/bin/clamav-config from main into -devel
+
+* Wed Jun 30 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.74-0.fdr.1
+- updated to 0.74
+
+* Mon Jun 14 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.73-0.fdr.1
+- updated to 0.73
+- added pkgconfig file
+
+* Fri Jun 11 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 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 <enrico.scholz(a)informatik.tu-chemnitz.de> - 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 <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.72-0.fdr.1
+- updated to 0.72
+
+* Thu May 20 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 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
+ replace some placeholders...
+
+* Wed May 19 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.71-0.fdr.1
+- updated to 0.71
+
+* Fri May 7 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.70-0.fdr.1.1
+- quote 'EOF' to delay $RANDOM expansion
+
+* Tue Apr 27 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.70-0.fdr.2
+- updated GECOS entry for the 'clamav' user to describe its purpose
+ more accurately
+- use explicit '-m755' when creating directories with install
+
+* Tue Apr 20 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.70-0.fdr.1
+- updated to 0.70; rediffed some patches
+- updated logrotate script to use signals and documented the steps
+ which are needed to make it work
+- adapted initscript to use signals instead of sockwrite
+- removed sockwrite; signals can now be used to reload the database
+- added logfile to the -milter subpackage
+
+* Tue Apr 20 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.68-0.fdr.2.1
+- tagged some Requires:, since clamav-server is required in the milter-%%post* scriptlets
+
+* Sat Mar 20 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.68-0.fdr.2
+- split the double Requires(...,...): statements; see
+ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=118773
+- require the recent fedora-usermgmt package (0.7) which fixes similar
+ ordering issues
+
+* Thu Mar 18 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.68-0.fdr.1
+- updated to 0.68 (using the -1 version)
+- ship milter-files in the -milter instead of the -server subpackage
+
+* Tue Feb 24 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.67-0.fdr.3
+- fixed ':' vs. '.' in chown
+
+* Tue Feb 17 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.67-0.fdr.2
+- randomize freshclam startup to prevent server peaks
+
+* Mon Feb 16 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.67-0.fdr.1
+- updated to 0.67 (using the -1 version)
+
+* Wed Feb 11 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.66-0.fdr.2
+- updated to 0.66; important, packaging-relevant changes are
+ freshclam:
+ * $http_proxy is not supported anymore; you have to configure it in
+ /etc/freshclam.conf
+ * the logfile has been renamed to /var/log/freshclam.log
+- removed %%check section; buildroot check is implemented in local
+ testsuite already
+- added some %%verify(not mtime) modifiers to avoid unnecessary .rpmnew
+ files
+- added some directory-Requires:
+- activated milter-package and made it work
+- added patch to disable clamav-milter service by default
+- renamed /var/run/clamav.<SERVICE> to /var/run/clamd.<SERVICE>; this
+ makes things more consistently but can break backward compatibility. The
+ initscript should deal with the old version too, but I would not bet on
+ it...
+- updated some descriptions
+- fixed the update-mechanism; now it happens in two stages: at first,
+ the files will be downloaded as user 'clamav' and then, root initiates
+ the daemon-reload.
+
+* Mon Feb 9 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.65-0.fdr.5
+- added security fix for
+ http://www.securityfocus.com/archive/1/353194/2004-02-06/2004-02-12/1
diff --git a/README.fedora b/README.fedora
new file mode 100644
index 0000000..8df192d
--- /dev/null
+++ b/README.fedora
@@ -0,0 +1,116 @@
+A clamav-milter setup consists of the following three components:
+
+* the clamav-milter itself
+
+ --> this is provided by the 'clamav-milter' package plus (alternatively)
+ 'clamav-milter-upstart' or 'clamav-milter-sysvinit'
+
+ The main configuration is in /etc/mail/clamav-milter.conf and MUST
+ be changed before first use.
+
+ The -sysvinit package is managed by the traditional tools, but
+ -upstart requires modification of /etc/event.d/clamav-milter to
+ enable automatic startup. See comments there for more details.
+
+* a clamav scanner daemon
+
+ --> this package is called 'clamav-scanner' plus (alternatively)
+ 'clamav-scanner-upstart' or 'clamav-scanner-sysvinit'
+
+ The daemon is configured by /etc/clamd.d/scan.conf (which MUST be
+ edited before first use).
+
+ The -sysvinit package is managed by the traditional tools, but
+ -upstart requires modification of /etc/event.d/clamd.scan to enable
+ automatic startup. See comments there for more details.
+
+* the MTA (sendmail/postfix)
+
+ --> you should know how to install this...
+
+ When communicating across unix sockets with the clamav-milter, it is
+ suggested to use the /var/run/clamav-milter/clamav-milter.socket
+ path. You have to add something like
+
+ INPUT_MAIL_FILTER(`clamav', `S=local:/var/run/clamav-milter/clamav-milter.socket, F=, T=S:4m;R:4m')dnl
+
+ to your sendmail.mc.
+
+
+
+It is suggested that components communicate through TCP sockets as
+this eases setup. Please add corresponding packet filter rules!
+
+
+EXAMPLE
+=======
+
+For clamav-milter, a possible setup might be created by
+
+A) On the MTA (assumed hostname 'host-mta')
+
+ 1. Add to sendmail.mc
+
+ | INPUT_MAIL_FILTER(`clamav', `S=inet:6666@host-milter, F=, T=S:4m;R:4m')dnl
+
+ 2. Rebuild sendmail.cf
+
+
+B) On the clamav-milter host (assumed hostname 'host-milter')
+
+ 1. Install clamav-milter + clamav-milter-upstart packages
+
+ 2. Set in /etc/mail/clamav-milter.conf
+
+ | MilterSocket inet:6666
+ | ClamdSocket tcp:host-scanner:6665
+
+ and all the other options which are required on your system
+
+ 3. Edit /etc/event.d/clamav-milter and uncomment the
+
+ | start on starting local
+
+ line. Restart your system or execute
+
+ | initctl emit starting local
+
+ 4. Add something like
+
+ | iptables -N IN-cmilt
+ | iptables -A IN-cmilt -s host-mta -j ACCEPT
+ | iptables -A IN-cmilt -j DROP
+
+ | iptables -A INPUT -p tcp --dport 6666 -j IN-cmilt
+
+ to your firewall setup
+
+C) On the clamav-scanner host (assumed hostname 'host-scanner')
+
+ 1. Install clamav-scanner + clamav-scanner-upstart packages
+
+ 2. Add to /etc/clamd.d/scan.conf
+
+ | TCPSocket 6665
+ | TCPAddr host-scanner
+
+ comment out possible 'LocalSocket' lines and set all the other
+ options which are required on your system
+
+ 3. Edit /etc/event.d/clamav-scanner and uncomment the
+
+ | start on starting local
+
+ line. Restart your system or execute
+
+ | initctl emit starting local
+
+ 4. Add something like
+
+ | iptables -N IN-cscan
+ | iptables -A IN-cscan -s host-milter -j ACCEPT
+ | iptables -A IN-cscan -j DROP
+
+ | iptables -A INPUT -p tcp --dport 6665 -j IN-csan
+
+ to your firewall setup
diff --git a/clamav-0.98-umask.patch b/clamav-0.98-umask.patch
new file mode 100644
index 0000000..b9aa421
--- /dev/null
+++ b/clamav-0.98-umask.patch
@@ -0,0 +1,33 @@
+--- clamav-0.98/clamav-milter/clamav-milter.c 2013-09-16 21:28:14.000000000 +0200
++++ clamav-0.98/clamav-milter/clamav-milter.c.umask 2013-10-06 20:39:08.000000000 +0200
+@@ -374,7 +374,7 @@
+
+ if((opt = optget(opts, "PidFile"))->enabled) {
+ FILE *fd;
+- mode_t old_umask = umask(0002);
++ mode_t old_umask = umask(0022);
+
+ if((fd = fopen(opt->strarg, "w")) == NULL) {
+ logg("!Can't save PID in file %s\n", opt->strarg);
+--- clamav-0.98/shared/output.c 2013-09-16 21:28:14.000000000 +0200
++++ clamav-0.98/shared/output.c.umask 2013-10-06 20:39:28.000000000 +0200
+@@ -348,7 +348,7 @@
+ logg_open();
+
+ if(!logg_fp && logg_file) {
+- old_umask = umask(0037);
++ old_umask = umask(0077);
+ if((logg_fp = fopen(logg_file, "at")) == NULL) {
+ umask(old_umask);
+ #ifdef CL_THREAD_SAFE
+--- clamav-0.98/freshclam/freshclam.c 2013-09-16 21:28:14.000000000 +0200
++++ clamav-0.98/freshclam/freshclam.c.umask 2013-10-06 20:39:47.000000000 +0200
+@@ -123,7 +123,7 @@
+ {
+ FILE *fd;
+ int old_umask;
+- old_umask = umask (0006);
++ old_umask = umask (0022);
+ if ((fd = fopen (pidfile, "w")) == NULL)
+ {
+ logg ("!Can't save PID to file %s: %s\n", pidfile, strerror (errno));
diff --git a/clamav-0.99-private.patch b/clamav-0.99-private.patch
new file mode 100644
index 0000000..7f9f563
--- /dev/null
+++ b/clamav-0.99-private.patch
@@ -0,0 +1,27 @@
+--- clamav-0.99/libclamav.pc.in 2015-09-18 22:48:25.000000000 +0200
++++ clamav-0.99/libclamav.pc.in.private 2015-12-02 01:30:30.055231319 +0100
+@@ -7,6 +7,6 @@
+ Description: A GPL virus scanner
+ Version: @PACKAGE_VERSION@
+ Libs: -L${libdir} -lclamav
+-Libs.private: @LIBCLAMAV_LIBS@
++Libs.private: -L${libdir} -lclamav @LIBCLAMAV_LIBS@
+ Cflags: -I${includedir}
+
+--- clamav-0.99/clamav-config.in 2015-05-28 23:56:25.000000000 +0200
++++ clamav-0.99/clamav-config.in.private 2015-12-02 01:31:34.933705763 +0100
+@@ -54,12 +54,8 @@
+ usage 0
+ ;;
+
+- --cflags)
+- echo -I@includedir@ @CFLAGS@
+- ;;
+-
+- --libs)
+- echo -L@libdir@ @LIBCLAMAV_LIBS@
++ (--cflags|--libs)
++ ${PKG_CONFIG:-pkg-config} "$1" libclamav
+ ;;
+
+ *)
diff --git a/clamav-milter.init b/clamav-milter.init
deleted file mode 100644
index d9fb037..0000000
--- a/clamav-milter.init
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/sh
-#
-# Startup script for the Clamav Milter Daemon
-#
-# chkconfig: - 77 23
-# description: clamav-milter is a daemon which hooks into sendmail \
-# and routes email messages to clamav.
-# processname: clamav-milter
-# pidfile: /var/run/clamav/clamav-milter.pid
-# config: /etc/sysconfig/clamav-milter
-
-# Source function library.
-. /etc/rc.d/init.d/functions
-
-# Source networking configuration.
-. /etc/sysconfig/network
-
-[ -x /usr/sbin/clamav-milter ] || exit 0
-
-# Local clamav-milter config
-CLAMAV_FLAGS=
-test -f /etc/sysconfig/clamav-milter && . /etc/sysconfig/clamav-milter
-
-# See how we were called.
-case "$1" in
- start)
- echo -n "Starting Clamav Milter Daemon: "
- daemon clamav-milter $CLAMAV_FLAGS
- RETVAL=$?
- echo
- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/clamav-milter
- ;;
- stop)
- echo -n "Stopping Clamav Milter Daemon: "
- killproc clamav-milter
- RETVAL=$?
- echo
- [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/clamav-milter
- ;;
- status)
- status clamav-milter
- RETVAL=$?
- ;;
- restart|reload)
- $0 stop
- $0 start
- RETVAL=$?
- ;;
- condrestart)
- [ -e /var/lock/subsys/clamav-milter ] && $0 restart
- RETVAL=$?
- ;;
- *)
- echo "Usage: clamav-milter {start|stop|status|restart|reload|condrestart}"
- exit 1
-esac
-
-exit $RETVAL
diff --git a/clamav-milter.sysconfig b/clamav-milter.sysconfig
deleted file mode 100644
index 834b0cd..0000000
--- a/clamav-milter.sysconfig
+++ /dev/null
@@ -1,4 +0,0 @@
-### Simple config file for clamav-milter, you should
-### read the documentation and tweak it as you wish.
-
-CLAMAV_FLAGS=""
diff --git a/clamav-milter.systemd b/clamav-milter.systemd
new file mode 100644
index 0000000..7571038
--- /dev/null
+++ b/clamav-milter.systemd
@@ -0,0 +1,25 @@
+[Unit]
+Description = Milter module for the Clam Antivirus scanner
+After = syslog.target nss-lookup.target network.target
+Before = sendmail.service
+Before = postfix.service
+After = clamd(a)scan.service
+
+[Service]
+Type = forking
+ExecStart = /usr/sbin/clamav-milter -c /etc/mail/clamav-milter.conf
+Restart = on-failure
+
+User=clamilt
+Group=clamilt
+
+PrivateTmp=yes
+PrivateDevices=yes
+CapabilityBoundingSet=CAP_KILL
+
+ReadOnlyDirectories=/etc
+ReadOnlyDirectories=/usr
+ReadOnlyDirectories=/var/lib
+
+[Install]
+WantedBy = multi-user.target
diff --git a/clamav-milter.sysv b/clamav-milter.sysv
new file mode 100644
index 0000000..3e37ae0
--- /dev/null
+++ b/clamav-milter.sysv
@@ -0,0 +1,93 @@
+#!/bin/bash
+#
+# clamav-milter Starts/stop the "clamav-milter" daemon
+#
+# chkconfig: - 79 31
+# description: A virus scanning milter
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+exec=/usr/sbin/clamav-milter
+prog="clamav-milter"
+
+OPTS='-c /etc/mail/clamav-milter.conf'
+[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
+
+pidfile=/var/run/clamav-milter/milter.pid
+lockfile=/var/lock/subsys/$prog
+
+start() {
+ [ -x $exec ] || exit 5
+ [ -f $config ] || exit 6
+ echo -n $"Starting $prog: "
+ daemon --pidfile=${pidfile} $exec $OPTS --foreground=no --pid=${pidfile}
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && touch $lockfile
+ return $retval
+}
+
+stop() {
+ echo -n $"Stopping $prog: "
+ killproc -p "${pidfile}" $exec
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && rm -f $lockfile
+ return $retval
+}
+
+restart() {
+ stop
+ start
+}
+
+reload() {
+ restart
+}
+
+force_reload() {
+ restart
+}
+
+rh_status() {
+ # run checks to determine if the service is running or use generic status
+ status -p "${pidfile}" $prog
+}
+
+rh_status_q() {
+ rh_status >/dev/null 2>&1
+}
+
+
+case "$1" in
+ start)
+ rh_status_q && exit 0
+ $1
+ ;;
+ stop)
+ rh_status_q || exit 0
+ $1
+ ;;
+ restart)
+ $1
+ ;;
+ reload)
+ rh_status_q || exit 7
+ $1
+ ;;
+ force-reload)
+ force_reload
+ ;;
+ status)
+ rh_status
+ ;;
+ condrestart|try-restart)
+ rh_status_q || exit 0
+ restart
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+ exit 2
+esac
+exit $?
diff --git a/clamav-milter.upstart b/clamav-milter.upstart
new file mode 100644
index 0000000..1a10b8e
--- /dev/null
+++ b/clamav-milter.upstart
@@ -0,0 +1,14 @@
+### !!! Uncomment only *one* of the 'start on' statements !!!
+
+### Uncomment these lines when you want clamav-milter to be a milter
+### for a locally running MTA
+#start on (starting sendmail or starting postfix)
+
+### Uncomment these lines when you want clamav-milter to be a milter
+### for a remotely running MTA
+#start on runlevel [345] and starting local
+
+stop on runlevel [!345]
+
+respawn
+exec /usr/sbin/clamav-milter -c /etc/mail/clamav-milter.conf --foreground=yes
diff --git a/clamav-update.crond b/clamav-update.crond
new file mode 100644
index 0000000..dc85745
--- /dev/null
+++ b/clamav-update.crond
@@ -0,0 +1,6 @@
+## Adjust this line...
+MAILTO=root
+
+## It is ok to execute it as root; freshclam drops privileges and becomes
+## user 'clamupdate' as soon as possible
+0 */3 * * * root /usr/share/clamav/freshclam-sleep
diff --git a/clamav-update.logrotate b/clamav-update.logrotate
new file mode 100644
index 0000000..0de6062
--- /dev/null
+++ b/clamav-update.logrotate
@@ -0,0 +1,4 @@
+/var/log/freshclam.log {
+ monthly
+ notifempty
+}
diff --git a/clamav.init b/clamav.init
deleted file mode 100755
index 633c301..0000000
--- a/clamav.init
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/sh
-#
-# Startup script for the Clam AntiVirus Daemon
-#
-# chkconfig: - 61 39
-# description: Clam AntiVirus Daemon is a TCP/IP or socket protocol \
-# server.
-# processname: clamd
-# pidfile: /var/run/clamav/clamd.pid
-# config: /etc/clamd.conf
-
-# Source function library.
-. /etc/rc.d/init.d/functions
-
-# Source networking configuration.
-. /etc/sysconfig/network
-
-[ -x /usr/sbin/clamd ] || exit 0
-
-# Local clamd config
-test -f /etc/sysconfig/clamd && . /etc/sysconfig/clamd
-
-# See how we were called.
-case "$1" in
- start)
- echo -n "Starting Clam AntiVirus Daemon: "
- daemon clamd
- RETVAL=$?
- echo
- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/clamd
- ;;
- stop)
- echo -n "Stopping Clam AntiVirus Daemon: "
- killproc clamd
- rm -f /var/run/clamav/clamd.sock
- rm -f /var/run/clamav/clamd.pid
- RETVAL=$?
- echo
-### heres the fix... we gotta remove the stale files on restart
- [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/clamd
- ;;
- status)
- status clamd
- RETVAL=$?
- ;;
- restart|reload)
- $0 stop
- $0 start
- RETVAL=$?
- ;;
- condrestart)
- [ -e /var/lock/subsys/clamd ] && $0 restart
- RETVAL=$?
- ;;
- *)
- echo "Usage: clamd {start|stop|status|restart|reload|condrestart}"
- exit 1
-esac
-
-exit $RETVAL
diff --git a/clamav.spec b/clamav.spec
index 2fd02bd..a44be34 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -1,762 +1,1418 @@
-### 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
-
-Summary: Anti-virus software
-Name: clamav
-Version: 0.99.2
-Release: 3%{?dist}
-License: GPLv2
-Group: Applications/System
-URL: http://www.clamav.net/
+#global prerelease rc1
+
+## Fedora Extras specific customization below...
+%bcond_without fedora
+%if 0%{?fedora} || 0%{?rhel} > 6
+%bcond_without systemd
+%bcond_without tmpfiles
+%bcond_with sysv
+%bcond_with upstart
+%else
+%if 0%{?rhel} == 6
+%bcond_with systemd
+%bcond_with tmpfiles
+%bcond_without sysv
+%bcond_without upstart
+%else
+%bcond_with systemd
+%bcond_with tmpfiles
+%bcond_without sysv
+%bcond_with upstart
+%endif
+%endif
+%bcond_with unrar
+%bcond_without noarch
+%bcond_without bytecode
+##
+
+%global _hardened_build 1
+%ifnarch s390 s390x
+%global have_ocaml 1
+%else
+%global have_ocaml 0
+%endif
+
+%{!?_rundir:%global _rundir /var/run}
+
+%global updateuser clamupdate
+%global homedir %_var/lib/clamav
+%global freshclamlog %_var/log/freshclam.log
+%global milteruser clamilt
+%global milterlog %_var/log/clamav-milter.log
+%global milterstatedir %_rundir/clamav-milter
+%global pkgdatadir %_datadir/%name
+
+%global scanuser clamscan
+%global scanstatedir %_rundir/clamd.scan
+
+%{?with_noarch:%global noarch BuildArch: noarch}
+%{!?_unitdir:%global _unitdir /lib/systemd/system}
+%{!?_initrddir:%global _initrddir /etc/rc.d/init.d}
+%{!?release_func:%global release_func() %%{?prerelease:0.}%1%%{?prerelease:.%%prerelease}%%{?dist}}
+%{!?apply:%global apply(p:n:b:) %patch%%{-n:%%{-n*}} %%{-p:-p %%{-p*}} %%{-b:-b %%{-b*}} \
+%nil}
+%{!?systemd_reqs:%global systemd_reqs \
+Requires(post): /bin/systemctl\
+Requires(preun): /bin/systemctl\
+Requires(postun): /bin/systemctl\
+%nil}
+%{!?systemd_install:%global systemd_install()\
+%post %1\
+%systemd_post %2 \
+%preun %1\
+%systemd_preun %2 \
+%postun %1\
+%systemd_postun_with_restart %2 \
+%nil}
+
+
+Summary: End-user tools for the Clam Antivirus scanner
+Name: clamav
+Version: 0.99.3
+Release: 1%{?dist}
+License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
+Group: Applications/File
+URL: http://www.clamav.net
+%if %{with unrar}
+Source0: http://download.sourceforge.net/sourceforge/clamav/%name-%version%{?prere...
+Source999: http://download.sourceforge.net/sourceforge/clamav/%name-%version%{?prere...
+%else
# Unfortunately, clamav includes support for RAR v3, derived from GPL
-# incompatible unrar from RARlabs. We have to pull this code out. This
+# incompatible unrar from RARlabs. We have to pull this code out.
# tarball was created by
# make clean-sources NAME=clamav VERSION=<version> TARBALL=clamav-<version>.tar.gz TARBALL_CLEAN=clamav-<version>-norar.tar.xz
-# Upstream: http://downloads.sourceforge.net/clamav/clamav-%{version}.tar.gz
-Source0: clamav-%{version}-norar.tar.xz
-Source1: clamav.init
-Source2: clamav-milter.init
-Source3: clamd-wrapper.tar.bz2
-
-Source7: freshclam.cron
-Source8: freshclam.logrotate
-Source9: clamd.logrotate
-Source10: clamav-milter.sysconfig
-
+Source0: %name-%version%{?prerelease}-norar.tar.xz
+%endif
+#for server
+Source2: clamd.sysconfig
+Source3: clamd.logrotate
+Source5: clamd-README
+Source7: clamd.SERVICE.init
# To download the *.cvd, go to http://www.clamav.net and use the links
# there (I renamed the files to add the -version suffix for verifying).
-Source11: http://db.local.clamav.net/main-57.cvd
-Source12: http://db.local.clamav.net/daily-21723.cvd
-Source13: http://db.local.clamav.net/bytecode-278.cvd
+# Check the first line of the file for version, file is not working
+# see https://bugzilla.redhat.com/show_bug.cgi?id=1539107
+Source10: http://db.local.clamav.net/main-58.cvd
+Source11: http://db.local.clamav.net/daily-24253.cvd
+Source12: http://db.local.clamav.net/bytecode-319.cvd
+#for devel
+Source100: clamd-gen
+#for update
+Source200: freshclam-sleep
+Source201: freshclam.sysconfig
+Source202: clamav-update.crond
+Source203: clamav-update.logrotate
+#for milter
+Source300: README.fedora
+#for clamav-milter.upstart
+Source310: clamav-milter.upstart
+#for milter-sysvinit
+Source320: clamav-milter.sysv
+#for clamav-milter.systemd
+Source330: clamav-milter.systemd
+#for scanner-upstart
+Source410: clamd.scan.upstart
+#for scanner-systemd
+Source430: clamd(a)scan.service
+#for server-sysvinit
+Source520: clamd-wrapper
+#for server-systemd
+Source530: clamd@.service
+
+Patch24: clamav-0.99-private.patch
+Patch27: clamav-0.98-umask.patch
+# https://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/I...
+Patch30: llvm-glibc.patch
+Patch31: clamav-0.99.1-setsebool.patch
+Patch33: clamav-0.99.2-temp-cleanup.patch
+
+
+
+BuildRequires: autoconf automake gettext-devel libtool libtool-ltdl-devel
+BuildRequires: zlib-devel bzip2-devel gmp-devel curl-devel
+BuildRequires: ncurses-devel openssl-devel libxml2-devel
+BuildRequires: %_includedir/tcpd.h
+%{?with_bytecode:BuildRequires: bc tcl groff graphviz}
+%if %{have_ocaml}
+%{?with_bytecode:BuildRequires: ocaml}
+%endif
+# nc reuqired for tests
+BuildRequires: nc
+%if %{with systemd}
+BuildRequires: systemd
+%endif
+#for milter
+BuildRequires: sendmail-devel
-Patch31: clamav-0.99.1-setsebool.patch
-Patch32: clamav-0.99.2-temp-cleanup.patch
+Requires: clamav-lib = %version-%release
+Requires: data(clamav)
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+%description
+Clam AntiVirus is an anti-virus toolkit for UNIX. The main purpose of this
+software is the integration with mail servers (attachment scanning). The
+package provides a flexible and scalable multi-threaded daemon, a command
+line scanner, and a tool for automatic updating via Internet. The programs
+are based on a shared library distributed with the Clam AntiVirus package,
+which you can use with your own software. The virus database is based on
+the virus database from OpenAntiVirus, but contains additional signatures
+(including signatures for popular polymorphic viruses, too) and is KEPT UP
+TO DATE.
+
+%package filesystem
+Summary: Filesystem structure for clamav
+Group: Applications/File
+Provides: user(%updateuser) = 4
+Provides: group(%updateuser) = 4
+Provides: group(virusgroup)
+# Prevent version mix
+Conflicts: %name < %version-%release
+Conflicts: %name > %version-%release
+Requires(pre): shadow-utils
+%{?noarch}
+
+%description filesystem
+This package provides the filesystem structure and contains the
+user-creation scripts required by clamav.
+
+
+%package lib
+Summary: Dynamic libraries for the Clam Antivirus scanner
+Group: System Environment/Libraries
+Requires: data(clamav)
+
+%description lib
+This package contains dynamic libraries shared between applications
+using the Clam Antivirus scanner.
-BuildRequires: bzip2-devel, zlib-devel, gmp-devel, curl-devel, xz, ncurses-devel, openssl-devel, libxml2-devel, pcre-devel
-%{!?_without_milter:BuildRequires: sendmail-devel >= 8.12}
-Requires: clamav-db = %{version}-%{release}
-Requires(pre): shadow-utils
+%package devel
+Summary: Header files and libraries for the Clam Antivirus scanner
+Group: Development/Libraries
+Requires: clamav-lib = %version-%release
+Requires: clamav-filesystem = %version-%release
+Requires: openssl-devel
-### Fedora Extras introduced them differently :(
-Provides: libclamav
-Obsoletes: libclamav < %{version}-%{release}
-Provides: clamav-lib = %{version}-%{release}
-Obsoletes: clamav-lib < %{version}-%{release}
+%description devel
+This package contains headerfiles and libraries which are needed to
+build applications using clamav.
+
+
+%package data
+Summary: Virus signature data for the Clam Antivirus scanner
+Group: Applications/File
+Requires: clamav-filesystem = %version-%release
+Requires: clamav-filesystem = %version-%release
+Provides: data(clamav) = full
+Conflicts: data(clamav) < full
+Conflicts: data(clamav) > full
+%{?noarch}
+
+%description data
+This package contains the virus-database needed by clamav. This
+database should be updated regularly; the 'clamav-update' package
+ships a corresponding cron-job. This package and the
+'clamav-data-empty' package are mutually exclusive.
+
+Use -data when you want a working (but perhaps outdated) virus scanner
+immediately after package installation.
+
+Use -data-empty when you are updating the virus database regulary and
+do not want to download a >5MB sized rpm-package with outdated virus
+definitions.
+
+
+%package data-empty
+Summary: Empty data package for the Clam Antivirus scanner
+Group: Applications/File
+Provides: data(clamav) = empty
+Conflicts: data(clamav) < empty
+Conflicts: data(clamav) > empty
+%{?noarch}
+
+%description data-empty
+This is an empty package to fulfill inter-package dependencies of the
+clamav suite. This package and the 'clamav-data' package are mutually
+exclusive.
+
+Use -data when you want a working (but perhaps outdated) virus scanner
+immediately after package installation.
+
+Use -data-empty when you are updating the virus database regulary and
+do not want to download a >5MB sized rpm-package with outdated virus
+definitions.
+
+
+%package update
+Summary: Auto-updater for the Clam Antivirus scanner data-files
+Group: Applications/File
+Requires: clamav-filesystem = %version-%release
+Requires: crontabs
+Requires: /etc/cron.d
+Requires(post): %__chown %__chmod
+Requires(post): group(%updateuser)
+
+%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-update.
+
+
+%package server
+Summary: Clam Antivirus scanner server
+Group: System Environment/Daemons
+Requires: data(clamav)
+Requires: clamav-filesystem = %version-%release
+Requires: clamav-lib = %version-%release
+Requires: coreutils
+%if ! %{with sysv}
+Obsoletes: clamav-server-sysvinit < %version-%release
+%endif
+
+%description server
+ATTENTION: most users do not need this package; the main package has
+everything (or depends on it) which is needed to scan for virii on
+workstations.
+
+This package contains files which are needed to execute the clamd-daemon.
+This daemon does not provide a system-wide service. Instead of, an instance
+of this daemon should be started for each service requiring it.
+
+See the README file how this can be done with a minimum of effort.
+
+
+%package server-sysvinit
+Summary: SysV initscripts for clamav server
+Group: System Environment/Daemons
+Provides: init(clamav-server) = sysv
+Requires: clamav-server = %version-%release
+Requires: %_initrddir
+Provides: clamav-server-sysv = %version-%release
+Obsoletes: clamav-server-sysv < %version-%release
+%{?noarch}
+
+%description server-sysvinit
+SysV initscripts template for the clamav server
+
+
+%package server-systemd
+Summary: Systemd initscripts for clamav server
+Group: System Environment/Daemons
+Provides: init(clamav-server) = systemd
+Requires: clamav-server = %version-%release
+%{?systemd_reqs}
+%{?noarch}
+
+%description server-systemd
+Systemd template for the clamav server
+
+
+%package scanner
+Summary: Clamav scanner daemon
+Group: System Environment/Daemons
+Requires: init(clamav-scanner)
+Provides: user(%scanuser) = 49
+Provides: group(%scanuser) = 49
+Requires: clamav-server = %version-%release
+Requires(pre): shadow-utils
+Requires(pre): group(virusgroup)
+%if ! %{with sysv}
+Obsoletes: clamav-scanner-sysvinit < %version-%release
+%endif
+%if ! %{with upstart}
+Obsoletes: clamav-scanner-upstart < %version-%release
+%endif
+%{?noarch}
+
+%description scanner
+This package contains a generic system wide clamd service which is
+e.g. used by the clamav-milter package.
+
+
+# Remove me after EOL of RHEL5
+%package scanner-sysvinit
+Summary: SysV initscripts for clamav scanner daemon
+Group: System Environment/Daemons
+Provides: init(clamav-scanner) = sysv
+Requires: clamav-server-sysvinit = %version-%release
+Requires: clamav-scanner = %version-%release
+Requires: %_initrddir
+Requires(postun): initscripts
+Requires(post): chkconfig
+Requires(preun): chkconfig initscripts
+%{?noarch}
+
+%description scanner-sysvinit
+The SysV initscripts for clamav-scanner.
+
+
+# Remove me after EOL of RHEL6
+%package scanner-upstart
+Summary: Upstart initscripts for clamav scanner daemon
+Group: System Environment/Daemons
+Provides: init(clamav-scanner) = upstart
+Requires: clamav-scanner = %version-%release
+Requires: /etc/init
+Requires(post): /usr/bin/killall
+Requires(preun): /sbin/initctl
+%{?noarch}
+
+%description scanner-upstart
+The Upstart initscripts for clamav-scanner.
+
+
+%package scanner-systemd
+Summary: Systemd initscripts for clamav scanner daemon
+Group: System Environment/Daemons
+Provides: init(clamav-scanner) = systemd
+Requires: clamav-scanner = %version-%release
+Requires: clamav-server-systemd = %version-%release
+%{?systemd_reqs}
+%{?noarch}
+
+%description scanner-systemd
+The systemd initscripts for clamav-scanner.
-%description
-Clam AntiVirus is a GPL anti-virus toolkit for UNIX. The main purpose of
-this software is the integration with mail servers (attachment scanning).
-The package provides a flexible and scalable multi-threaded daemon, a
-command line scanner, and a tool for automatic updating via Internet.
-
-The programs are based on a shared library distributed with the Clam
-AntiVirus package, which you can use with your own software. Most
-importantly, the virus database is kept up to date
-
-%package -n clamd
-Summary: The Clam AntiVirus Daemon
-Group: System Environment/Daemons
-Requires: clamav = %{version}-%{release}
-
-### Fedora Extras introduced them differently :(
-Provides: clamav-server = %{version}-%{release}
-Obsoletes: clamav-server < %{version}-%{release}
-Provides: clamav-server-sysv = %{version}-%{release}
-Obsoletes: clamav-server-sysv < %{version}-%{release}
-Provides: clamav-scanner = %{version}-%{release}
-Obsoletes: clamav-scanner < %{version}-%{release}
-Provides: clamav-scanner-upstart = %{version}-%{release}
-Obsoletes: clamav-scanner-upstart < %{version}-%{release}
-Provides: clamav-server-sysvinit = %{version}-%{release}
-Obsoletes: clamav-server-sysvinit < %{version}-%{release}
-
-
-%description -n clamd
-The Clam AntiVirus Daemon
%package milter
-Summary: The Clam AntiVirus sendmail-milter Daemon
-Group: Applications/System
-Requires: clamd = %{version}-%{release}
-Requires: /usr/sbin/sendmail
-Provides: clamav-milter-sysv = %{version}-%{release}
-Obsoletes: clamav-milter-sysv < %{version}-%{release}
-Provides: clamav-milter-sysvinit = %{version}-%{release}
-Obsoletes: clamav-milter-sysvinit < %{version}-%{release}
+Summary: Milter module for the Clam Antivirus scanner
+Group: System Environment/Daemons
+Requires: init(clamav-milter)
+Provides: user(%milteruser) = 5
+Provides: group(%milteruser) = 5
+Requires(post): coreutils
+Requires(pre): shadow-utils
+Requires(pre): group(virusgroup)
+
+Provides: milter(clamav) = sendmail
+Provides: milter(clamav) = postfix
+
+Provides: clamav-milter-core = %version-%release
+Obsoletes: clamav-milter-core < %version-%release
+Provides: clamav-milter-sendmail = %version-%release
+Obsoletes: clamav-milter-sendmail < %version-%release
+%if ! %{with sysv}
+Obsoletes: clamav-milter-sysvinit < %version-%release
+%endif
+%if ! %{with upstart}
+Obsoletes: clamav-milter-upstart < %version-%release
+%endif
%description milter
-The Clam AntiVirus sendmail-milter Daemon
-
-%package db
-Summary: Virus database for %{name}
-Group: Applications/Databases
-### Remove circular dependency
-#Requires: clamav = %{version}-%{release}
-
-### Fedora Extras introduced them differently :(
-Provides: clamav-update = %{version}-%{release}
-Obsoletes: clamav-update < %{version}-%{release}
-Provides: clamav-data = %{version}-%{release}
-Obsoletes: clamav-data < %{version}-%{release}
-Obsoletes: clamav-data-empty <= %{version}-%{release}
-# Ugly to put these in the db-package, but needed
-# here to handle upgrades on EL5.
-Provides: clamav-filesystem = %{version}-%{release}
-Obsoletes: clamav-filesystem < %{version}-%{release}
-
-%description db
-The actual virus database for %{name}
+This package contains files which are needed to run the clamav-milter.
+
+
+# Remove me after EOL of RHEL5
+%package milter-sysvinit
+Summary: SysV initscripts for the clamav sendmail-milter
+Group: System Environment/Daemons
+Provides: init(clamav-milter) = sysvinit
+Requires: clamav-milter = %version-%release
+Requires(post): user(%milteruser) clamav-milter
+Requires(preun): user(%milteruser) clamav-milter
+Requires: %_initrddir
+Requires(postun): initscripts
+Requires(post): chkconfig
+Requires(preun): chkconfig initscripts
+Provides: clamav-milter-sysv = %version-%release
+Obsoletes: clamav-milter-sysv < %version-%release
+%{?noarch}
+
+%description milter-sysvinit
+The SysV initscripts for clamav-milter.
+
+
+# Remove me after EOL of RHEL6
+%package milter-upstart
+Summary: Upstart initscripts for the clamav sendmail-milter
+Group: System Environment/Daemons
+Provides: init(clamav-milter) = upstart
+Requires: clamav-milter = %version-%release
+Requires: /etc/init
+Requires(post): /usr/bin/killall
+Requires(preun): /sbin/initctl
+%{?noarch}
+
+%description milter-upstart
+The Upstart initscripts for clamav-milter.
+
+
+%package milter-systemd
+Summary: Systemd initscripts for the clamav sendmail-milter
+Group: System Environment/Daemons
+Provides: init(clamav-milter) = systemd
+Requires: clamav-milter = %version-%release
+%{?systemd_reqs}
+%{?noarch}
+
+%description milter-systemd
+The systemd initscripts for clamav-scanner.
+## ------------------------------------------------------------
-%package devel
-Summary: Header files, libraries and development documentation for %{name}
-Group: Development/Libraries
-Requires: clamav = %{version}-%{release}, openssl-devel
+%prep
+%setup -q -n %{name}-%{version}%{?prerelease}
-### Fedora Extras introduced them differently :(
-Obsoletes: libclamav-static-devel <= %{version}-%{release}
-Obsoletes: libclamav-devel <= %{version}-%{release}
-Provides: libclamav-static-devel, libclamav-devel
+%apply -n24 -p1 -b .private
+%apply -n27 -p1 -b .umask
+%apply -n30 -p1
+%apply -n31 -p1 -b .setsebool
+%apply -n33 -p1 -b .temp-cleanup
+%{?apply_end}
-%description devel
-This package contains the header files, static libraries and development
-documentation for %{name}. If you like to develop programs using %{name},
-you will need to install %{name}-devel.
+install -p -m0644 %SOURCE300 clamav-milter/
+
+mkdir -p libclamunrar{,_iface}
+%{!?with_unrar:touch libclamunrar/{Makefile.in,all,install}}
+
+sed -ri \
+ -e 's!^#?(LogFile ).*!#\1/var/log/clamd.<SERVICE>!g' \
+ -e 's!^#?(LocalSocket ).*!#\1/var/run/clamd.<SERVICE>/clamd.sock!g' \
+ -e 's!^(#?PidFile ).*!\1/var/run/clamd.<SERVICE>/clamd.pid!g' \
+ -e 's!^#?(User ).*!\1<USER>!g' \
+ -e 's!^#?(AllowSupplementaryGroups|LogSyslog).*!\1 yes!g' \
+ -e 's! /usr/local/share/clamav,! %homedir,!g' \
+ etc/clamd.conf.sample
+
+sed -ri \
+ -e 's!^Example!#Example!' \
+ -e 's!^#?(UpdateLogFile )!#\1!g;' \
+ -e 's!^#?(LogSyslog).*!\1 yes!g' \
+ -e 's!(DatabaseOwner *)clamav$!\1%updateuser!g' etc/freshclam.conf.sample
-%prep
-# Handle that rpmbuild in RHEL < 6 doesn't handle xz archives automatically.
-%setup -q -T -c
-xz -dc %{SOURCE0} | (cd .. ; tar xvvf -)
-%patch31 -p1 -b .setsebool
-%patch32 -p1 -b .temp-cleanup
-
-%{__perl} -pi.orig -e 's|/lib\b|/%{_lib}|g;' configure
-
-%{__perl} -pi.orig -e '
- s|\@DBDIR\@|\$(localstatedir)/lib/clamav|g;
- s|\@DBINST\@|\$(localstatedir)/lib/clamav|g;
- s|\@CFGDIR\@|\$(sysconfdir)|g;
- s|\@CFGINST\@|\$(sysconfdir)|g;
- s|^\@INSTALL_CLAMAV_CONF_TRUE\@|\t|g;
- s|^\@INSTALL_FRESHCLAM_CONF_TRUE\@|\t|g;
- ' database/Makefile.in etc/Makefile.in
-
-%{__perl} -pi.orig -e '
- s|^(Example)|#$1|;
- s|^#(LogFile) .+$|$1 %{_localstatedir}/log/clamav/clamd.log|;
- s|^#(LogFileMaxSize) .*|$1 0|;
- s|^#(LogTime)|$1|;
- s|^#(LogSyslog)|$1|;
- s|^#(PidFile) .+$|$1 %{_localstatedir}/run/clamav/clamd.pid|;
- s|^#(TemporaryDirectory) .+$|$1 %{_localstatedir}/tmp|;
- s|^#(DatabaseDirectory) .+$|$1 %{_localstatedir}/lib/clamav|;
- s|^#(LocalSocket) .+$|$1 %{_localstatedir}/run/clamav/clamd.sock|;
- s|^#(FixStaleSocket)|$1|;
- s|^#(TCPSocket) .+$|$1 3310|;
- s|^#(TCPAddr) .+$|$1 127.0.0.1|;
- s|^#(MaxConnectionQueueLength) .+$|$1 30|;
- s|^#(StreamSaveToDisk)|$1|;
- s|^#(MaxThreads) .+$|$1 50|;
- s|^#(ReadTimeout) .+$|$1 300|;
- s|^#(User) .+$|$1 clam|;
- s|^#(AllowSupplementaryGroups).*$|$1 yes|;
- s|^#(ScanPE) .+$|$1 yes|;
- s|^#(ScanELF) .+$|$1 yes|;
- s|^#(DetectBrokenExecutables)|$1|;
- s|^#(ScanOLE2) .+$|$1 yes|;
- s|^#(ScanMail)|$1|;
- s|^#(ScanArchive) .+$|$1 yes|;
- s|^#(ArchiveMaxCompressionRatio) .+|$1 300|;
- s|^#(ArchiveBlockEncrypted)|$1|;
- s|^#(ArchiveBlockMax)|$1|;
- ' etc/clamd.conf.sample
-
-%{__perl} -pi.orig -e '
- s|^(Example)|#$1|;
- s|^#(DatabaseDirectory) .+$|$1 %{_localstatedir}/lib/clamav|;
- s|^#(UpdateLogFile) .+$|$1 %{_localstatedir}/log/clamav/freshclam.log|;
- s|^#(LogSyslog)|$1|;
- s|^#(DatabaseOwner) .+$|$1 clam|;
- s|^(Checks) .+$|$1 24|;
- ' etc/freshclam.conf.sample
-
-%{__perl} -pi.orig -e '
- s|^(Example)|#$1|;
- s|^#(User) .+$|$1 clam|;
- s|^#(MilterSocket) inet.+$|$1 /var/run/clamav/clamav-milter.sock|;
- s|^#(PidFile) .+$|$1 /var/run/clamav/clamav-milter.pid|;
- s|^#(ClamdSocket) .+$|$1 unix:%{_localstatedir}/run/clamav/clamd.sock|;
- ' etc/clamav-milter.conf.sample
+
+## ------------------------------------------------------------
%build
-%configure \
- --program-prefix="%{?_program_prefix}" \
-%{!?_without_milter:--enable-milter} \
- --disable-clamav \
- --disable-static \
- --disable-zlib-vcheck \
- --disable-unrar \
- --enable-id-check \
- --enable-dns \
- --with-dbdir="%{_localstatedir}/lib/clamav" \
- --with-group="clam" \
- --with-libcurl=%{_prefix} \
- --with-user="clam" \
-# --disable-llvm
-
-make %{?_smp_mflags}
+CFLAGS="$RPM_OPT_FLAGS -Wall -W -Wmissing-prototypes -Wmissing-declarations -std=gnu99"
+CXXFLAGS="$RPM_OPT_FLAGS -std=gnu++98"
+export LDFLAGS='%{?__global_ldflags} -Wl,--as-needed'
+# IPv6 check is buggy and does not work when there are no IPv6 interface on build machine
+export have_cv_ipv6=yes
+
+rm -rf libltdl autom4te.cache Makefile.in
+autoreconf -i
+%configure \
+ --disable-static \
+ --disable-rpath \
+ --disable-silent-rules \
+ --disable-clamav \
+ --with-user=%updateuser \
+ --with-group=%updateuser \
+ --with-libcurl=%{_prefix} \
+ --with-dbdir=%homedir \
+ --enable-milter \
+ --enable-clamdtop \
+ --disable-zlib-vcheck \
+ %{!?with_bytecode:--disable-llvm} \
+ %{!?with_unrar:--disable-unrar}
+
+# TODO: check periodically that CLAMAVUSER is used for freshclam only
+
+
+# build with --as-needed and disable rpath
+sed -i \
+ -e 's! -shared ! -Wl,--as-needed\0!g' \
+ -e '/sys_lib_dlsearch_path_spec=\"\/lib \/usr\/lib /s!\"\/lib \/usr\/lib !/\"/%_lib /usr/%_lib !g' \
+ libtool
+
+%make_build
+
+
+## ------------------------------------------------------------
%install
-rm -rf %{buildroot}
-make install DESTDIR="%{buildroot}"
+rm -rf "$RPM_BUILD_ROOT" _doc*
+%make_install
+
+function smartsubst() {
+ local tmp
+ local regexp=$1
+ shift
+
+ tmp=$(mktemp /tmp/%name-subst.XXXXXX)
+ for i; do
+ sed -e "$regexp" "$i" >$tmp
+ cmp -s $tmp "$i" || cat $tmp >"$i"
+ rm -f $tmp
+ done
+}
+
+
+install -d -m 0755 \
+ $RPM_BUILD_ROOT%_sysconfdir/{mail,clamd.d,logrotate.d} \
+ $RPM_BUILD_ROOT%_tmpfilesdir \
+ $RPM_BUILD_ROOT%_rundir \
+ $RPM_BUILD_ROOT%_var/log \
+ $RPM_BUILD_ROOT%milterstatedir \
+ $RPM_BUILD_ROOT%pkgdatadir/template \
+ $RPM_BUILD_ROOT%_initrddir \
+ $RPM_BUILD_ROOT%homedir \
+ $RPM_BUILD_ROOT%scanstatedir
+
+rm -f $RPM_BUILD_ROOT%_sysconfdir/clamd.conf.sample \
+ $RPM_BUILD_ROOT%_libdir/*.la
+
+
+%{?with_bytecode:touch $RPM_BUILD_ROOT%homedir/bytecode.cld}
+touch $RPM_BUILD_ROOT%homedir/{daily,main}.cld
+touch $RPM_BUILD_ROOT%homedir/mirrors.dat
+
+install -D -m 0644 -p %SOURCE10 $RPM_BUILD_ROOT%homedir/main.cvd
+install -D -m 0644 -p %SOURCE11 $RPM_BUILD_ROOT%homedir/daily.cvd
+%{?with_bytecode:install -D -m 0644 -p %SOURCE12 $RPM_BUILD_ROOT%homedir/bytecode.cvd}
+
+## prepare the server-files
+install -D -m 0644 -p %SOURCE2 _doc_server/clamd.sysconfig
+install -D -m 0644 -p %SOURCE3 _doc_server/clamd.logrotate
+%if %{with sysv}
+install -D -m 0755 -p %SOURCE7 _doc_server/clamd.init
+%endif
+install -D -m 0644 -p %SOURCE5 _doc_server/README
+install -D -m 0644 -p etc/clamd.conf.sample _doc_server/clamd.conf
-install -Dp -m0755 %{SOURCE1} %{buildroot}%{_initrddir}/clamd
-install -Dp -m0755 %{SOURCE7} %{buildroot}%{_sysconfdir}/cron.daily/freshclam
-install -Dp -m0644 %{SOURCE8} %{buildroot}%{_sysconfdir}/logrotate.d/freshclam
-install -Dp -m0644 %{SOURCE9} %{buildroot}%{_sysconfdir}/logrotate.d/clamav
+%if %{with sysv}
+install -m 0644 -p %SOURCE520 $RPM_BUILD_ROOT%pkgdatadir/
+%endif
+install -m 0755 -p %SOURCE100 $RPM_BUILD_ROOT%pkgdatadir/
+cp -pa _doc_server/* $RPM_BUILD_ROOT%pkgdatadir/template
-mv -f %{buildroot}%{_sysconfdir}/clamd.conf{.sample,}
-mv -f %{buildroot}%{_sysconfdir}/freshclam.conf{.sample,}
+%if %{with sysv}
+smartsubst 's!/usr/share/clamav!%pkgdatadir!g' $RPM_BUILD_ROOT%pkgdatadir/clamd-wrapper
+%endif
+install -D -p -m 0644 %SOURCE530 $RPM_BUILD_ROOT%_unitdir/clamd@.service
-# now rewrite scripts and config files in-place
-sed -i \
- -e 's!%%{_sbindir}!%{_sbindir}!g' \
- -e 's!%%{_bindir}!%{_bindir}!g' \
- -e 's!%%{_localstatedir}!%{_localstatedir}!g' \
- %{buildroot}%{_sysconfdir}/cron.daily/freshclam \
- %{buildroot}%{_sysconfdir}/logrotate.d/*
-
-%if %{!?_without_milter:1}0
-install -Dp -m0755 %{SOURCE2} %{buildroot}%{_initrddir}/clamav-milter
-install -Dp -m0644 %{SOURCE10} %{buildroot}%{_sysconfdir}/sysconfig/clamav-milter
-mv -f %{buildroot}%{_sysconfdir}/clamav-milter.conf{.sample,}
-%else
-rm %{buildroot}%{_mandir}/man8/clamav-milter.8*
+
+## prepare the update-files
+install -D -m 0644 -p %SOURCE203 $RPM_BUILD_ROOT%_sysconfdir/logrotate.d/clamav-update
+touch $RPM_BUILD_ROOT%freshclamlog
+
+install -D -p -m 0755 %SOURCE200 $RPM_BUILD_ROOT%pkgdatadir/freshclam-sleep
+install -D -p -m 0644 %SOURCE201 $RPM_BUILD_ROOT%_sysconfdir/sysconfig/freshclam
+install -D -p -m 0600 %SOURCE202 $RPM_BUILD_ROOT%_sysconfdir/cron.d/clamav-update
+mv -f $RPM_BUILD_ROOT%_sysconfdir/freshclam.conf{.sample,}
+
+smartsubst 's!webmaster,clamav!webmaster,%updateuser!g;
+ s!/usr/share/clamav!%pkgdatadir!g;
+ s!/usr/bin!%_bindir!g;
+ s!/usr/sbin!%_sbindir!g;' \
+ $RPM_BUILD_ROOT%_sysconfdir/cron.d/clamav-update \
+ $RPM_BUILD_ROOT%pkgdatadir/freshclam-sleep
+
+
+### The scanner stuff
+sed -e 's!<SERVICE>!scan!g;s!<USER>!%scanuser!g' \
+ etc/clamd.conf.sample > $RPM_BUILD_ROOT%_sysconfdir/clamd.d/scan.conf
+
+%if %{with sysv}
+sed -e 's!<SERVICE>!scan!g;' $RPM_BUILD_ROOT%pkgdatadir/template/clamd.init \
+ > $RPM_BUILD_ROOT%_initrddir/clamd.scan
%endif
-# Install clamav-wrapper:
-tar xjf %{SOURCE3} -C %{buildroot}/%{_prefix}/share
-install -d -m0755 %{buildroot}%{_localstatedir}/log/clamav/
-touch %{buildroot}%{_localstatedir}/log/clamav/freshclam.log
-touch %{buildroot}%{_localstatedir}/log/clamav/clamd.log
+install -D -p -m 0644 %SOURCE410 $RPM_BUILD_ROOT%_sysconfdir/init/clamd.scan.conf
+install -D -p -m 0644 %SOURCE430 $RPM_BUILD_ROOT%_unitdir/clamd(a)scan.service
+
+cat << EOF > $RPM_BUILD_ROOT%_tmpfilesdir/clamd.scan.conf
+d %scanstatedir 0710 %scanuser %scanuser
+EOF
+
+touch $RPM_BUILD_ROOT%scanstatedir/clamd.{sock,pid}
-install -d -m0755 %{buildroot}%{_localstatedir}/run/clamav/
-install -d -m0755 %{buildroot}%{_sysconfdir}/clamd.d/
-install -Dp -m0644 %{SOURCE11} %{buildroot}%{_localstatedir}/lib/clamav/main.cvd
-install -Dp -m0644 %{SOURCE12} %{buildroot}%{_localstatedir}/lib/clamav/daily.cvd
-install -Dp -m0644 %{SOURCE13} %{buildroot}%{_localstatedir}/lib/clamav/bytecode.cvd
-touch $RPM_BUILD_ROOT%{_localstatedir}/lib/clamav/bytecode.cld
-touch $RPM_BUILD_ROOT%{_localstatedir}/lib/clamav/{daily,main}.cld
-touch $RPM_BUILD_ROOT%{_localstatedir}/lib/clamav/mirrors.dat
+### The milter stuff
+sed -r \
+ -e 's!^#?(User).*!\1 %milteruser!g' \
+ -e 's!^#?(AllowSupplementaryGroups|LogSyslog) .*!\1 yes!g' \
+ -e 's! /tmp/clamav-milter.socket! %milterstatedir/clamav-milter.socket!g' \
+ -e 's! /var/run/clamav-milter.pid! %milterstatedir/clamav-milter.pid!g' \
+ -e 's! /var/run/clamd/clamd.socket! %scanstatedir/clamd.sock!g' \
+ -e 's! /tmp/clamav-milter.log! %milterlog!g' \
+ etc/clamav-milter.conf.sample > $RPM_BUILD_ROOT%_sysconfdir/mail/clamav-milter.conf
+
+install -D -p -m 0644 %SOURCE310 $RPM_BUILD_ROOT%_sysconfdir/init/clamav-milter.conf
+%if %{with sysv}
+install -D -p -m 0755 %SOURCE320 $RPM_BUILD_ROOT%_initrddir/clamav-milter
+%endif
+install -D -p -m 0644 %SOURCE330 $RPM_BUILD_ROOT%_unitdir/clamav-milter.service
+cat << EOF > $RPM_BUILD_ROOT%_tmpfilesdir/clamav-milter.conf
+d %milterstatedir 0710 %milteruser %milteruser
+EOF
-# Clean up for later usage in documentation
-for conf in etc/*.sample; do mv ${conf} ${conf%%.sample}; done
+rm -f $RPM_BUILD_ROOT%_sysconfdir/clamav-milter.conf.sample
+touch $RPM_BUILD_ROOT{%milterstatedir/clamav-milter.{socket,pid},%milterlog}
-%post
-/sbin/ldconfig
+%{!?with_upstart: rm -rf $RPM_BUILD_ROOT%_sysconfdir/init}
+%{!?with_systemd: rm -rf $RPM_BUILD_ROOT%_unitdir}
+%{!?with_sysv: rm -f $RPM_BUILD_ROOT%_initrddir/*}
+%{!?with_sysv: rm -rf $RPM_BUILD_ROOT%_rundir/*/*.pid}
+%{!?with_tmpfiles: rm -rf $RPM_BUILD_ROOT%_tmpfilesdir}
-ZONES="/usr/share/zoneinfo/zone.tab"
-CONFIG="/etc/sysconfig/clock"
+%if %{with systemd}
+# TODO: Evaluate using upstream's unit files
+rm $RPM_BUILD_ROOT%_unitdir/clamav-{daemon,freshclam}.*
+%endif
-if [ -r "$CONFIG" -a -r "$ZONES" -a -n "$ZONE" ]; then
- source "$CONFIG"
- export CODE="$(grep -E "\b$ZONE\b" "$ZONES" | grep -v ^# | head -1 | cut -f1 | tr [A-Z] [a-z])"
-fi
+%if %{with sysv}
+# keep clamd-wrapper in every case because it might be needed by other
+# packages
+ln -s %pkgdatadir/clamd-wrapper $RPM_BUILD_ROOT%_initrddir/clamd-wrapper
+%endif
-if [ -z "$CODE" ]; then
- export CODE="local"
-fi
+## ------------------------------------------------------------
-%{__perl} -pi -e '
- s|^(DatabaseMirror) database\.clamav\.net$|$1 db.$ENV{"CODE"}.clamav.net\n$1 db.local.clamav.net|;
- s|^(DatabaseMirror) db\.\.clamav\.net$|$1 db.$ENV{"CODE"}.clamav.net\n$1 db.local.clamav.net|;
- ' %{_sysconfdir}/freshclam.conf{,.rpmnew} &>/dev/null || :
+%check
+make check
-%postun -p /sbin/ldconfig
+## ------------------------------------------------------------
-%pre
-getent group clam >/dev/null || groupadd -r clam
-getent passwd clam >/dev/null || \
-useradd -r -g clam -d /var/lib/clamav -s /sbin/nologin \
- -c "Clam Anti Virus Checker" clam
+%pre filesystem
+getent group %{updateuser} >/dev/null || groupadd -r %{updateuser}
+getent passwd %{updateuser} >/dev/null || \
+ useradd -r -g %{updateuser} -d %{homedir} -s /sbin/nologin \
+ -c "Clamav database update user" %{updateuser}
+getent group virusgroup >/dev/null || groupadd -r virusgroup
+usermod %{updateuser} -a -G virusgroup
exit 0
-%pre -n clamd
-getent group clam >/dev/null || groupadd -r clam
-getent passwd clam >/dev/null || \
-useradd -r -g clam -d /var/lib/clamav -s /sbin/nologin \
- -c "Clam Anti Virus Checker" clam
+
+%pre scanner
+getent group %{scanuser} >/dev/null || groupadd -r %{scanuser}
+getent passwd %{scanuser} >/dev/null || \
+ useradd -r -g %{scanuser} -d / -s /sbin/nologin \
+ -c "Clamav scanner user" %{scanuser}
+usermod %{scanuser} -a -G virusgroup
exit 0
-%post -n clamd
-/sbin/chkconfig --add clamd
-%preun -n clamd
-if [ $1 -eq 0 ]; then
- /sbin/service clamd stop &>/dev/null || :
- /sbin/chkconfig --del clamd
-fi
+%{?with_tmpfiles:
+%post scanner
+%{?with_systemd:/bin/systemd-tmpfiles --create %_tmpfilesdir/clamd.scan.conf || :}}
+
+
+%post server-systemd
+test "$1" != "1" || /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+
+%postun server-systemd
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+
+
+%post scanner-sysvinit
+/sbin/chkconfig --add clamd.scan
+
+%preun scanner-sysvinit
+test "$1" != 0 || %_initrddir/clamd.scan stop &>/dev/null || :
+test "$1" != 0 || /sbin/chkconfig --del clamd.scan
+
+%postun scanner-sysvinit
+test "$1" = 0 || %_initrddir/clamd.scan condrestart >/dev/null || :
+
+
+%post scanner-upstart
+/usr/bin/killall -u %scanuser clamd 2>/dev/null || :
+
+%preun scanner-upstart
+test "$1" != "0" || /sbin/initctl -q stop clamd.scan || :
+
+
+%systemd_install scanner-systemd clamd(a)scan.service
+
+
+%post update
+test -e %freshclamlog || {
+ touch %freshclamlog
+ %__chmod 0664 %freshclamlog
+ %__chown root:%updateuser %freshclamlog
+ ! test -x /sbin/restorecon || /sbin/restorecon %freshclamlog
+}
+
+%triggerin update -- %name-update < 0.97.3-1704
+# remove me after F19
+! test -x /sbin/restorecon || /sbin/restorecon %freshclamlog &>/dev/null || :
+
+
+%triggerin milter -- clamav-scanner
+# Add the milteruser to the scanuser group; this is required when
+# milter and clamd communicate through local sockets
+/usr/sbin/groupmems -g %scanuser -a %milteruser &>/dev/null || :
+
+%pre milter
+getent group %{milteruser} >/dev/null || groupadd -r %{milteruser}
+getent passwd %{milteruser} >/dev/null || \
+ useradd -r -g %{milteruser} -d %{milterstatedir} -s /sbin/nologin \
+ -c "Clamav Milter user" %{milteruser}
+usermod %{milteruser} -a -G virusgroup
+exit 0
-%postun -n clamd
-/sbin/service clamd condrestart &>/dev/null || :
%post milter
+test -e %milterlog || {
+ touch %milterlog
+ chmod 0620 %milterlog
+ chown root:%milteruser %milterlog
+ ! test -x /sbin/restorecon || /sbin/restorecon %milterlog
+}
+%{?with_systemd:/bin/systemd-tmpfiles --create %_tmpfilesdir/clamav-milter.conf || :}
+
+
+%triggerin milter -- %name-milter < 0.97.3-1704
+# remove me after F19
+! test -x /sbin/restorecon || /sbin/restorecon %milterlog &>/dev/null || :
+
+
+%post milter-sysvinit
/sbin/chkconfig --add clamav-milter
-%preun milter
-if [ $1 -eq 0 ]; then
- /sbin/service clamav-milter stop &>/dev/null || :
- /sbin/chkconfig --del clamav-milter
-fi
+%preun milter-sysvinit
+test "$1" != 0 || %_initrddir/clamav-milter stop &>/dev/null || :
+test "$1" != 0 || /sbin/chkconfig --del clamav-milter
-%postun milter
-/sbin/service clamav-milter condrestart &>/dev/null || :
+%postun milter-sysvinit
+test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
-%pre db
-getent group clam >/dev/null || groupadd -r clam
-getent passwd clam >/dev/null || \
-useradd -r -g clam -d /var/lib/clamav -s /sbin/nologin \
- -c "Clam Anti Virus Checker" clam
-exit 0
-%post db
-# Remove old mirrors.dat, mostly because it will have the wrong
-# owner after upgrading from clamav < 0.97:
-test -f /var/lib/clamav/mirrors.dat && rm -f /var/lib/clamav/mirrors.dat
-exit 0
+%post milter-upstart
+/usr/bin/killall -u %milteruser clamav-milter 2>/dev/null || :
-%clean
-rm -rf %{buildroot}
+%preun milter-upstart
+test "$1" != "0" || /sbin/initctl -q stop clamav-milter || :
-%files
-%defattr(-, root, root, 0755)
-%doc AUTHORS BUGS ChangeLog COPYING FAQ INSTALL NEWS README
-%doc docs/*.pdf etc/freshclam.conf
-%doc %{_mandir}/man1/sigtool.1*
-%doc %{_mandir}/man1/clamscan.1*
-%doc %{_mandir}/man1/freshclam.1*
-%doc %{_mandir}/man1/clamsubmit.1*
-%doc %{_mandir}/man5/freshclam.conf.5*
-%config(noreplace) %{_sysconfdir}/freshclam.conf
-%{_bindir}/clamscan
-%{_bindir}/freshclam
-%{_bindir}/sigtool
-%{_bindir}/clambc
-%{_bindir}/clamsubmit
-%{_libdir}/libclamav.so.*
-
-%files -n clamd
-%defattr(-, root, root, 0755)
-%doc etc/clamd.conf
-%doc %{_mandir}/man1/clamdscan.1*
-%doc %{_mandir}/man1/clamconf.1*
-%doc %{_mandir}/man1/clamdtop.1*
-%doc %{_mandir}/man1/clambc.1*
-%doc %{_mandir}/man5/clamd.conf.5*
-%doc %{_mandir}/man8/clamd.8*
-%doc %{_prefix}/share/clamav/README.clamd-wrapper
-%{_prefix}/share/clamav/clamd-wrapper
-%config(noreplace) %{_sysconfdir}/clamd.conf
-%config(noreplace) %{_sysconfdir}/logrotate.d/clamav
-%{_sysconfdir}/clamd.d
-%config %{_initrddir}/clamd
-%{_sbindir}/clamd
-%{_bindir}/clamconf
-%{_bindir}/clamdscan
-%{_bindir}/clamdtop
-
-%defattr(0644, clam, clam, 0755)
-%{_localstatedir}/run/clamav/
-%dir %{_localstatedir}/lib/clamav/
-%dir %{_localstatedir}/log/clamav/
-%ghost %{_localstatedir}/log/clamav/clamd.log
-%exclude %{_localstatedir}/lib/clamav/*
-
-%if %{!?_without_milter:1}0
-%files milter
-%defattr(-, root, root, 0755)
-%doc %{_mandir}/man5/clamav-milter.conf.5*
-%doc %{_mandir}/man8/clamav-milter.8*
-%config(noreplace) %{_sysconfdir}/sysconfig/clamav-milter
-%config %{_initrddir}/clamav-milter
-%{_sbindir}/clamav-milter
-%config(noreplace) %{_sysconfdir}/clamav-milter.conf
-%endif
-%files db
-%defattr(-, root, root, 0755)
-%config(noreplace) %{_sysconfdir}/cron.daily/freshclam
-%config(noreplace) %{_sysconfdir}/logrotate.d/freshclam
+%systemd_install milter-systemd clamav-milter.service
-%defattr(0644, clam, clam, 0755)
-%config(noreplace) %verify(user group mode) %{_localstatedir}/lib/clamav/
-%dir %{_localstatedir}/log/clamav/
-%ghost %{_localstatedir}/log/clamav/freshclam.log
-%ghost %attr(0664,%username,%username) %{_localstatedir}/lib/clamav/*.cld
-%ghost %attr(0664,%username,%username) %{_localstatedir}/lib/clamav/mirrors.dat
+%post lib -p /sbin/ldconfig
+%postun lib -p /sbin/ldconfig
-%files devel
-%defattr(-, root, root, 0755)
-%{_bindir}/clamav-config
-%{_includedir}/clamav.h
-%{_libdir}/libclamav.so
-%{_libdir}/pkgconfig/libclamav.pc
-#%{_libdir}/libclamav.a
-%exclude %{_libdir}/libclamav.la
-%changelog
-* Sun Nov 26 2017 Robert Scheck <robert(a)fedoraproject.org> - 0.99.2-3
-- Backported upstream patch to unbreak e2guardian vs. temp files
+%files
+%doc AUTHORS BUGS COPYING ChangeLog FAQ NEWS README UPGRADE
+%doc docs/*.pdf
+%_bindir/*
+%_mandir/man[15]/*
+%exclude %_bindir/clamav-config
+%exclude %_bindir/freshclam
+%exclude %_mandir/*/freshclam*
-* Tue Mar 28 2017 Robert Scheck <robert(a)fedoraproject.org> - 0.99.2-2
-- Ensure that missing or invalid timezone configuration does not
- mangle /etc/freshclam.conf in %%post (#1154756)
+## -----------------------
-* Mon Jun 13 2016 Orion Poplawski <orion(a)cora.nwra.com> - 0.99.2-1
-- Update to 0.99.2
-- Enable llvm
-- Drop cliopts patch fixed upstream, use upstream's "--forground" option name
-- Fix main.cvd (fedora #1325482, epel #1325717)
-- Own bytecode.cld (#1176252) and mirrors.dat, ship bytecode.cvd
-- Update daily.cvd
-- Fixup Requires(pre) usage (#1319151)
+%files lib
+%_libdir/*.so.*
-* Tue Mar 29 2016 Robert Scheck <robert(a)fedoraproject.org> - 0.99.1-1
-- Upgrade to 0.99.1 and updated main.cvd and daily.cvd (#1314115)
+## -----------------------
-* Mon Dec 07 2015 Robert Scheck <robert(a)fedoraproject.org> - 0.99-3
-- Added missing build-time requirement to pcre-devel
+%files devel
+%_includedir/*
+%_libdir/*.so
+%pkgdatadir/template
+%pkgdatadir/clamd-gen
+%_libdir/pkgconfig/*
+%_bindir/clamav-config
-* Sun Dec 06 2015 Robert Scheck <robert(a)fedoraproject.org> - 0.99-2
-- Require openssl-devel for clamav-devel
+## -----------------------
-* Wed Dec 02 2015 Robert Scheck <robert(a)fedoraproject.org> - 0.99-1
-- Upgrade to 0.99 and updated daily.cvd (#1287327)
+%files filesystem
+%attr(-,%updateuser,%updateuser) %dir %homedir
+%attr(-,root,root) %dir %pkgdatadir
+%dir %_sysconfdir/clamd.d
-* Wed Apr 29 2015 Robert Scheck <robert(a)fedoraproject.org> - 0.98.7-1
-- Upgrade to 0.98.7 and updated daily.cvd (#1217014)
+## -----------------------
-* Tue Feb 24 2015 Joel Smith <joelsmith(a)fedoraproject.org> - 0.98.6-2
-- Make init script source /etc/sysconfig/clamd if present (#1195864)
+%files data
+%defattr(-,%updateuser,%updateuser,-)
+# 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
-* Thu Jan 29 2015 Robert Scheck <robert(a)fedoraproject.org> - 0.98.6-1
-- Upgrade to 0.98.6 and updated daily.cvd (#1187050)
-* Wed Nov 19 2014 Robert Scheck <robert(a)fedoraproject.org> - 0.98.5-1
-- Upgrade to 0.98.5 and updated daily.cvd (#1138101)
+%files data-empty
+%defattr(-,%updateuser,%updateuser,-)
+%ghost %attr(0664,%updateuser,%updateuser) %homedir/*.cvd
-* Sat Jun 21 2014 Robert Scheck <robert(a)fedoraproject.org> - 0.98.4-1
-- Upgrade to 0.98.4 and updated daily.cvd (#1111811)
-- Add build requirement to libxml2 for DMG, OpenIOC and XAR
-* Fri May 09 2014 Paul Wouters <pwouters(a)redhat.com> - 0.98.3-1
-- Upgrade to 0.98.3
-- Fix --with-libcurl parameter to avoid automatic path detection breakage
-- openssl-devel is now required for hashing code.
-- Added clamsubmit to main package
-- Re-enabled --with-llvm as this speeds up deployment a lot.
-- Fixed older changelog dates
+## -----------------------
-* Wed Jan 15 2014 Robert Scheck <robert(a)fedoraproject.org> - 0.98.1-1
-- Upgrade to 0.98.1 and updated daily.cvd (#1053400)
+%files update
+%_bindir/freshclam
+%_mandir/*/freshclam*
+%pkgdatadir/freshclam-sleep
+%config(noreplace) %verify(not mtime) %_sysconfdir/freshclam.conf
+%config(noreplace) %verify(not mtime) %_sysconfdir/logrotate.d/*
+%config(noreplace) %_sysconfdir/cron.d/clamav-update
+%config(noreplace) %_sysconfdir/sysconfig/freshclam
-* Sat Oct 19 2013 Robert Scheck <robert(a)fedoraproject.org> - 0.98-2
-- Really fix all discrepancies between clamd initscript and clamd
- config file (#960923, thanks to John Horne)
-- Ensure that a clamd and clamav-milter condrestart via initscript
- works (#1018312, thanks to Filippo Carletti)
+%ghost %attr(0664,root,%updateuser) %verify(not size md5 mtime) %freshclamlog
+%ghost %attr(0664,%updateuser,%updateuser) %homedir/*.cld
+%ghost %attr(0664,%updateuser,%updateuser) %homedir/mirrors.dat
-* Sun Oct 06 2013 Robert Scheck <robert(a)fedoraproject.org> - 0.98-1
-- Upgrade to 0.98 and updated main.cvd and daily.cvd (#1010168)
-- Fixed discrepancies between clamd initscript and clamd config
- file (#960923, thanks to John Horne)
-- Added build requirement to ncurses-devel for clamdtop (again)
-- Moved clamd wrapper script and documentation into correct sub-
- package (#782596, thanks to Philip Prindeville)
-
-* Tue Apr 23 2013 Orion Poplawski <orion(a)cora.nwra.com> - 0.97.8-1
-- Upgrade to 0.97.8
-- Updated daily.cvd
-
-* Mon Mar 18 2013 Orion Poplawski <orion(a)cora.nwra.com> - 0.97.7-1
-- Upgrade to 0.97.7
-
-* Tue Sep 18 2012 Nick Bebout <nb(a)fedoraproject.org> - 0.97.6-1
-- Upgrade to 0.97.6
-
-* Wed Jun 20 2012 Nick Bebout <nb(a)fedoraproject.org> - 0.97.5-1
-- Upgrade to 0.97.5
-- Fix CVE-2012-1419 clamav: specially-crafted POSIX tar files evade detection
-- Fix CVE-2012-1457 clamav: overly long length field in tar files evade detection
-- Fix CVE-2012-1443 clamav: specially-crafted RAR files evade detection
-- Fix CVE-2012-1458 clamav: specially-crafted CHM files evade detection
-- Fix CVE-2012-1459 clamav: specially-crafted length field in tar files evade detection
-- Ship local copy of virus database; it was removed by accident from 0.97.5 tarball
-
-* Thu Jan 19 2012 Nick Bebout <nb(a)fedoraproject.org> - 0.97.3-4
-- Split files out into SCM instead of in the spec
-
-* Sun Jan 1 2012 Nick Bebout <nb(a)fedoraproject.org> - 0.97.3-3
-- Revert patch from 0.97.3-2
-
-* Tue Oct 18 2011 Nick Bebout <nb(a)fedoraproject.org> - 0.97.3-1
-- Update to 0.97.3
-- Fix CVE-2011-3627 clamav: Recursion level crash fixed in v0.97.3
-
-* Thu Aug 4 2011 Jan-Frode Myklebuust <janfrode(a)tanso.net> - 0.97.2-5
-- Configure MilterSocket, PidFile and MilterSocket in clamav-milter.conf.
- (bz#727894)
-
-* Wed Jul 27 2011 Jan-Frode Myklebuust <janfrode(a)tanso.net> - 0.97.2-3
-- include updated clamd-wrapper which get the PidFile setting from the
- service configuration file.
-- updated to 0.97.2
-- Build-require xz
-- CVE-2011-2721 Off-by-one error by scanning message hashes (#725694)
-* Wed Jun 29 2011 Nick Bebout <nb(a)fedoraproject.org> - 0.97-14
-- Require /usr/sbin/sendmail instead of sendmail
+## -----------------------
-* Tue Apr 26 2011 Jan-Frode Myklebust <janfrode(a)tanso.net> - 0.97-13
-- Obsolete and provide clamav-milter-sysvinit (bz#696856)
+%files server
+%doc _doc_server/*
+%_mandir/man5/clamd.conf.5*
+%_mandir/man8/clamd.8*
+%_sbindir/clamd
-* Wed Mar 30 2011 Jan-Frode Myklebust <janfrode(a)tanso.net> - 0.97-12
-- Move deletion of /var/lib/clamav/mirrors.dat to db package.
-- Don't enable NotifyClamd in freshclam config and cronjob, as not
- everybody is running clamd. Running clamd's will anyway notice
- when db is updated.
+%if %{with sysv}
+%files server-sysvinit
+%_initrddir/clamd-wrapper
+%pkgdatadir/clamd-wrapper
+%endif
+
+%if %{with systemd}
+%files server-systemd
+ %_unitdir/clamd@.service
+%endif
-* Fri Mar 18 2011 Jan-Frode Myklebust <janfrode(a)tanso.net> - 0.97-11
-- Delete /var/lib/clamav/mirrors.dat, it will be recreated on first run.
-- clamav-milter config cleanups.
+## -----------------------
-* Wed Mar 16 2011 Jan-Frode Myklebust <janfrode(a)tanso.net> - 0.97-10
-- Make sure /var/lib/clamav/mirrors.dat has owner fixed on upgrade.
-- Don't start clamd or milter service by default.
+%files scanner
+%config(noreplace) %_sysconfdir/clamd.d/scan.conf
+%ghost %scanstatedir/clamd.sock
-* Tue Mar 15 2011 Jan-Frode Myklebust <janfrode(a)tanso.net> - 0.97-7
-- rpm-provide all old package names that are now obsoleted
+%if %{with tmpfiles}
+ %_tmpfilesdir/clamd.scan.conf
+ %ghost %dir %attr(0710,%scanuser,%scanuser) %scanstatedir
+%else
+ %dir %attr(0710,%scanuser,%scanuser) %scanstatedir
+%endif
-* Mon Mar 14 2011 Jan-Frode Myklebust <janfrode(a)tanso.net> - 0.97-6
-- clam-db obsoletes old clamav-data-empty.
+%if %{with sysv}
+%files scanner-sysvinit
+ %attr(0755,root,root) %config %_initrddir/clamd.scan
+ %ghost %scanstatedir/clamd.pid
+%endif
-* Sun Mar 13 2011 Jan-Frode Myklebust <janfrode(a)tanso.net> - 0.97-4
-- Add back clamd-wrapper to stay compatible with users
- of old packaging (amavisd-new).
+%if %{with upstart}
+%files scanner-upstart
+ %config(noreplace) %_sysconfdir/init/clamd.scan*
+%endif
-* Wed Feb 23 2011 Nick Bebout <nb(a)fedoraproject.org> - 0.097-3
-- Move db to /var/lib/clamav
-- Ship empty directory /etc/clamd.d for amavisd-new
+%if %{with systemd}
+%files scanner-systemd
+ %_unitdir/clamd(a)scan.service
+%endif
-* Thu Feb 17 2011 Kevin Fenzi <kevin(a)tummy.com> - 0.97-2
-- Disable llvm.
+## -----------------------
-* Tue Feb 08 2011 Kevin Fenzi <kevin(a)tummy.com> - 0.97-1
-- Update to 0.97
-- Fix up for current guidelines.
+%files milter
+%doc clamav-milter/README.fedora
+%_sbindir/*milter*
+%_mandir/man8/clamav-milter*
+%dir %_sysconfdir/mail
+%config(noreplace) %_sysconfdir/mail/clamav-milter.conf
+%ghost %attr(0620,root,%milteruser) %verify(not size md5 mtime) %milterlog
+%ghost %milterstatedir/clamav-milter.socket
+
+%if %{with tmpfiles}
+ %_tmpfilesdir/clamav-milter.conf
+ %ghost %dir %attr(0710,%milteruser,%milteruser) %milterstatedir
+%else
+ %dir %attr(0710,%milteruser,%milteruser) %milterstatedir
+%endif
-* Fri Nov 23 2007 Kevin Fenzi <kevin(a)tummy.com> - 0.91.2-3
-- Change username to get upgrades from fedora versions working.
+%if %{with sysv}
+%files milter-sysvinit
+ %config %_initrddir/clamav-milter
+ %ghost %milterstatedir/clamav-milter.pid
+%endif
-* Thu Nov 22 2007 Kevin Fenzi <kevin(a)tummy.com> - 0.91.2-2
-- Initial changes for EPEL version.
+%if %{with upstart}
+%files milter-upstart
+ %config(noreplace) %_sysconfdir/init/clamav-milter*
+%endif
-* Tue Aug 21 2007 Dag Wieers <dag(a)wieers.com> - 0.91.2-1
-- Updated to release 0.91.2.
+%if %{with systemd}
+%files milter-systemd
+ %_unitdir/clamav-milter.service
+%endif
-* Tue Jul 17 2007 Dag Wieers <dag(a)wieers.com> - 0.91.1-1
-- Updated to release 0.91.1.
-* Wed Jul 11 2007 Dag Wieers <dag(a)wieers.com> - 0.91-1
-- Updated to release 0.91.
+%changelog
+* Fri Jan 26 2018 Orion Poplawski <orion(a)nwra.com> - 0.99.3-1
+- Update to 0.99.3
+- Security fixes CVE-2017-12374 CVE-2017-12375 CVE-2017-12376 CVE-2017-12377
+ CVE-2017-12378 CVE-2017-12379 CVE-2017-12380 (bug #1539030)
+- Drop clamav-notify-servers and it's dependency on ncat (bug #1530678)
+
+* Wed Jan 17 2018 Sérgio Basto <sergio(a)serjux.com> - 0.99.2-18
+- Fix type of clamd@ service
+- Fix packages name of Obsoletes directives
+- Also fix type of clamav-milter.service
+
+* Thu Jan 11 2018 Sérgio Basto <sergio(a)serjux.com> - 0.99.2-17
+- Security fixes CVE-2017-6420 (#1483910), CVE-2017-6418 (#1483908)
+
+* Tue Jan 09 2018 Sérgio Basto <sergio(a)serjux.com> - 0.99.2-16
+- Make sure that Obsoletes sysv and upstart for Epel upgrade and update
+
+* Mon Jan 08 2018 Sérgio Basto <sergio(a)serjux.com> - 0.99.2-15
+- Fix rundir path (#1126595)
+- Update main.cvd, daily.cvd and bytecode.cvd
+- Fixes for rhbz 1464269 and rhbz 1126625
+- Move Sources and BuildRequires to the beginning
+- Build systemd for F22+ and el7+
+- Build sysv and upstart for el6 else build only sysv
+- Only enable tmpfiles with systemd enabled
+- Move descritions to near the package macro and remove his build
+ conditionals, this also fix the generation of src.rpm
+- Remove hack from 2010 (git show e1a9be60)
+- Use autoreconf without --force
+
+* Thu Jan 04 2018 Sérgio Basto <sergio(a)serjux.com> - 0.99.2-14
+- Use 4 spaces instead tabs
+- Fix rhbz #1530678
+- Fix rhbz #1518016
+- Simplify conditional builds reference: /usr/lib/rpm/macros
+- use make_build and make install macros
+
+* Sun Nov 26 2017 Robert Scheck <robert(a)fedoraproject.org> - 0.99.2-13
+- Backported upstream patch to unbreak e2guardian vs. temp files
-* Thu May 31 2007 Dag Wieers <dag(a)wieers.com> - 0.90.3-1
-- Updated to release 0.90.3.
+* Fri Sep 15 2017 Sérgio Basto <sergio(a)serjux.com> - 0.99.2-12
+- Try fix rhbz #1473642
-* Fri Apr 27 2007 Dag Wieers <dag(a)wieers.com> - 0.90.2-2
-- Added clamav-milter support for EL2.1 now that it comes with a newer sendmail. (Tom G. Christensen)
+* Wed Aug 02 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.99.2-11
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
-* Sun Apr 15 2007 Dag Wieers <dag(a)wieers.com> - 0.90.2-1
-- Updated to release 0.90.2.
+* Wed Jul 26 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.99.2-10
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
-* Fri Mar 09 2007 Dag Wieers <dag(a)wieers.com> - 0.90.1-4
-- Removed circular dependency.
+* Mon Jul 17 2017 Sérgio Basto <sergio(a)serjux.com> - 0.99.2-9
+- Add patch for openssl-1.1
-* Thu Mar 08 2007 Dag Wieers <dag(a)wieers.com> - 0.90.1-3
-- Cleaned up default options to clamav-milter. (Adam T. Bowen)
-- Removed -b/--bounce as it is no longer recognized. (Gerald Teschl)
+* Mon Mar 27 2017 Orion Poplawski <orion(a)cora.nwra.com> - 0.99.2-8
+- Create virusgroup group and add the various clam* users to it
-* Mon Mar 05 2007 Dag Wieers <dag(a)wieers.com> - 0.90.1-2
-- Removed the erroneous --dont-clean-log from the clamav-milter sysconfig. (Gerald Teschl)
+* Sun Mar 26 2017 Orion Poplawski <orion(a)cora.nwra.com> - 0.99.2-7
+- Fix clamav-milter startup under selinux (bug #1434176)
+- Move /etc/clam.d to clamav-filesystem (bug #1275630)
+- Make clamav-milter own /etc/mail (bug #1175473)
-* Fri Mar 02 2007 Dag Wieers <dag(a)wieers.com> - 0.90.1-1
-- Updated to release 0.90.1.
+* Sun Mar 26 2017 Orion Poplawski <orion(a)cora.nwra.com> - 0.99.2-6
+- Start clamav-milter after clamd@scan (bug #1356507))
-* Tue Feb 20 2007 Dag Wieers <dag(a)wieers.com> - 0.90-3
-- Do the right thing...
+* Sun Mar 26 2017 Orion Poplawski <orion(a)cora.nwra.com> - 0.99.2-5
+- Allow freshclam to run automatically on install (bug #1408649)
-* Mon Feb 19 2007 Dag Wieers <dag(a)wieers.com> - 0.90-2
-- The tarball was re-rolled before public release. Sigh.
+* Fri Feb 10 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.99.2-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
-* Tue Feb 13 2007 Dag Wieers <dag(a)wieers.com> - 0.90-1
-- Updated to release 0.90.
+* Mon Nov 07 2016 Richard W.M. Jones <rjones(a)redhat.com> - 0.99.2-3
+- Rebuild for OCaml 4.04.0.
-* Tue Dec 12 2006 Dag Wieers <dag(a)wieers.com> - 0.88.7-1
-- Updated to release 0.88.7.
+* Tue Oct 18 2016 Orion Poplawski <orion(a)cora.nwra.com> - 0.99.2-2
+- Also send logrotate script stdout to /dev/null (bug #1376815)
-* Sun Nov 05 2006 Dag Wieers <dag(a)wieers.com> - 0.88.6-1
-- Updated to release 0.88.6.
-- Added condrestart to sysv scripts. (Tsai Li Ming)
+* Mon Jun 13 2016 Orion Poplawski <orion(a)cora.nwra.com> - 0.99.2-1
+- Update to 0.99.2
+- Drop cliopts patch fixed upstream, use upstream's "--forground" option name
+- Fix main.cvd (fedora #1325482, epel #1325717)
+- Own bytecode.cld (#1176252) and mirrors.dat, ship bytecode.cvd
+- Update daily.cvd
+- Fixup Requires(pre) usage (#1319151)
-* Sat Oct 28 2006 Dag Wieers <dag(a)wieers.com> - 0.88.5-2
-- Added missing clamav dependency to clamav-db.
+* Tue Mar 29 2016 Robert Scheck <robert(a)fedoraproject.org> - 0.99.1-1
+- Upgrade to 0.99.1 and updated main.cvd and daily.cvd (#1314115)
+- Complain about antivirus_use_jit rather clamd_use_jit (#1295473)
-* Sun Oct 15 2006 Dag Wieers <dag(a)wieers.com> - 0.88.5-1
-- Updated to release 0.88.5.
+* Tue Mar 29 2016 Robert Scheck <robert(a)fedoraproject.org> - 0.99-4
+- Link using %%{?__global_ldflags} for hardened builds (#1321173)
+- Build using -std=gnu++98 (#1307378, thanks to Yaakov Selkowitz)
-* Mon Aug 07 2006 Dag Wieers <dag(a)wieers.com> - 0.88.4-1
-- Updated to release 0.88.4.
+* Wed Feb 03 2016 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.99-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
-* Mon Aug 07 2006 Dag Wieers <dag(a)wieers.com> - 0.88.3-2
-- Incorporated UPX heap overflow fix.
+* Sun Dec 06 2015 Robert Scheck <robert(a)fedoraproject.org> - 0.99-2
+- Require openssl-devel for clamav-devel
+- Change clamav-milter unit for upstream changes (#1287795)
-* Sat Jul 01 2006 Dag Wieers <dag(a)wieers.com> - 0.88.3-1
-- Updated to release 0.88.3.
+* Wed Dec 02 2015 Robert Scheck <robert(a)fedoraproject.org> - 0.99-1
+- Upgrade to 0.99 and updated daily.cvd (#1287327)
-* Sun Apr 30 2006 Dag Wieers <dag(a)wieers.com> - 0.88.2-1
-- Updated to release 0.88.2.
+* Tue Jun 30 2015 Robert Scheck <robert(a)fedoraproject.org> - 0.98.7-3
+- Move /etc/tmpfiles.d/ to /usr/lib/tmpfiles.d/ (#1126595)
-* Tue Apr 04 2006 Dag Wieers <dag(a)wieers.com> - 0.88.1-1
-- Updated to release 0.88.1.
+* Wed Jun 17 2015 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0.98.7-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
-* Mon Jan 09 2006 Dag Wieers <dag(a)wieers.com> - 0.88-1
-- Updated to release 0.88.
+* Wed Apr 29 2015 Robert Scheck <robert(a)fedoraproject.org> - 0.98.7-1
+- Upgrade to 0.98.7 and updated daily.cvd (#1217014)
-* Sun Nov 13 2005 Dries Verachtert <dries(a)ulyssis.org> - 0.87.1-1
-- Updated to release 0.87.1.
+* Tue Mar 10 2015 Adam Jackson <ajax(a)redhat.com> 0.98.6-2
+- Drop sysvinit subpackages in F23+
-* Sat Sep 17 2005 Dag Wieers <dag(a)wieers.com> - 0.87-1
-- Updated to release 0.87.
+* Thu Jan 29 2015 Robert Scheck <robert(a)fedoraproject.org> - 0.98.6-1
+- Upgrade to 0.98.6 and updated daily.cvd (#1187050)
-* Mon Jul 25 2005 Dag Wieers <dag(a)wieers.com> - 0.86.2-1
-- Updated to release 0.86.2.
+* Wed Nov 19 2014 Robert Scheck <robert(a)fedoraproject.org> - 0.98.5-2
+- Corrected summary of clamav-server-systemd package (#1165672)
-* Mon Jul 11 2005 Dag Wieers <dag(a)wieers.com> - 0.86.1-1
-- Updated to release 0.86.1.
+* Wed Nov 19 2014 Robert Scheck <robert(a)fedoraproject.org> - 0.98.5-1
+- Upgrade to 0.98.5 and updated daily.cvd (#1138101)
-* Mon May 16 2005 Dag Wieers <dag(a)wieers.com> - 0.85.1-1
-- Updated to release 0.85.1.
+* Sat Aug 16 2014 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0.98.4-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
-* Fri Apr 29 2005 Dag Wieers <dag(a)wieers.com> - 0.84-1
-- Updated to release 0.84.
+* Sat Jun 21 2014 Robert Scheck <robert(a)fedoraproject.org> - 0.98.4-1
+- Upgrade to 0.98.4 and updated daily.cvd (#1111811)
+- Add build requirement to libxml2 for DMG, OpenIOC and XAR
-* Mon Feb 14 2005 Dag Wieers <dag(a)wieers.com> - 0.83-1
-- Updated to release 0.83.
+* Sat Jun 07 2014 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0.98.3-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
-* Thu Feb 10 2005 Dag Wieers <dag(a)wieers.com> - 0.82-2
-- Fix for false positive on RIFF files. (Roger Jochem)
+* Sat May 10 2014 Robert Scheck <robert(a)fedoraproject.org> - 0.98.3-1
+- Upgrade to 0.98.3 and updated daily.cvd (#1095614)
+- Avoid automatic path detection breakage regarding curl
+- Added build requirement to openssl-devel for hasing code
+- Added clamsubmit to main package
-* Mon Feb 07 2005 Dag Wieers <dag(a)wieers.com> - 0.82-1
-- Updated to release 0.82.
+* Wed Jan 15 2014 Robert Scheck <robert(a)fedoraproject.org> - 0.98.1-1
+- Upgrade to 0.98.1 and updated daily.cvd (#1053400)
-* Thu Jan 27 2005 Dag Wieers <dag(a)wieers.com> - 0.81-1
-- Improved logrotate scripts. (Filippo Grassilli)
-- Updated to release 0.81.
+* Wed Oct 09 2013 Dan Horák <dan[at]danny.cz> - 0.98-2
+- Use fanotify from glibc instead of the limited hand-crafted version
-* Wed Dec 01 2004 Dag Wieers <dag(a)wieers.com> - 0.80-2
-- Added %%dir /var/clamav/log. (Adam Bowns)
-- Changed logrotate script to use clamd.log. (Stuart Schneider)
-- Added curl dependency. (Petr Kristof)
-- Synchronized some options from Petr. (Petr Kristof)
-- Fixed another clamav.conf reference. (Michael Best)
+* Sun Oct 06 2013 Robert Scheck <robert(a)fedoraproject.org> - 0.98-1
+- Upgrade to 0.98 and updated main.cvd and daily.cvd (#1010168)
-* Mon Nov 01 2004 Dag Wieers <dag(a)wieers.com> - 0.80-1
-- Updated package description. (Arvin Troels)
-- Incorporated fixes from Jima. (Jima)
-- Config clamav.conf renamed to clamd.conf.
-- Removed obsolete patch.
-- Added macros for building without milter.
-- Updated to release 0.80.
+* Wed Aug 07 2013 Pierre-Yves Chibon <pingou(a)pingoured.fr> - 0.97.8-4
+- Add a missing requirement on crontabs to spec file
+- Fix RHBZ#988605
-* Fri Jul 30 2004 Dag Wieers <dag(a)wieers.com> - 0.75.1-1
-- Added obsoletes for fedora.us.
-- Updated to release 0.75.1.
+* Sat Aug 03 2013 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0.97.8-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
-* Mon Jul 26 2004 Dag Wieers <dag(a)wieers.com> - 0.75-2
-- Fixed a problem where $CODE was empty.
+* Thu May 2 2013 Nick Bebout <nb(a)fedoraproject.org> - 0.97.8-1
+- Update to 0.97.8
-* Fri Jul 23 2004 Dag Wieers <dag(a)wieers.com> - 0.75-1
-- Updated to release 0.75.
+* Wed Apr 10 2013 Jon Ciesla <limburgher(a)gmail.com> - 0.97.7-2
+- Migrate from fedora-usermgmt to guideline scriptlets.
-* Wed Jun 30 2004 Dag Wieers <dag(a)wieers.com> - 0.74-1
-- Updated to release 0.74.
+* Sat Mar 23 2013 Nick Bebout <nb(a)fedoraproject.org> - 0.97.7-1
+- Update to 0.97.7
-* Tue Jun 15 2004 Dag Wieers <dag(a)wieers.com> - 0.73-1
-- Updated to release 0.73.
+* Wed Feb 13 2013 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0.97.6-1901
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
-* Thu Jun 03 2004 Dag Wieers <dag(a)wieers.com> - 0.72-1
-- Updated to release 0.72.
+* Sat Sep 22 2012 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.97.6-1900
+- updated to 0.97.6
+- use %%systemd macros
-* Thu May 20 2004 Dag Wieers <dag(a)wieers.com> - 0.71-1
-- Updated to release 0.71.
+* Tue Aug 14 2012 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.97.5-1900
+- disabled upstart support
-* Sun May 02 2004 Dag Wieers <dag(a)wieers.com> - 0.70-2
-- Fixed the installation check for conf files. (Richard Soderberg, Udo Ruecker)
-- Changed the init-order of the sysv scripts. (Will McCutcheon)
-- Changes to the default configuration files.
+* Wed Jul 18 2012 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0.97.5-1801
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
-* Wed Mar 17 2004 Dag Wieers <dag(a)wieers.com> - 0.70-1
-- Updated to release 0.70.
+* Sat Jun 16 2012 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.97.5-1800
+- updated to 0.97.5
+- CVE-2012-1457: allows to bypass malware detection via a TAR archive
+ entry with a length field that exceeds the total TAR file size
+- CVE-2012-1458: allows to bypass malware detection via a crafted
+ reset interval in the LZXC header of a CHM file
+- CVE-2012-1459: allows to bypass malware detection via a TAR archive
+ entry with a length field corresponding to that entire entry, plus
+ part of the header of the next entry
+- ship local copy of virus database; it was removed by accident from
+ 0.97.5 tarball
+- removed sysv compat stuff
-* Tue Mar 16 2004 Dag Wieers <dag(a)wieers.com> - 0.68-1
-- Updated to release 0.68.
+* Fri Apr 13 2012 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.97.4-1801
+- build with -fPIE
-* Fri Mar 12 2004 Dag Wieers <dag(a)wieers.com> - 0.67.1-1
-- Updated to release 0.67-1.
-- Added clamdwatch and trashcan to clamd.
+* Fri Mar 16 2012 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.97.4-1800
+- updated to 0.97.4
-* Mon Mar 08 2004 Dag Wieers <dag(a)wieers.com> - 0.67-1
-- Personalized SPEC file.
+* Sun Feb 5 2012 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.97.3-1703
+- fixed SELinux restorecon invocation
+- added trigger to fix SELinux contexts of logfiles created by old
+ packages
+- fixed build with recent gcc/glibc toolchain
-* Fri Aug 22 2003 Matthias Saou/Che
-- Added "--without milter" build option. (Matthias Saou)
-- Fixed freshclam cron (Matthias Saou)
-- Built the new package. (Che)
+* Sat Jan 21 2012 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.97.3-1703
+- rewrote clamav-notify-servers to be init system neutral
+- set PrivateTmp systemd option (#782488)
-* Tue Jun 24 2003 Che
-- clamav-milter introduced.
-- a few more smaller fixes.
+* Sun Jan 8 2012 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.97.3-1702
+- set correct SELinux context for logfiles generated in %%post (#754555)
+- create systemd tmpfiles in %%post
+- created -server-systemd subpackage providing a clamd@.service template
+- made script in -scanner-systemd an instance of clamd@.service
-* Sun Jun 22 2003 Che
-- version upgrade
+* Tue Oct 18 2011 Nick Bebout <nb(a)fedoraproject.org> - 0.97.3-1700
+- updated to 0.97.3
+- CVE-2011-3627 clamav: Recursion level crash fixed in v0.97.3
-* Mon Jun 16 2003 Che
-- rh9 build
-- various fixes
-- got rid of rpm-helper prereq
+* Thu Aug 4 2011 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.97.2-1700
+- moved sysv wrapper script into -sysv subpackage
+- start systemd services after network.target and nss-lookup.target
-* Mon Mar 24 2003 Che
-- some cleanups and fixes
-- new patch added
+* Tue Jul 26 2011 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.97.2-1600
+- updated to 0.97.2
+- CVE-2011-2721 Off-by-one error by scanning message hashes (#725694)
+- fixed systemd scripts and their installation
+
+* Thu Jun 9 2011 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.97.1-1600
+- updated to 0.97.1
+- fixed Requires(preun) vs. Requires(postun) inconsistency
-* Fri Nov 22 2002 Che
-- fixed a config patch issue
+* Sat Apr 23 2011 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.97-1601
+- fixed tmpfiles.d syntax (#696812)
-* Fri Nov 22 2002 Che
-- version upgrade and some fixes
+* Sun Feb 20 2011 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.97-1600
+- updated to 0.97
+- rediffed some patches
-* Sat Nov 02 2002 Che
-- version upgrade
+* Tue Feb 08 2011 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0.96.5-1503
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+
+* Sat Jan 8 2011 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.5-1502
+- fixed signal specifier in clamd-wrapper (#668131, James Ralston)
-* Thu Oct 24 2002 Che
-- some important changes for lsb compliance
+* Fri Dec 24 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.5-1501
+- added systemd init scripts which obsolete to old sysvinit ones
+- added tmpfiles.d/ descriptions
-* Wed Oct 23 2002 Che
-- initial rpm release
+* Sat Dec 4 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.5-1500
+- updated to 0.96.5
+- CVE-2010-4260 Multiple errors within the processing of PDF files can
+ be exploited to e.g. cause a crash.
+- CVE-2010-4261 An off-by-one error within the "icon_cb()" function
+ can be exploited to cause a memory corruption.
+
+* Sun Oct 31 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.4-1500
+- updated to 0.96.4
+- execute 'make check' (#640347) but ignore errors for now because
+ four checks are failing on f13
+
+* Wed Sep 29 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.3-1501
+- lowered stop priority of sysv initscripts (#629435)
+
+* Wed Sep 22 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.3-1500
+- updated to 0.96.3
+- fixes CVE-2010-0405 in shipped bzlib.c copy
+
+* Sun Aug 15 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.2-1500
+- updated to 0.96.2
+- rediffed patches
+- removed the -jit-disable patch which is replaced upstream by a more
+ detailed configuration option.
+
+* Wed Aug 11 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
+- removed old %%trigger which renamed the 'clamav' user- and groupnames
+ to 'clamupdate'
+- use 'groupmems', not 'usermod' to add a user to a group because
+ 'usermod' does not work when user does not exist in local /etc/passwd
+
+* Tue Jul 13 2010 Dan Horák <dan[at]danny.cz> - 0.96.1-1401
+- ocaml not available (at least) on s390(x)
+
+* Tue Jun 1 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.1-1400
+- updated to 0.96.1
+- rediffed patches
+
+* Sat May 29 2010 Rakesh Pandit <rakesh(a)fedoraproject.org> - 0.96.1403
+- CVE-2010-1639 Clam AntiVirus: Heap-based overflow, when processing malicious PDF file(s)
+
+* Wed Apr 21 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96-1402
+- updated to final 0.96
+- applied upstream patch which allows to disable JIT compiler (#573191)
+- build JIT compiler again
+- disabled JIT compiler by default
+- removed explicit 'pkgconfig' requirements in -devel (#533956)
+
+* Sat Mar 20 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96-0.1401.rc1
+- do not build the bytecode JIT compiler for now until it can be disabled
+ at runtime (#573191)
+
+* Thu Mar 11 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96-1400.rc1
+- updated to 0.96rc1
+- added some BRs
+
+* Sun Dec 6 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.3-1301
+- updated -upstart to upstart 0.6.3
+
+* Sat Nov 21 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
+- adjusted chkconfig positions for clamav-milter (#530101)
+- use %%apply instead of %%patch
+
+* Thu Oct 29 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.3-1300
+- updated to 0.95.3
+
+* Sun Sep 13 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
+- conditionalized build of noarch subpackages to ease packaging under RHEL5
+
+* Sun Aug 9 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.2-5
+- modified freshclam configuration to log by syslog by default
+- disabled LocalSocket option in sample configuration
+- fixed clamav-milter sysv initscript to use bash interpreter and to
+ be disabled by default
+
+* Sat Aug 8 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.2-4
+- renamed 'clamav' user/group to 'clamupdate'
+- add the '%milteruser' user to the '%scanuser' group when the -scanner
+ subpackage is installed
+
+* Fri Jul 24 2009 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0.95.2-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
+
+* Thu Jun 11 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.2-1
+- updated to 0.95.2
+
+* Sun Apr 19 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.1-3
+- fixed '--without upstart' operation
+
+* Wed Apr 15 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.1-2
+- added '%%bcond_without upstart' conditional to ease skipping of
+ -upstart subpackage creation e.g. on EL5 systems
+- fixed Provides/Obsoletes: typo in -milter-sysvinit subpackage which
+ broke update path
+
+* Fri Apr 10 2009 Robert Scheck <robert(a)fedoraproject.org> - 0.95.1-1
+- Upgrade to 0.95.1 (#495039)
+
+* Wed Mar 25 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95-1
+- updated to final 0.95
+- added ncurses-devel (-> clamdtop) BR
+- enforced IPv6 support
+
+* Sun Mar 8 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95-0.1.rc1
+- updated to 0.95rc1
+- added -upstart subpackages
+- renamed -sysv to -sysvinit to make -upstart win the default dep resolving
+- reworked complete milter stuff
+- added -scanner subpackage which contains a preconfigured daemon
+ (e.g. for use by -milter)
+- moved %%changelog entries from 2006 and before into ChangeLog-rpm.old
+
+* Wed Feb 25 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.94.2-3
+- made some subpackages noarch
+- fixed typo in SysV initscript which removes 'touch' file (#473513)
+
+* Mon Feb 23 2009 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0.94.2-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
+* Tue Dec 02 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.94.2-1
+- Upgrade to 0.94.2 (#474002)
+
+* Wed Nov 05 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.94.1-1
+- Upgrade to 0.94.1
+
+* Sun Oct 26 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.94-1
+- Upgrade to 0.94 (SECURITY), fixes #461461:
+- CVE-2008-1389 Invalid memory access in the CHM unpacker
+- CVE-2008-3912 Out-of-memory NULL pointer dereference in mbox/msg
+- CVE-2008-3913 Memory leak in code path in freshclam's manager.c
+- CVE-2008-3914 Multiple file descriptor leaks on the code paths
+
+* Sun Jul 13 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93.3-1
+- updated to 0.93.3; another fix for CVE-2008-2713 (out-of-bounds read
+ on petite files)
+- put pid instead of pgrp into pidfile of clamav-milter (bz #452359)
+- rediffed patches
+
+* Tue Jun 17 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93.1-1
+- updated to 0.93.1
+- rediffed -path patch
+- CVE-2008-2713 Invalid Memory Access Denial Of Service Vulnerability
+
+* Mon Apr 14 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93-1
+- updated to final 0.93
+- removed daily.inc + main.inc directories; they are now replaced by
+ *.cld containers
+- trimmed down MAILTO list of cronjob to 'root' again; every well
+ configured system has an alias for this recipient
+
+* Wed Mar 12 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93-0.1.rc1
+- moved -milter scriptlets into -milter-core subpackage
+- added a requirement on the milteruser to the -milter-sendmail
+ subpackage (reported by Bruce Jerrick)
+
+* Tue Mar 4 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93-0.0.rc1
+- updated to 0.93rc1
+- fixed rpath issues
+
+* Mon Feb 11 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.92.1-1
+- updated to 0.92.1
+
+* Tue Jan 1 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.92-6
+- redisabled unrar stuff completely by using clean sources
+- splitted -milter subpackage into pieces to allow use without sendmail
+ (#239037)
+
+* Tue Jan 1 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.92-5
+- use a better way to disable RPATH-generation (needed for '--with
+ unrar' builds)
+
+* Mon Dec 31 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.92-4
+- added a README.fedora to the milter package (#240610)
+- ship original sources again; unrar is now licensed correctly (no more
+ stolen code put under GPL). Nevertheless, this license is not GPL
+ compatible, and to allow libclamav to be used by GPL applications,
+ unrar is disabled by a ./configure switch.
+- use pkg-config in clamav-config to emulate --cflags and --libs
+ operations (fixes partly multilib issues)
+- registered some more auto-updated files and marked them as %%ghost
+
+* Fri Dec 21 2007 Tom "spot" Callaway <tcallawa(a)redhat.com> - 0.92-3
+- updated to 0.92 (SECURITY):
+- CVE-2007-6335 MEW PE File Integer Overflow Vulnerability
+
+* Mon Oct 29 2007 Tom "spot" Callaway <tcallawa(a)redhat.com> - 0.91.2-3
+- remove RAR decompression code from source tarball because of
+ legal problems (resolves 334371)
+- correct license tag
+
+* Mon Sep 24 2007 Jesse Keating <jkeating(a)redhat.com> - 0.91.2-2
+- Bump release for upgrade path.
+
+* Sat Aug 25 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.91.2-1
+- updated to 0.91.2 (SECURITY):
+- CVE-2007-4510 DOS in RTF parser
+- DOS in html normalizer
+- arbitrary command execution by special crafted recipients in
+ clamav-milter's black-hole mode
+- fixed an open(2) issue
+
+* Tue Jul 17 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.91.1-0
+- updated to 0.91.1
+
+* Thu Jul 12 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.91-1
+- updated to 0.91
+
+* Thu May 31 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90.3-1
+- updated to 0.90.3
+- BR tcpd.h instead of tcp_wrappers(-devel) to make it build both
+ in FC6- and F7+
+
+* Fri Apr 13 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90.2-1
+- [SECURITY] updated to 0.90.2; fixes CVE-2007-1745, CVE-2007-1997
+
+* Fri Mar 2 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90.1-2
+- BR 'tcp_wrappers-devel' instead of plain 'tcp_wrappers'
+
+* Fri Mar 2 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90.1-1
+- updated to 0.90.1
+- updated %%doc list
+
+* Sun Feb 18 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90-1
+- updated to final 0.90
+- removed -visibility patch since fixed upstream
+
+* Sun Feb 4 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90-0.3.rc3
+- build with -Wl,-as-needed and cleaned up pkgconfig file
+- removed old hack which forced installation of freshclam.conf; related
+ check was removed upstream
+- removed static library
+- removed %%changelog entries from before 2004
+
+* Sat Feb 3 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90-0.2.rc3
+- updated to 0.90rc3
+- splitted mandatory parts from the data-file into a separate -filesystem
+ subpackage
+- added a -data-empty subpackage to allow a setup where database is
+ updated per cron-job and user does not want to download the large
+ -data package with outdated virus definitations (#214949)
+- %%ghost'ed the files downloaded by freshclam
diff --git a/clamd-README b/clamd-README
new file mode 100644
index 0000000..fa6eea5
--- /dev/null
+++ b/clamd-README
@@ -0,0 +1,59 @@
+To create individual clamd-instance take the following files and
+modify/copy them in the suggested way:
+
+clamd.conf:
+ * set LocalSocket (or better: TCPSocket) and User to suitable values;
+ avoid PidFile unless it is required by system monitoring or something
+ else. Logging through syslog is usually better than an individual
+ Logfile.
+ * place this file into /etc/clamd.d with an unique service-name;
+ e.g. as /etc/clamd.d/<SERVICE>.conf
+
+ When using TCPSocket, create iptables rules which are limiting the
+ access by source and/or by using '-m owner'.
+
+ When LogFile feature is wanted, it must be writable for the assigned
+ User. Recommended way to reach this, is to:
+ * make it owned by the User's *group*
+ * assign at least 0620 (u+rw,g+w) permissions
+
+ A suitable command might be
+ | # touch <logfile>
+ | # chgrp <user> <logfile>
+ | # chmod 0620 <logfile>
+ | # restorecon <logfile>
+
+ NEVER use 'clamav' as the user since he can modify the database.
+ This is the user who is running the application; e.g. for mimedefang
+ (http://www.roaringpenguin.com/mimedefang), the user might be
+ 'defang'.Theoretically, distinct users could be used, but it must be
+ made sure that the application-user can write into the socket-file,
+ and that the clamd-user can access the files asked by the
+ application to be checked.
+
+clamd.logrotate: (only when LogFile feature is used)
+ * set the correct value for the logfile
+ * place it into /etc/logrotate.d
+
+clamd@<SERVICE>.service: (systemd instance)
+ * instance of clamd@.service
+
+Additionally, when using LocalSocket instead of TCPSocket, the directory
+for the socket file must be created. For tmpfiles based systems, you
+might want to create a file /usr/lib/tmpfiles.d/clamd.<SERVICE>.conf
+with a content of
+
+ | d /var/run/clamd.<SERVICE> <MODE> <USER> <GROUP>
+
+Adjust <MODE> (0710 should suffice for most cases) and <USER> + <GROUP>
+so that the socket can be accessed by clamd and by the applications
+using clamd. Make sure that the socket is not world accessible; else,
+DOS attacks or worse are trivial.
+
+
+[Disclaimer:
+ this file and the script/configfiles are not part of the official
+ clamav package.
+
+ Please send complaints and comments to
+ mailto:enrico.scholz@informatik.tu-chemnitz.de!]
diff --git a/clamd-gen b/clamd-gen
new file mode 100755
index 0000000..ac5dae2
--- /dev/null
+++ b/clamd-gen
@@ -0,0 +1,269 @@
+#! /bin/bash
+
+# Copyright (C) 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
+#
+# 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=<SERVICE> --version=<VERSION> --release=<RELEASE>
+ --license=<LICENSE> --username=>USERNAME>
+"
+ exit 0
+}
+
+function rpm.generatePreamble()
+{
+ cat <<EOF
+%{!?release_func:%define release_func() %1%{?dist}}
+# The name of the minit service
+%define minitsvcdir %minitdir/services/%name
+# The configuration file for the SysV initservice
+%define conffile %_sysconfdir/clamd.d/%service.conf
+# The directory, where the milter socket will be placed into; this
+# socket will be named clamd.sock
+%define rundir /var/run/clamd.%service
+# The name of the logfile
+%define logfile /var/log/clamd.%service
+# The user under whose id, the clamd shall be running. This user must
+# be able to read the files from the base-service and is usually
+# created there.
+%define username $USERNAME
+# The packagename of the service
+%define service $SERVICE
+# The service name as used by the system's initscripts; usually this
+# is %service
+%define baseservice %service
+
+%define __chkconfig /sbin/chkconfig
+%define minitdir %_sysconfdir/minit
+
+
+EOF
+}
+
+function rpm.generateHeader()
+{
+ cat <<EOF
+Summary: Clamav server for '%service'
+Name: clamd.%service
+Version: $VERSION
+Release: %release_func $RELEASE
+Epoch: 0
+License: $LICENSE
+Group: System Environment/Daemons
+BuildRoot: %_tmppath/%name-%version-%release-root
+BuildArch: noarch
+Requires: init(%name)
+Requires(pre): %service
+Requires: clamav-server
+BuildRequires: clamav-devel
+
+%package sysv
+Summary: SysV initscripts for a %service clamav-server
+Group: System Environment/Daemons
+Provides: init(%name) = sysv
+Conflicts: init(%name) < sysv
+Conflicts: init(%name) > sysv
+Requires: clamav-server-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>!%service!g;
+ s!<USER>!%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 <<EOF >$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-wrapper b/clamd-wrapper
new file mode 100644
index 0000000..0a30628
--- /dev/null
+++ b/clamd-wrapper
@@ -0,0 +1,90 @@
+#!/bin/bash
+#
+# Xchkconfig: - 75 35
+# Xdescription: The clamd daemon listens for incoming connections on \
+# Unix or TCP socket and scans files or directories on demand.
+
+test "$CLAMD_SERVICE" || {
+ echo $"*** $0 can not be called in this way"
+ echo $"*** Please see /usr/share/doc/clamav-server-*/README how"
+ echo $"*** the clamav-server can be configured"
+ exit 6
+}
+
+# Source function library.
+. /etc/init.d/functions
+
+# Get config.
+test -r /etc/sysconfig/network && . /etc/sysconfig/network
+
+# Check that networking is up.
+test "$NETWORKING" != "no" || exit 6
+
+lockfile=/var/lock/subsys/clamd.${CLAMD_SERVICE}
+sysconffile=/etc/sysconfig/clamd.${CLAMD_SERVICE}
+procname=clamd.${CLAMD_SERVICE}
+
+CLAMD_CONFIGFILE=/etc/clamd.d/${CLAMD_SERVICE}.conf
+CLAMD_OPTIONS=
+CLAMD_PIDFILE=/var/run/clamd.${CLAMD_SERVICE}/clamd.pid
+## backward-compatibility check...
+for i in /var/run/clamd.${CLAMD_SERVICE}/clamd.sock \
+ /var/run/clamav.${CLAMD_SERVICE}/clamd.sock; do
+ CLAMD_SOCKET=$i
+ test ! -e "$i" || break
+done
+test -f "$sysconffile" && . "$sysconffile"
+
+
+RETVAL=0
+prog="clamd.${CLAMD_SERVICE}"
+
+start () {
+ echo -n $"Starting $prog: "
+ daemon --pidfile=${CLAMD_PIDFILE} \
+ exec -a $procname /usr/sbin/clamd \
+ ${CLAMD_CONFIGFILE:+-c $CLAMD_CONFIGFILE} ${CLAMD_OPTIONS} --pid ${CLAMD_PIDFILE}
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && touch $lockfile
+ return $RETVAL
+}
+
+stop () {
+ echo -n $"Stopping $prog: "
+ killproc -p ${CLAMD_PIDFILE} $procname
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && rm -f $lockfile
+ return $RETVAL
+}
+
+reload() {
+ rc=0
+ echo -n $"Reloading $prog: "
+ killproc -p ${CLAMD_PIDFILE} $procname -HUP || rc=$?
+ echo
+ echo -n $"Loading new virus-database: "
+ killproc -p ${CLAMD_PIDFILE} $procname -USR2 || rc=$?
+ echo
+ return $rc
+}
+
+restart () {
+ stop
+ start
+}
+
+# See how we were called.
+case "$1" in
+ start|stop|restart|reload)
+ $1 ;;
+ status)
+ status -p ${CLAMD_PIDFILE} $procname ;;
+ condrestart)
+ test ! -f $lockfile || restart
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
+ exit 2
+esac
diff --git a/clamd.SERVICE.init b/clamd.SERVICE.init
new file mode 100644
index 0000000..f2f9191
--- /dev/null
+++ b/clamd.SERVICE.init
@@ -0,0 +1,7 @@
+#!/bin/bash
+#
+# chkconfig: - 75 35
+# description: The clamd server running for <SERVICE>
+
+CLAMD_SERVICE=<SERVICE>
+. /usr/share/clamav/clamd-wrapper
diff --git a/clamd.logrotate b/clamd.logrotate
index b233f3a..315f352 100644
--- a/clamd.logrotate
+++ b/clamd.logrotate
@@ -1,8 +1,9 @@
-%{_localstatedir}/log/clamav/clamd.log {
- missingok
- notifempty
- create 644 clam clam
- postrotate
- killall -HUP clamd 2>/dev/null || :
- endscript
+/var/log/clamd.<SERVICE> {
+ monthly
+ notifempty
+ missingok
+
+ postrotate
+ killall -HUP clamd.<SERVICE> >/dev/null 2>&1 || :
+ endscript
}
diff --git a/clamd.scan.upstart b/clamd.scan.upstart
new file mode 100644
index 0000000..54482e6
--- /dev/null
+++ b/clamd.scan.upstart
@@ -0,0 +1,14 @@
+### !!! Uncomment only *one* of the 'start on' statements !!!
+
+### Uncomment this line when you want clamd.scan to be a scanner for a
+### locally running clamav-milter
+#start on starting clamav-milter
+
+### Uncomment this line when you want clamd.scan to be a generic
+### scanner service
+#start on runlevel [345] and starting local
+
+stop on runlevel [!345]
+
+respawn
+exec /usr/sbin/clamd -c /etc/clamd.d/scan.conf --foreground=yes
diff --git a/clamd.sysconfig b/clamd.sysconfig
new file mode 100644
index 0000000..4933e7e
--- /dev/null
+++ b/clamd.sysconfig
@@ -0,0 +1,3 @@
+#CLAMD_CONFIGFILE=/etc/clamd.d/<SERVICE>.conf
+#CLAMD_SOCKET=/var/run/clamd.<SERVICE>/clamd.sock
+#CLAMD_OPTIONS=
diff --git a/clamd@.service b/clamd@.service
new file mode 100644
index 0000000..4e3556f
--- /dev/null
+++ b/clamd@.service
@@ -0,0 +1,8 @@
+[Unit]
+Description = clamd scanner (%i) daemon
+After = syslog.target nss-lookup.target network.target
+
+[Service]
+Type = forking
+ExecStart = /usr/sbin/clamd -c /etc/clamd.d/%i.conf
+Restart = on-failure
diff --git a/clamd(a)scan.service b/clamd(a)scan.service
new file mode 100644
index 0000000..c329612
--- /dev/null
+++ b/clamd(a)scan.service
@@ -0,0 +1,7 @@
+.include /lib/systemd/system/clamd@.service
+
+[Unit]
+Description = Generic clamav scanner daemon
+
+[Install]
+WantedBy = multi-user.target
diff --git a/freshclam-sleep b/freshclam-sleep
new file mode 100755
index 0000000..fddb922
--- /dev/null
+++ b/freshclam-sleep
@@ -0,0 +1,52 @@
+#! /bin/bash
+# Copyright (C) 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
+#
+# 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.
+
+
+FRESHCLAM_MOD=$[ 3*60 ] # 3 hours
+
+f=/etc/sysconfig/freshclam
+test ! -e "$f" || . "$f"
+
+
+case x"$1" in
+ (xnow) FRESHCLAM_DELAY=0;;
+ (x|xrandom) : ${FRESHCLAM_DELAY:=$[ 0x`hostid` ]};;
+ (*) FRESHCLAM_DELAY=$1;;
+esac
+
+set -e
+
+case $FRESHCLAM_DELAY in
+ (disabled-warn)
+ echo $"\
+WARNING: update of clamav database is disabled; please see
+ '$f'
+ for information how to enable the periodic update resp. how to turn
+ off this message." >&2
+ exit 1
+ ;;
+
+ (disabled)
+ exit 0
+ ;;
+
+ (*)
+ let FRESHCLAM_MOD*=60
+ sleep $[ (FRESHCLAM_DELAY % FRESHCLAM_MOD + FRESHCLAM_MOD) % FRESHCLAM_MOD ]
+ ;;
+esac
+
+/usr/bin/freshclam --quiet
diff --git a/freshclam.cron b/freshclam.cron
deleted file mode 100644
index e40d8ef..0000000
--- a/freshclam.cron
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-### A simple update script for the clamav virus database.
-### This could as well be replaced by a SysV script.
-
-### fix log file if needed
-LOG_FILE="%{_localstatedir}/log/clamav/freshclam.log"
-if [ ! -f "$LOG_FILE" ]; then
- touch "$LOG_FILE"
- chmod 644 "$LOG_FILE"
- chown clam.clam "$LOG_FILE"
-fi
-
-%{_bindir}/freshclam \
- --quiet \
- --datadir="%{_localstatedir}/lib/clamav" \
- --log="$LOG_FILE"
diff --git a/freshclam.logrotate b/freshclam.logrotate
deleted file mode 100644
index 272d220..0000000
--- a/freshclam.logrotate
+++ /dev/null
@@ -1,5 +0,0 @@
-%{_localstatedir}/log/clamav/freshclam.log {
- missingok
- notifempty
- create 644 clam clam
-}
diff --git a/freshclam.sysconfig b/freshclam.sysconfig
new file mode 100644
index 0000000..417dafc
--- /dev/null
+++ b/freshclam.sysconfig
@@ -0,0 +1,18 @@
+## When changing the periodicity of freshclam runs in the crontab,
+## this value must be adjusted also. Its value is the timespan between
+## two subsequent freshclam runs in minutes. E.g. for the default
+##
+## | 0 */3 * * * ...
+##
+## crontab line, the value is 180 (minutes).
+# FRESHCLAM_MOD=
+
+## A predefined value for the delay in seconds. By default, the value is
+## calculated by the 'hostid' program. This predefined value guarantees
+## constant timespans of 3 hours between two subsequent freshclam runs.
+##
+## This option accepts two special values:
+## 'disabled-warn' ... disables the automatic freshclam update and
+## gives out a warning
+## 'disabled' ... disables the automatic freshclam silently
+# FRESHCLAM_DELAY=
diff --git a/llvm-glibc.patch b/llvm-glibc.patch
new file mode 100644
index 0000000..67dbdd7
--- /dev/null
+++ b/llvm-glibc.patch
@@ -0,0 +1,12 @@
+Index: clamav-0.97.3/libclamav/c++/llvm/lib/ExecutionEngine/JIT/Intercept.cpp
+===================================================================
+--- clamav-0.97.3.orig/libclamav/c++/llvm/lib/ExecutionEngine/JIT/Intercept.cpp
++++ clamav-0.97.3/libclamav/c++/llvm/lib/ExecutionEngine/JIT/Intercept.cpp
+@@ -52,6 +52,7 @@ static void runAtExitHandlers() {
+ #include <sys/stat.h>
+ #endif
+ #include <fcntl.h>
++#include <unistd.h>
+ /* stat functions are redirecting to __xstat with a version number. On x86-64
+ * linking with libc_nonshared.a and -Wl,--export-dynamic doesn't make 'stat'
+ * available as an exported symbol, so we have to add it explicitly.
diff --git a/sources b/sources
index 0573f02..113ca26 100644
--- a/sources
+++ b/sources
@@ -1,5 +1,4 @@
-a4517adbd9c72a3fec3fbb1384dd3234 clamav-0.99.2-norar.tar.xz
-d71fbb44799945970f2c2b75e40ec105 daily-21723.cvd
-f13ead862171f50019c15c946d25e91f main-57.cvd
-c545b6a9775ccb72a293d259335589be bytecode-278.cvd
-e809f74ed139df2e4af3fafbca32f678 clamd-wrapper.tar.bz2
+SHA512 (clamav-0.99.3-norar.tar.xz) = d80b20c982d35eecd2719af325bc774a5a5fe63a97f3d855c74919f6cfac6fe3f12c51479e49d96031ae0e9a3dedcf446dd22426cceba22ec4b641e9ea1f250a
+SHA512 (bytecode-319.cvd) = 1b2785fde078e0dae5a4b8a5161a0da55b26b010deda9fd9dc5edb7113d46d6eb45f644c16b4cb3882e7192d0b389d7b1826fbb718377aa40e1bac3485829acc
+SHA512 (daily-24253.cvd) = cef70a86f7989ec330c0479f6070e735181168c0331e981cfcd8d9a5aebdd6be42d772167c701f6f33219a4b41aced806e70c156e9a2a060c30ba55e73743fcd
+SHA512 (main-58.cvd) = 71309a7ea26f0fbfe329252c728173c895b107b7ea2e0bd613b12475db1d0270a496d707c4d80c842bf8b6f21680e86edfa7fa3b8aea075e93d67c91d696603a
commit 4f3fd81e6aff2829d95ecf971feb5ba34b761c76
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Sun Nov 26 03:55:21 2017 +0100
Backported upstream patch to unbreak e2guardian vs. temp files
diff --git a/clamav-0.99.2-temp-cleanup.patch b/clamav-0.99.2-temp-cleanup.patch
new file mode 100644
index 0000000..1b01341
--- /dev/null
+++ b/clamav-0.99.2-temp-cleanup.patch
@@ -0,0 +1,137 @@
+https://github.com/vrtadmin/clamav-devel/commit/f5bc94cf01e6a19d5255c0e5f9a5bc2336f5a2b1
+backported (re-merge). See also:
+
+ - https://bugzilla.clamav.net/show_bug.cgi?id=11549
+ - https://github.com/e2guardian/e2guardian/issues/159
+
+--- clamav-0.99.2/libclamav/scanners.c 2016-04-22 17:02:19.000000000 +0200
++++ clamav-0.99.2/libclamav/scanners.c.temp-cleanup 2017-11-17 00:59:14.295670694 +0100
+@@ -1342,37 +1342,33 @@
+ return CL_CLEAN;
+ }
+
+- /* dump to disk only if explicitly asked to
+- * or if necessary to check relative offsets,
+- * otherwise we can process just in-memory */
+- if(ctx->engine->keeptmp || (troot && troot->ac_reloff_num > 0)) {
+- if((ret = cli_gentempfd(ctx->engine->tmpdir, &tmpname, &ofd))) {
+- cli_dbgmsg("cli_scanscript: Can't generate temporary file/descriptor\n");
+- return ret;
+- }
+- if (ctx->engine->keeptmp)
+- cli_dbgmsg("cli_scanscript: saving normalized file to %s\n", tmpname);
+- }
+-
+ if(!(normalized = cli_malloc(SCANBUFF + maxpatlen))) {
+ cli_dbgmsg("cli_scanscript: Unable to malloc %u bytes\n", SCANBUFF);
+- free(tmpname);
+ return CL_EMEM;
+ }
+-
+ text_normalize_init(&state, normalized, SCANBUFF + maxpatlen);
+- ret = CL_CLEAN;
+-
+
+ if ((ret = cli_ac_initdata(&tmdata, troot?troot->ac_partsigs:0, troot?troot->ac_lsigs:0, troot?troot->ac_reloff_num:0, CLI_DEFAULT_AC_TRACKLEN))) {
+- free(tmpname);
+- return ret;
++ free(normalized);
++ return ret;
+ }
+
+ if ((ret = cli_ac_initdata(&gmdata, groot->ac_partsigs, groot->ac_lsigs, groot->ac_reloff_num, CLI_DEFAULT_AC_TRACKLEN))) {
+- cli_ac_freedata(&tmdata);
+- free(tmpname);
+- return ret;
++ cli_ac_freedata(&tmdata);
++ free(normalized);
++ return ret;
++ }
++
++ /* dump to disk only if explicitly asked to
++ * or if necessary to check relative offsets,
++ * otherwise we can process just in-memory */
++ if(ctx->engine->keeptmp || (troot && troot->ac_reloff_num > 0)) {
++ if((ret = cli_gentempfd(ctx->engine->tmpdir, &tmpname, &ofd))) {
++ cli_dbgmsg("cli_scanscript: Can't generate temporary file/descriptor\n");
++ goto done;
++ }
++ if (ctx->engine->keeptmp)
++ cli_dbgmsg("cli_scanscript: saving normalized file to %s\n", tmpname);
+ }
+
+ mdata[0] = &tmdata;
+@@ -1387,10 +1383,9 @@
+ map_off += written;
+
+ if (write(ofd, state.out, state.out_pos) == -1) {
+- cli_errmsg("cli_scanscript: can't write to file %s\n",tmpname);
+- close(ofd);
+- free(tmpname);
+- return CL_EWRITE;
++ cli_errmsg("cli_scanscript: can't write to file %s\n",tmpname);
++ ret = CL_EWRITE;
++ goto done;
+ }
+ text_normalize_reset(&state);
+ }
+@@ -1409,11 +1404,6 @@
+ funmap(*ctx->fmap);
+ }
+ *ctx->fmap = map;
+-
+- /* If we aren't keeping temps, delete the normalized file after scan. */
+- if(!(ctx->engine->keeptmp))
+- if (cli_unlink(tmpname)) ret = CL_EUNLINK;
+-
+ } else {
+ /* Since the above is moderately costly all in all,
+ * do the old stuff if there's no relative offsets. */
+@@ -1421,11 +1411,8 @@
+ if (troot) {
+ cli_targetinfo(&info, 7, map);
+ ret = cli_ac_caloff(troot, &tmdata, &info);
+- if (ret) {
+- cli_ac_freedata(&tmdata);
+- free(tmpname);
+- return ret;
+- }
++ if (ret)
++ goto done;
+ }
+
+ while(1) {
+@@ -1466,13 +1453,6 @@
+
+ }
+
+- if(ctx->engine->keeptmp) {
+- free(tmpname);
+- if (ofd >= 0)
+- close(ofd);
+- }
+- free(normalized);
+-
+ if(ret != CL_VIRUS || SCAN_ALL) {
+ if ((ret = cli_exp_eval(ctx, troot, &tmdata, NULL, NULL)) == CL_VIRUS)
+ viruses_found++;
+@@ -1481,9 +1461,19 @@
+ viruses_found++;
+ }
+
++done:
++ free(normalized);
+ cli_ac_freedata(&tmdata);
+ cli_ac_freedata(&gmdata);
+
++ if (ofd != -1)
++ close(ofd);
++ if (tmpname != NULL) {
++ if (!ctx->engine->keeptmp)
++ cli_unlink(tmpname);
++ free(tmpname);
++ }
++
+ if (SCAN_ALL && viruses_found)
+ return CL_VIRUS;
+
diff --git a/clamav.spec b/clamav.spec
index edf30f2..2fd02bd 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -5,7 +5,7 @@
Summary: Anti-virus software
Name: clamav
Version: 0.99.2
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
@@ -32,6 +32,7 @@ Source12: http://db.local.clamav.net/daily-21723.cvd
Source13: http://db.local.clamav.net/bytecode-278.cvd
Patch31: clamav-0.99.1-setsebool.patch
+Patch32: clamav-0.99.2-temp-cleanup.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -131,6 +132,7 @@ you will need to install %{name}-devel.
%setup -q -T -c
xz -dc %{SOURCE0} | (cd .. ; tar xvvf -)
%patch31 -p1 -b .setsebool
+%patch32 -p1 -b .temp-cleanup
%{__perl} -pi.orig -e 's|/lib\b|/%{_lib}|g;' configure
@@ -410,6 +412,9 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Sun Nov 26 2017 Robert Scheck <robert(a)fedoraproject.org> - 0.99.2-3
+- Backported upstream patch to unbreak e2guardian vs. temp files
+
* Tue Mar 28 2017 Robert Scheck <robert(a)fedoraproject.org> - 0.99.2-2
- Ensure that missing or invalid timezone configuration does not
mangle /etc/freshclam.conf in %%post (#1154756)
commit f7d8e9087c523eb46dce29552fcb37c2a69e0ffc
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Tue Mar 28 21:54:37 2017 +0200
Ensure that missing or invalid timezone configuration does not mangle /etc/freshclam.conf in %post (#1154756)
diff --git a/clamav.spec b/clamav.spec
index 315b839..edf30f2 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -5,7 +5,7 @@
Summary: Anti-virus software
Name: clamav
Version: 0.99.2
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
@@ -262,9 +262,9 @@ for conf in etc/*.sample; do mv ${conf} ${conf%%.sample}; done
ZONES="/usr/share/zoneinfo/zone.tab"
CONFIG="/etc/sysconfig/clock"
-if [ -r "$CONFIG" -a -r "$ZONES" ]; then
+if [ -r "$CONFIG" -a -r "$ZONES" -a -n "$ZONE" ]; then
source "$CONFIG"
- export CODE="$(grep -E "\b$ZONE\b" "$ZONES" | head -1 | cut -f1 | tr [A-Z] [a-z])"
+ export CODE="$(grep -E "\b$ZONE\b" "$ZONES" | grep -v ^# | head -1 | cut -f1 | tr [A-Z] [a-z])"
fi
if [ -z "$CODE" ]; then
@@ -410,6 +410,10 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Tue Mar 28 2017 Robert Scheck <robert(a)fedoraproject.org> - 0.99.2-2
+- Ensure that missing or invalid timezone configuration does not
+ mangle /etc/freshclam.conf in %%post (#1154756)
+
* Mon Jun 13 2016 Orion Poplawski <orion(a)cora.nwra.com> - 0.99.2-1
- Update to 0.99.2
- Enable llvm
commit 0577117bb2cb0095605995c4ad488e03951e809a
Author: Orion Poplawski <orion(a)cora.nwra.com>
Date: Mon Jun 13 11:36:38 2016 -0600
Update to 0.99.2
- Enable llvm
- Drop cliopts patch fixed upstream, use upstream's "--forground" option name
- Fix main.cvd (fedora #1325482, epel #1325717)
- Own bytecode.cld (#1176252) and mirrors.dat, ship bytecode.cvd
- Update daily.cvd
- Fixup Requires(pre) usage (#1319151)
Conflicts:
clamav-milter.systemd
clamav-milter.sysv
clamav-milter.upstart
clamav.spec
clamd.scan.upstart
clamd@.service
sources
diff --git a/.gitignore b/.gitignore
index cdb6045..d87d52b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
/clamav-*-norar.tar.xz
/main*.cvd
/daily*.cvd
+/bytecode-278.cvd
diff --git a/clamav-0.99.1-setsebool.patch b/clamav-0.99.1-setsebool.patch
new file mode 100644
index 0000000..f168b55
--- /dev/null
+++ b/clamav-0.99.1-setsebool.patch
@@ -0,0 +1,15 @@
+Patch by Robert Scheck <robert(a)fedoraproject.org> for clamav >= 0.99.1 which changes the SELinux
+boolean name from the obsolete (and former alias) clamd_use_jit to the current antivirus_use_jit.
+See also: https://bugzilla.redhat.com/show_bug.cgi?id=1295473
+
+--- clamav-0.99.1/libclamav/builtin_bytecodes.h 2015-12-11 17:26:02.000000000 +0100
++++ clamav-0.99.1/libclamav/builtin_bytecodes.h.setsebool 2016-03-29 23:32:03.000000000 +0200
+@@ -139,7 +139,7 @@
+ if (env.os_features & (1 << feature_selinux))
+ /* all SELinux versions deny RWX mapping when policy says so */
+ disable_jit_if("^SELinux is preventing 'execmem' access.\n"
+- "Run 'setsebool -P clamd_use_jit on'.", 0, 1);
++ "Run 'setsebool -P antivirus_use_jit on'.", 0, 1);
+ else if (env.os_features & (1 << feature_pax))
+ /* recent versions of PaX deny RWX mapping */
+ disable_jit_if("^PaX is preventing 'mprotect' access.\n"
diff --git a/clamav.spec b/clamav.spec
index 0f0f118..315b839 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -4,7 +4,7 @@
Summary: Anti-virus software
Name: clamav
-Version: 0.99.1
+Version: 0.99.2
Release: 1%{?dist}
License: GPLv2
Group: Applications/System
@@ -28,12 +28,16 @@ Source10: clamav-milter.sysconfig
# To download the *.cvd, go to http://www.clamav.net and use the links
# there (I renamed the files to add the -version suffix for verifying).
Source11: http://db.local.clamav.net/main-57.cvd
-Source12: http://db.local.clamav.net/daily-21478.cvd
+Source12: http://db.local.clamav.net/daily-21723.cvd
+Source13: http://db.local.clamav.net/bytecode-278.cvd
+
+Patch31: clamav-0.99.1-setsebool.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: bzip2-devel, zlib-devel, gmp-devel, curl-devel, xz, ncurses-devel, openssl-devel, libxml2-devel, pcre-devel
%{!?_without_milter:BuildRequires: sendmail-devel >= 8.12}
+
Requires: clamav-db = %{version}-%{release}
Requires(pre): shadow-utils
@@ -126,6 +130,7 @@ you will need to install %{name}-devel.
# Handle that rpmbuild in RHEL < 6 doesn't handle xz archives automatically.
%setup -q -T -c
xz -dc %{SOURCE0} | (cd .. ; tar xvvf -)
+%patch31 -p1 -b .setsebool
%{__perl} -pi.orig -e 's|/lib\b|/%{_lib}|g;' configure
@@ -199,7 +204,7 @@ xz -dc %{SOURCE0} | (cd .. ; tar xvvf -)
--with-group="clam" \
--with-libcurl=%{_prefix} \
--with-user="clam" \
- --disable-llvm
+# --disable-llvm
make %{?_smp_mflags}
@@ -242,6 +247,11 @@ install -d -m0755 %{buildroot}%{_sysconfdir}/clamd.d/
install -Dp -m0644 %{SOURCE11} %{buildroot}%{_localstatedir}/lib/clamav/main.cvd
install -Dp -m0644 %{SOURCE12} %{buildroot}%{_localstatedir}/lib/clamav/daily.cvd
+install -Dp -m0644 %{SOURCE13} %{buildroot}%{_localstatedir}/lib/clamav/bytecode.cvd
+touch $RPM_BUILD_ROOT%{_localstatedir}/lib/clamav/bytecode.cld
+touch $RPM_BUILD_ROOT%{_localstatedir}/lib/clamav/{daily,main}.cld
+touch $RPM_BUILD_ROOT%{_localstatedir}/lib/clamav/mirrors.dat
+
# Clean up for later usage in documentation
for conf in etc/*.sample; do mv ${conf} ${conf%%.sample}; done
@@ -387,6 +397,9 @@ rm -rf %{buildroot}
%dir %{_localstatedir}/log/clamav/
%ghost %{_localstatedir}/log/clamav/freshclam.log
+%ghost %attr(0664,%username,%username) %{_localstatedir}/lib/clamav/*.cld
+%ghost %attr(0664,%username,%username) %{_localstatedir}/lib/clamav/mirrors.dat
+
%files devel
%defattr(-, root, root, 0755)
%{_bindir}/clamav-config
@@ -397,6 +410,15 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Mon Jun 13 2016 Orion Poplawski <orion(a)cora.nwra.com> - 0.99.2-1
+- Update to 0.99.2
+- Enable llvm
+- Drop cliopts patch fixed upstream, use upstream's "--forground" option name
+- Fix main.cvd (fedora #1325482, epel #1325717)
+- Own bytecode.cld (#1176252) and mirrors.dat, ship bytecode.cvd
+- Update daily.cvd
+- Fixup Requires(pre) usage (#1319151)
+
* Tue Mar 29 2016 Robert Scheck <robert(a)fedoraproject.org> - 0.99.1-1
- Upgrade to 0.99.1 and updated main.cvd and daily.cvd (#1314115)
diff --git a/sources b/sources
index c0744a1..0573f02 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,5 @@
-6bf23527691890664c66e62e7bee44ff clamav-0.99.1-norar.tar.xz
-85b8dd2229ba4a0ddd8bf048fe2b2078 main-57.cvd
-b82f2fc713069d378d79b8e4e3db0b74 daily-21478.cvd
+a4517adbd9c72a3fec3fbb1384dd3234 clamav-0.99.2-norar.tar.xz
+d71fbb44799945970f2c2b75e40ec105 daily-21723.cvd
+f13ead862171f50019c15c946d25e91f main-57.cvd
+c545b6a9775ccb72a293d259335589be bytecode-278.cvd
e809f74ed139df2e4af3fafbca32f678 clamd-wrapper.tar.bz2
commit ea28252658542e37209d2a5ef1b1c1ef58ac7b0b
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Wed Mar 30 00:14:00 2016 +0200
Upgrade to 0.99.1 and updated main.cvd and daily.cvd (#1314115)
diff --git a/clamav.spec b/clamav.spec
index b381569..0f0f118 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -4,8 +4,8 @@
Summary: Anti-virus software
Name: clamav
-Version: 0.99
-Release: 3%{?dist}
+Version: 0.99.1
+Release: 1%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
@@ -27,8 +27,8 @@ Source10: clamav-milter.sysconfig
# To download the *.cvd, go to http://www.clamav.net and use the links
# there (I renamed the files to add the -version suffix for verifying).
-Source11: http://db.local.clamav.net/main-55.cvd
-Source12: http://db.local.clamav.net/daily-21123.cvd
+Source11: http://db.local.clamav.net/main-57.cvd
+Source12: http://db.local.clamav.net/daily-21478.cvd
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -397,6 +397,9 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Tue Mar 29 2016 Robert Scheck <robert(a)fedoraproject.org> - 0.99.1-1
+- Upgrade to 0.99.1 and updated main.cvd and daily.cvd (#1314115)
+
* Mon Dec 07 2015 Robert Scheck <robert(a)fedoraproject.org> - 0.99-3
- Added missing build-time requirement to pcre-devel
diff --git a/sources b/sources
index 2d52233..c0744a1 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
-a972a59e09ef86fdfaaf028f714996e5 clamav-0.99-norar.tar.xz
-06f660f474d1a6863de4a00eb02521e3 main-55.cvd
-547dca19d7c3f1bfb51a3e0dad4ad52e daily-21123.cvd
+6bf23527691890664c66e62e7bee44ff clamav-0.99.1-norar.tar.xz
+85b8dd2229ba4a0ddd8bf048fe2b2078 main-57.cvd
+b82f2fc713069d378d79b8e4e3db0b74 daily-21478.cvd
e809f74ed139df2e4af3fafbca32f678 clamd-wrapper.tar.bz2
commit 22de990d883ff79a5b7465d9cdb256036839e87c
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Mon Dec 7 21:26:22 2015 +0100
Added missing build-time requirement to pcre-devel
diff --git a/clamav.spec b/clamav.spec
index 2943bcc..b381569 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -5,7 +5,7 @@
Summary: Anti-virus software
Name: clamav
Version: 0.99
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
@@ -32,7 +32,7 @@ Source12: http://db.local.clamav.net/daily-21123.cvd
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: bzip2-devel, zlib-devel, gmp-devel, curl-devel, xz, ncurses-devel, openssl-devel, libxml2-devel
+BuildRequires: bzip2-devel, zlib-devel, gmp-devel, curl-devel, xz, ncurses-devel, openssl-devel, libxml2-devel, pcre-devel
%{!?_without_milter:BuildRequires: sendmail-devel >= 8.12}
Requires: clamav-db = %{version}-%{release}
Requires(pre): shadow-utils
@@ -397,6 +397,9 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Mon Dec 07 2015 Robert Scheck <robert(a)fedoraproject.org> - 0.99-3
+- Added missing build-time requirement to pcre-devel
+
* Sun Dec 06 2015 Robert Scheck <robert(a)fedoraproject.org> - 0.99-2
- Require openssl-devel for clamav-devel
commit f889ba1f96dfdcf315ae3c6dfb575be290b79571
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Sun Dec 6 18:09:17 2015 +0100
Require openssl-devel for clamav-devel
diff --git a/clamav.spec b/clamav.spec
index 8021b31..2943bcc 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -5,7 +5,7 @@
Summary: Anti-virus software
Name: clamav
Version: 0.99
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
@@ -110,7 +110,7 @@ The actual virus database for %{name}
%package devel
Summary: Header files, libraries and development documentation for %{name}
Group: Development/Libraries
-Requires: clamav = %{version}-%{release}
+Requires: clamav = %{version}-%{release}, openssl-devel
### Fedora Extras introduced them differently :(
Obsoletes: libclamav-static-devel <= %{version}-%{release}
@@ -397,6 +397,9 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Sun Dec 06 2015 Robert Scheck <robert(a)fedoraproject.org> - 0.99-2
+- Require openssl-devel for clamav-devel
+
* Wed Dec 02 2015 Robert Scheck <robert(a)fedoraproject.org> - 0.99-1
- Upgrade to 0.99 and updated daily.cvd (#1287327)
commit 685f0bd46bb139c57518ca0c418d262bc8acd9d1
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Wed Dec 2 01:53:02 2015 +0100
Upgrade to 0.99 and updated daily.cvd (#1287327)
diff --git a/clamav.spec b/clamav.spec
index fe3e9a2..8021b31 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -4,7 +4,7 @@
Summary: Anti-virus software
Name: clamav
-Version: 0.98.7
+Version: 0.99
Release: 1%{?dist}
License: GPLv2
Group: Applications/System
@@ -28,7 +28,7 @@ Source10: clamav-milter.sysconfig
# To download the *.cvd, go to http://www.clamav.net and use the links
# there (I renamed the files to add the -version suffix for verifying).
Source11: http://db.local.clamav.net/main-55.cvd
-Source12: http://db.local.clamav.net/daily-20394.cvd
+Source12: http://db.local.clamav.net/daily-21123.cvd
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -397,6 +397,9 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Wed Dec 02 2015 Robert Scheck <robert(a)fedoraproject.org> - 0.99-1
+- Upgrade to 0.99 and updated daily.cvd (#1287327)
+
* Wed Apr 29 2015 Robert Scheck <robert(a)fedoraproject.org> - 0.98.7-1
- Upgrade to 0.98.7 and updated daily.cvd (#1217014)
diff --git a/sources b/sources
index 78b4995..2d52233 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
-2dd003807614ef53c5ab6c811273ff4e clamav-0.98.7-norar.tar.xz
+a972a59e09ef86fdfaaf028f714996e5 clamav-0.99-norar.tar.xz
06f660f474d1a6863de4a00eb02521e3 main-55.cvd
-223a4a02a3b8486ce01b44ea4bb56291 daily-20394.cvd
+547dca19d7c3f1bfb51a3e0dad4ad52e daily-21123.cvd
e809f74ed139df2e4af3fafbca32f678 clamd-wrapper.tar.bz2
commit 21917faf8969ba61e367a567fa46900728e0d382
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Wed Apr 29 20:34:24 2015 +0200
Upgrade to 0.98.7 and updated daily.cvd (#1217014)
diff --git a/clamav.spec b/clamav.spec
index 8b41064..fe3e9a2 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -4,8 +4,8 @@
Summary: Anti-virus software
Name: clamav
-Version: 0.98.6
-Release: 2%{?dist}
+Version: 0.98.7
+Release: 1%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
@@ -28,7 +28,7 @@ Source10: clamav-milter.sysconfig
# To download the *.cvd, go to http://www.clamav.net and use the links
# there (I renamed the files to add the -version suffix for verifying).
Source11: http://db.local.clamav.net/main-55.cvd
-Source12: http://db.local.clamav.net/daily-19995.cvd
+Source12: http://db.local.clamav.net/daily-20394.cvd
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -397,6 +397,9 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Wed Apr 29 2015 Robert Scheck <robert(a)fedoraproject.org> - 0.98.7-1
+- Upgrade to 0.98.7 and updated daily.cvd (#1217014)
+
* Tue Feb 24 2015 Joel Smith <joelsmith(a)fedoraproject.org> - 0.98.6-2
- Make init script source /etc/sysconfig/clamd if present (#1195864)
diff --git a/sources b/sources
index c1532aa..78b4995 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
-a158e74b3741a4b928bcbc17ab171690 clamav-0.98.6-norar.tar.xz
+2dd003807614ef53c5ab6c811273ff4e clamav-0.98.7-norar.tar.xz
06f660f474d1a6863de4a00eb02521e3 main-55.cvd
-d58cb68afd94e61caab919d6bfd34fcb daily-19995.cvd
+223a4a02a3b8486ce01b44ea4bb56291 daily-20394.cvd
e809f74ed139df2e4af3fafbca32f678 clamd-wrapper.tar.bz2
commit 865529f4ffc69c765e572d951f1407c414c458c1
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Fri Apr 10 18:44:47 2015 +0200
Make init script source /etc/sysconfig/clamd if present (#1195864)
diff --git a/clamav.init b/clamav.init
index dacb403..633c301 100755
--- a/clamav.init
+++ b/clamav.init
@@ -17,6 +17,9 @@
[ -x /usr/sbin/clamd ] || exit 0
+# Local clamd config
+test -f /etc/sysconfig/clamd && . /etc/sysconfig/clamd
+
# See how we were called.
case "$1" in
start)
diff --git a/clamav.spec b/clamav.spec
index b70ab17..8b41064 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -5,7 +5,7 @@
Summary: Anti-virus software
Name: clamav
Version: 0.98.6
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
@@ -397,6 +397,9 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Tue Feb 24 2015 Joel Smith <joelsmith(a)fedoraproject.org> - 0.98.6-2
+- Make init script source /etc/sysconfig/clamd if present (#1195864)
+
* Thu Jan 29 2015 Robert Scheck <robert(a)fedoraproject.org> - 0.98.6-1
- Upgrade to 0.98.6 and updated daily.cvd (#1187050)
commit 1e9ece70df82b7e69409fe05d090570af80ee073
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Thu Jan 29 22:44:11 2015 +0100
Really update daily.cvd
diff --git a/clamav.spec b/clamav.spec
index b1e1e60..b70ab17 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -28,7 +28,7 @@ Source10: clamav-milter.sysconfig
# To download the *.cvd, go to http://www.clamav.net and use the links
# there (I renamed the files to add the -version suffix for verifying).
Source11: http://db.local.clamav.net/main-55.cvd
-Source12: http://db.local.clamav.net/daily-19651.cvd
+Source12: http://db.local.clamav.net/daily-19995.cvd
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
commit ba56519d00748db57cbf148b363f8ed95ebe817b
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Thu Jan 29 22:31:21 2015 +0100
Upgrade to 0.98.6 and updated daily.cvd (#1187050)
diff --git a/clamav.spec b/clamav.spec
index d87084a..b1e1e60 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -4,7 +4,7 @@
Summary: Anti-virus software
Name: clamav
-Version: 0.98.5
+Version: 0.98.6
Release: 1%{?dist}
License: GPLv2
Group: Applications/System
@@ -397,6 +397,9 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Thu Jan 29 2015 Robert Scheck <robert(a)fedoraproject.org> - 0.98.6-1
+- Upgrade to 0.98.6 and updated daily.cvd (#1187050)
+
* Wed Nov 19 2014 Robert Scheck <robert(a)fedoraproject.org> - 0.98.5-1
- Upgrade to 0.98.5 and updated daily.cvd (#1138101)
diff --git a/sources b/sources
index 90d8e3a..c1532aa 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
+a158e74b3741a4b928bcbc17ab171690 clamav-0.98.6-norar.tar.xz
06f660f474d1a6863de4a00eb02521e3 main-55.cvd
-f83334a2cb2510cc8f9ec9750beaeada daily-19651.cvd
-6455c6ce50b56ba1f545c759129f2ad1 clamav-0.98.5-norar.tar.xz
+d58cb68afd94e61caab919d6bfd34fcb daily-19995.cvd
e809f74ed139df2e4af3fafbca32f678 clamd-wrapper.tar.bz2
commit 4548304dd3c0924b4c358097eee31b27933fb241
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Wed Nov 19 13:13:01 2014 +0100
Upgrade to 0.98.5 and updated daily.cvd (#1138101)
diff --git a/clamav.spec b/clamav.spec
index 902fe8a..d87084a 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -4,7 +4,7 @@
Summary: Anti-virus software
Name: clamav
-Version: 0.98.4
+Version: 0.98.5
Release: 1%{?dist}
License: GPLv2
Group: Applications/System
@@ -28,7 +28,7 @@ Source10: clamav-milter.sysconfig
# To download the *.cvd, go to http://www.clamav.net and use the links
# there (I renamed the files to add the -version suffix for verifying).
Source11: http://db.local.clamav.net/main-55.cvd
-Source12: http://db.local.clamav.net/daily-19120.cvd
+Source12: http://db.local.clamav.net/daily-19651.cvd
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -397,6 +397,9 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Wed Nov 19 2014 Robert Scheck <robert(a)fedoraproject.org> - 0.98.5-1
+- Upgrade to 0.98.5 and updated daily.cvd (#1138101)
+
* Sat Jun 21 2014 Robert Scheck <robert(a)fedoraproject.org> - 0.98.4-1
- Upgrade to 0.98.4 and updated daily.cvd (#1111811)
- Add build requirement to libxml2 for DMG, OpenIOC and XAR
diff --git a/sources b/sources
index bb4d1f0..90d8e3a 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
06f660f474d1a6863de4a00eb02521e3 main-55.cvd
-14939dd869178d9c934bd2b7026104f5 daily-19120.cvd
-22bca4a49928a883c90c549a93b9bcde clamav-0.98.4-norar.tar.xz
+f83334a2cb2510cc8f9ec9750beaeada daily-19651.cvd
+6455c6ce50b56ba1f545c759129f2ad1 clamav-0.98.5-norar.tar.xz
e809f74ed139df2e4af3fafbca32f678 clamd-wrapper.tar.bz2
commit 242037ee812fed4dbd5eefd4e6cb9ab82ce82beb
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Sat Jun 21 19:20:28 2014 +0200
Add build requirement to libxml2 for DMG, OpenIOC and XAR
diff --git a/clamav.spec b/clamav.spec
index 3b452fa..902fe8a 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -32,7 +32,7 @@ Source12: http://db.local.clamav.net/daily-19120.cvd
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: bzip2-devel, zlib-devel, gmp-devel, curl-devel, xz, ncurses-devel, openssl-devel
+BuildRequires: bzip2-devel, zlib-devel, gmp-devel, curl-devel, xz, ncurses-devel, openssl-devel, libxml2-devel
%{!?_without_milter:BuildRequires: sendmail-devel >= 8.12}
Requires: clamav-db = %{version}-%{release}
Requires(pre): shadow-utils
@@ -399,6 +399,7 @@ rm -rf %{buildroot}
%changelog
* Sat Jun 21 2014 Robert Scheck <robert(a)fedoraproject.org> - 0.98.4-1
- Upgrade to 0.98.4 and updated daily.cvd (#1111811)
+- Add build requirement to libxml2 for DMG, OpenIOC and XAR
* Fri May 09 2014 Paul Wouters <pwouters(a)redhat.com> - 0.98.3-1
- Upgrade to 0.98.3
commit 22850e6fbd532abf7dce4bf0ddf160b81aff3fac
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Sat Jun 21 19:10:05 2014 +0200
Upgrade to 0.98.4 and updated daily.cvd (#1111811)
diff --git a/clamav.spec b/clamav.spec
index c8bc466..3b452fa 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -4,7 +4,7 @@
Summary: Anti-virus software
Name: clamav
-Version: 0.98.3
+Version: 0.98.4
Release: 1%{?dist}
License: GPLv2
Group: Applications/System
@@ -28,7 +28,7 @@ Source10: clamav-milter.sysconfig
# To download the *.cvd, go to http://www.clamav.net and use the links
# there (I renamed the files to add the -version suffix for verifying).
Source11: http://db.local.clamav.net/main-55.cvd
-Source12: http://db.local.clamav.net/daily-18354.cvd
+Source12: http://db.local.clamav.net/daily-19120.cvd
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -397,6 +397,9 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Sat Jun 21 2014 Robert Scheck <robert(a)fedoraproject.org> - 0.98.4-1
+- Upgrade to 0.98.4 and updated daily.cvd (#1111811)
+
* Fri May 09 2014 Paul Wouters <pwouters(a)redhat.com> - 0.98.3-1
- Upgrade to 0.98.3
- Fix --with-libcurl parameter to avoid automatic path detection breakage
diff --git a/sources b/sources
index 05ea68b..bb4d1f0 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
06f660f474d1a6863de4a00eb02521e3 main-55.cvd
-5a7d62d7d8ee4b237d6e08f5bc02037c daily-18354.cvd
-e9210784829725bf716fda7ca536bbb0 clamav-0.98.3-norar.tar.xz
+14939dd869178d9c934bd2b7026104f5 daily-19120.cvd
+22bca4a49928a883c90c549a93b9bcde clamav-0.98.4-norar.tar.xz
e809f74ed139df2e4af3fafbca32f678 clamd-wrapper.tar.bz2
commit 5db0137e5a5bd88d1ca992d9376a0e6cbfb6d1ed
Author: Paul Wouters <pwouters(a)redhat.com>
Date: Fri May 9 16:01:41 2014 -0400
update sources, use latest daily cvd
diff --git a/clamav.spec b/clamav.spec
index 49eedbf..c8bc466 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -28,7 +28,7 @@ Source10: clamav-milter.sysconfig
# To download the *.cvd, go to http://www.clamav.net and use the links
# there (I renamed the files to add the -version suffix for verifying).
Source11: http://db.local.clamav.net/main-55.cvd
-Source12: http://db.local.clamav.net/daily-18353.cvd
+Source12: http://db.local.clamav.net/daily-18354.cvd
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
diff --git a/sources b/sources
index b26e5b2..05ea68b 100644
--- a/sources
+++ b/sources
@@ -1 +1,4 @@
+06f660f474d1a6863de4a00eb02521e3 main-55.cvd
+5a7d62d7d8ee4b237d6e08f5bc02037c daily-18354.cvd
e9210784829725bf716fda7ca536bbb0 clamav-0.98.3-norar.tar.xz
+e809f74ed139df2e4af3fafbca32f678 clamd-wrapper.tar.bz2
commit e7e53f9ced1d1f2babecad82953cfb613109cf35
Author: Paul Wouters <pwouters(a)redhat.com>
Date: Fri May 9 13:10:48 2014 -0400
* Fri May 09 2014 Paul Wouters <pwouters(a)redhat.com> - 0.98.3-1
- Upgrade to 0.98.3
- Fix --with-libcurl parameter to avoid automatic path detection breakage
- openssl-devel is now required for hashing code.
- Added clamsubmit to main package
- Re-enabled --with-llvm as this speeds up deployment a lot.
- Fixed older changelog dates
diff --git a/clamav.spec b/clamav.spec
index fc1bfc9..49eedbf 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -4,7 +4,7 @@
Summary: Anti-virus software
Name: clamav
-Version: 0.98.1
+Version: 0.98.3
Release: 1%{?dist}
License: GPLv2
Group: Applications/System
@@ -13,7 +13,7 @@ URL: http://www.clamav.net/
# Unfortunately, clamav includes support for RAR v3, derived from GPL
# incompatible unrar from RARlabs. We have to pull this code out. This
# tarball was created by
-# make clean-sources [TARBALL=<original-tarball>] [VERSION=<version>]
+# make clean-sources NAME=clamav VERSION=<version> TARBALL=clamav-<version>.tar.gz TARBALL_CLEAN=clamav-<version>-norar.tar.xz
# Upstream: http://downloads.sourceforge.net/clamav/clamav-%{version}.tar.gz
Source0: clamav-%{version}-norar.tar.xz
Source1: clamav.init
@@ -32,7 +32,7 @@ Source12: http://db.local.clamav.net/daily-18353.cvd
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: bzip2-devel, zlib-devel, gmp-devel, curl-devel, xz, ncurses-devel
+BuildRequires: bzip2-devel, zlib-devel, gmp-devel, curl-devel, xz, ncurses-devel, openssl-devel
%{!?_without_milter:BuildRequires: sendmail-devel >= 8.12}
Requires: clamav-db = %{version}-%{release}
Requires(pre): shadow-utils
@@ -197,7 +197,7 @@ xz -dc %{SOURCE0} | (cd .. ; tar xvvf -)
--enable-dns \
--with-dbdir="%{_localstatedir}/lib/clamav" \
--with-group="clam" \
- --with-libcurl \
+ --with-libcurl=%{_prefix} \
--with-user="clam" \
--disable-llvm
@@ -329,12 +329,14 @@ rm -rf %{buildroot}
%doc %{_mandir}/man1/sigtool.1*
%doc %{_mandir}/man1/clamscan.1*
%doc %{_mandir}/man1/freshclam.1*
+%doc %{_mandir}/man1/clamsubmit.1*
%doc %{_mandir}/man5/freshclam.conf.5*
%config(noreplace) %{_sysconfdir}/freshclam.conf
%{_bindir}/clamscan
%{_bindir}/freshclam
%{_bindir}/sigtool
%{_bindir}/clambc
+%{_bindir}/clamsubmit
%{_libdir}/libclamav.so.*
%files -n clamd
@@ -395,6 +397,14 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Fri May 09 2014 Paul Wouters <pwouters(a)redhat.com> - 0.98.3-1
+- Upgrade to 0.98.3
+- Fix --with-libcurl parameter to avoid automatic path detection breakage
+- openssl-devel is now required for hashing code.
+- Added clamsubmit to main package
+- Re-enabled --with-llvm as this speeds up deployment a lot.
+- Fixed older changelog dates
+
* Wed Jan 15 2014 Robert Scheck <robert(a)fedoraproject.org> - 0.98.1-1
- Upgrade to 0.98.1 and updated daily.cvd (#1053400)
@@ -486,7 +496,7 @@ rm -rf %{buildroot}
- Move db to /var/lib/clamav
- Ship empty directory /etc/clamd.d for amavisd-new
-* Tue Feb 17 2011 Kevin Fenzi <kevin(a)tummy.com> - 0.97-2
+* Thu Feb 17 2011 Kevin Fenzi <kevin(a)tummy.com> - 0.97-2
- Disable llvm.
* Tue Feb 08 2011 Kevin Fenzi <kevin(a)tummy.com> - 0.97-1
@@ -643,7 +653,7 @@ rm -rf %{buildroot}
- Changed the init-order of the sysv scripts. (Will McCutcheon)
- Changes to the default configuration files.
-* Sat Mar 17 2004 Dag Wieers <dag(a)wieers.com> - 0.70-1
+* Wed Mar 17 2004 Dag Wieers <dag(a)wieers.com> - 0.70-1
- Updated to release 0.70.
* Tue Mar 16 2004 Dag Wieers <dag(a)wieers.com> - 0.68-1
@@ -656,7 +666,7 @@ rm -rf %{buildroot}
* Mon Mar 08 2004 Dag Wieers <dag(a)wieers.com> - 0.67-1
- Personalized SPEC file.
-* Mon Aug 22 2003 Matthias Saou/Che
+* Fri Aug 22 2003 Matthias Saou/Che
- Added "--without milter" build option. (Matthias Saou)
- Fixed freshclam cron (Matthias Saou)
- Built the new package. (Che)
@@ -673,7 +683,7 @@ rm -rf %{buildroot}
- various fixes
- got rid of rpm-helper prereq
-* Fri Mar 24 2003 Che
+* Mon Mar 24 2003 Che
- some cleanups and fixes
- new patch added
@@ -686,7 +696,7 @@ rm -rf %{buildroot}
* Sat Nov 02 2002 Che
- version upgrade
-* Wed Oct 24 2002 Che
+* Thu Oct 24 2002 Che
- some important changes for lsb compliance
* Wed Oct 23 2002 Che
diff --git a/sources b/sources
index c4d296c..b26e5b2 100644
--- a/sources
+++ b/sources
@@ -1,4 +1 @@
-8944174b2dca6f38d96a2a2a7146d36e clamav-0.98.1-norar.tar.xz
-e809f74ed139df2e4af3fafbca32f678 clamd-wrapper.tar.bz2
-06f660f474d1a6863de4a00eb02521e3 main-55.cvd
-52ce049e8df4693766c5c42697890d35 daily-18353.cvd
+e9210784829725bf716fda7ca536bbb0 clamav-0.98.3-norar.tar.xz
commit 584867bec03059e970dcac11001d6026b6435975
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Wed Jan 15 09:23:52 2014 +0100
Upgrade to 0.98.1 and updated daily.cvd (#1053400)
diff --git a/clamav.spec b/clamav.spec
index 555b18f..fc1bfc9 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -4,8 +4,8 @@
Summary: Anti-virus software
Name: clamav
-Version: 0.98
-Release: 2%{?dist}
+Version: 0.98.1
+Release: 1%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
@@ -28,7 +28,7 @@ Source10: clamav-milter.sysconfig
# To download the *.cvd, go to http://www.clamav.net and use the links
# there (I renamed the files to add the -version suffix for verifying).
Source11: http://db.local.clamav.net/main-55.cvd
-Source12: http://db.local.clamav.net/daily-17940.cvd
+Source12: http://db.local.clamav.net/daily-18353.cvd
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -395,6 +395,9 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Wed Jan 15 2014 Robert Scheck <robert(a)fedoraproject.org> - 0.98.1-1
+- Upgrade to 0.98.1 and updated daily.cvd (#1053400)
+
* Sat Oct 19 2013 Robert Scheck <robert(a)fedoraproject.org> - 0.98-2
- Really fix all discrepancies between clamd initscript and clamd
config file (#960923, thanks to John Horne)
diff --git a/sources b/sources
index 3dd1c22..c4d296c 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
-500ed097cdd1f27ba2ed5fbc605eba37 clamav-0.98-norar.tar.xz
+8944174b2dca6f38d96a2a2a7146d36e clamav-0.98.1-norar.tar.xz
e809f74ed139df2e4af3fafbca32f678 clamd-wrapper.tar.bz2
06f660f474d1a6863de4a00eb02521e3 main-55.cvd
-012af1d3ee7156db8bad20650c89a94d daily-17940.cvd
+52ce049e8df4693766c5c42697890d35 daily-18353.cvd
commit c4cf2b1e61514556e725ec8990e063b89a099008
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Sat Oct 19 14:18:35 2013 +0200
Ensure that a clamd and clamav-milter condrestart via initscript works (#1018312, thanks to Filippo Carletti)
diff --git a/clamav-milter.init b/clamav-milter.init
index 347fe4b..d9fb037 100644
--- a/clamav-milter.init
+++ b/clamav-milter.init
@@ -47,7 +47,7 @@ case "$1" in
RETVAL=$?
;;
condrestart)
- [ -e /var/lock/subsys/clamd ] && restart
+ [ -e /var/lock/subsys/clamav-milter ] && $0 restart
RETVAL=$?
;;
*)
diff --git a/clamav.init b/clamav.init
index b2eb0c6..dacb403 100755
--- a/clamav.init
+++ b/clamav.init
@@ -46,7 +46,7 @@ case "$1" in
RETVAL=$?
;;
condrestart)
- [ -e /var/lock/subsys/clamd ] && restart
+ [ -e /var/lock/subsys/clamd ] && $0 restart
RETVAL=$?
;;
*)
@@ -55,4 +55,3 @@ case "$1" in
esac
exit $RETVAL
-
diff --git a/clamav.spec b/clamav.spec
index 1ec0861..555b18f 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -398,6 +398,8 @@ rm -rf %{buildroot}
* Sat Oct 19 2013 Robert Scheck <robert(a)fedoraproject.org> - 0.98-2
- Really fix all discrepancies between clamd initscript and clamd
config file (#960923, thanks to John Horne)
+- Ensure that a clamd and clamav-milter condrestart via initscript
+ works (#1018312, thanks to Filippo Carletti)
* Sun Oct 06 2013 Robert Scheck <robert(a)fedoraproject.org> - 0.98-1
- Upgrade to 0.98 and updated main.cvd and daily.cvd (#1010168)
commit 9fa6d109df873b43c0c93dc7fe48c8588d625899
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Sat Oct 19 13:54:54 2013 +0200
Really fix all discrepancies between clamd initscript and clamd config file (#960923, thanks to John Horne)
diff --git a/clamav.init b/clamav.init
index c3b28ac..b2eb0c6 100755
--- a/clamav.init
+++ b/clamav.init
@@ -30,7 +30,7 @@ case "$1" in
echo -n "Stopping Clam AntiVirus Daemon: "
killproc clamd
rm -f /var/run/clamav/clamd.sock
- rm -f /var/run/clamav/clamav.pid
+ rm -f /var/run/clamav/clamd.pid
RETVAL=$?
echo
### heres the fix... we gotta remove the stale files on restart
diff --git a/clamav.spec b/clamav.spec
index a33d41f..1ec0861 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -5,7 +5,7 @@
Summary: Anti-virus software
Name: clamav
Version: 0.98
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
@@ -395,6 +395,10 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Sat Oct 19 2013 Robert Scheck <robert(a)fedoraproject.org> - 0.98-2
+- Really fix all discrepancies between clamd initscript and clamd
+ config file (#960923, thanks to John Horne)
+
* Sun Oct 06 2013 Robert Scheck <robert(a)fedoraproject.org> - 0.98-1
- Upgrade to 0.98 and updated main.cvd and daily.cvd (#1010168)
- Fixed discrepancies between clamd initscript and clamd config
commit a1ce11dec47f24429d7485ee95460b8d13faa0a9
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Sun Oct 6 18:41:28 2013 +0200
- Upgrade to 0.98 and updated main.cvd and daily.cvd (#1010168)
- Fixed discrepancies between clamd initscript and clamd config file (#960923, thanks to John Horne)
- Added build requirement to ncurses-devel for clamdtop (again)
- Moved clamd wrapper script and documentation into correct sub-package (#782596, thanks to Philip Prindeville)
diff --git a/.gitignore b/.gitignore
index 7301ddf..cdb6045 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,10 +1,4 @@
/clamd-wrapper.tar.bz2
-/clamav-0.97.5-norar.tar.xz
-/main-54.cvd
-/daily-15103.cvd
-/clamav-0.97.6-norar.tar.xz
-/daily-15408.cvd
-/clamav-0.97.7-norar.tar.xz
-/daily.cvd
-/main.cvd
-/clamav-0.97.8-norar.tar.xz
+/clamav-*-norar.tar.xz
+/main*.cvd
+/daily*.cvd
diff --git a/clamav.init b/clamav.init
index 848dbce..c3b28ac 100755
--- a/clamav.init
+++ b/clamav.init
@@ -7,7 +7,7 @@
# server.
# processname: clamd
# pidfile: /var/run/clamav/clamd.pid
-# config: /etc/clamav.conf
+# config: /etc/clamd.conf
# Source function library.
. /etc/rc.d/init.d/functions
@@ -29,7 +29,7 @@ case "$1" in
stop)
echo -n "Stopping Clam AntiVirus Daemon: "
killproc clamd
- rm -f /var/clamav/clamd.socket
+ rm -f /var/run/clamav/clamd.sock
rm -f /var/run/clamav/clamav.pid
RETVAL=$?
echo
diff --git a/clamav.spec b/clamav.spec
index daf0015..a33d41f 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -4,15 +4,17 @@
Summary: Anti-virus software
Name: clamav
-Version: 0.97.8
+Version: 0.98
Release: 1%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
-# Upstream source includes libunrar that is not distributable.
-# rm -r libclamunrar
-#Source: http://downloads.sourceforge.net/clamav/clamav-%{version}.tar.gz
+# Unfortunately, clamav includes support for RAR v3, derived from GPL
+# incompatible unrar from RARlabs. We have to pull this code out. This
+# tarball was created by
+# make clean-sources [TARBALL=<original-tarball>] [VERSION=<version>]
+# Upstream: http://downloads.sourceforge.net/clamav/clamav-%{version}.tar.gz
Source0: clamav-%{version}-norar.tar.xz
Source1: clamav.init
Source2: clamav-milter.init
@@ -23,12 +25,14 @@ Source8: freshclam.logrotate
Source9: clamd.logrotate
Source10: clamav-milter.sysconfig
-Source11: http://db.local.clamav.net/main.cvd
-Source12: http://db.local.clamav.net/daily.cvd
+# To download the *.cvd, go to http://www.clamav.net and use the links
+# there (I renamed the files to add the -version suffix for verifying).
+Source11: http://db.local.clamav.net/main-55.cvd
+Source12: http://db.local.clamav.net/daily-17940.cvd
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: bzip2-devel, zlib-devel, gmp-devel, curl-devel, xz
+BuildRequires: bzip2-devel, zlib-devel, gmp-devel, curl-devel, xz, ncurses-devel
%{!?_without_milter:BuildRequires: sendmail-devel >= 8.12}
Requires: clamav-db = %{version}-%{release}
Requires(pre): shadow-utils
@@ -123,7 +127,7 @@ you will need to install %{name}-devel.
%setup -q -T -c
xz -dc %{SOURCE0} | (cd .. ; tar xvvf -)
-%{__perl} -pi.orig -e 's|/lib\b|/%{_lib}|g;' libtool configure
+%{__perl} -pi.orig -e 's|/lib\b|/%{_lib}|g;' configure
%{__perl} -pi.orig -e '
s|\@DBDIR\@|\$(localstatedir)/lib/clamav|g;
@@ -162,7 +166,7 @@ xz -dc %{SOURCE0} | (cd .. ; tar xvvf -)
s|^#(ArchiveMaxCompressionRatio) .+|$1 300|;
s|^#(ArchiveBlockEncrypted)|$1|;
s|^#(ArchiveBlockMax)|$1|;
- ' etc/clamd.conf
+ ' etc/clamd.conf.sample
%{__perl} -pi.orig -e '
s|^(Example)|#$1|;
@@ -171,7 +175,7 @@ xz -dc %{SOURCE0} | (cd .. ; tar xvvf -)
s|^#(LogSyslog)|$1|;
s|^#(DatabaseOwner) .+$|$1 clam|;
s|^(Checks) .+$|$1 24|;
- ' etc/freshclam.conf
+ ' etc/freshclam.conf.sample
%{__perl} -pi.orig -e '
s|^(Example)|#$1|;
@@ -179,14 +183,14 @@ xz -dc %{SOURCE0} | (cd .. ; tar xvvf -)
s|^#(MilterSocket) inet.+$|$1 /var/run/clamav/clamav-milter.sock|;
s|^#(PidFile) .+$|$1 /var/run/clamav/clamav-milter.pid|;
s|^#(ClamdSocket) .+$|$1 unix:%{_localstatedir}/run/clamav/clamd.sock|;
- ' etc/clamav-milter.conf
+ ' etc/clamav-milter.conf.sample
%build
%configure \
--program-prefix="%{?_program_prefix}" \
%{!?_without_milter:--enable-milter} \
--disable-clamav \
- --disable-static \
+ --disable-static \
--disable-zlib-vcheck \
--disable-unrar \
--enable-id-check \
@@ -195,7 +199,7 @@ xz -dc %{SOURCE0} | (cd .. ; tar xvvf -)
--with-group="clam" \
--with-libcurl \
--with-user="clam" \
- --disable-llvm
+ --disable-llvm
make %{?_smp_mflags}
@@ -208,6 +212,9 @@ install -Dp -m0755 %{SOURCE7} %{buildroot}%{_sysconfdir}/cron.daily/freshclam
install -Dp -m0644 %{SOURCE8} %{buildroot}%{_sysconfdir}/logrotate.d/freshclam
install -Dp -m0644 %{SOURCE9} %{buildroot}%{_sysconfdir}/logrotate.d/clamav
+mv -f %{buildroot}%{_sysconfdir}/clamd.conf{.sample,}
+mv -f %{buildroot}%{_sysconfdir}/freshclam.conf{.sample,}
+
# now rewrite scripts and config files in-place
sed -i \
-e 's!%%{_sbindir}!%{_sbindir}!g' \
@@ -219,6 +226,7 @@ sed -i \
%if %{!?_without_milter:1}0
install -Dp -m0755 %{SOURCE2} %{buildroot}%{_initrddir}/clamav-milter
install -Dp -m0644 %{SOURCE10} %{buildroot}%{_sysconfdir}/sysconfig/clamav-milter
+mv -f %{buildroot}%{_sysconfdir}/clamav-milter.conf{.sample,}
%else
rm %{buildroot}%{_mandir}/man8/clamav-milter.8*
%endif
@@ -235,6 +243,9 @@ install -d -m0755 %{buildroot}%{_sysconfdir}/clamd.d/
install -Dp -m0644 %{SOURCE11} %{buildroot}%{_localstatedir}/lib/clamav/main.cvd
install -Dp -m0644 %{SOURCE12} %{buildroot}%{_localstatedir}/lib/clamav/daily.cvd
+# Clean up for later usage in documentation
+for conf in etc/*.sample; do mv ${conf} ${conf%%.sample}; done
+
%post
/sbin/ldconfig
@@ -313,14 +324,12 @@ rm -rf %{buildroot}
%files
%defattr(-, root, root, 0755)
-%doc AUTHORS BUGS ChangeLog COPYING FAQ INSTALL NEWS README test/
+%doc AUTHORS BUGS ChangeLog COPYING FAQ INSTALL NEWS README
%doc docs/*.pdf etc/freshclam.conf
%doc %{_mandir}/man1/sigtool.1*
%doc %{_mandir}/man1/clamscan.1*
%doc %{_mandir}/man1/freshclam.1*
%doc %{_mandir}/man5/freshclam.conf.5*
-%doc %{_prefix}/share/clamav/README.clamd-wrapper
-%{_prefix}/share/clamav/clamd-wrapper
%config(noreplace) %{_sysconfdir}/freshclam.conf
%{_bindir}/clamscan
%{_bindir}/freshclam
@@ -337,6 +346,8 @@ rm -rf %{buildroot}
%doc %{_mandir}/man1/clambc.1*
%doc %{_mandir}/man5/clamd.conf.5*
%doc %{_mandir}/man8/clamd.8*
+%doc %{_prefix}/share/clamav/README.clamd-wrapper
+%{_prefix}/share/clamav/clamd-wrapper
%config(noreplace) %{_sysconfdir}/clamd.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/clamav
%{_sysconfdir}/clamd.d
@@ -344,6 +355,7 @@ rm -rf %{buildroot}
%{_sbindir}/clamd
%{_bindir}/clamconf
%{_bindir}/clamdscan
+%{_bindir}/clamdtop
%defattr(0644, clam, clam, 0755)
%{_localstatedir}/run/clamav/
@@ -383,6 +395,14 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Sun Oct 06 2013 Robert Scheck <robert(a)fedoraproject.org> - 0.98-1
+- Upgrade to 0.98 and updated main.cvd and daily.cvd (#1010168)
+- Fixed discrepancies between clamd initscript and clamd config
+ file (#960923, thanks to John Horne)
+- Added build requirement to ncurses-devel for clamdtop (again)
+- Moved clamd wrapper script and documentation into correct sub-
+ package (#782596, thanks to Philip Prindeville)
+
* Tue Apr 23 2013 Orion Poplawski <orion(a)cora.nwra.com> - 0.97.8-1
- Upgrade to 0.97.8
- Updated daily.cvd
diff --git a/sources b/sources
index ec1a084..3dd1c22 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
-8cfa8b280084a97518d3e80575e98938 clamav-0.97.8-norar.tar.xz
+500ed097cdd1f27ba2ed5fbc605eba37 clamav-0.98-norar.tar.xz
e809f74ed139df2e4af3fafbca32f678 clamd-wrapper.tar.bz2
-bbe585f65fb04504544ce3d6e07d38e9 daily.cvd
-eb12490fda87d602e476d4b163f8a34b main.cvd
+06f660f474d1a6863de4a00eb02521e3 main-55.cvd
+012af1d3ee7156db8bad20650c89a94d daily-17940.cvd
commit faa3f19f0380abcb265cbc388f3b3fff9cdf4742
Author: Orion Poplawski <orion(a)nwra.com>
Date: Tue Apr 23 16:09:44 2013 -0600
- Upgrade to 0.97.8
- Updated daily.cvd
diff --git a/.gitignore b/.gitignore
index 6d3c72d..7301ddf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@
/clamav-0.97.7-norar.tar.xz
/daily.cvd
/main.cvd
+/clamav-0.97.8-norar.tar.xz
diff --git a/clamav.spec b/clamav.spec
index d5f7c57..daf0015 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -4,13 +4,14 @@
Summary: Anti-virus software
Name: clamav
-Version: 0.97.7
+Version: 0.97.8
Release: 1%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
# Upstream source includes libunrar that is not distributable.
+# rm -r libclamunrar
#Source: http://downloads.sourceforge.net/clamav/clamav-%{version}.tar.gz
Source0: clamav-%{version}-norar.tar.xz
Source1: clamav.init
@@ -382,6 +383,10 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Tue Apr 23 2013 Orion Poplawski <orion(a)cora.nwra.com> - 0.97.8-1
+- Upgrade to 0.97.8
+- Updated daily.cvd
+
* Mon Mar 18 2013 Orion Poplawski <orion(a)cora.nwra.com> - 0.97.7-1
- Upgrade to 0.97.7
diff --git a/sources b/sources
index 410fab6..ec1a084 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
-e0dba8d8326cd88293224dc4ac398b21 clamav-0.97.7-norar.tar.xz
+8cfa8b280084a97518d3e80575e98938 clamav-0.97.8-norar.tar.xz
e809f74ed139df2e4af3fafbca32f678 clamd-wrapper.tar.bz2
-e3044fecc863b90996f023d20822b6c2 daily.cvd
+bbe585f65fb04504544ce3d6e07d38e9 daily.cvd
eb12490fda87d602e476d4b163f8a34b main.cvd
commit a5b7bfd560a1a7d7b77d3c852601a4ede74b304b
Author: Orion Poplawski <orion(a)nwra.com>
Date: Mon Mar 18 09:19:41 2013 -0600
Upgrade to 0.97.7
diff --git a/.gitignore b/.gitignore
index 25dfb7b..6d3c72d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,6 @@
/daily-15103.cvd
/clamav-0.97.6-norar.tar.xz
/daily-15408.cvd
+/clamav-0.97.7-norar.tar.xz
+/daily.cvd
+/main.cvd
diff --git a/clamav.spec b/clamav.spec
index 00e0c98..d5f7c57 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -4,7 +4,7 @@
Summary: Anti-virus software
Name: clamav
-Version: 0.97.6
+Version: 0.97.7
Release: 1%{?dist}
License: GPLv2
Group: Applications/System
@@ -12,7 +12,7 @@ URL: http://www.clamav.net/
# Upstream source includes libunrar that is not distributable.
#Source: http://downloads.sourceforge.net/clamav/clamav-%{version}.tar.gz
-Source0: clamav-0.97.6-norar.tar.xz
+Source0: clamav-%{version}-norar.tar.xz
Source1: clamav.init
Source2: clamav-milter.init
Source3: clamd-wrapper.tar.bz2
@@ -22,9 +22,8 @@ Source8: freshclam.logrotate
Source9: clamd.logrotate
Source10: clamav-milter.sysconfig
-# Temporary workaround for broken 0.97.6 tarball
-Source11: http://db.local.clamav.net/main-54.cvd
-Source12: http://db.local.clamav.net/daily-15408.cvd
+Source11: http://db.local.clamav.net/main.cvd
+Source12: http://db.local.clamav.net/daily.cvd
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -383,6 +382,9 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Mon Mar 18 2013 Orion Poplawski <orion(a)cora.nwra.com> - 0.97.7-1
+- Upgrade to 0.97.7
+
* Tue Sep 18 2012 Nick Bebout <nb(a)fedoraproject.org> - 0.97.6-1
- Upgrade to 0.97.6
diff --git a/sources b/sources
index aeaf952..410fab6 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
-ea488837891f272a05eeed297a52b4c8 clamav-0.97.6-norar.tar.xz
+e0dba8d8326cd88293224dc4ac398b21 clamav-0.97.7-norar.tar.xz
e809f74ed139df2e4af3fafbca32f678 clamd-wrapper.tar.bz2
-eb12490fda87d602e476d4b163f8a34b main-54.cvd
-47b966d960e28a28e505fd178c4cb095 daily-15408.cvd
+e3044fecc863b90996f023d20822b6c2 daily.cvd
+eb12490fda87d602e476d4b163f8a34b main.cvd
commit 15b6ada7a385abb0d64f32bee632a77aeb4c5b4f
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Thu Sep 27 19:41:50 2012 +0200
Ship local copy of virus database; it was removed by accident from 0.97.6 tarball
diff --git a/.gitignore b/.gitignore
index 128c670..25dfb7b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
/main-54.cvd
/daily-15103.cvd
/clamav-0.97.6-norar.tar.xz
+/daily-15408.cvd
diff --git a/clamav.spec b/clamav.spec
index 927809e..00e0c98 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -22,9 +22,9 @@ Source8: freshclam.logrotate
Source9: clamd.logrotate
Source10: clamav-milter.sysconfig
-# Temporary workaround for broken 0.97.5 tarball
-#Source11: http://db.local.clamav.net/main-54.cvd
-#Source12: http://db.local.clamav.net/daily-15103.cvd
+# Temporary workaround for broken 0.97.6 tarball
+Source11: http://db.local.clamav.net/main-54.cvd
+Source12: http://db.local.clamav.net/daily-15408.cvd
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -232,8 +232,8 @@ touch %{buildroot}%{_localstatedir}/log/clamav/clamd.log
install -d -m0755 %{buildroot}%{_localstatedir}/run/clamav/
install -d -m0755 %{buildroot}%{_sysconfdir}/clamd.d/
-#install -Dp -m0644 %{SOURCE11} %{buildroot}%{_localstatedir}/lib/clamav/main.cvd
-#install -Dp -m0644 %{SOURCE12} %{buildroot}%{_localstatedir}/lib/clamav/daily.cvd
+install -Dp -m0644 %{SOURCE11} %{buildroot}%{_localstatedir}/lib/clamav/main.cvd
+install -Dp -m0644 %{SOURCE12} %{buildroot}%{_localstatedir}/lib/clamav/daily.cvd
%post
/sbin/ldconfig
diff --git a/sources b/sources
index 65f9425..aeaf952 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,4 @@
ea488837891f272a05eeed297a52b4c8 clamav-0.97.6-norar.tar.xz
e809f74ed139df2e4af3fafbca32f678 clamd-wrapper.tar.bz2
+eb12490fda87d602e476d4b163f8a34b main-54.cvd
+47b966d960e28a28e505fd178c4cb095 daily-15408.cvd
commit ff8b3932d288c49b40a0ec2fb72b58332b614367
Author: Nick Bebout <nb(a)laptop.bebout.net>
Date: Tue Sep 18 22:37:08 2012 -0500
Comment out SOURCE11 SOURCE12
diff --git a/clamav.spec b/clamav.spec
index 81ba9f3..927809e 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -232,8 +232,8 @@ touch %{buildroot}%{_localstatedir}/log/clamav/clamd.log
install -d -m0755 %{buildroot}%{_localstatedir}/run/clamav/
install -d -m0755 %{buildroot}%{_sysconfdir}/clamd.d/
-install -Dp -m0644 %{SOURCE11} %{buildroot}%{_localstatedir}/lib/clamav/main.cvd
-install -Dp -m0644 %{SOURCE12} %{buildroot}%{_localstatedir}/lib/clamav/daily.cvd
+#install -Dp -m0644 %{SOURCE11} %{buildroot}%{_localstatedir}/lib/clamav/main.cvd
+#install -Dp -m0644 %{SOURCE12} %{buildroot}%{_localstatedir}/lib/clamav/daily.cvd
%post
/sbin/ldconfig
commit eee4fecd3edceaa0ff7f16c925006f023afd0a03
Author: Nick Bebout <nb(a)laptop.bebout.net>
Date: Tue Sep 18 22:26:37 2012 -0500
Fix sources file
diff --git a/sources b/sources
index c31c394..65f9425 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
ea488837891f272a05eeed297a52b4c8 clamav-0.97.6-norar.tar.xz
-e809f74ed139df2e4af3fafbca32f678 clamd-wrapper.tar.bz2
+e809f74ed139df2e4af3fafbca32f678 clamd-wrapper.tar.bz2
commit f3c9a633373d1d3c3a48e4929cb17087f01331c4
Author: Nick Bebout <nb(a)laptop.bebout.net>
Date: Tue Sep 18 18:32:24 2012 -0500
Add clamav-wrapper.tar.bz2 back to sources
diff --git a/sources b/sources
index 0d5102d..c31c394 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
ea488837891f272a05eeed297a52b4c8 clamav-0.97.6-norar.tar.xz
+e809f74ed139df2e4af3fafbca32f678 clamd-wrapper.tar.bz2
commit 36e6d2dd7cd2b00e25478821cbb4b0836d9f5eea
Author: Nick Bebout <nb(a)laptop.bebout.net>
Date: Tue Sep 18 18:18:16 2012 -0500
Update to 0.97.6
diff --git a/.gitignore b/.gitignore
index 36d7010..128c670 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
/clamav-0.97.5-norar.tar.xz
/main-54.cvd
/daily-15103.cvd
+/clamav-0.97.6-norar.tar.xz
diff --git a/clamav.spec b/clamav.spec
index 0e4e8f4..81ba9f3 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -4,7 +4,7 @@
Summary: Anti-virus software
Name: clamav
-Version: 0.97.5
+Version: 0.97.6
Release: 1%{?dist}
License: GPLv2
Group: Applications/System
@@ -12,7 +12,7 @@ URL: http://www.clamav.net/
# Upstream source includes libunrar that is not distributable.
#Source: http://downloads.sourceforge.net/clamav/clamav-%{version}.tar.gz
-Source0: clamav-0.97.5-norar.tar.xz
+Source0: clamav-0.97.6-norar.tar.xz
Source1: clamav.init
Source2: clamav-milter.init
Source3: clamd-wrapper.tar.bz2
@@ -23,8 +23,8 @@ Source9: clamd.logrotate
Source10: clamav-milter.sysconfig
# Temporary workaround for broken 0.97.5 tarball
-Source11: http://db.local.clamav.net/main-54.cvd
-Source12: http://db.local.clamav.net/daily-15103.cvd
+#Source11: http://db.local.clamav.net/main-54.cvd
+#Source12: http://db.local.clamav.net/daily-15103.cvd
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -383,6 +383,9 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Tue Sep 18 2012 Nick Bebout <nb(a)fedoraproject.org> - 0.97.6-1
+- Upgrade to 0.97.6
+
* Wed Jun 20 2012 Nick Bebout <nb(a)fedoraproject.org> - 0.97.5-1
- Upgrade to 0.97.5
- Fix CVE-2012-1419 clamav: specially-crafted POSIX tar files evade detection
diff --git a/sources b/sources
index 14401b5..0d5102d 100644
--- a/sources
+++ b/sources
@@ -1,4 +1 @@
-f8e88e6adc82349e5babfa6ee7bb98fa clamav-0.97.5-norar.tar.xz
-e809f74ed139df2e4af3fafbca32f678 clamd-wrapper.tar.bz2
-eb12490fda87d602e476d4b163f8a34b main-54.cvd
-1606d4b9dd4cf9658b22cb8bd135a0e3 daily-15103.cvd
+ea488837891f272a05eeed297a52b4c8 clamav-0.97.6-norar.tar.xz
commit 6bd5ce5307f4581e68d96b4849f47dad5edb384f
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Sun Jul 1 01:55:11 2012 +0200
Correct my broken previous commit :(
diff --git a/.gitignore b/.gitignore
index 23e3e8f..36d7010 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
/clamd-wrapper.tar.bz2
/clamav-0.97.5-norar.tar.xz
/main-54.cvd
-/daily-15050.cvd
+/daily-15103.cvd
diff --git a/clamav.spec b/clamav.spec
index 2bc1881..0e4e8f4 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -24,7 +24,7 @@ Source10: clamav-milter.sysconfig
# Temporary workaround for broken 0.97.5 tarball
Source11: http://db.local.clamav.net/main-54.cvd
-Source12: http://db.local.clamav.net/daily-15050.cvd
+Source12: http://db.local.clamav.net/daily-15103.cvd
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
diff --git a/sources b/sources
index 78cc194..14401b5 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,4 @@
+f8e88e6adc82349e5babfa6ee7bb98fa clamav-0.97.5-norar.tar.xz
+e809f74ed139df2e4af3fafbca32f678 clamd-wrapper.tar.bz2
eb12490fda87d602e476d4b163f8a34b main-54.cvd
-d41d8cd98f00b204e9800998ecf8427e daily-15050.cvd
+1606d4b9dd4cf9658b22cb8bd135a0e3 daily-15103.cvd
commit df3eb6be0d66e27aa8e51e09d87d08abd8a98c74
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Sun Jul 1 01:47:19 2012 +0200
Ship local copy of virus database; it was removed by accident from 0.97.5 tarball
diff --git a/.gitignore b/.gitignore
index 916d9f6..23e3e8f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,4 @@
-/clamav-0.97.2-norar.tar.xz
-/clamav-0.97.3.tar.gz
/clamd-wrapper.tar.bz2
-/clamav-0.97.3-norar.tar.xz
/clamav-0.97.5-norar.tar.xz
+/main-54.cvd
+/daily-15050.cvd
diff --git a/clamav.spec b/clamav.spec
index ee10cb8..2bc1881 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -22,6 +22,10 @@ Source8: freshclam.logrotate
Source9: clamd.logrotate
Source10: clamav-milter.sysconfig
+# Temporary workaround for broken 0.97.5 tarball
+Source11: http://db.local.clamav.net/main-54.cvd
+Source12: http://db.local.clamav.net/daily-15050.cvd
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: bzip2-devel, zlib-devel, gmp-devel, curl-devel, xz
@@ -228,6 +232,9 @@ touch %{buildroot}%{_localstatedir}/log/clamav/clamd.log
install -d -m0755 %{buildroot}%{_localstatedir}/run/clamav/
install -d -m0755 %{buildroot}%{_sysconfdir}/clamd.d/
+install -Dp -m0644 %{SOURCE11} %{buildroot}%{_localstatedir}/lib/clamav/main.cvd
+install -Dp -m0644 %{SOURCE12} %{buildroot}%{_localstatedir}/lib/clamav/daily.cvd
+
%post
/sbin/ldconfig
@@ -383,6 +390,7 @@ rm -rf %{buildroot}
- Fix CVE-2012-1443 clamav: specially-crafted RAR files evade detection
- Fix CVE-2012-1458 clamav: specially-crafted CHM files evade detection
- Fix CVE-2012-1459 clamav: specially-crafted length field in tar files evade detection
+- Ship local copy of virus database; it was removed by accident from 0.97.5 tarball
* Thu Jan 19 2012 Nick Bebout <nb(a)fedoraproject.org> - 0.97.3-4
- Split files out into SCM instead of in the spec
diff --git a/sources b/sources
index ec6a603..78cc194 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-f8e88e6adc82349e5babfa6ee7bb98fa clamav-0.97.5-norar.tar.xz
-e809f74ed139df2e4af3fafbca32f678 clamd-wrapper.tar.bz2
+eb12490fda87d602e476d4b163f8a34b main-54.cvd
+d41d8cd98f00b204e9800998ecf8427e daily-15050.cvd
commit c732ee62430052119672ccaba84b9651bdd673ca
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Sun Jul 1 01:25:02 2012 +0200
/var/clamav should be /var/lib/clamav (as it was somewhen in the past)
diff --git a/clamav.spec b/clamav.spec
index 56f5aa7..ee10cb8 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -253,14 +253,14 @@ fi
%pre
getent group clam >/dev/null || groupadd -r clam
getent passwd clam >/dev/null || \
-useradd -r -g clam -d /var/clamav -s /sbin/nologin \
+useradd -r -g clam -d /var/lib/clamav -s /sbin/nologin \
-c "Clam Anti Virus Checker" clam
exit 0
%pre -n clamd
getent group clam >/dev/null || groupadd -r clam
getent passwd clam >/dev/null || \
-useradd -r -g clam -d /var/clamav -s /sbin/nologin \
+useradd -r -g clam -d /var/lib/clamav -s /sbin/nologin \
-c "Clam Anti Virus Checker" clam
exit 0
@@ -291,7 +291,7 @@ fi
%pre db
getent group clam >/dev/null || groupadd -r clam
getent passwd clam >/dev/null || \
-useradd -r -g clam -d /var/clamav -s /sbin/nologin \
+useradd -r -g clam -d /var/lib/clamav -s /sbin/nologin \
-c "Clam Anti Virus Checker" clam
exit 0
commit 70dabdfb2ee545108398b8dc23ede0523531d862
Author: Nick Bebout <nb(a)fedoraproject.org>
Date: Wed Jun 20 22:26:09 2012 -0500
Add clamav-wrapper.tar.bz2 to sources
diff --git a/sources b/sources
index 94f05dd..ec6a603 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
f8e88e6adc82349e5babfa6ee7bb98fa clamav-0.97.5-norar.tar.xz
+e809f74ed139df2e4af3fafbca32f678 clamd-wrapper.tar.bz2
commit 278449beafd0d102b6d043fd1eba36f79c88e041
Author: Nick Bebout <nb(a)fedoraproject.org>
Date: Wed Jun 20 21:56:56 2012 -0500
Upgrade to 0.97.5
diff --git a/.gitignore b/.gitignore
index b09a0a5..916d9f6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
/clamav-0.97.3.tar.gz
/clamd-wrapper.tar.bz2
/clamav-0.97.3-norar.tar.xz
+/clamav-0.97.5-norar.tar.xz
diff --git a/sources b/sources
index 47b00bc..94f05dd 100644
--- a/sources
+++ b/sources
@@ -1,2 +1 @@
-b319a3f31a16811f1a92d63cda592521 clamav-0.97.3-norar.tar.xz
-e809f74ed139df2e4af3fafbca32f678 clamd-wrapper.tar.bz2
+f8e88e6adc82349e5babfa6ee7bb98fa clamav-0.97.5-norar.tar.xz
commit 1da35f528b76c172da1be61516633bf4774ba2f4
Author: Nick Bebout <nb(a)fedoraproject.org>
Date: Wed Jun 20 21:56:33 2012 -0500
Upgrade to 0.97.5
diff --git a/clamav.spec b/clamav.spec
index b5d68b2..56f5aa7 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -4,15 +4,15 @@
Summary: Anti-virus software
Name: clamav
-Version: 0.97.3
-Release: 4%{?dist}
+Version: 0.97.5
+Release: 1%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
# Upstream source includes libunrar that is not distributable.
#Source: http://downloads.sourceforge.net/clamav/clamav-%{version}.tar.gz
-Source0: clamav-0.97.3-norar.tar.xz
+Source0: clamav-0.97.5-norar.tar.xz
Source1: clamav.init
Source2: clamav-milter.init
Source3: clamd-wrapper.tar.bz2
@@ -376,6 +376,14 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Wed Jun 20 2012 Nick Bebout <nb(a)fedoraproject.org> - 0.97.5-1
+- Upgrade to 0.97.5
+- Fix CVE-2012-1419 clamav: specially-crafted POSIX tar files evade detection
+- Fix CVE-2012-1457 clamav: overly long length field in tar files evade detection
+- Fix CVE-2012-1443 clamav: specially-crafted RAR files evade detection
+- Fix CVE-2012-1458 clamav: specially-crafted CHM files evade detection
+- Fix CVE-2012-1459 clamav: specially-crafted length field in tar files evade detection
+
* Thu Jan 19 2012 Nick Bebout <nb(a)fedoraproject.org> - 0.97.3-4
- Split files out into SCM instead of in the spec
commit b6a2788bdb2d6594a798987b9112ebcfb3ea3406
Author: Nick Bebout <nb(a)fedoraproject.org>
Date: Thu Jan 19 19:33:03 2012 -0600
Split out files into SCM instead of in spec
diff --git a/clamav-milter.sysconfig b/clamav-milter.sysconfig
new file mode 100644
index 0000000..834b0cd
--- /dev/null
+++ b/clamav-milter.sysconfig
@@ -0,0 +1,4 @@
+### Simple config file for clamav-milter, you should
+### read the documentation and tweak it as you wish.
+
+CLAMAV_FLAGS=""
diff --git a/clamav.spec b/clamav.spec
index ba4b951..b5d68b2 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -5,7 +5,7 @@
Summary: Anti-virus software
Name: clamav
Version: 0.97.3
-Release: 3%{?dist}
+Release: 4%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
@@ -16,6 +16,12 @@ Source0: clamav-0.97.3-norar.tar.xz
Source1: clamav.init
Source2: clamav-milter.init
Source3: clamd-wrapper.tar.bz2
+
+Source7: freshclam.cron
+Source8: freshclam.logrotate
+Source9: clamd.logrotate
+Source10: clamav-milter.sysconfig
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: bzip2-devel, zlib-devel, gmp-devel, curl-devel, xz
@@ -171,53 +177,6 @@ xz -dc %{SOURCE0} | (cd .. ; tar xvvf -)
s|^#(ClamdSocket) .+$|$1 unix:%{_localstatedir}/run/clamav/clamd.sock|;
' etc/clamav-milter.conf
-
-cat <<EOF >clamd.logrotate
-%{_localstatedir}/log/clamav/clamd.log {
- missingok
- notifempty
- create 644 clam clam
- postrotate
- killall -HUP clamd 2>/dev/null || :
- endscript
-}
-EOF
-
-cat <<EOF >freshclam.logrotate
-%{_localstatedir}/log/clamav/freshclam.log {
- missingok
- notifempty
- create 644 clam clam
-}
-EOF
-
-cat <<'EOF' >freshclam.cron
-#!/bin/sh
-
-### A simple update script for the clamav virus database.
-### This could as well be replaced by a SysV script.
-
-### fix log file if needed
-LOG_FILE="%{_localstatedir}/log/clamav/freshclam.log"
-if [ ! -f "$LOG_FILE" ]; then
- touch "$LOG_FILE"
- chmod 644 "$LOG_FILE"
- chown clam.clam "$LOG_FILE"
-fi
-
-%{_bindir}/freshclam \
- --quiet \
- --datadir="%{_localstatedir}/lib/clamav" \
- --log="$LOG_FILE"
-EOF
-
-%{__cat} <<EOF >clamav-milter.sysconfig
-### Simple config file for clamav-milter, you should
-### read the documentation and tweak it as you wish.
-
-CLAMAV_FLAGS=""
-EOF
-
%build
%configure \
--program-prefix="%{?_program_prefix}" \
@@ -241,13 +200,21 @@ rm -rf %{buildroot}
make install DESTDIR="%{buildroot}"
install -Dp -m0755 %{SOURCE1} %{buildroot}%{_initrddir}/clamd
-install -Dp -m0755 freshclam.cron %{buildroot}%{_sysconfdir}/cron.daily/freshclam
-install -Dp -m0644 freshclam.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/freshclam
-install -Dp -m0644 clamd.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/clamav
+install -Dp -m0755 %{SOURCE7} %{buildroot}%{_sysconfdir}/cron.daily/freshclam
+install -Dp -m0644 %{SOURCE8} %{buildroot}%{_sysconfdir}/logrotate.d/freshclam
+install -Dp -m0644 %{SOURCE9} %{buildroot}%{_sysconfdir}/logrotate.d/clamav
+
+# now rewrite scripts and config files in-place
+sed -i \
+ -e 's!%%{_sbindir}!%{_sbindir}!g' \
+ -e 's!%%{_bindir}!%{_bindir}!g' \
+ -e 's!%%{_localstatedir}!%{_localstatedir}!g' \
+ %{buildroot}%{_sysconfdir}/cron.daily/freshclam \
+ %{buildroot}%{_sysconfdir}/logrotate.d/*
%if %{!?_without_milter:1}0
install -Dp -m0755 %{SOURCE2} %{buildroot}%{_initrddir}/clamav-milter
-install -Dp -m0644 clamav-milter.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/clamav-milter
+install -Dp -m0644 %{SOURCE10} %{buildroot}%{_sysconfdir}/sysconfig/clamav-milter
%else
rm %{buildroot}%{_mandir}/man8/clamav-milter.8*
%endif
@@ -409,6 +376,9 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Thu Jan 19 2012 Nick Bebout <nb(a)fedoraproject.org> - 0.97.3-4
+- Split files out into SCM instead of in the spec
+
* Sun Jan 1 2012 Nick Bebout <nb(a)fedoraproject.org> - 0.97.3-3
- Revert patch from 0.97.3-2
diff --git a/clamd.logrotate b/clamd.logrotate
new file mode 100644
index 0000000..b233f3a
--- /dev/null
+++ b/clamd.logrotate
@@ -0,0 +1,8 @@
+%{_localstatedir}/log/clamav/clamd.log {
+ missingok
+ notifempty
+ create 644 clam clam
+ postrotate
+ killall -HUP clamd 2>/dev/null || :
+ endscript
+}
diff --git a/freshclam.cron b/freshclam.cron
new file mode 100644
index 0000000..e40d8ef
--- /dev/null
+++ b/freshclam.cron
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+### A simple update script for the clamav virus database.
+### This could as well be replaced by a SysV script.
+
+### fix log file if needed
+LOG_FILE="%{_localstatedir}/log/clamav/freshclam.log"
+if [ ! -f "$LOG_FILE" ]; then
+ touch "$LOG_FILE"
+ chmod 644 "$LOG_FILE"
+ chown clam.clam "$LOG_FILE"
+fi
+
+%{_bindir}/freshclam \
+ --quiet \
+ --datadir="%{_localstatedir}/lib/clamav" \
+ --log="$LOG_FILE"
diff --git a/freshclam.logrotate b/freshclam.logrotate
new file mode 100644
index 0000000..272d220
--- /dev/null
+++ b/freshclam.logrotate
@@ -0,0 +1,5 @@
+%{_localstatedir}/log/clamav/freshclam.log {
+ missingok
+ notifempty
+ create 644 clam clam
+}
commit 9650322a3c84c2129ddcb0da4f23373ce6960169
Merge: a638626 2cfebfc
Author: Nick Bebout <nb(a)fedoraproject.org>
Date: Sun Jan 1 16:44:31 2012 -0600
Merge branch 'el6' of ssh://pkgs.fedoraproject.org/clamav into el6
Conflicts:
freshclam.logrotate
commit a6386267af7aef72c90d01b8364113b49e293dec
Author: Nick Bebout <nb(a)fedoraproject.org>
Date: Sun Jan 1 16:40:48 2012 -0600
Bump to 0.97.3-3
diff --git a/clamav.spec b/clamav.spec
index bd8c933..ba4b951 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -5,7 +5,7 @@
Summary: Anti-virus software
Name: clamav
Version: 0.97.3
-Release: 1%{?dist}
+Release: 3%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
@@ -409,6 +409,9 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Sun Jan 1 2012 Nick Bebout <nb(a)fedoraproject.org> - 0.97.3-3
+- Revert patch from 0.97.3-2
+
* Tue Oct 18 2011 Nick Bebout <nb(a)fedoraproject.org> - 0.97.3-1
- Update to 0.97.3
- Fix CVE-2011-3627 clamav: Recursion level crash fixed in v0.97.3
commit 1b188a1f3f19a9a627083b1407aa831810ad6c2f
Author: Nick Bebout <nb(a)fedoraproject.org>
Date: Sun Jan 1 16:39:31 2012 -0600
Revert "Add files from bug 756854"
This reverts commit 14d21bc46d3a59c90e91420a310f14102e8d859b.
diff --git a/README.clamd-wrapper b/README.clamd-wrapper
deleted file mode 100644
index 5cd1b91..0000000
--- a/README.clamd-wrapper
+++ /dev/null
@@ -1,116 +0,0 @@
-To create individual clamd-instance take the following files and
-modify/copy them in the suggested way:
-
-clamd.conf:
- * set LogFile, PidFile, LocalSocket and User to suitable values
- * place this file into /etc/clamd.d with an unique service-name;
- e.g. as /etc/clamd.d/<SERVICE>.conf
-
- To make logfile rotation work properly, the LogFile should be
- writable for the assigned User. Recommended way to reach this, is
- to:
- * make it owned by the User's *group*
- * assign at least 0620 (u+rw,g+w) permissions
-
- A suitable command might be
- | # touch <logfile>
- | # chgrp <user> <logfile>
- | # chmod 0620 <logfile>
-
- NEVER use 'clamav' as the user since he can modify the database.
- This is the user who is running the application; e.g. for mimedefang
- (http://www.roaringpenguin.com/mimedefang), the user might be
- 'defang'.Theoretically, distinct users could be used, but it must be
- made sure that the application-user can write into the socket-file,
- and that the clamd-user can access the files asked by the
- application to be checked.
-
-
-clamd.logrotate:
- * set the correct value for the logfile
- * place it into /etc/logrotate.d
-
-clamd.sysconfig:
- * set the name of the config-file and the local socket
- * copy it to /etc/sysconfig/clamd.<SERVICE>
-
-clamd.init:
- * set the service-name
- * place it into /etc/init.d/ with an unique name and activate it
- (e.g. with /sbin/chkconfig clamd.<SERVICE> on)
-
-Additionally, a symlink must be set to clamd in a way like
- | # ln -s clamd /usr/sbin/clamd.<SERVICE>
-and the directory for the socket file must be created (see 'LocalSocket'
-in clamd.conf)
- | # mkdir -p /var/run/clamd.<SERVICE>
-
-
-This directory must be writable by the 'User' chosen in the config-file.
-
-
-
-[Disclaimer:
- this file and the script/configfiles are not part of the official
- clamav package.
-
- Please send complaints and comments to
- mailto:enrico.scholz@informatik.tu-chemnitz.de!]
-To create individual clamd-instance take the following files and
-modify/copy them in the suggested way:
-
-clamd.conf:
- * set LogFile, PidFile, LocalSocket and User to suitable values
- * place this file into /etc/clamd.d with an unique service-name;
- e.g. as /etc/clamd.d/<SERVICE>.conf
-
- To make logfile rotation work properly, the LogFile should be
- writable for the assigned User. Recommended way to reach this, is
- to:
- * make it owned by the User's *group*
- * assign at least 0620 (u+rw,g+w) permissions
-
- A suitable command might be
- | # touch <logfile>
- | # chgrp <user> <logfile>
- | # chmod 0620 <logfile>
-
- NEVER use 'clamav' as the user since he can modify the database.
- This is the user who is running the application; e.g. for mimedefang
- (http://www.roaringpenguin.com/mimedefang), the user might be
- 'defang'.Theoretically, distinct users could be used, but it must be
- made sure that the application-user can write into the socket-file,
- and that the clamd-user can access the files asked by the
- application to be checked.
-
-
-clamd.logrotate:
- * set the correct value for the logfile
- * place it into /etc/logrotate.d
-
-clamd.sysconfig:
- * set the name of the config-file and the local socket
- * copy it to /etc/sysconfig/clamd.<SERVICE>
-
-clamd.init:
- * set the service-name
- * place it into /etc/init.d/ with an unique name and activate it
- (e.g. with /sbin/chkconfig clamd.<SERVICE> on)
-
-Additionally, a symlink must be set to clamd in a way like
- | # ln -s clamd /usr/sbin/clamd.<SERVICE>
-and the directory for the socket file must be created (see 'LocalSocket'
-in clamd.conf)
- | # mkdir -p /var/run/clamd.<SERVICE>
-
-
-This directory must be writable by the 'User' chosen in the config-file.
-
-
-
-[Disclaimer:
- this file and the script/configfiles are not part of the official
- clamav package.
-
- Please send complaints and comments to
- mailto:enrico.scholz@informatik.tu-chemnitz.de!]
diff --git a/clamav-milter.sysconfig b/clamav-milter.sysconfig
deleted file mode 100644
index bd82488..0000000
--- a/clamav-milter.sysconfig
+++ /dev/null
@@ -1,8 +0,0 @@
-### Simple config file for clamav-milter, you should
-### read the documentation and tweak it as you wish.
-
-CLAMAV_FLAGS=""
-### Simple config file for clamav-milter, you should
-### read the documentation and tweak it as you wish.
-
-CLAMAV_FLAGS=""
diff --git a/clamav.spec b/clamav.spec
index 53db81e..bd8c933 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -5,7 +5,7 @@
Summary: Anti-virus software
Name: clamav
Version: 0.97.3
-Release: 2%{?dist}
+Release: 1%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
@@ -15,14 +15,7 @@ URL: http://www.clamav.net/
Source0: clamav-0.97.3-norar.tar.xz
Source1: clamav.init
Source2: clamav-milter.init
-Source3: clamd-wrapper
-Source4: clamd.init
-Source5: README.clamd-wrapper
-Source6: clamd.sysconfig
-Source7: freshclam.logrotate
-Source8: freshclam.cron
-Source9: clamd.logrotate
-Source10: clamav-milter.sysconfig
+Source3: clamd-wrapper.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: bzip2-devel, zlib-devel, gmp-devel, curl-devel, xz
@@ -178,6 +171,53 @@ xz -dc %{SOURCE0} | (cd .. ; tar xvvf -)
s|^#(ClamdSocket) .+$|$1 unix:%{_localstatedir}/run/clamav/clamd.sock|;
' etc/clamav-milter.conf
+
+cat <<EOF >clamd.logrotate
+%{_localstatedir}/log/clamav/clamd.log {
+ missingok
+ notifempty
+ create 644 clam clam
+ postrotate
+ killall -HUP clamd 2>/dev/null || :
+ endscript
+}
+EOF
+
+cat <<EOF >freshclam.logrotate
+%{_localstatedir}/log/clamav/freshclam.log {
+ missingok
+ notifempty
+ create 644 clam clam
+}
+EOF
+
+cat <<'EOF' >freshclam.cron
+#!/bin/sh
+
+### A simple update script for the clamav virus database.
+### This could as well be replaced by a SysV script.
+
+### fix log file if needed
+LOG_FILE="%{_localstatedir}/log/clamav/freshclam.log"
+if [ ! -f "$LOG_FILE" ]; then
+ touch "$LOG_FILE"
+ chmod 644 "$LOG_FILE"
+ chown clam.clam "$LOG_FILE"
+fi
+
+%{_bindir}/freshclam \
+ --quiet \
+ --datadir="%{_localstatedir}/lib/clamav" \
+ --log="$LOG_FILE"
+EOF
+
+%{__cat} <<EOF >clamav-milter.sysconfig
+### Simple config file for clamav-milter, you should
+### read the documentation and tweak it as you wish.
+
+CLAMAV_FLAGS=""
+EOF
+
%build
%configure \
--program-prefix="%{?_program_prefix}" \
@@ -200,30 +240,19 @@ make %{?_smp_mflags}
rm -rf %{buildroot}
make install DESTDIR="%{buildroot}"
-install -Dp -m0755 %{SOURCE1} %{buildroot}%{_initrddir}/clamav
-install -Dp -m0755 %{SOURCE8} %{buildroot}%{_sysconfdir}/cron.daily/freshclam
-install -Dp -m0644 %{SOURCE7} %{buildroot}%{_sysconfdir}/logrotate.d/freshclam
-install -Dp -m0644 %{SOURCE9} %{buildroot}%{_sysconfdir}/logrotate.d/clamav
-
-# now rewrite scripts and config files in-place
-sed -i \
- -e 's!%%{_sbindir}!%{_sbindir}!g' \
- -e 's!%%{_bindir}!%{_bindir}!g' \
- -e 's!%%{_localstatedir}!%{_localstatedir}!g' \
- %{buildroot}%{_sysconfdir}/logrotate.d/* \
- %{buildroot}%{_sysconfdir}/cron.daily/freshclam
+install -Dp -m0755 %{SOURCE1} %{buildroot}%{_initrddir}/clamd
+install -Dp -m0755 freshclam.cron %{buildroot}%{_sysconfdir}/cron.daily/freshclam
+install -Dp -m0644 freshclam.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/freshclam
+install -Dp -m0644 clamd.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/clamav
%if %{!?_without_milter:1}0
install -Dp -m0755 %{SOURCE2} %{buildroot}%{_initrddir}/clamav-milter
-install -Dp -m0644 %{SOURCE10} %{buildroot}%{_sysconfdir}/sysconfig/clamav-milter
+install -Dp -m0644 clamav-milter.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/clamav-milter
%else
rm %{buildroot}%{_mandir}/man8/clamav-milter.8*
%endif
-
# Install clamav-wrapper:
-install -d -m0755 %{buildroot}/%{_prefix}/share/clamav
-install -m0755 -t %{buildroot}/%{_prefix}/share/clamav %{SOURCE3} %{SOURCE4}
-install -m0444 -t %{buildroot}/%{_prefix}/share/clamav %{SOURCE5} %{SOURCE6}
+tar xjf %{SOURCE3} -C %{buildroot}/%{_prefix}/share
install -d -m0755 %{buildroot}%{_localstatedir}/log/clamav/
touch %{buildroot}%{_localstatedir}/log/clamav/freshclam.log
@@ -316,6 +345,8 @@ rm -rf %{buildroot}
%doc %{_mandir}/man1/clamscan.1*
%doc %{_mandir}/man1/freshclam.1*
%doc %{_mandir}/man5/freshclam.conf.5*
+%doc %{_prefix}/share/clamav/README.clamd-wrapper
+%{_prefix}/share/clamav/clamd-wrapper
%config(noreplace) %{_sysconfdir}/freshclam.conf
%{_bindir}/clamscan
%{_bindir}/freshclam
@@ -335,12 +366,10 @@ rm -rf %{buildroot}
%config(noreplace) %{_sysconfdir}/clamd.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/clamav
%{_sysconfdir}/clamd.d
-%config %{_initrddir}/clamav
+%config %{_initrddir}/clamd
%{_sbindir}/clamd
%{_bindir}/clamconf
%{_bindir}/clamdscan
-%doc %{_prefix}/share/clamav/README.clamd-wrapper
-%{_prefix}/share/clamav/clamd*
%defattr(0644, clam, clam, 0755)
%{_localstatedir}/run/clamav/
@@ -380,10 +409,6 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
-* Fri Nov 25 2011 Philip Prindeville <philipp(a)fedoraproject.org> - 0.97.3-2
-- Add missing clamd-wrapper supporting files
-- Remove from init script the unused CLAMD_SOCKET variable
-
* Tue Oct 18 2011 Nick Bebout <nb(a)fedoraproject.org> - 0.97.3-1
- Update to 0.97.3
- Fix CVE-2011-3627 clamav: Recursion level crash fixed in v0.97.3
diff --git a/clamav.spec.orig b/clamav.spec.orig
deleted file mode 100644
index 45aa5db..0000000
--- a/clamav.spec.orig
+++ /dev/null
@@ -1,1091 +0,0 @@
-#global prerelease rc1
-
-## Fedora Extras specific customization below...
-%bcond_without fedora
-%bcond_without upstart
-%bcond_without systemd
-%bcond_with sysv
-%bcond_without tmpfiles
-%bcond_with unrar
-%bcond_without noarch
-%bcond_without bytecode
-##
-
-%ifnarch s390 s390x
-%global have_ocaml 1
-%else
-%global have_ocaml 0
-%endif
-
-%global username clamupdate
-%global homedir %_var/lib/clamav
-%global freshclamlog %_var/log/freshclam.log
-%global milteruser clamilt
-%global milterlog %_var/log/clamav-milter.log
-%global milterstatedir %_var/run/clamav-milter
-%global pkgdatadir %_datadir/%name
-
-%global scanuser clamscan
-%global scanstatedir %_var/run/clamd.scan
-
-%{?with_noarch:%global noarch BuildArch: noarch}
-%{!?_unitdir:%global _unitdir /lib/systemd/system}
-%{!?release_func:%global release_func() %%{?prerelease:0.}%1%%{?prerelease:.%%prerelease}%%{?dist}}
-%{!?apply:%global apply(p:n:b:) %patch%%{-n:%%{-n*}} %%{-p:-p %%{-p*}} %%{-b:-b %%{-b*}} \
-%nil}
-%{!?systemd_reqs:%global systemd_reqs \
-Requires(post): /bin/systemctl\
-Requires(preun): /bin/systemctl\
-Requires(postun): /bin/systemctl\
-%nil}
-%{!?systemd_install:%global systemd_install()\
-%post %1\
-test "$1" != "1" || /bin/systemctl daemon-reload >/dev/null 2>&1 || :\
-%preun %1\
-test "$1" != "0" || /bin/systemctl --no-reload disable %2 >/dev/null 2>&1 || :\
-test "$1" != "0" || /bin/systemctl stop %2 >/dev/null 2>&1 || :\
-%postun %1\
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :\
-test "$1" = "0" || /bin/systemctl try-restart %2 >/dev/null 2>&1 || :\
-%nil}
-
-
-Summary: End-user tools for the Clam Antivirus scanner
-Name: clamav
-Version: 0.97.3
-Release: %release_func 1700
-License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
-Group: Applications/File
-URL: http://www.clamav.net
-%if 0%{?with_unrar:1}
-Source0: http://download.sourceforge.net/sourceforge/clamav/%name-%version%{?prere...
-Source999: http://download.sourceforge.net/sourceforge/clamav/%name-%version%{?prere...
-%else
-# Unfortunately, clamav includes support for RAR v3, derived from GPL
-# incompatible unrar from RARlabs. We have to pull this code out.
-# tarball was created by
-# make clean-sources [TARBALL=<original-tarball>] [VERSION=<version>]
-Source0: %name-%version%{?prerelease}-norar.tar.xz
-%endif
-Source1: clamd-wrapper
-Source2: clamd.sysconfig
-Source3: clamd.logrotate
-Source5: clamd-README
-Source6: clamav-update.logrotate
-Source7: clamd.SERVICE.init
-Source8: clamav-notify-servers
-Patch24: clamav-0.92-private.patch
-Patch25: clamav-0.92-open.patch
-Patch26: clamav-0.95-cliopts.patch
-Patch27: clamav-0.95.3-umask.patch
-# https://bugzilla.redhat.com/attachment.cgi?id=403775&action=diff&context=...
-Patch29: clamav-0.96.2-jitoff.patch
-BuildRoot: %_tmppath/%name-%version-%release-root
-Requires: clamav-lib = %version-%release
-Requires: data(clamav)
-BuildRequires: zlib-devel bzip2-devel gmp-devel curl-devel
-BuildRequires: ncurses-devel
-BuildRequires: %_includedir/tcpd.h
-%{?with_bytecode:BuildRequires: bc tcl groff graphviz}
-%if %{have_ocaml}
-%{?with_bytecode:BuildRequires: ocaml}
-%endif
-
-%package filesystem
-Summary: Filesystem structure for clamav
-Group: Applications/File
-Provides: user(%username) = 4
-Provides: group(%username) = 4
-# Prevent version mix
-Conflicts: %name < %version-%release
-Conflicts: %name > %version-%release
-BuildRequires: fedora-usermgmt-devel
-%{?noarch}
-%{?FE_USERADD_REQ}
-
-%package lib
-Summary: Dynamic libraries for the Clam Antivirus scanner
-Group: System Environment/Libraries
-Requires: data(clamav)
-
-%package devel
-Summary: Header files and libraries for the Clam Antivirus scanner
-Group: Development/Libraries
-Source100: clamd-gen
-Requires: clamav-lib = %version-%release
-Requires: clamav-filesystem = %version-%release
-
-%package data
-Summary: Virus signature data for the Clam Antivirus scanner
-Group: Applications/File
-Requires(pre): clamav-filesystem = %version-%release
-Requires(postun): clamav-filesystem = %version-%release
-Provides: data(clamav) = full
-Conflicts: data(clamav) < full
-Conflicts: data(clamav) > full
-%{?noarch}
-
-%package data-empty
-Summary: Empty data package for the Clam Antivirus scanner
-Group: Applications/File
-Provides: data(clamav) = empty
-Conflicts: data(clamav) < empty
-Conflicts: data(clamav) > empty
-%{?noarch}
-
-%package update
-Summary: Auto-updater for the Clam Antivirus scanner data-files
-Group: Applications/File
-Source200: freshclam-sleep
-Source201: freshclam.sysconfig
-Source202: clamav-update.cron
-Requires: clamav-filesystem = %version-%release
-Requires(pre): /etc/cron.d
-Requires(postun): /etc/cron.d
-Requires(post): %__chown %__chmod
-Requires(post): group(%username)
-
-%package server
-Summary: Clam Antivirus scanner server
-Group: System Environment/Daemons
-Requires: data(clamav)
-Requires: clamav-filesystem = %version-%release
-Requires: clamav-lib = %version-%release
-
-%package server-sysvinit
-Summary: SysV initscripts for clamav server
-Group: System Environment/Daemons
-Provides: init(clamav-server) = sysv
-Requires: clamav-server = %version-%release
-Requires(pre): %_initrddir
-Requires(postun): %_initrddir
-Provides: clamav-server-sysv = %version-%release
-Obsoletes: clamav-server-sysv < %version-%release
-%{?noarch}
-
-
-%package scanner
-Summary: Clamav scanner daemon
-Group: System Environment/Daemons
-Requires: init(clamav-scanner)
-Provides: user(%scanuser) = 49
-Provides: group(%scanuser) = 49
-Requires: clamav-server = %version-%release
-%{?noarch}
-
-# Remove me after EOL of RHEL5
-%package scanner-sysvinit
-Summary: SysV initscripts for clamav scanner daemon
-Group: System Environment/Daemons
-Provides: init(clamav-scanner) = sysv
-Requires: clamav-server-sysvinit = %version-%release
-Requires: clamav-scanner = %version-%release
-Requires(pre): %_initrddir
-Requires(postun): %_initrddir initscripts
-Requires(post): chkconfig
-Requires(preun): chkconfig initscripts
-%{?noarch}
-
-%package scanner-upstart
-Summary: Upstart initscripts for clamav scanner daemon
-Group: System Environment/Daemons
-Source410: clamd.scan.upstart
-Provides: init(clamav-scanner) = upstart
-Requires: clamav-scanner = %version-%release
-Requires(pre): /etc/init
-Requires(post): /usr/bin/killall
-Requires(preun): /sbin/initctl
-%{?noarch}
-
-%package scanner-systemd
-Summary: Systemd initscripts for clamav scanner daemon
-Group: System Environment/Daemons
-Source430: clamd.scan.systemd
-Provides: init(clamav-scanner) = systemd
-Requires: clamav-scanner = %version-%release
-%{?systemd_reqs}
-%{?noarch}
-
-# Remove me after F17
-%if 0%{!?with_sysv:1}
-Provides: %name-scanner-sysvinit = %version-%release
-Obsoletes: %name-scanner-sysvinit < %version-%release
-%endif
-
-
-%package milter
-Summary: Milter module for the Clam Antivirus scanner
-Group: System Environment/Daemons
-Source300: README.fedora
-Requires: init(clamav-milter)
-BuildRequires: sendmail-devel
-BuildRequires: fedora-usermgmt-devel
-Provides: user(%milteruser) = 5
-Provides: group(%milteruser) = 5
-Requires(post): coreutils
-%{?FE_USERADD_REQ}
-
-Provides: milter(clamav) = sendmail
-Provides: milter(clamav) = postfix
-
-Provides: clamav-milter-core = %version-%release
-Obsoletes: clamav-milter-core < %version-%release
-Provides: clamav-milter-sendmail = %version-%release
-Obsoletes: clamav-milter-sendmail < %version-%release
-
-# Remove me after EOL of RHEL5
-%package milter-sysvinit
-Summary: SysV initscripts for the clamav sendmail-milter
-Group: System Environment/Daemons
-Source320: clamav-milter.sysv
-Provides: init(clamav-milter) = sysvinit
-Requires: clamav-milter = %version-%release
-Requires(post): user(%milteruser) clamav-milter
-Requires(preun): user(%milteruser) clamav-milter
-Requires(pre): %_initrddir
-Requires(postun): %_initrddir initscripts
-Requires(post): chkconfig
-Requires(preun): chkconfig initscripts
-Provides: clamav-milter-sysv = %version-%release
-Obsoletes: clamav-milter-sysv < %version-%release
-%{?noarch}
-
-%package milter-upstart
-Summary: Upstart initscripts for the clamav sendmail-milter
-Group: System Environment/Daemons
-Source310: clamav-milter.upstart
-Provides: init(clamav-milter) = upstart
-Requires: clamav-milter = %version-%release
-Requires(pre): /etc/init
-Requires(post): /usr/bin/killall
-Requires(preun): /sbin/initctl
-%{?noarch}
-
-%package milter-systemd
-Summary: Systemd initscripts for the clamav sendmail-milter
-Group: System Environment/Daemons
-Source330: clamav-milter.systemd
-Provides: init(clamav-milter) = systemd
-Requires: clamav-milter = %version-%release
-%{?systemd_reqs}
-%{?noarch}
-
-# Remove me after F17
-%if 0%{!?with_sysv:1}
-Provides: %name-milter-sysvinit = %version-%release
-Obsoletes: %name-milter-sysvinit < %version-%release
-%endif
-
-
-%description
-Clam AntiVirus is an anti-virus toolkit for UNIX. The main purpose of this
-software is the integration with mail servers (attachment scanning). The
-package provides a flexible and scalable multi-threaded daemon, a command
-line scanner, and a tool for automatic updating via Internet. The programs
-are based on a shared library distributed with the Clam AntiVirus package,
-which you can use with your own software. The virus database is based on
-the virus database from OpenAntiVirus, but contains additional signatures
-(including signatures for popular polymorphic viruses, too) and is KEPT UP
-TO DATE.
-
-%description filesystem
-This package provides the filesystem structure and contains the
-user-creation scripts required by clamav.
-
-%description lib
-This package contains dynamic libraries shared between applications
-using the Clam Antivirus scanner.
-
-%description devel
-This package contains headerfiles and libraries which are needed to
-build applications using clamav.
-
-%description data
-This package contains the virus-database needed by clamav. This
-database should be updated regularly; the 'clamav-update' package
-ships a corresponding cron-job. This package and the
-'clamav-data-empty' package are mutually exclusive.
-
-Use -data when you want a working (but perhaps outdated) virus scanner
-immediately after package installation.
-
-Use -data-empty when you are updating the virus database regulary and
-do not want to download a >5MB sized rpm-package with outdated virus
-definitions.
-
-
-%description data-empty
-This is an empty package to fulfill inter-package dependencies of the
-clamav suite. This package and the 'clamav-data' package are mutually
-exclusive.
-
-Use -data when you want a working (but perhaps outdated) virus scanner
-immediately after package installation.
-
-Use -data-empty when you are updating the virus database regulary and
-do not want to download a >5MB sized rpm-package with outdated virus
-definitions.
-
-
-%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-update.
-
-%description server
-ATTENTION: most users do not need this package; the main package has
-everything (or depends on it) which is needed to scan for virii on
-workstations.
-
-This package contains files which are needed to execute the clamd-daemon.
-This daemon does not provide a system-wide service. Instead of, an instance
-of this daemon should be started for each service requiring it.
-
-See the README file how this can be done with a minimum of effort.
-
-
-%description server-sysvinit
-SysV initscripts template for the clamav server
-
-
-%description scanner
-This package contains a generic system wide clamd service which is
-e.g. used by the clamav-milter package.
-
-%description scanner-sysvinit
-The SysV initscripts for clamav-scanner.
-
-%description scanner-upstart
-The Upstart initscripts for clamav-scanner.
-
-%description scanner-systemd
-The systemd initscripts for clamav-scanner.
-
-
-%description milter
-This package contains files which are needed to run the clamav-milter.
-
-%description milter-sysvinit
-The SysV initscripts for clamav-milter.
-
-%description milter-upstart
-The Upstart initscripts for clamav-milter.
-
-%description milter-systemd
-The systemd initscripts for clamav-scanner.
-
-## ------------------------------------------------------------
-
-%prep
-%setup -q -n %{name}-%{version}%{?prerelease}
-
-%apply -n24 -p1 -b .private
-%apply -n25 -p1 -b .open
-%apply -n26 -p1 -b .cliopts
-%apply -n27 -p1 -b .umask
-%apply -n29 -p1 -b .jitoff
-%{?apply_end}
-
-install -p -m0644 %SOURCE300 clamav-milter/
-
-mkdir -p libclamunrar{,_iface}
-%{!?with_unrar:touch libclamunrar/{Makefile.in,all,install}}
-
-sed -ri \
- -e 's!^#?(LogFile ).*!#\1/var/log/clamd.<SERVICE>!g' \
- -e 's!^#?(LocalSocket ).*!#\1/var/run/clamd.<SERVICE>/clamd.sock!g' \
- -e 's!^(#?PidFile ).*!\1/var/run/clamd.<SERVICE>/clamd.pid!g' \
- -e 's!^#?(User ).*!\1<USER>!g' \
- -e 's!^#?(AllowSupplementaryGroups|LogSyslog).*!\1 yes!g' \
- -e 's! /usr/local/share/clamav,! %homedir,!g' \
- etc/clamd.conf
-
-sed -ri \
- -e 's!^#?(UpdateLogFile )!#\1!g;' \
- -e 's!^#?(LogSyslog).*!\1 yes!g' \
- -e 's!(DatabaseOwner *)clamav$!\1%username!g' etc/freshclam.conf
-
-
-## ------------------------------------------------------------
-
-%build
-CFLAGS="$RPM_OPT_FLAGS -Wall -W -Wmissing-prototypes -Wmissing-declarations -std=gnu99"
-export LDFLAGS='-Wl,--as-needed'
-# HACK: remove me...
-export FRESHCLAM_LIBS='-lz'
-# IPv6 check is buggy and does not work when there are no IPv6 interface on build machine
-export have_cv_ipv6=yes
-%configure \
- --disable-static \
- --disable-rpath \
- --disable-silent-rules \
- --disable-clamav \
- --with-user=%username \
- --with-group=%username \
- --with-dbdir=/var/lib/clamav \
- --enable-milter \
- --enable-clamdtop \
- %{!?with_bytecode:--disable-llvm} \
- %{!?with_unrar:--disable-unrar}
-
-# TODO: check periodically that CLAMAVUSER is used for freshclam only
-
-
-# build with --as-needed and disable rpath
-sed -i \
- -e 's! -shared ! -Wl,--as-needed\0!g' \
- -e '/sys_lib_dlsearch_path_spec=\"\/lib \/usr\/lib /s!\"\/lib \/usr\/lib !/\"/%_lib /usr/%_lib !g' \
- libtool
-
-
-make %{?_smp_mflags}
-
-
-## ------------------------------------------------------------
-
-%install
-rm -rf "$RPM_BUILD_ROOT" _doc*
-make DESTDIR="$RPM_BUILD_ROOT" install
-
-function smartsubst() {
- local tmp
- local regexp=$1
- shift
-
- tmp=$(mktemp /tmp/%name-subst.XXXXXX)
- for i; do
- sed -e "$regexp" "$i" >$tmp
- cmp -s $tmp "$i" || cat $tmp >"$i"
- rm -f $tmp
- done
-}
-
-
-install -d -m 0755 \
- $RPM_BUILD_ROOT%_sysconfdir/{mail,clamd.d,cron.d,logrotate.d,tmpfiles.d} \
- $RPM_BUILD_ROOT%_var/{log,run} \
- $RPM_BUILD_ROOT%milterstatedir \
- $RPM_BUILD_ROOT%pkgdatadir/template \
- $RPM_BUILD_ROOT%_initrddir \
- $RPM_BUILD_ROOT%homedir \
- $RPM_BUILD_ROOT%scanstatedir
-
-rm -f $RPM_BUILD_ROOT%_sysconfdir/clamd.conf \
- $RPM_BUILD_ROOT%_libdir/*.la
-
-
-touch $RPM_BUILD_ROOT%homedir/daily.cld
-touch $RPM_BUILD_ROOT%homedir/main.cld
-
-
-## prepare the server-files
-install -D -m 0644 -p %SOURCE2 _doc_server/clamd.sysconfig
-install -D -m 0644 -p %SOURCE3 _doc_server/clamd.logrotate
-install -D -m 0755 -p %SOURCE7 _doc_server/clamd.init
-install -D -m 0644 -p %SOURCE5 _doc_server/README
-install -D -m 0644 -p etc/clamd.conf _doc_server/clamd.conf
-
-install -m 0644 -p %SOURCE1 $RPM_BUILD_ROOT%pkgdatadir/
-install -m 0755 -p %SOURCE100 $RPM_BUILD_ROOT%pkgdatadir/
-cp -pa _doc_server/* $RPM_BUILD_ROOT%pkgdatadir/template
-
-smartsubst 's!/usr/share/clamav!%pkgdatadir!g' $RPM_BUILD_ROOT%pkgdatadir/clamd-wrapper
-
-
-## prepare the update-files
-install -D -m 0644 -p %SOURCE6 $RPM_BUILD_ROOT%_sysconfdir/logrotate.d/clamav-update
-install -D -m 0755 -p %SOURCE8 $RPM_BUILD_ROOT%_sbindir/clamav-notify-servers
-touch $RPM_BUILD_ROOT%freshclamlog
-
-install -D -p -m 0755 %SOURCE200 $RPM_BUILD_ROOT%pkgdatadir/freshclam-sleep
-install -D -p -m 0644 %SOURCE201 $RPM_BUILD_ROOT%_sysconfdir/sysconfig/freshclam
-install -D -p -m 0600 %SOURCE202 $RPM_BUILD_ROOT%_sysconfdir/cron.d/clamav-update
-
-smartsubst 's!webmaster,clamav!webmaster,%username!g;
- s!/usr/share/clamav!%pkgdatadir!g;
- s!/usr/bin!%_bindir!g;
- s!/usr/sbin!%_sbindir!g;' \
- $RPM_BUILD_ROOT%_sysconfdir/cron.d/clamav-update \
- $RPM_BUILD_ROOT%pkgdatadir/freshclam-sleep
-
-
-### The scanner stuff
-sed -e 's!<SERVICE>!scan!g;s!<USER>!%scanuser!g' \
- etc/clamd.conf > $RPM_BUILD_ROOT%_sysconfdir/clamd.d/scan.conf
-
-sed -e 's!<SERVICE>!scan!g;' $RPM_BUILD_ROOT%pkgdatadir/template/clamd.init \
- > $RPM_BUILD_ROOT%_initrddir/clamd.scan
-
-install -D -p -m 0644 %SOURCE410 $RPM_BUILD_ROOT%_sysconfdir/init/clamd.scan.conf
-install -D -p -m 0644 %SOURCE430 $RPM_BUILD_ROOT%_unitdir/clamd.scan.service
-
-cat << EOF > $RPM_BUILD_ROOT%_sysconfdir/tmpfiles.d/clamd.scan.conf
-d %scanstatedir 0710 %scanuser %scanuser
-EOF
-
-touch $RPM_BUILD_ROOT%scanstatedir/clamd.{sock,pid}
-
-
-### The milter stuff
-sed -r \
- -e 's!^#?(User).*!\1 %milteruser!g' \
- -e 's!^#?(AllowSupplementaryGroups|LogSyslog) .*!\1 yes!g' \
- -e 's! /tmp/clamav-milter.socket! %milterstatedir/clamav-milter.socket!g' \
- -e 's! /var/run/clamav-milter.pid! %milterstatedir/clamav-milter.pid!g' \
- -e 's! /tmp/clamav-milter.log! %milterlog!g' \
- etc/clamav-milter.conf > $RPM_BUILD_ROOT%_sysconfdir/mail/clamav-milter.conf
-
-install -D -p -m 0644 %SOURCE310 $RPM_BUILD_ROOT%_sysconfdir/init/clamav-milter.conf
-install -D -p -m 0755 %SOURCE320 $RPM_BUILD_ROOT%_initrddir/clamav-milter
-install -D -p -m 0644 %SOURCE330 $RPM_BUILD_ROOT%_unitdir/clamav-milter.service
-
-cat << EOF > $RPM_BUILD_ROOT%_sysconfdir/tmpfiles.d/clamav-milter.conf
-d %milterstatedir 0710 %milteruser %milteruser
-EOF
-
-rm -f $RPM_BUILD_ROOT%_sysconfdir/clamav-milter.conf
-touch $RPM_BUILD_ROOT{%milterstatedir/clamav-milter.{socket,pid},%milterlog}
-
-%{!?with_upstart: rm -rf $RPM_BUILD_ROOT%_sysconfdir/init}
-%{!?with_systemd: rm -rf $RPM_BUILD_ROOT%_unitdir}
-%{!?with_sysv: rm -f $RPM_BUILD_ROOT%_initrddir/*}
-%{!?with_sysv: rm -rf $RPM_BUILD_ROOT%_var/run/*/*.pid}
-%{!?with_tmpfiles: rm -rf $RPM_BUILD_ROOT%_sysconfdir/tmpfiles.d}
-
-# keep clamd-wrapper in every case because it might be needed by other
-# packages
-ln -s %pkgdatadir/clamd-wrapper $RPM_BUILD_ROOT%_initrddir/clamd-wrapper
-
-## ------------------------------------------------------------
-
-%check
-make check
-
-## ------------------------------------------------------------
-
-%clean
-rm -rf "$RPM_BUILD_ROOT"
-
-## ------------------------------------------------------------
-
-%pre filesystem
-%__fe_groupadd 4 -r %username &>/dev/null || :
-%__fe_useradd 4 -r -s /sbin/nologin -d %homedir -M \
- -c 'Clamav database update user' -g %username %username &>/dev/null || :
-
-%postun filesystem
-%__fe_userdel %username &>/dev/null || :
-%__fe_groupdel %username &>/dev/null || :
-
-
-%pre scanner
-%__fe_groupadd 49 -r %scanuser &>/dev/null || :
-%__fe_useradd 49 -r -s /sbin/nologin -d / -M \
- -g %scanuser %scanuser &>/dev/null || :
-
-%postun scanner
-%__fe_userdel %scanuser &>/dev/null || :
-%__fe_groupdel %scanuser &>/dev/null || :
-
-
-%post scanner-sysvinit
-/sbin/chkconfig --add clamd.scan
-
-%preun scanner-sysvinit
-test "$1" != 0 || %_initrddir/clamd.scan stop &>/dev/null || :
-test "$1" != 0 || /sbin/chkconfig --del clamd.scan
-
-%postun scanner-sysvinit
-test "$1" = 0 || %_initrddir/clamd.scan condrestart >/dev/null || :
-
-
-%post scanner-upstart
-/usr/bin/killall -u %scanuser clamd 2>/dev/null || :
-
-%preun scanner-upstart
-test "$1" != "0" || /sbin/initctl -q stop clamd.scan || :
-
-
-%systemd_install scanner-systemd clamd.scan.service
-
-
-%post update
-test -e %freshclamlog || {
- touch %freshclamlog
- %__chmod 0664 %freshclamlog
- %__chown root:%username %freshclamlog
-}
-
-
-%triggerin milter -- clamav-scanner
-# Add the milteruser to the scanuser group; this is required when
-# milter and clamd communicate through local sockets
-/usr/sbin/groupmems -g %scanuser -a %milteruser &>/dev/null || :
-
-%pre milter
-%__fe_groupadd 5 -r %milteruser &>/dev/null || :
-%__fe_useradd 5 -r -s /sbin/nologin -d %milterstatedir -M \
- -c 'Clamav Milter User' -g %milteruser %milteruser &>/dev/null || :
-
-%post milter
-test -e %milterlog || {
- touch %milterlog
- chmod 0620 %milterlog
- chown root:%milteruser %milterlog
-}
-
-%postun milter
-%__fe_userdel %milteruser &>/dev/null || :
-%__fe_groupdel %milteruser &>/dev/null || :
-
-
-%post milter-sysvinit
-/sbin/chkconfig --add clamav-milter
-
-%preun milter-sysvinit
-test "$1" != 0 || %_initrddir/clamav-milter stop &>/dev/null || :
-test "$1" != 0 || /sbin/chkconfig --del clamav-milter
-
-%postun milter-sysvinit
-test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
-
-
-%post milter-upstart
-/usr/bin/killall -u %milteruser clamav-milter 2>/dev/null || :
-
-%preun milter-upstart
-test "$1" != "0" || /sbin/initctl -q stop clamav-milter || :
-
-
-%systemd_install milter-systemd clamav-milter.service
-
-
-%post lib -p /sbin/ldconfig
-%postun lib -p /sbin/ldconfig
-
-
-%files
-%defattr(-,root,root,-)
-%doc AUTHORS BUGS COPYING ChangeLog FAQ NEWS README UPGRADE
-%doc docs/*.pdf
-%_bindir/*
-%_mandir/man[15]/*
-%exclude %_bindir/clamav-config
-%exclude %_bindir/freshclam
-%exclude %_mandir/*/freshclam*
-
-## -----------------------
-
-%files lib
-%defattr(-,root,root,-)
-%_libdir/*.so.*
-
-## -----------------------
-
-%files devel
-%defattr(-,root,root,-)
-%_includedir/*
-%_libdir/*.so
-%pkgdatadir/template
-%pkgdatadir/clamd-gen
-%_libdir/pkgconfig/*
-%_bindir/clamav-config
-
-## -----------------------
-
-%files filesystem
-%attr(-,%username,%username) %dir %homedir
-%attr(-,root,root) %dir %pkgdatadir
-
-## -----------------------
-
-%files data
-%defattr(-,%username,%username,-)
-# 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
-
-
-%files data-empty
-%defattr(-,%username,%username,-)
-%ghost %attr(0664,%username,%username) %homedir/*.cvd
-
-
-## -----------------------
-
-%files update
-%defattr(-,root,root,-)
-%_bindir/freshclam
-%_mandir/*/freshclam*
-%pkgdatadir/freshclam-sleep
-%config(noreplace) %verify(not mtime) %_sysconfdir/freshclam.conf
-%config(noreplace) %verify(not mtime) %_sysconfdir/logrotate.d/*
-%config(noreplace) %_sysconfdir/cron.d/*
-%config(noreplace) %_sysconfdir/sysconfig/freshclam
-
-%ghost %attr(0664,root,%username) %verify(not size md5 mtime) %freshclamlog
-%ghost %attr(0664,%username,%username) %homedir/*.cld
-
-
-## -----------------------
-
-%files server
-%defattr(-,root,root,-)
-%doc _doc_server/*
-%_mandir/man[58]/clamd*
-%_sbindir/*
-%pkgdatadir/clamd-wrapper
-%dir %_sysconfdir/clamd.d
-
-%exclude %_sbindir/*milter*
-%exclude %_mandir/man8/clamav-milter*
-
-
-%files server-sysvinit
-%defattr(-,root,root,-)
-%_initrddir/clamd-wrapper
-
-
-## -----------------------
-
-%files scanner
-%defattr(-,root,root,-)
-%config(noreplace) %_sysconfdir/clamd.d/scan.conf
-%ghost %scanstatedir/clamd.sock
-
-%if 0%{?with_tmpfiles:1}
- %_sysconfdir/tmpfiles.d/clamd.scan.conf
- %ghost %dir %attr(0710,%scanuser,%scanuser) %scanstatedir
-%else
- %dir %attr(0710,%scanuser,%scanuser) %scanstatedir
-%endif
-
-%if 0%{?with_sysv:1}
-%files scanner-sysvinit
- %attr(0755,root,root) %config %_initrddir/clamd.scan
- %ghost %scanstatedir/clamd.pid
-%endif
-
-%if 0%{?with_upstart:1}
-%files scanner-upstart
- %defattr(-,root,root,-)
- %config(noreplace) %_sysconfdir/init/clamd.scan*
-%endif
-
-%if 0%{?with_systemd:1}
-%files scanner-systemd
- %defattr(-,root,root,-)
- %_unitdir/clamd.scan.service
-%endif
-
-## -----------------------
-
-%files milter
-%defattr(-,root,root,-)
-%doc clamav-milter/README.fedora
-%_sbindir/*milter*
-%_mandir/man8/clamav-milter*
-%config(noreplace) %_sysconfdir/mail/clamav-milter.conf
-%ghost %attr(0620,root,%milteruser) %verify(not size md5 mtime) %milterlog
-%ghost %milterstatedir/clamav-milter.socket
-
-%if 0%{?with_tmpfiles:1}
- %_sysconfdir/tmpfiles.d/clamav-milter.conf
- %ghost %dir %attr(0710,%milteruser,%milteruser) %milterstatedir
-%else
- %dir %attr(0710,%milteruser,%milteruser) %milterstatedir
-%endif
-
-%if 0%{?with_sysv:1}
-%files milter-sysvinit
- %defattr(-,root,root,-)
- %config %_initrddir/clamav-milter
- %ghost %milterstatedir/clamav-milter.pid
-%endif
-
-%if 0%{?with_upstart:1}
-%files milter-upstart
- %defattr(-,root,root,-)
- %config(noreplace) %_sysconfdir/init/clamav-milter*
-%endif
-
-%if 0%{?with_systemd:1}
-%files milter-systemd
- %defattr(-,root,root,-)
- %_unitdir/clamav-milter.service
-%endif
-
-
-%changelog
-* Tue Oct 18 2011 Nick Bebout <nb(a)fedoraproject.org> - 0.97.3-1700
-- updated to 0.97.3
-- CVE-2011-3627 clamav: Recursion level crash fixed in v0.97.3
-
-* Tue Jul 26 2011 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.97.2-1600
-- updated to 0.97.2
-- CVE-2011-2721 Off-by-one error by scanning message hashes (#725694)
-- fixed systemd scripts and their installation
-
-* Thu Jun 9 2011 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.97.1-1600
-- updated to 0.97.1
-- fixed Requires(preun) vs. Requires(postun) inconsistency
-
-* Sat Apr 23 2011 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.97-1601
-- fixed tmpfiles.d syntax (#696812)
-
-* Sun Feb 20 2011 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.97-1600
-- updated to 0.97
-- rediffed some patches
-
-* Tue Feb 08 2011 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0.96.5-1503
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
-
-* Sat Jan 8 2011 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.5-1502
-- fixed signal specifier in clamd-wrapper (#668131, James Ralston)
-
-* Fri Dec 24 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.5-1501
-- added systemd init scripts which obsolete to old sysvinit ones
-- added tmpfiles.d/ descriptions
-
-* Sat Dec 4 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.5-1500
-- updated to 0.96.5
-- CVE-2010-4260 Multiple errors within the processing of PDF files can
- be exploited to e.g. cause a crash.
-- CVE-2010-4261 An off-by-one error within the "icon_cb()" function
- can be exploited to cause a memory corruption.
-
-* Sun Oct 31 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.4-1500
-- updated to 0.96.4
-- execute 'make check' (#640347) but ignore errors for now because
- four checks are failing on f13
-
-* Wed Sep 29 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.3-1501
-- lowered stop priority of sysv initscripts (#629435)
-
-* Wed Sep 22 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.3-1500
-- updated to 0.96.3
-- fixes CVE-2010-0405 in shipped bzlib.c copy
-
-* Sun Aug 15 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.2-1500
-- updated to 0.96.2
-- rediffed patches
-- removed the -jit-disable patch which is replaced upstream by a more
- detailed configuration option.
-
-* Wed Aug 11 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
-- removed old %%trigger which renamed the 'clamav' user- and groupnames
- to 'clamupdate'
-- use 'groupmems', not 'usermod' to add a user to a group because
- 'usermod' does not work when user does not exist in local /etc/passwd
-
-* Tue Jul 13 2010 Dan Horák <dan[at]danny.cz> - 0.96.1-1401
-- ocaml not available (at least) on s390(x)
-
-* Tue Jun 1 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.1-1400
-- updated to 0.96.1
-- rediffed patches
-
-* Sat May 19 2010 Rakesh Pandit <rakesh(a)fedoraproject.org> - 0.96.1403
-- CVE-2010-1639 Clam AntiVirus: Heap-based overflow, when processing malicious PDF file(s)
-
-* Wed Apr 21 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96-1402
-- updated to final 0.96
-- applied upstream patch which allows to disable JIT compiler (#573191)
-- build JIT compiler again
-- disabled JIT compiler by default
-- removed explicit 'pkgconfig' requirements in -devel (#533956)
-
-* Sat Mar 20 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96-0.1401.rc1
-- do not build the bytecode JIT compiler for now until it can be disabled
- at runtime (#573191)
-
-* Thu Mar 11 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96-1400.rc1
-- updated to 0.96rc1
-- added some BRs
-
-* Sun Dec 6 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.3-1301
-- updated -upstart to upstart 0.6.3
-
-* Sat Nov 21 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
-- adjusted chkconfig positions for clamav-milter (#530101)
-- use %%apply instead of %%patch
-
-* Thu Oct 29 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.3-1300
-- updated to 0.95.3
-
-* Sun Sep 13 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
-- conditionalized build of noarch subpackages to ease packaging under RHEL5
-
-* Sun Aug 9 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.2-5
-- modified freshclam configuration to log by syslog by default
-- disabled LocalSocket option in sample configuration
-- fixed clamav-milter sysv initscript to use bash interpreter and to
- be disabled by default
-
-* Sat Aug 8 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.2-4
-- renamed 'clamav' user/group to 'clamupdate'
-- add the '%milteruser' user to the '%scanuser' group when the -scanner
- subpackage is installed
-
-* Fri Jul 24 2009 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0.95.2-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
-
-* Thu Jun 11 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.2-1
-- updated to 0.95.2
-
-* Sun Apr 19 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.1-3
-- fixed '--without upstart' operation
-
-* Wed Apr 15 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.1-2
-- added '%%bcond_without upstart' conditional to ease skipping of
- -upstart subpackage creation e.g. on EL5 systems
-- fixed Provides/Obsoletes: typo in -milter-sysvinit subpackage which
- broke update path
-
-* Fri Apr 10 2009 Robert Scheck <robert(a)fedoraproject.org> - 0.95.1-1
-- Upgrade to 0.95.1 (#495039)
-
-* Wed Mar 25 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95-1
-- updated to final 0.95
-- added ncurses-devel (-> clamdtop) BR
-- enforced IPv6 support
-
-* Sun Mar 8 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95-0.1.rc1
-- updated to 0.95rc1
-- added -upstart subpackages
-- renamed -sysv to -sysvinit to make -upstart win the default dep resolving
-- reworked complete milter stuff
-- added -scanner subpackage which contains a preconfigured daemon
- (e.g. for use by -milter)
-- moved %%changelog entries from 2006 and before into ChangeLog-rpm.old
-
-* Wed Feb 25 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.94.2-3
-- made some subpackages noarch
-- fixed typo in SysV initscript which removes 'touch' file (#473513)
-
-* Mon Feb 23 2009 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0.94.2-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
-
-* Tue Dec 02 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.94.2-1
-- Upgrade to 0.94.2 (#474002)
-
-* Wed Nov 05 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.94.1-1
-- Upgrade to 0.94.1
-
-* Sun Oct 26 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.94-1
-- Upgrade to 0.94 (SECURITY), fixes #461461:
-- CVE-2008-1389 Invalid memory access in the CHM unpacker
-- CVE-2008-3912 Out-of-memory NULL pointer dereference in mbox/msg
-- CVE-2008-3913 Memory leak in code path in freshclam's manager.c
-- CVE-2008-3914 Multiple file descriptor leaks on the code paths
-
-* Sun Jul 13 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93.3-1
-- updated to 0.93.3; another fix for CVE-2008-2713 (out-of-bounds read
- on petite files)
-- put pid instead of pgrp into pidfile of clamav-milter (bz #452359)
-- rediffed patches
-
-* Tue Jun 17 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93.1-1
-- updated to 0.93.1
-- rediffed -path patch
-- CVE-2008-2713 Invalid Memory Access Denial Of Service Vulnerability
-
-* Mon Apr 14 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93-1
-- updated to final 0.93
-- removed daily.inc + main.inc directories; they are now replaced by
- *.cld containers
-- trimmed down MAILTO list of cronjob to 'root' again; every well
- configured system has an alias for this recipient
-
-* Wed Mar 12 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93-0.1.rc1
-- moved -milter scriptlets into -milter-core subpackage
-- added a requirement on the milteruser to the -milter-sendmail
- subpackage (reported by Bruce Jerrick)
-
-* Tue Mar 4 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93-0.0.rc1
-- updated to 0.93rc1
-- fixed rpath issues
-
-* Mon Feb 11 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.92.1-1
-- updated to 0.92.1
-
-* Tue Jan 1 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.92-6
-- redisabled unrar stuff completely by using clean sources
-- splitted -milter subpackage into pieces to allow use without sendmail
- (#239037)
-
-* Tue Jan 1 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.92-5
-- use a better way to disable RPATH-generation (needed for '--with
- unrar' builds)
-
-* Mon Dec 31 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.92-4
-- added a README.fedora to the milter package (#240610)
-- ship original sources again; unrar is now licensed correctly (no more
- stolen code put under GPL). Nevertheless, this license is not GPL
- compatible, and to allow libclamav to be used by GPL applications,
- unrar is disabled by a ./configure switch.
-- use pkg-config in clamav-config to emulate --cflags and --libs
- operations (fixes partly multilib issues)
-- registered some more auto-updated files and marked them as %%ghost
-
-* Fri Dec 21 2007 Tom "spot" Callaway <tcallawa(a)redhat.com> - 0.92-3
-- updated to 0.92 (SECURITY):
-- CVE-2007-6335 MEW PE File Integer Overflow Vulnerability
-
-* Mon Oct 29 2007 Tom "spot" Callaway <tcallawa(a)redhat.com> - 0.91.2-3
-- remove RAR decompression code from source tarball because of
- legal problems (resolves 334371)
-- correct license tag
-
-* Mon Sep 24 2007 Jesse Keating <jkeating(a)redhat.com> - 0.91.2-2
-- Bump release for upgrade path.
-
-* Sat Aug 25 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.91.2-1
-- updated to 0.91.2 (SECURITY):
-- CVE-2007-4510 DOS in RTF parser
-- DOS in html normalizer
-- arbitrary command execution by special crafted recipients in
- clamav-milter's black-hole mode
-- fixed an open(2) issue
-
-* Tue Jul 17 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.91.1-0
-- updated to 0.91.1
-
-* Thu Jul 12 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.91-1
-- updated to 0.91
-
-* Thu May 31 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90.3-1
-- updated to 0.90.3
-- BR tcpd.h instead of tcp_wrappers(-devel) to make it build both
- in FC6- and F7+
-
-* Fri Apr 13 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90.2-1
-- [SECURITY] updated to 0.90.2; fixes CVE-2007-1745, CVE-2007-1997
-
-* Fri Mar 2 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90.1-2
-- BR 'tcp_wrappers-devel' instead of plain 'tcp_wrappers'
-
-* Fri Mar 2 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90.1-1
-- updated to 0.90.1
-- updated %%doc list
-
-* Sun Feb 18 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90-1
-- updated to final 0.90
-- removed -visibility patch since fixed upstream
-
-* Sun Feb 4 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90-0.3.rc3
-- build with -Wl,-as-needed and cleaned up pkgconfig file
-- removed old hack which forced installation of freshclam.conf; related
- check was removed upstream
-- removed static library
-- removed %%changelog entries from before 2004
-
-* Sat Feb 3 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90-0.2.rc3
-- updated to 0.90rc3
-- splitted mandatory parts from the data-file into a separate -filesystem
- subpackage
-- added a -data-empty subpackage to allow a setup where database is
- updated per cron-job and user does not want to download the large
- -data package with outdated virus definitations (#214949)
-- %%ghost'ed the files downloaded by freshclam
diff --git a/clamav.spec.rej b/clamav.spec.rej
deleted file mode 100644
index 1096912..0000000
--- a/clamav.spec.rej
+++ /dev/null
@@ -1,152 +0,0 @@
---- clamav.spec
-+++ clamav.spec
-@@ -5,7 +5,7 @@
- Summary: Anti-virus software
- Name: clamav
- Version: 0.97.3
--Release: 1%{?dist}
-+Release: 2%{?dist}
- License: GPLv2
- Group: Applications/System
- URL: http://www.clamav.net/
-@@ -15,7 +15,14 @@
- Source0: clamav-0.97.3-norar.tar.xz
- Source1: clamav.init
- Source2: clamav-milter.init
--Source3: clamd-wrapper.tar.bz2
-+Source3: clamd-wrapper
-+Source4: clamd.init
-+Source5: README.clamd-wrapper
-+Source6: clamd.sysconfig
-+Source7: freshclam.logrotate
-+Source8: freshclam.cron
-+Source9: clamd.logrotate
-+Source10: clamav-milter.sysconfig
- BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
- BuildRequires: bzip2-devel, zlib-devel, gmp-devel, curl-devel, xz
-@@ -171,53 +178,6 @@
- s|^#(ClamdSocket) .+$|$1 unix:%{_localstatedir}/run/clamav/clamd.sock|;
- ' etc/clamav-milter.conf
-
--
--cat <<EOF >clamd.logrotate
--%{_localstatedir}/log/clamav/clamd.log {
-- missingok
-- notifempty
-- create 644 clam clam
-- postrotate
-- killall -HUP clamd 2>/dev/null || :
-- endscript
--}
--EOF
--
--cat <<EOF >freshclam.logrotate
--%{_localstatedir}/log/clamav/freshclam.log {
-- missingok
-- notifempty
-- create 644 clam clam
--}
--EOF
--
--cat <<'EOF' >freshclam.cron
--#!/bin/sh
--
--### A simple update script for the clamav virus database.
--### This could as well be replaced by a SysV script.
--
--### fix log file if needed
--LOG_FILE="%{_localstatedir}/log/clamav/freshclam.log"
--if [ ! -f "$LOG_FILE" ]; then
-- touch "$LOG_FILE"
-- chmod 644 "$LOG_FILE"
-- chown clam.clam "$LOG_FILE"
--fi
--
--%{_bindir}/freshclam \
-- --quiet \
-- --datadir="%{_localstatedir}/lib/clamav" \
-- --log="$LOG_FILE"
--EOF
--
--%{__cat} <<EOF >clamav-milter.sysconfig
--### Simple config file for clamav-milter, you should
--### read the documentation and tweak it as you wish.
--
--CLAMAV_FLAGS=""
--EOF
--
- %build
- %configure \
- --program-prefix="%{?_program_prefix}" \
-@@ -240,19 +200,30 @@
- rm -rf %{buildroot}
- make install DESTDIR="%{buildroot}"
-
--install -Dp -m0755 %{SOURCE1} %{buildroot}%{_initrddir}/clamd
--install -Dp -m0755 freshclam.cron %{buildroot}%{_sysconfdir}/cron.daily/freshclam
--install -Dp -m0644 freshclam.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/freshclam
--install -Dp -m0644 clamd.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/clamav
-+install -Dp -m0755 %{SOURCE1} %{buildroot}%{_initrddir}/clamav
-+install -Dp -m0755 %{SOURCE8} %{buildroot}%{_sysconfdir}/cron.daily/freshclam
-+install -Dp -m0644 %{SOURCE7} %{buildroot}%{_sysconfdir}/logrotate.d/freshclam
-+install -Dp -m0644 %{SOURCE9} %{buildroot}%{_sysconfdir}/logrotate.d/clamav
-+
-+# now rewrite scripts and config files in-place
-+sed -i \
-+ -e 's!%%{_sbindir}!%{_sbindir}!g' \
-+ -e 's!%%{_bindir}!%{_bindir}!g' \
-+ -e 's!%%{_localstatedir}!%{_localstatedir}!g' \
-+ %{buildroot}%{_sysconfdir}/logrotate.d/* \
-+ %{buildroot}%{_sysconfdir}/cron.daily/freshclam
-
- %if %{!?_without_milter:1}0
- install -Dp -m0755 %{SOURCE2} %{buildroot}%{_initrddir}/clamav-milter
--install -Dp -m0644 clamav-milter.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/clamav-milter
-+install -Dp -m0644 %{SOURCE10} %{buildroot}%{_sysconfdir}/sysconfig/clamav-milter
- %else
- rm %{buildroot}%{_mandir}/man8/clamav-milter.8*
- %endif
-+
- # Install clamav-wrapper:
--tar xjf %{SOURCE3} -C %{buildroot}/%{_prefix}/share
-+install -d -m0755 %{buildroot}/%{_prefix}/share/clamav
-+install -m0755 -t %{buildroot}/%{_prefix}/share/clamav %{SOURCE3} %{SOURCE4}
-+install -m0444 -t %{buildroot}/%{_prefix}/share/clamav %{SOURCE5} %{SOURCE6}
-
- install -d -m0755 %{buildroot}%{_localstatedir}/log/clamav/
- touch %{buildroot}%{_localstatedir}/log/clamav/freshclam.log
-@@ -345,8 +316,6 @@
- %doc %{_mandir}/man1/clamscan.1*
- %doc %{_mandir}/man1/freshclam.1*
- %doc %{_mandir}/man5/freshclam.conf.5*
--%doc %{_prefix}/share/clamav/README.clamd-wrapper
--%{_prefix}/share/clamav/clamd-wrapper
- %config(noreplace) %{_sysconfdir}/freshclam.conf
- %{_bindir}/clamscan
- %{_bindir}/freshclam
-@@ -366,10 +335,12 @@
- %config(noreplace) %{_sysconfdir}/clamd.conf
- %config(noreplace) %{_sysconfdir}/logrotate.d/clamav
- %{_sysconfdir}/clamd.d
--%config %{_initrddir}/clamd
-+%config %{_initrddir}/clamav
- %{_sbindir}/clamd
- %{_bindir}/clamconf
- %{_bindir}/clamdscan
-+%doc %{_prefix}/share/clamav/README.clamd-wrapper
-+%{_prefix}/share/clamav/clamd*
-
- %defattr(0644, clam, clam, 0755)
- %{_localstatedir}/run/clamav/
-@@ -409,6 +380,10 @@
- %exclude %{_libdir}/libclamav.la
-
- %changelog
-+* Fri Nov 25 2011 Philip Prindeville <philipp(a)fedoraproject.org> - 0.97.3-2
-+- Add missing clamd-wrapper supporting files
-+- Remove from init script the unused CLAMD_SOCKET variable
-+
- * Tue Oct 18 2011 Nick Bebout <nb(a)fedoraproject.org> - 0.97.3-1
- - Update to 0.97.3
- - Fix CVE-2011-3627 clamav: Recursion level crash fixed in v0.97.3
diff --git a/clamd-wrapper b/clamd-wrapper
deleted file mode 100644
index 000dcb8..0000000
--- a/clamd-wrapper
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/bin/bash
-#
-# chkconfig: - 75 25
-# description: The clamd daemon listens for incoming connections on \
-# Unix or TCP socket and scans files or directories on demand.
-
-[ -n "$CLAMD_SERVICE" ] || {
- echo $"*** $0 can not be called in this way"
- echo $"*** Please see /usr/share/doc/clamav-server-*/README how"
- echo $"*** the clamav-server can be configured"
- exit 6
-}
-
-# Source function library.
-. /etc/init.d/functions
-
-# Get config.
-[ -r /etc/sysconfig/network ] && . /etc/sysconfig/network
-
-# Check that networking is up.
-[ "$NETWORKING" != "no" ] || exit 6
-
-lockfile=/var/lock/subsys/clamd.${CLAMD_SERVICE}
-sysconffile=/etc/sysconfig/clamd.${CLAMD_SERVICE}
-procname=clamd.${CLAMD_SERVICE}
-
-CLAMD_CONFIGFILE=/etc/clamd.d/${CLAMD_SERVICE}.conf
-CLAMD_OPTIONS=
-[ -f "$sysconffile" ] && . "$sysconffile"
-CLAMD_PIDFILE=`grep ^PidFile ${CLAMD_CONFIGFILE} | awk '{print $2}'`
-
-# make sure that config file contains a PidFile setting
-[ -n "$CLAMD_PIDFILE" ] || exit 6
-
-RETVAL=0
-prog="clamd.${CLAMD_SERVICE}"
-
-start () {
- echo -n $"Starting $prog: "
- daemon --pidfile=${CLAMD_PIDFILE} \
- exec -a $procname /usr/sbin/clamd \
- ${CLAMD_CONFIGFILE:+-c $CLAMD_CONFIGFILE} ${CLAMD_OPTIONS} --pid ${CLAMD_PIDFILE}
- RETVAL=$?
- echo
- [ $RETVAL -eq 0 ] && touch $lockfile
- return $RETVAL
-}
-
-stop () {
- echo -n $"Stopping $prog: "
- killproc -p ${CLAMD_PIDFILE} $procname
- RETVAL=$?
- echo
- [ $RETVAL -eq 0 ] && rm -f $lockfile
- return $RETVAL
-}
-
-reload() {
- rc=0
- echo -n $"Reloading $prog: "
- killproc -p ${CLAMD_PIDFILE} $procname -SIGHUP || rc=$?
- echo
- echo -n $"Loading new virus-database: "
- killproc -p ${CLAMD_PIDFILE} $procname -SIGUSR2 || rc=$?
- echo
- return $rc
-}
-
-restart () {
- stop
- start
-}
-
-# See how we were called.
-case "$1" in
- start|stop|restart|reload)
- $1 ;;
- status)
- status -p ${CLAMD_PIDFILE} $procname ;;
- condrestart)
- [ ! -f $lockfile ] || restart
- ;;
- *)
- echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
- exit 2
-esac
diff --git a/clamd.init b/clamd.init
deleted file mode 100644
index cf25b46..0000000
--- a/clamd.init
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/bash
-#
-# chkconfig: - 75 35
-#
-# description: The clamd server running for <SERVICE>
-#
-
-CLAMD_SERVICE=<SERVICE>
-. /usr/share/clamav/clamd-wrapper
-#!/bin/bash
-#
-# chkconfig: - 75 35
-#
-# description: The clamd server running for <SERVICE>
-#
-
-CLAMD_SERVICE=<SERVICE>
-. /usr/share/clamav/clamd-wrapper
diff --git a/clamd.logrotate b/clamd.logrotate
deleted file mode 100644
index b233f3a..0000000
--- a/clamd.logrotate
+++ /dev/null
@@ -1,8 +0,0 @@
-%{_localstatedir}/log/clamav/clamd.log {
- missingok
- notifempty
- create 644 clam clam
- postrotate
- killall -HUP clamd 2>/dev/null || :
- endscript
-}
diff --git a/clamd.sysconfig b/clamd.sysconfig
deleted file mode 100644
index e0e7714..0000000
--- a/clamd.sysconfig
+++ /dev/null
@@ -1,5 +0,0 @@
-#CLAMD_CONFIGFILE=/etc/clamd.d/${CLAMD_SERVICE}.conf
-#CLAMD_OPTIONS=
-## the values below should only ever be specified in the above .conf file!
-#CLAMD_SOCKET=/var/run/clamd.${CLAMD_SERVICE}/clamd.sock
-#CLAMD_PIDFILE=/var/run/clamd.${CLAMD_SERVICE}/clamd.pid
diff --git a/freshclam.cron b/freshclam.cron
deleted file mode 100644
index 558a2f2..0000000
--- a/freshclam.cron
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/sh
-
-### A simple update script for the clamav virus database.
-### This could as well be replaced by a SysV script.
-
-### fix log file if needed
-LOG_FILE="%{_localstatedir}/log/clamav/freshclam.log"
-if [ ! -f "$LOG_FILE" ]; then
- touch "$LOG_FILE"
- chmod 644 "$LOG_FILE"
- chown clam.clam "$LOG_FILE"
-fi
-
-%{_bindir}/freshclam \
- --quiet \
- --datadir="%{_localstatedir}/lib/clamav" \
- --log="$LOG_FILE"
-#!/bin/sh
-
-### A simple update script for the clamav virus database.
-### This could as well be replaced by a SysV script.
-
-### fix log file if needed
-LOG_FILE="%{_localstatedir}/log/clamav/freshclam.log"
-if [ ! -f "$LOG_FILE" ]; then
- touch "$LOG_FILE"
- chmod 644 "$LOG_FILE"
- chown clam.clam "$LOG_FILE"
-fi
-
-%{_bindir}/freshclam \
- --quiet \
- --datadir="%{_localstatedir}/lib/clamav" \
- --log="$LOG_FILE"
diff --git a/freshclam.logrotate b/freshclam.logrotate
deleted file mode 100644
index 5a5615a..0000000
--- a/freshclam.logrotate
+++ /dev/null
@@ -1,10 +0,0 @@
-%{_localstatedir}/log/clamav/freshclam.log {
- missingok
- notifempty
- create 644 clam clam
-}
-%{_localstatedir}/log/clamav/freshclam.log {
- missingok
- notifempty
- create 644 clam clam
-}
diff --git a/sources b/sources
index 05755a5..47b00bc 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
b319a3f31a16811f1a92d63cda592521 clamav-0.97.3-norar.tar.xz
+e809f74ed139df2e4af3fafbca32f678 clamd-wrapper.tar.bz2
commit 656658e8d6f02942b3ae77ddfaa4bcfa15c91f8d
Author: Nick Bebout <nb(a)fedoraproject.org>
Date: Sun Jan 1 16:39:21 2012 -0600
Revert "Oops, i shouldn't have commited these"
This reverts commit f5659018a4a4aea8cdf89db6e1c2a05789da7529.
diff --git a/clamav.spec.orig b/clamav.spec.orig
new file mode 100644
index 0000000..45aa5db
--- /dev/null
+++ b/clamav.spec.orig
@@ -0,0 +1,1091 @@
+#global prerelease rc1
+
+## Fedora Extras specific customization below...
+%bcond_without fedora
+%bcond_without upstart
+%bcond_without systemd
+%bcond_with sysv
+%bcond_without tmpfiles
+%bcond_with unrar
+%bcond_without noarch
+%bcond_without bytecode
+##
+
+%ifnarch s390 s390x
+%global have_ocaml 1
+%else
+%global have_ocaml 0
+%endif
+
+%global username clamupdate
+%global homedir %_var/lib/clamav
+%global freshclamlog %_var/log/freshclam.log
+%global milteruser clamilt
+%global milterlog %_var/log/clamav-milter.log
+%global milterstatedir %_var/run/clamav-milter
+%global pkgdatadir %_datadir/%name
+
+%global scanuser clamscan
+%global scanstatedir %_var/run/clamd.scan
+
+%{?with_noarch:%global noarch BuildArch: noarch}
+%{!?_unitdir:%global _unitdir /lib/systemd/system}
+%{!?release_func:%global release_func() %%{?prerelease:0.}%1%%{?prerelease:.%%prerelease}%%{?dist}}
+%{!?apply:%global apply(p:n:b:) %patch%%{-n:%%{-n*}} %%{-p:-p %%{-p*}} %%{-b:-b %%{-b*}} \
+%nil}
+%{!?systemd_reqs:%global systemd_reqs \
+Requires(post): /bin/systemctl\
+Requires(preun): /bin/systemctl\
+Requires(postun): /bin/systemctl\
+%nil}
+%{!?systemd_install:%global systemd_install()\
+%post %1\
+test "$1" != "1" || /bin/systemctl daemon-reload >/dev/null 2>&1 || :\
+%preun %1\
+test "$1" != "0" || /bin/systemctl --no-reload disable %2 >/dev/null 2>&1 || :\
+test "$1" != "0" || /bin/systemctl stop %2 >/dev/null 2>&1 || :\
+%postun %1\
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :\
+test "$1" = "0" || /bin/systemctl try-restart %2 >/dev/null 2>&1 || :\
+%nil}
+
+
+Summary: End-user tools for the Clam Antivirus scanner
+Name: clamav
+Version: 0.97.3
+Release: %release_func 1700
+License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
+Group: Applications/File
+URL: http://www.clamav.net
+%if 0%{?with_unrar:1}
+Source0: http://download.sourceforge.net/sourceforge/clamav/%name-%version%{?prere...
+Source999: http://download.sourceforge.net/sourceforge/clamav/%name-%version%{?prere...
+%else
+# Unfortunately, clamav includes support for RAR v3, derived from GPL
+# incompatible unrar from RARlabs. We have to pull this code out.
+# tarball was created by
+# make clean-sources [TARBALL=<original-tarball>] [VERSION=<version>]
+Source0: %name-%version%{?prerelease}-norar.tar.xz
+%endif
+Source1: clamd-wrapper
+Source2: clamd.sysconfig
+Source3: clamd.logrotate
+Source5: clamd-README
+Source6: clamav-update.logrotate
+Source7: clamd.SERVICE.init
+Source8: clamav-notify-servers
+Patch24: clamav-0.92-private.patch
+Patch25: clamav-0.92-open.patch
+Patch26: clamav-0.95-cliopts.patch
+Patch27: clamav-0.95.3-umask.patch
+# https://bugzilla.redhat.com/attachment.cgi?id=403775&action=diff&context=...
+Patch29: clamav-0.96.2-jitoff.patch
+BuildRoot: %_tmppath/%name-%version-%release-root
+Requires: clamav-lib = %version-%release
+Requires: data(clamav)
+BuildRequires: zlib-devel bzip2-devel gmp-devel curl-devel
+BuildRequires: ncurses-devel
+BuildRequires: %_includedir/tcpd.h
+%{?with_bytecode:BuildRequires: bc tcl groff graphviz}
+%if %{have_ocaml}
+%{?with_bytecode:BuildRequires: ocaml}
+%endif
+
+%package filesystem
+Summary: Filesystem structure for clamav
+Group: Applications/File
+Provides: user(%username) = 4
+Provides: group(%username) = 4
+# Prevent version mix
+Conflicts: %name < %version-%release
+Conflicts: %name > %version-%release
+BuildRequires: fedora-usermgmt-devel
+%{?noarch}
+%{?FE_USERADD_REQ}
+
+%package lib
+Summary: Dynamic libraries for the Clam Antivirus scanner
+Group: System Environment/Libraries
+Requires: data(clamav)
+
+%package devel
+Summary: Header files and libraries for the Clam Antivirus scanner
+Group: Development/Libraries
+Source100: clamd-gen
+Requires: clamav-lib = %version-%release
+Requires: clamav-filesystem = %version-%release
+
+%package data
+Summary: Virus signature data for the Clam Antivirus scanner
+Group: Applications/File
+Requires(pre): clamav-filesystem = %version-%release
+Requires(postun): clamav-filesystem = %version-%release
+Provides: data(clamav) = full
+Conflicts: data(clamav) < full
+Conflicts: data(clamav) > full
+%{?noarch}
+
+%package data-empty
+Summary: Empty data package for the Clam Antivirus scanner
+Group: Applications/File
+Provides: data(clamav) = empty
+Conflicts: data(clamav) < empty
+Conflicts: data(clamav) > empty
+%{?noarch}
+
+%package update
+Summary: Auto-updater for the Clam Antivirus scanner data-files
+Group: Applications/File
+Source200: freshclam-sleep
+Source201: freshclam.sysconfig
+Source202: clamav-update.cron
+Requires: clamav-filesystem = %version-%release
+Requires(pre): /etc/cron.d
+Requires(postun): /etc/cron.d
+Requires(post): %__chown %__chmod
+Requires(post): group(%username)
+
+%package server
+Summary: Clam Antivirus scanner server
+Group: System Environment/Daemons
+Requires: data(clamav)
+Requires: clamav-filesystem = %version-%release
+Requires: clamav-lib = %version-%release
+
+%package server-sysvinit
+Summary: SysV initscripts for clamav server
+Group: System Environment/Daemons
+Provides: init(clamav-server) = sysv
+Requires: clamav-server = %version-%release
+Requires(pre): %_initrddir
+Requires(postun): %_initrddir
+Provides: clamav-server-sysv = %version-%release
+Obsoletes: clamav-server-sysv < %version-%release
+%{?noarch}
+
+
+%package scanner
+Summary: Clamav scanner daemon
+Group: System Environment/Daemons
+Requires: init(clamav-scanner)
+Provides: user(%scanuser) = 49
+Provides: group(%scanuser) = 49
+Requires: clamav-server = %version-%release
+%{?noarch}
+
+# Remove me after EOL of RHEL5
+%package scanner-sysvinit
+Summary: SysV initscripts for clamav scanner daemon
+Group: System Environment/Daemons
+Provides: init(clamav-scanner) = sysv
+Requires: clamav-server-sysvinit = %version-%release
+Requires: clamav-scanner = %version-%release
+Requires(pre): %_initrddir
+Requires(postun): %_initrddir initscripts
+Requires(post): chkconfig
+Requires(preun): chkconfig initscripts
+%{?noarch}
+
+%package scanner-upstart
+Summary: Upstart initscripts for clamav scanner daemon
+Group: System Environment/Daemons
+Source410: clamd.scan.upstart
+Provides: init(clamav-scanner) = upstart
+Requires: clamav-scanner = %version-%release
+Requires(pre): /etc/init
+Requires(post): /usr/bin/killall
+Requires(preun): /sbin/initctl
+%{?noarch}
+
+%package scanner-systemd
+Summary: Systemd initscripts for clamav scanner daemon
+Group: System Environment/Daemons
+Source430: clamd.scan.systemd
+Provides: init(clamav-scanner) = systemd
+Requires: clamav-scanner = %version-%release
+%{?systemd_reqs}
+%{?noarch}
+
+# Remove me after F17
+%if 0%{!?with_sysv:1}
+Provides: %name-scanner-sysvinit = %version-%release
+Obsoletes: %name-scanner-sysvinit < %version-%release
+%endif
+
+
+%package milter
+Summary: Milter module for the Clam Antivirus scanner
+Group: System Environment/Daemons
+Source300: README.fedora
+Requires: init(clamav-milter)
+BuildRequires: sendmail-devel
+BuildRequires: fedora-usermgmt-devel
+Provides: user(%milteruser) = 5
+Provides: group(%milteruser) = 5
+Requires(post): coreutils
+%{?FE_USERADD_REQ}
+
+Provides: milter(clamav) = sendmail
+Provides: milter(clamav) = postfix
+
+Provides: clamav-milter-core = %version-%release
+Obsoletes: clamav-milter-core < %version-%release
+Provides: clamav-milter-sendmail = %version-%release
+Obsoletes: clamav-milter-sendmail < %version-%release
+
+# Remove me after EOL of RHEL5
+%package milter-sysvinit
+Summary: SysV initscripts for the clamav sendmail-milter
+Group: System Environment/Daemons
+Source320: clamav-milter.sysv
+Provides: init(clamav-milter) = sysvinit
+Requires: clamav-milter = %version-%release
+Requires(post): user(%milteruser) clamav-milter
+Requires(preun): user(%milteruser) clamav-milter
+Requires(pre): %_initrddir
+Requires(postun): %_initrddir initscripts
+Requires(post): chkconfig
+Requires(preun): chkconfig initscripts
+Provides: clamav-milter-sysv = %version-%release
+Obsoletes: clamav-milter-sysv < %version-%release
+%{?noarch}
+
+%package milter-upstart
+Summary: Upstart initscripts for the clamav sendmail-milter
+Group: System Environment/Daemons
+Source310: clamav-milter.upstart
+Provides: init(clamav-milter) = upstart
+Requires: clamav-milter = %version-%release
+Requires(pre): /etc/init
+Requires(post): /usr/bin/killall
+Requires(preun): /sbin/initctl
+%{?noarch}
+
+%package milter-systemd
+Summary: Systemd initscripts for the clamav sendmail-milter
+Group: System Environment/Daemons
+Source330: clamav-milter.systemd
+Provides: init(clamav-milter) = systemd
+Requires: clamav-milter = %version-%release
+%{?systemd_reqs}
+%{?noarch}
+
+# Remove me after F17
+%if 0%{!?with_sysv:1}
+Provides: %name-milter-sysvinit = %version-%release
+Obsoletes: %name-milter-sysvinit < %version-%release
+%endif
+
+
+%description
+Clam AntiVirus is an anti-virus toolkit for UNIX. The main purpose of this
+software is the integration with mail servers (attachment scanning). The
+package provides a flexible and scalable multi-threaded daemon, a command
+line scanner, and a tool for automatic updating via Internet. The programs
+are based on a shared library distributed with the Clam AntiVirus package,
+which you can use with your own software. The virus database is based on
+the virus database from OpenAntiVirus, but contains additional signatures
+(including signatures for popular polymorphic viruses, too) and is KEPT UP
+TO DATE.
+
+%description filesystem
+This package provides the filesystem structure and contains the
+user-creation scripts required by clamav.
+
+%description lib
+This package contains dynamic libraries shared between applications
+using the Clam Antivirus scanner.
+
+%description devel
+This package contains headerfiles and libraries which are needed to
+build applications using clamav.
+
+%description data
+This package contains the virus-database needed by clamav. This
+database should be updated regularly; the 'clamav-update' package
+ships a corresponding cron-job. This package and the
+'clamav-data-empty' package are mutually exclusive.
+
+Use -data when you want a working (but perhaps outdated) virus scanner
+immediately after package installation.
+
+Use -data-empty when you are updating the virus database regulary and
+do not want to download a >5MB sized rpm-package with outdated virus
+definitions.
+
+
+%description data-empty
+This is an empty package to fulfill inter-package dependencies of the
+clamav suite. This package and the 'clamav-data' package are mutually
+exclusive.
+
+Use -data when you want a working (but perhaps outdated) virus scanner
+immediately after package installation.
+
+Use -data-empty when you are updating the virus database regulary and
+do not want to download a >5MB sized rpm-package with outdated virus
+definitions.
+
+
+%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-update.
+
+%description server
+ATTENTION: most users do not need this package; the main package has
+everything (or depends on it) which is needed to scan for virii on
+workstations.
+
+This package contains files which are needed to execute the clamd-daemon.
+This daemon does not provide a system-wide service. Instead of, an instance
+of this daemon should be started for each service requiring it.
+
+See the README file how this can be done with a minimum of effort.
+
+
+%description server-sysvinit
+SysV initscripts template for the clamav server
+
+
+%description scanner
+This package contains a generic system wide clamd service which is
+e.g. used by the clamav-milter package.
+
+%description scanner-sysvinit
+The SysV initscripts for clamav-scanner.
+
+%description scanner-upstart
+The Upstart initscripts for clamav-scanner.
+
+%description scanner-systemd
+The systemd initscripts for clamav-scanner.
+
+
+%description milter
+This package contains files which are needed to run the clamav-milter.
+
+%description milter-sysvinit
+The SysV initscripts for clamav-milter.
+
+%description milter-upstart
+The Upstart initscripts for clamav-milter.
+
+%description milter-systemd
+The systemd initscripts for clamav-scanner.
+
+## ------------------------------------------------------------
+
+%prep
+%setup -q -n %{name}-%{version}%{?prerelease}
+
+%apply -n24 -p1 -b .private
+%apply -n25 -p1 -b .open
+%apply -n26 -p1 -b .cliopts
+%apply -n27 -p1 -b .umask
+%apply -n29 -p1 -b .jitoff
+%{?apply_end}
+
+install -p -m0644 %SOURCE300 clamav-milter/
+
+mkdir -p libclamunrar{,_iface}
+%{!?with_unrar:touch libclamunrar/{Makefile.in,all,install}}
+
+sed -ri \
+ -e 's!^#?(LogFile ).*!#\1/var/log/clamd.<SERVICE>!g' \
+ -e 's!^#?(LocalSocket ).*!#\1/var/run/clamd.<SERVICE>/clamd.sock!g' \
+ -e 's!^(#?PidFile ).*!\1/var/run/clamd.<SERVICE>/clamd.pid!g' \
+ -e 's!^#?(User ).*!\1<USER>!g' \
+ -e 's!^#?(AllowSupplementaryGroups|LogSyslog).*!\1 yes!g' \
+ -e 's! /usr/local/share/clamav,! %homedir,!g' \
+ etc/clamd.conf
+
+sed -ri \
+ -e 's!^#?(UpdateLogFile )!#\1!g;' \
+ -e 's!^#?(LogSyslog).*!\1 yes!g' \
+ -e 's!(DatabaseOwner *)clamav$!\1%username!g' etc/freshclam.conf
+
+
+## ------------------------------------------------------------
+
+%build
+CFLAGS="$RPM_OPT_FLAGS -Wall -W -Wmissing-prototypes -Wmissing-declarations -std=gnu99"
+export LDFLAGS='-Wl,--as-needed'
+# HACK: remove me...
+export FRESHCLAM_LIBS='-lz'
+# IPv6 check is buggy and does not work when there are no IPv6 interface on build machine
+export have_cv_ipv6=yes
+%configure \
+ --disable-static \
+ --disable-rpath \
+ --disable-silent-rules \
+ --disable-clamav \
+ --with-user=%username \
+ --with-group=%username \
+ --with-dbdir=/var/lib/clamav \
+ --enable-milter \
+ --enable-clamdtop \
+ %{!?with_bytecode:--disable-llvm} \
+ %{!?with_unrar:--disable-unrar}
+
+# TODO: check periodically that CLAMAVUSER is used for freshclam only
+
+
+# build with --as-needed and disable rpath
+sed -i \
+ -e 's! -shared ! -Wl,--as-needed\0!g' \
+ -e '/sys_lib_dlsearch_path_spec=\"\/lib \/usr\/lib /s!\"\/lib \/usr\/lib !/\"/%_lib /usr/%_lib !g' \
+ libtool
+
+
+make %{?_smp_mflags}
+
+
+## ------------------------------------------------------------
+
+%install
+rm -rf "$RPM_BUILD_ROOT" _doc*
+make DESTDIR="$RPM_BUILD_ROOT" install
+
+function smartsubst() {
+ local tmp
+ local regexp=$1
+ shift
+
+ tmp=$(mktemp /tmp/%name-subst.XXXXXX)
+ for i; do
+ sed -e "$regexp" "$i" >$tmp
+ cmp -s $tmp "$i" || cat $tmp >"$i"
+ rm -f $tmp
+ done
+}
+
+
+install -d -m 0755 \
+ $RPM_BUILD_ROOT%_sysconfdir/{mail,clamd.d,cron.d,logrotate.d,tmpfiles.d} \
+ $RPM_BUILD_ROOT%_var/{log,run} \
+ $RPM_BUILD_ROOT%milterstatedir \
+ $RPM_BUILD_ROOT%pkgdatadir/template \
+ $RPM_BUILD_ROOT%_initrddir \
+ $RPM_BUILD_ROOT%homedir \
+ $RPM_BUILD_ROOT%scanstatedir
+
+rm -f $RPM_BUILD_ROOT%_sysconfdir/clamd.conf \
+ $RPM_BUILD_ROOT%_libdir/*.la
+
+
+touch $RPM_BUILD_ROOT%homedir/daily.cld
+touch $RPM_BUILD_ROOT%homedir/main.cld
+
+
+## prepare the server-files
+install -D -m 0644 -p %SOURCE2 _doc_server/clamd.sysconfig
+install -D -m 0644 -p %SOURCE3 _doc_server/clamd.logrotate
+install -D -m 0755 -p %SOURCE7 _doc_server/clamd.init
+install -D -m 0644 -p %SOURCE5 _doc_server/README
+install -D -m 0644 -p etc/clamd.conf _doc_server/clamd.conf
+
+install -m 0644 -p %SOURCE1 $RPM_BUILD_ROOT%pkgdatadir/
+install -m 0755 -p %SOURCE100 $RPM_BUILD_ROOT%pkgdatadir/
+cp -pa _doc_server/* $RPM_BUILD_ROOT%pkgdatadir/template
+
+smartsubst 's!/usr/share/clamav!%pkgdatadir!g' $RPM_BUILD_ROOT%pkgdatadir/clamd-wrapper
+
+
+## prepare the update-files
+install -D -m 0644 -p %SOURCE6 $RPM_BUILD_ROOT%_sysconfdir/logrotate.d/clamav-update
+install -D -m 0755 -p %SOURCE8 $RPM_BUILD_ROOT%_sbindir/clamav-notify-servers
+touch $RPM_BUILD_ROOT%freshclamlog
+
+install -D -p -m 0755 %SOURCE200 $RPM_BUILD_ROOT%pkgdatadir/freshclam-sleep
+install -D -p -m 0644 %SOURCE201 $RPM_BUILD_ROOT%_sysconfdir/sysconfig/freshclam
+install -D -p -m 0600 %SOURCE202 $RPM_BUILD_ROOT%_sysconfdir/cron.d/clamav-update
+
+smartsubst 's!webmaster,clamav!webmaster,%username!g;
+ s!/usr/share/clamav!%pkgdatadir!g;
+ s!/usr/bin!%_bindir!g;
+ s!/usr/sbin!%_sbindir!g;' \
+ $RPM_BUILD_ROOT%_sysconfdir/cron.d/clamav-update \
+ $RPM_BUILD_ROOT%pkgdatadir/freshclam-sleep
+
+
+### The scanner stuff
+sed -e 's!<SERVICE>!scan!g;s!<USER>!%scanuser!g' \
+ etc/clamd.conf > $RPM_BUILD_ROOT%_sysconfdir/clamd.d/scan.conf
+
+sed -e 's!<SERVICE>!scan!g;' $RPM_BUILD_ROOT%pkgdatadir/template/clamd.init \
+ > $RPM_BUILD_ROOT%_initrddir/clamd.scan
+
+install -D -p -m 0644 %SOURCE410 $RPM_BUILD_ROOT%_sysconfdir/init/clamd.scan.conf
+install -D -p -m 0644 %SOURCE430 $RPM_BUILD_ROOT%_unitdir/clamd.scan.service
+
+cat << EOF > $RPM_BUILD_ROOT%_sysconfdir/tmpfiles.d/clamd.scan.conf
+d %scanstatedir 0710 %scanuser %scanuser
+EOF
+
+touch $RPM_BUILD_ROOT%scanstatedir/clamd.{sock,pid}
+
+
+### The milter stuff
+sed -r \
+ -e 's!^#?(User).*!\1 %milteruser!g' \
+ -e 's!^#?(AllowSupplementaryGroups|LogSyslog) .*!\1 yes!g' \
+ -e 's! /tmp/clamav-milter.socket! %milterstatedir/clamav-milter.socket!g' \
+ -e 's! /var/run/clamav-milter.pid! %milterstatedir/clamav-milter.pid!g' \
+ -e 's! /tmp/clamav-milter.log! %milterlog!g' \
+ etc/clamav-milter.conf > $RPM_BUILD_ROOT%_sysconfdir/mail/clamav-milter.conf
+
+install -D -p -m 0644 %SOURCE310 $RPM_BUILD_ROOT%_sysconfdir/init/clamav-milter.conf
+install -D -p -m 0755 %SOURCE320 $RPM_BUILD_ROOT%_initrddir/clamav-milter
+install -D -p -m 0644 %SOURCE330 $RPM_BUILD_ROOT%_unitdir/clamav-milter.service
+
+cat << EOF > $RPM_BUILD_ROOT%_sysconfdir/tmpfiles.d/clamav-milter.conf
+d %milterstatedir 0710 %milteruser %milteruser
+EOF
+
+rm -f $RPM_BUILD_ROOT%_sysconfdir/clamav-milter.conf
+touch $RPM_BUILD_ROOT{%milterstatedir/clamav-milter.{socket,pid},%milterlog}
+
+%{!?with_upstart: rm -rf $RPM_BUILD_ROOT%_sysconfdir/init}
+%{!?with_systemd: rm -rf $RPM_BUILD_ROOT%_unitdir}
+%{!?with_sysv: rm -f $RPM_BUILD_ROOT%_initrddir/*}
+%{!?with_sysv: rm -rf $RPM_BUILD_ROOT%_var/run/*/*.pid}
+%{!?with_tmpfiles: rm -rf $RPM_BUILD_ROOT%_sysconfdir/tmpfiles.d}
+
+# keep clamd-wrapper in every case because it might be needed by other
+# packages
+ln -s %pkgdatadir/clamd-wrapper $RPM_BUILD_ROOT%_initrddir/clamd-wrapper
+
+## ------------------------------------------------------------
+
+%check
+make check
+
+## ------------------------------------------------------------
+
+%clean
+rm -rf "$RPM_BUILD_ROOT"
+
+## ------------------------------------------------------------
+
+%pre filesystem
+%__fe_groupadd 4 -r %username &>/dev/null || :
+%__fe_useradd 4 -r -s /sbin/nologin -d %homedir -M \
+ -c 'Clamav database update user' -g %username %username &>/dev/null || :
+
+%postun filesystem
+%__fe_userdel %username &>/dev/null || :
+%__fe_groupdel %username &>/dev/null || :
+
+
+%pre scanner
+%__fe_groupadd 49 -r %scanuser &>/dev/null || :
+%__fe_useradd 49 -r -s /sbin/nologin -d / -M \
+ -g %scanuser %scanuser &>/dev/null || :
+
+%postun scanner
+%__fe_userdel %scanuser &>/dev/null || :
+%__fe_groupdel %scanuser &>/dev/null || :
+
+
+%post scanner-sysvinit
+/sbin/chkconfig --add clamd.scan
+
+%preun scanner-sysvinit
+test "$1" != 0 || %_initrddir/clamd.scan stop &>/dev/null || :
+test "$1" != 0 || /sbin/chkconfig --del clamd.scan
+
+%postun scanner-sysvinit
+test "$1" = 0 || %_initrddir/clamd.scan condrestart >/dev/null || :
+
+
+%post scanner-upstart
+/usr/bin/killall -u %scanuser clamd 2>/dev/null || :
+
+%preun scanner-upstart
+test "$1" != "0" || /sbin/initctl -q stop clamd.scan || :
+
+
+%systemd_install scanner-systemd clamd.scan.service
+
+
+%post update
+test -e %freshclamlog || {
+ touch %freshclamlog
+ %__chmod 0664 %freshclamlog
+ %__chown root:%username %freshclamlog
+}
+
+
+%triggerin milter -- clamav-scanner
+# Add the milteruser to the scanuser group; this is required when
+# milter and clamd communicate through local sockets
+/usr/sbin/groupmems -g %scanuser -a %milteruser &>/dev/null || :
+
+%pre milter
+%__fe_groupadd 5 -r %milteruser &>/dev/null || :
+%__fe_useradd 5 -r -s /sbin/nologin -d %milterstatedir -M \
+ -c 'Clamav Milter User' -g %milteruser %milteruser &>/dev/null || :
+
+%post milter
+test -e %milterlog || {
+ touch %milterlog
+ chmod 0620 %milterlog
+ chown root:%milteruser %milterlog
+}
+
+%postun milter
+%__fe_userdel %milteruser &>/dev/null || :
+%__fe_groupdel %milteruser &>/dev/null || :
+
+
+%post milter-sysvinit
+/sbin/chkconfig --add clamav-milter
+
+%preun milter-sysvinit
+test "$1" != 0 || %_initrddir/clamav-milter stop &>/dev/null || :
+test "$1" != 0 || /sbin/chkconfig --del clamav-milter
+
+%postun milter-sysvinit
+test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
+
+
+%post milter-upstart
+/usr/bin/killall -u %milteruser clamav-milter 2>/dev/null || :
+
+%preun milter-upstart
+test "$1" != "0" || /sbin/initctl -q stop clamav-milter || :
+
+
+%systemd_install milter-systemd clamav-milter.service
+
+
+%post lib -p /sbin/ldconfig
+%postun lib -p /sbin/ldconfig
+
+
+%files
+%defattr(-,root,root,-)
+%doc AUTHORS BUGS COPYING ChangeLog FAQ NEWS README UPGRADE
+%doc docs/*.pdf
+%_bindir/*
+%_mandir/man[15]/*
+%exclude %_bindir/clamav-config
+%exclude %_bindir/freshclam
+%exclude %_mandir/*/freshclam*
+
+## -----------------------
+
+%files lib
+%defattr(-,root,root,-)
+%_libdir/*.so.*
+
+## -----------------------
+
+%files devel
+%defattr(-,root,root,-)
+%_includedir/*
+%_libdir/*.so
+%pkgdatadir/template
+%pkgdatadir/clamd-gen
+%_libdir/pkgconfig/*
+%_bindir/clamav-config
+
+## -----------------------
+
+%files filesystem
+%attr(-,%username,%username) %dir %homedir
+%attr(-,root,root) %dir %pkgdatadir
+
+## -----------------------
+
+%files data
+%defattr(-,%username,%username,-)
+# 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
+
+
+%files data-empty
+%defattr(-,%username,%username,-)
+%ghost %attr(0664,%username,%username) %homedir/*.cvd
+
+
+## -----------------------
+
+%files update
+%defattr(-,root,root,-)
+%_bindir/freshclam
+%_mandir/*/freshclam*
+%pkgdatadir/freshclam-sleep
+%config(noreplace) %verify(not mtime) %_sysconfdir/freshclam.conf
+%config(noreplace) %verify(not mtime) %_sysconfdir/logrotate.d/*
+%config(noreplace) %_sysconfdir/cron.d/*
+%config(noreplace) %_sysconfdir/sysconfig/freshclam
+
+%ghost %attr(0664,root,%username) %verify(not size md5 mtime) %freshclamlog
+%ghost %attr(0664,%username,%username) %homedir/*.cld
+
+
+## -----------------------
+
+%files server
+%defattr(-,root,root,-)
+%doc _doc_server/*
+%_mandir/man[58]/clamd*
+%_sbindir/*
+%pkgdatadir/clamd-wrapper
+%dir %_sysconfdir/clamd.d
+
+%exclude %_sbindir/*milter*
+%exclude %_mandir/man8/clamav-milter*
+
+
+%files server-sysvinit
+%defattr(-,root,root,-)
+%_initrddir/clamd-wrapper
+
+
+## -----------------------
+
+%files scanner
+%defattr(-,root,root,-)
+%config(noreplace) %_sysconfdir/clamd.d/scan.conf
+%ghost %scanstatedir/clamd.sock
+
+%if 0%{?with_tmpfiles:1}
+ %_sysconfdir/tmpfiles.d/clamd.scan.conf
+ %ghost %dir %attr(0710,%scanuser,%scanuser) %scanstatedir
+%else
+ %dir %attr(0710,%scanuser,%scanuser) %scanstatedir
+%endif
+
+%if 0%{?with_sysv:1}
+%files scanner-sysvinit
+ %attr(0755,root,root) %config %_initrddir/clamd.scan
+ %ghost %scanstatedir/clamd.pid
+%endif
+
+%if 0%{?with_upstart:1}
+%files scanner-upstart
+ %defattr(-,root,root,-)
+ %config(noreplace) %_sysconfdir/init/clamd.scan*
+%endif
+
+%if 0%{?with_systemd:1}
+%files scanner-systemd
+ %defattr(-,root,root,-)
+ %_unitdir/clamd.scan.service
+%endif
+
+## -----------------------
+
+%files milter
+%defattr(-,root,root,-)
+%doc clamav-milter/README.fedora
+%_sbindir/*milter*
+%_mandir/man8/clamav-milter*
+%config(noreplace) %_sysconfdir/mail/clamav-milter.conf
+%ghost %attr(0620,root,%milteruser) %verify(not size md5 mtime) %milterlog
+%ghost %milterstatedir/clamav-milter.socket
+
+%if 0%{?with_tmpfiles:1}
+ %_sysconfdir/tmpfiles.d/clamav-milter.conf
+ %ghost %dir %attr(0710,%milteruser,%milteruser) %milterstatedir
+%else
+ %dir %attr(0710,%milteruser,%milteruser) %milterstatedir
+%endif
+
+%if 0%{?with_sysv:1}
+%files milter-sysvinit
+ %defattr(-,root,root,-)
+ %config %_initrddir/clamav-milter
+ %ghost %milterstatedir/clamav-milter.pid
+%endif
+
+%if 0%{?with_upstart:1}
+%files milter-upstart
+ %defattr(-,root,root,-)
+ %config(noreplace) %_sysconfdir/init/clamav-milter*
+%endif
+
+%if 0%{?with_systemd:1}
+%files milter-systemd
+ %defattr(-,root,root,-)
+ %_unitdir/clamav-milter.service
+%endif
+
+
+%changelog
+* Tue Oct 18 2011 Nick Bebout <nb(a)fedoraproject.org> - 0.97.3-1700
+- updated to 0.97.3
+- CVE-2011-3627 clamav: Recursion level crash fixed in v0.97.3
+
+* Tue Jul 26 2011 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.97.2-1600
+- updated to 0.97.2
+- CVE-2011-2721 Off-by-one error by scanning message hashes (#725694)
+- fixed systemd scripts and their installation
+
+* Thu Jun 9 2011 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.97.1-1600
+- updated to 0.97.1
+- fixed Requires(preun) vs. Requires(postun) inconsistency
+
+* Sat Apr 23 2011 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.97-1601
+- fixed tmpfiles.d syntax (#696812)
+
+* Sun Feb 20 2011 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.97-1600
+- updated to 0.97
+- rediffed some patches
+
+* Tue Feb 08 2011 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0.96.5-1503
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+
+* Sat Jan 8 2011 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.5-1502
+- fixed signal specifier in clamd-wrapper (#668131, James Ralston)
+
+* Fri Dec 24 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.5-1501
+- added systemd init scripts which obsolete to old sysvinit ones
+- added tmpfiles.d/ descriptions
+
+* Sat Dec 4 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.5-1500
+- updated to 0.96.5
+- CVE-2010-4260 Multiple errors within the processing of PDF files can
+ be exploited to e.g. cause a crash.
+- CVE-2010-4261 An off-by-one error within the "icon_cb()" function
+ can be exploited to cause a memory corruption.
+
+* Sun Oct 31 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.4-1500
+- updated to 0.96.4
+- execute 'make check' (#640347) but ignore errors for now because
+ four checks are failing on f13
+
+* Wed Sep 29 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.3-1501
+- lowered stop priority of sysv initscripts (#629435)
+
+* Wed Sep 22 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.3-1500
+- updated to 0.96.3
+- fixes CVE-2010-0405 in shipped bzlib.c copy
+
+* Sun Aug 15 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.2-1500
+- updated to 0.96.2
+- rediffed patches
+- removed the -jit-disable patch which is replaced upstream by a more
+ detailed configuration option.
+
+* Wed Aug 11 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
+- removed old %%trigger which renamed the 'clamav' user- and groupnames
+ to 'clamupdate'
+- use 'groupmems', not 'usermod' to add a user to a group because
+ 'usermod' does not work when user does not exist in local /etc/passwd
+
+* Tue Jul 13 2010 Dan Horák <dan[at]danny.cz> - 0.96.1-1401
+- ocaml not available (at least) on s390(x)
+
+* Tue Jun 1 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.1-1400
+- updated to 0.96.1
+- rediffed patches
+
+* Sat May 19 2010 Rakesh Pandit <rakesh(a)fedoraproject.org> - 0.96.1403
+- CVE-2010-1639 Clam AntiVirus: Heap-based overflow, when processing malicious PDF file(s)
+
+* Wed Apr 21 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96-1402
+- updated to final 0.96
+- applied upstream patch which allows to disable JIT compiler (#573191)
+- build JIT compiler again
+- disabled JIT compiler by default
+- removed explicit 'pkgconfig' requirements in -devel (#533956)
+
+* Sat Mar 20 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96-0.1401.rc1
+- do not build the bytecode JIT compiler for now until it can be disabled
+ at runtime (#573191)
+
+* Thu Mar 11 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96-1400.rc1
+- updated to 0.96rc1
+- added some BRs
+
+* Sun Dec 6 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.3-1301
+- updated -upstart to upstart 0.6.3
+
+* Sat Nov 21 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
+- adjusted chkconfig positions for clamav-milter (#530101)
+- use %%apply instead of %%patch
+
+* Thu Oct 29 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.3-1300
+- updated to 0.95.3
+
+* Sun Sep 13 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
+- conditionalized build of noarch subpackages to ease packaging under RHEL5
+
+* Sun Aug 9 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.2-5
+- modified freshclam configuration to log by syslog by default
+- disabled LocalSocket option in sample configuration
+- fixed clamav-milter sysv initscript to use bash interpreter and to
+ be disabled by default
+
+* Sat Aug 8 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.2-4
+- renamed 'clamav' user/group to 'clamupdate'
+- add the '%milteruser' user to the '%scanuser' group when the -scanner
+ subpackage is installed
+
+* Fri Jul 24 2009 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0.95.2-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
+
+* Thu Jun 11 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.2-1
+- updated to 0.95.2
+
+* Sun Apr 19 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.1-3
+- fixed '--without upstart' operation
+
+* Wed Apr 15 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.1-2
+- added '%%bcond_without upstart' conditional to ease skipping of
+ -upstart subpackage creation e.g. on EL5 systems
+- fixed Provides/Obsoletes: typo in -milter-sysvinit subpackage which
+ broke update path
+
+* Fri Apr 10 2009 Robert Scheck <robert(a)fedoraproject.org> - 0.95.1-1
+- Upgrade to 0.95.1 (#495039)
+
+* Wed Mar 25 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95-1
+- updated to final 0.95
+- added ncurses-devel (-> clamdtop) BR
+- enforced IPv6 support
+
+* Sun Mar 8 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95-0.1.rc1
+- updated to 0.95rc1
+- added -upstart subpackages
+- renamed -sysv to -sysvinit to make -upstart win the default dep resolving
+- reworked complete milter stuff
+- added -scanner subpackage which contains a preconfigured daemon
+ (e.g. for use by -milter)
+- moved %%changelog entries from 2006 and before into ChangeLog-rpm.old
+
+* Wed Feb 25 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.94.2-3
+- made some subpackages noarch
+- fixed typo in SysV initscript which removes 'touch' file (#473513)
+
+* Mon Feb 23 2009 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0.94.2-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
+* Tue Dec 02 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.94.2-1
+- Upgrade to 0.94.2 (#474002)
+
+* Wed Nov 05 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.94.1-1
+- Upgrade to 0.94.1
+
+* Sun Oct 26 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.94-1
+- Upgrade to 0.94 (SECURITY), fixes #461461:
+- CVE-2008-1389 Invalid memory access in the CHM unpacker
+- CVE-2008-3912 Out-of-memory NULL pointer dereference in mbox/msg
+- CVE-2008-3913 Memory leak in code path in freshclam's manager.c
+- CVE-2008-3914 Multiple file descriptor leaks on the code paths
+
+* Sun Jul 13 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93.3-1
+- updated to 0.93.3; another fix for CVE-2008-2713 (out-of-bounds read
+ on petite files)
+- put pid instead of pgrp into pidfile of clamav-milter (bz #452359)
+- rediffed patches
+
+* Tue Jun 17 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93.1-1
+- updated to 0.93.1
+- rediffed -path patch
+- CVE-2008-2713 Invalid Memory Access Denial Of Service Vulnerability
+
+* Mon Apr 14 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93-1
+- updated to final 0.93
+- removed daily.inc + main.inc directories; they are now replaced by
+ *.cld containers
+- trimmed down MAILTO list of cronjob to 'root' again; every well
+ configured system has an alias for this recipient
+
+* Wed Mar 12 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93-0.1.rc1
+- moved -milter scriptlets into -milter-core subpackage
+- added a requirement on the milteruser to the -milter-sendmail
+ subpackage (reported by Bruce Jerrick)
+
+* Tue Mar 4 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93-0.0.rc1
+- updated to 0.93rc1
+- fixed rpath issues
+
+* Mon Feb 11 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.92.1-1
+- updated to 0.92.1
+
+* Tue Jan 1 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.92-6
+- redisabled unrar stuff completely by using clean sources
+- splitted -milter subpackage into pieces to allow use without sendmail
+ (#239037)
+
+* Tue Jan 1 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.92-5
+- use a better way to disable RPATH-generation (needed for '--with
+ unrar' builds)
+
+* Mon Dec 31 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.92-4
+- added a README.fedora to the milter package (#240610)
+- ship original sources again; unrar is now licensed correctly (no more
+ stolen code put under GPL). Nevertheless, this license is not GPL
+ compatible, and to allow libclamav to be used by GPL applications,
+ unrar is disabled by a ./configure switch.
+- use pkg-config in clamav-config to emulate --cflags and --libs
+ operations (fixes partly multilib issues)
+- registered some more auto-updated files and marked them as %%ghost
+
+* Fri Dec 21 2007 Tom "spot" Callaway <tcallawa(a)redhat.com> - 0.92-3
+- updated to 0.92 (SECURITY):
+- CVE-2007-6335 MEW PE File Integer Overflow Vulnerability
+
+* Mon Oct 29 2007 Tom "spot" Callaway <tcallawa(a)redhat.com> - 0.91.2-3
+- remove RAR decompression code from source tarball because of
+ legal problems (resolves 334371)
+- correct license tag
+
+* Mon Sep 24 2007 Jesse Keating <jkeating(a)redhat.com> - 0.91.2-2
+- Bump release for upgrade path.
+
+* Sat Aug 25 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.91.2-1
+- updated to 0.91.2 (SECURITY):
+- CVE-2007-4510 DOS in RTF parser
+- DOS in html normalizer
+- arbitrary command execution by special crafted recipients in
+ clamav-milter's black-hole mode
+- fixed an open(2) issue
+
+* Tue Jul 17 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.91.1-0
+- updated to 0.91.1
+
+* Thu Jul 12 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.91-1
+- updated to 0.91
+
+* Thu May 31 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90.3-1
+- updated to 0.90.3
+- BR tcpd.h instead of tcp_wrappers(-devel) to make it build both
+ in FC6- and F7+
+
+* Fri Apr 13 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90.2-1
+- [SECURITY] updated to 0.90.2; fixes CVE-2007-1745, CVE-2007-1997
+
+* Fri Mar 2 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90.1-2
+- BR 'tcp_wrappers-devel' instead of plain 'tcp_wrappers'
+
+* Fri Mar 2 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90.1-1
+- updated to 0.90.1
+- updated %%doc list
+
+* Sun Feb 18 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90-1
+- updated to final 0.90
+- removed -visibility patch since fixed upstream
+
+* Sun Feb 4 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90-0.3.rc3
+- build with -Wl,-as-needed and cleaned up pkgconfig file
+- removed old hack which forced installation of freshclam.conf; related
+ check was removed upstream
+- removed static library
+- removed %%changelog entries from before 2004
+
+* Sat Feb 3 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90-0.2.rc3
+- updated to 0.90rc3
+- splitted mandatory parts from the data-file into a separate -filesystem
+ subpackage
+- added a -data-empty subpackage to allow a setup where database is
+ updated per cron-job and user does not want to download the large
+ -data package with outdated virus definitations (#214949)
+- %%ghost'ed the files downloaded by freshclam
diff --git a/clamav.spec.rej b/clamav.spec.rej
new file mode 100644
index 0000000..1096912
--- /dev/null
+++ b/clamav.spec.rej
@@ -0,0 +1,152 @@
+--- clamav.spec
++++ clamav.spec
+@@ -5,7 +5,7 @@
+ Summary: Anti-virus software
+ Name: clamav
+ Version: 0.97.3
+-Release: 1%{?dist}
++Release: 2%{?dist}
+ License: GPLv2
+ Group: Applications/System
+ URL: http://www.clamav.net/
+@@ -15,7 +15,14 @@
+ Source0: clamav-0.97.3-norar.tar.xz
+ Source1: clamav.init
+ Source2: clamav-milter.init
+-Source3: clamd-wrapper.tar.bz2
++Source3: clamd-wrapper
++Source4: clamd.init
++Source5: README.clamd-wrapper
++Source6: clamd.sysconfig
++Source7: freshclam.logrotate
++Source8: freshclam.cron
++Source9: clamd.logrotate
++Source10: clamav-milter.sysconfig
+ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+ BuildRequires: bzip2-devel, zlib-devel, gmp-devel, curl-devel, xz
+@@ -171,53 +178,6 @@
+ s|^#(ClamdSocket) .+$|$1 unix:%{_localstatedir}/run/clamav/clamd.sock|;
+ ' etc/clamav-milter.conf
+
+-
+-cat <<EOF >clamd.logrotate
+-%{_localstatedir}/log/clamav/clamd.log {
+- missingok
+- notifempty
+- create 644 clam clam
+- postrotate
+- killall -HUP clamd 2>/dev/null || :
+- endscript
+-}
+-EOF
+-
+-cat <<EOF >freshclam.logrotate
+-%{_localstatedir}/log/clamav/freshclam.log {
+- missingok
+- notifempty
+- create 644 clam clam
+-}
+-EOF
+-
+-cat <<'EOF' >freshclam.cron
+-#!/bin/sh
+-
+-### A simple update script for the clamav virus database.
+-### This could as well be replaced by a SysV script.
+-
+-### fix log file if needed
+-LOG_FILE="%{_localstatedir}/log/clamav/freshclam.log"
+-if [ ! -f "$LOG_FILE" ]; then
+- touch "$LOG_FILE"
+- chmod 644 "$LOG_FILE"
+- chown clam.clam "$LOG_FILE"
+-fi
+-
+-%{_bindir}/freshclam \
+- --quiet \
+- --datadir="%{_localstatedir}/lib/clamav" \
+- --log="$LOG_FILE"
+-EOF
+-
+-%{__cat} <<EOF >clamav-milter.sysconfig
+-### Simple config file for clamav-milter, you should
+-### read the documentation and tweak it as you wish.
+-
+-CLAMAV_FLAGS=""
+-EOF
+-
+ %build
+ %configure \
+ --program-prefix="%{?_program_prefix}" \
+@@ -240,19 +200,30 @@
+ rm -rf %{buildroot}
+ make install DESTDIR="%{buildroot}"
+
+-install -Dp -m0755 %{SOURCE1} %{buildroot}%{_initrddir}/clamd
+-install -Dp -m0755 freshclam.cron %{buildroot}%{_sysconfdir}/cron.daily/freshclam
+-install -Dp -m0644 freshclam.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/freshclam
+-install -Dp -m0644 clamd.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/clamav
++install -Dp -m0755 %{SOURCE1} %{buildroot}%{_initrddir}/clamav
++install -Dp -m0755 %{SOURCE8} %{buildroot}%{_sysconfdir}/cron.daily/freshclam
++install -Dp -m0644 %{SOURCE7} %{buildroot}%{_sysconfdir}/logrotate.d/freshclam
++install -Dp -m0644 %{SOURCE9} %{buildroot}%{_sysconfdir}/logrotate.d/clamav
++
++# now rewrite scripts and config files in-place
++sed -i \
++ -e 's!%%{_sbindir}!%{_sbindir}!g' \
++ -e 's!%%{_bindir}!%{_bindir}!g' \
++ -e 's!%%{_localstatedir}!%{_localstatedir}!g' \
++ %{buildroot}%{_sysconfdir}/logrotate.d/* \
++ %{buildroot}%{_sysconfdir}/cron.daily/freshclam
+
+ %if %{!?_without_milter:1}0
+ install -Dp -m0755 %{SOURCE2} %{buildroot}%{_initrddir}/clamav-milter
+-install -Dp -m0644 clamav-milter.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/clamav-milter
++install -Dp -m0644 %{SOURCE10} %{buildroot}%{_sysconfdir}/sysconfig/clamav-milter
+ %else
+ rm %{buildroot}%{_mandir}/man8/clamav-milter.8*
+ %endif
++
+ # Install clamav-wrapper:
+-tar xjf %{SOURCE3} -C %{buildroot}/%{_prefix}/share
++install -d -m0755 %{buildroot}/%{_prefix}/share/clamav
++install -m0755 -t %{buildroot}/%{_prefix}/share/clamav %{SOURCE3} %{SOURCE4}
++install -m0444 -t %{buildroot}/%{_prefix}/share/clamav %{SOURCE5} %{SOURCE6}
+
+ install -d -m0755 %{buildroot}%{_localstatedir}/log/clamav/
+ touch %{buildroot}%{_localstatedir}/log/clamav/freshclam.log
+@@ -345,8 +316,6 @@
+ %doc %{_mandir}/man1/clamscan.1*
+ %doc %{_mandir}/man1/freshclam.1*
+ %doc %{_mandir}/man5/freshclam.conf.5*
+-%doc %{_prefix}/share/clamav/README.clamd-wrapper
+-%{_prefix}/share/clamav/clamd-wrapper
+ %config(noreplace) %{_sysconfdir}/freshclam.conf
+ %{_bindir}/clamscan
+ %{_bindir}/freshclam
+@@ -366,10 +335,12 @@
+ %config(noreplace) %{_sysconfdir}/clamd.conf
+ %config(noreplace) %{_sysconfdir}/logrotate.d/clamav
+ %{_sysconfdir}/clamd.d
+-%config %{_initrddir}/clamd
++%config %{_initrddir}/clamav
+ %{_sbindir}/clamd
+ %{_bindir}/clamconf
+ %{_bindir}/clamdscan
++%doc %{_prefix}/share/clamav/README.clamd-wrapper
++%{_prefix}/share/clamav/clamd*
+
+ %defattr(0644, clam, clam, 0755)
+ %{_localstatedir}/run/clamav/
+@@ -409,6 +380,10 @@
+ %exclude %{_libdir}/libclamav.la
+
+ %changelog
++* Fri Nov 25 2011 Philip Prindeville <philipp(a)fedoraproject.org> - 0.97.3-2
++- Add missing clamd-wrapper supporting files
++- Remove from init script the unused CLAMD_SOCKET variable
++
+ * Tue Oct 18 2011 Nick Bebout <nb(a)fedoraproject.org> - 0.97.3-1
+ - Update to 0.97.3
+ - Fix CVE-2011-3627 clamav: Recursion level crash fixed in v0.97.3
commit 2cfebfc9fa6a0f416d9849cb8bbe86ec430c9259
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Tue Dec 20 10:31:23 2011 +0100
Remove duplicate section causing logrotate errors nightly
diff --git a/freshclam.logrotate b/freshclam.logrotate
index 5a5615a..272d220 100644
--- a/freshclam.logrotate
+++ b/freshclam.logrotate
@@ -3,8 +3,3 @@
notifempty
create 644 clam clam
}
-%{_localstatedir}/log/clamav/freshclam.log {
- missingok
- notifempty
- create 644 clam clam
-}
commit f5659018a4a4aea8cdf89db6e1c2a05789da7529
Author: Nick Bebout <nb(a)fedoraproject.org>
Date: Tue Dec 13 17:52:59 2011 -0600
Oops, i shouldn't have commited these
diff --git a/clamav.spec.orig b/clamav.spec.orig
deleted file mode 100644
index 45aa5db..0000000
--- a/clamav.spec.orig
+++ /dev/null
@@ -1,1091 +0,0 @@
-#global prerelease rc1
-
-## Fedora Extras specific customization below...
-%bcond_without fedora
-%bcond_without upstart
-%bcond_without systemd
-%bcond_with sysv
-%bcond_without tmpfiles
-%bcond_with unrar
-%bcond_without noarch
-%bcond_without bytecode
-##
-
-%ifnarch s390 s390x
-%global have_ocaml 1
-%else
-%global have_ocaml 0
-%endif
-
-%global username clamupdate
-%global homedir %_var/lib/clamav
-%global freshclamlog %_var/log/freshclam.log
-%global milteruser clamilt
-%global milterlog %_var/log/clamav-milter.log
-%global milterstatedir %_var/run/clamav-milter
-%global pkgdatadir %_datadir/%name
-
-%global scanuser clamscan
-%global scanstatedir %_var/run/clamd.scan
-
-%{?with_noarch:%global noarch BuildArch: noarch}
-%{!?_unitdir:%global _unitdir /lib/systemd/system}
-%{!?release_func:%global release_func() %%{?prerelease:0.}%1%%{?prerelease:.%%prerelease}%%{?dist}}
-%{!?apply:%global apply(p:n:b:) %patch%%{-n:%%{-n*}} %%{-p:-p %%{-p*}} %%{-b:-b %%{-b*}} \
-%nil}
-%{!?systemd_reqs:%global systemd_reqs \
-Requires(post): /bin/systemctl\
-Requires(preun): /bin/systemctl\
-Requires(postun): /bin/systemctl\
-%nil}
-%{!?systemd_install:%global systemd_install()\
-%post %1\
-test "$1" != "1" || /bin/systemctl daemon-reload >/dev/null 2>&1 || :\
-%preun %1\
-test "$1" != "0" || /bin/systemctl --no-reload disable %2 >/dev/null 2>&1 || :\
-test "$1" != "0" || /bin/systemctl stop %2 >/dev/null 2>&1 || :\
-%postun %1\
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :\
-test "$1" = "0" || /bin/systemctl try-restart %2 >/dev/null 2>&1 || :\
-%nil}
-
-
-Summary: End-user tools for the Clam Antivirus scanner
-Name: clamav
-Version: 0.97.3
-Release: %release_func 1700
-License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
-Group: Applications/File
-URL: http://www.clamav.net
-%if 0%{?with_unrar:1}
-Source0: http://download.sourceforge.net/sourceforge/clamav/%name-%version%{?prere...
-Source999: http://download.sourceforge.net/sourceforge/clamav/%name-%version%{?prere...
-%else
-# Unfortunately, clamav includes support for RAR v3, derived from GPL
-# incompatible unrar from RARlabs. We have to pull this code out.
-# tarball was created by
-# make clean-sources [TARBALL=<original-tarball>] [VERSION=<version>]
-Source0: %name-%version%{?prerelease}-norar.tar.xz
-%endif
-Source1: clamd-wrapper
-Source2: clamd.sysconfig
-Source3: clamd.logrotate
-Source5: clamd-README
-Source6: clamav-update.logrotate
-Source7: clamd.SERVICE.init
-Source8: clamav-notify-servers
-Patch24: clamav-0.92-private.patch
-Patch25: clamav-0.92-open.patch
-Patch26: clamav-0.95-cliopts.patch
-Patch27: clamav-0.95.3-umask.patch
-# https://bugzilla.redhat.com/attachment.cgi?id=403775&action=diff&context=...
-Patch29: clamav-0.96.2-jitoff.patch
-BuildRoot: %_tmppath/%name-%version-%release-root
-Requires: clamav-lib = %version-%release
-Requires: data(clamav)
-BuildRequires: zlib-devel bzip2-devel gmp-devel curl-devel
-BuildRequires: ncurses-devel
-BuildRequires: %_includedir/tcpd.h
-%{?with_bytecode:BuildRequires: bc tcl groff graphviz}
-%if %{have_ocaml}
-%{?with_bytecode:BuildRequires: ocaml}
-%endif
-
-%package filesystem
-Summary: Filesystem structure for clamav
-Group: Applications/File
-Provides: user(%username) = 4
-Provides: group(%username) = 4
-# Prevent version mix
-Conflicts: %name < %version-%release
-Conflicts: %name > %version-%release
-BuildRequires: fedora-usermgmt-devel
-%{?noarch}
-%{?FE_USERADD_REQ}
-
-%package lib
-Summary: Dynamic libraries for the Clam Antivirus scanner
-Group: System Environment/Libraries
-Requires: data(clamav)
-
-%package devel
-Summary: Header files and libraries for the Clam Antivirus scanner
-Group: Development/Libraries
-Source100: clamd-gen
-Requires: clamav-lib = %version-%release
-Requires: clamav-filesystem = %version-%release
-
-%package data
-Summary: Virus signature data for the Clam Antivirus scanner
-Group: Applications/File
-Requires(pre): clamav-filesystem = %version-%release
-Requires(postun): clamav-filesystem = %version-%release
-Provides: data(clamav) = full
-Conflicts: data(clamav) < full
-Conflicts: data(clamav) > full
-%{?noarch}
-
-%package data-empty
-Summary: Empty data package for the Clam Antivirus scanner
-Group: Applications/File
-Provides: data(clamav) = empty
-Conflicts: data(clamav) < empty
-Conflicts: data(clamav) > empty
-%{?noarch}
-
-%package update
-Summary: Auto-updater for the Clam Antivirus scanner data-files
-Group: Applications/File
-Source200: freshclam-sleep
-Source201: freshclam.sysconfig
-Source202: clamav-update.cron
-Requires: clamav-filesystem = %version-%release
-Requires(pre): /etc/cron.d
-Requires(postun): /etc/cron.d
-Requires(post): %__chown %__chmod
-Requires(post): group(%username)
-
-%package server
-Summary: Clam Antivirus scanner server
-Group: System Environment/Daemons
-Requires: data(clamav)
-Requires: clamav-filesystem = %version-%release
-Requires: clamav-lib = %version-%release
-
-%package server-sysvinit
-Summary: SysV initscripts for clamav server
-Group: System Environment/Daemons
-Provides: init(clamav-server) = sysv
-Requires: clamav-server = %version-%release
-Requires(pre): %_initrddir
-Requires(postun): %_initrddir
-Provides: clamav-server-sysv = %version-%release
-Obsoletes: clamav-server-sysv < %version-%release
-%{?noarch}
-
-
-%package scanner
-Summary: Clamav scanner daemon
-Group: System Environment/Daemons
-Requires: init(clamav-scanner)
-Provides: user(%scanuser) = 49
-Provides: group(%scanuser) = 49
-Requires: clamav-server = %version-%release
-%{?noarch}
-
-# Remove me after EOL of RHEL5
-%package scanner-sysvinit
-Summary: SysV initscripts for clamav scanner daemon
-Group: System Environment/Daemons
-Provides: init(clamav-scanner) = sysv
-Requires: clamav-server-sysvinit = %version-%release
-Requires: clamav-scanner = %version-%release
-Requires(pre): %_initrddir
-Requires(postun): %_initrddir initscripts
-Requires(post): chkconfig
-Requires(preun): chkconfig initscripts
-%{?noarch}
-
-%package scanner-upstart
-Summary: Upstart initscripts for clamav scanner daemon
-Group: System Environment/Daemons
-Source410: clamd.scan.upstart
-Provides: init(clamav-scanner) = upstart
-Requires: clamav-scanner = %version-%release
-Requires(pre): /etc/init
-Requires(post): /usr/bin/killall
-Requires(preun): /sbin/initctl
-%{?noarch}
-
-%package scanner-systemd
-Summary: Systemd initscripts for clamav scanner daemon
-Group: System Environment/Daemons
-Source430: clamd.scan.systemd
-Provides: init(clamav-scanner) = systemd
-Requires: clamav-scanner = %version-%release
-%{?systemd_reqs}
-%{?noarch}
-
-# Remove me after F17
-%if 0%{!?with_sysv:1}
-Provides: %name-scanner-sysvinit = %version-%release
-Obsoletes: %name-scanner-sysvinit < %version-%release
-%endif
-
-
-%package milter
-Summary: Milter module for the Clam Antivirus scanner
-Group: System Environment/Daemons
-Source300: README.fedora
-Requires: init(clamav-milter)
-BuildRequires: sendmail-devel
-BuildRequires: fedora-usermgmt-devel
-Provides: user(%milteruser) = 5
-Provides: group(%milteruser) = 5
-Requires(post): coreutils
-%{?FE_USERADD_REQ}
-
-Provides: milter(clamav) = sendmail
-Provides: milter(clamav) = postfix
-
-Provides: clamav-milter-core = %version-%release
-Obsoletes: clamav-milter-core < %version-%release
-Provides: clamav-milter-sendmail = %version-%release
-Obsoletes: clamav-milter-sendmail < %version-%release
-
-# Remove me after EOL of RHEL5
-%package milter-sysvinit
-Summary: SysV initscripts for the clamav sendmail-milter
-Group: System Environment/Daemons
-Source320: clamav-milter.sysv
-Provides: init(clamav-milter) = sysvinit
-Requires: clamav-milter = %version-%release
-Requires(post): user(%milteruser) clamav-milter
-Requires(preun): user(%milteruser) clamav-milter
-Requires(pre): %_initrddir
-Requires(postun): %_initrddir initscripts
-Requires(post): chkconfig
-Requires(preun): chkconfig initscripts
-Provides: clamav-milter-sysv = %version-%release
-Obsoletes: clamav-milter-sysv < %version-%release
-%{?noarch}
-
-%package milter-upstart
-Summary: Upstart initscripts for the clamav sendmail-milter
-Group: System Environment/Daemons
-Source310: clamav-milter.upstart
-Provides: init(clamav-milter) = upstart
-Requires: clamav-milter = %version-%release
-Requires(pre): /etc/init
-Requires(post): /usr/bin/killall
-Requires(preun): /sbin/initctl
-%{?noarch}
-
-%package milter-systemd
-Summary: Systemd initscripts for the clamav sendmail-milter
-Group: System Environment/Daemons
-Source330: clamav-milter.systemd
-Provides: init(clamav-milter) = systemd
-Requires: clamav-milter = %version-%release
-%{?systemd_reqs}
-%{?noarch}
-
-# Remove me after F17
-%if 0%{!?with_sysv:1}
-Provides: %name-milter-sysvinit = %version-%release
-Obsoletes: %name-milter-sysvinit < %version-%release
-%endif
-
-
-%description
-Clam AntiVirus is an anti-virus toolkit for UNIX. The main purpose of this
-software is the integration with mail servers (attachment scanning). The
-package provides a flexible and scalable multi-threaded daemon, a command
-line scanner, and a tool for automatic updating via Internet. The programs
-are based on a shared library distributed with the Clam AntiVirus package,
-which you can use with your own software. The virus database is based on
-the virus database from OpenAntiVirus, but contains additional signatures
-(including signatures for popular polymorphic viruses, too) and is KEPT UP
-TO DATE.
-
-%description filesystem
-This package provides the filesystem structure and contains the
-user-creation scripts required by clamav.
-
-%description lib
-This package contains dynamic libraries shared between applications
-using the Clam Antivirus scanner.
-
-%description devel
-This package contains headerfiles and libraries which are needed to
-build applications using clamav.
-
-%description data
-This package contains the virus-database needed by clamav. This
-database should be updated regularly; the 'clamav-update' package
-ships a corresponding cron-job. This package and the
-'clamav-data-empty' package are mutually exclusive.
-
-Use -data when you want a working (but perhaps outdated) virus scanner
-immediately after package installation.
-
-Use -data-empty when you are updating the virus database regulary and
-do not want to download a >5MB sized rpm-package with outdated virus
-definitions.
-
-
-%description data-empty
-This is an empty package to fulfill inter-package dependencies of the
-clamav suite. This package and the 'clamav-data' package are mutually
-exclusive.
-
-Use -data when you want a working (but perhaps outdated) virus scanner
-immediately after package installation.
-
-Use -data-empty when you are updating the virus database regulary and
-do not want to download a >5MB sized rpm-package with outdated virus
-definitions.
-
-
-%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-update.
-
-%description server
-ATTENTION: most users do not need this package; the main package has
-everything (or depends on it) which is needed to scan for virii on
-workstations.
-
-This package contains files which are needed to execute the clamd-daemon.
-This daemon does not provide a system-wide service. Instead of, an instance
-of this daemon should be started for each service requiring it.
-
-See the README file how this can be done with a minimum of effort.
-
-
-%description server-sysvinit
-SysV initscripts template for the clamav server
-
-
-%description scanner
-This package contains a generic system wide clamd service which is
-e.g. used by the clamav-milter package.
-
-%description scanner-sysvinit
-The SysV initscripts for clamav-scanner.
-
-%description scanner-upstart
-The Upstart initscripts for clamav-scanner.
-
-%description scanner-systemd
-The systemd initscripts for clamav-scanner.
-
-
-%description milter
-This package contains files which are needed to run the clamav-milter.
-
-%description milter-sysvinit
-The SysV initscripts for clamav-milter.
-
-%description milter-upstart
-The Upstart initscripts for clamav-milter.
-
-%description milter-systemd
-The systemd initscripts for clamav-scanner.
-
-## ------------------------------------------------------------
-
-%prep
-%setup -q -n %{name}-%{version}%{?prerelease}
-
-%apply -n24 -p1 -b .private
-%apply -n25 -p1 -b .open
-%apply -n26 -p1 -b .cliopts
-%apply -n27 -p1 -b .umask
-%apply -n29 -p1 -b .jitoff
-%{?apply_end}
-
-install -p -m0644 %SOURCE300 clamav-milter/
-
-mkdir -p libclamunrar{,_iface}
-%{!?with_unrar:touch libclamunrar/{Makefile.in,all,install}}
-
-sed -ri \
- -e 's!^#?(LogFile ).*!#\1/var/log/clamd.<SERVICE>!g' \
- -e 's!^#?(LocalSocket ).*!#\1/var/run/clamd.<SERVICE>/clamd.sock!g' \
- -e 's!^(#?PidFile ).*!\1/var/run/clamd.<SERVICE>/clamd.pid!g' \
- -e 's!^#?(User ).*!\1<USER>!g' \
- -e 's!^#?(AllowSupplementaryGroups|LogSyslog).*!\1 yes!g' \
- -e 's! /usr/local/share/clamav,! %homedir,!g' \
- etc/clamd.conf
-
-sed -ri \
- -e 's!^#?(UpdateLogFile )!#\1!g;' \
- -e 's!^#?(LogSyslog).*!\1 yes!g' \
- -e 's!(DatabaseOwner *)clamav$!\1%username!g' etc/freshclam.conf
-
-
-## ------------------------------------------------------------
-
-%build
-CFLAGS="$RPM_OPT_FLAGS -Wall -W -Wmissing-prototypes -Wmissing-declarations -std=gnu99"
-export LDFLAGS='-Wl,--as-needed'
-# HACK: remove me...
-export FRESHCLAM_LIBS='-lz'
-# IPv6 check is buggy and does not work when there are no IPv6 interface on build machine
-export have_cv_ipv6=yes
-%configure \
- --disable-static \
- --disable-rpath \
- --disable-silent-rules \
- --disable-clamav \
- --with-user=%username \
- --with-group=%username \
- --with-dbdir=/var/lib/clamav \
- --enable-milter \
- --enable-clamdtop \
- %{!?with_bytecode:--disable-llvm} \
- %{!?with_unrar:--disable-unrar}
-
-# TODO: check periodically that CLAMAVUSER is used for freshclam only
-
-
-# build with --as-needed and disable rpath
-sed -i \
- -e 's! -shared ! -Wl,--as-needed\0!g' \
- -e '/sys_lib_dlsearch_path_spec=\"\/lib \/usr\/lib /s!\"\/lib \/usr\/lib !/\"/%_lib /usr/%_lib !g' \
- libtool
-
-
-make %{?_smp_mflags}
-
-
-## ------------------------------------------------------------
-
-%install
-rm -rf "$RPM_BUILD_ROOT" _doc*
-make DESTDIR="$RPM_BUILD_ROOT" install
-
-function smartsubst() {
- local tmp
- local regexp=$1
- shift
-
- tmp=$(mktemp /tmp/%name-subst.XXXXXX)
- for i; do
- sed -e "$regexp" "$i" >$tmp
- cmp -s $tmp "$i" || cat $tmp >"$i"
- rm -f $tmp
- done
-}
-
-
-install -d -m 0755 \
- $RPM_BUILD_ROOT%_sysconfdir/{mail,clamd.d,cron.d,logrotate.d,tmpfiles.d} \
- $RPM_BUILD_ROOT%_var/{log,run} \
- $RPM_BUILD_ROOT%milterstatedir \
- $RPM_BUILD_ROOT%pkgdatadir/template \
- $RPM_BUILD_ROOT%_initrddir \
- $RPM_BUILD_ROOT%homedir \
- $RPM_BUILD_ROOT%scanstatedir
-
-rm -f $RPM_BUILD_ROOT%_sysconfdir/clamd.conf \
- $RPM_BUILD_ROOT%_libdir/*.la
-
-
-touch $RPM_BUILD_ROOT%homedir/daily.cld
-touch $RPM_BUILD_ROOT%homedir/main.cld
-
-
-## prepare the server-files
-install -D -m 0644 -p %SOURCE2 _doc_server/clamd.sysconfig
-install -D -m 0644 -p %SOURCE3 _doc_server/clamd.logrotate
-install -D -m 0755 -p %SOURCE7 _doc_server/clamd.init
-install -D -m 0644 -p %SOURCE5 _doc_server/README
-install -D -m 0644 -p etc/clamd.conf _doc_server/clamd.conf
-
-install -m 0644 -p %SOURCE1 $RPM_BUILD_ROOT%pkgdatadir/
-install -m 0755 -p %SOURCE100 $RPM_BUILD_ROOT%pkgdatadir/
-cp -pa _doc_server/* $RPM_BUILD_ROOT%pkgdatadir/template
-
-smartsubst 's!/usr/share/clamav!%pkgdatadir!g' $RPM_BUILD_ROOT%pkgdatadir/clamd-wrapper
-
-
-## prepare the update-files
-install -D -m 0644 -p %SOURCE6 $RPM_BUILD_ROOT%_sysconfdir/logrotate.d/clamav-update
-install -D -m 0755 -p %SOURCE8 $RPM_BUILD_ROOT%_sbindir/clamav-notify-servers
-touch $RPM_BUILD_ROOT%freshclamlog
-
-install -D -p -m 0755 %SOURCE200 $RPM_BUILD_ROOT%pkgdatadir/freshclam-sleep
-install -D -p -m 0644 %SOURCE201 $RPM_BUILD_ROOT%_sysconfdir/sysconfig/freshclam
-install -D -p -m 0600 %SOURCE202 $RPM_BUILD_ROOT%_sysconfdir/cron.d/clamav-update
-
-smartsubst 's!webmaster,clamav!webmaster,%username!g;
- s!/usr/share/clamav!%pkgdatadir!g;
- s!/usr/bin!%_bindir!g;
- s!/usr/sbin!%_sbindir!g;' \
- $RPM_BUILD_ROOT%_sysconfdir/cron.d/clamav-update \
- $RPM_BUILD_ROOT%pkgdatadir/freshclam-sleep
-
-
-### The scanner stuff
-sed -e 's!<SERVICE>!scan!g;s!<USER>!%scanuser!g' \
- etc/clamd.conf > $RPM_BUILD_ROOT%_sysconfdir/clamd.d/scan.conf
-
-sed -e 's!<SERVICE>!scan!g;' $RPM_BUILD_ROOT%pkgdatadir/template/clamd.init \
- > $RPM_BUILD_ROOT%_initrddir/clamd.scan
-
-install -D -p -m 0644 %SOURCE410 $RPM_BUILD_ROOT%_sysconfdir/init/clamd.scan.conf
-install -D -p -m 0644 %SOURCE430 $RPM_BUILD_ROOT%_unitdir/clamd.scan.service
-
-cat << EOF > $RPM_BUILD_ROOT%_sysconfdir/tmpfiles.d/clamd.scan.conf
-d %scanstatedir 0710 %scanuser %scanuser
-EOF
-
-touch $RPM_BUILD_ROOT%scanstatedir/clamd.{sock,pid}
-
-
-### The milter stuff
-sed -r \
- -e 's!^#?(User).*!\1 %milteruser!g' \
- -e 's!^#?(AllowSupplementaryGroups|LogSyslog) .*!\1 yes!g' \
- -e 's! /tmp/clamav-milter.socket! %milterstatedir/clamav-milter.socket!g' \
- -e 's! /var/run/clamav-milter.pid! %milterstatedir/clamav-milter.pid!g' \
- -e 's! /tmp/clamav-milter.log! %milterlog!g' \
- etc/clamav-milter.conf > $RPM_BUILD_ROOT%_sysconfdir/mail/clamav-milter.conf
-
-install -D -p -m 0644 %SOURCE310 $RPM_BUILD_ROOT%_sysconfdir/init/clamav-milter.conf
-install -D -p -m 0755 %SOURCE320 $RPM_BUILD_ROOT%_initrddir/clamav-milter
-install -D -p -m 0644 %SOURCE330 $RPM_BUILD_ROOT%_unitdir/clamav-milter.service
-
-cat << EOF > $RPM_BUILD_ROOT%_sysconfdir/tmpfiles.d/clamav-milter.conf
-d %milterstatedir 0710 %milteruser %milteruser
-EOF
-
-rm -f $RPM_BUILD_ROOT%_sysconfdir/clamav-milter.conf
-touch $RPM_BUILD_ROOT{%milterstatedir/clamav-milter.{socket,pid},%milterlog}
-
-%{!?with_upstart: rm -rf $RPM_BUILD_ROOT%_sysconfdir/init}
-%{!?with_systemd: rm -rf $RPM_BUILD_ROOT%_unitdir}
-%{!?with_sysv: rm -f $RPM_BUILD_ROOT%_initrddir/*}
-%{!?with_sysv: rm -rf $RPM_BUILD_ROOT%_var/run/*/*.pid}
-%{!?with_tmpfiles: rm -rf $RPM_BUILD_ROOT%_sysconfdir/tmpfiles.d}
-
-# keep clamd-wrapper in every case because it might be needed by other
-# packages
-ln -s %pkgdatadir/clamd-wrapper $RPM_BUILD_ROOT%_initrddir/clamd-wrapper
-
-## ------------------------------------------------------------
-
-%check
-make check
-
-## ------------------------------------------------------------
-
-%clean
-rm -rf "$RPM_BUILD_ROOT"
-
-## ------------------------------------------------------------
-
-%pre filesystem
-%__fe_groupadd 4 -r %username &>/dev/null || :
-%__fe_useradd 4 -r -s /sbin/nologin -d %homedir -M \
- -c 'Clamav database update user' -g %username %username &>/dev/null || :
-
-%postun filesystem
-%__fe_userdel %username &>/dev/null || :
-%__fe_groupdel %username &>/dev/null || :
-
-
-%pre scanner
-%__fe_groupadd 49 -r %scanuser &>/dev/null || :
-%__fe_useradd 49 -r -s /sbin/nologin -d / -M \
- -g %scanuser %scanuser &>/dev/null || :
-
-%postun scanner
-%__fe_userdel %scanuser &>/dev/null || :
-%__fe_groupdel %scanuser &>/dev/null || :
-
-
-%post scanner-sysvinit
-/sbin/chkconfig --add clamd.scan
-
-%preun scanner-sysvinit
-test "$1" != 0 || %_initrddir/clamd.scan stop &>/dev/null || :
-test "$1" != 0 || /sbin/chkconfig --del clamd.scan
-
-%postun scanner-sysvinit
-test "$1" = 0 || %_initrddir/clamd.scan condrestart >/dev/null || :
-
-
-%post scanner-upstart
-/usr/bin/killall -u %scanuser clamd 2>/dev/null || :
-
-%preun scanner-upstart
-test "$1" != "0" || /sbin/initctl -q stop clamd.scan || :
-
-
-%systemd_install scanner-systemd clamd.scan.service
-
-
-%post update
-test -e %freshclamlog || {
- touch %freshclamlog
- %__chmod 0664 %freshclamlog
- %__chown root:%username %freshclamlog
-}
-
-
-%triggerin milter -- clamav-scanner
-# Add the milteruser to the scanuser group; this is required when
-# milter and clamd communicate through local sockets
-/usr/sbin/groupmems -g %scanuser -a %milteruser &>/dev/null || :
-
-%pre milter
-%__fe_groupadd 5 -r %milteruser &>/dev/null || :
-%__fe_useradd 5 -r -s /sbin/nologin -d %milterstatedir -M \
- -c 'Clamav Milter User' -g %milteruser %milteruser &>/dev/null || :
-
-%post milter
-test -e %milterlog || {
- touch %milterlog
- chmod 0620 %milterlog
- chown root:%milteruser %milterlog
-}
-
-%postun milter
-%__fe_userdel %milteruser &>/dev/null || :
-%__fe_groupdel %milteruser &>/dev/null || :
-
-
-%post milter-sysvinit
-/sbin/chkconfig --add clamav-milter
-
-%preun milter-sysvinit
-test "$1" != 0 || %_initrddir/clamav-milter stop &>/dev/null || :
-test "$1" != 0 || /sbin/chkconfig --del clamav-milter
-
-%postun milter-sysvinit
-test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
-
-
-%post milter-upstart
-/usr/bin/killall -u %milteruser clamav-milter 2>/dev/null || :
-
-%preun milter-upstart
-test "$1" != "0" || /sbin/initctl -q stop clamav-milter || :
-
-
-%systemd_install milter-systemd clamav-milter.service
-
-
-%post lib -p /sbin/ldconfig
-%postun lib -p /sbin/ldconfig
-
-
-%files
-%defattr(-,root,root,-)
-%doc AUTHORS BUGS COPYING ChangeLog FAQ NEWS README UPGRADE
-%doc docs/*.pdf
-%_bindir/*
-%_mandir/man[15]/*
-%exclude %_bindir/clamav-config
-%exclude %_bindir/freshclam
-%exclude %_mandir/*/freshclam*
-
-## -----------------------
-
-%files lib
-%defattr(-,root,root,-)
-%_libdir/*.so.*
-
-## -----------------------
-
-%files devel
-%defattr(-,root,root,-)
-%_includedir/*
-%_libdir/*.so
-%pkgdatadir/template
-%pkgdatadir/clamd-gen
-%_libdir/pkgconfig/*
-%_bindir/clamav-config
-
-## -----------------------
-
-%files filesystem
-%attr(-,%username,%username) %dir %homedir
-%attr(-,root,root) %dir %pkgdatadir
-
-## -----------------------
-
-%files data
-%defattr(-,%username,%username,-)
-# 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
-
-
-%files data-empty
-%defattr(-,%username,%username,-)
-%ghost %attr(0664,%username,%username) %homedir/*.cvd
-
-
-## -----------------------
-
-%files update
-%defattr(-,root,root,-)
-%_bindir/freshclam
-%_mandir/*/freshclam*
-%pkgdatadir/freshclam-sleep
-%config(noreplace) %verify(not mtime) %_sysconfdir/freshclam.conf
-%config(noreplace) %verify(not mtime) %_sysconfdir/logrotate.d/*
-%config(noreplace) %_sysconfdir/cron.d/*
-%config(noreplace) %_sysconfdir/sysconfig/freshclam
-
-%ghost %attr(0664,root,%username) %verify(not size md5 mtime) %freshclamlog
-%ghost %attr(0664,%username,%username) %homedir/*.cld
-
-
-## -----------------------
-
-%files server
-%defattr(-,root,root,-)
-%doc _doc_server/*
-%_mandir/man[58]/clamd*
-%_sbindir/*
-%pkgdatadir/clamd-wrapper
-%dir %_sysconfdir/clamd.d
-
-%exclude %_sbindir/*milter*
-%exclude %_mandir/man8/clamav-milter*
-
-
-%files server-sysvinit
-%defattr(-,root,root,-)
-%_initrddir/clamd-wrapper
-
-
-## -----------------------
-
-%files scanner
-%defattr(-,root,root,-)
-%config(noreplace) %_sysconfdir/clamd.d/scan.conf
-%ghost %scanstatedir/clamd.sock
-
-%if 0%{?with_tmpfiles:1}
- %_sysconfdir/tmpfiles.d/clamd.scan.conf
- %ghost %dir %attr(0710,%scanuser,%scanuser) %scanstatedir
-%else
- %dir %attr(0710,%scanuser,%scanuser) %scanstatedir
-%endif
-
-%if 0%{?with_sysv:1}
-%files scanner-sysvinit
- %attr(0755,root,root) %config %_initrddir/clamd.scan
- %ghost %scanstatedir/clamd.pid
-%endif
-
-%if 0%{?with_upstart:1}
-%files scanner-upstart
- %defattr(-,root,root,-)
- %config(noreplace) %_sysconfdir/init/clamd.scan*
-%endif
-
-%if 0%{?with_systemd:1}
-%files scanner-systemd
- %defattr(-,root,root,-)
- %_unitdir/clamd.scan.service
-%endif
-
-## -----------------------
-
-%files milter
-%defattr(-,root,root,-)
-%doc clamav-milter/README.fedora
-%_sbindir/*milter*
-%_mandir/man8/clamav-milter*
-%config(noreplace) %_sysconfdir/mail/clamav-milter.conf
-%ghost %attr(0620,root,%milteruser) %verify(not size md5 mtime) %milterlog
-%ghost %milterstatedir/clamav-milter.socket
-
-%if 0%{?with_tmpfiles:1}
- %_sysconfdir/tmpfiles.d/clamav-milter.conf
- %ghost %dir %attr(0710,%milteruser,%milteruser) %milterstatedir
-%else
- %dir %attr(0710,%milteruser,%milteruser) %milterstatedir
-%endif
-
-%if 0%{?with_sysv:1}
-%files milter-sysvinit
- %defattr(-,root,root,-)
- %config %_initrddir/clamav-milter
- %ghost %milterstatedir/clamav-milter.pid
-%endif
-
-%if 0%{?with_upstart:1}
-%files milter-upstart
- %defattr(-,root,root,-)
- %config(noreplace) %_sysconfdir/init/clamav-milter*
-%endif
-
-%if 0%{?with_systemd:1}
-%files milter-systemd
- %defattr(-,root,root,-)
- %_unitdir/clamav-milter.service
-%endif
-
-
-%changelog
-* Tue Oct 18 2011 Nick Bebout <nb(a)fedoraproject.org> - 0.97.3-1700
-- updated to 0.97.3
-- CVE-2011-3627 clamav: Recursion level crash fixed in v0.97.3
-
-* Tue Jul 26 2011 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.97.2-1600
-- updated to 0.97.2
-- CVE-2011-2721 Off-by-one error by scanning message hashes (#725694)
-- fixed systemd scripts and their installation
-
-* Thu Jun 9 2011 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.97.1-1600
-- updated to 0.97.1
-- fixed Requires(preun) vs. Requires(postun) inconsistency
-
-* Sat Apr 23 2011 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.97-1601
-- fixed tmpfiles.d syntax (#696812)
-
-* Sun Feb 20 2011 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.97-1600
-- updated to 0.97
-- rediffed some patches
-
-* Tue Feb 08 2011 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0.96.5-1503
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
-
-* Sat Jan 8 2011 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.5-1502
-- fixed signal specifier in clamd-wrapper (#668131, James Ralston)
-
-* Fri Dec 24 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.5-1501
-- added systemd init scripts which obsolete to old sysvinit ones
-- added tmpfiles.d/ descriptions
-
-* Sat Dec 4 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.5-1500
-- updated to 0.96.5
-- CVE-2010-4260 Multiple errors within the processing of PDF files can
- be exploited to e.g. cause a crash.
-- CVE-2010-4261 An off-by-one error within the "icon_cb()" function
- can be exploited to cause a memory corruption.
-
-* Sun Oct 31 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.4-1500
-- updated to 0.96.4
-- execute 'make check' (#640347) but ignore errors for now because
- four checks are failing on f13
-
-* Wed Sep 29 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.3-1501
-- lowered stop priority of sysv initscripts (#629435)
-
-* Wed Sep 22 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.3-1500
-- updated to 0.96.3
-- fixes CVE-2010-0405 in shipped bzlib.c copy
-
-* Sun Aug 15 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.2-1500
-- updated to 0.96.2
-- rediffed patches
-- removed the -jit-disable patch which is replaced upstream by a more
- detailed configuration option.
-
-* Wed Aug 11 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
-- removed old %%trigger which renamed the 'clamav' user- and groupnames
- to 'clamupdate'
-- use 'groupmems', not 'usermod' to add a user to a group because
- 'usermod' does not work when user does not exist in local /etc/passwd
-
-* Tue Jul 13 2010 Dan Horák <dan[at]danny.cz> - 0.96.1-1401
-- ocaml not available (at least) on s390(x)
-
-* Tue Jun 1 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.1-1400
-- updated to 0.96.1
-- rediffed patches
-
-* Sat May 19 2010 Rakesh Pandit <rakesh(a)fedoraproject.org> - 0.96.1403
-- CVE-2010-1639 Clam AntiVirus: Heap-based overflow, when processing malicious PDF file(s)
-
-* Wed Apr 21 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96-1402
-- updated to final 0.96
-- applied upstream patch which allows to disable JIT compiler (#573191)
-- build JIT compiler again
-- disabled JIT compiler by default
-- removed explicit 'pkgconfig' requirements in -devel (#533956)
-
-* Sat Mar 20 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96-0.1401.rc1
-- do not build the bytecode JIT compiler for now until it can be disabled
- at runtime (#573191)
-
-* Thu Mar 11 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96-1400.rc1
-- updated to 0.96rc1
-- added some BRs
-
-* Sun Dec 6 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.3-1301
-- updated -upstart to upstart 0.6.3
-
-* Sat Nov 21 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
-- adjusted chkconfig positions for clamav-milter (#530101)
-- use %%apply instead of %%patch
-
-* Thu Oct 29 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.3-1300
-- updated to 0.95.3
-
-* Sun Sep 13 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
-- conditionalized build of noarch subpackages to ease packaging under RHEL5
-
-* Sun Aug 9 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.2-5
-- modified freshclam configuration to log by syslog by default
-- disabled LocalSocket option in sample configuration
-- fixed clamav-milter sysv initscript to use bash interpreter and to
- be disabled by default
-
-* Sat Aug 8 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.2-4
-- renamed 'clamav' user/group to 'clamupdate'
-- add the '%milteruser' user to the '%scanuser' group when the -scanner
- subpackage is installed
-
-* Fri Jul 24 2009 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0.95.2-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
-
-* Thu Jun 11 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.2-1
-- updated to 0.95.2
-
-* Sun Apr 19 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.1-3
-- fixed '--without upstart' operation
-
-* Wed Apr 15 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.1-2
-- added '%%bcond_without upstart' conditional to ease skipping of
- -upstart subpackage creation e.g. on EL5 systems
-- fixed Provides/Obsoletes: typo in -milter-sysvinit subpackage which
- broke update path
-
-* Fri Apr 10 2009 Robert Scheck <robert(a)fedoraproject.org> - 0.95.1-1
-- Upgrade to 0.95.1 (#495039)
-
-* Wed Mar 25 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95-1
-- updated to final 0.95
-- added ncurses-devel (-> clamdtop) BR
-- enforced IPv6 support
-
-* Sun Mar 8 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95-0.1.rc1
-- updated to 0.95rc1
-- added -upstart subpackages
-- renamed -sysv to -sysvinit to make -upstart win the default dep resolving
-- reworked complete milter stuff
-- added -scanner subpackage which contains a preconfigured daemon
- (e.g. for use by -milter)
-- moved %%changelog entries from 2006 and before into ChangeLog-rpm.old
-
-* Wed Feb 25 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.94.2-3
-- made some subpackages noarch
-- fixed typo in SysV initscript which removes 'touch' file (#473513)
-
-* Mon Feb 23 2009 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0.94.2-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
-
-* Tue Dec 02 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.94.2-1
-- Upgrade to 0.94.2 (#474002)
-
-* Wed Nov 05 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.94.1-1
-- Upgrade to 0.94.1
-
-* Sun Oct 26 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.94-1
-- Upgrade to 0.94 (SECURITY), fixes #461461:
-- CVE-2008-1389 Invalid memory access in the CHM unpacker
-- CVE-2008-3912 Out-of-memory NULL pointer dereference in mbox/msg
-- CVE-2008-3913 Memory leak in code path in freshclam's manager.c
-- CVE-2008-3914 Multiple file descriptor leaks on the code paths
-
-* Sun Jul 13 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93.3-1
-- updated to 0.93.3; another fix for CVE-2008-2713 (out-of-bounds read
- on petite files)
-- put pid instead of pgrp into pidfile of clamav-milter (bz #452359)
-- rediffed patches
-
-* Tue Jun 17 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93.1-1
-- updated to 0.93.1
-- rediffed -path patch
-- CVE-2008-2713 Invalid Memory Access Denial Of Service Vulnerability
-
-* Mon Apr 14 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93-1
-- updated to final 0.93
-- removed daily.inc + main.inc directories; they are now replaced by
- *.cld containers
-- trimmed down MAILTO list of cronjob to 'root' again; every well
- configured system has an alias for this recipient
-
-* Wed Mar 12 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93-0.1.rc1
-- moved -milter scriptlets into -milter-core subpackage
-- added a requirement on the milteruser to the -milter-sendmail
- subpackage (reported by Bruce Jerrick)
-
-* Tue Mar 4 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93-0.0.rc1
-- updated to 0.93rc1
-- fixed rpath issues
-
-* Mon Feb 11 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.92.1-1
-- updated to 0.92.1
-
-* Tue Jan 1 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.92-6
-- redisabled unrar stuff completely by using clean sources
-- splitted -milter subpackage into pieces to allow use without sendmail
- (#239037)
-
-* Tue Jan 1 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.92-5
-- use a better way to disable RPATH-generation (needed for '--with
- unrar' builds)
-
-* Mon Dec 31 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.92-4
-- added a README.fedora to the milter package (#240610)
-- ship original sources again; unrar is now licensed correctly (no more
- stolen code put under GPL). Nevertheless, this license is not GPL
- compatible, and to allow libclamav to be used by GPL applications,
- unrar is disabled by a ./configure switch.
-- use pkg-config in clamav-config to emulate --cflags and --libs
- operations (fixes partly multilib issues)
-- registered some more auto-updated files and marked them as %%ghost
-
-* Fri Dec 21 2007 Tom "spot" Callaway <tcallawa(a)redhat.com> - 0.92-3
-- updated to 0.92 (SECURITY):
-- CVE-2007-6335 MEW PE File Integer Overflow Vulnerability
-
-* Mon Oct 29 2007 Tom "spot" Callaway <tcallawa(a)redhat.com> - 0.91.2-3
-- remove RAR decompression code from source tarball because of
- legal problems (resolves 334371)
-- correct license tag
-
-* Mon Sep 24 2007 Jesse Keating <jkeating(a)redhat.com> - 0.91.2-2
-- Bump release for upgrade path.
-
-* Sat Aug 25 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.91.2-1
-- updated to 0.91.2 (SECURITY):
-- CVE-2007-4510 DOS in RTF parser
-- DOS in html normalizer
-- arbitrary command execution by special crafted recipients in
- clamav-milter's black-hole mode
-- fixed an open(2) issue
-
-* Tue Jul 17 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.91.1-0
-- updated to 0.91.1
-
-* Thu Jul 12 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.91-1
-- updated to 0.91
-
-* Thu May 31 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90.3-1
-- updated to 0.90.3
-- BR tcpd.h instead of tcp_wrappers(-devel) to make it build both
- in FC6- and F7+
-
-* Fri Apr 13 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90.2-1
-- [SECURITY] updated to 0.90.2; fixes CVE-2007-1745, CVE-2007-1997
-
-* Fri Mar 2 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90.1-2
-- BR 'tcp_wrappers-devel' instead of plain 'tcp_wrappers'
-
-* Fri Mar 2 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90.1-1
-- updated to 0.90.1
-- updated %%doc list
-
-* Sun Feb 18 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90-1
-- updated to final 0.90
-- removed -visibility patch since fixed upstream
-
-* Sun Feb 4 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90-0.3.rc3
-- build with -Wl,-as-needed and cleaned up pkgconfig file
-- removed old hack which forced installation of freshclam.conf; related
- check was removed upstream
-- removed static library
-- removed %%changelog entries from before 2004
-
-* Sat Feb 3 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90-0.2.rc3
-- updated to 0.90rc3
-- splitted mandatory parts from the data-file into a separate -filesystem
- subpackage
-- added a -data-empty subpackage to allow a setup where database is
- updated per cron-job and user does not want to download the large
- -data package with outdated virus definitations (#214949)
-- %%ghost'ed the files downloaded by freshclam
diff --git a/clamav.spec.rej b/clamav.spec.rej
deleted file mode 100644
index 1096912..0000000
--- a/clamav.spec.rej
+++ /dev/null
@@ -1,152 +0,0 @@
---- clamav.spec
-+++ clamav.spec
-@@ -5,7 +5,7 @@
- Summary: Anti-virus software
- Name: clamav
- Version: 0.97.3
--Release: 1%{?dist}
-+Release: 2%{?dist}
- License: GPLv2
- Group: Applications/System
- URL: http://www.clamav.net/
-@@ -15,7 +15,14 @@
- Source0: clamav-0.97.3-norar.tar.xz
- Source1: clamav.init
- Source2: clamav-milter.init
--Source3: clamd-wrapper.tar.bz2
-+Source3: clamd-wrapper
-+Source4: clamd.init
-+Source5: README.clamd-wrapper
-+Source6: clamd.sysconfig
-+Source7: freshclam.logrotate
-+Source8: freshclam.cron
-+Source9: clamd.logrotate
-+Source10: clamav-milter.sysconfig
- BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
- BuildRequires: bzip2-devel, zlib-devel, gmp-devel, curl-devel, xz
-@@ -171,53 +178,6 @@
- s|^#(ClamdSocket) .+$|$1 unix:%{_localstatedir}/run/clamav/clamd.sock|;
- ' etc/clamav-milter.conf
-
--
--cat <<EOF >clamd.logrotate
--%{_localstatedir}/log/clamav/clamd.log {
-- missingok
-- notifempty
-- create 644 clam clam
-- postrotate
-- killall -HUP clamd 2>/dev/null || :
-- endscript
--}
--EOF
--
--cat <<EOF >freshclam.logrotate
--%{_localstatedir}/log/clamav/freshclam.log {
-- missingok
-- notifempty
-- create 644 clam clam
--}
--EOF
--
--cat <<'EOF' >freshclam.cron
--#!/bin/sh
--
--### A simple update script for the clamav virus database.
--### This could as well be replaced by a SysV script.
--
--### fix log file if needed
--LOG_FILE="%{_localstatedir}/log/clamav/freshclam.log"
--if [ ! -f "$LOG_FILE" ]; then
-- touch "$LOG_FILE"
-- chmod 644 "$LOG_FILE"
-- chown clam.clam "$LOG_FILE"
--fi
--
--%{_bindir}/freshclam \
-- --quiet \
-- --datadir="%{_localstatedir}/lib/clamav" \
-- --log="$LOG_FILE"
--EOF
--
--%{__cat} <<EOF >clamav-milter.sysconfig
--### Simple config file for clamav-milter, you should
--### read the documentation and tweak it as you wish.
--
--CLAMAV_FLAGS=""
--EOF
--
- %build
- %configure \
- --program-prefix="%{?_program_prefix}" \
-@@ -240,19 +200,30 @@
- rm -rf %{buildroot}
- make install DESTDIR="%{buildroot}"
-
--install -Dp -m0755 %{SOURCE1} %{buildroot}%{_initrddir}/clamd
--install -Dp -m0755 freshclam.cron %{buildroot}%{_sysconfdir}/cron.daily/freshclam
--install -Dp -m0644 freshclam.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/freshclam
--install -Dp -m0644 clamd.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/clamav
-+install -Dp -m0755 %{SOURCE1} %{buildroot}%{_initrddir}/clamav
-+install -Dp -m0755 %{SOURCE8} %{buildroot}%{_sysconfdir}/cron.daily/freshclam
-+install -Dp -m0644 %{SOURCE7} %{buildroot}%{_sysconfdir}/logrotate.d/freshclam
-+install -Dp -m0644 %{SOURCE9} %{buildroot}%{_sysconfdir}/logrotate.d/clamav
-+
-+# now rewrite scripts and config files in-place
-+sed -i \
-+ -e 's!%%{_sbindir}!%{_sbindir}!g' \
-+ -e 's!%%{_bindir}!%{_bindir}!g' \
-+ -e 's!%%{_localstatedir}!%{_localstatedir}!g' \
-+ %{buildroot}%{_sysconfdir}/logrotate.d/* \
-+ %{buildroot}%{_sysconfdir}/cron.daily/freshclam
-
- %if %{!?_without_milter:1}0
- install -Dp -m0755 %{SOURCE2} %{buildroot}%{_initrddir}/clamav-milter
--install -Dp -m0644 clamav-milter.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/clamav-milter
-+install -Dp -m0644 %{SOURCE10} %{buildroot}%{_sysconfdir}/sysconfig/clamav-milter
- %else
- rm %{buildroot}%{_mandir}/man8/clamav-milter.8*
- %endif
-+
- # Install clamav-wrapper:
--tar xjf %{SOURCE3} -C %{buildroot}/%{_prefix}/share
-+install -d -m0755 %{buildroot}/%{_prefix}/share/clamav
-+install -m0755 -t %{buildroot}/%{_prefix}/share/clamav %{SOURCE3} %{SOURCE4}
-+install -m0444 -t %{buildroot}/%{_prefix}/share/clamav %{SOURCE5} %{SOURCE6}
-
- install -d -m0755 %{buildroot}%{_localstatedir}/log/clamav/
- touch %{buildroot}%{_localstatedir}/log/clamav/freshclam.log
-@@ -345,8 +316,6 @@
- %doc %{_mandir}/man1/clamscan.1*
- %doc %{_mandir}/man1/freshclam.1*
- %doc %{_mandir}/man5/freshclam.conf.5*
--%doc %{_prefix}/share/clamav/README.clamd-wrapper
--%{_prefix}/share/clamav/clamd-wrapper
- %config(noreplace) %{_sysconfdir}/freshclam.conf
- %{_bindir}/clamscan
- %{_bindir}/freshclam
-@@ -366,10 +335,12 @@
- %config(noreplace) %{_sysconfdir}/clamd.conf
- %config(noreplace) %{_sysconfdir}/logrotate.d/clamav
- %{_sysconfdir}/clamd.d
--%config %{_initrddir}/clamd
-+%config %{_initrddir}/clamav
- %{_sbindir}/clamd
- %{_bindir}/clamconf
- %{_bindir}/clamdscan
-+%doc %{_prefix}/share/clamav/README.clamd-wrapper
-+%{_prefix}/share/clamav/clamd*
-
- %defattr(0644, clam, clam, 0755)
- %{_localstatedir}/run/clamav/
-@@ -409,6 +380,10 @@
- %exclude %{_libdir}/libclamav.la
-
- %changelog
-+* Fri Nov 25 2011 Philip Prindeville <philipp(a)fedoraproject.org> - 0.97.3-2
-+- Add missing clamd-wrapper supporting files
-+- Remove from init script the unused CLAMD_SOCKET variable
-+
- * Tue Oct 18 2011 Nick Bebout <nb(a)fedoraproject.org> - 0.97.3-1
- - Update to 0.97.3
- - Fix CVE-2011-3627 clamav: Recursion level crash fixed in v0.97.3
commit 14d21bc46d3a59c90e91420a310f14102e8d859b
Author: Nick Bebout <nb(a)fedoraproject.org>
Date: Tue Dec 13 17:51:57 2011 -0600
Add files from bug 756854
diff --git a/README.clamd-wrapper b/README.clamd-wrapper
new file mode 100644
index 0000000..5cd1b91
--- /dev/null
+++ b/README.clamd-wrapper
@@ -0,0 +1,116 @@
+To create individual clamd-instance take the following files and
+modify/copy them in the suggested way:
+
+clamd.conf:
+ * set LogFile, PidFile, LocalSocket and User to suitable values
+ * place this file into /etc/clamd.d with an unique service-name;
+ e.g. as /etc/clamd.d/<SERVICE>.conf
+
+ To make logfile rotation work properly, the LogFile should be
+ writable for the assigned User. Recommended way to reach this, is
+ to:
+ * make it owned by the User's *group*
+ * assign at least 0620 (u+rw,g+w) permissions
+
+ A suitable command might be
+ | # touch <logfile>
+ | # chgrp <user> <logfile>
+ | # chmod 0620 <logfile>
+
+ NEVER use 'clamav' as the user since he can modify the database.
+ This is the user who is running the application; e.g. for mimedefang
+ (http://www.roaringpenguin.com/mimedefang), the user might be
+ 'defang'.Theoretically, distinct users could be used, but it must be
+ made sure that the application-user can write into the socket-file,
+ and that the clamd-user can access the files asked by the
+ application to be checked.
+
+
+clamd.logrotate:
+ * set the correct value for the logfile
+ * place it into /etc/logrotate.d
+
+clamd.sysconfig:
+ * set the name of the config-file and the local socket
+ * copy it to /etc/sysconfig/clamd.<SERVICE>
+
+clamd.init:
+ * set the service-name
+ * place it into /etc/init.d/ with an unique name and activate it
+ (e.g. with /sbin/chkconfig clamd.<SERVICE> on)
+
+Additionally, a symlink must be set to clamd in a way like
+ | # ln -s clamd /usr/sbin/clamd.<SERVICE>
+and the directory for the socket file must be created (see 'LocalSocket'
+in clamd.conf)
+ | # mkdir -p /var/run/clamd.<SERVICE>
+
+
+This directory must be writable by the 'User' chosen in the config-file.
+
+
+
+[Disclaimer:
+ this file and the script/configfiles are not part of the official
+ clamav package.
+
+ Please send complaints and comments to
+ mailto:enrico.scholz@informatik.tu-chemnitz.de!]
+To create individual clamd-instance take the following files and
+modify/copy them in the suggested way:
+
+clamd.conf:
+ * set LogFile, PidFile, LocalSocket and User to suitable values
+ * place this file into /etc/clamd.d with an unique service-name;
+ e.g. as /etc/clamd.d/<SERVICE>.conf
+
+ To make logfile rotation work properly, the LogFile should be
+ writable for the assigned User. Recommended way to reach this, is
+ to:
+ * make it owned by the User's *group*
+ * assign at least 0620 (u+rw,g+w) permissions
+
+ A suitable command might be
+ | # touch <logfile>
+ | # chgrp <user> <logfile>
+ | # chmod 0620 <logfile>
+
+ NEVER use 'clamav' as the user since he can modify the database.
+ This is the user who is running the application; e.g. for mimedefang
+ (http://www.roaringpenguin.com/mimedefang), the user might be
+ 'defang'.Theoretically, distinct users could be used, but it must be
+ made sure that the application-user can write into the socket-file,
+ and that the clamd-user can access the files asked by the
+ application to be checked.
+
+
+clamd.logrotate:
+ * set the correct value for the logfile
+ * place it into /etc/logrotate.d
+
+clamd.sysconfig:
+ * set the name of the config-file and the local socket
+ * copy it to /etc/sysconfig/clamd.<SERVICE>
+
+clamd.init:
+ * set the service-name
+ * place it into /etc/init.d/ with an unique name and activate it
+ (e.g. with /sbin/chkconfig clamd.<SERVICE> on)
+
+Additionally, a symlink must be set to clamd in a way like
+ | # ln -s clamd /usr/sbin/clamd.<SERVICE>
+and the directory for the socket file must be created (see 'LocalSocket'
+in clamd.conf)
+ | # mkdir -p /var/run/clamd.<SERVICE>
+
+
+This directory must be writable by the 'User' chosen in the config-file.
+
+
+
+[Disclaimer:
+ this file and the script/configfiles are not part of the official
+ clamav package.
+
+ Please send complaints and comments to
+ mailto:enrico.scholz@informatik.tu-chemnitz.de!]
diff --git a/clamav-milter.sysconfig b/clamav-milter.sysconfig
new file mode 100644
index 0000000..bd82488
--- /dev/null
+++ b/clamav-milter.sysconfig
@@ -0,0 +1,8 @@
+### Simple config file for clamav-milter, you should
+### read the documentation and tweak it as you wish.
+
+CLAMAV_FLAGS=""
+### Simple config file for clamav-milter, you should
+### read the documentation and tweak it as you wish.
+
+CLAMAV_FLAGS=""
diff --git a/clamav.spec b/clamav.spec
index bd8c933..53db81e 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -5,7 +5,7 @@
Summary: Anti-virus software
Name: clamav
Version: 0.97.3
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
@@ -15,7 +15,14 @@ URL: http://www.clamav.net/
Source0: clamav-0.97.3-norar.tar.xz
Source1: clamav.init
Source2: clamav-milter.init
-Source3: clamd-wrapper.tar.bz2
+Source3: clamd-wrapper
+Source4: clamd.init
+Source5: README.clamd-wrapper
+Source6: clamd.sysconfig
+Source7: freshclam.logrotate
+Source8: freshclam.cron
+Source9: clamd.logrotate
+Source10: clamav-milter.sysconfig
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: bzip2-devel, zlib-devel, gmp-devel, curl-devel, xz
@@ -171,53 +178,6 @@ xz -dc %{SOURCE0} | (cd .. ; tar xvvf -)
s|^#(ClamdSocket) .+$|$1 unix:%{_localstatedir}/run/clamav/clamd.sock|;
' etc/clamav-milter.conf
-
-cat <<EOF >clamd.logrotate
-%{_localstatedir}/log/clamav/clamd.log {
- missingok
- notifempty
- create 644 clam clam
- postrotate
- killall -HUP clamd 2>/dev/null || :
- endscript
-}
-EOF
-
-cat <<EOF >freshclam.logrotate
-%{_localstatedir}/log/clamav/freshclam.log {
- missingok
- notifempty
- create 644 clam clam
-}
-EOF
-
-cat <<'EOF' >freshclam.cron
-#!/bin/sh
-
-### A simple update script for the clamav virus database.
-### This could as well be replaced by a SysV script.
-
-### fix log file if needed
-LOG_FILE="%{_localstatedir}/log/clamav/freshclam.log"
-if [ ! -f "$LOG_FILE" ]; then
- touch "$LOG_FILE"
- chmod 644 "$LOG_FILE"
- chown clam.clam "$LOG_FILE"
-fi
-
-%{_bindir}/freshclam \
- --quiet \
- --datadir="%{_localstatedir}/lib/clamav" \
- --log="$LOG_FILE"
-EOF
-
-%{__cat} <<EOF >clamav-milter.sysconfig
-### Simple config file for clamav-milter, you should
-### read the documentation and tweak it as you wish.
-
-CLAMAV_FLAGS=""
-EOF
-
%build
%configure \
--program-prefix="%{?_program_prefix}" \
@@ -240,19 +200,30 @@ make %{?_smp_mflags}
rm -rf %{buildroot}
make install DESTDIR="%{buildroot}"
-install -Dp -m0755 %{SOURCE1} %{buildroot}%{_initrddir}/clamd
-install -Dp -m0755 freshclam.cron %{buildroot}%{_sysconfdir}/cron.daily/freshclam
-install -Dp -m0644 freshclam.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/freshclam
-install -Dp -m0644 clamd.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/clamav
+install -Dp -m0755 %{SOURCE1} %{buildroot}%{_initrddir}/clamav
+install -Dp -m0755 %{SOURCE8} %{buildroot}%{_sysconfdir}/cron.daily/freshclam
+install -Dp -m0644 %{SOURCE7} %{buildroot}%{_sysconfdir}/logrotate.d/freshclam
+install -Dp -m0644 %{SOURCE9} %{buildroot}%{_sysconfdir}/logrotate.d/clamav
+
+# now rewrite scripts and config files in-place
+sed -i \
+ -e 's!%%{_sbindir}!%{_sbindir}!g' \
+ -e 's!%%{_bindir}!%{_bindir}!g' \
+ -e 's!%%{_localstatedir}!%{_localstatedir}!g' \
+ %{buildroot}%{_sysconfdir}/logrotate.d/* \
+ %{buildroot}%{_sysconfdir}/cron.daily/freshclam
%if %{!?_without_milter:1}0
install -Dp -m0755 %{SOURCE2} %{buildroot}%{_initrddir}/clamav-milter
-install -Dp -m0644 clamav-milter.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/clamav-milter
+install -Dp -m0644 %{SOURCE10} %{buildroot}%{_sysconfdir}/sysconfig/clamav-milter
%else
rm %{buildroot}%{_mandir}/man8/clamav-milter.8*
%endif
+
# Install clamav-wrapper:
-tar xjf %{SOURCE3} -C %{buildroot}/%{_prefix}/share
+install -d -m0755 %{buildroot}/%{_prefix}/share/clamav
+install -m0755 -t %{buildroot}/%{_prefix}/share/clamav %{SOURCE3} %{SOURCE4}
+install -m0444 -t %{buildroot}/%{_prefix}/share/clamav %{SOURCE5} %{SOURCE6}
install -d -m0755 %{buildroot}%{_localstatedir}/log/clamav/
touch %{buildroot}%{_localstatedir}/log/clamav/freshclam.log
@@ -345,8 +316,6 @@ rm -rf %{buildroot}
%doc %{_mandir}/man1/clamscan.1*
%doc %{_mandir}/man1/freshclam.1*
%doc %{_mandir}/man5/freshclam.conf.5*
-%doc %{_prefix}/share/clamav/README.clamd-wrapper
-%{_prefix}/share/clamav/clamd-wrapper
%config(noreplace) %{_sysconfdir}/freshclam.conf
%{_bindir}/clamscan
%{_bindir}/freshclam
@@ -366,10 +335,12 @@ rm -rf %{buildroot}
%config(noreplace) %{_sysconfdir}/clamd.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/clamav
%{_sysconfdir}/clamd.d
-%config %{_initrddir}/clamd
+%config %{_initrddir}/clamav
%{_sbindir}/clamd
%{_bindir}/clamconf
%{_bindir}/clamdscan
+%doc %{_prefix}/share/clamav/README.clamd-wrapper
+%{_prefix}/share/clamav/clamd*
%defattr(0644, clam, clam, 0755)
%{_localstatedir}/run/clamav/
@@ -409,6 +380,10 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Fri Nov 25 2011 Philip Prindeville <philipp(a)fedoraproject.org> - 0.97.3-2
+- Add missing clamd-wrapper supporting files
+- Remove from init script the unused CLAMD_SOCKET variable
+
* Tue Oct 18 2011 Nick Bebout <nb(a)fedoraproject.org> - 0.97.3-1
- Update to 0.97.3
- Fix CVE-2011-3627 clamav: Recursion level crash fixed in v0.97.3
diff --git a/clamav.spec.orig b/clamav.spec.orig
new file mode 100644
index 0000000..45aa5db
--- /dev/null
+++ b/clamav.spec.orig
@@ -0,0 +1,1091 @@
+#global prerelease rc1
+
+## Fedora Extras specific customization below...
+%bcond_without fedora
+%bcond_without upstart
+%bcond_without systemd
+%bcond_with sysv
+%bcond_without tmpfiles
+%bcond_with unrar
+%bcond_without noarch
+%bcond_without bytecode
+##
+
+%ifnarch s390 s390x
+%global have_ocaml 1
+%else
+%global have_ocaml 0
+%endif
+
+%global username clamupdate
+%global homedir %_var/lib/clamav
+%global freshclamlog %_var/log/freshclam.log
+%global milteruser clamilt
+%global milterlog %_var/log/clamav-milter.log
+%global milterstatedir %_var/run/clamav-milter
+%global pkgdatadir %_datadir/%name
+
+%global scanuser clamscan
+%global scanstatedir %_var/run/clamd.scan
+
+%{?with_noarch:%global noarch BuildArch: noarch}
+%{!?_unitdir:%global _unitdir /lib/systemd/system}
+%{!?release_func:%global release_func() %%{?prerelease:0.}%1%%{?prerelease:.%%prerelease}%%{?dist}}
+%{!?apply:%global apply(p:n:b:) %patch%%{-n:%%{-n*}} %%{-p:-p %%{-p*}} %%{-b:-b %%{-b*}} \
+%nil}
+%{!?systemd_reqs:%global systemd_reqs \
+Requires(post): /bin/systemctl\
+Requires(preun): /bin/systemctl\
+Requires(postun): /bin/systemctl\
+%nil}
+%{!?systemd_install:%global systemd_install()\
+%post %1\
+test "$1" != "1" || /bin/systemctl daemon-reload >/dev/null 2>&1 || :\
+%preun %1\
+test "$1" != "0" || /bin/systemctl --no-reload disable %2 >/dev/null 2>&1 || :\
+test "$1" != "0" || /bin/systemctl stop %2 >/dev/null 2>&1 || :\
+%postun %1\
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :\
+test "$1" = "0" || /bin/systemctl try-restart %2 >/dev/null 2>&1 || :\
+%nil}
+
+
+Summary: End-user tools for the Clam Antivirus scanner
+Name: clamav
+Version: 0.97.3
+Release: %release_func 1700
+License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
+Group: Applications/File
+URL: http://www.clamav.net
+%if 0%{?with_unrar:1}
+Source0: http://download.sourceforge.net/sourceforge/clamav/%name-%version%{?prere...
+Source999: http://download.sourceforge.net/sourceforge/clamav/%name-%version%{?prere...
+%else
+# Unfortunately, clamav includes support for RAR v3, derived from GPL
+# incompatible unrar from RARlabs. We have to pull this code out.
+# tarball was created by
+# make clean-sources [TARBALL=<original-tarball>] [VERSION=<version>]
+Source0: %name-%version%{?prerelease}-norar.tar.xz
+%endif
+Source1: clamd-wrapper
+Source2: clamd.sysconfig
+Source3: clamd.logrotate
+Source5: clamd-README
+Source6: clamav-update.logrotate
+Source7: clamd.SERVICE.init
+Source8: clamav-notify-servers
+Patch24: clamav-0.92-private.patch
+Patch25: clamav-0.92-open.patch
+Patch26: clamav-0.95-cliopts.patch
+Patch27: clamav-0.95.3-umask.patch
+# https://bugzilla.redhat.com/attachment.cgi?id=403775&action=diff&context=...
+Patch29: clamav-0.96.2-jitoff.patch
+BuildRoot: %_tmppath/%name-%version-%release-root
+Requires: clamav-lib = %version-%release
+Requires: data(clamav)
+BuildRequires: zlib-devel bzip2-devel gmp-devel curl-devel
+BuildRequires: ncurses-devel
+BuildRequires: %_includedir/tcpd.h
+%{?with_bytecode:BuildRequires: bc tcl groff graphviz}
+%if %{have_ocaml}
+%{?with_bytecode:BuildRequires: ocaml}
+%endif
+
+%package filesystem
+Summary: Filesystem structure for clamav
+Group: Applications/File
+Provides: user(%username) = 4
+Provides: group(%username) = 4
+# Prevent version mix
+Conflicts: %name < %version-%release
+Conflicts: %name > %version-%release
+BuildRequires: fedora-usermgmt-devel
+%{?noarch}
+%{?FE_USERADD_REQ}
+
+%package lib
+Summary: Dynamic libraries for the Clam Antivirus scanner
+Group: System Environment/Libraries
+Requires: data(clamav)
+
+%package devel
+Summary: Header files and libraries for the Clam Antivirus scanner
+Group: Development/Libraries
+Source100: clamd-gen
+Requires: clamav-lib = %version-%release
+Requires: clamav-filesystem = %version-%release
+
+%package data
+Summary: Virus signature data for the Clam Antivirus scanner
+Group: Applications/File
+Requires(pre): clamav-filesystem = %version-%release
+Requires(postun): clamav-filesystem = %version-%release
+Provides: data(clamav) = full
+Conflicts: data(clamav) < full
+Conflicts: data(clamav) > full
+%{?noarch}
+
+%package data-empty
+Summary: Empty data package for the Clam Antivirus scanner
+Group: Applications/File
+Provides: data(clamav) = empty
+Conflicts: data(clamav) < empty
+Conflicts: data(clamav) > empty
+%{?noarch}
+
+%package update
+Summary: Auto-updater for the Clam Antivirus scanner data-files
+Group: Applications/File
+Source200: freshclam-sleep
+Source201: freshclam.sysconfig
+Source202: clamav-update.cron
+Requires: clamav-filesystem = %version-%release
+Requires(pre): /etc/cron.d
+Requires(postun): /etc/cron.d
+Requires(post): %__chown %__chmod
+Requires(post): group(%username)
+
+%package server
+Summary: Clam Antivirus scanner server
+Group: System Environment/Daemons
+Requires: data(clamav)
+Requires: clamav-filesystem = %version-%release
+Requires: clamav-lib = %version-%release
+
+%package server-sysvinit
+Summary: SysV initscripts for clamav server
+Group: System Environment/Daemons
+Provides: init(clamav-server) = sysv
+Requires: clamav-server = %version-%release
+Requires(pre): %_initrddir
+Requires(postun): %_initrddir
+Provides: clamav-server-sysv = %version-%release
+Obsoletes: clamav-server-sysv < %version-%release
+%{?noarch}
+
+
+%package scanner
+Summary: Clamav scanner daemon
+Group: System Environment/Daemons
+Requires: init(clamav-scanner)
+Provides: user(%scanuser) = 49
+Provides: group(%scanuser) = 49
+Requires: clamav-server = %version-%release
+%{?noarch}
+
+# Remove me after EOL of RHEL5
+%package scanner-sysvinit
+Summary: SysV initscripts for clamav scanner daemon
+Group: System Environment/Daemons
+Provides: init(clamav-scanner) = sysv
+Requires: clamav-server-sysvinit = %version-%release
+Requires: clamav-scanner = %version-%release
+Requires(pre): %_initrddir
+Requires(postun): %_initrddir initscripts
+Requires(post): chkconfig
+Requires(preun): chkconfig initscripts
+%{?noarch}
+
+%package scanner-upstart
+Summary: Upstart initscripts for clamav scanner daemon
+Group: System Environment/Daemons
+Source410: clamd.scan.upstart
+Provides: init(clamav-scanner) = upstart
+Requires: clamav-scanner = %version-%release
+Requires(pre): /etc/init
+Requires(post): /usr/bin/killall
+Requires(preun): /sbin/initctl
+%{?noarch}
+
+%package scanner-systemd
+Summary: Systemd initscripts for clamav scanner daemon
+Group: System Environment/Daemons
+Source430: clamd.scan.systemd
+Provides: init(clamav-scanner) = systemd
+Requires: clamav-scanner = %version-%release
+%{?systemd_reqs}
+%{?noarch}
+
+# Remove me after F17
+%if 0%{!?with_sysv:1}
+Provides: %name-scanner-sysvinit = %version-%release
+Obsoletes: %name-scanner-sysvinit < %version-%release
+%endif
+
+
+%package milter
+Summary: Milter module for the Clam Antivirus scanner
+Group: System Environment/Daemons
+Source300: README.fedora
+Requires: init(clamav-milter)
+BuildRequires: sendmail-devel
+BuildRequires: fedora-usermgmt-devel
+Provides: user(%milteruser) = 5
+Provides: group(%milteruser) = 5
+Requires(post): coreutils
+%{?FE_USERADD_REQ}
+
+Provides: milter(clamav) = sendmail
+Provides: milter(clamav) = postfix
+
+Provides: clamav-milter-core = %version-%release
+Obsoletes: clamav-milter-core < %version-%release
+Provides: clamav-milter-sendmail = %version-%release
+Obsoletes: clamav-milter-sendmail < %version-%release
+
+# Remove me after EOL of RHEL5
+%package milter-sysvinit
+Summary: SysV initscripts for the clamav sendmail-milter
+Group: System Environment/Daemons
+Source320: clamav-milter.sysv
+Provides: init(clamav-milter) = sysvinit
+Requires: clamav-milter = %version-%release
+Requires(post): user(%milteruser) clamav-milter
+Requires(preun): user(%milteruser) clamav-milter
+Requires(pre): %_initrddir
+Requires(postun): %_initrddir initscripts
+Requires(post): chkconfig
+Requires(preun): chkconfig initscripts
+Provides: clamav-milter-sysv = %version-%release
+Obsoletes: clamav-milter-sysv < %version-%release
+%{?noarch}
+
+%package milter-upstart
+Summary: Upstart initscripts for the clamav sendmail-milter
+Group: System Environment/Daemons
+Source310: clamav-milter.upstart
+Provides: init(clamav-milter) = upstart
+Requires: clamav-milter = %version-%release
+Requires(pre): /etc/init
+Requires(post): /usr/bin/killall
+Requires(preun): /sbin/initctl
+%{?noarch}
+
+%package milter-systemd
+Summary: Systemd initscripts for the clamav sendmail-milter
+Group: System Environment/Daemons
+Source330: clamav-milter.systemd
+Provides: init(clamav-milter) = systemd
+Requires: clamav-milter = %version-%release
+%{?systemd_reqs}
+%{?noarch}
+
+# Remove me after F17
+%if 0%{!?with_sysv:1}
+Provides: %name-milter-sysvinit = %version-%release
+Obsoletes: %name-milter-sysvinit < %version-%release
+%endif
+
+
+%description
+Clam AntiVirus is an anti-virus toolkit for UNIX. The main purpose of this
+software is the integration with mail servers (attachment scanning). The
+package provides a flexible and scalable multi-threaded daemon, a command
+line scanner, and a tool for automatic updating via Internet. The programs
+are based on a shared library distributed with the Clam AntiVirus package,
+which you can use with your own software. The virus database is based on
+the virus database from OpenAntiVirus, but contains additional signatures
+(including signatures for popular polymorphic viruses, too) and is KEPT UP
+TO DATE.
+
+%description filesystem
+This package provides the filesystem structure and contains the
+user-creation scripts required by clamav.
+
+%description lib
+This package contains dynamic libraries shared between applications
+using the Clam Antivirus scanner.
+
+%description devel
+This package contains headerfiles and libraries which are needed to
+build applications using clamav.
+
+%description data
+This package contains the virus-database needed by clamav. This
+database should be updated regularly; the 'clamav-update' package
+ships a corresponding cron-job. This package and the
+'clamav-data-empty' package are mutually exclusive.
+
+Use -data when you want a working (but perhaps outdated) virus scanner
+immediately after package installation.
+
+Use -data-empty when you are updating the virus database regulary and
+do not want to download a >5MB sized rpm-package with outdated virus
+definitions.
+
+
+%description data-empty
+This is an empty package to fulfill inter-package dependencies of the
+clamav suite. This package and the 'clamav-data' package are mutually
+exclusive.
+
+Use -data when you want a working (but perhaps outdated) virus scanner
+immediately after package installation.
+
+Use -data-empty when you are updating the virus database regulary and
+do not want to download a >5MB sized rpm-package with outdated virus
+definitions.
+
+
+%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-update.
+
+%description server
+ATTENTION: most users do not need this package; the main package has
+everything (or depends on it) which is needed to scan for virii on
+workstations.
+
+This package contains files which are needed to execute the clamd-daemon.
+This daemon does not provide a system-wide service. Instead of, an instance
+of this daemon should be started for each service requiring it.
+
+See the README file how this can be done with a minimum of effort.
+
+
+%description server-sysvinit
+SysV initscripts template for the clamav server
+
+
+%description scanner
+This package contains a generic system wide clamd service which is
+e.g. used by the clamav-milter package.
+
+%description scanner-sysvinit
+The SysV initscripts for clamav-scanner.
+
+%description scanner-upstart
+The Upstart initscripts for clamav-scanner.
+
+%description scanner-systemd
+The systemd initscripts for clamav-scanner.
+
+
+%description milter
+This package contains files which are needed to run the clamav-milter.
+
+%description milter-sysvinit
+The SysV initscripts for clamav-milter.
+
+%description milter-upstart
+The Upstart initscripts for clamav-milter.
+
+%description milter-systemd
+The systemd initscripts for clamav-scanner.
+
+## ------------------------------------------------------------
+
+%prep
+%setup -q -n %{name}-%{version}%{?prerelease}
+
+%apply -n24 -p1 -b .private
+%apply -n25 -p1 -b .open
+%apply -n26 -p1 -b .cliopts
+%apply -n27 -p1 -b .umask
+%apply -n29 -p1 -b .jitoff
+%{?apply_end}
+
+install -p -m0644 %SOURCE300 clamav-milter/
+
+mkdir -p libclamunrar{,_iface}
+%{!?with_unrar:touch libclamunrar/{Makefile.in,all,install}}
+
+sed -ri \
+ -e 's!^#?(LogFile ).*!#\1/var/log/clamd.<SERVICE>!g' \
+ -e 's!^#?(LocalSocket ).*!#\1/var/run/clamd.<SERVICE>/clamd.sock!g' \
+ -e 's!^(#?PidFile ).*!\1/var/run/clamd.<SERVICE>/clamd.pid!g' \
+ -e 's!^#?(User ).*!\1<USER>!g' \
+ -e 's!^#?(AllowSupplementaryGroups|LogSyslog).*!\1 yes!g' \
+ -e 's! /usr/local/share/clamav,! %homedir,!g' \
+ etc/clamd.conf
+
+sed -ri \
+ -e 's!^#?(UpdateLogFile )!#\1!g;' \
+ -e 's!^#?(LogSyslog).*!\1 yes!g' \
+ -e 's!(DatabaseOwner *)clamav$!\1%username!g' etc/freshclam.conf
+
+
+## ------------------------------------------------------------
+
+%build
+CFLAGS="$RPM_OPT_FLAGS -Wall -W -Wmissing-prototypes -Wmissing-declarations -std=gnu99"
+export LDFLAGS='-Wl,--as-needed'
+# HACK: remove me...
+export FRESHCLAM_LIBS='-lz'
+# IPv6 check is buggy and does not work when there are no IPv6 interface on build machine
+export have_cv_ipv6=yes
+%configure \
+ --disable-static \
+ --disable-rpath \
+ --disable-silent-rules \
+ --disable-clamav \
+ --with-user=%username \
+ --with-group=%username \
+ --with-dbdir=/var/lib/clamav \
+ --enable-milter \
+ --enable-clamdtop \
+ %{!?with_bytecode:--disable-llvm} \
+ %{!?with_unrar:--disable-unrar}
+
+# TODO: check periodically that CLAMAVUSER is used for freshclam only
+
+
+# build with --as-needed and disable rpath
+sed -i \
+ -e 's! -shared ! -Wl,--as-needed\0!g' \
+ -e '/sys_lib_dlsearch_path_spec=\"\/lib \/usr\/lib /s!\"\/lib \/usr\/lib !/\"/%_lib /usr/%_lib !g' \
+ libtool
+
+
+make %{?_smp_mflags}
+
+
+## ------------------------------------------------------------
+
+%install
+rm -rf "$RPM_BUILD_ROOT" _doc*
+make DESTDIR="$RPM_BUILD_ROOT" install
+
+function smartsubst() {
+ local tmp
+ local regexp=$1
+ shift
+
+ tmp=$(mktemp /tmp/%name-subst.XXXXXX)
+ for i; do
+ sed -e "$regexp" "$i" >$tmp
+ cmp -s $tmp "$i" || cat $tmp >"$i"
+ rm -f $tmp
+ done
+}
+
+
+install -d -m 0755 \
+ $RPM_BUILD_ROOT%_sysconfdir/{mail,clamd.d,cron.d,logrotate.d,tmpfiles.d} \
+ $RPM_BUILD_ROOT%_var/{log,run} \
+ $RPM_BUILD_ROOT%milterstatedir \
+ $RPM_BUILD_ROOT%pkgdatadir/template \
+ $RPM_BUILD_ROOT%_initrddir \
+ $RPM_BUILD_ROOT%homedir \
+ $RPM_BUILD_ROOT%scanstatedir
+
+rm -f $RPM_BUILD_ROOT%_sysconfdir/clamd.conf \
+ $RPM_BUILD_ROOT%_libdir/*.la
+
+
+touch $RPM_BUILD_ROOT%homedir/daily.cld
+touch $RPM_BUILD_ROOT%homedir/main.cld
+
+
+## prepare the server-files
+install -D -m 0644 -p %SOURCE2 _doc_server/clamd.sysconfig
+install -D -m 0644 -p %SOURCE3 _doc_server/clamd.logrotate
+install -D -m 0755 -p %SOURCE7 _doc_server/clamd.init
+install -D -m 0644 -p %SOURCE5 _doc_server/README
+install -D -m 0644 -p etc/clamd.conf _doc_server/clamd.conf
+
+install -m 0644 -p %SOURCE1 $RPM_BUILD_ROOT%pkgdatadir/
+install -m 0755 -p %SOURCE100 $RPM_BUILD_ROOT%pkgdatadir/
+cp -pa _doc_server/* $RPM_BUILD_ROOT%pkgdatadir/template
+
+smartsubst 's!/usr/share/clamav!%pkgdatadir!g' $RPM_BUILD_ROOT%pkgdatadir/clamd-wrapper
+
+
+## prepare the update-files
+install -D -m 0644 -p %SOURCE6 $RPM_BUILD_ROOT%_sysconfdir/logrotate.d/clamav-update
+install -D -m 0755 -p %SOURCE8 $RPM_BUILD_ROOT%_sbindir/clamav-notify-servers
+touch $RPM_BUILD_ROOT%freshclamlog
+
+install -D -p -m 0755 %SOURCE200 $RPM_BUILD_ROOT%pkgdatadir/freshclam-sleep
+install -D -p -m 0644 %SOURCE201 $RPM_BUILD_ROOT%_sysconfdir/sysconfig/freshclam
+install -D -p -m 0600 %SOURCE202 $RPM_BUILD_ROOT%_sysconfdir/cron.d/clamav-update
+
+smartsubst 's!webmaster,clamav!webmaster,%username!g;
+ s!/usr/share/clamav!%pkgdatadir!g;
+ s!/usr/bin!%_bindir!g;
+ s!/usr/sbin!%_sbindir!g;' \
+ $RPM_BUILD_ROOT%_sysconfdir/cron.d/clamav-update \
+ $RPM_BUILD_ROOT%pkgdatadir/freshclam-sleep
+
+
+### The scanner stuff
+sed -e 's!<SERVICE>!scan!g;s!<USER>!%scanuser!g' \
+ etc/clamd.conf > $RPM_BUILD_ROOT%_sysconfdir/clamd.d/scan.conf
+
+sed -e 's!<SERVICE>!scan!g;' $RPM_BUILD_ROOT%pkgdatadir/template/clamd.init \
+ > $RPM_BUILD_ROOT%_initrddir/clamd.scan
+
+install -D -p -m 0644 %SOURCE410 $RPM_BUILD_ROOT%_sysconfdir/init/clamd.scan.conf
+install -D -p -m 0644 %SOURCE430 $RPM_BUILD_ROOT%_unitdir/clamd.scan.service
+
+cat << EOF > $RPM_BUILD_ROOT%_sysconfdir/tmpfiles.d/clamd.scan.conf
+d %scanstatedir 0710 %scanuser %scanuser
+EOF
+
+touch $RPM_BUILD_ROOT%scanstatedir/clamd.{sock,pid}
+
+
+### The milter stuff
+sed -r \
+ -e 's!^#?(User).*!\1 %milteruser!g' \
+ -e 's!^#?(AllowSupplementaryGroups|LogSyslog) .*!\1 yes!g' \
+ -e 's! /tmp/clamav-milter.socket! %milterstatedir/clamav-milter.socket!g' \
+ -e 's! /var/run/clamav-milter.pid! %milterstatedir/clamav-milter.pid!g' \
+ -e 's! /tmp/clamav-milter.log! %milterlog!g' \
+ etc/clamav-milter.conf > $RPM_BUILD_ROOT%_sysconfdir/mail/clamav-milter.conf
+
+install -D -p -m 0644 %SOURCE310 $RPM_BUILD_ROOT%_sysconfdir/init/clamav-milter.conf
+install -D -p -m 0755 %SOURCE320 $RPM_BUILD_ROOT%_initrddir/clamav-milter
+install -D -p -m 0644 %SOURCE330 $RPM_BUILD_ROOT%_unitdir/clamav-milter.service
+
+cat << EOF > $RPM_BUILD_ROOT%_sysconfdir/tmpfiles.d/clamav-milter.conf
+d %milterstatedir 0710 %milteruser %milteruser
+EOF
+
+rm -f $RPM_BUILD_ROOT%_sysconfdir/clamav-milter.conf
+touch $RPM_BUILD_ROOT{%milterstatedir/clamav-milter.{socket,pid},%milterlog}
+
+%{!?with_upstart: rm -rf $RPM_BUILD_ROOT%_sysconfdir/init}
+%{!?with_systemd: rm -rf $RPM_BUILD_ROOT%_unitdir}
+%{!?with_sysv: rm -f $RPM_BUILD_ROOT%_initrddir/*}
+%{!?with_sysv: rm -rf $RPM_BUILD_ROOT%_var/run/*/*.pid}
+%{!?with_tmpfiles: rm -rf $RPM_BUILD_ROOT%_sysconfdir/tmpfiles.d}
+
+# keep clamd-wrapper in every case because it might be needed by other
+# packages
+ln -s %pkgdatadir/clamd-wrapper $RPM_BUILD_ROOT%_initrddir/clamd-wrapper
+
+## ------------------------------------------------------------
+
+%check
+make check
+
+## ------------------------------------------------------------
+
+%clean
+rm -rf "$RPM_BUILD_ROOT"
+
+## ------------------------------------------------------------
+
+%pre filesystem
+%__fe_groupadd 4 -r %username &>/dev/null || :
+%__fe_useradd 4 -r -s /sbin/nologin -d %homedir -M \
+ -c 'Clamav database update user' -g %username %username &>/dev/null || :
+
+%postun filesystem
+%__fe_userdel %username &>/dev/null || :
+%__fe_groupdel %username &>/dev/null || :
+
+
+%pre scanner
+%__fe_groupadd 49 -r %scanuser &>/dev/null || :
+%__fe_useradd 49 -r -s /sbin/nologin -d / -M \
+ -g %scanuser %scanuser &>/dev/null || :
+
+%postun scanner
+%__fe_userdel %scanuser &>/dev/null || :
+%__fe_groupdel %scanuser &>/dev/null || :
+
+
+%post scanner-sysvinit
+/sbin/chkconfig --add clamd.scan
+
+%preun scanner-sysvinit
+test "$1" != 0 || %_initrddir/clamd.scan stop &>/dev/null || :
+test "$1" != 0 || /sbin/chkconfig --del clamd.scan
+
+%postun scanner-sysvinit
+test "$1" = 0 || %_initrddir/clamd.scan condrestart >/dev/null || :
+
+
+%post scanner-upstart
+/usr/bin/killall -u %scanuser clamd 2>/dev/null || :
+
+%preun scanner-upstart
+test "$1" != "0" || /sbin/initctl -q stop clamd.scan || :
+
+
+%systemd_install scanner-systemd clamd.scan.service
+
+
+%post update
+test -e %freshclamlog || {
+ touch %freshclamlog
+ %__chmod 0664 %freshclamlog
+ %__chown root:%username %freshclamlog
+}
+
+
+%triggerin milter -- clamav-scanner
+# Add the milteruser to the scanuser group; this is required when
+# milter and clamd communicate through local sockets
+/usr/sbin/groupmems -g %scanuser -a %milteruser &>/dev/null || :
+
+%pre milter
+%__fe_groupadd 5 -r %milteruser &>/dev/null || :
+%__fe_useradd 5 -r -s /sbin/nologin -d %milterstatedir -M \
+ -c 'Clamav Milter User' -g %milteruser %milteruser &>/dev/null || :
+
+%post milter
+test -e %milterlog || {
+ touch %milterlog
+ chmod 0620 %milterlog
+ chown root:%milteruser %milterlog
+}
+
+%postun milter
+%__fe_userdel %milteruser &>/dev/null || :
+%__fe_groupdel %milteruser &>/dev/null || :
+
+
+%post milter-sysvinit
+/sbin/chkconfig --add clamav-milter
+
+%preun milter-sysvinit
+test "$1" != 0 || %_initrddir/clamav-milter stop &>/dev/null || :
+test "$1" != 0 || /sbin/chkconfig --del clamav-milter
+
+%postun milter-sysvinit
+test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
+
+
+%post milter-upstart
+/usr/bin/killall -u %milteruser clamav-milter 2>/dev/null || :
+
+%preun milter-upstart
+test "$1" != "0" || /sbin/initctl -q stop clamav-milter || :
+
+
+%systemd_install milter-systemd clamav-milter.service
+
+
+%post lib -p /sbin/ldconfig
+%postun lib -p /sbin/ldconfig
+
+
+%files
+%defattr(-,root,root,-)
+%doc AUTHORS BUGS COPYING ChangeLog FAQ NEWS README UPGRADE
+%doc docs/*.pdf
+%_bindir/*
+%_mandir/man[15]/*
+%exclude %_bindir/clamav-config
+%exclude %_bindir/freshclam
+%exclude %_mandir/*/freshclam*
+
+## -----------------------
+
+%files lib
+%defattr(-,root,root,-)
+%_libdir/*.so.*
+
+## -----------------------
+
+%files devel
+%defattr(-,root,root,-)
+%_includedir/*
+%_libdir/*.so
+%pkgdatadir/template
+%pkgdatadir/clamd-gen
+%_libdir/pkgconfig/*
+%_bindir/clamav-config
+
+## -----------------------
+
+%files filesystem
+%attr(-,%username,%username) %dir %homedir
+%attr(-,root,root) %dir %pkgdatadir
+
+## -----------------------
+
+%files data
+%defattr(-,%username,%username,-)
+# 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
+
+
+%files data-empty
+%defattr(-,%username,%username,-)
+%ghost %attr(0664,%username,%username) %homedir/*.cvd
+
+
+## -----------------------
+
+%files update
+%defattr(-,root,root,-)
+%_bindir/freshclam
+%_mandir/*/freshclam*
+%pkgdatadir/freshclam-sleep
+%config(noreplace) %verify(not mtime) %_sysconfdir/freshclam.conf
+%config(noreplace) %verify(not mtime) %_sysconfdir/logrotate.d/*
+%config(noreplace) %_sysconfdir/cron.d/*
+%config(noreplace) %_sysconfdir/sysconfig/freshclam
+
+%ghost %attr(0664,root,%username) %verify(not size md5 mtime) %freshclamlog
+%ghost %attr(0664,%username,%username) %homedir/*.cld
+
+
+## -----------------------
+
+%files server
+%defattr(-,root,root,-)
+%doc _doc_server/*
+%_mandir/man[58]/clamd*
+%_sbindir/*
+%pkgdatadir/clamd-wrapper
+%dir %_sysconfdir/clamd.d
+
+%exclude %_sbindir/*milter*
+%exclude %_mandir/man8/clamav-milter*
+
+
+%files server-sysvinit
+%defattr(-,root,root,-)
+%_initrddir/clamd-wrapper
+
+
+## -----------------------
+
+%files scanner
+%defattr(-,root,root,-)
+%config(noreplace) %_sysconfdir/clamd.d/scan.conf
+%ghost %scanstatedir/clamd.sock
+
+%if 0%{?with_tmpfiles:1}
+ %_sysconfdir/tmpfiles.d/clamd.scan.conf
+ %ghost %dir %attr(0710,%scanuser,%scanuser) %scanstatedir
+%else
+ %dir %attr(0710,%scanuser,%scanuser) %scanstatedir
+%endif
+
+%if 0%{?with_sysv:1}
+%files scanner-sysvinit
+ %attr(0755,root,root) %config %_initrddir/clamd.scan
+ %ghost %scanstatedir/clamd.pid
+%endif
+
+%if 0%{?with_upstart:1}
+%files scanner-upstart
+ %defattr(-,root,root,-)
+ %config(noreplace) %_sysconfdir/init/clamd.scan*
+%endif
+
+%if 0%{?with_systemd:1}
+%files scanner-systemd
+ %defattr(-,root,root,-)
+ %_unitdir/clamd.scan.service
+%endif
+
+## -----------------------
+
+%files milter
+%defattr(-,root,root,-)
+%doc clamav-milter/README.fedora
+%_sbindir/*milter*
+%_mandir/man8/clamav-milter*
+%config(noreplace) %_sysconfdir/mail/clamav-milter.conf
+%ghost %attr(0620,root,%milteruser) %verify(not size md5 mtime) %milterlog
+%ghost %milterstatedir/clamav-milter.socket
+
+%if 0%{?with_tmpfiles:1}
+ %_sysconfdir/tmpfiles.d/clamav-milter.conf
+ %ghost %dir %attr(0710,%milteruser,%milteruser) %milterstatedir
+%else
+ %dir %attr(0710,%milteruser,%milteruser) %milterstatedir
+%endif
+
+%if 0%{?with_sysv:1}
+%files milter-sysvinit
+ %defattr(-,root,root,-)
+ %config %_initrddir/clamav-milter
+ %ghost %milterstatedir/clamav-milter.pid
+%endif
+
+%if 0%{?with_upstart:1}
+%files milter-upstart
+ %defattr(-,root,root,-)
+ %config(noreplace) %_sysconfdir/init/clamav-milter*
+%endif
+
+%if 0%{?with_systemd:1}
+%files milter-systemd
+ %defattr(-,root,root,-)
+ %_unitdir/clamav-milter.service
+%endif
+
+
+%changelog
+* Tue Oct 18 2011 Nick Bebout <nb(a)fedoraproject.org> - 0.97.3-1700
+- updated to 0.97.3
+- CVE-2011-3627 clamav: Recursion level crash fixed in v0.97.3
+
+* Tue Jul 26 2011 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.97.2-1600
+- updated to 0.97.2
+- CVE-2011-2721 Off-by-one error by scanning message hashes (#725694)
+- fixed systemd scripts and their installation
+
+* Thu Jun 9 2011 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.97.1-1600
+- updated to 0.97.1
+- fixed Requires(preun) vs. Requires(postun) inconsistency
+
+* Sat Apr 23 2011 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.97-1601
+- fixed tmpfiles.d syntax (#696812)
+
+* Sun Feb 20 2011 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.97-1600
+- updated to 0.97
+- rediffed some patches
+
+* Tue Feb 08 2011 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0.96.5-1503
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+
+* Sat Jan 8 2011 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.5-1502
+- fixed signal specifier in clamd-wrapper (#668131, James Ralston)
+
+* Fri Dec 24 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.5-1501
+- added systemd init scripts which obsolete to old sysvinit ones
+- added tmpfiles.d/ descriptions
+
+* Sat Dec 4 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.5-1500
+- updated to 0.96.5
+- CVE-2010-4260 Multiple errors within the processing of PDF files can
+ be exploited to e.g. cause a crash.
+- CVE-2010-4261 An off-by-one error within the "icon_cb()" function
+ can be exploited to cause a memory corruption.
+
+* Sun Oct 31 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.4-1500
+- updated to 0.96.4
+- execute 'make check' (#640347) but ignore errors for now because
+ four checks are failing on f13
+
+* Wed Sep 29 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.3-1501
+- lowered stop priority of sysv initscripts (#629435)
+
+* Wed Sep 22 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.3-1500
+- updated to 0.96.3
+- fixes CVE-2010-0405 in shipped bzlib.c copy
+
+* Sun Aug 15 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.2-1500
+- updated to 0.96.2
+- rediffed patches
+- removed the -jit-disable patch which is replaced upstream by a more
+ detailed configuration option.
+
+* Wed Aug 11 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
+- removed old %%trigger which renamed the 'clamav' user- and groupnames
+ to 'clamupdate'
+- use 'groupmems', not 'usermod' to add a user to a group because
+ 'usermod' does not work when user does not exist in local /etc/passwd
+
+* Tue Jul 13 2010 Dan Horák <dan[at]danny.cz> - 0.96.1-1401
+- ocaml not available (at least) on s390(x)
+
+* Tue Jun 1 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96.1-1400
+- updated to 0.96.1
+- rediffed patches
+
+* Sat May 19 2010 Rakesh Pandit <rakesh(a)fedoraproject.org> - 0.96.1403
+- CVE-2010-1639 Clam AntiVirus: Heap-based overflow, when processing malicious PDF file(s)
+
+* Wed Apr 21 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96-1402
+- updated to final 0.96
+- applied upstream patch which allows to disable JIT compiler (#573191)
+- build JIT compiler again
+- disabled JIT compiler by default
+- removed explicit 'pkgconfig' requirements in -devel (#533956)
+
+* Sat Mar 20 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96-0.1401.rc1
+- do not build the bytecode JIT compiler for now until it can be disabled
+ at runtime (#573191)
+
+* Thu Mar 11 2010 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.96-1400.rc1
+- updated to 0.96rc1
+- added some BRs
+
+* Sun Dec 6 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.3-1301
+- updated -upstart to upstart 0.6.3
+
+* Sat Nov 21 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
+- adjusted chkconfig positions for clamav-milter (#530101)
+- use %%apply instead of %%patch
+
+* Thu Oct 29 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.3-1300
+- updated to 0.95.3
+
+* Sun Sep 13 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
+- conditionalized build of noarch subpackages to ease packaging under RHEL5
+
+* Sun Aug 9 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.2-5
+- modified freshclam configuration to log by syslog by default
+- disabled LocalSocket option in sample configuration
+- fixed clamav-milter sysv initscript to use bash interpreter and to
+ be disabled by default
+
+* Sat Aug 8 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.2-4
+- renamed 'clamav' user/group to 'clamupdate'
+- add the '%milteruser' user to the '%scanuser' group when the -scanner
+ subpackage is installed
+
+* Fri Jul 24 2009 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0.95.2-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
+
+* Thu Jun 11 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.2-1
+- updated to 0.95.2
+
+* Sun Apr 19 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.1-3
+- fixed '--without upstart' operation
+
+* Wed Apr 15 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.1-2
+- added '%%bcond_without upstart' conditional to ease skipping of
+ -upstart subpackage creation e.g. on EL5 systems
+- fixed Provides/Obsoletes: typo in -milter-sysvinit subpackage which
+ broke update path
+
+* Fri Apr 10 2009 Robert Scheck <robert(a)fedoraproject.org> - 0.95.1-1
+- Upgrade to 0.95.1 (#495039)
+
+* Wed Mar 25 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95-1
+- updated to final 0.95
+- added ncurses-devel (-> clamdtop) BR
+- enforced IPv6 support
+
+* Sun Mar 8 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95-0.1.rc1
+- updated to 0.95rc1
+- added -upstart subpackages
+- renamed -sysv to -sysvinit to make -upstart win the default dep resolving
+- reworked complete milter stuff
+- added -scanner subpackage which contains a preconfigured daemon
+ (e.g. for use by -milter)
+- moved %%changelog entries from 2006 and before into ChangeLog-rpm.old
+
+* Wed Feb 25 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.94.2-3
+- made some subpackages noarch
+- fixed typo in SysV initscript which removes 'touch' file (#473513)
+
+* Mon Feb 23 2009 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0.94.2-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
+* Tue Dec 02 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.94.2-1
+- Upgrade to 0.94.2 (#474002)
+
+* Wed Nov 05 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.94.1-1
+- Upgrade to 0.94.1
+
+* Sun Oct 26 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.94-1
+- Upgrade to 0.94 (SECURITY), fixes #461461:
+- CVE-2008-1389 Invalid memory access in the CHM unpacker
+- CVE-2008-3912 Out-of-memory NULL pointer dereference in mbox/msg
+- CVE-2008-3913 Memory leak in code path in freshclam's manager.c
+- CVE-2008-3914 Multiple file descriptor leaks on the code paths
+
+* Sun Jul 13 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93.3-1
+- updated to 0.93.3; another fix for CVE-2008-2713 (out-of-bounds read
+ on petite files)
+- put pid instead of pgrp into pidfile of clamav-milter (bz #452359)
+- rediffed patches
+
+* Tue Jun 17 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93.1-1
+- updated to 0.93.1
+- rediffed -path patch
+- CVE-2008-2713 Invalid Memory Access Denial Of Service Vulnerability
+
+* Mon Apr 14 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93-1
+- updated to final 0.93
+- removed daily.inc + main.inc directories; they are now replaced by
+ *.cld containers
+- trimmed down MAILTO list of cronjob to 'root' again; every well
+ configured system has an alias for this recipient
+
+* Wed Mar 12 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93-0.1.rc1
+- moved -milter scriptlets into -milter-core subpackage
+- added a requirement on the milteruser to the -milter-sendmail
+ subpackage (reported by Bruce Jerrick)
+
+* Tue Mar 4 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93-0.0.rc1
+- updated to 0.93rc1
+- fixed rpath issues
+
+* Mon Feb 11 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.92.1-1
+- updated to 0.92.1
+
+* Tue Jan 1 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.92-6
+- redisabled unrar stuff completely by using clean sources
+- splitted -milter subpackage into pieces to allow use without sendmail
+ (#239037)
+
+* Tue Jan 1 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.92-5
+- use a better way to disable RPATH-generation (needed for '--with
+ unrar' builds)
+
+* Mon Dec 31 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.92-4
+- added a README.fedora to the milter package (#240610)
+- ship original sources again; unrar is now licensed correctly (no more
+ stolen code put under GPL). Nevertheless, this license is not GPL
+ compatible, and to allow libclamav to be used by GPL applications,
+ unrar is disabled by a ./configure switch.
+- use pkg-config in clamav-config to emulate --cflags and --libs
+ operations (fixes partly multilib issues)
+- registered some more auto-updated files and marked them as %%ghost
+
+* Fri Dec 21 2007 Tom "spot" Callaway <tcallawa(a)redhat.com> - 0.92-3
+- updated to 0.92 (SECURITY):
+- CVE-2007-6335 MEW PE File Integer Overflow Vulnerability
+
+* Mon Oct 29 2007 Tom "spot" Callaway <tcallawa(a)redhat.com> - 0.91.2-3
+- remove RAR decompression code from source tarball because of
+ legal problems (resolves 334371)
+- correct license tag
+
+* Mon Sep 24 2007 Jesse Keating <jkeating(a)redhat.com> - 0.91.2-2
+- Bump release for upgrade path.
+
+* Sat Aug 25 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.91.2-1
+- updated to 0.91.2 (SECURITY):
+- CVE-2007-4510 DOS in RTF parser
+- DOS in html normalizer
+- arbitrary command execution by special crafted recipients in
+ clamav-milter's black-hole mode
+- fixed an open(2) issue
+
+* Tue Jul 17 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.91.1-0
+- updated to 0.91.1
+
+* Thu Jul 12 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.91-1
+- updated to 0.91
+
+* Thu May 31 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90.3-1
+- updated to 0.90.3
+- BR tcpd.h instead of tcp_wrappers(-devel) to make it build both
+ in FC6- and F7+
+
+* Fri Apr 13 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90.2-1
+- [SECURITY] updated to 0.90.2; fixes CVE-2007-1745, CVE-2007-1997
+
+* Fri Mar 2 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90.1-2
+- BR 'tcp_wrappers-devel' instead of plain 'tcp_wrappers'
+
+* Fri Mar 2 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90.1-1
+- updated to 0.90.1
+- updated %%doc list
+
+* Sun Feb 18 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90-1
+- updated to final 0.90
+- removed -visibility patch since fixed upstream
+
+* Sun Feb 4 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90-0.3.rc3
+- build with -Wl,-as-needed and cleaned up pkgconfig file
+- removed old hack which forced installation of freshclam.conf; related
+ check was removed upstream
+- removed static library
+- removed %%changelog entries from before 2004
+
+* Sat Feb 3 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90-0.2.rc3
+- updated to 0.90rc3
+- splitted mandatory parts from the data-file into a separate -filesystem
+ subpackage
+- added a -data-empty subpackage to allow a setup where database is
+ updated per cron-job and user does not want to download the large
+ -data package with outdated virus definitations (#214949)
+- %%ghost'ed the files downloaded by freshclam
diff --git a/clamav.spec.rej b/clamav.spec.rej
new file mode 100644
index 0000000..1096912
--- /dev/null
+++ b/clamav.spec.rej
@@ -0,0 +1,152 @@
+--- clamav.spec
++++ clamav.spec
+@@ -5,7 +5,7 @@
+ Summary: Anti-virus software
+ Name: clamav
+ Version: 0.97.3
+-Release: 1%{?dist}
++Release: 2%{?dist}
+ License: GPLv2
+ Group: Applications/System
+ URL: http://www.clamav.net/
+@@ -15,7 +15,14 @@
+ Source0: clamav-0.97.3-norar.tar.xz
+ Source1: clamav.init
+ Source2: clamav-milter.init
+-Source3: clamd-wrapper.tar.bz2
++Source3: clamd-wrapper
++Source4: clamd.init
++Source5: README.clamd-wrapper
++Source6: clamd.sysconfig
++Source7: freshclam.logrotate
++Source8: freshclam.cron
++Source9: clamd.logrotate
++Source10: clamav-milter.sysconfig
+ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+ BuildRequires: bzip2-devel, zlib-devel, gmp-devel, curl-devel, xz
+@@ -171,53 +178,6 @@
+ s|^#(ClamdSocket) .+$|$1 unix:%{_localstatedir}/run/clamav/clamd.sock|;
+ ' etc/clamav-milter.conf
+
+-
+-cat <<EOF >clamd.logrotate
+-%{_localstatedir}/log/clamav/clamd.log {
+- missingok
+- notifempty
+- create 644 clam clam
+- postrotate
+- killall -HUP clamd 2>/dev/null || :
+- endscript
+-}
+-EOF
+-
+-cat <<EOF >freshclam.logrotate
+-%{_localstatedir}/log/clamav/freshclam.log {
+- missingok
+- notifempty
+- create 644 clam clam
+-}
+-EOF
+-
+-cat <<'EOF' >freshclam.cron
+-#!/bin/sh
+-
+-### A simple update script for the clamav virus database.
+-### This could as well be replaced by a SysV script.
+-
+-### fix log file if needed
+-LOG_FILE="%{_localstatedir}/log/clamav/freshclam.log"
+-if [ ! -f "$LOG_FILE" ]; then
+- touch "$LOG_FILE"
+- chmod 644 "$LOG_FILE"
+- chown clam.clam "$LOG_FILE"
+-fi
+-
+-%{_bindir}/freshclam \
+- --quiet \
+- --datadir="%{_localstatedir}/lib/clamav" \
+- --log="$LOG_FILE"
+-EOF
+-
+-%{__cat} <<EOF >clamav-milter.sysconfig
+-### Simple config file for clamav-milter, you should
+-### read the documentation and tweak it as you wish.
+-
+-CLAMAV_FLAGS=""
+-EOF
+-
+ %build
+ %configure \
+ --program-prefix="%{?_program_prefix}" \
+@@ -240,19 +200,30 @@
+ rm -rf %{buildroot}
+ make install DESTDIR="%{buildroot}"
+
+-install -Dp -m0755 %{SOURCE1} %{buildroot}%{_initrddir}/clamd
+-install -Dp -m0755 freshclam.cron %{buildroot}%{_sysconfdir}/cron.daily/freshclam
+-install -Dp -m0644 freshclam.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/freshclam
+-install -Dp -m0644 clamd.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/clamav
++install -Dp -m0755 %{SOURCE1} %{buildroot}%{_initrddir}/clamav
++install -Dp -m0755 %{SOURCE8} %{buildroot}%{_sysconfdir}/cron.daily/freshclam
++install -Dp -m0644 %{SOURCE7} %{buildroot}%{_sysconfdir}/logrotate.d/freshclam
++install -Dp -m0644 %{SOURCE9} %{buildroot}%{_sysconfdir}/logrotate.d/clamav
++
++# now rewrite scripts and config files in-place
++sed -i \
++ -e 's!%%{_sbindir}!%{_sbindir}!g' \
++ -e 's!%%{_bindir}!%{_bindir}!g' \
++ -e 's!%%{_localstatedir}!%{_localstatedir}!g' \
++ %{buildroot}%{_sysconfdir}/logrotate.d/* \
++ %{buildroot}%{_sysconfdir}/cron.daily/freshclam
+
+ %if %{!?_without_milter:1}0
+ install -Dp -m0755 %{SOURCE2} %{buildroot}%{_initrddir}/clamav-milter
+-install -Dp -m0644 clamav-milter.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/clamav-milter
++install -Dp -m0644 %{SOURCE10} %{buildroot}%{_sysconfdir}/sysconfig/clamav-milter
+ %else
+ rm %{buildroot}%{_mandir}/man8/clamav-milter.8*
+ %endif
++
+ # Install clamav-wrapper:
+-tar xjf %{SOURCE3} -C %{buildroot}/%{_prefix}/share
++install -d -m0755 %{buildroot}/%{_prefix}/share/clamav
++install -m0755 -t %{buildroot}/%{_prefix}/share/clamav %{SOURCE3} %{SOURCE4}
++install -m0444 -t %{buildroot}/%{_prefix}/share/clamav %{SOURCE5} %{SOURCE6}
+
+ install -d -m0755 %{buildroot}%{_localstatedir}/log/clamav/
+ touch %{buildroot}%{_localstatedir}/log/clamav/freshclam.log
+@@ -345,8 +316,6 @@
+ %doc %{_mandir}/man1/clamscan.1*
+ %doc %{_mandir}/man1/freshclam.1*
+ %doc %{_mandir}/man5/freshclam.conf.5*
+-%doc %{_prefix}/share/clamav/README.clamd-wrapper
+-%{_prefix}/share/clamav/clamd-wrapper
+ %config(noreplace) %{_sysconfdir}/freshclam.conf
+ %{_bindir}/clamscan
+ %{_bindir}/freshclam
+@@ -366,10 +335,12 @@
+ %config(noreplace) %{_sysconfdir}/clamd.conf
+ %config(noreplace) %{_sysconfdir}/logrotate.d/clamav
+ %{_sysconfdir}/clamd.d
+-%config %{_initrddir}/clamd
++%config %{_initrddir}/clamav
+ %{_sbindir}/clamd
+ %{_bindir}/clamconf
+ %{_bindir}/clamdscan
++%doc %{_prefix}/share/clamav/README.clamd-wrapper
++%{_prefix}/share/clamav/clamd*
+
+ %defattr(0644, clam, clam, 0755)
+ %{_localstatedir}/run/clamav/
+@@ -409,6 +380,10 @@
+ %exclude %{_libdir}/libclamav.la
+
+ %changelog
++* Fri Nov 25 2011 Philip Prindeville <philipp(a)fedoraproject.org> - 0.97.3-2
++- Add missing clamd-wrapper supporting files
++- Remove from init script the unused CLAMD_SOCKET variable
++
+ * Tue Oct 18 2011 Nick Bebout <nb(a)fedoraproject.org> - 0.97.3-1
+ - Update to 0.97.3
+ - Fix CVE-2011-3627 clamav: Recursion level crash fixed in v0.97.3
diff --git a/clamd-wrapper b/clamd-wrapper
new file mode 100644
index 0000000..000dcb8
--- /dev/null
+++ b/clamd-wrapper
@@ -0,0 +1,86 @@
+#!/bin/bash
+#
+# chkconfig: - 75 25
+# description: The clamd daemon listens for incoming connections on \
+# Unix or TCP socket and scans files or directories on demand.
+
+[ -n "$CLAMD_SERVICE" ] || {
+ echo $"*** $0 can not be called in this way"
+ echo $"*** Please see /usr/share/doc/clamav-server-*/README how"
+ echo $"*** the clamav-server can be configured"
+ exit 6
+}
+
+# Source function library.
+. /etc/init.d/functions
+
+# Get config.
+[ -r /etc/sysconfig/network ] && . /etc/sysconfig/network
+
+# Check that networking is up.
+[ "$NETWORKING" != "no" ] || exit 6
+
+lockfile=/var/lock/subsys/clamd.${CLAMD_SERVICE}
+sysconffile=/etc/sysconfig/clamd.${CLAMD_SERVICE}
+procname=clamd.${CLAMD_SERVICE}
+
+CLAMD_CONFIGFILE=/etc/clamd.d/${CLAMD_SERVICE}.conf
+CLAMD_OPTIONS=
+[ -f "$sysconffile" ] && . "$sysconffile"
+CLAMD_PIDFILE=`grep ^PidFile ${CLAMD_CONFIGFILE} | awk '{print $2}'`
+
+# make sure that config file contains a PidFile setting
+[ -n "$CLAMD_PIDFILE" ] || exit 6
+
+RETVAL=0
+prog="clamd.${CLAMD_SERVICE}"
+
+start () {
+ echo -n $"Starting $prog: "
+ daemon --pidfile=${CLAMD_PIDFILE} \
+ exec -a $procname /usr/sbin/clamd \
+ ${CLAMD_CONFIGFILE:+-c $CLAMD_CONFIGFILE} ${CLAMD_OPTIONS} --pid ${CLAMD_PIDFILE}
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && touch $lockfile
+ return $RETVAL
+}
+
+stop () {
+ echo -n $"Stopping $prog: "
+ killproc -p ${CLAMD_PIDFILE} $procname
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && rm -f $lockfile
+ return $RETVAL
+}
+
+reload() {
+ rc=0
+ echo -n $"Reloading $prog: "
+ killproc -p ${CLAMD_PIDFILE} $procname -SIGHUP || rc=$?
+ echo
+ echo -n $"Loading new virus-database: "
+ killproc -p ${CLAMD_PIDFILE} $procname -SIGUSR2 || rc=$?
+ echo
+ return $rc
+}
+
+restart () {
+ stop
+ start
+}
+
+# See how we were called.
+case "$1" in
+ start|stop|restart|reload)
+ $1 ;;
+ status)
+ status -p ${CLAMD_PIDFILE} $procname ;;
+ condrestart)
+ [ ! -f $lockfile ] || restart
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
+ exit 2
+esac
diff --git a/clamd.init b/clamd.init
new file mode 100644
index 0000000..cf25b46
--- /dev/null
+++ b/clamd.init
@@ -0,0 +1,18 @@
+#!/bin/bash
+#
+# chkconfig: - 75 35
+#
+# description: The clamd server running for <SERVICE>
+#
+
+CLAMD_SERVICE=<SERVICE>
+. /usr/share/clamav/clamd-wrapper
+#!/bin/bash
+#
+# chkconfig: - 75 35
+#
+# description: The clamd server running for <SERVICE>
+#
+
+CLAMD_SERVICE=<SERVICE>
+. /usr/share/clamav/clamd-wrapper
diff --git a/clamd.logrotate b/clamd.logrotate
new file mode 100644
index 0000000..b233f3a
--- /dev/null
+++ b/clamd.logrotate
@@ -0,0 +1,8 @@
+%{_localstatedir}/log/clamav/clamd.log {
+ missingok
+ notifempty
+ create 644 clam clam
+ postrotate
+ killall -HUP clamd 2>/dev/null || :
+ endscript
+}
diff --git a/clamd.sysconfig b/clamd.sysconfig
new file mode 100644
index 0000000..e0e7714
--- /dev/null
+++ b/clamd.sysconfig
@@ -0,0 +1,5 @@
+#CLAMD_CONFIGFILE=/etc/clamd.d/${CLAMD_SERVICE}.conf
+#CLAMD_OPTIONS=
+## the values below should only ever be specified in the above .conf file!
+#CLAMD_SOCKET=/var/run/clamd.${CLAMD_SERVICE}/clamd.sock
+#CLAMD_PIDFILE=/var/run/clamd.${CLAMD_SERVICE}/clamd.pid
diff --git a/freshclam.cron b/freshclam.cron
new file mode 100644
index 0000000..558a2f2
--- /dev/null
+++ b/freshclam.cron
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+### A simple update script for the clamav virus database.
+### This could as well be replaced by a SysV script.
+
+### fix log file if needed
+LOG_FILE="%{_localstatedir}/log/clamav/freshclam.log"
+if [ ! -f "$LOG_FILE" ]; then
+ touch "$LOG_FILE"
+ chmod 644 "$LOG_FILE"
+ chown clam.clam "$LOG_FILE"
+fi
+
+%{_bindir}/freshclam \
+ --quiet \
+ --datadir="%{_localstatedir}/lib/clamav" \
+ --log="$LOG_FILE"
+#!/bin/sh
+
+### A simple update script for the clamav virus database.
+### This could as well be replaced by a SysV script.
+
+### fix log file if needed
+LOG_FILE="%{_localstatedir}/log/clamav/freshclam.log"
+if [ ! -f "$LOG_FILE" ]; then
+ touch "$LOG_FILE"
+ chmod 644 "$LOG_FILE"
+ chown clam.clam "$LOG_FILE"
+fi
+
+%{_bindir}/freshclam \
+ --quiet \
+ --datadir="%{_localstatedir}/lib/clamav" \
+ --log="$LOG_FILE"
diff --git a/freshclam.logrotate b/freshclam.logrotate
new file mode 100644
index 0000000..5a5615a
--- /dev/null
+++ b/freshclam.logrotate
@@ -0,0 +1,10 @@
+%{_localstatedir}/log/clamav/freshclam.log {
+ missingok
+ notifempty
+ create 644 clam clam
+}
+%{_localstatedir}/log/clamav/freshclam.log {
+ missingok
+ notifempty
+ create 644 clam clam
+}
diff --git a/sources b/sources
index 47b00bc..05755a5 100644
--- a/sources
+++ b/sources
@@ -1,2 +1 @@
b319a3f31a16811f1a92d63cda592521 clamav-0.97.3-norar.tar.xz
-e809f74ed139df2e4af3fafbca32f678 clamd-wrapper.tar.bz2
commit 813ca6cc8c152e9fc9583c5f0acb9e3b35d347d6
Author: Nick Bebout <nb(a)fedoraproject.org>
Date: Tue Oct 18 20:09:36 2011 -0500
Add Makefile to make clean tarball
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..ec42490
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,14 @@
+MAKEFILE_COMMON = $(HOME)/.fedora/common.mk
+-include $(MAKEFILE_COMMON)
+
+# can not use final tarball name here as it will conflict with rules
+# within Makefile.common
+TARBALL_CLEAN = ${NAME}-${VERSION}-norar.tar.xz.tmp
+TARBALL = ${NAME}-${VERSION}.tar.gz
+
+clean-sources: ${TARBALL_CLEAN}
+
+${TARBALL_CLEAN}: ${TARBALL}
+ rm -f $@.tmp
+ zcat $< | tar --delete -f - '*/libclamunrar/*' | xz -c > $@.tmp
+ mv $@.tmp $@
commit f79a6d54a0d97f0b0acefa78c4819180994fd075
Author: Nick Bebout <nb(a)fedoraproject.org>
Date: Tue Oct 18 20:09:21 2011 -0500
Re-add clamd-wrapper.tar.bz2
diff --git a/sources b/sources
index 05755a5..47b00bc 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
b319a3f31a16811f1a92d63cda592521 clamav-0.97.3-norar.tar.xz
+e809f74ed139df2e4af3fafbca32f678 clamd-wrapper.tar.bz2
commit 603c6c9dae1038fe7597a83a33fee2d075710c05
Author: Nick Bebout <nb(a)fedoraproject.org>
Date: Tue Oct 18 19:55:14 2011 -0500
Upgrade to 0.97.3, fixing a CVE
diff --git a/.gitignore b/.gitignore
index a3ff7cc..b09a0a5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
/clamav-0.97.2-norar.tar.xz
/clamav-0.97.3.tar.gz
/clamd-wrapper.tar.bz2
+/clamav-0.97.3-norar.tar.xz
diff --git a/clamav.spec b/clamav.spec
index 5ca4752..bd8c933 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -4,15 +4,15 @@
Summary: Anti-virus software
Name: clamav
-Version: 0.97.2
-Release: 5%{?dist}
+Version: 0.97.3
+Release: 1%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
# Upstream source includes libunrar that is not distributable.
#Source: http://downloads.sourceforge.net/clamav/clamav-%{version}.tar.gz
-Source0: clamav-0.97.2-norar.tar.xz
+Source0: clamav-0.97.3-norar.tar.xz
Source1: clamav.init
Source2: clamav-milter.init
Source3: clamd-wrapper.tar.bz2
@@ -409,6 +409,10 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Tue Oct 18 2011 Nick Bebout <nb(a)fedoraproject.org> - 0.97.3-1
+- Update to 0.97.3
+- Fix CVE-2011-3627 clamav: Recursion level crash fixed in v0.97.3
+
* Thu Aug 4 2011 Jan-Frode Myklebuust <janfrode(a)tanso.net> - 0.97.2-5
- Configure MilterSocket, PidFile and MilterSocket in clamav-milter.conf.
(bz#727894)
diff --git a/sources b/sources
index 784e26c..05755a5 100644
--- a/sources
+++ b/sources
@@ -1,2 +1 @@
-c41b2314d1b6b11f091955255dfa23f5 clamav-0.97.2-norar.tar.xz
-e809f74ed139df2e4af3fafbca32f678 clamd-wrapper.tar.bz2
+b319a3f31a16811f1a92d63cda592521 clamav-0.97.3-norar.tar.xz
commit a9247006483c53e986707cc19b0f2c224cd14c7b
Author: Nick Bebout <nb(a)fedoraproject.org>
Date: Tue Oct 18 19:34:24 2011 -0500
Remove clamav tarball from git
diff --git a/.gitignore b/.gitignore
index e230f1a..a3ff7cc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
/clamav-0.97.2-norar.tar.xz
+/clamav-0.97.3.tar.gz
/clamd-wrapper.tar.bz2
diff --git a/clamav-0.97-clean.tar.bz2 b/clamav-0.97-clean.tar.bz2
deleted file mode 100644
index 9d39f27..0000000
Binary files a/clamav-0.97-clean.tar.bz2 and /dev/null differ
commit 96fb7210c39ec20d51155510e7e2565c62178638
Author: Jan-Frode Myklebust <janfrode(a)tanso.net>
Date: Thu Aug 4 10:14:11 2011 +0200
Make substitutions a little more explicit.
diff --git a/clamav.spec b/clamav.spec
index b4cde09..5ca4752 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -5,7 +5,7 @@
Summary: Anti-virus software
Name: clamav
Version: 0.97.2
-Release: 4%{?dist}
+Release: 5%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
@@ -166,8 +166,8 @@ xz -dc %{SOURCE0} | (cd .. ; tar xvvf -)
%{__perl} -pi.orig -e '
s|^(Example)|#$1|;
s|^#(User) .+$|$1 clam|;
- s|#MilterSocket inet.+$|MilterSocket /var/run/clamav/clamav-milter.sock|;
- s|#PidFile .+$|PidFile /var/run/clamav/clamav-milter.pid|;
+ s|^#(MilterSocket) inet.+$|$1 /var/run/clamav/clamav-milter.sock|;
+ s|^#(PidFile) .+$|$1 /var/run/clamav/clamav-milter.pid|;
s|^#(ClamdSocket) .+$|$1 unix:%{_localstatedir}/run/clamav/clamd.sock|;
' etc/clamav-milter.conf
@@ -409,7 +409,7 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
-* Thu Aug 4 2011 Jan-Frode Myklebuust <janfrode(a)tanso.net> - 0.97.2-4
+* Thu Aug 4 2011 Jan-Frode Myklebuust <janfrode(a)tanso.net> - 0.97.2-5
- Configure MilterSocket, PidFile and MilterSocket in clamav-milter.conf.
(bz#727894)
commit 3ebb6ff6bf713936d55085d2cfee375e475b0d52
Author: Jan-Frode Myklebust <janfrode(a)tanso.net>
Date: Thu Aug 4 10:10:19 2011 +0200
Configure MilterSocket, PidFile and MilterSocket in
clamav-milter.conf (bz#727894).
diff --git a/clamav.spec b/clamav.spec
index 567babb..b4cde09 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -5,7 +5,7 @@
Summary: Anti-virus software
Name: clamav
Version: 0.97.2
-Release: 3%{?dist}
+Release: 4%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
@@ -166,7 +166,9 @@ xz -dc %{SOURCE0} | (cd .. ; tar xvvf -)
%{__perl} -pi.orig -e '
s|^(Example)|#$1|;
s|^#(User) .+$|$1 clam|;
- s|^#(ClamdSocket) .+$|$1 %{_localstatedir}/run/clamav/clamd.sock|;
+ s|#MilterSocket inet.+$|MilterSocket /var/run/clamav/clamav-milter.sock|;
+ s|#PidFile .+$|PidFile /var/run/clamav/clamav-milter.pid|;
+ s|^#(ClamdSocket) .+$|$1 unix:%{_localstatedir}/run/clamav/clamd.sock|;
' etc/clamav-milter.conf
@@ -407,6 +409,10 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Thu Aug 4 2011 Jan-Frode Myklebuust <janfrode(a)tanso.net> - 0.97.2-4
+- Configure MilterSocket, PidFile and MilterSocket in clamav-milter.conf.
+ (bz#727894)
+
* Wed Jul 27 2011 Jan-Frode Myklebuust <janfrode(a)tanso.net> - 0.97.2-3
- include updated clamd-wrapper which get the PidFile setting from the
service configuration file.
commit ae959928b685373bbd37a4b9d933f26ef5d2cc46
Author: Jan-Frode Myklebust <janfrode(a)tanso.net>
Date: Wed Jul 27 10:03:06 2011 +0200
Handle xz archive SOURCE0 for rpmbuild on RHEL < 6.
diff --git a/clamav.spec b/clamav.spec
index 234273a..567babb 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -5,7 +5,7 @@
Summary: Anti-virus software
Name: clamav
Version: 0.97.2
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
@@ -109,7 +109,9 @@ documentation for %{name}. If you like to develop programs using %{name},
you will need to install %{name}-devel.
%prep
-%setup -q
+# Handle that rpmbuild in RHEL < 6 doesn't handle xz archives automatically.
+%setup -q -T -c
+xz -dc %{SOURCE0} | (cd .. ; tar xvvf -)
%{__perl} -pi.orig -e 's|/lib\b|/%{_lib}|g;' libtool configure
@@ -405,11 +407,9 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
-* Wed Jul 27 2011 Jan-Frode Myklebuust <janfrode(a)tanso.net> - 0.97.2-2
+* Wed Jul 27 2011 Jan-Frode Myklebuust <janfrode(a)tanso.net> - 0.97.2-3
- include updated clamd-wrapper which get the PidFile setting from the
service configuration file.
-
-* Wed Jul 27 2011 Jan-Frode Myklebuust <janfrode(a)tanso.net> - 0.97.2-1
- updated to 0.97.2
- Build-require xz
- CVE-2011-2721 Off-by-one error by scanning message hashes (#725694)
commit 7d5029a51e1c38d678117c1191668639a5a39d40
Author: Jan-Frode Myklebust <janfrode(a)tanso.net>
Date: Wed Jul 27 08:52:51 2011 +0200
Include Jeroen van Meeuwen's updated clamd-wrapper which get the
PidFile setting from the service configuration file.
diff --git a/clamav.spec b/clamav.spec
index d49bb8f..234273a 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -5,7 +5,7 @@
Summary: Anti-virus software
Name: clamav
Version: 0.97.2
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
@@ -405,6 +405,10 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Wed Jul 27 2011 Jan-Frode Myklebuust <janfrode(a)tanso.net> - 0.97.2-2
+- include updated clamd-wrapper which get the PidFile setting from the
+ service configuration file.
+
* Wed Jul 27 2011 Jan-Frode Myklebuust <janfrode(a)tanso.net> - 0.97.2-1
- updated to 0.97.2
- Build-require xz
diff --git a/sources b/sources
index d15b018..784e26c 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
c41b2314d1b6b11f091955255dfa23f5 clamav-0.97.2-norar.tar.xz
-ae4e25e5df41b71cf6541e3a876b94a7 clamd-wrapper.tar.bz2
+e809f74ed139df2e4af3fafbca32f678 clamd-wrapper.tar.bz2
commit 6fcce5b69503ef555029fea998fe39c8623d0c68
Author: Jan-Frode Myklebust <janfrode(a)tanso.net>
Date: Wed Jul 27 08:38:13 2011 +0200
Update sources to include clamav-0.97.1-norar.tar.xz
diff --git a/sources b/sources
index 27407d3..d15b018 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-44e7df79718d104db0666d5db3f08682 clamav-0.97-clean.tar.bz2
+c41b2314d1b6b11f091955255dfa23f5 clamav-0.97.2-norar.tar.xz
ae4e25e5df41b71cf6541e3a876b94a7 clamd-wrapper.tar.bz2
commit 6170551529bdcc1510dc70d529b45d7073b7bc42
Author: Jan-Frode Myklebust <janfrode(a)tanso.net>
Date: Wed Jul 27 08:36:42 2011 +0200
- updated to 0.97.2
- Build-require xz
- CVE-2011-2721 Off-by-one error by scanning message hashes (#725694)
diff --git a/.gitignore b/.gitignore
index bf9c05a..e230f1a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,2 @@
-/clamav-0.97-clean.tar.bz2
+/clamav-0.97.2-norar.tar.xz
/clamd-wrapper.tar.bz2
diff --git a/clamav.spec b/clamav.spec
index 8bb9614..d49bb8f 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -4,21 +4,21 @@
Summary: Anti-virus software
Name: clamav
-Version: 0.97
-Release: 14%{?dist}
+Version: 0.97.2
+Release: 1%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
# Upstream source includes libunrar that is not distributable.
#Source: http://downloads.sourceforge.net/clamav/clamav-%{version}.tar.gz
-Source0: clamav-0.97-clean.tar.bz2
+Source0: clamav-0.97.2-norar.tar.xz
Source1: clamav.init
Source2: clamav-milter.init
Source3: clamd-wrapper.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: bzip2-devel, zlib-devel, gmp-devel, curl-devel
+BuildRequires: bzip2-devel, zlib-devel, gmp-devel, curl-devel, xz
%{!?_without_milter:BuildRequires: sendmail-devel >= 8.12}
Requires: clamav-db = %{version}-%{release}
Requires(pre): shadow-utils
@@ -356,6 +356,7 @@ rm -rf %{buildroot}
%doc %{_mandir}/man1/clamdscan.1*
%doc %{_mandir}/man1/clamconf.1*
%doc %{_mandir}/man1/clamdtop.1*
+%doc %{_mandir}/man1/clambc.1*
%doc %{_mandir}/man5/clamd.conf.5*
%doc %{_mandir}/man8/clamd.8*
%config(noreplace) %{_sysconfdir}/clamd.conf
@@ -404,6 +405,11 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Wed Jul 27 2011 Jan-Frode Myklebuust <janfrode(a)tanso.net> - 0.97.2-1
+- updated to 0.97.2
+- Build-require xz
+- CVE-2011-2721 Off-by-one error by scanning message hashes (#725694)
+
* Wed Jun 29 2011 Nick Bebout <nb(a)fedoraproject.org> - 0.97-14
- Require /usr/sbin/sendmail instead of sendmail
commit 1391380976a7514bf46af8366673b4223013365b
Author: Nick Bebout <nb(a)fedoraproject.org>
Date: Wed Jun 29 18:54:08 2011 -0500
Require /usr/sbin/sendmail instead of sendmail
diff --git a/clamav.spec b/clamav.spec
index 2af6305..8bb9614 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -5,7 +5,7 @@
Summary: Anti-virus software
Name: clamav
Version: 0.97
-Release: 13%{?dist}
+Release: 14%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
@@ -64,7 +64,7 @@ The Clam AntiVirus Daemon
Summary: The Clam AntiVirus sendmail-milter Daemon
Group: Applications/System
Requires: clamd = %{version}-%{release}
-Requires: sendmail
+Requires: /usr/sbin/sendmail
Provides: clamav-milter-sysv = %{version}-%{release}
Obsoletes: clamav-milter-sysv < %{version}-%{release}
Provides: clamav-milter-sysvinit = %{version}-%{release}
@@ -404,6 +404,9 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Wed Jun 29 2011 Nick Bebout <nb(a)fedoraproject.org> - 0.97-14
+- Require /usr/sbin/sendmail instead of sendmail
+
* Tue Apr 26 2011 Jan-Frode Myklebust <janfrode(a)tanso.net> - 0.97-13
- Obsolete and provide clamav-milter-sysvinit (bz#696856)
commit 833c6c9f451b4f48b64d5c53d773b21016d091cc
Author: Jan-Frode Myklebust <janfrode(a)tanso.net>
Date: Tue Apr 26 08:53:58 2011 +0200
Obsolete and provide clamav-milter-sysvinit (bz#696856).
diff --git a/clamav.spec b/clamav.spec
index c1fa39f..2af6305 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -5,7 +5,7 @@
Summary: Anti-virus software
Name: clamav
Version: 0.97
-Release: 12%{?dist}
+Release: 13%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
@@ -67,6 +67,8 @@ Requires: clamd = %{version}-%{release}
Requires: sendmail
Provides: clamav-milter-sysv = %{version}-%{release}
Obsoletes: clamav-milter-sysv < %{version}-%{release}
+Provides: clamav-milter-sysvinit = %{version}-%{release}
+Obsoletes: clamav-milter-sysvinit < %{version}-%{release}
%description milter
The Clam AntiVirus sendmail-milter Daemon
@@ -402,6 +404,9 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Tue Apr 26 2011 Jan-Frode Myklebust <janfrode(a)tanso.net> - 0.97-13
+- Obsolete and provide clamav-milter-sysvinit (bz#696856)
+
* Wed Mar 30 2011 Jan-Frode Myklebust <janfrode(a)tanso.net> - 0.97-12
- Move deletion of /var/lib/clamav/mirrors.dat to db package.
- Don't enable NotifyClamd in freshclam config and cronjob, as not
commit c6b6666973bc259d9160f1894f026e5902328c42
Author: Jan-Frode Myklebust <janfrode(a)tanso.net>
Date: Wed Mar 30 12:17:31 2011 +0200
* Wed Mar 30 2011 Jan-Frode Myklebust <janfrode(a)tanso.net> - 0.97-12
- Move deletion of /var/lib/clamav/mirrors.dat to db package.
- Don't enable NotifyClamd in freshclam config and cronjob, as not
everybody is running clamd. Running clamd's will anyway notice
when db is updated.
diff --git a/clamav.spec b/clamav.spec
index 4d7776f..c1fa39f 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -5,7 +5,7 @@
Summary: Anti-virus software
Name: clamav
Version: 0.97
-Release: 11%{?dist}
+Release: 12%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
@@ -157,7 +157,6 @@ you will need to install %{name}-devel.
s|^#(LogSyslog)|$1|;
s|^#(DatabaseOwner) .+$|$1 clam|;
s|^(Checks) .+$|$1 24|;
- s|^#(NotifyClamd) .+$|$1 %{_sysconfdir}/clamd.conf|;
' etc/freshclam.conf
%{__perl} -pi.orig -e '
@@ -203,8 +202,7 @@ fi
%{_bindir}/freshclam \
--quiet \
--datadir="%{_localstatedir}/lib/clamav" \
- --log="$LOG_FILE" \
- --daemon-notify="%{_sysconfdir}/clamd.conf"
+ --log="$LOG_FILE"
EOF
%{__cat} <<EOF >clamav-milter.sysconfig
@@ -258,10 +256,6 @@ install -d -m0755 %{buildroot}%{_localstatedir}/run/clamav/
install -d -m0755 %{buildroot}%{_sysconfdir}/clamd.d/
%post
-# Remove old mirrors.dat, mostly because it will have the wrong
-# owner after upgrading from clamav < 0.97:
-test -f /var/lib/clamav/mirrors.dat && rm -f /var/lib/clamav/mirrors.dat
-
/sbin/ldconfig
ZONES="/usr/share/zoneinfo/zone.tab"
@@ -328,6 +322,12 @@ useradd -r -g clam -d /var/clamav -s /sbin/nologin \
-c "Clam Anti Virus Checker" clam
exit 0
+%post db
+# Remove old mirrors.dat, mostly because it will have the wrong
+# owner after upgrading from clamav < 0.97:
+test -f /var/lib/clamav/mirrors.dat && rm -f /var/lib/clamav/mirrors.dat
+exit 0
+
%clean
rm -rf %{buildroot}
@@ -402,6 +402,12 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Wed Mar 30 2011 Jan-Frode Myklebust <janfrode(a)tanso.net> - 0.97-12
+- Move deletion of /var/lib/clamav/mirrors.dat to db package.
+- Don't enable NotifyClamd in freshclam config and cronjob, as not
+ everybody is running clamd. Running clamd's will anyway notice
+ when db is updated.
+
* Fri Mar 18 2011 Jan-Frode Myklebust <janfrode(a)tanso.net> - 0.97-11
- Delete /var/lib/clamav/mirrors.dat, it will be recreated on first run.
- clamav-milter config cleanups.
commit 0de58a44516ae5ea2eab503715ab5ea2fb9bf4a7
Author: Jan-Frode Myklebust <janfrode(a)tanso.net>
Date: Fri Mar 18 09:05:10 2011 +0100
Milter cleanups after problems reported in bz#579370.
Delete mirrors.dat in %post since I see no other way of getting
the permissions correct.
diff --git a/clamav-milter.init b/clamav-milter.init
index f87efa7..347fe4b 100644
--- a/clamav-milter.init
+++ b/clamav-milter.init
@@ -25,7 +25,7 @@ test -f /etc/sysconfig/clamav-milter && . /etc/sysconfig/clamav-milter
case "$1" in
start)
echo -n "Starting Clamav Milter Daemon: "
- daemon clamav-milter $CLAMAV_FLAGS $SOCKET_ADDRESS
+ daemon clamav-milter $CLAMAV_FLAGS
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/clamav-milter
diff --git a/clamav.spec b/clamav.spec
index 90e38b4..4d7776f 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -5,7 +5,7 @@
Summary: Anti-virus software
Name: clamav
Version: 0.97
-Release: 10%{?dist}
+Release: 11%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
@@ -160,6 +160,13 @@ you will need to install %{name}-devel.
s|^#(NotifyClamd) .+$|$1 %{_sysconfdir}/clamd.conf|;
' etc/freshclam.conf
+%{__perl} -pi.orig -e '
+ s|^(Example)|#$1|;
+ s|^#(User) .+$|$1 clam|;
+ s|^#(ClamdSocket) .+$|$1 %{_localstatedir}/run/clamav/clamd.sock|;
+ ' etc/clamav-milter.conf
+
+
cat <<EOF >clamd.logrotate
%{_localstatedir}/log/clamav/clamd.log {
missingok
@@ -204,9 +211,7 @@ EOF
### Simple config file for clamav-milter, you should
### read the documentation and tweak it as you wish.
-CLAMAV_FLAGS="
- --config-file=%{_sysconfdir}/clamd.conf
-"
+CLAMAV_FLAGS=""
EOF
%build
@@ -252,12 +257,11 @@ touch %{buildroot}%{_localstatedir}/log/clamav/clamd.log
install -d -m0755 %{buildroot}%{_localstatedir}/run/clamav/
install -d -m0755 %{buildroot}%{_sysconfdir}/clamd.d/
-# mirrors.dat might exists with the wrong user on upgrades from pre v0.97,
-# touch it here, and later %ghost it so that the permissions are fixed if needed.
-touch %{buildroot}%{_localstatedir}/lib/clamav/mirrors.dat
-
-
%post
+# Remove old mirrors.dat, mostly because it will have the wrong
+# owner after upgrading from clamav < 0.97:
+test -f /var/lib/clamav/mirrors.dat && rm -f /var/lib/clamav/mirrors.dat
+
/sbin/ldconfig
ZONES="/usr/share/zoneinfo/zone.tab"
@@ -387,7 +391,6 @@ rm -rf %{buildroot}
%config(noreplace) %verify(user group mode) %{_localstatedir}/lib/clamav/
%dir %{_localstatedir}/log/clamav/
%ghost %{_localstatedir}/log/clamav/freshclam.log
-%ghost %{_localstatedir}/lib/clamav/mirrors.dat
%files devel
%defattr(-, root, root, 0755)
@@ -399,6 +402,10 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Fri Mar 18 2011 Jan-Frode Myklebust <janfrode(a)tanso.net> - 0.97-11
+- Delete /var/lib/clamav/mirrors.dat, it will be recreated on first run.
+- clamav-milter config cleanups.
+
* Wed Mar 16 2011 Jan-Frode Myklebust <janfrode(a)tanso.net> - 0.97-10
- Make sure /var/lib/clamav/mirrors.dat has owner fixed on upgrade.
- Don't start clamd or milter service by default.
commit 86972941e69b28303796b75b36f923ed94c37d88
Author: Jan-Frode Myklebust <janfrode(a)tanso.net>
Date: Thu Mar 17 10:12:35 2011 +0100
- Make sure /var/lib/clamav/mirrors.dat has owner fixed on upgrade.
- Don't start clamd or milter service by default.
diff --git a/clamav.spec b/clamav.spec
index a756493..90e38b4 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -5,7 +5,7 @@
Summary: Anti-virus software
Name: clamav
Version: 0.97
-Release: 9%{?dist}
+Release: 10%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
@@ -252,6 +252,11 @@ touch %{buildroot}%{_localstatedir}/log/clamav/clamd.log
install -d -m0755 %{buildroot}%{_localstatedir}/run/clamav/
install -d -m0755 %{buildroot}%{_sysconfdir}/clamd.d/
+# mirrors.dat might exists with the wrong user on upgrades from pre v0.97,
+# touch it here, and later %ghost it so that the permissions are fixed if needed.
+touch %{buildroot}%{_localstatedir}/lib/clamav/mirrors.dat
+
+
%post
/sbin/ldconfig
@@ -382,6 +387,7 @@ rm -rf %{buildroot}
%config(noreplace) %verify(user group mode) %{_localstatedir}/lib/clamav/
%dir %{_localstatedir}/log/clamav/
%ghost %{_localstatedir}/log/clamav/freshclam.log
+%ghost %{_localstatedir}/lib/clamav/mirrors.dat
%files devel
%defattr(-, root, root, 0755)
@@ -393,6 +399,10 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Wed Mar 16 2011 Jan-Frode Myklebust <janfrode(a)tanso.net> - 0.97-10
+- Make sure /var/lib/clamav/mirrors.dat has owner fixed on upgrade.
+- Don't start clamd or milter service by default.
+
* Tue Mar 15 2011 Jan-Frode Myklebust <janfrode(a)tanso.net> - 0.97-7
- rpm-provide all old package names that are now obsoleted
commit adb58860131bf63581ba9483ecb8440688b280dc
Author: Jan-Frode Myklebust <janfrode(a)tanso.net>
Date: Tue Mar 15 18:23:41 2011 +0100
Don't enable services by default.
diff --git a/clamav-milter.init b/clamav-milter.init
index 62a2f91..f87efa7 100644
--- a/clamav-milter.init
+++ b/clamav-milter.init
@@ -2,7 +2,7 @@
#
# Startup script for the Clamav Milter Daemon
#
-# chkconfig: 2345 77 23
+# chkconfig: - 77 23
# description: clamav-milter is a daemon which hooks into sendmail \
# and routes email messages to clamav.
# processname: clamav-milter
diff --git a/clamav.init b/clamav.init
index 0e001fb..848dbce 100755
--- a/clamav.init
+++ b/clamav.init
@@ -2,7 +2,7 @@
#
# Startup script for the Clam AntiVirus Daemon
#
-# chkconfig: 2345 61 39
+# chkconfig: - 61 39
# description: Clam AntiVirus Daemon is a TCP/IP or socket protocol \
# server.
# processname: clamd
commit a8bbda52841301f275ac0ad885e98ba0ae31e3e4
Author: Jan-Frode Myklebust <janfrode(a)tanso.net>
Date: Tue Mar 15 15:11:59 2011 +0100
Remove broken or deprecated milter and freshclam options.
diff --git a/clamav.spec b/clamav.spec
index c5573ef..a756493 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -5,7 +5,7 @@
Summary: Anti-virus software
Name: clamav
Version: 0.97
-Release: 8%{?dist}
+Release: 9%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
@@ -197,7 +197,6 @@ fi
--quiet \
--datadir="%{_localstatedir}/lib/clamav" \
--log="$LOG_FILE" \
- --log-verbose \
--daemon-notify="%{_sysconfdir}/clamd.conf"
EOF
@@ -207,14 +206,7 @@ EOF
CLAMAV_FLAGS="
--config-file=%{_sysconfdir}/clamd.conf
- --force-scan
- --local
- --max-children=10
- --noreject
- --outgoing
- --quiet
"
-SOCKET_ADDRESS="local:%{_localstatedir}/run/clamav/clmilter.socket"
EOF
%build
commit a89e6fd21e435b5cec12d136672b4ce32a859c46
Author: Jan-Frode Myklebust <janfrode(a)tanso.net>
Date: Tue Mar 15 11:20:34 2011 +0100
Obsolete clamav-filesystem in clamav-db package, since this
is the first package in the installation chain -- and hopefull
this should fix the dependency problem with old clamav-filesystem.
diff --git a/clamav.spec b/clamav.spec
index 4827933..c5573ef 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -5,7 +5,7 @@
Summary: Anti-virus software
Name: clamav
Version: 0.97
-Release: 7%{?dist}
+Release: 8%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
@@ -28,8 +28,6 @@ Provides: libclamav
Obsoletes: libclamav < %{version}-%{release}
Provides: clamav-lib = %{version}-%{release}
Obsoletes: clamav-lib < %{version}-%{release}
-Provides: clamav-filesystem = %{version}-%{release}
-Obsoletes: clamav-filesystem < %{version}-%{release}
%description
Clam AntiVirus is a GPL anti-virus toolkit for UNIX. The main purpose of
@@ -85,6 +83,10 @@ Obsoletes: clamav-update < %{version}-%{release}
Provides: clamav-data = %{version}-%{release}
Obsoletes: clamav-data < %{version}-%{release}
Obsoletes: clamav-data-empty <= %{version}-%{release}
+# Ugly to put these in the db-package, but needed
+# here to handle upgrades on EL5.
+Provides: clamav-filesystem = %{version}-%{release}
+Obsoletes: clamav-filesystem < %{version}-%{release}
%description db
The actual virus database for %{name}
commit aebe2468a4b86955f41ce9ccb61a5236b8d9f481
Author: Jan-Frode Myklebust <janfrode(a)tanso.net>
Date: Tue Mar 15 10:39:53 2011 +0100
Provide all old package names that are now obsolete. Following
the packaging guideline at:
http://fedoraproject.org/wiki/PackageNamingGuidelines#Renaming.2Freplacin...
diff --git a/clamav.spec b/clamav.spec
index d587dac..4827933 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -5,7 +5,7 @@
Summary: Anti-virus software
Name: clamav
Version: 0.97
-Release: 6%{?dist}
+Release: 7%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
@@ -24,10 +24,12 @@ Requires: clamav-db = %{version}-%{release}
Requires(pre): shadow-utils
### Fedora Extras introduced them differently :(
+Provides: libclamav
Obsoletes: libclamav < %{version}-%{release}
+Provides: clamav-lib = %{version}-%{release}
Obsoletes: clamav-lib < %{version}-%{release}
+Provides: clamav-filesystem = %{version}-%{release}
Obsoletes: clamav-filesystem < %{version}-%{release}
-Provides: libclamav
%description
Clam AntiVirus is a GPL anti-virus toolkit for UNIX. The main purpose of
@@ -45,8 +47,17 @@ Group: System Environment/Daemons
Requires: clamav = %{version}-%{release}
### Fedora Extras introduced them differently :(
-Obsoletes: clamav-server <= %{version}-%{release}
-Obsoletes: clamav-server-sysv <= %{version}-%{release}
+Provides: clamav-server = %{version}-%{release}
+Obsoletes: clamav-server < %{version}-%{release}
+Provides: clamav-server-sysv = %{version}-%{release}
+Obsoletes: clamav-server-sysv < %{version}-%{release}
+Provides: clamav-scanner = %{version}-%{release}
+Obsoletes: clamav-scanner < %{version}-%{release}
+Provides: clamav-scanner-upstart = %{version}-%{release}
+Obsoletes: clamav-scanner-upstart < %{version}-%{release}
+Provides: clamav-server-sysvinit = %{version}-%{release}
+Obsoletes: clamav-server-sysvinit < %{version}-%{release}
+
%description -n clamd
The Clam AntiVirus Daemon
@@ -56,7 +67,8 @@ Summary: The Clam AntiVirus sendmail-milter Daemon
Group: Applications/System
Requires: clamd = %{version}-%{release}
Requires: sendmail
-Obsoletes: clamav-milter-sysv <= %{version}-%{release}
+Provides: clamav-milter-sysv = %{version}-%{release}
+Obsoletes: clamav-milter-sysv < %{version}-%{release}
%description milter
The Clam AntiVirus sendmail-milter Daemon
@@ -68,8 +80,10 @@ Group: Applications/Databases
#Requires: clamav = %{version}-%{release}
### Fedora Extras introduced them differently :(
-Obsoletes: clamav-update <= %{version}-%{release}
-Obsoletes: clamav-data <= %{version}-%{release}
+Provides: clamav-update = %{version}-%{release}
+Obsoletes: clamav-update < %{version}-%{release}
+Provides: clamav-data = %{version}-%{release}
+Obsoletes: clamav-data < %{version}-%{release}
Obsoletes: clamav-data-empty <= %{version}-%{release}
%description db
@@ -385,6 +399,9 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Tue Mar 15 2011 Jan-Frode Myklebust <janfrode(a)tanso.net> - 0.97-7
+- rpm-provide all old package names that are now obsoleted
+
* Mon Mar 14 2011 Jan-Frode Myklebust <janfrode(a)tanso.net> - 0.97-6
- clam-db obsoletes old clamav-data-empty.
diff --git a/clamd-wrapper b/clamd-wrapper
deleted file mode 100644
index 14c04a5..0000000
--- a/clamd-wrapper
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/bin/bash
-#
-# Xchkconfig: - 75 25
-# Xdescription: The clamd daemon listens for incoming connections on \
-# Unix or TCP socket and scans files or directories on demand.
-
-test "$CLAMD_SERVICE" || {
- echo $"*** $0 can not be called in this way"
- echo $"*** Please see /usr/share/doc/clamav-server-*/README how"
- echo $"*** the clamav-server can be configured"
- exit 6
-}
-
-# Source function library.
-. /etc/init.d/functions
-
-# Get config.
-test -r /etc/sysconfig/network && . /etc/sysconfig/network
-
-# Check that networking is up.
-test "$NETWORKING" != "no" || exit 6
-
-lockfile=/var/lock/subsys/clamd.${CLAMD_SERVICE}
-sysconffile=/etc/sysconfig/clamd.${CLAMD_SERVICE}
-procname=clamd.${CLAMD_SERVICE}
-
-CLAMD_CONFIGFILE=/etc/clamd.d/${CLAMD_SERVICE}.conf
-CLAMD_OPTIONS=
-## backward-compatibility check...
-for i in /var/run/clamd.${CLAMD_SERVICE}/clamd.sock \
- /var/run/clamav.${CLAMD_SERVICE}/clamd.sock; do
- CLAMD_SOCKET=$i
- test ! -e "$i" || break
-done
-test -f "$sysconffile" && . "$sysconffile"
-
-
-RETVAL=0
-prog="clamd.${CLAMD_SERVICE}"
-
-start () {
- echo -n $"Starting $prog: "
- daemon $procname ${CLAMD_CONFIGFILE:+-c $CLAMD_CONFIGFILE} ${CLAMD_OPTIONS}
- RETVAL=$?
- echo
- [ $RETVAL -eq 0 ] && touch $lockfile
- return $RETVAL
-}
-
-stop () {
- echo -n $"Stopping $prog: "
- killproc $procname
- RETVAL=$?
- echo
- [ $RETVAL -eq 0 ] && rm -f $lockfile
- return $RETVAL
-}
-
-reload() {
- rc=0
- echo -n $"Reloading $prog: "
- killproc $procname -SIGHUP || rc=$?
- echo
- echo -n $"Loading new virus-database: "
- killproc $procname -SIGUSR2 || rc=$?
- echo
- return $rc
-}
-
-restart () {
- stop
- start
-}
-
-# See how we were called.
-case "$1" in
- start|stop|restart|reload)
- $1 ;;
- status)
- status $procname ;;
- condrestart)
- test ! -f $lockfile || restart
- ;;
- *)
- echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
- exit 2
-esac
commit cf7db91a88bbba67a6a54ca6c23ec8bd0b7f774d
Author: Jan-Frode Myklebust <janfrode(a)tanso.net>
Date: Mon Mar 14 12:16:02 2011 +0100
Update release number.
diff --git a/clamav.spec b/clamav.spec
index 9f0499a..d587dac 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -5,7 +5,7 @@
Summary: Anti-virus software
Name: clamav
Version: 0.97
-Release: 5%{?dist}
+Release: 6%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
@@ -385,7 +385,7 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
-* Mon Mar 14 2011 Jan-Frode Myklebust <janfrode(a)tanso.net> - 0.97-5
+* Mon Mar 14 2011 Jan-Frode Myklebust <janfrode(a)tanso.net> - 0.97-6
- clam-db obsoletes old clamav-data-empty.
* Sun Mar 13 2011 Jan-Frode Myklebust <janfrode(a)tanso.net> - 0.97-4
commit a41ce1a97cd1767ba81ec794e455e25c7ab4660a
Author: Jan-Frode Myklebust <janfrode(a)tanso.net>
Date: Mon Mar 14 12:14:30 2011 +0100
clamav-data was already listed as obsolete..
diff --git a/clamav.spec b/clamav.spec
index 0fc3799..9f0499a 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -64,14 +64,13 @@ The Clam AntiVirus sendmail-milter Daemon
%package db
Summary: Virus database for %{name}
Group: Applications/Databases
-Obsoletes: clamav-data <= %{version}-%{release}
-Obsoletes: clamav-data-empty <= %{version}-%{release}
### Remove circular dependency
#Requires: clamav = %{version}-%{release}
### Fedora Extras introduced them differently :(
Obsoletes: clamav-update <= %{version}-%{release}
Obsoletes: clamav-data <= %{version}-%{release}
+Obsoletes: clamav-data-empty <= %{version}-%{release}
%description db
The actual virus database for %{name}
@@ -387,7 +386,7 @@ rm -rf %{buildroot}
%changelog
* Mon Mar 14 2011 Jan-Frode Myklebust <janfrode(a)tanso.net> - 0.97-5
-- clam-db obsoletes old clamav-data and clamav-data-empty.
+- clam-db obsoletes old clamav-data-empty.
* Sun Mar 13 2011 Jan-Frode Myklebust <janfrode(a)tanso.net> - 0.97-4
- Add back clamd-wrapper to stay compatible with users
commit e10bf12213c7977e02534f6d5ed364409e7f64dc
Author: Jan-Frode Myklebust <janfrode(a)tanso.net>
Date: Mon Mar 14 11:19:15 2011 +0100
Fix upgrade problem when clamav-data or clamav-data-empty
was installed. clamav-db obsoletes these.
diff --git a/clamav.spec b/clamav.spec
index f447f08..0fc3799 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -5,7 +5,7 @@
Summary: Anti-virus software
Name: clamav
Version: 0.97
-Release: 4%{?dist}
+Release: 5%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
@@ -64,6 +64,8 @@ The Clam AntiVirus sendmail-milter Daemon
%package db
Summary: Virus database for %{name}
Group: Applications/Databases
+Obsoletes: clamav-data <= %{version}-%{release}
+Obsoletes: clamav-data-empty <= %{version}-%{release}
### Remove circular dependency
#Requires: clamav = %{version}-%{release}
@@ -384,6 +386,9 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Mon Mar 14 2011 Jan-Frode Myklebust <janfrode(a)tanso.net> - 0.97-5
+- clam-db obsoletes old clamav-data and clamav-data-empty.
+
* Sun Mar 13 2011 Jan-Frode Myklebust <janfrode(a)tanso.net> - 0.97-4
- Add back clamd-wrapper to stay compatible with users
of old packaging (amavisd-new).
commit 44c852187fbb517dd9084ca7100404b6fed6d05c
Merge: 728c0a6 825f174
Author: Jan-Frode Myklebust <janfrode(a)tanso.net>
Date: Sun Mar 13 21:37:43 2011 +0100
Merge branch 'el6' into el5
Conflicts:
.gitignore
diff --cc .gitignore
index f6ee443,720667f..bf9c05a
--- a/.gitignore
+++ b/.gitignore
@@@ -1,6 -1,3 +1,2 @@@
- <<<<<<< HEAD
- clamav-0.95.1-norar.tar.bz2
- =======
--clamav-0.95.3-norar.tar.bz2
/clamav-0.97-clean.tar.bz2
- >>>>>>> el6
+ /clamd-wrapper.tar.bz2
commit 825f174a59a4b0a16e9b39a0ef524919f00f1f32
Author: Nick Bebout <nb(a)fedoraproject.org>
Date: Sun Mar 13 20:25:23 2011 +0000
Update spec, add clamav-wrapper source
diff --git a/.gitignore b/.gitignore
index cd2bf84..720667f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
clamav-0.95.3-norar.tar.bz2
/clamav-0.97-clean.tar.bz2
+/clamd-wrapper.tar.bz2
diff --git a/clamav.spec b/clamav.spec
index 824dacd..f447f08 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -5,7 +5,7 @@
Summary: Anti-virus software
Name: clamav
Version: 0.97
-Release: 3%{?dist}
+Release: 4%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
@@ -15,6 +15,7 @@ URL: http://www.clamav.net/
Source0: clamav-0.97-clean.tar.bz2
Source1: clamav.init
Source2: clamav-milter.init
+Source3: clamd-wrapper.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: bzip2-devel, zlib-devel, gmp-devel, curl-devel
@@ -232,6 +233,8 @@ install -Dp -m0644 clamav-milter.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/
%else
rm %{buildroot}%{_mandir}/man8/clamav-milter.8*
%endif
+# Install clamav-wrapper:
+tar xjf %{SOURCE3} -C %{buildroot}/%{_prefix}/share
install -d -m0755 %{buildroot}%{_localstatedir}/log/clamav/
touch %{buildroot}%{_localstatedir}/log/clamav/freshclam.log
@@ -318,6 +321,8 @@ rm -rf %{buildroot}
%doc %{_mandir}/man1/clamscan.1*
%doc %{_mandir}/man1/freshclam.1*
%doc %{_mandir}/man5/freshclam.conf.5*
+%doc %{_prefix}/share/clamav/README.clamd-wrapper
+%{_prefix}/share/clamav/clamd-wrapper
%config(noreplace) %{_sysconfdir}/freshclam.conf
%{_bindir}/clamscan
%{_bindir}/freshclam
@@ -379,6 +384,10 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Sun Mar 13 2011 Jan-Frode Myklebust <janfrode(a)tanso.net> - 0.97-4
+- Add back clamd-wrapper to stay compatible with users
+ of old packaging (amavisd-new).
+
* Wed Feb 23 2011 Nick Bebout <nb(a)fedoraproject.org> - 0.097-3
- Move db to /var/lib/clamav
- Ship empty directory /etc/clamd.d for amavisd-new
diff --git a/sources b/sources
index 70d67b2..27407d3 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
44e7df79718d104db0666d5db3f08682 clamav-0.97-clean.tar.bz2
+ae4e25e5df41b71cf6541e3a876b94a7 clamd-wrapper.tar.bz2
commit 728c0a6675486de0cac83ed18d426cc498e94670
Merge: b413e80 77e0359
Author: Dennis Gilmore <dennis(a)ausil.us>
Date: Wed Feb 23 21:22:32 2011 -0600
Merge branch 'el6' into el5
Conflicts:
clamav.spec
commit 77e0359251880d555b1a367a4f4cb2e1e1b33fcb
Author: Nick Bebout <nb(a)fedoraproject.org>
Date: Wed Feb 23 17:34:22 2011 -0600
Move db to /var/lib/clamav
Add /etc/clamd.d for amavisd-new
diff --git a/clamav.spec b/clamav.spec
index 3bd0251..824dacd 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -5,7 +5,7 @@
Summary: Anti-virus software
Name: clamav
Version: 0.97
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
@@ -94,8 +94,8 @@ you will need to install %{name}-devel.
%{__perl} -pi.orig -e 's|/lib\b|/%{_lib}|g;' libtool configure
%{__perl} -pi.orig -e '
- s|\@DBDIR\@|\$(localstatedir)/clamav|g;
- s|\@DBINST\@|\$(localstatedir)/clamav|g;
+ s|\@DBDIR\@|\$(localstatedir)/lib/clamav|g;
+ s|\@DBINST\@|\$(localstatedir)/lib/clamav|g;
s|\@CFGDIR\@|\$(sysconfdir)|g;
s|\@CFGINST\@|\$(sysconfdir)|g;
s|^\@INSTALL_CLAMAV_CONF_TRUE\@|\t|g;
@@ -110,7 +110,7 @@ you will need to install %{name}-devel.
s|^#(LogSyslog)|$1|;
s|^#(PidFile) .+$|$1 %{_localstatedir}/run/clamav/clamd.pid|;
s|^#(TemporaryDirectory) .+$|$1 %{_localstatedir}/tmp|;
- s|^#(DatabaseDirectory) .+$|$1 %{_localstatedir}/clamav|;
+ s|^#(DatabaseDirectory) .+$|$1 %{_localstatedir}/lib/clamav|;
s|^#(LocalSocket) .+$|$1 %{_localstatedir}/run/clamav/clamd.sock|;
s|^#(FixStaleSocket)|$1|;
s|^#(TCPSocket) .+$|$1 3310|;
@@ -134,7 +134,7 @@ you will need to install %{name}-devel.
%{__perl} -pi.orig -e '
s|^(Example)|#$1|;
- s|^#(DatabaseDirectory) .+$|$1 %{_localstatedir}/clamav|;
+ s|^#(DatabaseDirectory) .+$|$1 %{_localstatedir}/lib/clamav|;
s|^#(UpdateLogFile) .+$|$1 %{_localstatedir}/log/clamav/freshclam.log|;
s|^#(LogSyslog)|$1|;
s|^#(DatabaseOwner) .+$|$1 clam|;
@@ -177,7 +177,7 @@ fi
%{_bindir}/freshclam \
--quiet \
- --datadir="%{_localstatedir}/clamav" \
+ --datadir="%{_localstatedir}/lib/clamav" \
--log="$LOG_FILE" \
--log-verbose \
--daemon-notify="%{_sysconfdir}/clamd.conf"
@@ -196,7 +196,7 @@ CLAMAV_FLAGS="
--outgoing
--quiet
"
-SOCKET_ADDRESS="local:%{_localstatedir}/clamav/clmilter.socket"
+SOCKET_ADDRESS="local:%{_localstatedir}/run/clamav/clmilter.socket"
EOF
%build
@@ -209,7 +209,7 @@ EOF
--disable-unrar \
--enable-id-check \
--enable-dns \
- --with-dbdir="%{_localstatedir}/clamav" \
+ --with-dbdir="%{_localstatedir}/lib/clamav" \
--with-group="clam" \
--with-libcurl \
--with-user="clam" \
@@ -238,6 +238,7 @@ touch %{buildroot}%{_localstatedir}/log/clamav/freshclam.log
touch %{buildroot}%{_localstatedir}/log/clamav/clamd.log
install -d -m0755 %{buildroot}%{_localstatedir}/run/clamav/
+install -d -m0755 %{buildroot}%{_sysconfdir}/clamd.d/
%post
/sbin/ldconfig
@@ -334,6 +335,7 @@ rm -rf %{buildroot}
%doc %{_mandir}/man8/clamd.8*
%config(noreplace) %{_sysconfdir}/clamd.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/clamav
+%{_sysconfdir}/clamd.d
%config %{_initrddir}/clamd
%{_sbindir}/clamd
%{_bindir}/clamconf
@@ -341,10 +343,10 @@ rm -rf %{buildroot}
%defattr(0644, clam, clam, 0755)
%{_localstatedir}/run/clamav/
-%dir %{_localstatedir}/clamav/
+%dir %{_localstatedir}/lib/clamav/
%dir %{_localstatedir}/log/clamav/
%ghost %{_localstatedir}/log/clamav/clamd.log
-%exclude %{_localstatedir}/clamav/*
+%exclude %{_localstatedir}/lib/clamav/*
%if %{!?_without_milter:1}0
%files milter
@@ -363,7 +365,7 @@ rm -rf %{buildroot}
%config(noreplace) %{_sysconfdir}/logrotate.d/freshclam
%defattr(0644, clam, clam, 0755)
-%config(noreplace) %verify(user group mode) %{_localstatedir}/clamav/
+%config(noreplace) %verify(user group mode) %{_localstatedir}/lib/clamav/
%dir %{_localstatedir}/log/clamav/
%ghost %{_localstatedir}/log/clamav/freshclam.log
@@ -377,6 +379,10 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Wed Feb 23 2011 Nick Bebout <nb(a)fedoraproject.org> - 0.097-3
+- Move db to /var/lib/clamav
+- Ship empty directory /etc/clamd.d for amavisd-new
+
* Tue Feb 17 2011 Kevin Fenzi <kevin(a)tummy.com> - 0.97-2
- Disable llvm.
commit ade013989017f8044801c73b12a9ddb35ea9007d
Author: Nick Bebout <nb(a)fedoraproject.org>
Date: Mon Feb 21 16:46:26 2011 -0600
Minor changes, bump release to 2
diff --git a/clamav.spec b/clamav.spec
index 6e138d3..3bd0251 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -5,7 +5,7 @@
Summary: Anti-virus software
Name: clamav
Version: 0.97
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
@@ -212,7 +212,9 @@ EOF
--with-dbdir="%{_localstatedir}/clamav" \
--with-group="clam" \
--with-libcurl \
- --with-user="clam"
+ --with-user="clam" \
+ --disable-llvm
+
make %{?_smp_mflags}
%install
@@ -375,6 +377,9 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Tue Feb 17 2011 Kevin Fenzi <kevin(a)tummy.com> - 0.97-2
+- Disable llvm.
+
* Tue Feb 08 2011 Kevin Fenzi <kevin(a)tummy.com> - 0.97-1
- Update to 0.97
- Fix up for current guidelines.
commit b413e8038f09e0bae6a347cd56f13f47e3900cd7
Author: Nick Bebout <nb(a)fedoraproject.org>
Date: Mon Feb 21 16:42:16 2011 -0600
Minor changes, bump to Release: 2
diff --git a/clamav.spec b/clamav.spec
index 6e138d3..3bd0251 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -5,7 +5,7 @@
Summary: Anti-virus software
Name: clamav
Version: 0.97
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2
Group: Applications/System
URL: http://www.clamav.net/
@@ -212,7 +212,9 @@ EOF
--with-dbdir="%{_localstatedir}/clamav" \
--with-group="clam" \
--with-libcurl \
- --with-user="clam"
+ --with-user="clam" \
+ --disable-llvm
+
make %{?_smp_mflags}
%install
@@ -375,6 +377,9 @@ rm -rf %{buildroot}
%exclude %{_libdir}/libclamav.la
%changelog
+* Tue Feb 17 2011 Kevin Fenzi <kevin(a)tummy.com> - 0.97-2
+- Disable llvm.
+
* Tue Feb 08 2011 Kevin Fenzi <kevin(a)tummy.com> - 0.97-1
- Update to 0.97
- Fix up for current guidelines.
commit 98d8227630e520e187aa14ff1c862018c4b5596c
Merge: 0909a88 78c8a5a
Author: Nick Bebout <nb(a)fedoraproject.org>
Date: Mon Feb 21 16:33:19 2011 -0600
Merge branch 'el6' into el5
Conflicts:
.gitignore
clamav.spec
clamd-wrapper
sources
diff --cc .gitignore
index c07be39,cd2bf84..f6ee443
--- a/.gitignore
+++ b/.gitignore
@@@ -1,1 -1,2 +1,6 @@@
++<<<<<<< HEAD
+clamav-0.95.1-norar.tar.bz2
++=======
+ clamav-0.95.3-norar.tar.bz2
+ /clamav-0.97-clean.tar.bz2
++>>>>>>> el6
commit 78c8a5ad5f7f687287d016ac730bf48645b177e0
Author: Nick Bebout <nb(a)fedoraproject.org>
Date: Mon Feb 21 15:42:47 2011 -0600
Update to 0.097 with new spec
diff --git a/.gitignore b/.gitignore
index 5b7c836..cd2bf84 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
clamav-0.95.3-norar.tar.bz2
+/clamav-0.97-clean.tar.bz2
diff --git a/ChangeLog-rpm.old b/ChangeLog-rpm.old
deleted file mode 100644
index 44c8556..0000000
--- a/ChangeLog-rpm.old
+++ /dev/null
@@ -1,279 +0,0 @@
-* Tue Dec 12 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.7-1
-- updated to 0.88.7
-
-* Sun Nov 5 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.6-1
-- updated to 0.88.6
-
-* Wed Oct 18 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.5-1
-- updated to 0.88.5 (SECURITY); fixes CVE-2006-4182, CVE-2006-5295
-- added patch to set '__attribute__ ((visibility("hidden")))' for
- exported MD5_*() functions (fixes #202043)
-
-* Thu Oct 05 2006 Christian Iseli <Christian.Iseli(a)licr.org> 0.88.4-4
- - rebuilt for unwind info generation, broken in gcc-4.1.1-21
-
-* Thu Sep 21 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.4-3
-- splitted SysV initscripts of -milter and -server into own subpackages
-
-* Fri Sep 15 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.4-2
-- rebuilt
-
-* Tue Aug 8 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.4-1
-- updated to 0.88.4 (SECURITY)
-
-* Wed Jul 12 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
-- removed the clamdscan(1) manpage from the -server subpackage
-
-* Sat Jul 8 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
-- removed a superfluous '}'
-- removed some code which was relevant for FC-3 only
-
-* Sat Jul 8 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.3-1
-- updated to 0.88.3
-- updated to new fedora-usermgmt macros
-
-* Tue May 16 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.2-2
-- cleanups: removed unneeded curlies, use plain command instead of
- %%__XXX macro, whitespace cleanup, removed unneeded versioned
- dependencies
-- added a 'Requires(post): group(clamav)' dependencies for -update and
- added the corresponding Provides: to -data
-- removed the %%_without_milter conditional; you won't gain anything
- when milter would be disabled at buildtime
-
-* Sun Apr 30 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.2-1
-- updated to 0.88.2 (SECURITY)
-- rediffed patches; most issues handled by 0.88.1-2 are fixed in
- 0.88.2
-
-* Mon Apr 24 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.1-2
-- added patch which fixes some classes of compiler warnings; at least
- the using of implicitly declared functions was reported to cause
- segfaults on AMD64 (brought to my attention by Marc Perkel)
-- added patch which fixes wrong usage of strncpy(3) in unrarlib.c
-
-* Thu Apr 06 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.1-1
-- updated to 0.88.1 (SECURITY)
-
-* Sat Feb 18 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88-2
-- rebuilt for FC5
-
-* Tue Jan 10 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88-1
-- updated to 0.88
-- added pseudo-versions for the 'init(...)' provides as a first step
- for the support of alternative initmethods
-
-* Tue Nov 15 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.87.1-2
-- moved 'freshclam.conf.5' man page into the -update subpackage (#173221)
-- ship 'clamd.conf.5' man page in the -server subpackage *too*. The
- same file is contained in multiple packages now, but this man-page
- can not be removed from the base package because it also applies to
- 'clamdscan' there (#173221).
-
-* Fri Nov 4 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.87.1-1
-- updated to 0.87.1
-
-* Sat Sep 17 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.87-1
-- updated to 0.87 (SECURITY)
-- removed -timeout patch; it is solved upstream
-- reverted the -exim changes; they add yet more complexity, their
- functionality can go into an own package and they contained flaws
-
-* Fri Sep 9 2005 David Woodhouse <dwmw2(a)infradead.org> - 0.86.2-5
-- Add clamav-exim configuration package
-
-* Fri Jul 29 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.86.2-4
-- [milter] create the milter-logfile in the %%post scriptlet
-- [milter] reverted the change of the default child_timeout value; it
- was set to 5 minutes in 0.86.2 which conflicts with the internal
- mode where a timeout must not be set. So, the clamav-milter would
- not run with the default configuration
-
-* Thu Jul 28 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.86.2-3
-- Fixed calculation of sleep duration; on some systems/IPs, `hostid`
- results in a negative number which is retained by the bash
- modulo-operation. So the sleep may get a negative number of seconds
- being interpreted as an option. This version makes sure that the
- module-operations returns a non-negative value. [BZ #164494, James
- Wilkinson]
-- added support for a /usr/sbin/clamav-notify-servers.local hook; this
- file will be executed (source'd) before all other actions and can
- abort the entire processing by invoking 'exit'
-
-* Mon Jul 25 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.86.2-2
-- updated to 0.86.2 (SECURITY)
-- changed the freshclam updating mechanism (again); now, it consists
- of a crontab which does not need to be changed and a helper script
- (freshclam-sleep). This helper script is configured by
- /etc/sysconfig/freshclam
-
-* Sat Jun 25 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.86.1-2
-- updated to 0.86.1
-- fixed randomization in %%post scriptlet: hour should be a range but
- not a single number
-
-* Tue Jun 21 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.86-1
-- updated to 0.86
-- randomize freshclam startup times in -update's %%post script (suggested
- by Stephen Smoogen); this requires some more Requires(post): also
-
-* Wed May 18 2005 Warren Togami <wtogami(a)redhat.com> - 0.85.1-4
-- fix dist tagging the way Enrico wants it
-
-* Tue May 17 2005 Oliver Falk <oliver(a)linux-kernel.at> - 0.85.1-2
-- Rebuild
-
-* Tue May 17 2005 Oliver Falk <oliver(a)linux-kernel.at> - 0.85.1-1
-- Update
-
-* Sat May 14 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.85-0
-- updated to 0.85
-
-* Sun May 1 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.84-0
-- updated to 0.84
-
-* Fri Apr 7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
-- rebuilt
-
-* Tue Feb 15 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.83-1
-- updated to 0.83
-
-* Tue Feb 8 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.82-1
-- updated to 0.82
-- minor spec cleanups
-
-* Fri Jan 28 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 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 <enrico.scholz(a)informatik.tu-chemnitz.de> - 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 <enrico.scholz(a)informatik.tu-chemnitz.de> - 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 <enrico.scholz(a)informatik.tu-chemnitz.de> - 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 <enrico.scholz(a)informatik.tu-chemnitz.de> - 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 <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.75-0.fdr.1
-- updated to 0.75
-
-* Thu Jul 15 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.74-0.fdr.2
-- moved /usr/bin/clamav-config from main into -devel
-
-* Wed Jun 30 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.74-0.fdr.1
-- updated to 0.74
-
-* Mon Jun 14 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.73-0.fdr.1
-- updated to 0.73
-- added pkgconfig file
-
-* Fri Jun 11 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 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 <enrico.scholz(a)informatik.tu-chemnitz.de> - 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 <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.72-0.fdr.1
-- updated to 0.72
-
-* Thu May 20 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 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
- replace some placeholders...
-
-* Wed May 19 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.71-0.fdr.1
-- updated to 0.71
-
-* Fri May 7 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.70-0.fdr.1.1
-- quote 'EOF' to delay $RANDOM expansion
-
-* Tue Apr 27 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.70-0.fdr.2
-- updated GECOS entry for the 'clamav' user to describe its purpose
- more accurately
-- use explicit '-m755' when creating directories with install
-
-* Tue Apr 20 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.70-0.fdr.1
-- updated to 0.70; rediffed some patches
-- updated logrotate script to use signals and documented the steps
- which are needed to make it work
-- adapted initscript to use signals instead of sockwrite
-- removed sockwrite; signals can now be used to reload the database
-- added logfile to the -milter subpackage
-
-* Tue Apr 20 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.68-0.fdr.2.1
-- tagged some Requires:, since clamav-server is required in the milter-%%post* scriptlets
-
-* Sat Mar 20 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.68-0.fdr.2
-- split the double Requires(...,...): statements; see
- https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=118773
-- require the recent fedora-usermgmt package (0.7) which fixes similar
- ordering issues
-
-* Thu Mar 18 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.68-0.fdr.1
-- updated to 0.68 (using the -1 version)
-- ship milter-files in the -milter instead of the -server subpackage
-
-* Tue Feb 24 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.67-0.fdr.3
-- fixed ':' vs. '.' in chown
-
-* Tue Feb 17 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.67-0.fdr.2
-- randomize freshclam startup to prevent server peaks
-
-* Mon Feb 16 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.67-0.fdr.1
-- updated to 0.67 (using the -1 version)
-
-* Wed Feb 11 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.66-0.fdr.2
-- updated to 0.66; important, packaging-relevant changes are
- freshclam:
- * $http_proxy is not supported anymore; you have to configure it in
- /etc/freshclam.conf
- * the logfile has been renamed to /var/log/freshclam.log
-- removed %%check section; buildroot check is implemented in local
- testsuite already
-- added some %%verify(not mtime) modifiers to avoid unnecessary .rpmnew
- files
-- added some directory-Requires:
-- activated milter-package and made it work
-- added patch to disable clamav-milter service by default
-- renamed /var/run/clamav.<SERVICE> to /var/run/clamd.<SERVICE>; this
- makes things more consistently but can break backward compatibility. The
- initscript should deal with the old version too, but I would not bet on
- it...
-- updated some descriptions
-- fixed the update-mechanism; now it happens in two stages: at first,
- the files will be downloaded as user 'clamav' and then, root initiates
- the daemon-reload.
-
-* Mon Feb 9 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.65-0.fdr.5
-- added security fix for
- http://www.securityfocus.com/archive/1/353194/2004-02-06/2004-02-12/1
diff --git a/README.fedora b/README.fedora
deleted file mode 100644
index 8df192d..0000000
--- a/README.fedora
+++ /dev/null
@@ -1,116 +0,0 @@
-A clamav-milter setup consists of the following three components:
-
-* the clamav-milter itself
-
- --> this is provided by the 'clamav-milter' package plus (alternatively)
- 'clamav-milter-upstart' or 'clamav-milter-sysvinit'
-
- The main configuration is in /etc/mail/clamav-milter.conf and MUST
- be changed before first use.
-
- The -sysvinit package is managed by the traditional tools, but
- -upstart requires modification of /etc/event.d/clamav-milter to
- enable automatic startup. See comments there for more details.
-
-* a clamav scanner daemon
-
- --> this package is called 'clamav-scanner' plus (alternatively)
- 'clamav-scanner-upstart' or 'clamav-scanner-sysvinit'
-
- The daemon is configured by /etc/clamd.d/scan.conf (which MUST be
- edited before first use).
-
- The -sysvinit package is managed by the traditional tools, but
- -upstart requires modification of /etc/event.d/clamd.scan to enable
- automatic startup. See comments there for more details.
-
-* the MTA (sendmail/postfix)
-
- --> you should know how to install this...
-
- When communicating across unix sockets with the clamav-milter, it is
- suggested to use the /var/run/clamav-milter/clamav-milter.socket
- path. You have to add something like
-
- INPUT_MAIL_FILTER(`clamav', `S=local:/var/run/clamav-milter/clamav-milter.socket, F=, T=S:4m;R:4m')dnl
-
- to your sendmail.mc.
-
-
-
-It is suggested that components communicate through TCP sockets as
-this eases setup. Please add corresponding packet filter rules!
-
-
-EXAMPLE
-=======
-
-For clamav-milter, a possible setup might be created by
-
-A) On the MTA (assumed hostname 'host-mta')
-
- 1. Add to sendmail.mc
-
- | INPUT_MAIL_FILTER(`clamav', `S=inet:6666@host-milter, F=, T=S:4m;R:4m')dnl
-
- 2. Rebuild sendmail.cf
-
-
-B) On the clamav-milter host (assumed hostname 'host-milter')
-
- 1. Install clamav-milter + clamav-milter-upstart packages
-
- 2. Set in /etc/mail/clamav-milter.conf
-
- | MilterSocket inet:6666
- | ClamdSocket tcp:host-scanner:6665
-
- and all the other options which are required on your system
-
- 3. Edit /etc/event.d/clamav-milter and uncomment the
-
- | start on starting local
-
- line. Restart your system or execute
-
- | initctl emit starting local
-
- 4. Add something like
-
- | iptables -N IN-cmilt
- | iptables -A IN-cmilt -s host-mta -j ACCEPT
- | iptables -A IN-cmilt -j DROP
-
- | iptables -A INPUT -p tcp --dport 6666 -j IN-cmilt
-
- to your firewall setup
-
-C) On the clamav-scanner host (assumed hostname 'host-scanner')
-
- 1. Install clamav-scanner + clamav-scanner-upstart packages
-
- 2. Add to /etc/clamd.d/scan.conf
-
- | TCPSocket 6665
- | TCPAddr host-scanner
-
- comment out possible 'LocalSocket' lines and set all the other
- options which are required on your system
-
- 3. Edit /etc/event.d/clamav-scanner and uncomment the
-
- | start on starting local
-
- line. Restart your system or execute
-
- | initctl emit starting local
-
- 4. Add something like
-
- | iptables -N IN-cscan
- | iptables -A IN-cscan -s host-milter -j ACCEPT
- | iptables -A IN-cscan -j DROP
-
- | iptables -A INPUT -p tcp --dport 6665 -j IN-csan
-
- to your firewall setup
diff --git a/clamav-0.92-open.patch b/clamav-0.92-open.patch
deleted file mode 100644
index 040fc20..0000000
--- a/clamav-0.92-open.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- clamav-0.91.2/clamd/dazukoio_compat12.c.open 2007-03-06 14:38:06.000000000 +0100
-+++ clamav-0.91.2/clamd/dazukoio_compat12.c 2007-08-25 12:36:30.000000000 +0200
-@@ -89,7 +89,7 @@ int dazukoRegister_TS_compat12(struct da
- if (dazuko->device < 0)
- {
-
-- dazuko->device = open("/dev/dazuko", 0);
-+ dazuko->device = open("/dev/dazuko", O_RDONLY);
- if (dazuko->device < 0)
- return -1;
-
diff --git a/clamav-0.92-private.patch b/clamav-0.92-private.patch
deleted file mode 100644
index bab2948..0000000
--- a/clamav-0.92-private.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- clamav-0.92/libclamav.pc.in.private
-+++ clamav-0.92/libclamav.pc.in
-@@ -6,6 +6,6 @@ includedir=@includedir@
- Name: libclamav
- Description: A GPL virus scanner
- Version: @LIBCLAMAV_VERSION@
--Libs: -L${libdir} -lclamav @LIBCLAMAV_LIBS@
--Cflags: -I${includedir} @CFLAGS@
--
-+Libs: -L${libdir} -lclamav
-+Libs.private: -L${libdir} -lclamav @LIBCLAMAV_LIBS@
-+Cflags: -I${includedir}
---- clamav-0.92/clamav-config.in.private
-+++ clamav-0.92/clamav-config.in
-@@ -54,12 +54,8 @@ while test $# -gt 0; do
- usage 0
- ;;
-
-- --cflags)
-- echo -I@includedir@ @CFLAGS@
-- ;;
--
-- --libs)
-- echo -L@libdir@ @LIBCLAMAV_LIBS@
-+ (--cflags|--libs)
-+ ${PKG_CONFIG:-pkg-config} "$1" libclamav
- ;;
-
- *)
diff --git a/clamav-0.95-cliopts.patch b/clamav-0.95-cliopts.patch
deleted file mode 100644
index 90d173f..0000000
--- a/clamav-0.95-cliopts.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: clamav-0.95rc1/shared/optparser.c
-===================================================================
---- clamav-0.95rc1.orig/shared/optparser.c
-+++ clamav-0.95rc1/shared/optparser.c
-@@ -211,7 +211,7 @@ const struct clam_option clam_options[]
-
- { "ExitOnOOM", NULL, 0, TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD, "Stop the daemon when libclamav reports an out of memory condition.", "yes" },
-
-- { "Foreground", NULL, 0, TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_FRESHCLAM | OPT_MILTER, "Don't fork into background.", "no" },
-+ { "Foreground", "nofork", 0, TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_FRESHCLAM | OPT_MILTER, "Don't fork into background.", "no" },
-
- { "Debug", NULL, 0, TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_FRESHCLAM, "Enable debug messages in libclamav.", "no" },
-
diff --git a/clamav-0.95.3-umask.patch b/clamav-0.95.3-umask.patch
deleted file mode 100644
index 220f7ab..0000000
--- a/clamav-0.95.3-umask.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Index: clamav-0.95.3/clamav-milter/clamav-milter.c
-===================================================================
---- clamav-0.95.3.orig/clamav-milter/clamav-milter.c
-+++ clamav-0.95.3/clamav-milter/clamav-milter.c
-@@ -306,7 +306,7 @@ int main(int argc, char **argv) {
-
- if((opt = optget(opts, "PidFile"))->enabled) {
- FILE *fd;
-- mode_t old_umask = umask(0002);
-+ mode_t old_umask = umask(0022);
-
- if((fd = fopen(opt->strarg, "w")) == NULL) {
- logg("!Can't save PID in file %s\n", opt->strarg);
-Index: clamav-0.95.3/shared/output.c
-===================================================================
---- clamav-0.95.3.orig/shared/output.c
-+++ clamav-0.95.3/shared/output.c
-@@ -270,7 +270,7 @@ int logg(const char *str, ...)
- #endif
- if(logg_file) {
- if(!logg_fp) {
-- old_umask = umask(0037);
-+ old_umask = umask(0077);
- if((logg_fp = fopen(logg_file, "at")) == NULL) {
- umask(old_umask);
- #ifdef CL_THREAD_SAFE
-Index: clamav-0.95.3/freshclam/freshclam.c
-===================================================================
---- clamav-0.95.3.orig/freshclam/freshclam.c
-+++ clamav-0.95.3/freshclam/freshclam.c
-@@ -102,7 +102,7 @@ static void writepid(const char *pidfile
- {
- FILE *fd;
- int old_umask;
-- old_umask = umask(0006);
-+ old_umask = umask(0022);
- if((fd = fopen(pidfile, "w")) == NULL) {
- logg("!Can't save PID to file %s: %s\n", pidfile, strerror(errno));
- } else {
diff --git a/clamav-0.97-clean.tar.bz2 b/clamav-0.97-clean.tar.bz2
new file mode 100644
index 0000000..9d39f27
Binary files /dev/null and b/clamav-0.97-clean.tar.bz2 differ
diff --git a/clamav-milter.init b/clamav-milter.init
new file mode 100644
index 0000000..62a2f91
--- /dev/null
+++ b/clamav-milter.init
@@ -0,0 +1,58 @@
+#!/bin/sh
+#
+# Startup script for the Clamav Milter Daemon
+#
+# chkconfig: 2345 77 23
+# description: clamav-milter is a daemon which hooks into sendmail \
+# and routes email messages to clamav.
+# processname: clamav-milter
+# pidfile: /var/run/clamav/clamav-milter.pid
+# config: /etc/sysconfig/clamav-milter
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+# Source networking configuration.
+. /etc/sysconfig/network
+
+[ -x /usr/sbin/clamav-milter ] || exit 0
+
+# Local clamav-milter config
+CLAMAV_FLAGS=
+test -f /etc/sysconfig/clamav-milter && . /etc/sysconfig/clamav-milter
+
+# See how we were called.
+case "$1" in
+ start)
+ echo -n "Starting Clamav Milter Daemon: "
+ daemon clamav-milter $CLAMAV_FLAGS $SOCKET_ADDRESS
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/clamav-milter
+ ;;
+ stop)
+ echo -n "Stopping Clamav Milter Daemon: "
+ killproc clamav-milter
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/clamav-milter
+ ;;
+ status)
+ status clamav-milter
+ RETVAL=$?
+ ;;
+ restart|reload)
+ $0 stop
+ $0 start
+ RETVAL=$?
+ ;;
+ condrestart)
+ [ -e /var/lock/subsys/clamd ] && restart
+ RETVAL=$?
+ ;;
+ *)
+ echo "Usage: clamav-milter {start|stop|status|restart|reload|condrestart}"
+ exit 1
+esac
+
+exit $RETVAL
diff --git a/clamav-milter.sysv b/clamav-milter.sysv
deleted file mode 100644
index 170cdc1..0000000
--- a/clamav-milter.sysv
+++ /dev/null
@@ -1,93 +0,0 @@
-#!/bin/bash
-#
-# clamav-milter Starts/stop the "clamav-milter" daemon
-#
-# chkconfig: - 79 21
-# description: A virus scanning milter
-
-# Source function library.
-. /etc/rc.d/init.d/functions
-
-exec=/usr/sbin/clamav-milter
-prog="clamav-milter"
-
-OPTS='-c /etc/mail/clamav-milter.conf'
-[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
-
-pidfile=/var/run/clamav-milter/milter.pid
-lockfile=/var/lock/subsys/$prog
-
-start() {
- [ -x $exec ] || exit 5
- [ -f $config ] || exit 6
- echo -n $"Starting $prog: "
- daemon --pidfile=${pidfile} $exec $OPTS --nofork=no --pid=${pidfile}
- retval=$?
- echo
- [ $retval -eq 0 ] && touch $lockfile
- return $retval
-}
-
-stop() {
- echo -n $"Stopping $prog: "
- killproc -p "${pidfile}" $exec
- retval=$?
- echo
- [ $retval -eq 0 ] && rm -f $lockfile
- return $retval
-}
-
-restart() {
- stop
- start
-}
-
-reload() {
- restart
-}
-
-force_reload() {
- restart
-}
-
-rh_status() {
- # run checks to determine if the service is running or use generic status
- status -p "${pidfile}" $prog
-}
-
-rh_status_q() {
- rh_status >/dev/null 2>&1
-}
-
-
-case "$1" in
- start)
- rh_status_q && exit 0
- $1
- ;;
- stop)
- rh_status_q || exit 0
- $1
- ;;
- restart)
- $1
- ;;
- reload)
- rh_status_q || exit 7
- $1
- ;;
- force-reload)
- force_reload
- ;;
- status)
- rh_status
- ;;
- condrestart|try-restart)
- rh_status_q || exit 0
- restart
- ;;
- *)
- echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
- exit 2
-esac
-exit $?
diff --git a/clamav-milter.upstart b/clamav-milter.upstart
deleted file mode 100644
index e0a63f2..0000000
--- a/clamav-milter.upstart
+++ /dev/null
@@ -1,15 +0,0 @@
-### Uncomment these lines when you want clamav-milter to be a milter
-### for a locally running MTA
-#start on starting sendmail
-#start on starting postfix
-
-### Uncomment these lines when you want clamav-milter to be a milter
-### for a remotely running MTA
-#start on starting local
-
-stop on runlevel 0
-stop on runlevel 1
-stop on runlevel 6
-
-respawn
-exec /usr/sbin/clamav-milter -c /etc/mail/clamav-milter.conf --nofork=yes
diff --git a/clamav-notify-servers b/clamav-notify-servers
deleted file mode 100644
index f115e89..0000000
--- a/clamav-notify-servers
+++ /dev/null
@@ -1,38 +0,0 @@
-#! /bin/bash
-
-# Copyright (C) 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
-#
-# 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.
-
-# Usage: clamav-notify-servers
-
-CFGFILE=/etc/sysconfig/clamav-servers
-BASE=/var/lock/subsys/clamd.
-INITRDDIR=/etc/init.d
-
-ok=1
-
-f=/usr/sbin/clamav-notify-servers.local
-test ! -e "$f" || . "$f"
-
-for i in ${BASE}*; do
- test -e "$i" || continue
-
- srv=${INITRDDIR}/clamd.${i##${BASE}}
- test -e "$srv" || continue
-
- "$srv" reload || ok=
-done >/dev/null
-
-test "$ok"
diff --git a/clamav-update.cron b/clamav-update.cron
deleted file mode 100644
index 3a69901..0000000
--- a/clamav-update.cron
+++ /dev/null
@@ -1,6 +0,0 @@
-## Adjust this line...
-MAILTO=root
-
-## It is ok to execute it as root; freshclam drops privileges and becomes
-## user 'clamav' as soon as possible
-0 */3 * * * root /usr/share/clamav/freshclam-sleep
diff --git a/clamav-update.logrotate b/clamav-update.logrotate
deleted file mode 100644
index 0de6062..0000000
--- a/clamav-update.logrotate
+++ /dev/null
@@ -1,4 +0,0 @@
-/var/log/freshclam.log {
- monthly
- notifempty
-}
diff --git a/clamav.init b/clamav.init
new file mode 100755
index 0000000..0e001fb
--- /dev/null
+++ b/clamav.init
@@ -0,0 +1,58 @@
+#!/bin/sh
+#
+# Startup script for the Clam AntiVirus Daemon
+#
+# chkconfig: 2345 61 39
+# description: Clam AntiVirus Daemon is a TCP/IP or socket protocol \
+# server.
+# processname: clamd
+# pidfile: /var/run/clamav/clamd.pid
+# config: /etc/clamav.conf
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+# Source networking configuration.
+. /etc/sysconfig/network
+
+[ -x /usr/sbin/clamd ] || exit 0
+
+# See how we were called.
+case "$1" in
+ start)
+ echo -n "Starting Clam AntiVirus Daemon: "
+ daemon clamd
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/clamd
+ ;;
+ stop)
+ echo -n "Stopping Clam AntiVirus Daemon: "
+ killproc clamd
+ rm -f /var/clamav/clamd.socket
+ rm -f /var/run/clamav/clamav.pid
+ RETVAL=$?
+ echo
+### heres the fix... we gotta remove the stale files on restart
+ [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/clamd
+ ;;
+ status)
+ status clamd
+ RETVAL=$?
+ ;;
+ restart|reload)
+ $0 stop
+ $0 start
+ RETVAL=$?
+ ;;
+ condrestart)
+ [ -e /var/lock/subsys/clamd ] && restart
+ RETVAL=$?
+ ;;
+ *)
+ echo "Usage: clamd {start|stop|status|restart|reload|condrestart}"
+ exit 1
+esac
+
+exit $RETVAL
+
diff --git a/clamav.spec b/clamav.spec
index 88935d7..6e138d3 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -1,879 +1,579 @@
-#global snapshot rc1
-
-## Fedora Extras specific customization below...
-%bcond_without fedora
-%bcond_without upstart
-%bcond_with unrar
-%bcond_without noarch
-##
-
-%global username clamupdate
-%global homedir %_var/lib/clamav
-%global freshclamlog %_var/log/freshclam.log
-%global milteruser clamilt
-%global milterlog %_var/log/clamav-milter.log
-%global milterstatedir %_var/run/clamav-milter
-%global pkgdatadir %_datadir/%name
-
-%global scanuser clamscan
-%global scanstatedir %_var/run/clamd.scan
-
-%{?with_noarch:%global noarch BuildArch: noarch}
-%{!?release_func:%global release_func() %1%{?dist}}
-
-Summary: End-user tools for the Clam Antivirus scanner
-Name: clamav
-Version: 0.95.3
-Release: %release_func 1200%{?snapshot:.%snapshot}
-
-License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
-Group: Applications/File
-URL: http://www.clamav.net
-%if 0%{?with_unrar:1}
-Source0: http://download.sourceforge.net/sourceforge/clamav/%name-%version%{?snaps...
-Source999: http://download.sourceforge.net/sourceforge/clamav/%name-%version%{?snaps...
-%else
-# Unfortunately, clamav includes support for RAR v3, derived from GPL
-# incompatible unrar from RARlabs. We have to pull this code out.
-# tarball was created by
-# make clean-sources [TARBALL=<original-tarball>] [VERSION=<version>]
-Source0: %name-%version%{?snapshot}-norar.tar.bz2
-%endif
-Source1: clamd-wrapper
-Source2: clamd.sysconfig
-Source3: clamd.logrotate
-Source5: clamd-README
-Source6: clamav-update.logrotate
-Source7: clamd.SERVICE.init
-Source8: clamav-notify-servers
-Patch24: clamav-0.92-private.patch
-Patch25: clamav-0.92-open.patch
-Patch26: clamav-0.95-cliopts.patch
-Patch27: clamav-0.95.3-umask.patch
-BuildRoot: %_tmppath/%name-%version-%release-root
-Requires: clamav-lib = %version-%release
-Requires: data(clamav)
-BuildRequires: zlib-devel bzip2-devel gmp-devel curl-devel
-BuildRequires: ncurses-devel
-BuildRequires: %_includedir/tcpd.h
-BuildRequires: bc
-
-%package filesystem
-Summary: Filesystem structure for clamav
-Group: Applications/File
-Provides: user(%username) = 4
-Provides: group(%username) = 4
-# Prevent version mix
-Conflicts: %name < %version-%release
-Conflicts: %name > %version-%release
-BuildRequires: fedora-usermgmt-devel
-%{?noarch}
-%{?FE_USERADD_REQ}
-
-%package lib
-Summary: Dynamic libraries for the Clam Antivirus scanner
-Group: System Environment/Libraries
-Requires: data(clamav)
-
-%package devel
-Summary: Header files and libraries for the Clam Antivirus scanner
-Group: Development/Libraries
-Source100: clamd-gen
-Requires: clamav-lib = %version-%release
-Requires: clamav-filesystem = %version-%release
-Requires(pre): %_libdir/pkgconfig
-Requires: pkgconfig
-
-%package data
-Summary: Virus signature data for the Clam Antivirus scanner
-Group: Applications/File
-Requires(pre): clamav-filesystem = %version-%release
-Requires(postun): clamav-filesystem = %version-%release
-Provides: data(clamav) = full
-Conflicts: data(clamav) < full
-Conflicts: data(clamav) > full
-%{?noarch}
-
-%package data-empty
-Summary: Empty data package for the Clam Antivirus scanner
-Group: Applications/File
-Provides: data(clamav) = empty
-Conflicts: data(clamav) < empty
-Conflicts: data(clamav) > empty
-%{?noarch}
-
-%package update
-Summary: Auto-updater for the Clam Antivirus scanner data-files
-Group: Applications/File
-Source200: freshclam-sleep
-Source201: freshclam.sysconfig
-Source202: clamav-update.cron
-Requires: clamav-filesystem = %version-%release
-Requires(pre): /etc/cron.d
-Requires(postun): /etc/cron.d
-Requires(post): %__chown %__chmod
-Requires(post): group(%username)
-
-%package server
-Summary: Clam Antivirus scanner server
-Group: System Environment/Daemons
-Requires: data(clamav)
-Requires: clamav-filesystem = %version-%release
-Requires: clamav-lib = %version-%release
-
-%package server-sysvinit
-Summary: SysV initscripts for clamav server
-Group: System Environment/Daemons
-Provides: init(clamav-server) = sysv
-Requires: clamav-server = %version-%release
-Requires(pre): %_initrddir
-Requires(postun): %_initrddir
-Provides: clamav-server-sysv = %version-%release
-Obsoletes: clamav-server-sysv < %version-%release
-%{?noarch}
-
-
-%package scanner
-Summary: Clamav scanner daemon
-Group: System Environment/Daemons
-Requires: init(clamav-scanner)
-Provides: user(%scanuser) = 49
-Provides: group(%scanuser) = 49
-Requires: clamav-server = %version-%release
-%{?noarch}
-
-%package scanner-sysvinit
-Summary: SysV initscripts for clamav scanner daemon
-Group: System Environment/Daemons
-Provides: init(clamav-scanner) = sysv
-Requires: clamav-server-sysvinit = %version-%release
-Requires: clamav-scanner = %version-%release
-Requires(pre): %_initrddir
-Requires(postun): %_initrddir initscripts
-Requires(post): chkconfig
-Requires(preun): chkconfig initscripts
-%{?noarch}
-
-%package scanner-upstart
-Summary: Upstart initscripts for clamav scanner daemon
-Group: System Environment/Daemons
-Source410: clamd.scan.upstart
-Provides: init(clamav-scanner) = upstart
-Requires: clamav-scanner = %version-%release
-# implicates a conflict with upstart 0.5+
-Requires(pre): /etc/event.d
-Requires(post): /usr/bin/killall
-Requires(postun): /sbin/initctl
-%{?noarch}
-
-
-%package milter
-Summary: Milter module for the Clam Antivirus scanner
-Group: System Environment/Daemons
-Source300: README.fedora
-Requires: init(clamav-milter)
-BuildRequires: sendmail-devel
-BuildRequires: fedora-usermgmt-devel
-Provides: user(%milteruser) = 5
-Provides: group(%milteruser) = 5
-Requires(post): coreutils
-%{?FE_USERADD_REQ}
-
-Provides: milter(clamav) = sendmail
-Provides: milter(clamav) = postfix
-
-Provides: clamav-milter-core = %version-%release
-Obsoletes: clamav-milter-core < %version-%release
-Provides: clamav-milter-sendmail = %version-%release
-Obsoletes: clamav-milter-sendmail < %version-%release
-
-%package milter-sysvinit
-Summary: SysV initscripts for the clamav sendmail-milter
-Group: System Environment/Daemons
-Source320: clamav-milter.sysv
-Provides: init(clamav-milter) = sysvinit
-Requires: clamav-milter = %version-%release
-Requires(post): user(%milteruser) clamav-milter
-Requires(preun): user(%milteruser) clamav-milter
-Requires(pre): %_initrddir
-Requires(postun): %_initrddir initscripts
-Requires(post): chkconfig
-Requires(preun): chkconfig initscripts
-Provides: clamav-milter-sysv = %version-%release
-Obsoletes: clamav-milter-sysv < %version-%release
-%{?noarch}
-
-%package milter-upstart
-Summary: Upstart initscripts for the clamav sendmail-milter
-Group: System Environment/Daemons
-Source310: clamav-milter.upstart
-Provides: init(clamav-milter) = upstart
-Requires: clamav-milter = %version-%release
-# implicates a conflict with upstart 0.5+
-Requires(pre): /etc/event.d
-Requires(post): /usr/bin/killall
-Requires(postun): /sbin/initctl
-%{?noarch}
-
+### 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
+
+Summary: Anti-virus software
+Name: clamav
+Version: 0.97
+Release: 1%{?dist}
+License: GPLv2
+Group: Applications/System
+URL: http://www.clamav.net/
+
+# Upstream source includes libunrar that is not distributable.
+#Source: http://downloads.sourceforge.net/clamav/clamav-%{version}.tar.gz
+Source0: clamav-0.97-clean.tar.bz2
+Source1: clamav.init
+Source2: clamav-milter.init
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildRequires: bzip2-devel, zlib-devel, gmp-devel, curl-devel
+%{!?_without_milter:BuildRequires: sendmail-devel >= 8.12}
+Requires: clamav-db = %{version}-%{release}
+Requires(pre): shadow-utils
+
+### Fedora Extras introduced them differently :(
+Obsoletes: libclamav < %{version}-%{release}
+Obsoletes: clamav-lib < %{version}-%{release}
+Obsoletes: clamav-filesystem < %{version}-%{release}
+Provides: libclamav
%description
-Clam AntiVirus is an anti-virus toolkit for UNIX. The main purpose of this
-software is the integration with mail servers (attachment scanning). The
-package provides a flexible and scalable multi-threaded daemon, a command
-line scanner, and a tool for automatic updating via Internet. The programs
-are based on a shared library distributed with the Clam AntiVirus package,
-which you can use with your own software. The virus database is based on
-the virus database from OpenAntiVirus, but contains additional signatures
-(including signatures for popular polymorphic viruses, too) and is KEPT UP
-TO DATE.
-
-%description filesystem
-This package provides the filesystem structure and contains the
-user-creation scripts required by clamav.
-
-%description lib
-This package contains dynamic libraries shared between applications
-using the Clam Antivirus scanner.
-
-%description devel
-This package contains headerfiles and libraries which are needed to
-build applications using clamav.
-
-%description data
-This package contains the virus-database needed by clamav. This
-database should be updated regularly; the 'clamav-update' package
-ships a corresponding cron-job. This package and the
-'clamav-data-empty' package are mutually exclusive.
-
-Use -data when you want a working (but perhaps outdated) virus scanner
-immediately after package installation.
-
-Use -data-empty when you are updating the virus database regulary and
-do not want to download a >5MB sized rpm-package with outdated virus
-definitions.
-
-
-%description data-empty
-This is an empty package to fulfill inter-package dependencies of the
-clamav suite. This package and the 'clamav-data' package are mutually
-exclusive.
-
-Use -data when you want a working (but perhaps outdated) virus scanner
-immediately after package installation.
-
-Use -data-empty when you are updating the virus database regulary and
-do not want to download a >5MB sized rpm-package with outdated virus
-definitions.
-
+Clam AntiVirus is a GPL anti-virus toolkit for UNIX. The main purpose of
+this software is the integration with mail servers (attachment scanning).
+The package provides a flexible and scalable multi-threaded daemon, a
+command line scanner, and a tool for automatic updating via Internet.
-%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-update.
+The programs are based on a shared library distributed with the Clam
+AntiVirus package, which you can use with your own software. Most
+importantly, the virus database is kept up to date
-%description server
-ATTENTION: most users do not need this package; the main package has
-everything (or depends on it) which is needed to scan for virii on
-workstations.
+%package -n clamd
+Summary: The Clam AntiVirus Daemon
+Group: System Environment/Daemons
+Requires: clamav = %{version}-%{release}
-This package contains files which are needed to execute the clamd-daemon.
-This daemon does not provide a system-wide service. Instead of, an instance
-of this daemon should be started for each service requiring it.
+### Fedora Extras introduced them differently :(
+Obsoletes: clamav-server <= %{version}-%{release}
+Obsoletes: clamav-server-sysv <= %{version}-%{release}
-See the README file how this can be done with a minimum of effort.
-
-
-%description server-sysvinit
-SysV initscripts template for the clamav server
-
-
-%description scanner
-This package contains a generic system wide clamd service which is
-e.g. used by the clamav-milter package.
-
-%description scanner-sysvinit
-The SysV initscripts for clamav-scanner.
-
-%description scanner-upstart
-The Upstart initscripts for clamav-scanner.
+%description -n clamd
+The Clam AntiVirus Daemon
+%package milter
+Summary: The Clam AntiVirus sendmail-milter Daemon
+Group: Applications/System
+Requires: clamd = %{version}-%{release}
+Requires: sendmail
+Obsoletes: clamav-milter-sysv <= %{version}-%{release}
%description milter
-This package contains files which are needed to run the clamav-milter.
+The Clam AntiVirus sendmail-milter Daemon
-%description milter-sysvinit
-The SysV initscripts for clamav-milter.
+%package db
+Summary: Virus database for %{name}
+Group: Applications/Databases
+### Remove circular dependency
+#Requires: clamav = %{version}-%{release}
-%description milter-upstart
-The Upstart initscripts for clamav-milter.
+### Fedora Extras introduced them differently :(
+Obsoletes: clamav-update <= %{version}-%{release}
+Obsoletes: clamav-data <= %{version}-%{release}
-## ------------------------------------------------------------
-
-%prep
-%setup -q -n %{name}-%{version}%{?snapshot}
+%description db
+The actual virus database for %{name}
-%patch24 -p1 -b .private
-%patch25 -p1 -b .open
-%patch26 -p1 -b .cliopts
-%patch27 -p1 -b .umask
-
-install -p -m0644 %SOURCE300 clamav-milter/
-
-mkdir -p libclamunrar{,_iface}
-%{!?with_unrar:touch libclamunrar/{Makefile.in,all,install}}
+%package devel
+Summary: Header files, libraries and development documentation for %{name}
+Group: Development/Libraries
+Requires: clamav = %{version}-%{release}
-sed -ri \
- -e 's!^#?(LogFile ).*!#\1/var/log/clamd.<SERVICE>!g' \
- -e 's!^#?(LocalSocket ).*!#\1/var/run/clamd.<SERVICE>/clamd.sock!g' \
- -e 's!^(#?PidFile ).*!\1/var/run/clamd.<SERVICE>/clamd.pid!g' \
- -e 's!^#?(User ).*!\1<USER>!g' \
- -e 's!^#?(AllowSupplementaryGroups|LogSyslog).*!\1 yes!g' \
- -e 's! /usr/local/share/clamav,! %homedir,!g' \
- etc/clamd.conf
+### Fedora Extras introduced them differently :(
+Obsoletes: libclamav-static-devel <= %{version}-%{release}
+Obsoletes: libclamav-devel <= %{version}-%{release}
+Provides: libclamav-static-devel, libclamav-devel
-sed -ri \
- -e 's!^#?(UpdateLogFile )!#\1!g;' \
- -e 's!^#?(LogSyslog).*!\1 yes!g' \
- -e 's!(DatabaseOwner *)clamav$!\1%username!g' etc/freshclam.conf
+%description devel
+This package contains the header files, static libraries and development
+documentation for %{name}. If you like to develop programs using %{name},
+you will need to install %{name}-devel.
+%prep
+%setup -q
+
+%{__perl} -pi.orig -e 's|/lib\b|/%{_lib}|g;' libtool configure
+
+%{__perl} -pi.orig -e '
+ s|\@DBDIR\@|\$(localstatedir)/clamav|g;
+ s|\@DBINST\@|\$(localstatedir)/clamav|g;
+ s|\@CFGDIR\@|\$(sysconfdir)|g;
+ s|\@CFGINST\@|\$(sysconfdir)|g;
+ s|^\@INSTALL_CLAMAV_CONF_TRUE\@|\t|g;
+ s|^\@INSTALL_FRESHCLAM_CONF_TRUE\@|\t|g;
+ ' database/Makefile.in etc/Makefile.in
+
+%{__perl} -pi.orig -e '
+ s|^(Example)|#$1|;
+ s|^#(LogFile) .+$|$1 %{_localstatedir}/log/clamav/clamd.log|;
+ s|^#(LogFileMaxSize) .*|$1 0|;
+ s|^#(LogTime)|$1|;
+ s|^#(LogSyslog)|$1|;
+ s|^#(PidFile) .+$|$1 %{_localstatedir}/run/clamav/clamd.pid|;
+ s|^#(TemporaryDirectory) .+$|$1 %{_localstatedir}/tmp|;
+ s|^#(DatabaseDirectory) .+$|$1 %{_localstatedir}/clamav|;
+ s|^#(LocalSocket) .+$|$1 %{_localstatedir}/run/clamav/clamd.sock|;
+ s|^#(FixStaleSocket)|$1|;
+ s|^#(TCPSocket) .+$|$1 3310|;
+ s|^#(TCPAddr) .+$|$1 127.0.0.1|;
+ s|^#(MaxConnectionQueueLength) .+$|$1 30|;
+ s|^#(StreamSaveToDisk)|$1|;
+ s|^#(MaxThreads) .+$|$1 50|;
+ s|^#(ReadTimeout) .+$|$1 300|;
+ s|^#(User) .+$|$1 clam|;
+ s|^#(AllowSupplementaryGroups).*$|$1 yes|;
+ s|^#(ScanPE) .+$|$1 yes|;
+ s|^#(ScanELF) .+$|$1 yes|;
+ s|^#(DetectBrokenExecutables)|$1|;
+ s|^#(ScanOLE2) .+$|$1 yes|;
+ s|^#(ScanMail)|$1|;
+ s|^#(ScanArchive) .+$|$1 yes|;
+ s|^#(ArchiveMaxCompressionRatio) .+|$1 300|;
+ s|^#(ArchiveBlockEncrypted)|$1|;
+ s|^#(ArchiveBlockMax)|$1|;
+ ' etc/clamd.conf
+
+%{__perl} -pi.orig -e '
+ s|^(Example)|#$1|;
+ s|^#(DatabaseDirectory) .+$|$1 %{_localstatedir}/clamav|;
+ s|^#(UpdateLogFile) .+$|$1 %{_localstatedir}/log/clamav/freshclam.log|;
+ s|^#(LogSyslog)|$1|;
+ s|^#(DatabaseOwner) .+$|$1 clam|;
+ s|^(Checks) .+$|$1 24|;
+ s|^#(NotifyClamd) .+$|$1 %{_sysconfdir}/clamd.conf|;
+ ' etc/freshclam.conf
+
+cat <<EOF >clamd.logrotate
+%{_localstatedir}/log/clamav/clamd.log {
+ missingok
+ notifempty
+ create 644 clam clam
+ postrotate
+ killall -HUP clamd 2>/dev/null || :
+ endscript
+}
+EOF
-## ------------------------------------------------------------
+cat <<EOF >freshclam.logrotate
+%{_localstatedir}/log/clamav/freshclam.log {
+ missingok
+ notifempty
+ create 644 clam clam
+}
+EOF
+
+cat <<'EOF' >freshclam.cron
+#!/bin/sh
+
+### A simple update script for the clamav virus database.
+### This could as well be replaced by a SysV script.
+
+### fix log file if needed
+LOG_FILE="%{_localstatedir}/log/clamav/freshclam.log"
+if [ ! -f "$LOG_FILE" ]; then
+ touch "$LOG_FILE"
+ chmod 644 "$LOG_FILE"
+ chown clam.clam "$LOG_FILE"
+fi
+
+%{_bindir}/freshclam \
+ --quiet \
+ --datadir="%{_localstatedir}/clamav" \
+ --log="$LOG_FILE" \
+ --log-verbose \
+ --daemon-notify="%{_sysconfdir}/clamd.conf"
+EOF
+
+%{__cat} <<EOF >clamav-milter.sysconfig
+### Simple config file for clamav-milter, you should
+### read the documentation and tweak it as you wish.
+
+CLAMAV_FLAGS="
+ --config-file=%{_sysconfdir}/clamd.conf
+ --force-scan
+ --local
+ --max-children=10
+ --noreject
+ --outgoing
+ --quiet
+"
+SOCKET_ADDRESS="local:%{_localstatedir}/clamav/clmilter.socket"
+EOF
%build
-CFLAGS="$RPM_OPT_FLAGS -Wall -W -Wmissing-prototypes -Wmissing-declarations -std=gnu99"
-export LDFLAGS='-Wl,--as-needed'
-# HACK: remove me, when configure uses $LIBS instead of $LDFLAGS for milter check
-export LIBS='-lmilter -lpthread'
-# IPv6 check is buggy and does not work when there are no IPv6 interface on build machine
-export have_cv_ipv6=yes
-%configure --disable-clamav --with-dbdir=/var/lib/clamav \
- --enable-milter --disable-static \
- --disable-rpath \
- --with-user=%username \
- --with-group=%username \
- %{!?with_unrar:--disable-unrar}
-
-# TODO: check periodically that CLAMAVUSER is used for freshclam only
-
-
-# build with --as-needed and disable rpath
-sed -i \
- -e 's! -shared ! -Wl,--as-needed\0!g' \
- -e '/sys_lib_dlsearch_path_spec=\"\/lib \/usr\/lib /s!\"\/lib \/usr\/lib !/\"/%_lib /usr/%_lib !g' \
- libtool
-
-
+%configure \
+ --program-prefix="%{?_program_prefix}" \
+%{!?_without_milter:--enable-milter} \
+ --disable-clamav \
+ --disable-static \
+ --disable-zlib-vcheck \
+ --disable-unrar \
+ --enable-id-check \
+ --enable-dns \
+ --with-dbdir="%{_localstatedir}/clamav" \
+ --with-group="clam" \
+ --with-libcurl \
+ --with-user="clam"
make %{?_smp_mflags}
-
-## ------------------------------------------------------------
-
%install
-rm -rf "$RPM_BUILD_ROOT" _doc*
-make DESTDIR="$RPM_BUILD_ROOT" install
-
-function smartsubst() {
- local tmp
- local regexp=$1
- shift
-
- tmp=$(mktemp /tmp/%name-subst.XXXXXX)
- for i; do
- sed -e "$regexp" "$i" >$tmp
- cmp -s $tmp "$i" || cat $tmp >"$i"
- rm -f $tmp
- done
-}
-
-
-install -d -m755 \
- ${RPM_BUILD_ROOT}%_sysconfdir/{mail,clamd.d,cron.d,logrotate.d,sysconfig,event.d} \
- ${RPM_BUILD_ROOT}%_var/log \
- ${RPM_BUILD_ROOT}%milterstatedir \
- ${RPM_BUILD_ROOT}%pkgdatadir/template \
- ${RPM_BUILD_ROOT}%_initrddir \
- ${RPM_BUILD_ROOT}%homedir \
- ${RPM_BUILD_ROOT}%scanstatedir
+rm -rf %{buildroot}
+make install DESTDIR="%{buildroot}"
-rm -f ${RPM_BUILD_ROOT}%_sysconfdir/clamd.conf \
- ${RPM_BUILD_ROOT}%_libdir/*.la
-
-
-touch ${RPM_BUILD_ROOT}%homedir/daily.cld
-touch ${RPM_BUILD_ROOT}%homedir/main.cld
+install -Dp -m0755 %{SOURCE1} %{buildroot}%{_initrddir}/clamd
+install -Dp -m0755 freshclam.cron %{buildroot}%{_sysconfdir}/cron.daily/freshclam
+install -Dp -m0644 freshclam.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/freshclam
+install -Dp -m0644 clamd.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/clamav
+%if %{!?_without_milter:1}0
+install -Dp -m0755 %{SOURCE2} %{buildroot}%{_initrddir}/clamav-milter
+install -Dp -m0644 clamav-milter.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/clamav-milter
+%else
+rm %{buildroot}%{_mandir}/man8/clamav-milter.8*
+%endif
-## prepare the server-files
-mkdir _doc_server
-install -m644 -p %SOURCE2 _doc_server/clamd.sysconfig
-install -m644 -p %SOURCE3 _doc_server/clamd.logrotate
-install -m755 -p %SOURCE7 _doc_server/clamd.init
-install -m644 -p %SOURCE5 _doc_server/README
-install -m644 -p etc/clamd.conf _doc_server/clamd.conf
+install -d -m0755 %{buildroot}%{_localstatedir}/log/clamav/
+touch %{buildroot}%{_localstatedir}/log/clamav/freshclam.log
+touch %{buildroot}%{_localstatedir}/log/clamav/clamd.log
-install -m644 -p %SOURCE1 $RPM_BUILD_ROOT%pkgdatadir
-install -m755 -p %SOURCE100 $RPM_BUILD_ROOT%pkgdatadir
-cp -pa _doc_server/* $RPM_BUILD_ROOT%pkgdatadir/template
-ln -s %pkgdatadir/clamd-wrapper $RPM_BUILD_ROOT%_initrddir/clamd-wrapper
+install -d -m0755 %{buildroot}%{_localstatedir}/run/clamav/
-smartsubst 's!/usr/share/clamav!%pkgdatadir!g' $RPM_BUILD_ROOT%pkgdatadir/clamd-wrapper
+%post
+/sbin/ldconfig
+ZONES="/usr/share/zoneinfo/zone.tab"
+CONFIG="/etc/sysconfig/clock"
-## prepare the update-files
-install -m644 -p %SOURCE6 ${RPM_BUILD_ROOT}%_sysconfdir/logrotate.d/clamav-update
-install -m755 -p %SOURCE8 ${RPM_BUILD_ROOT}%_sbindir/clamav-notify-servers
-touch ${RPM_BUILD_ROOT}%freshclamlog
+if [ -r "$CONFIG" -a -r "$ZONES" ]; then
+ source "$CONFIG"
+ export CODE="$(grep -E "\b$ZONE\b" "$ZONES" | head -1 | cut -f1 | tr [A-Z] [a-z])"
+fi
-install -p -m0755 %SOURCE200 $RPM_BUILD_ROOT%pkgdatadir/freshclam-sleep
-install -p -m0644 %SOURCE201 $RPM_BUILD_ROOT%_sysconfdir/sysconfig/freshclam
-install -p -m0600 %SOURCE202 $RPM_BUILD_ROOT%_sysconfdir/cron.d/clamav-update
+if [ -z "$CODE" ]; then
+ export CODE="local"
+fi
-smartsubst 's!webmaster,clamav!webmaster,%username!g;
- s!/usr/share/clamav!%pkgdatadir!g;
- s!/usr/bin!%_bindir!g;
- s!/usr/sbin!%_sbindir!g;' \
- $RPM_BUILD_ROOT%_sysconfdir/cron.d/clamav-update \
- $RPM_BUILD_ROOT%pkgdatadir/freshclam-sleep
+%{__perl} -pi -e '
+ s|^(DatabaseMirror) database\.clamav\.net$|$1 db.$ENV{"CODE"}.clamav.net\n$1 db.local.clamav.net|;
+ s|^(DatabaseMirror) db\.\.clamav\.net$|$1 db.$ENV{"CODE"}.clamav.net\n$1 db.local.clamav.net|;
+ ' %{_sysconfdir}/freshclam.conf{,.rpmnew} &>/dev/null || :
+%postun -p /sbin/ldconfig
-### The scanner stuff
-sed -e 's!<SERVICE>!scan!g;s!<USER>!%scanuser!g' \
- etc/clamd.conf > $RPM_BUILD_ROOT%_sysconfdir/clamd.d/scan.conf
+%pre
+getent group clam >/dev/null || groupadd -r clam
+getent passwd clam >/dev/null || \
+useradd -r -g clam -d /var/clamav -s /sbin/nologin \
+ -c "Clam Anti Virus Checker" clam
+exit 0
-sed -e 's!<SERVICE>!scan!g;' $RPM_BUILD_ROOT%pkgdatadir/template/clamd.init \
- > $RPM_BUILD_ROOT%_initrddir/clamd.scan
+%pre -n clamd
+getent group clam >/dev/null || groupadd -r clam
+getent passwd clam >/dev/null || \
+useradd -r -g clam -d /var/clamav -s /sbin/nologin \
+ -c "Clam Anti Virus Checker" clam
+exit 0
-install -p -m 644 %SOURCE410 $RPM_BUILD_ROOT%_sysconfdir/event.d/clamd.scan
+%post -n clamd
+/sbin/chkconfig --add clamd
-touch $RPM_BUILD_ROOT%scanstatedir/clamd.sock
+%preun -n clamd
+if [ $1 -eq 0 ]; then
+ /sbin/service clamd stop &>/dev/null || :
+ /sbin/chkconfig --del clamd
+fi
+%postun -n clamd
+/sbin/service clamd condrestart &>/dev/null || :
-### The milter stuff
-sed -r \
- -e 's!^#?(User).*!\1 %milteruser!g' \
- -e 's!^#?(AllowSupplementaryGroups|LogSyslog) .*!\1 yes!g' \
- -e 's! /tmp/clamav-milter.socket! %milterstatedir/clamav-milter.socket!g' \
- -e 's! /var/run/clamav-milter.pid! %milterstatedir/clamav-milter.pid!g' \
- -e 's! /tmp/clamav-milter.log! %milterlog!g' \
- etc/clamav-milter.conf > $RPM_BUILD_ROOT%_sysconfdir/mail/clamav-milter.conf
+%post milter
+/sbin/chkconfig --add clamav-milter
-install -p -m 644 %SOURCE310 $RPM_BUILD_ROOT%_sysconfdir/event.d/clamav-milter
-install -p -m 755 %SOURCE320 $RPM_BUILD_ROOT%_initrddir/clamav-milter
+%preun milter
+if [ $1 -eq 0 ]; then
+ /sbin/service clamav-milter stop &>/dev/null || :
+ /sbin/chkconfig --del clamav-milter
+fi
+%postun milter
+/sbin/service clamav-milter condrestart &>/dev/null || :
-rm -f $RPM_BUILD_ROOT%_sysconfdir/clamav-milter.conf
-touch $RPM_BUILD_ROOT{%milterstatedir/clamav-milter.socket,%milterlog}
+%pre db
+getent group clam >/dev/null || groupadd -r clam
+getent passwd clam >/dev/null || \
+useradd -r -g clam -d /var/clamav -s /sbin/nologin \
+ -c "Clam Anti Virus Checker" clam
+exit 0
-%{!?with_upstart:rm -rf $RPM_BUILD_ROOT%_sysconfdir/event.d}
+%clean
+rm -rf %{buildroot}
-## ------------------------------------------------------------
+%files
+%defattr(-, root, root, 0755)
+%doc AUTHORS BUGS ChangeLog COPYING FAQ INSTALL NEWS README test/
+%doc docs/*.pdf etc/freshclam.conf
+%doc %{_mandir}/man1/sigtool.1*
+%doc %{_mandir}/man1/clamscan.1*
+%doc %{_mandir}/man1/freshclam.1*
+%doc %{_mandir}/man5/freshclam.conf.5*
+%config(noreplace) %{_sysconfdir}/freshclam.conf
+%{_bindir}/clamscan
+%{_bindir}/freshclam
+%{_bindir}/sigtool
+%{_bindir}/clambc
+%{_libdir}/libclamav.so.*
+
+%files -n clamd
+%defattr(-, root, root, 0755)
+%doc etc/clamd.conf
+%doc %{_mandir}/man1/clamdscan.1*
+%doc %{_mandir}/man1/clamconf.1*
+%doc %{_mandir}/man1/clamdtop.1*
+%doc %{_mandir}/man5/clamd.conf.5*
+%doc %{_mandir}/man8/clamd.8*
+%config(noreplace) %{_sysconfdir}/clamd.conf
+%config(noreplace) %{_sysconfdir}/logrotate.d/clamav
+%config %{_initrddir}/clamd
+%{_sbindir}/clamd
+%{_bindir}/clamconf
+%{_bindir}/clamdscan
+
+%defattr(0644, clam, clam, 0755)
+%{_localstatedir}/run/clamav/
+%dir %{_localstatedir}/clamav/
+%dir %{_localstatedir}/log/clamav/
+%ghost %{_localstatedir}/log/clamav/clamd.log
+%exclude %{_localstatedir}/clamav/*
+
+%if %{!?_without_milter:1}0
+%files milter
+%defattr(-, root, root, 0755)
+%doc %{_mandir}/man5/clamav-milter.conf.5*
+%doc %{_mandir}/man8/clamav-milter.8*
+%config(noreplace) %{_sysconfdir}/sysconfig/clamav-milter
+%config %{_initrddir}/clamav-milter
+%{_sbindir}/clamav-milter
+%config(noreplace) %{_sysconfdir}/clamav-milter.conf
+%endif
-%clean
-rm -rf "$RPM_BUILD_ROOT"
+%files db
+%defattr(-, root, root, 0755)
+%config(noreplace) %{_sysconfdir}/cron.daily/freshclam
+%config(noreplace) %{_sysconfdir}/logrotate.d/freshclam
-## ------------------------------------------------------------
+%defattr(0644, clam, clam, 0755)
+%config(noreplace) %verify(user group mode) %{_localstatedir}/clamav/
+%dir %{_localstatedir}/log/clamav/
+%ghost %{_localstatedir}/log/clamav/freshclam.log
-%triggerprein filesystem -- clamav-filesystem < 0.96
-## REMOVE me in F14 or F15 (added in pre F12)
-! /usr/bin/id clamav &>/dev/null || /usr/bin/id %username &>/dev/null || {
- /usr/sbin/usermod -l %username clamav || :
- /usr/sbin/groupmod -n %username clamav || :
- logger -t rpm/clamav "Renamed clamav user+group to %username" || :
-}
+%files devel
+%defattr(-, root, root, 0755)
+%{_bindir}/clamav-config
+%{_includedir}/clamav.h
+%{_libdir}/libclamav.so
+%{_libdir}/pkgconfig/libclamav.pc
+#%{_libdir}/libclamav.a
+%exclude %{_libdir}/libclamav.la
-%pre filesystem
-%__fe_groupadd 4 -r %username &>/dev/null || :
-%__fe_useradd 4 -r -s /sbin/nologin -d %homedir -M \
- -c 'Clamav database update user' -g %username %username &>/dev/null || :
+%changelog
+* Tue Feb 08 2011 Kevin Fenzi <kevin(a)tummy.com> - 0.97-1
+- Update to 0.97
+- Fix up for current guidelines.
-%postun filesystem
-%__fe_userdel %username &>/dev/null || :
-%__fe_groupdel %username &>/dev/null || :
+* Fri Nov 23 2007 Kevin Fenzi <kevin(a)tummy.com> - 0.91.2-3
+- Change username to get upgrades from fedora versions working.
+* Thu Nov 22 2007 Kevin Fenzi <kevin(a)tummy.com> - 0.91.2-2
+- Initial changes for EPEL version.
-%pre scanner
-%__fe_groupadd 49 -r %scanuser &>/dev/null || :
-%__fe_useradd 49 -r -s /sbin/nologin -d / -M \
- -g %scanuser %scanuser &>/dev/null || :
+* Tue Aug 21 2007 Dag Wieers <dag(a)wieers.com> - 0.91.2-1
+- Updated to release 0.91.2.
-%postun scanner
-%__fe_userdel %scanuser &>/dev/null || :
-%__fe_groupdel %scanuser &>/dev/null || :
+* Tue Jul 17 2007 Dag Wieers <dag(a)wieers.com> - 0.91.1-1
+- Updated to release 0.91.1.
+* Wed Jul 11 2007 Dag Wieers <dag(a)wieers.com> - 0.91-1
+- Updated to release 0.91.
-%post scanner-sysvinit
-/sbin/chkconfig --add clamd.scan
+* Thu May 31 2007 Dag Wieers <dag(a)wieers.com> - 0.90.3-1
+- Updated to release 0.90.3.
-%preun scanner-sysvinit
-test "$1" != 0 || %_initrddir/clamd.scan stop &>/dev/null || :
-test "$1" != 0 || /sbin/chkconfig --del clamd.scan
+* Fri Apr 27 2007 Dag Wieers <dag(a)wieers.com> - 0.90.2-2
+- Added clamav-milter support for EL2.1 now that it comes with a newer sendmail. (Tom G. Christensen)
-%postun scanner-sysvinit
-test "$1" = 0 || %_initrddir/clamd.scan condrestart >/dev/null || :
+* Sun Apr 15 2007 Dag Wieers <dag(a)wieers.com> - 0.90.2-1
+- Updated to release 0.90.2.
+* Fri Mar 09 2007 Dag Wieers <dag(a)wieers.com> - 0.90.1-4
+- Removed circular dependency.
-%post scanner-upstart
-/usr/bin/killall -u %scanuser clamd 2>/dev/null || :
+* Thu Mar 08 2007 Dag Wieers <dag(a)wieers.com> - 0.90.1-3
+- Cleaned up default options to clamav-milter. (Adam T. Bowen)
+- Removed -b/--bounce as it is no longer recognized. (Gerald Teschl)
-%preun scanner-upstart
-test "$1" != "0" || /sbin/initctl -q stop clamd.scan || :
+* Mon Mar 05 2007 Dag Wieers <dag(a)wieers.com> - 0.90.1-2
+- Removed the erroneous --dont-clean-log from the clamav-milter sysconfig. (Gerald Teschl)
+* Fri Mar 02 2007 Dag Wieers <dag(a)wieers.com> - 0.90.1-1
+- Updated to release 0.90.1.
+* Tue Feb 20 2007 Dag Wieers <dag(a)wieers.com> - 0.90-3
+- Do the right thing...
-%post update
-test -e %freshclamlog || {
- touch %freshclamlog
- %__chmod 0664 %freshclamlog
- %__chown root:%username %freshclamlog
-}
+* Mon Feb 19 2007 Dag Wieers <dag(a)wieers.com> - 0.90-2
+- The tarball was re-rolled before public release. Sigh.
+* Tue Feb 13 2007 Dag Wieers <dag(a)wieers.com> - 0.90-1
+- Updated to release 0.90.
-%triggerin milter -- clamav-scanner
-# Add the milteruser to the scanuser group; this is required when
-# milter and clamd communicate through local sockets
-/usr/sbin/usermod -a -G %scanuser %milteruser &>/dev/null || :
+* Tue Dec 12 2006 Dag Wieers <dag(a)wieers.com> - 0.88.7-1
+- Updated to release 0.88.7.
-%pre milter
-%__fe_groupadd 5 -r %milteruser &>/dev/null || :
-%__fe_useradd 5 -r -s /sbin/nologin -d %milterstatedir -M \
- -c 'Clamav Milter User' -g %milteruser %milteruser &>/dev/null || :
+* Sun Nov 05 2006 Dag Wieers <dag(a)wieers.com> - 0.88.6-1
+- Updated to release 0.88.6.
+- Added condrestart to sysv scripts. (Tsai Li Ming)
-%post milter
-test -e %milterlog || {
- touch %milterlog
- chmod 0620 %milterlog
- chown root:%milteruser %milterlog
-}
+* Sat Oct 28 2006 Dag Wieers <dag(a)wieers.com> - 0.88.5-2
+- Added missing clamav dependency to clamav-db.
-%postun milter
-%__fe_userdel %milteruser &>/dev/null || :
-%__fe_groupdel %milteruser &>/dev/null || :
+* Sun Oct 15 2006 Dag Wieers <dag(a)wieers.com> - 0.88.5-1
+- Updated to release 0.88.5.
+* Mon Aug 07 2006 Dag Wieers <dag(a)wieers.com> - 0.88.4-1
+- Updated to release 0.88.4.
-%post milter-sysvinit
-/sbin/chkconfig --add clamav-milter
+* Mon Aug 07 2006 Dag Wieers <dag(a)wieers.com> - 0.88.3-2
+- Incorporated UPX heap overflow fix.
-%preun milter-sysvinit
-test "$1" != 0 || %_initrddir/clamav-milter stop &>/dev/null || :
-test "$1" != 0 || /sbin/chkconfig --del clamav-milter
+* Sat Jul 01 2006 Dag Wieers <dag(a)wieers.com> - 0.88.3-1
+- Updated to release 0.88.3.
-%postun milter-sysvinit
-test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
+* Sun Apr 30 2006 Dag Wieers <dag(a)wieers.com> - 0.88.2-1
+- Updated to release 0.88.2.
+* Tue Apr 04 2006 Dag Wieers <dag(a)wieers.com> - 0.88.1-1
+- Updated to release 0.88.1.
-%post milter-upstart
-/usr/bin/killall -u %milteruser clamav-milter 2>/dev/null || :
+* Mon Jan 09 2006 Dag Wieers <dag(a)wieers.com> - 0.88-1
+- Updated to release 0.88.
-%preun milter-upstart
-test "$1" != "0" || /sbin/initctl -q stop clamav-milter || :
+* Sun Nov 13 2005 Dries Verachtert <dries(a)ulyssis.org> - 0.87.1-1
+- Updated to release 0.87.1.
+* Sat Sep 17 2005 Dag Wieers <dag(a)wieers.com> - 0.87-1
+- Updated to release 0.87.
-%post lib -p /sbin/ldconfig
-%postun lib -p /sbin/ldconfig
+* Mon Jul 25 2005 Dag Wieers <dag(a)wieers.com> - 0.86.2-1
+- Updated to release 0.86.2.
+* Mon Jul 11 2005 Dag Wieers <dag(a)wieers.com> - 0.86.1-1
+- Updated to release 0.86.1.
-%files
-%defattr(-,root,root,-)
-%doc AUTHORS BUGS COPYING ChangeLog FAQ NEWS README UPGRADE
-%doc docs/*.pdf
-%_bindir/*
-%_mandir/man[15]/*
-%exclude %_bindir/clamav-config
-%exclude %_bindir/freshclam
-%exclude %_mandir/*/freshclam*
+* Mon May 16 2005 Dag Wieers <dag(a)wieers.com> - 0.85.1-1
+- Updated to release 0.85.1.
-## -----------------------
+* Fri Apr 29 2005 Dag Wieers <dag(a)wieers.com> - 0.84-1
+- Updated to release 0.84.
-%files lib
-%defattr(-,root,root,-)
-%_libdir/*.so.*
+* Mon Feb 14 2005 Dag Wieers <dag(a)wieers.com> - 0.83-1
+- Updated to release 0.83.
-## -----------------------
+* Thu Feb 10 2005 Dag Wieers <dag(a)wieers.com> - 0.82-2
+- Fix for false positive on RIFF files. (Roger Jochem)
-%files devel
-%defattr(-,root,root,-)
-%_includedir/*
-%_libdir/*.so
-%pkgdatadir/template
-%pkgdatadir/clamd-gen
-%_libdir/pkgconfig/*
-%_bindir/clamav-config
+* Mon Feb 07 2005 Dag Wieers <dag(a)wieers.com> - 0.82-1
+- Updated to release 0.82.
-## -----------------------
+* Thu Jan 27 2005 Dag Wieers <dag(a)wieers.com> - 0.81-1
+- Improved logrotate scripts. (Filippo Grassilli)
+- Updated to release 0.81.
-%files filesystem
-%attr(-,%username,%username) %dir %homedir
-%attr(-,root,root) %dir %pkgdatadir
+* Wed Dec 01 2004 Dag Wieers <dag(a)wieers.com> - 0.80-2
+- Added %%dir /var/clamav/log. (Adam Bowns)
+- Changed logrotate script to use clamd.log. (Stuart Schneider)
+- Added curl dependency. (Petr Kristof)
+- Synchronized some options from Petr. (Petr Kristof)
+- Fixed another clamav.conf reference. (Michael Best)
-## -----------------------
+* Mon Nov 01 2004 Dag Wieers <dag(a)wieers.com> - 0.80-1
+- Updated package description. (Arvin Troels)
+- Incorporated fixes from Jima. (Jima)
+- Config clamav.conf renamed to clamd.conf.
+- Removed obsolete patch.
+- Added macros for building without milter.
+- Updated to release 0.80.
-%files data
-%defattr(-,%username,%username,-)
-# 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
+* Fri Jul 30 2004 Dag Wieers <dag(a)wieers.com> - 0.75.1-1
+- Added obsoletes for fedora.us.
+- Updated to release 0.75.1.
+* Mon Jul 26 2004 Dag Wieers <dag(a)wieers.com> - 0.75-2
+- Fixed a problem where $CODE was empty.
-%files data-empty
-%defattr(-,%username,%username,-)
-%ghost %attr(0664,%username,%username) %homedir/*.cvd
+* Fri Jul 23 2004 Dag Wieers <dag(a)wieers.com> - 0.75-1
+- Updated to release 0.75.
+* Wed Jun 30 2004 Dag Wieers <dag(a)wieers.com> - 0.74-1
+- Updated to release 0.74.
-## -----------------------
+* Tue Jun 15 2004 Dag Wieers <dag(a)wieers.com> - 0.73-1
+- Updated to release 0.73.
-%files update
-%defattr(-,root,root,-)
-%_bindir/freshclam
-%_mandir/*/freshclam*
-%pkgdatadir/freshclam-sleep
-%config(noreplace) %verify(not mtime) %_sysconfdir/freshclam.conf
-%config(noreplace) %verify(not mtime) %_sysconfdir/logrotate.d/*
-%config(noreplace) %_sysconfdir/cron.d/*
-%config(noreplace) %_sysconfdir/sysconfig/freshclam
+* Thu Jun 03 2004 Dag Wieers <dag(a)wieers.com> - 0.72-1
+- Updated to release 0.72.
-%ghost %attr(0664,root,%username) %verify(not size md5 mtime) %freshclamlog
-%ghost %attr(0664,%username,%username) %homedir/*.cld
+* Thu May 20 2004 Dag Wieers <dag(a)wieers.com> - 0.71-1
+- Updated to release 0.71.
+* Sun May 02 2004 Dag Wieers <dag(a)wieers.com> - 0.70-2
+- Fixed the installation check for conf files. (Richard Soderberg, Udo Ruecker)
+- Changed the init-order of the sysv scripts. (Will McCutcheon)
+- Changes to the default configuration files.
-## -----------------------
+* Sat Mar 17 2004 Dag Wieers <dag(a)wieers.com> - 0.70-1
+- Updated to release 0.70.
-%files server
-%defattr(-,root,root,-)
-%doc _doc_server/*
-%_mandir/man[58]/clamd*
-%_sbindir/*
-%pkgdatadir/clamd-wrapper
-%dir %_sysconfdir/clamd.d
+* Tue Mar 16 2004 Dag Wieers <dag(a)wieers.com> - 0.68-1
+- Updated to release 0.68.
-%exclude %_sbindir/*milter*
-%exclude %_mandir/man8/clamav-milter*
+* Fri Mar 12 2004 Dag Wieers <dag(a)wieers.com> - 0.67.1-1
+- Updated to release 0.67-1.
+- Added clamdwatch and trashcan to clamd.
+* Mon Mar 08 2004 Dag Wieers <dag(a)wieers.com> - 0.67-1
+- Personalized SPEC file.
-%files server-sysvinit
-%defattr(-,root,root,-)
-%_initrddir/clamd-wrapper
+* Mon Aug 22 2003 Matthias Saou/Che
+- Added "--without milter" build option. (Matthias Saou)
+- Fixed freshclam cron (Matthias Saou)
+- Built the new package. (Che)
+* Tue Jun 24 2003 Che
+- clamav-milter introduced.
+- a few more smaller fixes.
-## -----------------------
+* Sun Jun 22 2003 Che
+- version upgrade
-%files scanner
-%defattr(-,root,root,-)
-%dir %attr(0710,%scanuser,%scanuser) %scanstatedir
-%config(noreplace) %_sysconfdir/clamd.d/scan.conf
-%ghost %scanstatedir/clamd.sock
+* Mon Jun 16 2003 Che
+- rh9 build
+- various fixes
+- got rid of rpm-helper prereq
-%files scanner-sysvinit
-%attr(0755,root,root) %config %_initrddir/clamd.scan
+* Fri Mar 24 2003 Che
+- some cleanups and fixes
+- new patch added
-%if 0%{?with_upstart:1}
-%files scanner-upstart
-%defattr(-,root,root,-)
-%config(noreplace) %_sysconfdir/event.d/clamd.scan
-%endif
+* Fri Nov 22 2002 Che
+- fixed a config patch issue
-## -----------------------
+* Fri Nov 22 2002 Che
+- version upgrade and some fixes
-%files milter
-%defattr(-,root,root,-)
-%doc clamav-milter/README.fedora
-%_sbindir/*milter*
-%_mandir/man8/clamav-milter*
-%config(noreplace) %_sysconfdir/mail/clamav-milter.conf
-%ghost %attr(0620,root,%milteruser) %verify(not size md5 mtime) %milterlog
-%attr(0710,%milteruser,%milteruser) %dir %milterstatedir
-%ghost %milterstatedir/*
-
-%files milter-sysvinit
-%defattr(-,root,root,-)
-%config %_initrddir/clamav-milter
-
-%if 0%{?with_upstart:1}
-%files milter-upstart
-%defattr(-,root,root,-)
-%config(noreplace) %_sysconfdir/event.d/clamav-milter
-%endif
+* Sat Nov 02 2002 Che
+- version upgrade
+* Wed Oct 24 2002 Che
+- some important changes for lsb compliance
-%changelog
-* Sat Nov 21 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
-- adjusted chkconfig positions for clamav-milter (#530101)
-
-* Thu Oct 29 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.3-1200
-- updated to 0.95.3
-
-* Sun Sep 13 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
-- conditionalized build of noarch subpackages to ease packaging under RHEL5
-
-* Sun Aug 9 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.2-5
-- modified freshclam configuration to log by syslog by default
-- disabled LocalSocket option in sample configuration
-- fixed clamav-milter sysv initscript to use bash interpreter and to
- be disabled by default
-
-* Sat Aug 8 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.2-4
-- renamed 'clamav' user/group to 'clamupdate'
-- add the '%milteruser' user to the '%scanuser' group when the -scanner
- subpackage is installed
-
-* Fri Jul 24 2009 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0.95.2-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
-
-* Thu Jun 11 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.2-1
-- updated to 0.95.2
-
-* Sun Apr 19 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.1-3
-- fixed '--without upstart' operation
-
-* Wed Apr 15 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.1-2
-- added '%%bcond_without upstart' conditional to ease skipping of
- -upstart subpackage creation e.g. on EL5 systems
-- fixed Provides/Obsoletes: typo in -milter-sysvinit subpackage which
- broke update path
-
-* Fri Apr 10 2009 Robert Scheck <robert(a)fedoraproject.org> - 0.95.1-1
-- Upgrade to 0.95.1 (#495039)
-
-* Wed Mar 25 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95-1
-- updated to final 0.95
-- added ncurses-devel (-> clamdtop) BR
-- enforced IPv6 support
-
-* Sun Mar 8 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95-0.1.rc1
-- updated to 0.95rc1
-- added -upstart subpackages
-- renamed -sysv to -sysvinit to make -upstart win the default dep resolving
-- reworked complete milter stuff
-- added -scanner subpackage which contains a preconfigured daemon
- (e.g. for use by -milter)
-- moved %%changelog entries from 2006 and before into ChangeLog-rpm.old
-
-* Wed Feb 25 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.94.2-3
-- made some subpackages noarch
-- fixed typo in SysV initscript which removes 'touch' file (#473513)
-
-* Mon Feb 23 2009 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0.94.2-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
-
-* Tue Dec 02 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.94.2-1
-- Upgrade to 0.94.2 (#474002)
-
-* Wed Nov 05 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.94.1-1
-- Upgrade to 0.94.1
-
-* Sun Oct 26 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.94-1
-- Upgrade to 0.94 (SECURITY), fixes #461461:
-- CVE-2008-1389 Invalid memory access in the CHM unpacker
-- CVE-2008-3912 Out-of-memory NULL pointer dereference in mbox/msg
-- CVE-2008-3913 Memory leak in code path in freshclam's manager.c
-- CVE-2008-3914 Multiple file descriptor leaks on the code paths
-
-* Sun Jul 13 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93.3-1
-- updated to 0.93.3; another fix for CVE-2008-2713 (out-of-bounds read
- on petite files)
-- put pid instead of pgrp into pidfile of clamav-milter (bz #452359)
-- rediffed patches
-
-* Tue Jun 17 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93.1-1
-- updated to 0.93.1
-- rediffed -path patch
-- CVE-2008-2713 Invalid Memory Access Denial Of Service Vulnerability
-
-* Mon Apr 14 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93-1
-- updated to final 0.93
-- removed daily.inc + main.inc directories; they are now replaced by
- *.cld containers
-- trimmed down MAILTO list of cronjob to 'root' again; every well
- configured system has an alias for this recipient
-
-* Wed Mar 12 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93-0.1.rc1
-- moved -milter scriptlets into -milter-core subpackage
-- added a requirement on the milteruser to the -milter-sendmail
- subpackage (reported by Bruce Jerrick)
-
-* Tue Mar 4 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93-0.0.rc1
-- updated to 0.93rc1
-- fixed rpath issues
-
-* Mon Feb 11 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.92.1-1
-- updated to 0.92.1
-
-* Tue Jan 1 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.92-6
-- redisabled unrar stuff completely by using clean sources
-- splitted -milter subpackage into pieces to allow use without sendmail
- (#239037)
-
-* Tue Jan 1 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.92-5
-- use a better way to disable RPATH-generation (needed for '--with
- unrar' builds)
-
-* Mon Dec 31 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.92-4
-- added a README.fedora to the milter package (#240610)
-- ship original sources again; unrar is now licensed correctly (no more
- stolen code put under GPL). Nevertheless, this license is not GPL
- compatible, and to allow libclamav to be used by GPL applications,
- unrar is disabled by a ./configure switch.
-- use pkg-config in clamav-config to emulate --cflags and --libs
- operations (fixes partly multilib issues)
-- registered some more auto-updated files and marked them as %%ghost
-
-* Fri Dec 21 2007 Tom "spot" Callaway <tcallawa(a)redhat.com> - 0.92-3
-- updated to 0.92 (SECURITY):
-- CVE-2007-6335 MEW PE File Integer Overflow Vulnerability
-
-* Mon Oct 29 2007 Tom "spot" Callaway <tcallawa(a)redhat.com> - 0.91.2-3
-- remove RAR decompression code from source tarball because of
- legal problems (resolves 334371)
-- correct license tag
-
-* Mon Sep 24 2007 Jesse Keating <jkeating(a)redhat.com> - 0.91.2-2
-- Bump release for upgrade path.
-
-* Sat Aug 25 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.91.2-1
-- updated to 0.91.2 (SECURITY):
-- CVE-2007-4510 DOS in RTF parser
-- DOS in html normalizer
-- arbitrary command execution by special crafted recipients in
- clamav-milter's black-hole mode
-- fixed an open(2) issue
-
-* Tue Jul 17 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.91.1-0
-- updated to 0.91.1
-
-* Thu Jul 12 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.91-1
-- updated to 0.91
-
-* Thu May 31 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90.3-1
-- updated to 0.90.3
-- BR tcpd.h instead of tcp_wrappers(-devel) to make it build both
- in FC6- and F7+
-
-* Fri Apr 13 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90.2-1
-- [SECURITY] updated to 0.90.2; fixes CVE-2007-1745, CVE-2007-1997
-
-* Fri Mar 2 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90.1-2
-- BR 'tcp_wrappers-devel' instead of plain 'tcp_wrappers'
-
-* Fri Mar 2 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90.1-1
-- updated to 0.90.1
-- updated %%doc list
-
-* Sun Feb 18 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90-1
-- updated to final 0.90
-- removed -visibility patch since fixed upstream
-
-* Sun Feb 4 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90-0.3.rc3
-- build with -Wl,-as-needed and cleaned up pkgconfig file
-- removed old hack which forced installation of freshclam.conf; related
- check was removed upstream
-- removed static library
-- removed %%changelog entries from before 2004
-
-* Sat Feb 3 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90-0.2.rc3
-- updated to 0.90rc3
-- splitted mandatory parts from the data-file into a separate -filesystem
- subpackage
-- added a -data-empty subpackage to allow a setup where database is
- updated per cron-job and user does not want to download the large
- -data package with outdated virus definitations (#214949)
-- %%ghost'ed the files downloaded by freshclam
+* Wed Oct 23 2002 Che
+- initial rpm release
diff --git a/clamd-README b/clamd-README
deleted file mode 100644
index e62b487..0000000
--- a/clamd-README
+++ /dev/null
@@ -1,58 +0,0 @@
-To create individual clamd-instance take the following files and
-modify/copy them in the suggested way:
-
-clamd.conf:
- * set LogFile, PidFile, LocalSocket and User to suitable values
- * place this file into /etc/clamd.d with an unique service-name;
- e.g. as /etc/clamd.d/<SERVICE>.conf
-
- To make logfile rotation work properly, the LogFile should be
- writable for the assigned User. Recommended way to reach this, is
- to:
- * make it owned by the User's *group*
- * assign at least 0620 (u+rw,g+w) permissions
-
- A suitable command might be
- | # touch <logfile>
- | # chgrp <user> <logfile>
- | # chmod 0620 <logfile>
-
- NEVER use 'clamav' as the user since he can modify the database.
- This is the user who is running the application; e.g. for mimedefang
- (http://www.roaringpenguin.com/mimedefang), the user might be
- 'defang'.Theoretically, distinct users could be used, but it must be
- made sure that the application-user can write into the socket-file,
- and that the clamd-user can access the files asked by the
- application to be checked.
-
-
-clamd.logrotate:
- * set the correct value for the logfile
- * place it into /etc/logrotate.d
-
-clamd.sysconfig:
- * set the name of the config-file and the local socket
- * copy it to /etc/sysconfig/clamd.<SERVICE>
-
-clamd.init:
- * set the service-name
- * place it into /etc/init.d/ with an unique name and activate it
- (e.g. with /sbin/chkconfig clamd.<SERVICE> on)
-
-Additionally, a symlink must be set to clamd in a way like
- | # ln -s clamd /usr/sbin/clamd.<SERVICE>
-and the directory for the socket file must be created (see 'LocalSocket'
-in clamd.conf)
- | # mkdir -p /var/run/clamd.<SERVICE>
-
-
-This directory must be writable by the 'User' chosen in the config-file.
-
-
-
-[Disclaimer:
- this file and the script/configfiles are not part of the official
- clamav package.
-
- Please send complaints and comments to
- mailto:enrico.scholz@informatik.tu-chemnitz.de!]
diff --git a/clamd-gen b/clamd-gen
deleted file mode 100755
index ac5dae2..0000000
--- a/clamd-gen
+++ /dev/null
@@ -1,269 +0,0 @@
-#! /bin/bash
-
-# Copyright (C) 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
-#
-# 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=<SERVICE> --version=<VERSION> --release=<RELEASE>
- --license=<LICENSE> --username=>USERNAME>
-"
- exit 0
-}
-
-function rpm.generatePreamble()
-{
- cat <<EOF
-%{!?release_func:%define release_func() %1%{?dist}}
-# The name of the minit service
-%define minitsvcdir %minitdir/services/%name
-# The configuration file for the SysV initservice
-%define conffile %_sysconfdir/clamd.d/%service.conf
-# The directory, where the milter socket will be placed into; this
-# socket will be named clamd.sock
-%define rundir /var/run/clamd.%service
-# The name of the logfile
-%define logfile /var/log/clamd.%service
-# The user under whose id, the clamd shall be running. This user must
-# be able to read the files from the base-service and is usually
-# created there.
-%define username $USERNAME
-# The packagename of the service
-%define service $SERVICE
-# The service name as used by the system's initscripts; usually this
-# is %service
-%define baseservice %service
-
-%define __chkconfig /sbin/chkconfig
-%define minitdir %_sysconfdir/minit
-
-
-EOF
-}
-
-function rpm.generateHeader()
-{
- cat <<EOF
-Summary: Clamav server for '%service'
-Name: clamd.%service
-Version: $VERSION
-Release: %release_func $RELEASE
-Epoch: 0
-License: $LICENSE
-Group: System Environment/Daemons
-BuildRoot: %_tmppath/%name-%version-%release-root
-BuildArch: noarch
-Requires: init(%name)
-Requires(pre): %service
-Requires: clamav-server
-BuildRequires: clamav-devel
-
-%package sysv
-Summary: SysV initscripts for a %service clamav-server
-Group: System Environment/Daemons
-Provides: init(%name) = sysv
-Conflicts: init(%name) < sysv
-Conflicts: init(%name) > sysv
-Requires: clamav-server-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>!%service!g;
- s!<USER>!%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 <<EOF >$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-wrapper b/clamd-wrapper
deleted file mode 100644
index ec785d0..0000000
--- a/clamd-wrapper
+++ /dev/null
@@ -1,90 +0,0 @@
-#!/bin/bash
-#
-# Xchkconfig: - 75 25
-# Xdescription: The clamd daemon listens for incoming connections on \
-# Unix or TCP socket and scans files or directories on demand.
-
-test "$CLAMD_SERVICE" || {
- echo $"*** $0 can not be called in this way"
- echo $"*** Please see /usr/share/doc/clamav-server-*/README how"
- echo $"*** the clamav-server can be configured"
- exit 6
-}
-
-# Source function library.
-. /etc/init.d/functions
-
-# Get config.
-test -r /etc/sysconfig/network && . /etc/sysconfig/network
-
-# Check that networking is up.
-test "$NETWORKING" != "no" || exit 6
-
-lockfile=/var/lock/subsys/clamd.${CLAMD_SERVICE}
-sysconffile=/etc/sysconfig/clamd.${CLAMD_SERVICE}
-procname=clamd.${CLAMD_SERVICE}
-
-CLAMD_CONFIGFILE=/etc/clamd.d/${CLAMD_SERVICE}.conf
-CLAMD_OPTIONS=
-CLAMD_PIDFILE=/var/run/clamd.${CLAMD_SERVICE}/clamd.pid
-## backward-compatibility check...
-for i in /var/run/clamd.${CLAMD_SERVICE}/clamd.sock \
- /var/run/clamav.${CLAMD_SERVICE}/clamd.sock; do
- CLAMD_SOCKET=$i
- test ! -e "$i" || break
-done
-test -f "$sysconffile" && . "$sysconffile"
-
-
-RETVAL=0
-prog="clamd.${CLAMD_SERVICE}"
-
-start () {
- echo -n $"Starting $prog: "
- daemon --pidfile=${CLAMD_PIDFILE} \
- exec -a $procname /usr/sbin/clamd \
- ${CLAMD_CONFIGFILE:+-c $CLAMD_CONFIGFILE} ${CLAMD_OPTIONS} --pid ${CLAMD_PIDFILE}
- RETVAL=$?
- echo
- [ $RETVAL -eq 0 ] && touch $lockfile
- return $RETVAL
-}
-
-stop () {
- echo -n $"Stopping $prog: "
- killproc -p ${CLAMD_PIDFILE} $procname
- RETVAL=$?
- echo
- [ $RETVAL -eq 0 ] && rm -f $lockfile
- return $RETVAL
-}
-
-reload() {
- rc=0
- echo -n $"Reloading $prog: "
- killproc -p ${CLAMD_PIDFILE} $procname -SIGHUP || rc=$?
- echo
- echo -n $"Loading new virus-database: "
- killproc -p ${CLAMD_PIDFILE} $procname -SIGUSR2 || rc=$?
- echo
- return $rc
-}
-
-restart () {
- stop
- start
-}
-
-# See how we were called.
-case "$1" in
- start|stop|restart|reload)
- $1 ;;
- status)
- status -p ${CLAMD_PIDFILE} $procname ;;
- condrestart)
- test ! -f $lockfile || restart
- ;;
- *)
- echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
- exit 2
-esac
diff --git a/clamd.SERVICE.init b/clamd.SERVICE.init
deleted file mode 100644
index 9681351..0000000
--- a/clamd.SERVICE.init
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-#
-# chkconfig: - 75 25
-# description: The clamd server running for <SERVICE>
-
-CLAMD_SERVICE=<SERVICE>
-. /usr/share/clamav/clamd-wrapper
diff --git a/clamd.logrotate b/clamd.logrotate
deleted file mode 100644
index 0b0b531..0000000
--- a/clamd.logrotate
+++ /dev/null
@@ -1,9 +0,0 @@
-/var/log/clamd.<SERVICE> {
- monthly
- notifempty
- missingok
-
- postrotate
- killall -HUP clamd.<SERVICE> 2>/dev/null || :
- endscript
-}
diff --git a/clamd.scan.upstart b/clamd.scan.upstart
deleted file mode 100644
index b6280f5..0000000
--- a/clamd.scan.upstart
+++ /dev/null
@@ -1,14 +0,0 @@
-### Uncomment these lines when you want clamd.scan to be a scanner
-### for a locally running clamav-milter
-#start on starting clamav-milter
-
-### Uncomment these lines when you want clamd.scan to be a generic
-### scanner service
-#start on starting local
-
-stop on runlevel 0
-stop on runlevel 1
-stop on runlevel 6
-
-respawn
-exec /usr/sbin/clamd -c /etc/clamd.d/scan.conf --nofork=yes
diff --git a/clamd.sysconfig b/clamd.sysconfig
deleted file mode 100644
index 4933e7e..0000000
--- a/clamd.sysconfig
+++ /dev/null
@@ -1,3 +0,0 @@
-#CLAMD_CONFIGFILE=/etc/clamd.d/<SERVICE>.conf
-#CLAMD_SOCKET=/var/run/clamd.<SERVICE>/clamd.sock
-#CLAMD_OPTIONS=
diff --git a/freshclam-sleep b/freshclam-sleep
deleted file mode 100755
index 7bdcf78..0000000
--- a/freshclam-sleep
+++ /dev/null
@@ -1,57 +0,0 @@
-#! /bin/bash
-# Copyright (C) 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
-#
-# 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.
-
-
-FRESHCLAM_MOD=$[ 3*60 ] # 3 hours
-
-f=/etc/sysconfig/freshclam
-test ! -e "$f" || . "$f"
-
-
-case x"$1" in
- (xnow) FRESHCLAM_DELAY=0;;
- (x|xrandom) : ${FRESHCLAM_DELAY:=$[ 0x`hostid` ]};;
- (*) FRESHCLAM_DELAY=$1;;
-esac
-
-set -e
-
-case $FRESHCLAM_DELAY in
- (disabled-warn)
- echo $"\
-WARNING: update of clamav database is disabled; please see
- '$f'
- for information how to enable the periodic update resp. how to turn
- off this message." >&2
- exit 1
- ;;
-
- (disabled)
- exit 0
- ;;
-
- (*)
- let FRESHCLAM_MOD*=60
- sleep $[ (FRESHCLAM_DELAY % FRESHCLAM_MOD + FRESHCLAM_MOD) % FRESHCLAM_MOD ]
- ;;
-esac
-
-
-/usr/bin/freshclam --quiet && {
- test -x /usr/sbin/clamav-notify-servers && \
- exec /usr/sbin/clamav-notify-servers || \
- :
-}
diff --git a/freshclam.sysconfig b/freshclam.sysconfig
deleted file mode 100644
index 94035f8..0000000
--- a/freshclam.sysconfig
+++ /dev/null
@@ -1,24 +0,0 @@
-## When changing the periodicity of freshclam runs in the crontab,
-## this value must be adjusted also. Its value is the timespan between
-## two subsequent freshclam runs in minutes. E.g. for the default
-##
-## | 0 */3 * * * ...
-##
-## crontab line, the value is 180 (minutes).
-# FRESHCLAM_MOD=
-
-## A predefined value for the delay in seconds. By default, the value is
-## calculated by the 'hostid' program. This predefined value guarantees
-## constant timespans of 3 hours between two subsequent freshclam runs.
-##
-## This option accepts two special values:
-## 'disabled-warn' ... disables the automatic freshclam update and
-## gives out a warning
-## 'disabled' ... disables the automatic freshclam silently
-# FRESHCLAM_DELAY=
-
-
-### !!!!! REMOVE ME !!!!!!
-### REMOVE ME: By default, the freshclam update is disabled to avoid
-### REMOVE ME: network access without prior activation
-FRESHCLAM_DELAY=disabled-warn # REMOVE ME
diff --git a/lastver b/lastver
deleted file mode 100644
index 4d8fc8c..0000000
--- a/lastver
+++ /dev/null
@@ -1 +0,0 @@
-0.95.3
diff --git a/sources b/sources
index 898c137..70d67b2 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-7a76425f5cffb9973d6ee45580dc2094 clamav-0.95.3-norar.tar.bz2
+44e7df79718d104db0666d5db3f08682 clamav-0.97-clean.tar.bz2
diff --git a/verinfo b/verinfo
deleted file mode 100644
index 814d953..0000000
--- a/verinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-http://sourceforge.net/project/showfiles.php?group_id=86638&package_id=90197
-clamav-([0-9.-]*?)\.tar\.
commit a58de3534bdbfcf065092de38967589e296c80b0
Author: Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org>
Date: Wed Jul 28 11:45:26 2010 +0000
dist-git conversion
diff --git a/.cvsignore b/.cvsignore
deleted file mode 100644
index 5b7c836..0000000
--- a/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-clamav-0.95.3-norar.tar.bz2
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..5b7c836
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+clamav-0.95.3-norar.tar.bz2
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 4a3ae71..0000000
--- a/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-# Makefile for source rpm: clamav
-NAME := clamav
-SPECFILE = $(firstword $(wildcard *.spec))
-
-define find-makefile-common
-for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
-endef
-
-MAKEFILE_COMMON := $(shell $(find-makefile-common))
-
-ifeq ($(MAKEFILE_COMMON),)
-# attept a checkout
-define checkout-makefile-common
-test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
-endef
-
-MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
-endif
-
-include $(MAKEFILE_COMMON)
-
-
-# can not use final tarball name here as it will conflict with rules
-# within Makefile.common
-TARBALL_CLEAN = ${NAME}-${VERSION}-norar.tar.bz2.tmp
-TARBALL = ${NAME}-${VERSION}.tar.gz
-
-clean-sources: ${TARBALL_CLEAN}
-
-${TARBALL_CLEAN}: ${TARBALL}
- rm -f $@.tmp
- zcat $< | tar --delete -f - '*/libclamunrar/*' | bzip2 -c > $@.tmp
- mv $@.tmp $@
diff --git a/branch b/branch
deleted file mode 100644
index 46381b9..0000000
--- a/branch
+++ /dev/null
@@ -1 +0,0 @@
-EL-6
commit 0909a88ae9e869be8c375d52a412f21d4e70ff8a
Author: Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org>
Date: Wed Jul 28 11:45:04 2010 +0000
dist-git conversion
diff --git a/.cvsignore b/.cvsignore
deleted file mode 100644
index c07be39..0000000
--- a/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-clamav-0.95.1-norar.tar.bz2
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..c07be39
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+clamav-0.95.1-norar.tar.bz2
diff --git a/Makefile b/Makefile
deleted file mode 100644
index eea4c6f..0000000
--- a/Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-# Makefile for source rpm: clamav
-# $Id$
-NAME := clamav
-SPECFILE = $(firstword $(wildcard *.spec))
-
-define find-makefile-common
-for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
-endef
-
-MAKEFILE_COMMON := $(shell $(find-makefile-common))
-
-ifeq ($(MAKEFILE_COMMON),)
-# attept a checkout
-define checkout-makefile-common
-test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
-endef
-
-MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
-endif
-
-include $(MAKEFILE_COMMON)
-
-
-# can not use final tarball name here as it will conflict with rules
-# within Makefile.common
-TARBALL_CLEAN = ${NAME}-${VERSION}-norar.tar.bz2.tmp
-TARBALL = ${NAME}-${VERSION}.tar.gz
-
-clean-sources: ${TARBALL_CLEAN}
-
-${TARBALL_CLEAN}: ${TARBALL}
- rm -f $@.tmp
- zcat $< | tar --delete -f - '*/libclamunrar/*' | bzip2 -c > $@.tmp
- mv $@.tmp $@
diff --git a/branch b/branch
deleted file mode 100644
index 42f697a..0000000
--- a/branch
+++ /dev/null
@@ -1 +0,0 @@
-EL-5
commit 7c49c405c76a391d8f3bd861380768224f6d6443
Author: Dennis Gilmore <ausil(a)fedoraproject.org>
Date: Sat May 8 01:45:25 2010 +0000
Initialize branch EL-6 for clamav
diff --git a/branch b/branch
new file mode 100644
index 0000000..46381b9
--- /dev/null
+++ b/branch
@@ -0,0 +1 @@
+EL-6
commit 672986e1a1820dfcf501808eb7af818f2430063c
Author: Bill Nottingham <notting(a)fedoraproject.org>
Date: Thu Nov 26 01:29:38 2009 +0000
Fix typo that causes a failure to update the common directory. (releng
#2781)
diff --git a/Makefile b/Makefile
index 2cc62a7..eea4c6f 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ NAME := clamav
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
-for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
+for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
commit 45d3d6a99cdfb183c8743a9637160afecef8fd02
Author: Bill Nottingham <notting(a)fedoraproject.org>
Date: Thu Nov 26 01:29:38 2009 +0000
Fix typo that causes a failure to update the common directory. (releng
#2781)
diff --git a/Makefile b/Makefile
index ed9c5e4..4a3ae71 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ NAME := clamav
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
-for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
+for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
commit 42e3c91be468fd3efce34f772fc8ac585e860a3b
Author: ensc <ensc(a)fedoraproject.org>
Date: Sun Nov 22 10:47:16 2009 +0000
removed stanza from upstart script which waited for 'starting\ XXX';
wrongly named upstart events have been fixed in recent initscripts
(#501155)
diff --git a/README.fedora b/README.fedora
index 4f12058..8df192d 100644
--- a/README.fedora
+++ b/README.fedora
@@ -67,12 +67,11 @@ B) On the clamav-milter host (assumed hostname 'host-milter')
and all the other options which are required on your system
- 3. Edit /etc/event.d/clamav-milter and uncomment the both
+ 3. Edit /etc/event.d/clamav-milter and uncomment the
- | start on starting\ local
| start on starting local
- lines. Restart your system or execute
+ line. Restart your system or execute
| initctl emit starting local
@@ -98,12 +97,11 @@ C) On the clamav-scanner host (assumed hostname 'host-scanner')
comment out possible 'LocalSocket' lines and set all the other
options which are required on your system
- 3. Edit /etc/event.d/clamav-scanner and uncomment the both
+ 3. Edit /etc/event.d/clamav-scanner and uncomment the
- | start on starting\ local
| start on starting local
- lines. Restart your system or execute
+ line. Restart your system or execute
| initctl emit starting local
diff --git a/clamav-milter.upstart b/clamav-milter.upstart
index 165829e..e0a63f2 100644
--- a/clamav-milter.upstart
+++ b/clamav-milter.upstart
@@ -1,14 +1,10 @@
-
### Uncomment these lines when you want clamav-milter to be a milter
### for a locally running MTA
-#start on starting\ sendmail
#start on starting sendmail
-#start on starting\ postfix
#start on starting postfix
### Uncomment these lines when you want clamav-milter to be a milter
### for a remotely running MTA
-#start on starting\ local
#start on starting local
stop on runlevel 0
diff --git a/clamd.scan.upstart b/clamd.scan.upstart
index 6c769e0..b6280f5 100644
--- a/clamd.scan.upstart
+++ b/clamd.scan.upstart
@@ -4,7 +4,6 @@
### Uncomment these lines when you want clamd.scan to be a generic
### scanner service
-#start on starting\ local
#start on starting local
stop on runlevel 0
commit 46fb0b613780cb65be722bfed8039b10f3c0cb05
Author: ensc <ensc(a)fedoraproject.org>
Date: Sat Nov 21 20:20:43 2009 +0000
- adjusted chkconfig positions for clamav-milter (#530101)
diff --git a/clamav-milter.sysv b/clamav-milter.sysv
index 693d4ee..170cdc1 100644
--- a/clamav-milter.sysv
+++ b/clamav-milter.sysv
@@ -2,7 +2,7 @@
#
# clamav-milter Starts/stop the "clamav-milter" daemon
#
-# chkconfig: - 99 1
+# chkconfig: - 79 21
# description: A virus scanning milter
# Source function library.
diff --git a/clamav.spec b/clamav.spec
index 4875437..88935d7 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -696,6 +696,9 @@ test "$1" != "0" || /sbin/initctl -q stop clamav-milter || :
%changelog
+* Sat Nov 21 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
+- adjusted chkconfig positions for clamav-milter (#530101)
+
* Thu Oct 29 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.3-1200
- updated to 0.95.3
commit 71bd83f9182d730978dfbbd9b2e8d9fab7db70a2
Author: ensc <ensc(a)fedoraproject.org>
Date: Thu Oct 29 09:10:29 2009 +0000
updated to 0.95.3
diff --git a/.cvsignore b/.cvsignore
index e2c64e0..5b7c836 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1 +1 @@
-clamav-0.95.2-norar.tar.bz2
+clamav-0.95.3-norar.tar.bz2
diff --git a/clamav-0.95.3-umask.patch b/clamav-0.95.3-umask.patch
new file mode 100644
index 0000000..220f7ab
--- /dev/null
+++ b/clamav-0.95.3-umask.patch
@@ -0,0 +1,39 @@
+Index: clamav-0.95.3/clamav-milter/clamav-milter.c
+===================================================================
+--- clamav-0.95.3.orig/clamav-milter/clamav-milter.c
++++ clamav-0.95.3/clamav-milter/clamav-milter.c
+@@ -306,7 +306,7 @@ int main(int argc, char **argv) {
+
+ if((opt = optget(opts, "PidFile"))->enabled) {
+ FILE *fd;
+- mode_t old_umask = umask(0002);
++ mode_t old_umask = umask(0022);
+
+ if((fd = fopen(opt->strarg, "w")) == NULL) {
+ logg("!Can't save PID in file %s\n", opt->strarg);
+Index: clamav-0.95.3/shared/output.c
+===================================================================
+--- clamav-0.95.3.orig/shared/output.c
++++ clamav-0.95.3/shared/output.c
+@@ -270,7 +270,7 @@ int logg(const char *str, ...)
+ #endif
+ if(logg_file) {
+ if(!logg_fp) {
+- old_umask = umask(0037);
++ old_umask = umask(0077);
+ if((logg_fp = fopen(logg_file, "at")) == NULL) {
+ umask(old_umask);
+ #ifdef CL_THREAD_SAFE
+Index: clamav-0.95.3/freshclam/freshclam.c
+===================================================================
+--- clamav-0.95.3.orig/freshclam/freshclam.c
++++ clamav-0.95.3/freshclam/freshclam.c
+@@ -102,7 +102,7 @@ static void writepid(const char *pidfile
+ {
+ FILE *fd;
+ int old_umask;
+- old_umask = umask(0006);
++ old_umask = umask(0022);
+ if((fd = fopen(pidfile, "w")) == NULL) {
+ logg("!Can't save PID to file %s: %s\n", pidfile, strerror(errno));
+ } else {
diff --git a/clamav-0.95rc1-umask.patch b/clamav-0.95rc1-umask.patch
deleted file mode 100644
index 8a46216..0000000
--- a/clamav-0.95rc1-umask.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Index: clamav-0.95rc1/clamav-milter/clamav-milter.c
-===================================================================
---- clamav-0.95rc1.orig/clamav-milter/clamav-milter.c
-+++ clamav-0.95rc1/clamav-milter/clamav-milter.c
-@@ -287,7 +287,7 @@ int main(int argc, char **argv) {
-
- if((opt = optget(opts, "PidFile"))->enabled) {
- FILE *fd;
-- mode_t old_umask = umask(0006);
-+ mode_t old_umask = umask(0022);
-
- if((fd = fopen(opt->strarg, "w")) == NULL) {
- logg("!Can't save PID in file %s\n", opt->strarg);
-Index: clamav-0.95rc1/shared/output.c
-===================================================================
---- clamav-0.95rc1.orig/shared/output.c
-+++ clamav-0.95rc1/shared/output.c
-@@ -250,7 +250,7 @@ int logg(const char *str, ...)
- #endif
- if(logg_file) {
- if(!logg_fp) {
-- old_umask = umask(0037);
-+ old_umask = umask(0077);
- if((logg_fp = fopen(logg_file, "at")) == NULL) {
- umask(old_umask);
- #ifdef CL_THREAD_SAFE
-Index: clamav-0.95rc1/freshclam/freshclam.c
-===================================================================
---- clamav-0.95rc1.orig/freshclam/freshclam.c
-+++ clamav-0.95rc1/freshclam/freshclam.c
-@@ -102,7 +102,7 @@ static void writepid(const char *pidfile
- {
- FILE *fd;
- int old_umask;
-- old_umask = umask(0006);
-+ old_umask = umask(0022);
- if((fd = fopen(pidfile, "w")) == NULL) {
- logg("!Can't save PID to file %s: %s\n", pidfile, strerror(errno));
- } else {
diff --git a/clamav.spec b/clamav.spec
index f8e774c..4875437 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -23,8 +23,8 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
-Version: 0.95.2
-Release: %release_func 5%{?snapshot:.%snapshot}
+Version: 0.95.3
+Release: %release_func 1200%{?snapshot:.%snapshot}
License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
Group: Applications/File
@@ -49,7 +49,7 @@ Source8: clamav-notify-servers
Patch24: clamav-0.92-private.patch
Patch25: clamav-0.92-open.patch
Patch26: clamav-0.95-cliopts.patch
-Patch27: clamav-0.95rc1-umask.patch
+Patch27: clamav-0.95.3-umask.patch
BuildRoot: %_tmppath/%name-%version-%release-root
Requires: clamav-lib = %version-%release
Requires: data(clamav)
@@ -696,6 +696,9 @@ test "$1" != "0" || /sbin/initctl -q stop clamav-milter || :
%changelog
+* Thu Oct 29 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.3-1200
+- updated to 0.95.3
+
* Sun Sep 13 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
- conditionalized build of noarch subpackages to ease packaging under RHEL5
diff --git a/lastver b/lastver
index e7f6f8b..4d8fc8c 100644
--- a/lastver
+++ b/lastver
@@ -1 +1 @@
-0.95.2
+0.95.3
diff --git a/sources b/sources
index 5744218..898c137 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-377aed737db63d902e641be8d923cda9 clamav-0.95.2-norar.tar.bz2
+7a76425f5cffb9973d6ee45580dc2094 clamav-0.95.3-norar.tar.bz2
commit a5349bae95013a679d45818025d52f560ce2ce4d
Author: ensc <ensc(a)fedoraproject.org>
Date: Sun Sep 13 13:43:34 2009 +0000
- conditionalized build of noarch subpackages
diff --git a/clamav.spec b/clamav.spec
index c070641..f8e774c 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -1,9 +1,10 @@
#global snapshot rc1
## Fedora Extras specific customization below...
-%bcond_without fedora
+%bcond_without fedora
%bcond_without upstart
%bcond_with unrar
+%bcond_without noarch
##
%global username clamupdate
@@ -17,6 +18,7 @@
%global scanuser clamscan
%global scanstatedir %_var/run/clamd.scan
+%{?with_noarch:%global noarch BuildArch: noarch}
%{!?release_func:%global release_func() %1%{?dist}}
Summary: End-user tools for the Clam Antivirus scanner
@@ -31,7 +33,7 @@ URL: http://www.clamav.net
Source0: http://download.sourceforge.net/sourceforge/clamav/%name-%version%{?snaps...
Source999: http://download.sourceforge.net/sourceforge/clamav/%name-%version%{?snaps...
%else
-# Unfortunately, clamav includes support for RAR v3, derived from GPL
+# Unfortunately, clamav includes support for RAR v3, derived from GPL
# incompatible unrar from RARlabs. We have to pull this code out.
# tarball was created by
# make clean-sources [TARBALL=<original-tarball>] [VERSION=<version>]
@@ -59,13 +61,13 @@ BuildRequires: bc
%package filesystem
Summary: Filesystem structure for clamav
Group: Applications/File
-BuildArch: noarch
Provides: user(%username) = 4
Provides: group(%username) = 4
# Prevent version mix
Conflicts: %name < %version-%release
Conflicts: %name > %version-%release
BuildRequires: fedora-usermgmt-devel
+%{?noarch}
%{?FE_USERADD_REQ}
%package lib
@@ -85,20 +87,20 @@ Requires: pkgconfig
%package data
Summary: Virus signature data for the Clam Antivirus scanner
Group: Applications/File
-BuildArch: noarch
Requires(pre): clamav-filesystem = %version-%release
Requires(postun): clamav-filesystem = %version-%release
Provides: data(clamav) = full
Conflicts: data(clamav) < full
Conflicts: data(clamav) > full
+%{?noarch}
%package data-empty
Summary: Empty data package for the Clam Antivirus scanner
Group: Applications/File
-BuildArch: noarch
Provides: data(clamav) = empty
Conflicts: data(clamav) < empty
Conflicts: data(clamav) > empty
+%{?noarch}
%package update
Summary: Auto-updater for the Clam Antivirus scanner data-files
@@ -122,28 +124,27 @@ Requires: clamav-lib = %version-%release
%package server-sysvinit
Summary: SysV initscripts for clamav server
Group: System Environment/Daemons
-BuildArch: noarch
Provides: init(clamav-server) = sysv
Requires: clamav-server = %version-%release
Requires(pre): %_initrddir
Requires(postun): %_initrddir
Provides: clamav-server-sysv = %version-%release
Obsoletes: clamav-server-sysv < %version-%release
+%{?noarch}
%package scanner
Summary: Clamav scanner daemon
Group: System Environment/Daemons
-BuildArch: noarch
Requires: init(clamav-scanner)
Provides: user(%scanuser) = 49
Provides: group(%scanuser) = 49
Requires: clamav-server = %version-%release
+%{?noarch}
%package scanner-sysvinit
Summary: SysV initscripts for clamav scanner daemon
Group: System Environment/Daemons
-BuildArch: noarch
Provides: init(clamav-scanner) = sysv
Requires: clamav-server-sysvinit = %version-%release
Requires: clamav-scanner = %version-%release
@@ -151,18 +152,19 @@ Requires(pre): %_initrddir
Requires(postun): %_initrddir initscripts
Requires(post): chkconfig
Requires(preun): chkconfig initscripts
+%{?noarch}
%package scanner-upstart
Summary: Upstart initscripts for clamav scanner daemon
Group: System Environment/Daemons
-BuildArch: noarch
Source410: clamd.scan.upstart
Provides: init(clamav-scanner) = upstart
Requires: clamav-scanner = %version-%release
# implicates a conflict with upstart 0.5+
-Requires(pre): /etc/event.d
+Requires(pre): /etc/event.d
Requires(post): /usr/bin/killall
Requires(postun): /sbin/initctl
+%{?noarch}
%package milter
@@ -188,7 +190,6 @@ Obsoletes: clamav-milter-sendmail < %version-%release
%package milter-sysvinit
Summary: SysV initscripts for the clamav sendmail-milter
Group: System Environment/Daemons
-BuildArch: noarch
Source320: clamav-milter.sysv
Provides: init(clamav-milter) = sysvinit
Requires: clamav-milter = %version-%release
@@ -200,18 +201,19 @@ Requires(post): chkconfig
Requires(preun): chkconfig initscripts
Provides: clamav-milter-sysv = %version-%release
Obsoletes: clamav-milter-sysv < %version-%release
+%{?noarch}
%package milter-upstart
Summary: Upstart initscripts for the clamav sendmail-milter
Group: System Environment/Daemons
-BuildArch: noarch
Source310: clamav-milter.upstart
Provides: init(clamav-milter) = upstart
Requires: clamav-milter = %version-%release
# implicates a conflict with upstart 0.5+
-Requires(pre): /etc/event.d
+Requires(pre): /etc/event.d
Requires(post): /usr/bin/killall
Requires(postun): /sbin/initctl
+%{?noarch}
%description
@@ -356,7 +358,7 @@ export have_cv_ipv6=yes
# build with --as-needed and disable rpath
sed -i \
- -e 's! -shared ! -Wl,--as-needed\0!g' \
+ -e 's! -shared ! -Wl,--as-needed\0!g' \
-e '/sys_lib_dlsearch_path_spec=\"\/lib \/usr\/lib /s!\"\/lib \/usr\/lib !/\"/%_lib /usr/%_lib !g' \
libtool
@@ -406,10 +408,10 @@ mkdir _doc_server
install -m644 -p %SOURCE2 _doc_server/clamd.sysconfig
install -m644 -p %SOURCE3 _doc_server/clamd.logrotate
install -m755 -p %SOURCE7 _doc_server/clamd.init
-install -m644 -p %SOURCE5 _doc_server/README
+install -m644 -p %SOURCE5 _doc_server/README
install -m644 -p etc/clamd.conf _doc_server/clamd.conf
-install -m644 -p %SOURCE1 $RPM_BUILD_ROOT%pkgdatadir
+install -m644 -p %SOURCE1 $RPM_BUILD_ROOT%pkgdatadir
install -m755 -p %SOURCE100 $RPM_BUILD_ROOT%pkgdatadir
cp -pa _doc_server/* $RPM_BUILD_ROOT%pkgdatadir/template
ln -s %pkgdatadir/clamd-wrapper $RPM_BUILD_ROOT%_initrddir/clamd-wrapper
@@ -473,7 +475,7 @@ rm -rf "$RPM_BUILD_ROOT"
%triggerprein filesystem -- clamav-filesystem < 0.96
## REMOVE me in F14 or F15 (added in pre F12)
-! /usr/bin/id clamav &>/dev/null || /usr/bin/id %username &>/dev/null || {
+! /usr/bin/id clamav &>/dev/null || /usr/bin/id %username &>/dev/null || {
/usr/sbin/usermod -l %username clamav || :
/usr/sbin/groupmod -n %username clamav || :
logger -t rpm/clamav "Renamed clamav user+group to %username" || :
@@ -694,6 +696,9 @@ test "$1" != "0" || /sbin/initctl -q stop clamav-milter || :
%changelog
+* Sun Sep 13 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
+- conditionalized build of noarch subpackages to ease packaging under RHEL5
+
* Sun Aug 9 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.2-5
- modified freshclam configuration to log by syslog by default
- disabled LocalSocket option in sample configuration
@@ -811,7 +816,7 @@ test "$1" != "0" || /sbin/initctl -q stop clamav-milter || :
- CVE-2007-6335 MEW PE File Integer Overflow Vulnerability
* Mon Oct 29 2007 Tom "spot" Callaway <tcallawa(a)redhat.com> - 0.91.2-3
-- remove RAR decompression code from source tarball because of
+- remove RAR decompression code from source tarball because of
legal problems (resolves 334371)
- correct license tag
@@ -838,7 +843,7 @@ test "$1" != "0" || /sbin/initctl -q stop clamav-milter || :
in FC6- and F7+
* Fri Apr 13 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90.2-1
-- [SECURITY] updated to 0.90.2; fixes CVE-2007-1745, CVE-2007-1997
+- [SECURITY] updated to 0.90.2; fixes CVE-2007-1745, CVE-2007-1997
* Fri Mar 2 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.90.1-2
- BR 'tcp_wrappers-devel' instead of plain 'tcp_wrappers'
commit 97fc8d8d655604267f6afec2800848c279e98b0b
Author: ensc <ensc(a)fedoraproject.org>
Date: Sun Aug 9 11:25:35 2009 +0000
- modified freshclam configuration to log by syslog by default
- disabled LocalSocket option in sample configuration
- fixed clamav-milter sysv initscript to use bash interpreter and to be
disabled by default
diff --git a/clamav-milter.sysv b/clamav-milter.sysv
index c0fad96..693d4ee 100644
--- a/clamav-milter.sysv
+++ b/clamav-milter.sysv
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
#
# clamav-milter Starts/stop the "clamav-milter" daemon
#
-# chkconfig: 345 99 1
+# chkconfig: - 99 1
# description: A virus scanning milter
# Source function library.
diff --git a/clamav.spec b/clamav.spec
index 4452722..c070641 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -321,15 +321,18 @@ mkdir -p libclamunrar{,_iface}
%{!?with_unrar:touch libclamunrar/{Makefile.in,all,install}}
sed -ri \
- -e 's!^(#?LogFile ).*!\1/var/log/clamd.<SERVICE>!g' \
- -e 's!^(#?LocalSocket ).*!\1/var/run/clamd.<SERVICE>/clamd.sock!g' \
+ -e 's!^#?(LogFile ).*!#\1/var/log/clamd.<SERVICE>!g' \
+ -e 's!^#?(LocalSocket ).*!#\1/var/run/clamd.<SERVICE>/clamd.sock!g' \
-e 's!^(#?PidFile ).*!\1/var/run/clamd.<SERVICE>/clamd.pid!g' \
-e 's!^#?(User ).*!\1<USER>!g' \
-e 's!^#?(AllowSupplementaryGroups|LogSyslog).*!\1 yes!g' \
-e 's! /usr/local/share/clamav,! %homedir,!g' \
etc/clamd.conf
-sed -ri -e 's!^#(UpdateLogFile )!\1!g;' etc/freshclam.conf
+sed -ri \
+ -e 's!^#?(UpdateLogFile )!#\1!g;' \
+ -e 's!^#?(LogSyslog).*!\1 yes!g' \
+ -e 's!(DatabaseOwner *)clamav$!\1%username!g' etc/freshclam.conf
## ------------------------------------------------------------
@@ -468,7 +471,7 @@ rm -rf "$RPM_BUILD_ROOT"
## ------------------------------------------------------------
-%triggerprein filesystem -- clamav-filesystem < 0.95.2-3
+%triggerprein filesystem -- clamav-filesystem < 0.96
## REMOVE me in F14 or F15 (added in pre F12)
! /usr/bin/id clamav &>/dev/null || /usr/bin/id %username &>/dev/null || {
/usr/sbin/usermod -l %username clamav || :
@@ -691,6 +694,12 @@ test "$1" != "0" || /sbin/initctl -q stop clamav-milter || :
%changelog
+* Sun Aug 9 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.2-5
+- modified freshclam configuration to log by syslog by default
+- disabled LocalSocket option in sample configuration
+- fixed clamav-milter sysv initscript to use bash interpreter and to
+ be disabled by default
+
* Sat Aug 8 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.2-4
- renamed 'clamav' user/group to 'clamupdate'
- add the '%milteruser' user to the '%scanuser' group when the -scanner
commit f7479cda344719b4f462fd6efccdbdae5194e7bd
Author: ensc <ensc(a)fedoraproject.org>
Date: Sat Aug 8 13:33:12 2009 +0000
- renamed 'clamav' user/group to 'clamupdate'
- add the '%milteruser' user to the '%scanuser' group when the -scanner
subpackage is installed
diff --git a/clamav.spec b/clamav.spec
index 2408882..4452722 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -6,7 +6,7 @@
%bcond_with unrar
##
-%global username clamav
+%global username clamupdate
%global homedir %_var/lib/clamav
%global freshclamlog %_var/log/freshclam.log
%global milteruser clamilt
@@ -22,7 +22,7 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
Version: 0.95.2
-Release: %release_func 2%{?snapshot:.%snapshot}
+Release: %release_func 5%{?snapshot:.%snapshot}
License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
Group: Applications/File
@@ -110,7 +110,7 @@ Requires: clamav-filesystem = %version-%release
Requires(pre): /etc/cron.d
Requires(postun): /etc/cron.d
Requires(post): %__chown %__chmod
-Requires(post): group(clamav)
+Requires(post): group(%username)
%package server
Summary: Clam Antivirus scanner server
@@ -344,8 +344,13 @@ export have_cv_ipv6=yes
%configure --disable-clamav --with-dbdir=/var/lib/clamav \
--enable-milter --disable-static \
--disable-rpath \
+ --with-user=%username \
+ --with-group=%username \
%{!?with_unrar:--disable-unrar}
+# TODO: check periodically that CLAMAVUSER is used for freshclam only
+
+
# build with --as-needed and disable rpath
sed -i \
-e 's! -shared ! -Wl,--as-needed\0!g' \
@@ -463,6 +468,14 @@ rm -rf "$RPM_BUILD_ROOT"
## ------------------------------------------------------------
+%triggerprein filesystem -- clamav-filesystem < 0.95.2-3
+## REMOVE me in F14 or F15 (added in pre F12)
+! /usr/bin/id clamav &>/dev/null || /usr/bin/id %username &>/dev/null || {
+ /usr/sbin/usermod -l %username clamav || :
+ /usr/sbin/groupmod -n %username clamav || :
+ logger -t rpm/clamav "Renamed clamav user+group to %username" || :
+}
+
%pre filesystem
%__fe_groupadd 4 -r %username &>/dev/null || :
%__fe_useradd 4 -r -s /sbin/nologin -d %homedir -M \
@@ -509,6 +522,12 @@ test -e %freshclamlog || {
%__chown root:%username %freshclamlog
}
+
+%triggerin milter -- clamav-scanner
+# Add the milteruser to the scanuser group; this is required when
+# milter and clamd communicate through local sockets
+/usr/sbin/usermod -a -G %scanuser %milteruser &>/dev/null || :
+
%pre milter
%__fe_groupadd 5 -r %milteruser &>/dev/null || :
%__fe_useradd 5 -r -s /sbin/nologin -d %milterstatedir -M \
@@ -672,6 +691,11 @@ test "$1" != "0" || /sbin/initctl -q stop clamav-milter || :
%changelog
+* Sat Aug 8 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.2-4
+- renamed 'clamav' user/group to 'clamupdate'
+- add the '%milteruser' user to the '%scanuser' group when the -scanner
+ subpackage is installed
+
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0.95.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
commit 9101729e44ad27862d4ee94d199a5fda9f737316
Author: ensc <ensc(a)fedoraproject.org>
Date: Sat Aug 1 09:44:42 2009 +0000
fixed inconsistencies added EXAMPLE section for milter setup
diff --git a/README.fedora b/README.fedora
index 603526c..4f12058 100644
--- a/README.fedora
+++ b/README.fedora
@@ -29,10 +29,10 @@ A clamav-milter setup consists of the following three components:
--> you should know how to install this...
When communicating across unix sockets with the clamav-milter, it is
- suggested to use the /var/run/clamav-milter/clamav.sock path. You
- have to add something like
+ suggested to use the /var/run/clamav-milter/clamav-milter.socket
+ path. You have to add something like
- INPUT_MAIL_FILTER(`clamav', `S=local:/var/run/clamav-milter/clamav.sock, F=, T=S:4m;R:4m')dnl
+ INPUT_MAIL_FILTER(`clamav', `S=local:/var/run/clamav-milter/clamav-milter.socket, F=, T=S:4m;R:4m')dnl
to your sendmail.mc.
@@ -40,3 +40,79 @@ A clamav-milter setup consists of the following three components:
It is suggested that components communicate through TCP sockets as
this eases setup. Please add corresponding packet filter rules!
+
+
+EXAMPLE
+=======
+
+For clamav-milter, a possible setup might be created by
+
+A) On the MTA (assumed hostname 'host-mta')
+
+ 1. Add to sendmail.mc
+
+ | INPUT_MAIL_FILTER(`clamav', `S=inet:6666@host-milter, F=, T=S:4m;R:4m')dnl
+
+ 2. Rebuild sendmail.cf
+
+
+B) On the clamav-milter host (assumed hostname 'host-milter')
+
+ 1. Install clamav-milter + clamav-milter-upstart packages
+
+ 2. Set in /etc/mail/clamav-milter.conf
+
+ | MilterSocket inet:6666
+ | ClamdSocket tcp:host-scanner:6665
+
+ and all the other options which are required on your system
+
+ 3. Edit /etc/event.d/clamav-milter and uncomment the both
+
+ | start on starting\ local
+ | start on starting local
+
+ lines. Restart your system or execute
+
+ | initctl emit starting local
+
+ 4. Add something like
+
+ | iptables -N IN-cmilt
+ | iptables -A IN-cmilt -s host-mta -j ACCEPT
+ | iptables -A IN-cmilt -j DROP
+
+ | iptables -A INPUT -p tcp --dport 6666 -j IN-cmilt
+
+ to your firewall setup
+
+C) On the clamav-scanner host (assumed hostname 'host-scanner')
+
+ 1. Install clamav-scanner + clamav-scanner-upstart packages
+
+ 2. Add to /etc/clamd.d/scan.conf
+
+ | TCPSocket 6665
+ | TCPAddr host-scanner
+
+ comment out possible 'LocalSocket' lines and set all the other
+ options which are required on your system
+
+ 3. Edit /etc/event.d/clamav-scanner and uncomment the both
+
+ | start on starting\ local
+ | start on starting local
+
+ lines. Restart your system or execute
+
+ | initctl emit starting local
+
+ 4. Add something like
+
+ | iptables -N IN-cscan
+ | iptables -A IN-cscan -s host-milter -j ACCEPT
+ | iptables -A IN-cscan -j DROP
+
+ | iptables -A INPUT -p tcp --dport 6665 -j IN-csan
+
+ to your firewall setup
commit f2505c3d26166d5c9d500c56f8fc5fbbc7ad0c85
Author: Jesse Keating <jkeating(a)fedoraproject.org>
Date: Fri Jul 24 19:00:16 2009 +0000
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
diff --git a/clamav.spec b/clamav.spec
index 9961085..2408882 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -22,7 +22,7 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
Version: 0.95.2
-Release: %release_func 1%{?snapshot:.%snapshot}
+Release: %release_func 2%{?snapshot:.%snapshot}
License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
Group: Applications/File
@@ -672,6 +672,9 @@ test "$1" != "0" || /sbin/initctl -q stop clamav-milter || :
%changelog
+* Fri Jul 24 2009 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0.95.2-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
+
* Thu Jun 11 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.2-1
- updated to 0.95.2
commit 589fdb228f2fc67231de9a3a0203433b1e881f46
Author: ensc <ensc(a)fedoraproject.org>
Date: Thu Jun 11 07:27:31 2009 +0000
updated
diff --git a/.cvsignore b/.cvsignore
index c07be39..e2c64e0 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1 +1 @@
-clamav-0.95.1-norar.tar.bz2
+clamav-0.95.2-norar.tar.bz2
diff --git a/clamav.spec b/clamav.spec
index be9a21f..9961085 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -21,8 +21,8 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
-Version: 0.95.1
-Release: %release_func 3%{?snapshot:.%snapshot}
+Version: 0.95.2
+Release: %release_func 1%{?snapshot:.%snapshot}
License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
Group: Applications/File
@@ -672,6 +672,9 @@ test "$1" != "0" || /sbin/initctl -q stop clamav-milter || :
%changelog
+* Thu Jun 11 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.2-1
+- updated to 0.95.2
+
* Sun Apr 19 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.1-3
- fixed '--without upstart' operation
diff --git a/lastver b/lastver
index fd6d73e..e7f6f8b 100644
--- a/lastver
+++ b/lastver
@@ -1 +1 @@
-0.95
+0.95.2
diff --git a/sources b/sources
index acd143c..5744218 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-0ddd9f341dd0299a6bc5398ee26f4ebf clamav-0.95.1-norar.tar.bz2
+377aed737db63d902e641be8d923cda9 clamav-0.95.2-norar.tar.bz2
commit a4b44dcd073a0a23591471fcd66b03a3263b580a
Author: ensc <ensc(a)fedoraproject.org>
Date: Sun Apr 19 10:31:25 2009 +0000
fixed '--without upstart' operation
diff --git a/clamav.spec b/clamav.spec
index e56399f..be9a21f 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -22,7 +22,7 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
Version: 0.95.1
-Release: %release_func 2%{?snapshot:.%snapshot}
+Release: %release_func 3%{?snapshot:.%snapshot}
License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
Group: Applications/File
@@ -454,7 +454,7 @@ install -p -m 755 %SOURCE320 $RPM_BUILD_ROOT%_initrddir/clamav-milter
rm -f $RPM_BUILD_ROOT%_sysconfdir/clamav-milter.conf
touch $RPM_BUILD_ROOT{%milterstatedir/clamav-milter.socket,%milterlog}
-%{!?with_upstart:rm -rf %_sysconfdir/event.d}
+%{!?with_upstart:rm -rf $RPM_BUILD_ROOT%_sysconfdir/event.d}
## ------------------------------------------------------------
@@ -672,6 +672,9 @@ test "$1" != "0" || /sbin/initctl -q stop clamav-milter || :
%changelog
+* Sun Apr 19 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.1-3
+- fixed '--without upstart' operation
+
* Wed Apr 15 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.1-2
- added '%%bcond_without upstart' conditional to ease skipping of
-upstart subpackage creation e.g. on EL5 systems
commit f3bc46b75404e44c1b18aa0710782d298871e8a5
Author: ensc <ensc(a)fedoraproject.org>
Date: Wed Apr 15 14:14:27 2009 +0000
updated
diff --git a/clamav.spec b/clamav.spec
index 2daad57..e56399f 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -2,6 +2,7 @@
## Fedora Extras specific customization below...
%bcond_without fedora
+%bcond_without upstart
%bcond_with unrar
##
@@ -21,7 +22,7 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
Version: 0.95.1
-Release: %release_func 1%{?snapshot:.%snapshot}
+Release: %release_func 2%{?snapshot:.%snapshot}
License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
Group: Applications/File
@@ -197,8 +198,8 @@ Requires(pre): %_initrddir
Requires(postun): %_initrddir initscripts
Requires(post): chkconfig
Requires(preun): chkconfig initscripts
-Provides: milter-sysv = %version-%release
-Obsoletes: milter-sysv < %version-%release
+Provides: clamav-milter-sysv = %version-%release
+Obsoletes: clamav-milter-sysv < %version-%release
%package milter-upstart
Summary: Upstart initscripts for the clamav sendmail-milter
@@ -453,6 +454,7 @@ install -p -m 755 %SOURCE320 $RPM_BUILD_ROOT%_initrddir/clamav-milter
rm -f $RPM_BUILD_ROOT%_sysconfdir/clamav-milter.conf
touch $RPM_BUILD_ROOT{%milterstatedir/clamav-milter.socket,%milterlog}
+%{!?with_upstart:rm -rf %_sysconfdir/event.d}
## ------------------------------------------------------------
@@ -640,9 +642,11 @@ test "$1" != "0" || /sbin/initctl -q stop clamav-milter || :
%files scanner-sysvinit
%attr(0755,root,root) %config %_initrddir/clamd.scan
+%if 0%{?with_upstart:1}
%files scanner-upstart
%defattr(-,root,root,-)
%config(noreplace) %_sysconfdir/event.d/clamd.scan
+%endif
## -----------------------
@@ -660,12 +664,20 @@ test "$1" != "0" || /sbin/initctl -q stop clamav-milter || :
%defattr(-,root,root,-)
%config %_initrddir/clamav-milter
+%if 0%{?with_upstart:1}
%files milter-upstart
%defattr(-,root,root,-)
%config(noreplace) %_sysconfdir/event.d/clamav-milter
+%endif
%changelog
+* Wed Apr 15 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95.1-2
+- added '%%bcond_without upstart' conditional to ease skipping of
+ -upstart subpackage creation e.g. on EL5 systems
+- fixed Provides/Obsoletes: typo in -milter-sysvinit subpackage which
+ broke update path
+
* Fri Apr 10 2009 Robert Scheck <robert(a)fedoraproject.org> - 0.95.1-1
- Upgrade to 0.95.1 (#495039)
commit fa9656200e23fc036ec7e31084e5b111e070e32e
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Fri Apr 10 21:10:04 2009 +0000
- Upgrade to 0.95.1 (#495036, #495039) and enabled IPv6 support
- Fixed typo in SysV initscript which removes 'touch' file (#473513)
- Added build requirement to ncurses-devel for clamdtop
diff --git a/.cvsignore b/.cvsignore
index 336c23f..c07be39 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1 +1 @@
-clamav-0.94.2-norar.tar.bz2
+clamav-0.95.1-norar.tar.bz2
diff --git a/clamav-0.90rc3-private.patch b/clamav-0.90rc3-private.patch
deleted file mode 100644
index 66b662e..0000000
--- a/clamav-0.90rc3-private.patch
+++ /dev/null
@@ -1,28 +0,0 @@
---- clamav-0.90rc3/libclamav.pc.in.private 2004-07-14 13:35:38.000000000 +0200
-+++ clamav-0.90rc3/libclamav.pc.in 2007-02-04 12:24:35.000000000 +0100
-@@ -6,6 +6,6 @@
- Name: libclamav
- Description: A GPL virus scanner
- Version: @LIBCLAMAV_VERSION@
--Libs: -L${libdir} -lclamav @LIBCLAMAV_LIBS@
--Cflags: -I${includedir} @CFLAGS@
--
-+Libs: -L${libdir} -lclamav
-+Libs.private: -L${libdir} -lclamav @LIBCLAMAV_LIBS@
-+Cflags: -I${includedir}
---- clamav-0.90rc3/clamav-config.in.private 2004-06-06 03:50:08.000000000 +0200
-+++ clamav-0.90rc3/clamav-config.in 2007-02-04 12:25:27.000000000 +0100
-@@ -55,11 +55,11 @@
- ;;
-
- --cflags)
-- echo -I@includedir@ @CFLAGS@
-+ echo -I@includedir@
- ;;
-
- --libs)
-- echo -L@libdir@ @LIBCLAMAV_LIBS@
-+ echo -L@libdir@ -lclamav
- ;;
-
- *)
diff --git a/clamav-0.92-private.patch b/clamav-0.92-private.patch
new file mode 100644
index 0000000..bab2948
--- /dev/null
+++ b/clamav-0.92-private.patch
@@ -0,0 +1,29 @@
+--- clamav-0.92/libclamav.pc.in.private
++++ clamav-0.92/libclamav.pc.in
+@@ -6,6 +6,6 @@ includedir=@includedir@
+ Name: libclamav
+ Description: A GPL virus scanner
+ Version: @LIBCLAMAV_VERSION@
+-Libs: -L${libdir} -lclamav @LIBCLAMAV_LIBS@
+-Cflags: -I${includedir} @CFLAGS@
+-
++Libs: -L${libdir} -lclamav
++Libs.private: -L${libdir} -lclamav @LIBCLAMAV_LIBS@
++Cflags: -I${includedir}
+--- clamav-0.92/clamav-config.in.private
++++ clamav-0.92/clamav-config.in
+@@ -54,12 +54,8 @@ while test $# -gt 0; do
+ usage 0
+ ;;
+
+- --cflags)
+- echo -I@includedir@ @CFLAGS@
+- ;;
+-
+- --libs)
+- echo -L@libdir@ @LIBCLAMAV_LIBS@
++ (--cflags|--libs)
++ ${PKG_CONFIG:-pkg-config} "$1" libclamav
+ ;;
+
+ *)
diff --git a/clamav-0.93.1-path.patch b/clamav-0.93.1-path.patch
deleted file mode 100644
index 4f1872c..0000000
--- a/clamav-0.93.1-path.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- clamav-0.93.1/contrib/init/RedHat/clamav-milter.path
-+++ clamav-0.93.1/contrib/init/RedHat/clamav-milter
-@@ -22,7 +22,6 @@ test -f /etc/sysconfig/clamav-milter &&
- # Check that networking is up.
- [ ${NETWORKING} = "no" ] && exit 0
-
--[ -x /usr/local/sbin/clamav-milter ] || exit 0
- PATH=$PATH:/usr/bin:/usr/local/sbin:/usr/local/bin
-
- RETVAL=0
-@@ -87,7 +86,7 @@ case "$1" in
- restart
- ;;
- condrestart)
-- test -f ${lockfile} && $0 restart || :
-+ test -f ${lockfile} && restart || :
- ;;
- status)
- if [ ! -z $pidfile ]; then
diff --git a/clamav-0.93.3-initoff.patch b/clamav-0.93.3-initoff.patch
deleted file mode 100644
index 899d32b..0000000
--- a/clamav-0.93.3-initoff.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- clamav-0.93.3/contrib/init/RedHat/clamav-milter.initoff
-+++ clamav-0.93.3/contrib/init/RedHat/clamav-milter
-@@ -2,7 +2,7 @@
- #
- # clamav-milter This script starts and stops the clamav-milter daemon
- #
--# chkconfig: 2345 79 40
-+# chkconfig: - 79 40
- #
- # description: clamav-milter is a daemon which hooks into sendmail and routes \
- # email messages for virus scanning with ClamAV
diff --git a/clamav-0.93.3-pid.patch b/clamav-0.93.3-pid.patch
deleted file mode 100644
index de29887..0000000
--- a/clamav-0.93.3-pid.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Try to fix https://bugzilla.redhat.com/show_bug.cgi?id=452359; RH/Fedora
-initscripts do not support killing of whole processgroups. Hence, disable
-feature which posts negative pgrp into pidfile and use plain pid instead
-of.
-
-diff -up clamav-0.93.3/clamav-milter/clamav-milter.c.~1~ clamav-0.93.3/clamav-milter/clamav-milter.c
---- clamav-0.93.3/clamav-milter/clamav-milter.c.~1~ 2008-07-07 20:02:10.000000000 +0200
-+++ clamav-0.93.3/clamav-milter/clamav-milter.c 2008-07-13 20:15:12.000000000 +0200
-@@ -1985,7 +1985,7 @@ main(int argc, char **argv)
- logg(_("!Can't save PID in file %s\n"), pidfile);
- return EX_CONFIG;
- }
--#ifdef C_LINUX
-+#if defined(C_LINUX) && 0
- /* Ensure that all threads are kill()ed */
- fprintf(fd, "-%d\n", (int)getpgrp());
- #else
diff --git a/clamav-0.95-cliopts.patch b/clamav-0.95-cliopts.patch
new file mode 100644
index 0000000..90d173f
--- /dev/null
+++ b/clamav-0.95-cliopts.patch
@@ -0,0 +1,13 @@
+Index: clamav-0.95rc1/shared/optparser.c
+===================================================================
+--- clamav-0.95rc1.orig/shared/optparser.c
++++ clamav-0.95rc1/shared/optparser.c
+@@ -211,7 +211,7 @@ const struct clam_option clam_options[]
+
+ { "ExitOnOOM", NULL, 0, TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD, "Stop the daemon when libclamav reports an out of memory condition.", "yes" },
+
+- { "Foreground", NULL, 0, TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_FRESHCLAM | OPT_MILTER, "Don't fork into background.", "no" },
++ { "Foreground", "nofork", 0, TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_FRESHCLAM | OPT_MILTER, "Don't fork into background.", "no" },
+
+ { "Debug", NULL, 0, TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_FRESHCLAM, "Enable debug messages in libclamav.", "no" },
+
diff --git a/clamav-0.95rc1-umask.patch b/clamav-0.95rc1-umask.patch
new file mode 100644
index 0000000..8a46216
--- /dev/null
+++ b/clamav-0.95rc1-umask.patch
@@ -0,0 +1,39 @@
+Index: clamav-0.95rc1/clamav-milter/clamav-milter.c
+===================================================================
+--- clamav-0.95rc1.orig/clamav-milter/clamav-milter.c
++++ clamav-0.95rc1/clamav-milter/clamav-milter.c
+@@ -287,7 +287,7 @@ int main(int argc, char **argv) {
+
+ if((opt = optget(opts, "PidFile"))->enabled) {
+ FILE *fd;
+- mode_t old_umask = umask(0006);
++ mode_t old_umask = umask(0022);
+
+ if((fd = fopen(opt->strarg, "w")) == NULL) {
+ logg("!Can't save PID in file %s\n", opt->strarg);
+Index: clamav-0.95rc1/shared/output.c
+===================================================================
+--- clamav-0.95rc1.orig/shared/output.c
++++ clamav-0.95rc1/shared/output.c
+@@ -250,7 +250,7 @@ int logg(const char *str, ...)
+ #endif
+ if(logg_file) {
+ if(!logg_fp) {
+- old_umask = umask(0037);
++ old_umask = umask(0077);
+ if((logg_fp = fopen(logg_file, "at")) == NULL) {
+ umask(old_umask);
+ #ifdef CL_THREAD_SAFE
+Index: clamav-0.95rc1/freshclam/freshclam.c
+===================================================================
+--- clamav-0.95rc1.orig/freshclam/freshclam.c
++++ clamav-0.95rc1/freshclam/freshclam.c
+@@ -102,7 +102,7 @@ static void writepid(const char *pidfile
+ {
+ FILE *fd;
+ int old_umask;
+- old_umask = umask(0006);
++ old_umask = umask(0022);
+ if((fd = fopen(pidfile, "w")) == NULL) {
+ logg("!Can't save PID to file %s: %s\n", pidfile, strerror(errno));
+ } else {
diff --git a/clamav-milter.sysv b/clamav-milter.sysv
new file mode 100644
index 0000000..7c06c60
--- /dev/null
+++ b/clamav-milter.sysv
@@ -0,0 +1,103 @@
+#!/bin/sh
+#
+# clamav-milter This script starts and stops the clamav-milter daemon
+#
+# chkconfig: - 79 40
+#
+# description: clamav-milter is a daemon which hooks into sendmail and routes \
+# email messages for virus scanning with ClamAV
+# processname: clamav-milter
+# pidfile: /var/lock/subsys/clamav-milter
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+# Source networking configuration.
+. /etc/sysconfig/network
+
+# Local clamav-milter config
+CLAMAV_FLAGS=
+test -f /etc/sysconfig/clamav-milter && . /etc/sysconfig/clamav-milter
+
+# Check that networking is up.
+[ ${NETWORKING} = "no" ] && exit 0
+
+PATH=$PATH:/usr/bin:/usr/local/sbin:/usr/local/bin
+
+RETVAL=0
+
+# Clamav-milter must have write access to the pid file, /var/run is not suitable
+default_pidfile=
+[ -d /var/run/clamav-milter ] && default_pidfile=/var/run/clamav-milter/clamav-milter.pid
+[ -d /var/clamav ] && default_pidfile=/var/clamav/clamav-milter.pid
+pidfile=${PIDFILE:-$default_pidfile}
+
+lockfile=/var/lock/subsys/clamav-milter
+
+start() {
+ echo -n "Starting clamav-milter: "
+ # Don't allow files larger than 25M to be created, to limit DoS
+ # Needs to be large enough to extract the signature files
+ ulimit -f 25600
+ if [ ! -z $pidfile ]; then
+ CLAMAV_PID=--pidfile=${pidfile}
+ PID=`pidofproc -p ${pidfile} clamav-milter`
+ else
+ CLAMAV_PID=
+ PID=`pidofproc clamav-milter`
+ fi
+ [ -n "$PID" ] && echo " already running!" && return 1
+ LANG= daemon clamav-milter $CLAMAV_PID ${CLAMAV_FLAGS}
+ RETVAL=$?
+ [ ! -z $pidfile -a -f $pidfile ] && sed -i -e 's/-//' $pidfile
+ echo
+ test $RETVAL -eq 0 && touch ${lockfile}
+ return $RETVAL
+}
+
+stop() {
+ echo -n "Shutting down clamav-milter: "
+ if [ ! -z $pidfile ]; then
+ killproc -p ${pidfile} clamav-milter
+ else
+ killproc clamav-milter
+ fi
+ RETVAL=$?
+ echo
+ test $RETVAL -eq 0 && rm -f ${lockfile} ${pidfile}
+}
+
+restart() {
+ stop
+ start
+}
+
+# See how we were called.
+case "$1" in
+ start)
+ # Start daemon.
+ start
+ ;;
+ stop)
+ # Stop daemon.
+ stop
+ ;;
+ restart|reload)
+ restart
+ ;;
+ condrestart)
+ test -f ${lockfile} && restart || :
+ ;;
+ status)
+ if [ ! -z $pidfile ]; then
+ status -p ${pidfile} clamav-milter
+ else
+ status clamav-milter
+ fi
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|reload|restart|condrestart|status}"
+ exit 1
+esac
+
+exit $?
diff --git a/clamav.spec b/clamav.spec
index 4fe1dee..3f5dea1 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -15,7 +15,7 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
-Version: 0.94.2
+Version: 0.95.1
Release: %release_func 1
License: GPLv2
@@ -25,7 +25,7 @@ URL: http://www.clamav.net
# incompatible unrar from RARlabs. We have to pull this code out.
# tarball was created by
# make clean-sources [TARBALL=<original-tarball>] [VERSION=<version>]
-Source0: clamav-%{version}-norar.tar.bz2
+Source0: %name-%version-norar.tar.bz2
# Source0: http://download.sourceforge.net/sourceforge/clamav/%name-%version.tar.gz
# No sense in using this file for the time being.
# Source999: http://download.sourceforge.net/sourceforge/clamav/%name-%version.tar.gz.sig
@@ -36,15 +36,15 @@ Source5: clamd-README
Source6: clamav-update.logrotate
Source7: clamd.SERVICE.init
Source8: clamav-notify-servers
-Patch21: clamav-0.93.1-path.patch
-Patch22: clamav-0.93.3-initoff.patch
-Patch24: clamav-0.90rc3-private.patch
+Patch24: clamav-0.92-private.patch
Patch25: clamav-0.92-open.patch
-Patch26: clamav-0.93.3-pid.patch
+Patch26: clamav-0.95-cliopts.patch
+Patch27: clamav-0.95rc1-umask.patch
BuildRoot: %_tmppath/%name-%version-%release-root
Requires: clamav-lib = %version-%release
Requires: data(clamav)
BuildRequires: zlib-devel bzip2-devel gmp-devel curl-devel
+BuildRequires: ncurses-devel
BuildRequires: %_includedir/tcpd.h
BuildRequires: bc
@@ -71,6 +71,7 @@ Source100: clamd-gen
Requires: clamav-lib = %version-%release
Requires: clamav-filesystem = %version-%release
Requires(pre): %_libdir/pkgconfig
+Requires: pkgconfig
%package data
Summary: Virus signature data for the Clam Antivirus scanner
@@ -131,6 +132,7 @@ Requires(post): coreutils
%package milter-sysv
Summary: SysV initscripts for the clamav sendmail-milter
Group: System Environment/Daemons
+Source320: clamav-milter.sysv
Provides: init(clamav-milter) = sysv
Requires: clamav-milter = %version-%release
Requires(post): user(%milteruser) clamav-milter
@@ -229,23 +231,24 @@ The SysV initscripts for clamav-milter.
%prep
%setup -q
-%patch21 -p1 -b .path
-%patch22 -p1 -b .initoff
%patch24 -p1 -b .private
%patch25 -p1 -b .open
-%patch26 -p1 -b .pid
+%patch26 -p1 -b .cliopts
+%patch27 -p1 -b .umask
mkdir -p libclamunrar{,_iface}
touch libclamunrar/{Makefile.in,all,install}
-perl -pi -e 's!^(#?LogFile ).*!\1/var/log/clamd.<SERVICE>!g;
- s!^#?(LocalSocket ).*!\1/var/run/clamd.<SERVICE>/clamd.sock!g;
- s!^#?(PidFile ).*!\1/var/run/clamd.<SERVICE>/clamd.pid!g;
- s!^#?(User ).*!\1<USER>!g;
- s! /usr/local/share/clamav,! %homedir,!g;
- ' etc/clamd.conf
+sed -ri \
+ -e 's!^(#?LogFile ).*!\1/var/log/clamd.<SERVICE>!g' \
+ -e 's!^(#?LocalSocket ).*!\1/var/run/clamd.<SERVICE>/clamd.sock!g' \
+ -e 's!^(#?PidFile ).*!\1/var/run/clamd.<SERVICE>/clamd.pid!g' \
+ -e 's!^#?(User ).*!\1<USER>!g' \
+ -e 's!^#?(AllowSupplementaryGroups|LogSyslog).*!\1 yes!g' \
+ -e 's! /usr/local/share/clamav,! %homedir,!g' \
+ etc/clamd.conf
-perl -pi -e 's!^#(UpdateLogFile )!\1!g;' etc/freshclam.conf
+sed -ri -e 's!^#(UpdateLogFile )!\1!g;' etc/freshclam.conf
## ------------------------------------------------------------
@@ -255,12 +258,17 @@ CFLAGS="$RPM_OPT_FLAGS -Wall -W -Wmissing-prototypes -Wmissing-declarations -std
export LDFLAGS='-Wl,--as-needed'
# HACK: remove me, when configure uses $LIBS instead of $LDFLAGS for milter check
export LIBS='-lmilter -lpthread'
-%configure --disable-clamav --with-dbdir=/var/lib/clamav \
- --enable-milter --disable-static --disable-unrar
-sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool
-# No rpath
-sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
-sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
+# IPv6 check is buggy and does not work when there are no IPv6 interface on build machine
+export have_cv_ipv6=yes
+%configure --disable-clamav --with-dbdir=/var/lib/clamav \
+ --enable-milter --disable-static \
+ --disable-rpath --disable-unrar
+
+# build with --as-needed and disable rpath
+sed -i \
+ -e 's! -shared ! -Wl,--as-needed\0!g' \
+ -e '/sys_lib_dlsearch_path_spec=\"\/lib \/usr\/lib /s!\"\/lib \/usr\/lib !/\"/%_lib /usr/%_lib !g' \
+ libtool
make %{?_smp_mflags}
@@ -297,6 +305,7 @@ install -d -m755 \
rm -f ${RPM_BUILD_ROOT}%_sysconfdir/clamd.conf \
${RPM_BUILD_ROOT}%_libdir/*.la
+
touch ${RPM_BUILD_ROOT}%homedir/daily.cld
touch ${RPM_BUILD_ROOT}%homedir/main.cld
@@ -348,7 +357,8 @@ cat <<EOF >$RPM_BUILD_ROOT%_sysconfdir/sysconfig/clamav-milter
CLAMAV_FLAGS='-lo -c /etc/clamd.d/milter.conf local:%milterstatedir/clamav.sock'
EOF
-install -p -m755 contrib/init/RedHat/clamav-milter $RPM_BUILD_ROOT%_initrddir/clamav-milter
+install -p -m 755 %SOURCE320 $RPM_BUILD_ROOT%_initrddir/clamav-milter
+rm -f $RPM_BUILD_ROOT%_sysconfdir/clamav-milter.conf
touch $RPM_BUILD_ROOT%milterstatedir/clamav.sock $RPM_BUILD_ROOT%milterlog
@@ -455,6 +465,7 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%defattr(-,%username,%username,-)
%ghost %attr(0664,%username,%username) %homedir/*.cvd
+
## -----------------------
%files update
@@ -468,7 +479,6 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%config(noreplace) %_sysconfdir/sysconfig/freshclam
%ghost %attr(0664,root,%username) %verify(not size md5 mtime) %freshclamlog
-
%ghost %attr(0664,%username,%username) %homedir/*.cld
@@ -495,13 +505,12 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%files milter
%defattr(-,root,root,-)
-%doc clamav-milter/INSTALL
%_sbindir/*milter*
%_mandir/man8/clamav-milter*
%config(noreplace) %verify(not mtime) %_sysconfdir/clamd.d/milter.conf
-%attr(0700,%milteruser,%milteruser) %dir %milterstatedir
-%ghost %milterstatedir/*
%ghost %attr(0620,root,%milteruser) %verify(not size md5 mtime) %milterlog
+%attr(0710,%milteruser,%milteruser) %dir %milterstatedir
+%ghost %milterstatedir/*
%files milter-sysv
@@ -511,6 +520,11 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%changelog
+* Fri Apr 10 2009 Robert Scheck <robert(a)fedoraproject.org> - 0.95.1-1
+- Upgrade to 0.95.1 (#495036, #495039) and enabled IPv6 support
+- Fixed typo in SysV initscript which removes 'touch' file (#473513)
+- Added build requirement to ncurses-devel for clamdtop
+
* Tue Dec 02 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.94.2-1
- Upgrade to 0.94.2 (#474002)
diff --git a/clamd-wrapper b/clamd-wrapper
index 372005f..14c04a5 100644
--- a/clamd-wrapper
+++ b/clamd-wrapper
@@ -28,7 +28,7 @@ CLAMD_CONFIGFILE=/etc/clamd.d/${CLAMD_SERVICE}.conf
CLAMD_OPTIONS=
## backward-compatibility check...
for i in /var/run/clamd.${CLAMD_SERVICE}/clamd.sock \
- /var/run/clamav.${CLAMD_SERVICE}/clamd.sock; do
+ /var/run/clamav.${CLAMD_SERVICE}/clamd.sock; do
CLAMD_SOCKET=$i
test ! -e "$i" || break
done
@@ -52,7 +52,7 @@ stop () {
killproc $procname
RETVAL=$?
echo
- [ $RETVAL -eq 0 ] && rm -f touch $lockfile
+ [ $RETVAL -eq 0 ] && rm -f $lockfile
return $RETVAL
}
diff --git a/sources b/sources
index e115b9a..acd143c 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-9b04d010c17c607ace4ed5e9318104d4 clamav-0.94.2-norar.tar.bz2
+0ddd9f341dd0299a6bc5398ee26f4ebf clamav-0.95.1-norar.tar.bz2
commit aef9a638f4c2b07f96790dc7e3cdd427fd67552d
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Fri Apr 10 20:17:31 2009 +0000
Upgrade to 0.95.1 (#495039)
diff --git a/.cvsignore b/.cvsignore
index 10b1622..c07be39 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1 +1 @@
-clamav-0.95-norar.tar.bz2
+clamav-0.95.1-norar.tar.bz2
diff --git a/clamav.spec b/clamav.spec
index a7b09ae..2daad57 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -20,7 +20,7 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
-Version: 0.95
+Version: 0.95.1
Release: %release_func 1%{?snapshot:.%snapshot}
License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
@@ -666,6 +666,9 @@ test "$1" != "0" || /sbin/initctl -q stop clamav-milter || :
%changelog
+* Fri Apr 10 2009 Robert Scheck <robert(a)fedoraproject.org> - 0.95.1-1
+- Upgrade to 0.95.1 (#495039)
+
* Wed Mar 25 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95-1
- updated to final 0.95
- added ncurses-devel (-> clamdtop) BR
diff --git a/sources b/sources
index 186409f..acd143c 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-f6ede74787379f1683a368ee6da62cea clamav-0.95-norar.tar.bz2
+0ddd9f341dd0299a6bc5398ee26f4ebf clamav-0.95.1-norar.tar.bz2
commit 3054d5609e5b4a832d67e35d946906fbead966cf
Author: ensc <ensc(a)fedoraproject.org>
Date: Wed Mar 25 22:03:44 2009 +0000
updated
diff --git a/.cvsignore b/.cvsignore
index 334ef5c..10b1622 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1 +1 @@
-clamav-0.95rc1-norar.tar.bz2
+clamav-0.95-norar.tar.bz2
diff --git a/clamav.spec b/clamav.spec
index f6c79f5..a7b09ae 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -1,4 +1,4 @@
-%global snapshot rc1
+#global snapshot rc1
## Fedora Extras specific customization below...
%bcond_without fedora
@@ -21,7 +21,7 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
Version: 0.95
-Release: %release_func 0.1%{?snapshot:.%snapshot}
+Release: %release_func 1%{?snapshot:.%snapshot}
License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
Group: Applications/File
@@ -51,6 +51,7 @@ BuildRoot: %_tmppath/%name-%version-%release-root
Requires: clamav-lib = %version-%release
Requires: data(clamav)
BuildRequires: zlib-devel bzip2-devel gmp-devel curl-devel
+BuildRequires: ncurses-devel
BuildRequires: %_includedir/tcpd.h
BuildRequires: bc
@@ -337,6 +338,8 @@ CFLAGS="$RPM_OPT_FLAGS -Wall -W -Wmissing-prototypes -Wmissing-declarations -std
export LDFLAGS='-Wl,--as-needed'
# HACK: remove me, when configure uses $LIBS instead of $LDFLAGS for milter check
export LIBS='-lmilter -lpthread'
+# IPv6 check is buggy and does not work when there are no IPv6 interface on build machine
+export have_cv_ipv6=yes
%configure --disable-clamav --with-dbdir=/var/lib/clamav \
--enable-milter --disable-static \
--disable-rpath \
@@ -663,6 +666,11 @@ test "$1" != "0" || /sbin/initctl -q stop clamav-milter || :
%changelog
+* Wed Mar 25 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95-1
+- updated to final 0.95
+- added ncurses-devel (-> clamdtop) BR
+- enforced IPv6 support
+
* Sun Mar 8 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95-0.1.rc1
- updated to 0.95rc1
- added -upstart subpackages
diff --git a/lastver b/lastver
index d89b314..fd6d73e 100644
--- a/lastver
+++ b/lastver
@@ -1 +1 @@
-0.94.2
+0.95
diff --git a/sources b/sources
index 5f92b5e..186409f 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-40d13c0d39568b17aec35fe793233861 clamav-0.95rc1-norar.tar.bz2
+f6ede74787379f1683a368ee6da62cea clamav-0.95-norar.tar.bz2
commit 5e13498992d054b9cb059fd390b3d6251426b891
Author: ensc <ensc(a)fedoraproject.org>
Date: Sun Mar 8 14:49:39 2009 +0000
updated
diff --git a/README.fedora b/README.fedora
index d46b193..603526c 100644
--- a/README.fedora
+++ b/README.fedora
@@ -24,7 +24,7 @@ A clamav-milter setup consists of the following three components:
-upstart requires modification of /etc/event.d/clamd.scan to enable
automatic startup. See comments there for more details.
-* the MDA (sendmail/postfix)
+* the MTA (sendmail/postfix)
--> you should know how to install this...
diff --git a/clamav-milter.upstart b/clamav-milter.upstart
index 12a5d0c..165829e 100644
--- a/clamav-milter.upstart
+++ b/clamav-milter.upstart
@@ -1,13 +1,13 @@
### Uncomment these lines when you want clamav-milter to be a milter
-### for a locally running MDA
+### for a locally running MTA
#start on starting\ sendmail
#start on starting sendmail
#start on starting\ postfix
#start on starting postfix
### Uncomment these lines when you want clamav-milter to be a milter
-### for a remotely running MDA
+### for a remotely running MTA
#start on starting\ local
#start on starting local
commit 8e678e525b999e5eaca946ece8e9fb67a7b0c065
Author: ensc <ensc(a)fedoraproject.org>
Date: Sun Mar 8 13:24:07 2009 +0000
updated
diff --git a/README.fedora b/README.fedora
index b9f572e..d46b193 100644
--- a/README.fedora
+++ b/README.fedora
@@ -1,5 +1,42 @@
-Add
+A clamav-milter setup consists of the following three components:
- INPUT_MAIL_FILTER(`clamav', `S=local:/var/run/clamav-milter/clamav.sock, F=, T=S:4m;R:4m')dnl
+* the clamav-milter itself
-to your sendmail.mc.
+ --> this is provided by the 'clamav-milter' package plus (alternatively)
+ 'clamav-milter-upstart' or 'clamav-milter-sysvinit'
+
+ The main configuration is in /etc/mail/clamav-milter.conf and MUST
+ be changed before first use.
+
+ The -sysvinit package is managed by the traditional tools, but
+ -upstart requires modification of /etc/event.d/clamav-milter to
+ enable automatic startup. See comments there for more details.
+
+* a clamav scanner daemon
+
+ --> this package is called 'clamav-scanner' plus (alternatively)
+ 'clamav-scanner-upstart' or 'clamav-scanner-sysvinit'
+
+ The daemon is configured by /etc/clamd.d/scan.conf (which MUST be
+ edited before first use).
+
+ The -sysvinit package is managed by the traditional tools, but
+ -upstart requires modification of /etc/event.d/clamd.scan to enable
+ automatic startup. See comments there for more details.
+
+* the MDA (sendmail/postfix)
+
+ --> you should know how to install this...
+
+ When communicating across unix sockets with the clamav-milter, it is
+ suggested to use the /var/run/clamav-milter/clamav.sock path. You
+ have to add something like
+
+ INPUT_MAIL_FILTER(`clamav', `S=local:/var/run/clamav-milter/clamav.sock, F=, T=S:4m;R:4m')dnl
+
+ to your sendmail.mc.
+
+
+
+It is suggested that components communicate through TCP sockets as
+this eases setup. Please add corresponding packet filter rules!
diff --git a/clamav-0.95rc1-umask.patch b/clamav-0.95rc1-umask.patch
new file mode 100644
index 0000000..8a46216
--- /dev/null
+++ b/clamav-0.95rc1-umask.patch
@@ -0,0 +1,39 @@
+Index: clamav-0.95rc1/clamav-milter/clamav-milter.c
+===================================================================
+--- clamav-0.95rc1.orig/clamav-milter/clamav-milter.c
++++ clamav-0.95rc1/clamav-milter/clamav-milter.c
+@@ -287,7 +287,7 @@ int main(int argc, char **argv) {
+
+ if((opt = optget(opts, "PidFile"))->enabled) {
+ FILE *fd;
+- mode_t old_umask = umask(0006);
++ mode_t old_umask = umask(0022);
+
+ if((fd = fopen(opt->strarg, "w")) == NULL) {
+ logg("!Can't save PID in file %s\n", opt->strarg);
+Index: clamav-0.95rc1/shared/output.c
+===================================================================
+--- clamav-0.95rc1.orig/shared/output.c
++++ clamav-0.95rc1/shared/output.c
+@@ -250,7 +250,7 @@ int logg(const char *str, ...)
+ #endif
+ if(logg_file) {
+ if(!logg_fp) {
+- old_umask = umask(0037);
++ old_umask = umask(0077);
+ if((logg_fp = fopen(logg_file, "at")) == NULL) {
+ umask(old_umask);
+ #ifdef CL_THREAD_SAFE
+Index: clamav-0.95rc1/freshclam/freshclam.c
+===================================================================
+--- clamav-0.95rc1.orig/freshclam/freshclam.c
++++ clamav-0.95rc1/freshclam/freshclam.c
+@@ -102,7 +102,7 @@ static void writepid(const char *pidfile
+ {
+ FILE *fd;
+ int old_umask;
+- old_umask = umask(0006);
++ old_umask = umask(0022);
+ if((fd = fopen(pidfile, "w")) == NULL) {
+ logg("!Can't save PID to file %s: %s\n", pidfile, strerror(errno));
+ } else {
diff --git a/clamav-milter.sysv b/clamav-milter.sysv
index 8ff51b3..c0fad96 100644
--- a/clamav-milter.sysv
+++ b/clamav-milter.sysv
@@ -11,7 +11,7 @@
exec=/usr/sbin/clamav-milter
prog="clamav-milter"
-OPTS=
+OPTS='-c /etc/mail/clamav-milter.conf'
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
pidfile=/var/run/clamav-milter/milter.pid
@@ -21,8 +21,7 @@ start() {
[ -x $exec ] || exit 5
[ -f $config ] || exit 6
echo -n $"Starting $prog: "
- daemon --pidfile=${pidfile} \
- $exec $OPTS --nofork=no --pid=${pidfile} && success || failure
+ daemon --pidfile=${pidfile} $exec $OPTS --nofork=no --pid=${pidfile}
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
@@ -31,7 +30,7 @@ start() {
stop() {
echo -n $"Stopping $prog: "
- killproc -o "${pidfile} $exec && success || failure
+ killproc -p "${pidfile}" $exec
retval=$?
echo
[ $retval -eq 0 ] && rm -f $lockfile
@@ -53,7 +52,7 @@ force_reload() {
rh_status() {
# run checks to determine if the service is running or use generic status
- status $prog
+ status -p "${pidfile}" $prog
}
rh_status_q() {
diff --git a/clamav-milter.upstart b/clamav-milter.upstart
index f211818..12a5d0c 100644
--- a/clamav-milter.upstart
+++ b/clamav-milter.upstart
@@ -16,4 +16,4 @@ stop on runlevel 1
stop on runlevel 6
respawn
-exec /usr/sbin/clamav-milter -c /etc/mail/clamav-milter --nofork=yes
+exec /usr/sbin/clamav-milter -c /etc/mail/clamav-milter.conf --nofork=yes
diff --git a/clamav.spec b/clamav.spec
index 8b5758c..f6c79f5 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -21,7 +21,7 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
Version: 0.95
-Release: %release_func 0.0.3%{?snapshot:.%snapshot}
+Release: %release_func 0.1%{?snapshot:.%snapshot}
License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
Group: Applications/File
diff --git a/clamd-wrapper b/clamd-wrapper
index 5baca59..ec785d0 100644
--- a/clamd-wrapper
+++ b/clamd-wrapper
@@ -42,7 +42,8 @@ prog="clamd.${CLAMD_SERVICE}"
start () {
echo -n $"Starting $prog: "
daemon --pidfile=${CLAMD_PIDFILE} \
- $procname ${CLAMD_CONFIGFILE:+-c $CLAMD_CONFIGFILE} ${CLAMD_OPTIONS} --pid ${CLAMD_PIDFILE}
+ exec -a $procname /usr/sbin/clamd \
+ ${CLAMD_CONFIGFILE:+-c $CLAMD_CONFIGFILE} ${CLAMD_OPTIONS} --pid ${CLAMD_PIDFILE}
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch $lockfile
diff --git a/clamd.scan.upstart b/clamd.scan.upstart
index e96b37e..6c769e0 100644
--- a/clamd.scan.upstart
+++ b/clamd.scan.upstart
@@ -12,4 +12,4 @@ stop on runlevel 1
stop on runlevel 6
respawn
-exec /usr/sbin/clamd -c /etc/clamd.d/clamd.scan --nofork=yes
+exec /usr/sbin/clamd -c /etc/clamd.d/scan.conf --nofork=yes
commit 9cba4633a4309d7d2b7456c54fbcf0a85fa4efb7
Author: ensc <ensc(a)fedoraproject.org>
Date: Sun Mar 8 12:53:03 2009 +0000
updated
diff --git a/clamav.spec b/clamav.spec
index f08684d..8b5758c 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -134,8 +134,8 @@ Summary: Clamav scanner daemon
Group: System Environment/Daemons
BuildArch: noarch
Requires: init(clamav-scanner)
-Provides: user(%scanuser) = 99
-Provides: group(%scanuser) = 99
+Provides: user(%scanuser) = 49
+Provides: group(%scanuser) = 49
Requires: clamav-server = %version-%release
%package scanner-sysvinit
diff --git a/clamd-wrapper b/clamd-wrapper
index b601cf2..5baca59 100644
--- a/clamd-wrapper
+++ b/clamd-wrapper
@@ -51,7 +51,7 @@ start () {
stop () {
echo -n $"Stopping $prog: "
- killproc $procname
+ killproc -p ${CLAMD_PIDFILE} $procname
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f $lockfile
@@ -79,7 +79,7 @@ case "$1" in
start|stop|restart|reload)
$1 ;;
status)
- status $procname ;;
+ status -p ${CLAMD_PIDFILE} $procname ;;
condrestart)
test ! -f $lockfile || restart
;;
commit 71c33552b35a0ee478fc90c5696dfd548c7c81b4
Author: ensc <ensc(a)fedoraproject.org>
Date: Sun Mar 8 12:47:20 2009 +0000
updated
diff --git a/clamav.spec b/clamav.spec
index 941cbc9..f08684d 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -21,7 +21,7 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
Version: 0.95
-Release: %release_func 0.0.1%{?snapshot:.%snapshot}
+Release: %release_func 0.0.3%{?snapshot:.%snapshot}
License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
Group: Applications/File
@@ -46,6 +46,7 @@ Source8: clamav-notify-servers
Patch24: clamav-0.92-private.patch
Patch25: clamav-0.92-open.patch
Patch26: clamav-0.95-cliopts.patch
+Patch27: clamav-0.95rc1-umask.patch
BuildRoot: %_tmppath/%name-%version-%release-root
Requires: clamav-lib = %version-%release
Requires: data(clamav)
@@ -310,6 +311,7 @@ The Upstart initscripts for clamav-milter.
%patch24 -p1 -b .private
%patch25 -p1 -b .open
%patch26 -p1 -b .cliopts
+%patch27 -p1 -b .umask
install -p -m0644 %SOURCE300 clamav-milter/
@@ -422,7 +424,7 @@ smartsubst 's!webmaster,clamav!webmaster,%username!g;
### The scanner stuff
sed -e 's!<SERVICE>!scan!g;s!<USER>!%scanuser!g' \
- etc/clamd.conf > $RPM_BUILD_ROOT%_sysconfdir/clamd.d/clamd.scan
+ etc/clamd.conf > $RPM_BUILD_ROOT%_sysconfdir/clamd.d/scan.conf
sed -e 's!<SERVICE>!scan!g;' $RPM_BUILD_ROOT%pkgdatadir/template/clamd.init \
> $RPM_BUILD_ROOT%_initrddir/clamd.scan
@@ -629,7 +631,7 @@ test "$1" != "0" || /sbin/initctl -q stop clamav-milter || :
%files scanner
%defattr(-,root,root,-)
%dir %attr(0710,%scanuser,%scanuser) %scanstatedir
-%config(noreplace) %_sysconfdir/clamd.d/clamd.scan
+%config(noreplace) %_sysconfdir/clamd.d/scan.conf
%ghost %scanstatedir/clamd.sock
%files scanner-sysvinit
commit 0981a17d0b3b976ba2b2a6196e1a76db59a3b54c
Author: ensc <ensc(a)fedoraproject.org>
Date: Sun Mar 8 11:38:36 2009 +0000
updated
diff --git a/.cvsignore b/.cvsignore
index 336c23f..334ef5c 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1 +1 @@
-clamav-0.94.2-norar.tar.bz2
+clamav-0.95rc1-norar.tar.bz2
diff --git a/ChangeLog-rpm.old b/ChangeLog-rpm.old
new file mode 100644
index 0000000..44c8556
--- /dev/null
+++ b/ChangeLog-rpm.old
@@ -0,0 +1,279 @@
+* Tue Dec 12 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.7-1
+- updated to 0.88.7
+
+* Sun Nov 5 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.6-1
+- updated to 0.88.6
+
+* Wed Oct 18 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.5-1
+- updated to 0.88.5 (SECURITY); fixes CVE-2006-4182, CVE-2006-5295
+- added patch to set '__attribute__ ((visibility("hidden")))' for
+ exported MD5_*() functions (fixes #202043)
+
+* Thu Oct 05 2006 Christian Iseli <Christian.Iseli(a)licr.org> 0.88.4-4
+ - rebuilt for unwind info generation, broken in gcc-4.1.1-21
+
+* Thu Sep 21 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.4-3
+- splitted SysV initscripts of -milter and -server into own subpackages
+
+* Fri Sep 15 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.4-2
+- rebuilt
+
+* Tue Aug 8 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.4-1
+- updated to 0.88.4 (SECURITY)
+
+* Wed Jul 12 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
+- removed the clamdscan(1) manpage from the -server subpackage
+
+* Sat Jul 8 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
+- removed a superfluous '}'
+- removed some code which was relevant for FC-3 only
+
+* Sat Jul 8 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.3-1
+- updated to 0.88.3
+- updated to new fedora-usermgmt macros
+
+* Tue May 16 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.2-2
+- cleanups: removed unneeded curlies, use plain command instead of
+ %%__XXX macro, whitespace cleanup, removed unneeded versioned
+ dependencies
+- added a 'Requires(post): group(clamav)' dependencies for -update and
+ added the corresponding Provides: to -data
+- removed the %%_without_milter conditional; you won't gain anything
+ when milter would be disabled at buildtime
+
+* Sun Apr 30 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.2-1
+- updated to 0.88.2 (SECURITY)
+- rediffed patches; most issues handled by 0.88.1-2 are fixed in
+ 0.88.2
+
+* Mon Apr 24 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.1-2
+- added patch which fixes some classes of compiler warnings; at least
+ the using of implicitly declared functions was reported to cause
+ segfaults on AMD64 (brought to my attention by Marc Perkel)
+- added patch which fixes wrong usage of strncpy(3) in unrarlib.c
+
+* Thu Apr 06 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.1-1
+- updated to 0.88.1 (SECURITY)
+
+* Sat Feb 18 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88-2
+- rebuilt for FC5
+
+* Tue Jan 10 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88-1
+- updated to 0.88
+- added pseudo-versions for the 'init(...)' provides as a first step
+ for the support of alternative initmethods
+
+* Tue Nov 15 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.87.1-2
+- moved 'freshclam.conf.5' man page into the -update subpackage (#173221)
+- ship 'clamd.conf.5' man page in the -server subpackage *too*. The
+ same file is contained in multiple packages now, but this man-page
+ can not be removed from the base package because it also applies to
+ 'clamdscan' there (#173221).
+
+* Fri Nov 4 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.87.1-1
+- updated to 0.87.1
+
+* Sat Sep 17 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.87-1
+- updated to 0.87 (SECURITY)
+- removed -timeout patch; it is solved upstream
+- reverted the -exim changes; they add yet more complexity, their
+ functionality can go into an own package and they contained flaws
+
+* Fri Sep 9 2005 David Woodhouse <dwmw2(a)infradead.org> - 0.86.2-5
+- Add clamav-exim configuration package
+
+* Fri Jul 29 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.86.2-4
+- [milter] create the milter-logfile in the %%post scriptlet
+- [milter] reverted the change of the default child_timeout value; it
+ was set to 5 minutes in 0.86.2 which conflicts with the internal
+ mode where a timeout must not be set. So, the clamav-milter would
+ not run with the default configuration
+
+* Thu Jul 28 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.86.2-3
+- Fixed calculation of sleep duration; on some systems/IPs, `hostid`
+ results in a negative number which is retained by the bash
+ modulo-operation. So the sleep may get a negative number of seconds
+ being interpreted as an option. This version makes sure that the
+ module-operations returns a non-negative value. [BZ #164494, James
+ Wilkinson]
+- added support for a /usr/sbin/clamav-notify-servers.local hook; this
+ file will be executed (source'd) before all other actions and can
+ abort the entire processing by invoking 'exit'
+
+* Mon Jul 25 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.86.2-2
+- updated to 0.86.2 (SECURITY)
+- changed the freshclam updating mechanism (again); now, it consists
+ of a crontab which does not need to be changed and a helper script
+ (freshclam-sleep). This helper script is configured by
+ /etc/sysconfig/freshclam
+
+* Sat Jun 25 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.86.1-2
+- updated to 0.86.1
+- fixed randomization in %%post scriptlet: hour should be a range but
+ not a single number
+
+* Tue Jun 21 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.86-1
+- updated to 0.86
+- randomize freshclam startup times in -update's %%post script (suggested
+ by Stephen Smoogen); this requires some more Requires(post): also
+
+* Wed May 18 2005 Warren Togami <wtogami(a)redhat.com> - 0.85.1-4
+- fix dist tagging the way Enrico wants it
+
+* Tue May 17 2005 Oliver Falk <oliver(a)linux-kernel.at> - 0.85.1-2
+- Rebuild
+
+* Tue May 17 2005 Oliver Falk <oliver(a)linux-kernel.at> - 0.85.1-1
+- Update
+
+* Sat May 14 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.85-0
+- updated to 0.85
+
+* Sun May 1 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.84-0
+- updated to 0.84
+
+* Fri Apr 7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
+- rebuilt
+
+* Tue Feb 15 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.83-1
+- updated to 0.83
+
+* Tue Feb 8 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.82-1
+- updated to 0.82
+- minor spec cleanups
+
+* Fri Jan 28 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 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 <enrico.scholz(a)informatik.tu-chemnitz.de> - 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 <enrico.scholz(a)informatik.tu-chemnitz.de> - 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 <enrico.scholz(a)informatik.tu-chemnitz.de> - 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 <enrico.scholz(a)informatik.tu-chemnitz.de> - 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 <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.75-0.fdr.1
+- updated to 0.75
+
+* Thu Jul 15 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.74-0.fdr.2
+- moved /usr/bin/clamav-config from main into -devel
+
+* Wed Jun 30 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.74-0.fdr.1
+- updated to 0.74
+
+* Mon Jun 14 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.73-0.fdr.1
+- updated to 0.73
+- added pkgconfig file
+
+* Fri Jun 11 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 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 <enrico.scholz(a)informatik.tu-chemnitz.de> - 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 <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.72-0.fdr.1
+- updated to 0.72
+
+* Thu May 20 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 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
+ replace some placeholders...
+
+* Wed May 19 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.71-0.fdr.1
+- updated to 0.71
+
+* Fri May 7 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.70-0.fdr.1.1
+- quote 'EOF' to delay $RANDOM expansion
+
+* Tue Apr 27 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.70-0.fdr.2
+- updated GECOS entry for the 'clamav' user to describe its purpose
+ more accurately
+- use explicit '-m755' when creating directories with install
+
+* Tue Apr 20 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.70-0.fdr.1
+- updated to 0.70; rediffed some patches
+- updated logrotate script to use signals and documented the steps
+ which are needed to make it work
+- adapted initscript to use signals instead of sockwrite
+- removed sockwrite; signals can now be used to reload the database
+- added logfile to the -milter subpackage
+
+* Tue Apr 20 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.68-0.fdr.2.1
+- tagged some Requires:, since clamav-server is required in the milter-%%post* scriptlets
+
+* Sat Mar 20 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.68-0.fdr.2
+- split the double Requires(...,...): statements; see
+ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=118773
+- require the recent fedora-usermgmt package (0.7) which fixes similar
+ ordering issues
+
+* Thu Mar 18 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.68-0.fdr.1
+- updated to 0.68 (using the -1 version)
+- ship milter-files in the -milter instead of the -server subpackage
+
+* Tue Feb 24 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.67-0.fdr.3
+- fixed ':' vs. '.' in chown
+
+* Tue Feb 17 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.67-0.fdr.2
+- randomize freshclam startup to prevent server peaks
+
+* Mon Feb 16 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.67-0.fdr.1
+- updated to 0.67 (using the -1 version)
+
+* Wed Feb 11 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.66-0.fdr.2
+- updated to 0.66; important, packaging-relevant changes are
+ freshclam:
+ * $http_proxy is not supported anymore; you have to configure it in
+ /etc/freshclam.conf
+ * the logfile has been renamed to /var/log/freshclam.log
+- removed %%check section; buildroot check is implemented in local
+ testsuite already
+- added some %%verify(not mtime) modifiers to avoid unnecessary .rpmnew
+ files
+- added some directory-Requires:
+- activated milter-package and made it work
+- added patch to disable clamav-milter service by default
+- renamed /var/run/clamav.<SERVICE> to /var/run/clamd.<SERVICE>; this
+ makes things more consistently but can break backward compatibility. The
+ initscript should deal with the old version too, but I would not bet on
+ it...
+- updated some descriptions
+- fixed the update-mechanism; now it happens in two stages: at first,
+ the files will be downloaded as user 'clamav' and then, root initiates
+ the daemon-reload.
+
+* Mon Feb 9 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.65-0.fdr.5
+- added security fix for
+ http://www.securityfocus.com/archive/1/353194/2004-02-06/2004-02-12/1
diff --git a/clamav-0.93.1-path.patch b/clamav-0.93.1-path.patch
deleted file mode 100644
index 4f1872c..0000000
--- a/clamav-0.93.1-path.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- clamav-0.93.1/contrib/init/RedHat/clamav-milter.path
-+++ clamav-0.93.1/contrib/init/RedHat/clamav-milter
-@@ -22,7 +22,6 @@ test -f /etc/sysconfig/clamav-milter &&
- # Check that networking is up.
- [ ${NETWORKING} = "no" ] && exit 0
-
--[ -x /usr/local/sbin/clamav-milter ] || exit 0
- PATH=$PATH:/usr/bin:/usr/local/sbin:/usr/local/bin
-
- RETVAL=0
-@@ -87,7 +86,7 @@ case "$1" in
- restart
- ;;
- condrestart)
-- test -f ${lockfile} && $0 restart || :
-+ test -f ${lockfile} && restart || :
- ;;
- status)
- if [ ! -z $pidfile ]; then
diff --git a/clamav-0.93.3-initoff.patch b/clamav-0.93.3-initoff.patch
deleted file mode 100644
index 899d32b..0000000
--- a/clamav-0.93.3-initoff.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- clamav-0.93.3/contrib/init/RedHat/clamav-milter.initoff
-+++ clamav-0.93.3/contrib/init/RedHat/clamav-milter
-@@ -2,7 +2,7 @@
- #
- # clamav-milter This script starts and stops the clamav-milter daemon
- #
--# chkconfig: 2345 79 40
-+# chkconfig: - 79 40
- #
- # description: clamav-milter is a daemon which hooks into sendmail and routes \
- # email messages for virus scanning with ClamAV
diff --git a/clamav-0.93.3-pid.patch b/clamav-0.93.3-pid.patch
deleted file mode 100644
index de29887..0000000
--- a/clamav-0.93.3-pid.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Try to fix https://bugzilla.redhat.com/show_bug.cgi?id=452359; RH/Fedora
-initscripts do not support killing of whole processgroups. Hence, disable
-feature which posts negative pgrp into pidfile and use plain pid instead
-of.
-
-diff -up clamav-0.93.3/clamav-milter/clamav-milter.c.~1~ clamav-0.93.3/clamav-milter/clamav-milter.c
---- clamav-0.93.3/clamav-milter/clamav-milter.c.~1~ 2008-07-07 20:02:10.000000000 +0200
-+++ clamav-0.93.3/clamav-milter/clamav-milter.c 2008-07-13 20:15:12.000000000 +0200
-@@ -1985,7 +1985,7 @@ main(int argc, char **argv)
- logg(_("!Can't save PID in file %s\n"), pidfile);
- return EX_CONFIG;
- }
--#ifdef C_LINUX
-+#if defined(C_LINUX) && 0
- /* Ensure that all threads are kill()ed */
- fprintf(fd, "-%d\n", (int)getpgrp());
- #else
diff --git a/clamav-0.95-cliopts.patch b/clamav-0.95-cliopts.patch
new file mode 100644
index 0000000..90d173f
--- /dev/null
+++ b/clamav-0.95-cliopts.patch
@@ -0,0 +1,13 @@
+Index: clamav-0.95rc1/shared/optparser.c
+===================================================================
+--- clamav-0.95rc1.orig/shared/optparser.c
++++ clamav-0.95rc1/shared/optparser.c
+@@ -211,7 +211,7 @@ const struct clam_option clam_options[]
+
+ { "ExitOnOOM", NULL, 0, TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD, "Stop the daemon when libclamav reports an out of memory condition.", "yes" },
+
+- { "Foreground", NULL, 0, TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_FRESHCLAM | OPT_MILTER, "Don't fork into background.", "no" },
++ { "Foreground", "nofork", 0, TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_FRESHCLAM | OPT_MILTER, "Don't fork into background.", "no" },
+
+ { "Debug", NULL, 0, TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_FRESHCLAM, "Enable debug messages in libclamav.", "no" },
+
diff --git a/clamav-milter.sysv b/clamav-milter.sysv
new file mode 100644
index 0000000..8ff51b3
--- /dev/null
+++ b/clamav-milter.sysv
@@ -0,0 +1,94 @@
+#!/bin/sh
+#
+# clamav-milter Starts/stop the "clamav-milter" daemon
+#
+# chkconfig: 345 99 1
+# description: A virus scanning milter
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+exec=/usr/sbin/clamav-milter
+prog="clamav-milter"
+
+OPTS=
+[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
+
+pidfile=/var/run/clamav-milter/milter.pid
+lockfile=/var/lock/subsys/$prog
+
+start() {
+ [ -x $exec ] || exit 5
+ [ -f $config ] || exit 6
+ echo -n $"Starting $prog: "
+ daemon --pidfile=${pidfile} \
+ $exec $OPTS --nofork=no --pid=${pidfile} && success || failure
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && touch $lockfile
+ return $retval
+}
+
+stop() {
+ echo -n $"Stopping $prog: "
+ killproc -o "${pidfile} $exec && success || failure
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && rm -f $lockfile
+ return $retval
+}
+
+restart() {
+ stop
+ start
+}
+
+reload() {
+ restart
+}
+
+force_reload() {
+ restart
+}
+
+rh_status() {
+ # run checks to determine if the service is running or use generic status
+ status $prog
+}
+
+rh_status_q() {
+ rh_status >/dev/null 2>&1
+}
+
+
+case "$1" in
+ start)
+ rh_status_q && exit 0
+ $1
+ ;;
+ stop)
+ rh_status_q || exit 0
+ $1
+ ;;
+ restart)
+ $1
+ ;;
+ reload)
+ rh_status_q || exit 7
+ $1
+ ;;
+ force-reload)
+ force_reload
+ ;;
+ status)
+ rh_status
+ ;;
+ condrestart|try-restart)
+ rh_status_q || exit 0
+ restart
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+ exit 2
+esac
+exit $?
diff --git a/clamav-milter.upstart b/clamav-milter.upstart
new file mode 100644
index 0000000..f211818
--- /dev/null
+++ b/clamav-milter.upstart
@@ -0,0 +1,19 @@
+
+### Uncomment these lines when you want clamav-milter to be a milter
+### for a locally running MDA
+#start on starting\ sendmail
+#start on starting sendmail
+#start on starting\ postfix
+#start on starting postfix
+
+### Uncomment these lines when you want clamav-milter to be a milter
+### for a remotely running MDA
+#start on starting\ local
+#start on starting local
+
+stop on runlevel 0
+stop on runlevel 1
+stop on runlevel 6
+
+respawn
+exec /usr/sbin/clamav-milter -c /etc/mail/clamav-milter --nofork=yes
diff --git a/clamav.spec b/clamav.spec
index e03bcaa..941cbc9 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -1,4 +1,4 @@
-#global snapshot rc1
+%global snapshot rc1
## Fedora Extras specific customization below...
%bcond_without fedora
@@ -8,18 +8,20 @@
%global username clamav
%global homedir %_var/lib/clamav
%global freshclamlog %_var/log/freshclam.log
-%global milterlog %_var/log/clamd.milter
%global milteruser clamilt
+%global milterlog %_var/log/clamav-milter.log
%global milterstatedir %_var/run/clamav-milter
%global pkgdatadir %_datadir/%name
+%global scanuser clamscan
+%global scanstatedir %_var/run/clamd.scan
%{!?release_func:%global release_func() %1%{?dist}}
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
-Version: 0.94.2
-Release: %release_func 3%{?snapshot:.%snapshot}
+Version: 0.95
+Release: %release_func 0.0.1%{?snapshot:.%snapshot}
License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
Group: Applications/File
@@ -41,11 +43,9 @@ Source5: clamd-README
Source6: clamav-update.logrotate
Source7: clamd.SERVICE.init
Source8: clamav-notify-servers
-Patch21: clamav-0.93.1-path.patch
-Patch22: clamav-0.93.3-initoff.patch
Patch24: clamav-0.92-private.patch
Patch25: clamav-0.92-open.patch
-Patch26: clamav-0.93.3-pid.patch
+Patch26: clamav-0.95-cliopts.patch
BuildRoot: %_tmppath/%name-%version-%release-root
Requires: clamav-lib = %version-%release
Requires: data(clamav)
@@ -56,8 +56,9 @@ BuildRequires: bc
%package filesystem
Summary: Filesystem structure for clamav
Group: Applications/File
-Provides: user(clamav)
-Provides: group(clamav)
+BuildArch: noarch
+Provides: user(%username) = 4
+Provides: group(%username) = 4
# Prevent version mix
Conflicts: %name < %version-%release
Conflicts: %name > %version-%release
@@ -81,7 +82,7 @@ Requires: pkgconfig
%package data
Summary: Virus signature data for the Clam Antivirus scanner
Group: Applications/File
-BuildArch: noarch
+BuildArch: noarch
Requires(pre): clamav-filesystem = %version-%release
Requires(postun): clamav-filesystem = %version-%release
Provides: data(clamav) = full
@@ -111,12 +112,11 @@ Requires(post): group(clamav)
%package server
Summary: Clam Antivirus scanner server
Group: System Environment/Daemons
-Requires: init(clamav-server)
Requires: data(clamav)
Requires: clamav-filesystem = %version-%release
Requires: clamav-lib = %version-%release
-%package server-sysv
+%package server-sysvinit
Summary: SysV initscripts for clamav server
Group: System Environment/Daemons
BuildArch: noarch
@@ -124,48 +124,91 @@ Provides: init(clamav-server) = sysv
Requires: clamav-server = %version-%release
Requires(pre): %_initrddir
Requires(postun): %_initrddir
+Provides: clamav-server-sysv = %version-%release
+Obsoletes: clamav-server-sysv < %version-%release
-%package milter
-Summary: Milter module for the Clam Antivirus scanner
+
+%package scanner
+Summary: Clamav scanner daemon
+Group: System Environment/Daemons
+BuildArch: noarch
+Requires: init(clamav-scanner)
+Provides: user(%scanuser) = 99
+Provides: group(%scanuser) = 99
+Requires: clamav-server = %version-%release
+
+%package scanner-sysvinit
+Summary: SysV initscripts for clamav scanner daemon
Group: System Environment/Daemons
-Requires: clamav-milter-core = %version-%release
-Requires: milter(clamav)
+BuildArch: noarch
+Provides: init(clamav-scanner) = sysv
+Requires: clamav-server-sysvinit = %version-%release
+Requires: clamav-scanner = %version-%release
+Requires(pre): %_initrddir
+Requires(postun): %_initrddir initscripts
+Requires(post): chkconfig
+Requires(preun): chkconfig initscripts
-%package milter-core
-Summary: Core milter module for the Clam Antivirus scanner
+%package scanner-upstart
+Summary: Upstart initscripts for clamav scanner daemon
Group: System Environment/Daemons
+BuildArch: noarch
+Source410: clamd.scan.upstart
+Provides: init(clamav-scanner) = upstart
+Requires: clamav-scanner = %version-%release
+# implicates a conflict with upstart 0.5+
+Requires(pre): /etc/event.d
+Requires(post): /usr/bin/killall
+Requires(postun): /sbin/initctl
+
+
+%package milter
+Summary: Milter module for the Clam Antivirus scanner
+Group: System Environment/Daemons
+Source300: README.fedora
Requires: init(clamav-milter)
BuildRequires: sendmail-devel
BuildRequires: fedora-usermgmt-devel
-Provides: user(%milteruser)
-Provides: group(%milteruser)
+Provides: user(%milteruser) = 5
+Provides: group(%milteruser) = 5
Requires(post): coreutils
%{?FE_USERADD_REQ}
-%package milter-sendmail
-Summary: Sendmail customizations for clamav-milter
-Group: System Environment/Daemons
-Source300: README.fedora
-Requires: sendmail
-Requires: clamav-milter-core = %version-%release
-Requires(pre): user(%milteruser)
-Requires(pre): group(%milteruser)
Provides: milter(clamav) = sendmail
-Conflicts: milter(clamav) < sendmail
-Conflicts: milter(clamav) > sendmail
+Provides: milter(clamav) = postfix
-%package milter-sysv
+Provides: clamav-milter-core = %version-%release
+Obsoletes: clamav-milter-core < %version-%release
+Provides: clamav-milter-sendmail = %version-%release
+Obsoletes: clamav-milter-sendmail < %version-%release
+
+%package milter-sysvinit
Summary: SysV initscripts for the clamav sendmail-milter
Group: System Environment/Daemons
-Provides: init(clamav-milter) = sysv
-Requires: clamav-milter = %version-%release
BuildArch: noarch
+Source320: clamav-milter.sysv
+Provides: init(clamav-milter) = sysvinit
+Requires: clamav-milter = %version-%release
Requires(post): user(%milteruser) clamav-milter
Requires(preun): user(%milteruser) clamav-milter
Requires(pre): %_initrddir
Requires(postun): %_initrddir initscripts
Requires(post): chkconfig
Requires(preun): chkconfig initscripts
+Provides: milter-sysv = %version-%release
+Obsoletes: milter-sysv < %version-%release
+
+%package milter-upstart
+Summary: Upstart initscripts for the clamav sendmail-milter
+Group: System Environment/Daemons
+BuildArch: noarch
+Source310: clamav-milter.upstart
+Provides: init(clamav-milter) = upstart
+Requires: clamav-milter = %version-%release
+# implicates a conflict with upstart 0.5+
+Requires(pre): /etc/event.d
+Requires(post): /usr/bin/killall
+Requires(postun): /sbin/initctl
%description
@@ -235,47 +278,54 @@ of this daemon should be started for each service requiring it.
See the README file how this can be done with a minimum of effort.
-%description server-sysv
+%description server-sysvinit
SysV initscripts template for the clamav server
+%description scanner
+This package contains a generic system wide clamd service which is
+e.g. used by the clamav-milter package.
+
+%description scanner-sysvinit
+The SysV initscripts for clamav-scanner.
+
+%description scanner-upstart
+The Upstart initscripts for clamav-scanner.
+
+
%description milter
This package contains files which are needed to run the clamav-milter.
-%description milter-sysv
+%description milter-sysvinit
The SysV initscripts for clamav-milter.
-%description milter-core
-Core files for the clamav-milter.
-
-%description milter-sendmail
-Sendmail customizations of the clamav-milter.
-
+%description milter-upstart
+The Upstart initscripts for clamav-milter.
## ------------------------------------------------------------
%prep
%setup -q -n %{name}-%{version}%{?snapshot}
-%patch21 -p1 -b .path
-%patch22 -p1 -b .initoff
%patch24 -p1 -b .private
%patch25 -p1 -b .open
-%patch26 -p1 -b .pid
+%patch26 -p1 -b .cliopts
install -p -m0644 %SOURCE300 clamav-milter/
mkdir -p libclamunrar{,_iface}
%{!?with_unrar:touch libclamunrar/{Makefile.in,all,install}}
-perl -pi -e 's!^(#?LogFile ).*!\1/var/log/clamd.<SERVICE>!g;
- s!^#?(LocalSocket ).*!\1/var/run/clamd.<SERVICE>/clamd.sock!g;
- s!^#?(PidFile ).*!\1/var/run/clamd.<SERVICE>/clamd.pid!g;
- s!^#?(User ).*!\1<USER>!g;
- s! /usr/local/share/clamav,! %homedir,!g;
- ' etc/clamd.conf
+sed -ri \
+ -e 's!^(#?LogFile ).*!\1/var/log/clamd.<SERVICE>!g' \
+ -e 's!^(#?LocalSocket ).*!\1/var/run/clamd.<SERVICE>/clamd.sock!g' \
+ -e 's!^(#?PidFile ).*!\1/var/run/clamd.<SERVICE>/clamd.pid!g' \
+ -e 's!^#?(User ).*!\1<USER>!g' \
+ -e 's!^#?(AllowSupplementaryGroups|LogSyslog).*!\1 yes!g' \
+ -e 's! /usr/local/share/clamav,! %homedir,!g' \
+ etc/clamd.conf
-perl -pi -e 's!^#(UpdateLogFile )!\1!g;' etc/freshclam.conf
+sed -ri -e 's!^#(UpdateLogFile )!\1!g;' etc/freshclam.conf
## ------------------------------------------------------------
@@ -321,12 +371,13 @@ function smartsubst() {
install -d -m755 \
- ${RPM_BUILD_ROOT}%_sysconfdir/{clamd.d,cron.d,logrotate.d,sysconfig} \
+ ${RPM_BUILD_ROOT}%_sysconfdir/{mail,clamd.d,cron.d,logrotate.d,sysconfig,event.d} \
${RPM_BUILD_ROOT}%_var/log \
${RPM_BUILD_ROOT}%milterstatedir \
${RPM_BUILD_ROOT}%pkgdatadir/template \
${RPM_BUILD_ROOT}%_initrddir \
- ${RPM_BUILD_ROOT}%homedir
+ ${RPM_BUILD_ROOT}%homedir \
+ ${RPM_BUILD_ROOT}%scanstatedir
rm -f ${RPM_BUILD_ROOT}%_sysconfdir/clamd.conf \
${RPM_BUILD_ROOT}%_libdir/*.la
@@ -369,22 +420,33 @@ smartsubst 's!webmaster,clamav!webmaster,%username!g;
$RPM_BUILD_ROOT%pkgdatadir/freshclam-sleep
-#### The milter stuff
-function subst() {
- sed -e 's!<SERVICE>!milter!g;s!<USER>!%milteruser!g;'"$3" "$1" >"$RPM_BUILD_ROOT$2"
-}
+### The scanner stuff
+sed -e 's!<SERVICE>!scan!g;s!<USER>!%scanuser!g' \
+ etc/clamd.conf > $RPM_BUILD_ROOT%_sysconfdir/clamd.d/clamd.scan
+
+sed -e 's!<SERVICE>!scan!g;' $RPM_BUILD_ROOT%pkgdatadir/template/clamd.init \
+ > $RPM_BUILD_ROOT%_initrddir/clamd.scan
+
+install -p -m 644 %SOURCE410 $RPM_BUILD_ROOT%_sysconfdir/event.d/clamd.scan
+
+touch $RPM_BUILD_ROOT%scanstatedir/clamd.sock
-subst etc/clamd.conf /etc/clamd.d/milter.conf \
- 's!^##*\(\(LogFile\|LocalSocket\|PidFile\|User\)\s\|\(StreamSaveToDisk\|ScanMail\)$\)!\1!;'
+### The milter stuff
+sed -r \
+ -e 's!^#?(User).*!\1 %milteruser!g' \
+ -e 's!^#?(AllowSupplementaryGroups|LogSyslog) .*!\1 yes!g' \
+ -e 's! /tmp/clamav-milter.socket! %milterstatedir/clamav-milter.socket!g' \
+ -e 's! /var/run/clamav-milter.pid! %milterstatedir/clamav-milter.pid!g' \
+ -e 's! /tmp/clamav-milter.log! %milterlog!g' \
+ etc/clamav-milter.conf > $RPM_BUILD_ROOT%_sysconfdir/mail/clamav-milter.conf
+install -p -m 644 %SOURCE310 $RPM_BUILD_ROOT%_sysconfdir/event.d/clamav-milter
+install -p -m 755 %SOURCE320 $RPM_BUILD_ROOT%_initrddir/clamav-milter
-cat <<EOF >$RPM_BUILD_ROOT%_sysconfdir/sysconfig/clamav-milter
-CLAMAV_FLAGS='-lo -c /etc/clamd.d/milter.conf local:%milterstatedir/clamav.sock'
-EOF
-install -p -m755 contrib/init/RedHat/clamav-milter $RPM_BUILD_ROOT%_initrddir/clamav-milter
-touch $RPM_BUILD_ROOT%milterstatedir/clamav.sock $RPM_BUILD_ROOT%milterlog
+rm -f $RPM_BUILD_ROOT%_sysconfdir/clamav-milter.conf
+touch $RPM_BUILD_ROOT{%milterstatedir/clamav-milter.socket,%milterlog}
## ------------------------------------------------------------
@@ -404,6 +466,35 @@ rm -rf "$RPM_BUILD_ROOT"
%__fe_groupdel %username &>/dev/null || :
+%pre scanner
+%__fe_groupadd 49 -r %scanuser &>/dev/null || :
+%__fe_useradd 49 -r -s /sbin/nologin -d / -M \
+ -g %scanuser %scanuser &>/dev/null || :
+
+%postun scanner
+%__fe_userdel %scanuser &>/dev/null || :
+%__fe_groupdel %scanuser &>/dev/null || :
+
+
+%post scanner-sysvinit
+/sbin/chkconfig --add clamd.scan
+
+%preun scanner-sysvinit
+test "$1" != 0 || %_initrddir/clamd.scan stop &>/dev/null || :
+test "$1" != 0 || /sbin/chkconfig --del clamd.scan
+
+%postun scanner-sysvinit
+test "$1" = 0 || %_initrddir/clamd.scan condrestart >/dev/null || :
+
+
+%post scanner-upstart
+/usr/bin/killall -u %scanuser clamd 2>/dev/null || :
+
+%preun scanner-upstart
+test "$1" != "0" || /sbin/initctl -q stop clamd.scan || :
+
+
+
%post update
test -e %freshclamlog || {
touch %freshclamlog
@@ -411,34 +502,41 @@ test -e %freshclamlog || {
%__chown root:%username %freshclamlog
}
-%pre milter-core
+%pre milter
%__fe_groupadd 5 -r %milteruser &>/dev/null || :
%__fe_useradd 5 -r -s /sbin/nologin -d %milterstatedir -M \
-c 'Clamav Milter User' -g %milteruser %milteruser &>/dev/null || :
-%post milter-core
+%post milter
test -e %milterlog || {
touch %milterlog
chmod 0620 %milterlog
chown root:%milteruser %milterlog
}
-%postun milter-core
+%postun milter
%__fe_userdel %milteruser &>/dev/null || :
%__fe_groupdel %milteruser &>/dev/null || :
-%post milter-sysv
+%post milter-sysvinit
/sbin/chkconfig --add clamav-milter
-%preun milter-sysv
+%preun milter-sysvinit
test "$1" != 0 || %_initrddir/clamav-milter stop &>/dev/null || :
test "$1" != 0 || /sbin/chkconfig --del clamav-milter
-%postun milter-sysv
+%postun milter-sysvinit
test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
+%post milter-upstart
+/usr/bin/killall -u %milteruser clamav-milter 2>/dev/null || :
+
+%preun milter-upstart
+test "$1" != "0" || /sbin/initctl -q stop clamav-milter || :
+
+
%post lib -p /sbin/ldconfig
%postun lib -p /sbin/ldconfig
@@ -521,37 +619,57 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%exclude %_mandir/man8/clamav-milter*
-%files server-sysv
+%files server-sysvinit
%defattr(-,root,root,-)
%_initrddir/clamd-wrapper
## -----------------------
-%files milter
+%files scanner
%defattr(-,root,root,-)
+%dir %attr(0710,%scanuser,%scanuser) %scanstatedir
+%config(noreplace) %_sysconfdir/clamd.d/clamd.scan
+%ghost %scanstatedir/clamd.sock
-%files milter-core
+%files scanner-sysvinit
+%attr(0755,root,root) %config %_initrddir/clamd.scan
+
+%files scanner-upstart
%defattr(-,root,root,-)
-%doc clamav-milter/INSTALL
-%_sbindir/*milter*
-%_mandir/man8/clamav-milter*
-%config(noreplace) %verify(not mtime) %_sysconfdir/clamd.d/milter.conf
-%ghost %attr(0620,root,%milteruser) %verify(not size md5 mtime) %milterlog
+%config(noreplace) %_sysconfdir/event.d/clamd.scan
+
+## -----------------------
-%files milter-sendmail
+%files milter
%defattr(-,root,root,-)
%doc clamav-milter/README.fedora
-%attr(0700,%milteruser,%milteruser) %dir %milterstatedir
+%_sbindir/*milter*
+%_mandir/man8/clamav-milter*
+%config(noreplace) %_sysconfdir/mail/clamav-milter.conf
+%ghost %attr(0620,root,%milteruser) %verify(not size md5 mtime) %milterlog
+%attr(0710,%milteruser,%milteruser) %dir %milterstatedir
%ghost %milterstatedir/*
-%files milter-sysv
+%files milter-sysvinit
%defattr(-,root,root,-)
%config %_initrddir/clamav-milter
-%config(noreplace) %verify(not mtime) %_sysconfdir/sysconfig/clamav-milter
+
+%files milter-upstart
+%defattr(-,root,root,-)
+%config(noreplace) %_sysconfdir/event.d/clamav-milter
%changelog
+* Sun Mar 8 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.95-0.1.rc1
+- updated to 0.95rc1
+- added -upstart subpackages
+- renamed -sysv to -sysvinit to make -upstart win the default dep resolving
+- reworked complete milter stuff
+- added -scanner subpackage which contains a preconfigured daemon
+ (e.g. for use by -milter)
+- moved %%changelog entries from 2006 and before into ChangeLog-rpm.old
+
* Wed Feb 25 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.94.2-3
- made some subpackages noarch
- fixed typo in SysV initscript which removes 'touch' file (#473513)
@@ -681,283 +799,3 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
updated per cron-job and user does not want to download the large
-data package with outdated virus definitations (#214949)
- %%ghost'ed the files downloaded by freshclam
-
-* Tue Dec 12 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.7-1
-- updated to 0.88.7
-
-* Sun Nov 5 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.6-1
-- updated to 0.88.6
-
-* Wed Oct 18 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.5-1
-- updated to 0.88.5 (SECURITY); fixes CVE-2006-4182, CVE-2006-5295
-- added patch to set '__attribute__ ((visibility("hidden")))' for
- exported MD5_*() functions (fixes #202043)
-
-* Thu Oct 05 2006 Christian Iseli <Christian.Iseli(a)licr.org> 0.88.4-4
- - rebuilt for unwind info generation, broken in gcc-4.1.1-21
-
-* Thu Sep 21 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.4-3
-- splitted SysV initscripts of -milter and -server into own subpackages
-
-* Fri Sep 15 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.4-2
-- rebuilt
-
-* Tue Aug 8 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.4-1
-- updated to 0.88.4 (SECURITY)
-
-* Wed Jul 12 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
-- removed the clamdscan(1) manpage from the -server subpackage
-
-* Sat Jul 8 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
-- removed a superfluous '}'
-- removed some code which was relevant for FC-3 only
-
-* Sat Jul 8 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.3-1
-- updated to 0.88.3
-- updated to new fedora-usermgmt macros
-
-* Tue May 16 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.2-2
-- cleanups: removed unneeded curlies, use plain command instead of
- %%__XXX macro, whitespace cleanup, removed unneeded versioned
- dependencies
-- added a 'Requires(post): group(clamav)' dependencies for -update and
- added the corresponding Provides: to -data
-- removed the %%_without_milter conditional; you won't gain anything
- when milter would be disabled at buildtime
-
-* Sun Apr 30 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.2-1
-- updated to 0.88.2 (SECURITY)
-- rediffed patches; most issues handled by 0.88.1-2 are fixed in
- 0.88.2
-
-* Mon Apr 24 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.1-2
-- added patch which fixes some classes of compiler warnings; at least
- the using of implicitly declared functions was reported to cause
- segfaults on AMD64 (brought to my attention by Marc Perkel)
-- added patch which fixes wrong usage of strncpy(3) in unrarlib.c
-
-* Thu Apr 06 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88.1-1
-- updated to 0.88.1 (SECURITY)
-
-* Sat Feb 18 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88-2
-- rebuilt for FC5
-
-* Tue Jan 10 2006 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.88-1
-- updated to 0.88
-- added pseudo-versions for the 'init(...)' provides as a first step
- for the support of alternative initmethods
-
-* Tue Nov 15 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.87.1-2
-- moved 'freshclam.conf.5' man page into the -update subpackage (#173221)
-- ship 'clamd.conf.5' man page in the -server subpackage *too*. The
- same file is contained in multiple packages now, but this man-page
- can not be removed from the base package because it also applies to
- 'clamdscan' there (#173221).
-
-* Fri Nov 4 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.87.1-1
-- updated to 0.87.1
-
-* Sat Sep 17 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.87-1
-- updated to 0.87 (SECURITY)
-- removed -timeout patch; it is solved upstream
-- reverted the -exim changes; they add yet more complexity, their
- functionality can go into an own package and they contained flaws
-
-* Fri Sep 9 2005 David Woodhouse <dwmw2(a)infradead.org> - 0.86.2-5
-- Add clamav-exim configuration package
-
-* Fri Jul 29 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.86.2-4
-- [milter] create the milter-logfile in the %%post scriptlet
-- [milter] reverted the change of the default child_timeout value; it
- was set to 5 minutes in 0.86.2 which conflicts with the internal
- mode where a timeout must not be set. So, the clamav-milter would
- not run with the default configuration
-
-* Thu Jul 28 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.86.2-3
-- Fixed calculation of sleep duration; on some systems/IPs, `hostid`
- results in a negative number which is retained by the bash
- modulo-operation. So the sleep may get a negative number of seconds
- being interpreted as an option. This version makes sure that the
- module-operations returns a non-negative value. [BZ #164494, James
- Wilkinson]
-- added support for a /usr/sbin/clamav-notify-servers.local hook; this
- file will be executed (source'd) before all other actions and can
- abort the entire processing by invoking 'exit'
-
-* Mon Jul 25 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.86.2-2
-- updated to 0.86.2 (SECURITY)
-- changed the freshclam updating mechanism (again); now, it consists
- of a crontab which does not need to be changed and a helper script
- (freshclam-sleep). This helper script is configured by
- /etc/sysconfig/freshclam
-
-* Sat Jun 25 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.86.1-2
-- updated to 0.86.1
-- fixed randomization in %%post scriptlet: hour should be a range but
- not a single number
-
-* Tue Jun 21 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.86-1
-- updated to 0.86
-- randomize freshclam startup times in -update's %%post script (suggested
- by Stephen Smoogen); this requires some more Requires(post): also
-
-* Wed May 18 2005 Warren Togami <wtogami(a)redhat.com> - 0.85.1-4
-- fix dist tagging the way Enrico wants it
-
-* Tue May 17 2005 Oliver Falk <oliver(a)linux-kernel.at> - 0.85.1-2
-- Rebuild
-
-* Tue May 17 2005 Oliver Falk <oliver(a)linux-kernel.at> - 0.85.1-1
-- Update
-
-* Sat May 14 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.85-0
-- updated to 0.85
-
-* Sun May 1 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.84-0
-- updated to 0.84
-
-* Fri Apr 7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
-- rebuilt
-
-* Tue Feb 15 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.83-1
-- updated to 0.83
-
-* Tue Feb 8 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.82-1
-- updated to 0.82
-- minor spec cleanups
-
-* Fri Jan 28 2005 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 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 <enrico.scholz(a)informatik.tu-chemnitz.de> - 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 <enrico.scholz(a)informatik.tu-chemnitz.de> - 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 <enrico.scholz(a)informatik.tu-chemnitz.de> - 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 <enrico.scholz(a)informatik.tu-chemnitz.de> - 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 <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.75-0.fdr.1
-- updated to 0.75
-
-* Thu Jul 15 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.74-0.fdr.2
-- moved /usr/bin/clamav-config from main into -devel
-
-* Wed Jun 30 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.74-0.fdr.1
-- updated to 0.74
-
-* Mon Jun 14 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.73-0.fdr.1
-- updated to 0.73
-- added pkgconfig file
-
-* Fri Jun 11 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 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 <enrico.scholz(a)informatik.tu-chemnitz.de> - 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 <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.72-0.fdr.1
-- updated to 0.72
-
-* Thu May 20 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 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
- replace some placeholders...
-
-* Wed May 19 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.71-0.fdr.1
-- updated to 0.71
-
-* Fri May 7 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.70-0.fdr.1.1
-- quote 'EOF' to delay $RANDOM expansion
-
-* Tue Apr 27 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.70-0.fdr.2
-- updated GECOS entry for the 'clamav' user to describe its purpose
- more accurately
-- use explicit '-m755' when creating directories with install
-
-* Tue Apr 20 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.70-0.fdr.1
-- updated to 0.70; rediffed some patches
-- updated logrotate script to use signals and documented the steps
- which are needed to make it work
-- adapted initscript to use signals instead of sockwrite
-- removed sockwrite; signals can now be used to reload the database
-- added logfile to the -milter subpackage
-
-* Tue Apr 20 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.68-0.fdr.2.1
-- tagged some Requires:, since clamav-server is required in the milter-%%post* scriptlets
-
-* Sat Mar 20 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.68-0.fdr.2
-- split the double Requires(...,...): statements; see
- https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=118773
-- require the recent fedora-usermgmt package (0.7) which fixes similar
- ordering issues
-
-* Thu Mar 18 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.68-0.fdr.1
-- updated to 0.68 (using the -1 version)
-- ship milter-files in the -milter instead of the -server subpackage
-
-* Tue Feb 24 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.67-0.fdr.3
-- fixed ':' vs. '.' in chown
-
-* Tue Feb 17 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.67-0.fdr.2
-- randomize freshclam startup to prevent server peaks
-
-* Mon Feb 16 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.67-0.fdr.1
-- updated to 0.67 (using the -1 version)
-
-* Wed Feb 11 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.66-0.fdr.2
-- updated to 0.66; important, packaging-relevant changes are
- freshclam:
- * $http_proxy is not supported anymore; you have to configure it in
- /etc/freshclam.conf
- * the logfile has been renamed to /var/log/freshclam.log
-- removed %%check section; buildroot check is implemented in local
- testsuite already
-- added some %%verify(not mtime) modifiers to avoid unnecessary .rpmnew
- files
-- added some directory-Requires:
-- activated milter-package and made it work
-- added patch to disable clamav-milter service by default
-- renamed /var/run/clamav.<SERVICE> to /var/run/clamd.<SERVICE>; this
- makes things more consistently but can break backward compatibility. The
- initscript should deal with the old version too, but I would not bet on
- it...
-- updated some descriptions
-- fixed the update-mechanism; now it happens in two stages: at first,
- the files will be downloaded as user 'clamav' and then, root initiates
- the daemon-reload.
-
-* Mon Feb 9 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0:0.65-0.fdr.5
-- added security fix for
- http://www.securityfocus.com/archive/1/353194/2004-02-06/2004-02-12/1
diff --git a/clamd-wrapper b/clamd-wrapper
index 14c04a5..b601cf2 100644
--- a/clamd-wrapper
+++ b/clamd-wrapper
@@ -26,6 +26,7 @@ procname=clamd.${CLAMD_SERVICE}
CLAMD_CONFIGFILE=/etc/clamd.d/${CLAMD_SERVICE}.conf
CLAMD_OPTIONS=
+CLAMD_PIDFILE=/var/run/clamd.${CLAMD_SERVICE}/clamd.pid
## backward-compatibility check...
for i in /var/run/clamd.${CLAMD_SERVICE}/clamd.sock \
/var/run/clamav.${CLAMD_SERVICE}/clamd.sock; do
@@ -40,7 +41,8 @@ prog="clamd.${CLAMD_SERVICE}"
start () {
echo -n $"Starting $prog: "
- daemon $procname ${CLAMD_CONFIGFILE:+-c $CLAMD_CONFIGFILE} ${CLAMD_OPTIONS}
+ daemon --pidfile=${CLAMD_PIDFILE} \
+ $procname ${CLAMD_CONFIGFILE:+-c $CLAMD_CONFIGFILE} ${CLAMD_OPTIONS} --pid ${CLAMD_PIDFILE}
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch $lockfile
@@ -59,10 +61,10 @@ stop () {
reload() {
rc=0
echo -n $"Reloading $prog: "
- killproc $procname -SIGHUP || rc=$?
+ killproc -p ${CLAMD_PIDFILE} $procname -SIGHUP || rc=$?
echo
echo -n $"Loading new virus-database: "
- killproc $procname -SIGUSR2 || rc=$?
+ killproc -p ${CLAMD_PIDFILE} $procname -SIGUSR2 || rc=$?
echo
return $rc
}
diff --git a/clamd.scan.upstart b/clamd.scan.upstart
new file mode 100644
index 0000000..e96b37e
--- /dev/null
+++ b/clamd.scan.upstart
@@ -0,0 +1,15 @@
+### Uncomment these lines when you want clamd.scan to be a scanner
+### for a locally running clamav-milter
+#start on starting clamav-milter
+
+### Uncomment these lines when you want clamd.scan to be a generic
+### scanner service
+#start on starting\ local
+#start on starting local
+
+stop on runlevel 0
+stop on runlevel 1
+stop on runlevel 6
+
+respawn
+exec /usr/sbin/clamd -c /etc/clamd.d/clamd.scan --nofork=yes
diff --git a/lastver b/lastver
index 5e4a9c1..d89b314 100644
--- a/lastver
+++ b/lastver
@@ -1 +1 @@
-0.93.3
+0.94.2
diff --git a/sources b/sources
index e115b9a..5f92b5e 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-9b04d010c17c607ace4ed5e9318104d4 clamav-0.94.2-norar.tar.bz2
+40d13c0d39568b17aec35fe793233861 clamav-0.95rc1-norar.tar.bz2
commit 3717d73615ddb16892f77ab78066a28db6f96ec0
Author: ensc <ensc(a)fedoraproject.org>
Date: Wed Feb 25 08:58:23 2009 +0000
updated
diff --git a/clamav.spec b/clamav.spec
index 2bc0418..e03bcaa 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -19,7 +19,7 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
Version: 0.94.2
-Release: %release_func 2%{?snapshot:.%snapshot}
+Release: %release_func 3%{?snapshot:.%snapshot}
License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
Group: Applications/File
@@ -81,6 +81,7 @@ Requires: pkgconfig
%package data
Summary: Virus signature data for the Clam Antivirus scanner
Group: Applications/File
+BuildArch: noarch
Requires(pre): clamav-filesystem = %version-%release
Requires(postun): clamav-filesystem = %version-%release
Provides: data(clamav) = full
@@ -90,6 +91,7 @@ Conflicts: data(clamav) > full
%package data-empty
Summary: Empty data package for the Clam Antivirus scanner
Group: Applications/File
+BuildArch: noarch
Provides: data(clamav) = empty
Conflicts: data(clamav) < empty
Conflicts: data(clamav) > empty
@@ -117,6 +119,7 @@ Requires: clamav-lib = %version-%release
%package server-sysv
Summary: SysV initscripts for clamav server
Group: System Environment/Daemons
+BuildArch: noarch
Provides: init(clamav-server) = sysv
Requires: clamav-server = %version-%release
Requires(pre): %_initrddir
@@ -156,6 +159,7 @@ Summary: SysV initscripts for the clamav sendmail-milter
Group: System Environment/Daemons
Provides: init(clamav-milter) = sysv
Requires: clamav-milter = %version-%release
+BuildArch: noarch
Requires(post): user(%milteruser) clamav-milter
Requires(preun): user(%milteruser) clamav-milter
Requires(pre): %_initrddir
@@ -548,6 +552,10 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%changelog
+* Wed Feb 25 2009 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.94.2-3
+- made some subpackages noarch
+- fixed typo in SysV initscript which removes 'touch' file (#473513)
+
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0.94.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
diff --git a/clamd-wrapper b/clamd-wrapper
index c32e34e..14c04a5 100644
--- a/clamd-wrapper
+++ b/clamd-wrapper
@@ -52,7 +52,7 @@ stop () {
killproc $procname
RETVAL=$?
echo
- [ $RETVAL -eq 0 ] && rm -f touch $lockfile
+ [ $RETVAL -eq 0 ] && rm -f $lockfile
return $RETVAL
}
diff --git a/verinfo b/verinfo
index a4a0b38..814d953 100644
--- a/verinfo
+++ b/verinfo
@@ -1,2 +1,2 @@
-http://prdownloads.sourceforge.net/sourceforge/clamav/
+http://sourceforge.net/project/showfiles.php?group_id=86638&package_id=90197
clamav-([0-9.-]*?)\.tar\.
commit a843b1831a1f03926eeebf884ffecfb73e6fb551
Author: Jesse Keating <jkeating(a)fedoraproject.org>
Date: Tue Feb 24 07:37:58 2009 +0000
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
diff --git a/clamav.spec b/clamav.spec
index ab6ef56..2bc0418 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -19,7 +19,7 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
Version: 0.94.2
-Release: %release_func 1%{?snapshot:.%snapshot}
+Release: %release_func 2%{?snapshot:.%snapshot}
License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
Group: Applications/File
@@ -548,6 +548,9 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%changelog
+* Mon Feb 23 2009 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0.94.2-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
* Tue Dec 02 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.94.2-1
- Upgrade to 0.94.2 (#474002)
commit 3ef6d7cff563db71bc8c64dca022138fb4bca716
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Tue Dec 2 22:26:31 2008 +0000
Upgrade to 0.94.2 (#474002)
diff --git a/.cvsignore b/.cvsignore
index 0a417f9..336c23f 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1 +1 @@
-clamav-0.94.1-norar.tar.bz2
+clamav-0.94.2-norar.tar.bz2
diff --git a/clamav.spec b/clamav.spec
index 8ab44ec..4fe1dee 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -15,7 +15,7 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
-Version: 0.94.1
+Version: 0.94.2
Release: %release_func 1
License: GPLv2
@@ -511,6 +511,9 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%changelog
+* Tue Dec 02 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.94.2-1
+- Upgrade to 0.94.2 (#474002)
+
* Wed Nov 05 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.94.1-1
- Upgrade to 0.94.1
diff --git a/sources b/sources
index a29b987..e115b9a 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-7da93ec3951ada1b91ced0e3da42f939 clamav-0.94.1-norar.tar.bz2
+9b04d010c17c607ace4ed5e9318104d4 clamav-0.94.2-norar.tar.bz2
commit b4e507d2995e34811d8a03e7e5a4b5eaacd48ec2
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Tue Dec 2 22:26:31 2008 +0000
Upgrade to 0.94.2 (#474002)
diff --git a/.cvsignore b/.cvsignore
index 0a417f9..336c23f 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1 +1 @@
-clamav-0.94.1-norar.tar.bz2
+clamav-0.94.2-norar.tar.bz2
diff --git a/clamav.spec b/clamav.spec
index e39ffaa..ab6ef56 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -18,7 +18,7 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
-Version: 0.94.1
+Version: 0.94.2
Release: %release_func 1%{?snapshot:.%snapshot}
License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
@@ -548,6 +548,9 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%changelog
+* Tue Dec 02 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.94.2-1
+- Upgrade to 0.94.2 (#474002)
+
* Wed Nov 05 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.94.1-1
- Upgrade to 0.94.1
diff --git a/sources b/sources
index a29b987..e115b9a 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-7da93ec3951ada1b91ced0e3da42f939 clamav-0.94.1-norar.tar.bz2
+9b04d010c17c607ace4ed5e9318104d4 clamav-0.94.2-norar.tar.bz2
commit fc9b9c469299fb1d0289b3d170e87680f4757f96
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Wed Nov 5 19:50:09 2008 +0000
Upgrade to 0.94.1
diff --git a/.cvsignore b/.cvsignore
index e015b0c..0a417f9 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1 +1 @@
-clamav-0.94-norar.tar.bz2
+clamav-0.94.1-norar.tar.bz2
diff --git a/clamav.spec b/clamav.spec
index c20f532..8ab44ec 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -15,7 +15,7 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
-Version: 0.94
+Version: 0.94.1
Release: %release_func 1
License: GPLv2
@@ -511,6 +511,9 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%changelog
+* Wed Nov 05 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.94.1-1
+- Upgrade to 0.94.1
+
* Sun Oct 26 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.94-1
- Upgrade to 0.94 (SECURITY), fixes #461461:
- CVE-2008-1389 Invalid memory access in the CHM unpacker
diff --git a/sources b/sources
index ec908dc..a29b987 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-a2ace45354b5b44bb334a0bfe8416e14 clamav-0.94-norar.tar.bz2
+7da93ec3951ada1b91ced0e3da42f939 clamav-0.94.1-norar.tar.bz2
commit c063e179aa855be52af01f273a3a93171e096835
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Wed Nov 5 19:50:09 2008 +0000
Upgrade to 0.94.1
diff --git a/.cvsignore b/.cvsignore
index e015b0c..0a417f9 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1 +1 @@
-clamav-0.94-norar.tar.bz2
+clamav-0.94.1-norar.tar.bz2
diff --git a/clamav.spec b/clamav.spec
index f8d8778..e39ffaa 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -18,7 +18,7 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
-Version: 0.94
+Version: 0.94.1
Release: %release_func 1%{?snapshot:.%snapshot}
License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
@@ -548,6 +548,9 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%changelog
+* Wed Nov 05 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.94.1-1
+- Upgrade to 0.94.1
+
* Sun Oct 26 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.94-1
- Upgrade to 0.94 (SECURITY), fixes #461461:
- CVE-2008-1389 Invalid memory access in the CHM unpacker
diff --git a/sources b/sources
index ec908dc..a29b987 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-a2ace45354b5b44bb334a0bfe8416e14 clamav-0.94-norar.tar.bz2
+7da93ec3951ada1b91ced0e3da42f939 clamav-0.94.1-norar.tar.bz2
commit 3a1d2b5e3ca38ce6c5e6619c49a07d91a8043aae
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Sun Oct 26 17:48:00 2008 +0000
- Upgrade to 0.94 (SECURITY), fixes #461461:
- CVE-2008-1389 Invalid memory access in the CHM unpacker
- CVE-2008-3912 Out-of-memory NULL pointer dereference in mbox/msg
- CVE-2008-3913 Memory leak in code path in freshclam's manager.c
- CVE-2008-3914 Multiple file descriptor leaks on the code paths
diff --git a/.cvsignore b/.cvsignore
index a51ec3e..e015b0c 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1 +1 @@
-clamav-0.93.3-norar.tar.bz2
+clamav-0.94-norar.tar.bz2
diff --git a/clamav.spec b/clamav.spec
index aa1497f..f8d8778 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -18,7 +18,7 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
-Version: 0.93.3
+Version: 0.94
Release: %release_func 1%{?snapshot:.%snapshot}
License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
@@ -548,6 +548,13 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%changelog
+* Sun Oct 26 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.94-1
+- Upgrade to 0.94 (SECURITY), fixes #461461:
+- CVE-2008-1389 Invalid memory access in the CHM unpacker
+- CVE-2008-3912 Out-of-memory NULL pointer dereference in mbox/msg
+- CVE-2008-3913 Memory leak in code path in freshclam's manager.c
+- CVE-2008-3914 Multiple file descriptor leaks on the code paths
+
* Sun Jul 13 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93.3-1
- updated to 0.93.3; another fix for CVE-2008-2713 (out-of-bounds read
on petite files)
diff --git a/sources b/sources
index 7ccec62..ec908dc 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-53d288ddafd9cc198eeb69ffe8c83d02 clamav-0.93.3-norar.tar.bz2
+a2ace45354b5b44bb334a0bfe8416e14 clamav-0.94-norar.tar.bz2
commit da4aada21147f2e98cda179eabc647f2078dc9d8
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Sun Oct 26 17:38:04 2008 +0000
- Upgrade to 0.94 (SECURITY), fixes #461461:
- CVE-2008-1389 Invalid memory access in the CHM unpacker
- CVE-2008-3912 Out-of-memory NULL pointer dereference in mbox/msg
- CVE-2008-3913 Memory leak in code path in freshclam's manager.c
- CVE-2008-3914 Multiple file descriptor leaks on the code paths
diff --git a/.cvsignore b/.cvsignore
index a51ec3e..e015b0c 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1 +1 @@
-clamav-0.93.3-norar.tar.bz2
+clamav-0.94-norar.tar.bz2
diff --git a/Makefile b/Makefile
index 21be25f..2cc62a7 100644
--- a/Makefile
+++ b/Makefile
@@ -19,3 +19,16 @@ MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)
+
+
+# can not use final tarball name here as it will conflict with rules
+# within Makefile.common
+TARBALL_CLEAN = ${NAME}-${VERSION}-norar.tar.bz2.tmp
+TARBALL = ${NAME}-${VERSION}.tar.gz
+
+clean-sources: ${TARBALL_CLEAN}
+
+${TARBALL_CLEAN}: ${TARBALL}
+ rm -f $@.tmp
+ zcat $< | tar --delete -f - '*/libclamunrar/*' | bzip2 -c > $@.tmp
+ mv $@.tmp $@
diff --git a/clamav.spec b/clamav.spec
index 1a799d2..c20f532 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -15,16 +15,16 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
-Version: 0.93.3
+Version: 0.94
Release: %release_func 1
License: GPLv2
Group: Applications/File
URL: http://www.clamav.net
-# Unfortunately, clamav includes support for RAR v3, derived from GPL
+# Unfortunately, clamav includes support for RAR v3, derived from GPL
# incompatible unrar from RARlabs. We have to pull this code out.
-# All that is needed to make the clean tarball is: rm -rf libclamunrar*
-# Note that you also need patch26.
+# tarball was created by
+# make clean-sources [TARBALL=<original-tarball>] [VERSION=<version>]
Source0: clamav-%{version}-norar.tar.bz2
# Source0: http://download.sourceforge.net/sourceforge/clamav/%name-%version.tar.gz
# No sense in using this file for the time being.
@@ -511,6 +511,13 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%changelog
+* Sun Oct 26 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.94-1
+- Upgrade to 0.94 (SECURITY), fixes #461461:
+- CVE-2008-1389 Invalid memory access in the CHM unpacker
+- CVE-2008-3912 Out-of-memory NULL pointer dereference in mbox/msg
+- CVE-2008-3913 Memory leak in code path in freshclam's manager.c
+- CVE-2008-3914 Multiple file descriptor leaks on the code paths
+
* Mon Jul 14 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.93.3-1
- Upgrade to 0.93.3 (SECURITY), rediffed -initoff patch:
- CVE-2008-2713 Out-of-bounds read on petite files
diff --git a/sources b/sources
index 7ccec62..ec908dc 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-53d288ddafd9cc198eeb69ffe8c83d02 clamav-0.93.3-norar.tar.bz2
+a2ace45354b5b44bb334a0bfe8416e14 clamav-0.94-norar.tar.bz2
commit 20b50894331b06649484c380c0c35f84cf8795eb
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Mon Jul 14 10:34:44 2008 +0000
- Upgrade to 0.93.3 (SECURITY), rediffed -initoff patch:
- CVE-2008-2713 Out-of-bounds read on petite files
- Put pid instead of pgrp into pid file of clamav-milter (#452359)
diff --git a/.cvsignore b/.cvsignore
index 48c3a65..a51ec3e 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1 +1 @@
-clamav-0.93.1-norar.tar.bz2
+clamav-0.93.3-norar.tar.bz2
diff --git a/clamav-0.80-initoff.patch b/clamav-0.80-initoff.patch
deleted file mode 100644
index db4e000..0000000
--- a/clamav-0.80-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 79 40
-+# chkconfig: - 79 40
- #
- # description: clamav-milter is a daemon which hooks into sendmail and routes
- # email messages to clamav
diff --git a/clamav-0.93.3-initoff.patch b/clamav-0.93.3-initoff.patch
new file mode 100644
index 0000000..899d32b
--- /dev/null
+++ b/clamav-0.93.3-initoff.patch
@@ -0,0 +1,11 @@
+--- clamav-0.93.3/contrib/init/RedHat/clamav-milter.initoff
++++ clamav-0.93.3/contrib/init/RedHat/clamav-milter
+@@ -2,7 +2,7 @@
+ #
+ # clamav-milter This script starts and stops the clamav-milter daemon
+ #
+-# chkconfig: 2345 79 40
++# chkconfig: - 79 40
+ #
+ # description: clamav-milter is a daemon which hooks into sendmail and routes \
+ # email messages for virus scanning with ClamAV
diff --git a/clamav-0.93.3-pid.patch b/clamav-0.93.3-pid.patch
new file mode 100644
index 0000000..de29887
--- /dev/null
+++ b/clamav-0.93.3-pid.patch
@@ -0,0 +1,17 @@
+Try to fix https://bugzilla.redhat.com/show_bug.cgi?id=452359; RH/Fedora
+initscripts do not support killing of whole processgroups. Hence, disable
+feature which posts negative pgrp into pidfile and use plain pid instead
+of.
+
+diff -up clamav-0.93.3/clamav-milter/clamav-milter.c.~1~ clamav-0.93.3/clamav-milter/clamav-milter.c
+--- clamav-0.93.3/clamav-milter/clamav-milter.c.~1~ 2008-07-07 20:02:10.000000000 +0200
++++ clamav-0.93.3/clamav-milter/clamav-milter.c 2008-07-13 20:15:12.000000000 +0200
+@@ -1985,7 +1985,7 @@ main(int argc, char **argv)
+ logg(_("!Can't save PID in file %s\n"), pidfile);
+ return EX_CONFIG;
+ }
+-#ifdef C_LINUX
++#if defined(C_LINUX) && 0
+ /* Ensure that all threads are kill()ed */
+ fprintf(fd, "-%d\n", (int)getpgrp());
+ #else
diff --git a/clamav.spec b/clamav.spec
index 682f593..1a799d2 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -1,5 +1,3 @@
-## $Id: clamav.spec,v 1.50 2008/04/14 20:31:45 robert Exp $
-
## Fedora Extras specific customization below...
# %bcond_without fedora
##
@@ -17,7 +15,7 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
-Version: 0.93.1
+Version: 0.93.3
Release: %release_func 1
License: GPLv2
@@ -39,9 +37,10 @@ Source6: clamav-update.logrotate
Source7: clamd.SERVICE.init
Source8: clamav-notify-servers
Patch21: clamav-0.93.1-path.patch
-Patch22: clamav-0.80-initoff.patch
+Patch22: clamav-0.93.3-initoff.patch
Patch24: clamav-0.90rc3-private.patch
Patch25: clamav-0.92-open.patch
+Patch26: clamav-0.93.3-pid.patch
BuildRoot: %_tmppath/%name-%version-%release-root
Requires: clamav-lib = %version-%release
Requires: data(clamav)
@@ -234,6 +233,7 @@ The SysV initscripts for clamav-milter.
%patch22 -p1 -b .initoff
%patch24 -p1 -b .private
%patch25 -p1 -b .open
+%patch26 -p1 -b .pid
mkdir -p libclamunrar{,_iface}
touch libclamunrar/{Makefile.in,all,install}
@@ -511,8 +511,13 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%changelog
+* Mon Jul 14 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.93.3-1
+- Upgrade to 0.93.3 (SECURITY), rediffed -initoff patch:
+- CVE-2008-2713 Out-of-bounds read on petite files
+- Put pid instead of pgrp into pid file of clamav-milter (#452359)
+
* Wed Jun 18 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.93.1-1
-- Upgrade to 0.93.1, rediffed -path patch
+- Upgrade to 0.93.1 (SECURITY), rediffed -path patch:
- CVE-2008-2713 Invalid Memory Access Denial Of Service Vulnerability
* Mon Apr 14 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.93-1
diff --git a/sources b/sources
index 3875ac9..7ccec62 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-c9eca40bd39cc049b3b2b424879fa06e clamav-0.93.1-norar.tar.bz2
+53d288ddafd9cc198eeb69ffe8c83d02 clamav-0.93.3-norar.tar.bz2
commit 6a9c737ebd351c9b269dcedec4338158e767b7c1
Author: ensc <ensc(a)fedoraproject.org>
Date: Sun Jul 13 19:36:07 2008 +0000
rediffed patches
diff --git a/clamav.spec b/clamav.spec
index 65c92e8..aa1497f 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -42,7 +42,7 @@ Source6: clamav-update.logrotate
Source7: clamd.SERVICE.init
Source8: clamav-notify-servers
Patch21: clamav-0.93.1-path.patch
-Patch22: clamav-0.80-initoff.patch
+Patch22: clamav-0.93.3-initoff.patch
Patch24: clamav-0.92-private.patch
Patch25: clamav-0.92-open.patch
Patch26: clamav-0.93.3-pid.patch
@@ -552,6 +552,7 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
- updated to 0.93.3; another fix for CVE-2008-2713 (out-of-bounds read
on petite files)
- put pid instead of pgrp into pidfile of clamav-milter (bz #452359)
+- rediffed patches
* Tue Jun 17 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93.1-1
- updated to 0.93.1
commit 422a07557176c65c5f04a4759298ddf64efdff44
Author: ensc <ensc(a)fedoraproject.org>
Date: Sun Jul 13 19:33:38 2008 +0000
rediffed
diff --git a/clamav-0.80-initoff.patch b/clamav-0.80-initoff.patch
deleted file mode 100644
index db4e000..0000000
--- a/clamav-0.80-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 79 40
-+# chkconfig: - 79 40
- #
- # description: clamav-milter is a daemon which hooks into sendmail and routes
- # email messages to clamav
diff --git a/clamav-0.93.3-initoff.patch b/clamav-0.93.3-initoff.patch
new file mode 100644
index 0000000..899d32b
--- /dev/null
+++ b/clamav-0.93.3-initoff.patch
@@ -0,0 +1,11 @@
+--- clamav-0.93.3/contrib/init/RedHat/clamav-milter.initoff
++++ clamav-0.93.3/contrib/init/RedHat/clamav-milter
+@@ -2,7 +2,7 @@
+ #
+ # clamav-milter This script starts and stops the clamav-milter daemon
+ #
+-# chkconfig: 2345 79 40
++# chkconfig: - 79 40
+ #
+ # description: clamav-milter is a daemon which hooks into sendmail and routes \
+ # email messages for virus scanning with ClamAV
commit cc612e64b642ec9f0284f1c799b5d4254bb59a0c
Author: ensc <ensc(a)fedoraproject.org>
Date: Sun Jul 13 19:20:40 2008 +0000
- updated to 0.93.3; another fix for CVE-2008-2713 (out-of-bounds read on
petite files)
- put pid instead of pgrp into pidfile of clamav-milter (bz #452359)
diff --git a/clamav.spec b/clamav.spec
index 55e2a2f..65c92e8 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -18,7 +18,7 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
-Version: 0.93.1
+Version: 0.93.3
Release: %release_func 1%{?snapshot:.%snapshot}
License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
@@ -45,6 +45,7 @@ Patch21: clamav-0.93.1-path.patch
Patch22: clamav-0.80-initoff.patch
Patch24: clamav-0.92-private.patch
Patch25: clamav-0.92-open.patch
+Patch26: clamav-0.93.3-pid.patch
BuildRoot: %_tmppath/%name-%version-%release-root
Requires: clamav-lib = %version-%release
Requires: data(clamav)
@@ -256,6 +257,7 @@ Sendmail customizations of the clamav-milter.
%patch22 -p1 -b .initoff
%patch24 -p1 -b .private
%patch25 -p1 -b .open
+%patch26 -p1 -b .pid
install -p -m0644 %SOURCE300 clamav-milter/
@@ -546,6 +548,11 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%changelog
+* Sun Jul 13 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93.3-1
+- updated to 0.93.3; another fix for CVE-2008-2713 (out-of-bounds read
+ on petite files)
+- put pid instead of pgrp into pidfile of clamav-milter (bz #452359)
+
* Tue Jun 17 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93.1-1
- updated to 0.93.1
- rediffed -path patch
commit 8775e9b2f26ed4dec631ecd4f3700077d589957f
Author: ensc <ensc(a)fedoraproject.org>
Date: Sun Jul 13 19:12:31 2008 +0000
updated to 0.93.3
diff --git a/.cvsignore b/.cvsignore
index 48c3a65..a51ec3e 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1 +1 @@
-clamav-0.93.1-norar.tar.bz2
+clamav-0.93.3-norar.tar.bz2
diff --git a/lastver b/lastver
index a16a6df..5e4a9c1 100644
--- a/lastver
+++ b/lastver
@@ -1 +1 @@
-0.93.1
+0.93.3
diff --git a/sources b/sources
index 3875ac9..7ccec62 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-c9eca40bd39cc049b3b2b424879fa06e clamav-0.93.1-norar.tar.bz2
+53d288ddafd9cc198eeb69ffe8c83d02 clamav-0.93.3-norar.tar.bz2
commit a7fdf91c087bd185fc7bb18332bf0e10e633cef9
Author: ensc <ensc(a)fedoraproject.org>
Date: Sun Jul 13 19:09:15 2008 +0000
initial checkin
diff --git a/clamav-0.93.3-pid.patch b/clamav-0.93.3-pid.patch
new file mode 100644
index 0000000..de29887
--- /dev/null
+++ b/clamav-0.93.3-pid.patch
@@ -0,0 +1,17 @@
+Try to fix https://bugzilla.redhat.com/show_bug.cgi?id=452359; RH/Fedora
+initscripts do not support killing of whole processgroups. Hence, disable
+feature which posts negative pgrp into pidfile and use plain pid instead
+of.
+
+diff -up clamav-0.93.3/clamav-milter/clamav-milter.c.~1~ clamav-0.93.3/clamav-milter/clamav-milter.c
+--- clamav-0.93.3/clamav-milter/clamav-milter.c.~1~ 2008-07-07 20:02:10.000000000 +0200
++++ clamav-0.93.3/clamav-milter/clamav-milter.c 2008-07-13 20:15:12.000000000 +0200
+@@ -1985,7 +1985,7 @@ main(int argc, char **argv)
+ logg(_("!Can't save PID in file %s\n"), pidfile);
+ return EX_CONFIG;
+ }
+-#ifdef C_LINUX
++#if defined(C_LINUX) && 0
+ /* Ensure that all threads are kill()ed */
+ fprintf(fd, "-%d\n", (int)getpgrp());
+ #else
commit 61e30bf5ea1d3cd2f608f9f1b20e993c5a3d91e1
Author: ensc <ensc(a)fedoraproject.org>
Date: Sat Jun 21 14:55:11 2008 +0000
removed CVS tags
diff --git a/Makefile b/Makefile
index 2cc62a7..ed9c5e4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,4 @@
# Makefile for source rpm: clamav
-# $Id$
NAME := clamav
SPECFILE = $(firstword $(wildcard *.spec))
diff --git a/clamav.spec b/clamav.spec
index 1486ed8..55e2a2f 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -1,5 +1,3 @@
-## $Id: clamav.spec,v 1.72 2008/06/17 19:57:54 ensc Exp $
-
#global snapshot rc1
## Fedora Extras specific customization below...
commit 55d261d5465594de69aee6a408ef2b39bb9445dd
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Wed Jun 18 10:13:26 2008 +0000
- Upgrade to 0.93.1, rediffed -path patch
- CVE-2008-2713 Invalid Memory Access Denial Of Service Vulnerability
diff --git a/.cvsignore b/.cvsignore
index 069bca4..48c3a65 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1 +1 @@
-clamav-0.93-norar.tar.bz2
+clamav-0.93.1-norar.tar.bz2
diff --git a/clamav-0.70-path.patch b/clamav-0.70-path.patch
deleted file mode 100644
index 3312e38..0000000
--- a/clamav-0.70-path.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- clamav-0.70-rc/contrib/init/RedHat/clamav-milter.path 2003-06-26 15:38:06.000000000 +0200
-+++ clamav-0.70-rc/contrib/init/RedHat/clamav-milter 2003-06-26 15:39:01.000000000 +0200
-@@ -22,7 +22,6 @@
- # Check that networking is up.
- [ ${NETWORKING} = "no" ] && exit 0
-
--[ -x /usr/local/sbin/clamav-milter ] || exit 0
- PATH=$PATH:/usr/bin:/usr/local/sbin:/usr/local/bin
-
- RETVAL=0
-@@ -63,7 +62,7 @@
- restart
- ;;
- condrestart)
-- test -f /var/lock/subsys/clamav-milter && $0 restart || :
-+ test -f /var/lock/subsys/clamav-milter && restart || :
- ;;
- status)
- status clamav-milter
diff --git a/clamav-0.93.1-path.patch b/clamav-0.93.1-path.patch
new file mode 100644
index 0000000..4f1872c
--- /dev/null
+++ b/clamav-0.93.1-path.patch
@@ -0,0 +1,19 @@
+--- clamav-0.93.1/contrib/init/RedHat/clamav-milter.path
++++ clamav-0.93.1/contrib/init/RedHat/clamav-milter
+@@ -22,7 +22,6 @@ test -f /etc/sysconfig/clamav-milter &&
+ # Check that networking is up.
+ [ ${NETWORKING} = "no" ] && exit 0
+
+-[ -x /usr/local/sbin/clamav-milter ] || exit 0
+ PATH=$PATH:/usr/bin:/usr/local/sbin:/usr/local/bin
+
+ RETVAL=0
+@@ -87,7 +86,7 @@ case "$1" in
+ restart
+ ;;
+ condrestart)
+- test -f ${lockfile} && $0 restart || :
++ test -f ${lockfile} && restart || :
+ ;;
+ status)
+ if [ ! -z $pidfile ]; then
diff --git a/clamav.spec b/clamav.spec
index a6c30f4..682f593 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -1,4 +1,4 @@
-## $Id: clamav.spec,v 1.49 2008/02/14 16:00:40 robert Exp $
+## $Id: clamav.spec,v 1.50 2008/04/14 20:31:45 robert Exp $
## Fedora Extras specific customization below...
# %bcond_without fedora
@@ -17,7 +17,7 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
-Version: 0.93
+Version: 0.93.1
Release: %release_func 1
License: GPLv2
@@ -38,7 +38,7 @@ Source5: clamd-README
Source6: clamav-update.logrotate
Source7: clamd.SERVICE.init
Source8: clamav-notify-servers
-Patch21: clamav-0.70-path.patch
+Patch21: clamav-0.93.1-path.patch
Patch22: clamav-0.80-initoff.patch
Patch24: clamav-0.90rc3-private.patch
Patch25: clamav-0.92-open.patch
@@ -511,6 +511,10 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%changelog
+* Wed Jun 18 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.93.1-1
+- Upgrade to 0.93.1, rediffed -path patch
+- CVE-2008-2713 Invalid Memory Access Denial Of Service Vulnerability
+
* Mon Apr 14 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.93-1
- Upgrade to 0.93 (SECURITY):
- CVE-2008-1100 Upack processing buffer overflow (#442360)
diff --git a/sources b/sources
index 444be31..3875ac9 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-141ea153f0bf19e98f914d3e855cb715 clamav-0.93-norar.tar.bz2
+c9eca40bd39cc049b3b2b424879fa06e clamav-0.93.1-norar.tar.bz2
commit 56aef066d81499de3563d7775cf1d8d52fe75f7d
Author: ensc <ensc(a)fedoraproject.org>
Date: Tue Jun 17 20:03:53 2008 +0000
updated
diff --git a/.cvsignore b/.cvsignore
index 069bca4..48c3a65 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1 +1 @@
-clamav-0.93-norar.tar.bz2
+clamav-0.93.1-norar.tar.bz2
diff --git a/clamav-0.70-path.patch b/clamav-0.70-path.patch
deleted file mode 100644
index 3312e38..0000000
--- a/clamav-0.70-path.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- clamav-0.70-rc/contrib/init/RedHat/clamav-milter.path 2003-06-26 15:38:06.000000000 +0200
-+++ clamav-0.70-rc/contrib/init/RedHat/clamav-milter 2003-06-26 15:39:01.000000000 +0200
-@@ -22,7 +22,6 @@
- # Check that networking is up.
- [ ${NETWORKING} = "no" ] && exit 0
-
--[ -x /usr/local/sbin/clamav-milter ] || exit 0
- PATH=$PATH:/usr/bin:/usr/local/sbin:/usr/local/bin
-
- RETVAL=0
-@@ -63,7 +62,7 @@
- restart
- ;;
- condrestart)
-- test -f /var/lock/subsys/clamav-milter && $0 restart || :
-+ test -f /var/lock/subsys/clamav-milter && restart || :
- ;;
- status)
- status clamav-milter
diff --git a/clamav-0.93.1-path.patch b/clamav-0.93.1-path.patch
new file mode 100644
index 0000000..4f1872c
--- /dev/null
+++ b/clamav-0.93.1-path.patch
@@ -0,0 +1,19 @@
+--- clamav-0.93.1/contrib/init/RedHat/clamav-milter.path
++++ clamav-0.93.1/contrib/init/RedHat/clamav-milter
+@@ -22,7 +22,6 @@ test -f /etc/sysconfig/clamav-milter &&
+ # Check that networking is up.
+ [ ${NETWORKING} = "no" ] && exit 0
+
+-[ -x /usr/local/sbin/clamav-milter ] || exit 0
+ PATH=$PATH:/usr/bin:/usr/local/sbin:/usr/local/bin
+
+ RETVAL=0
+@@ -87,7 +86,7 @@ case "$1" in
+ restart
+ ;;
+ condrestart)
+- test -f ${lockfile} && $0 restart || :
++ test -f ${lockfile} && restart || :
+ ;;
+ status)
+ if [ ! -z $pidfile ]; then
diff --git a/clamav.spec b/clamav.spec
index ebadcd9..1486ed8 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -1,4 +1,4 @@
-## $Id: clamav.spec,v 1.70 2008/03/12 08:40:04 ensc Exp $
+## $Id: clamav.spec,v 1.72 2008/06/17 19:57:54 ensc Exp $
#global snapshot rc1
@@ -20,7 +20,7 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
-Version: 0.93
+Version: 0.93.1
Release: %release_func 1%{?snapshot:.%snapshot}
License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
@@ -43,7 +43,7 @@ Source5: clamd-README
Source6: clamav-update.logrotate
Source7: clamd.SERVICE.init
Source8: clamav-notify-servers
-Patch21: clamav-0.70-path.patch
+Patch21: clamav-0.93.1-path.patch
Patch22: clamav-0.80-initoff.patch
Patch24: clamav-0.92-private.patch
Patch25: clamav-0.92-open.patch
@@ -548,6 +548,11 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%changelog
+* Tue Jun 17 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93.1-1
+- updated to 0.93.1
+- rediffed -path patch
+- CVE-2008-2713 Invalid Memory Access Denial Of Service Vulnerability
+
* Mon Apr 14 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93-1
- updated to final 0.93
- removed daily.inc + main.inc directories; they are now replaced by
diff --git a/lastver b/lastver
index 341ad3c..a16a6df 100644
--- a/lastver
+++ b/lastver
@@ -1 +1 @@
-0.93
+0.93.1
diff --git a/sources b/sources
index 444be31..3875ac9 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-141ea153f0bf19e98f914d3e855cb715 clamav-0.93-norar.tar.bz2
+c9eca40bd39cc049b3b2b424879fa06e clamav-0.93.1-norar.tar.bz2
commit dbbdf5e26efedef21283e6ccd639f1724e49adcc
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Mon Apr 14 20:31:45 2008 +0000
- Upgrade to 0.93 (SECURITY):
- CVE-2008-1100 Upack processing buffer overflow (#442360)
- Removed *.inc directories; got replaced by *.cld containers
diff --git a/.cvsignore b/.cvsignore
index 9a29028..069bca4 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1 +1 @@
-clamav-0.92.1-norar.tar.bz2
+clamav-0.93-norar.tar.bz2
diff --git a/clamav-0.92-nounrar.patch b/clamav-0.92-nounrar.patch
deleted file mode 100644
index b63921e..0000000
--- a/clamav-0.92-nounrar.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-diff -up clamav-0.92/Makefile.in.BAD clamav-0.92/Makefile.in
---- clamav-0.92/Makefile.in.BAD 2007-12-21 12:39:00.000000000 -0500
-+++ clamav-0.92/Makefile.in 2007-12-21 12:39:11.000000000 -0500
-@@ -242,7 +242,7 @@ target_os = @target_os@
- target_vendor = @target_vendor@
- top_builddir = @top_builddir@
- top_srcdir = @top_srcdir@
--SUBDIRS = libclamunrar libclamunrar_iface libclamav clamscan clamd clamdscan freshclam sigtool clamconf database docs etc clamav-milter
-+SUBDIRS = libclamav clamscan clamd clamdscan freshclam sigtool clamconf database docs etc clamav-milter
- EXTRA_DIST = FAQ contrib test examples BUGS shared libclamav.pc.in UPGRADE COPYING.nsis COPYING.unrar COPYING.LGPL
- bin_SCRIPTS = clamav-config
- pkgconfigdir = $(libdir)/pkgconfig
-diff -up clamav-0.92/configure.in.BAD clamav-0.92/configure.in
---- clamav-0.92/configure.in.BAD 2007-12-21 12:37:51.000000000 -0500
-+++ clamav-0.92/configure.in 2007-12-21 12:38:00.000000000 -0500
-@@ -1214,8 +1214,6 @@ AC_MSG_RESULT($have_signed_rightshift_ex
- AC_C_FPU_BIGENDIAN
-
- AC_OUTPUT([
--libclamunrar/Makefile
--libclamunrar_iface/Makefile
- libclamav/Makefile
- clamscan/Makefile
- database/Makefile
-diff -up clamav-0.92/Makefile.am.BAD clamav-0.92/Makefile.am
---- clamav-0.92/Makefile.am.BAD 2007-12-21 12:38:39.000000000 -0500
-+++ clamav-0.92/Makefile.am 2007-12-21 12:38:47.000000000 -0500
-@@ -16,7 +16,7 @@
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- # MA 02110-1301, USA.
-
--SUBDIRS = libclamunrar libclamunrar_iface libclamav clamscan clamd clamdscan freshclam sigtool clamconf database docs etc clamav-milter
-+SUBDIRS = libclamav clamscan clamd clamdscan freshclam sigtool clamconf database docs etc clamav-milter
- EXTRA_DIST = FAQ contrib test examples BUGS shared libclamav.pc.in UPGRADE COPYING.nsis COPYING.unrar COPYING.LGPL
-
- bin_SCRIPTS=clamav-config
-diff -up clamav-0.92/configure.BAD clamav-0.92/configure
---- clamav-0.92/configure.BAD 2007-12-21 12:45:38.000000000 -0500
-+++ clamav-0.92/configure 2007-12-21 12:46:05.000000000 -0500
-@@ -26397,7 +26397,7 @@ echo "$as_me: WARNING: Unable to determi
- esac
-
-
--ac_config_files="$ac_config_files libclamunrar/Makefile libclamunrar_iface/Makefile libclamav/Makefile clamscan/Makefile database/Makefile docs/Makefile clamd/Makefile clamdscan/Makefile clamav-milter/Makefile freshclam/Makefile sigtool/Makefile clamconf/Makefile etc/Makefile Makefile clamav-config libclamav.pc docs/man/clamav-milter.8 docs/man/clamconf.1 docs/man/clamd.8 docs/man/clamd.conf.5 docs/man/clamdscan.1 docs/man/clamscan.1 docs/man/freshclam.1 docs/man/freshclam.conf.5 docs/man/sigtool.1"
-+ac_config_files="$ac_config_files libclamav/Makefile clamscan/Makefile database/Makefile docs/Makefile clamd/Makefile clamdscan/Makefile clamav-milter/Makefile freshclam/Makefile sigtool/Makefile clamconf/Makefile etc/Makefile Makefile clamav-config libclamav.pc docs/man/clamav-milter.8 docs/man/clamconf.1 docs/man/clamd.8 docs/man/clamd.conf.5 docs/man/clamdscan.1 docs/man/clamscan.1 docs/man/freshclam.1 docs/man/freshclam.conf.5 docs/man/sigtool.1"
-
- cat >confcache <<\_ACEOF
- # This file is a shell script that caches the results of configure
-@@ -27013,8 +27013,6 @@ do
- case $ac_config_target in
- "clamav-config.h") CONFIG_HEADERS="$CONFIG_HEADERS clamav-config.h" ;;
- "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
-- "libclamunrar/Makefile") CONFIG_FILES="$CONFIG_FILES libclamunrar/Makefile" ;;
-- "libclamunrar_iface/Makefile") CONFIG_FILES="$CONFIG_FILES libclamunrar_iface/Makefile" ;;
- "libclamav/Makefile") CONFIG_FILES="$CONFIG_FILES libclamav/Makefile" ;;
- "clamscan/Makefile") CONFIG_FILES="$CONFIG_FILES clamscan/Makefile" ;;
- "database/Makefile") CONFIG_FILES="$CONFIG_FILES database/Makefile" ;;
diff --git a/clamav.spec b/clamav.spec
index a0dff5c..a6c30f4 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -1,4 +1,4 @@
-## $Id: clamav.spec,v 1.48 2007/12/21 19:23:28 spot Exp $
+## $Id: clamav.spec,v 1.49 2008/02/14 16:00:40 robert Exp $
## Fedora Extras specific customization below...
# %bcond_without fedora
@@ -17,7 +17,7 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
-Version: 0.92.1
+Version: 0.93
Release: %release_func 1
License: GPLv2
@@ -42,7 +42,6 @@ Patch21: clamav-0.70-path.patch
Patch22: clamav-0.80-initoff.patch
Patch24: clamav-0.90rc3-private.patch
Patch25: clamav-0.92-open.patch
-Patch26: clamav-0.92-nounrar.patch
BuildRoot: %_tmppath/%name-%version-%release-root
Requires: clamav-lib = %version-%release
Requires: data(clamav)
@@ -235,7 +234,9 @@ The SysV initscripts for clamav-milter.
%patch22 -p1 -b .initoff
%patch24 -p1 -b .private
%patch25 -p1 -b .open
-%patch26 -p1 -b .nounrar
+
+mkdir -p libclamunrar{,_iface}
+touch libclamunrar/{Makefile.in,all,install}
perl -pi -e 's!^(#?LogFile ).*!\1/var/log/clamd.<SERVICE>!g;
s!^#?(LocalSocket ).*!\1/var/run/clamd.<SERVICE>/clamd.sock!g;
@@ -291,14 +292,13 @@ install -d -m755 \
${RPM_BUILD_ROOT}%milterstatedir \
${RPM_BUILD_ROOT}%pkgdatadir/template \
${RPM_BUILD_ROOT}%_initrddir \
- ${RPM_BUILD_ROOT}%homedir/daily.inc
+ ${RPM_BUILD_ROOT}%homedir
rm -f ${RPM_BUILD_ROOT}%_sysconfdir/clamd.conf \
${RPM_BUILD_ROOT}%_libdir/*.la
-for i in COPYING daily.{db,fp,hdb,info,ndb,pdb,zmd}; do
- touch ${RPM_BUILD_ROOT}%homedir/daily.inc/$i
-done
+touch ${RPM_BUILD_ROOT}%homedir/daily.cld
+touch ${RPM_BUILD_ROOT}%homedir/main.cld
## prepare the server-files
@@ -439,7 +439,6 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%files filesystem
%attr(-,%username,%username) %dir %homedir
-%attr(-,%username,%username) %dir %homedir/daily.inc
%attr(-,root,root) %dir %pkgdatadir
## -----------------------
@@ -454,7 +453,7 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%files data-empty
%defattr(-,%username,%username,-)
-%ghost %attr(0664,%username,%username) %homedir/main.cvd
+%ghost %attr(0664,%username,%username) %homedir/*.cvd
## -----------------------
@@ -470,14 +469,7 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%ghost %attr(0664,root,%username) %verify(not size md5 mtime) %freshclamlog
-%ghost %attr(0664,%username,%username) %homedir/daily.inc/COPYING
-%ghost %attr(0664,%username,%username) %homedir/daily.inc/daily.db
-%ghost %attr(0664,%username,%username) %homedir/daily.inc/daily.fp
-%ghost %attr(0664,%username,%username) %homedir/daily.inc/daily.hdb
-%ghost %attr(0664,%username,%username) %homedir/daily.inc/daily.info
-%ghost %attr(0664,%username,%username) %homedir/daily.inc/daily.ndb
-%ghost %attr(0664,%username,%username) %homedir/daily.inc/daily.pdb
-%ghost %attr(0664,%username,%username) %homedir/daily.inc/daily.zmd
+%ghost %attr(0664,%username,%username) %homedir/*.cld
## -----------------------
@@ -519,6 +511,11 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%changelog
+* Mon Apr 14 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.93-1
+- Upgrade to 0.93 (SECURITY):
+- CVE-2008-1100 Upack processing buffer overflow (#442360)
+- Removed *.inc directories; got replaced by *.cld containers
+
* Thu Feb 14 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.92.1-1
- Upgrade to 0.92.1 (SECURITY):
- CVE-2008-0318 Integer overflow in libclamav (#432623)
diff --git a/sources b/sources
index 6e9b8a3..444be31 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-aecbcc39bf5b85e8967ddfa2bef4eb90 clamav-0.92.1-norar.tar.bz2
+141ea153f0bf19e98f914d3e855cb715 clamav-0.93-norar.tar.bz2
commit 72cb5cff7c03a0348e09aa055d1d79ef616321f2
Author: ensc <ensc(a)fedoraproject.org>
Date: Mon Apr 14 18:36:29 2008 +0000
- updated to final 0.93
- removed daily.inc + main.inc directories; they are now replaced by
*.cld containers
diff --git a/clamav.spec b/clamav.spec
index 6aa5e2b..ebadcd9 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -1,6 +1,6 @@
-## $Id: clamav.spec,v 1.69 2008/03/12 08:38:02 ensc Exp $
+## $Id: clamav.spec,v 1.70 2008/03/12 08:40:04 ensc Exp $
-%global snapshot rc1
+#global snapshot rc1
## Fedora Extras specific customization below...
%bcond_without fedora
@@ -21,7 +21,7 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
Version: 0.93
-Release: %release_func 0.1%{?snapshot:.%snapshot}
+Release: %release_func 1%{?snapshot:.%snapshot}
License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
Group: Applications/File
@@ -322,19 +322,14 @@ install -d -m755 \
${RPM_BUILD_ROOT}%milterstatedir \
${RPM_BUILD_ROOT}%pkgdatadir/template \
${RPM_BUILD_ROOT}%_initrddir \
- ${RPM_BUILD_ROOT}%homedir/{main,daily}.inc
+ ${RPM_BUILD_ROOT}%homedir
rm -f ${RPM_BUILD_ROOT}%_sysconfdir/clamd.conf \
${RPM_BUILD_ROOT}%_libdir/*.la
-for i in cfg db fp hdb info mdb mdu ndb ndu pdb wdb zmd; do
- touch ${RPM_BUILD_ROOT}%homedir/daily.inc/daily.$i
- touch ${RPM_BUILD_ROOT}%homedir/main.inc/main.$i
-done
-
-touch ${RPM_BUILD_ROOT}%homedir/daily.inc/COPYING
-touch ${RPM_BUILD_ROOT}%homedir/main.inc/COPYING
+touch ${RPM_BUILD_ROOT}%homedir/daily.cld
+touch ${RPM_BUILD_ROOT}%homedir/main.cld
## prepare the server-files
@@ -475,7 +470,6 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%files filesystem
%attr(-,%username,%username) %dir %homedir
-%attr(-,%username,%username) %dir %homedir/daily.inc
%attr(-,root,root) %dir %pkgdatadir
## -----------------------
@@ -490,7 +484,8 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%files data-empty
%defattr(-,%username,%username,-)
-%ghost %attr(0664,%username,%username) %homedir/main.cvd
+%ghost %attr(0664,%username,%username) %homedir/*.cvd
+
## -----------------------
@@ -505,9 +500,7 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%config(noreplace) %_sysconfdir/sysconfig/freshclam
%ghost %attr(0664,root,%username) %verify(not size md5 mtime) %freshclamlog
-
-%ghost %attr(0664,%username,%username) %homedir/daily.inc/*
-%ghost %attr(0664,%username,%username) %homedir/main.inc/*
+%ghost %attr(0664,%username,%username) %homedir/*.cld
## -----------------------
@@ -555,6 +548,13 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%changelog
+* Mon Apr 14 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93-1
+- updated to final 0.93
+- removed daily.inc + main.inc directories; they are now replaced by
+ *.cld containers
+- trimmed down MAILTO list of cronjob to 'root' again; every well
+ configured system has an alias for this recipient
+
* Wed Mar 12 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93-0.1.rc1
- moved -milter scriptlets into -milter-core subpackage
- added a requirement on the milteruser to the -milter-sendmail
commit 3e418407a561822f535ccbb038fe0971dce644d0
Author: ensc <ensc(a)fedoraproject.org>
Date: Mon Apr 14 18:35:02 2008 +0000
trimmed down MAILTO list of cronjob to 'root' again; every well configured
system has an alias for this recipient
diff --git a/clamav-update.cron b/clamav-update.cron
index 3f1b005..3a69901 100644
--- a/clamav-update.cron
+++ b/clamav-update.cron
@@ -1,5 +1,5 @@
## Adjust this line...
-MAILTO=root,postmaster,webmaster,clamav
+MAILTO=root
## It is ok to execute it as root; freshclam drops privileges and becomes
## user 'clamav' as soon as possible
commit 9a66eef1308862e95496555c836f296dcd0bff8a
Author: ensc <ensc(a)fedoraproject.org>
Date: Mon Apr 14 18:28:07 2008 +0000
updated to final 0.93
diff --git a/.cvsignore b/.cvsignore
index d34f911..069bca4 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1,3 +1 @@
-clamav-*.tar.gz*
-clamav-*.tar.bz2*
-clamav-*.*.rpm
+clamav-0.93-norar.tar.bz2
diff --git a/lastver b/lastver
index da011ce..341ad3c 100644
--- a/lastver
+++ b/lastver
@@ -1 +1 @@
-0.92.1
+0.93
diff --git a/sources b/sources
index 47ab841..444be31 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-7d7b2be9783f20956b7e090437105699 clamav-0.93rc1-norar.tar.bz2
+141ea153f0bf19e98f914d3e855cb715 clamav-0.93-norar.tar.bz2
commit 5fb728d2ef5c915ed0f1cc17b50643c0b39862d5
Author: ensc <ensc(a)fedoraproject.org>
Date: Wed Mar 12 08:40:04 2008 +0000
added missing version to %changelog
diff --git a/clamav.spec b/clamav.spec
index 000b2d3..6aa5e2b 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -1,4 +1,4 @@
-## $Id: clamav.spec,v 1.68 2008/03/05 07:30:58 ensc Exp $
+## $Id: clamav.spec,v 1.69 2008/03/12 08:38:02 ensc Exp $
%global snapshot rc1
@@ -555,7 +555,7 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%changelog
-* Wed Mar 12 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
+* Wed Mar 12 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93-0.1.rc1
- moved -milter scriptlets into -milter-core subpackage
- added a requirement on the milteruser to the -milter-sendmail
subpackage (reported by Bruce Jerrick)
commit f5d1e31d7c361732661a7318830c91da7daffd97
Author: ensc <ensc(a)fedoraproject.org>
Date: Wed Mar 12 08:38:02 2008 +0000
- moved -milter scriptlets into -milter-core subpackage
- added a requirement on the milteruser to the -milter-sendmail subpackage
(reported by Bruce Jerrick)
diff --git a/clamav.spec b/clamav.spec
index 2fe72e1..000b2d3 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -1,4 +1,4 @@
-## $Id: clamav.spec,v 1.67 2008/02/11 22:30:35 ensc Exp $
+## $Id: clamav.spec,v 1.68 2008/03/05 07:30:58 ensc Exp $
%global snapshot rc1
@@ -21,7 +21,7 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
Version: 0.93
-Release: %release_func 0.0%{?snapshot:.%snapshot}
+Release: %release_func 0.1%{?snapshot:.%snapshot}
License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
Group: Applications/File
@@ -146,6 +146,8 @@ Group: System Environment/Daemons
Source300: README.fedora
Requires: sendmail
Requires: clamav-milter-core = %version-%release
+Requires(pre): user(%milteruser)
+Requires(pre): group(%milteruser)
Provides: milter(clamav) = sendmail
Conflicts: milter(clamav) < sendmail
Conflicts: milter(clamav) > sendmail
@@ -410,19 +412,19 @@ test -e %freshclamlog || {
%__chown root:%username %freshclamlog
}
-%pre milter
+%pre milter-core
%__fe_groupadd 5 -r %milteruser &>/dev/null || :
%__fe_useradd 5 -r -s /sbin/nologin -d %milterstatedir -M \
-c 'Clamav Milter User' -g %milteruser %milteruser &>/dev/null || :
-%post milter
+%post milter-core
test -e %milterlog || {
touch %milterlog
chmod 0620 %milterlog
chown root:%milteruser %milterlog
}
-%postun milter
+%postun milter-core
%__fe_userdel %milteruser &>/dev/null || :
%__fe_groupdel %milteruser &>/dev/null || :
@@ -553,6 +555,11 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%changelog
+* Wed Mar 12 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
+- moved -milter scriptlets into -milter-core subpackage
+- added a requirement on the milteruser to the -milter-sendmail
+ subpackage (reported by Bruce Jerrick)
+
* Tue Mar 4 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93-0.0.rc1
- updated to 0.93rc1
- fixed rpath issues
commit 1f82fa929ae02cbeee422a5d4e04cf7bb686aeb2
Author: ensc <ensc(a)fedoraproject.org>
Date: Wed Mar 5 07:30:58 2008 +0000
- updated to 0.93rc1
- fixed rpath issues
diff --git a/clamav.spec b/clamav.spec
index 70932c8..2fe72e1 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -1,4 +1,6 @@
-## $Id: clamav.spec,v 1.66 2008/01/01 17:33:05 ensc Exp $
+## $Id: clamav.spec,v 1.67 2008/02/11 22:30:35 ensc Exp $
+
+%global snapshot rc1
## Fedora Extras specific customization below...
%bcond_without fedora
@@ -18,26 +20,21 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
-Version: 0.92.1
-Release: %release_func 1
+Version: 0.93
+Release: %release_func 0.0%{?snapshot:.%snapshot}
License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
Group: Applications/File
URL: http://www.clamav.net
%if 0%{?with_unrar:1}
-Source0: http://download.sourceforge.net/sourceforge/clamav/%name-%version.tar.gz
-Source999: http://download.sourceforge.net/sourceforge/clamav/%name-%version.tar.gz.sig
+Source0: http://download.sourceforge.net/sourceforge/clamav/%name-%version%{?snaps...
+Source999: http://download.sourceforge.net/sourceforge/clamav/%name-%version%{?snaps...
%else
# Unfortunately, clamav includes support for RAR v3, derived from GPL
# incompatible unrar from RARlabs. We have to pull this code out.
# tarball was created by
-#
-# zcat clamav-$V.tar.gz | tar --delete -f - '*/libclamunrar/*' | bzip2 -c > clamav-$V-norar.tar.bz2
-#
-# or
-#
-# make clean-sources [TARBALL=<original-tarball>]
-Source0: %name-%version-norar.tar.bz2
+# make clean-sources [TARBALL=<original-tarball>] [VERSION=<version>]
+Source0: %name-%version%{?snapshot}-norar.tar.bz2
%endif
Source1: clamd-wrapper
Source2: clamd.sysconfig
@@ -253,7 +250,7 @@ Sendmail customizations of the clamav-milter.
## ------------------------------------------------------------
%prep
-%setup -q
+%setup -q -n %{name}-%{version}%{?snapshot}
%patch21 -p1 -b .path
%patch22 -p1 -b .initoff
@@ -284,12 +281,13 @@ export LDFLAGS='-Wl,--as-needed'
export LIBS='-lmilter -lpthread'
%configure --disable-clamav --with-dbdir=/var/lib/clamav \
--enable-milter --disable-static \
+ --disable-rpath \
%{!?with_unrar:--disable-unrar}
# build with --as-needed and disable rpath
sed -i \
-e 's! -shared ! -Wl,--as-needed\0!g' \
- -e '/sys_lib_dlsearch_path_spec=\"\/lib \/usr\/lib /s!/lib!/%_lib!g' \
+ -e '/sys_lib_dlsearch_path_spec=\"\/lib \/usr\/lib /s!\"\/lib \/usr\/lib !/\"/%_lib /usr/%_lib !g' \
libtool
@@ -555,6 +553,10 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%changelog
+* Tue Mar 4 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.93-0.0.rc1
+- updated to 0.93rc1
+- fixed rpath issues
+
* Mon Feb 11 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.92.1-1
- updated to 0.92.1
commit d7a04eea73382ccc812607bc031a6aa4c43bfda2
Author: ensc <ensc(a)fedoraproject.org>
Date: Wed Mar 5 07:29:47 2008 +0000
updated to 0.93rc1
diff --git a/sources b/sources
index 6e9b8a3..47ab841 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-aecbcc39bf5b85e8967ddfa2bef4eb90 clamav-0.92.1-norar.tar.bz2
+7d7b2be9783f20956b7e090437105699 clamav-0.93rc1-norar.tar.bz2
commit d86d8a8a765d07f7d26dd84d7019d7639464e7d0
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Thu Feb 14 16:00:40 2008 +0000
- Upgrade to 0.92.1 (SECURITY):
- CVE-2008-0318 Integer overflow in libclamav (#432623)
diff --git a/.cvsignore b/.cvsignore
index f6ee3be..9a29028 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1,2 +1 @@
-clamav-*.tar.gz*
-clamav-*.*.rpm
+clamav-0.92.1-norar.tar.bz2
diff --git a/clamav.spec b/clamav.spec
index e006b41..a0dff5c 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -1,4 +1,4 @@
-## $Id: clamav.spec,v 1.47 2007/12/21 19:12:19 spot Exp $
+## $Id: clamav.spec,v 1.48 2007/12/21 19:23:28 spot Exp $
## Fedora Extras specific customization below...
# %bcond_without fedora
@@ -17,8 +17,8 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
-Version: 0.92
-Release: %release_func 4.1
+Version: 0.92.1
+Release: %release_func 1
License: GPLv2
Group: Applications/File
@@ -27,7 +27,7 @@ URL: http://www.clamav.net
# incompatible unrar from RARlabs. We have to pull this code out.
# All that is needed to make the clean tarball is: rm -rf libclamunrar*
# Note that you also need patch26.
-Source0: clamav-%{version}.clean.tar.gz
+Source0: clamav-%{version}-norar.tar.bz2
# Source0: http://download.sourceforge.net/sourceforge/clamav/%name-%version.tar.gz
# No sense in using this file for the time being.
# Source999: http://download.sourceforge.net/sourceforge/clamav/%name-%version.tar.gz.sig
@@ -519,6 +519,10 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%changelog
+* Thu Feb 14 2008 Robert Scheck <robert(a)fedoraproject.org> - 0.92.1-1
+- Upgrade to 0.92.1 (SECURITY):
+- CVE-2008-0318 Integer overflow in libclamav (#432623)
+
* Fri Dec 21 2007 Tom "spot" Callaway <tcallawa(a)redhat.com> - 0.92-4
- EPEL fixes
diff --git a/sources b/sources
index 10dd892..6e9b8a3 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-554d44a5b2265808750553d2e4d0d6fb clamav-0.92.clean.tar.gz
+aecbcc39bf5b85e8967ddfa2bef4eb90 clamav-0.92.1-norar.tar.bz2
commit 869e18548a9fa2dcab5307559ee885a1b0704ef6
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Thu Feb 14 15:42:36 2008 +0000
Removed old, unneeded patches
diff --git a/clamav-0.70-user.patch b/clamav-0.70-user.patch
deleted file mode 100644
index f7f42b1..0000000
--- a/clamav-0.70-user.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- clamav-0.70-rc/contrib/init/RedHat/clamav-milter.user 2000-02-19 07:04:00.000000000 +0100
-+++ clamav-0.70-rc/contrib/init/RedHat/clamav-milter 2003-06-26 14:35:01.000000000 +0200
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
- #
- # clamav-milter This script starts and stops the clamav-milter daemon
- #
-@@ -16,6 +16,7 @@
-
- # Local clamav-milter config
- CLAMAV_FLAGS=
-+CLAMAV_USER=
- test -f /etc/sysconfig/clamav-milter && . /etc/sysconfig/clamav-milter
-
- # Check that networking is up.
-@@ -28,7 +29,7 @@
-
- start() {
- echo -n "Starting clamav-milter: "
-- daemon clamav-milter ${CLAMAV_FLAGS}
-+ daemon ${CLAMAV_USER:+--user $CLAMAV_USER} setsid /usr/sbin/clamav-milter ${CLAMAV_FLAGS} </dev/null
- RETVAL=$?
- echo
- test $RETVAL -eq 0 && touch /var/lock/subsys/clamav-milter
diff --git a/clamav-0.88.1-strncpy.patch b/clamav-0.88.1-strncpy.patch
deleted file mode 100644
index ceceb7d..0000000
--- a/clamav-0.88.1-strncpy.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-2006-04-24 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
-
- * libclamav/unrarlib.c/stricomp(): terminate the string copied
- with strncpy() explicitly with '\0'. Does not seem to be
- exploitable at the moment due to deeply buried constraints
- (function will be called for buffers with a static size of
- 260 only).
-
- But it is better to fix it now than to run into problems
- when function is used for other purposes.
-
---- clamav-0.88.1/libclamav/unrarlib.c.strncpy 2005-06-23 22:03:12.000000000 +0200
-+++ clamav-0.88.1/libclamav/unrarlib.c 2006-04-24 23:10:07.000000000 +0200
-@@ -1180,8 +1180,10 @@ int stricomp(char *Str1,char *Str2)
- char S1[512],S2[512];
- char *chptr;
-
-- strncpy(S1,Str1,sizeof(S1));
-- strncpy(S2,Str2,sizeof(S2));
-+ strncpy(S1,Str1,sizeof(S1));
-+ strncpy(S2,Str2,sizeof(S2));
-+ S1[sizeof(S1)-1] = '\0';
-+ S2[sizeof(S2)-1] = '\0';
-
- while((chptr = strchr(S1, '\\')) != NULL) /* ignore backslash */
- {
diff --git a/clamav-0.88.2-guys,please-read-the-compiler-warnings-before-doing-a-release.patch b/clamav-0.88.2-guys,please-read-the-compiler-warnings-before-doing-a-release.patch
deleted file mode 100644
index 38f9d9d..0000000
--- a/clamav-0.88.2-guys,please-read-the-compiler-warnings-before-doing-a-release.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- clamav-0.88.2/libclamav/pe.c.guys,please-read-the-compiler-warnings-before-doing-a-release.patch 2006-04-29 19:46:09.000000000 +0200
-+++ clamav-0.88.2/libclamav/pe.c 2006-04-30 11:25:53.000000000 +0200
-@@ -1555,7 +1555,7 @@ int cli_peheader(int desc, struct cli_pe
- {
- uint16_t e_magic; /* DOS signature ("MZ") */
- uint32_t e_lfanew; /* address of new exe header */
-- uint32_t min, max;
-+ uint32_t min=0, max=0;
- struct pe_image_file_hdr file_hdr;
- struct pe_image_optional_hdr optional_hdr;
- struct pe_image_section_hdr *section_hdr;
---- clamav-0.88.2/libclamav/htmlnorm.c.guys,please-read-the-compiler-warnings-before-doing-a-release.patch 2006-03-22 19:03:35.000000000 +0100
-+++ clamav-0.88.2/libclamav/htmlnorm.c 2006-04-30 11:25:53.000000000 +0200
-@@ -391,7 +391,7 @@ static int cli_html_normalise(int fd, m_
- {
- int fd_tmp, tag_length, tag_arg_length, binary;
- int retval=FALSE, escape, value, hex, tag_val_length, table_pos, in_script=FALSE;
-- FILE *stream_in;
-+ FILE *stream_in = 0;
- html_state state=HTML_NORM, next_state=HTML_BAD_STATE;
- char filename[1024], tag[HTML_STR_LENGTH+1], tag_arg[HTML_STR_LENGTH+1];
- char tag_val[HTML_STR_LENGTH+1], *tmp_file;
diff --git a/clamav-0.88.4-visibility.patch b/clamav-0.88.4-visibility.patch
deleted file mode 100644
index 34ef51e..0000000
--- a/clamav-0.88.4-visibility.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- clamav-0.88.4/libclamav/md5.c.visibility 2005-06-23 22:03:12.000000000 +0200
-+++ clamav-0.88.4/libclamav/md5.c 2006-08-11 08:19:02.000000000 +0200
-@@ -176,7 +176,7 @@ static void *body(MD5_CTX *ctx, void *da
- return ptr;
- }
-
--void MD5_Init(MD5_CTX *ctx)
-+void __attribute__ ((__visibility__("hidden"))) MD5_Init(MD5_CTX *ctx)
- {
- ctx->a = 0x67452301;
- ctx->b = 0xefcdab89;
-@@ -187,7 +187,7 @@ void MD5_Init(MD5_CTX *ctx)
- ctx->hi = 0;
- }
-
--void MD5_Update(MD5_CTX *ctx, void *data, unsigned long size)
-+void __attribute__ ((__visibility__("hidden"))) MD5_Update(MD5_CTX *ctx, void *data, unsigned long size)
- {
- MD5_u32plus saved_lo;
- unsigned long used, free;
-@@ -221,7 +221,7 @@ void MD5_Update(MD5_CTX *ctx, void *data
- memcpy(ctx->buffer, data, size);
- }
-
--void MD5_Final(unsigned char *result, MD5_CTX *ctx)
-+void __attribute__ ((__visibility__("hidden"))) MD5_Final(unsigned char *result, MD5_CTX *ctx)
- {
- unsigned long used, free;
-
commit 693b061eac2a68f66601c2f80fa51621872b7a95
Author: ensc <ensc(a)fedoraproject.org>
Date: Mon Feb 11 22:30:35 2008 +0000
updated to 0.92.1
diff --git a/.cvsignore b/.cvsignore
index f6ee3be..d34f911 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1,2 +1,3 @@
clamav-*.tar.gz*
+clamav-*.tar.bz2*
clamav-*.*.rpm
diff --git a/Makefile b/Makefile
index 21be25f..2cc62a7 100644
--- a/Makefile
+++ b/Makefile
@@ -19,3 +19,16 @@ MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)
+
+
+# can not use final tarball name here as it will conflict with rules
+# within Makefile.common
+TARBALL_CLEAN = ${NAME}-${VERSION}-norar.tar.bz2.tmp
+TARBALL = ${NAME}-${VERSION}.tar.gz
+
+clean-sources: ${TARBALL_CLEAN}
+
+${TARBALL_CLEAN}: ${TARBALL}
+ rm -f $@.tmp
+ zcat $< | tar --delete -f - '*/libclamunrar/*' | bzip2 -c > $@.tmp
+ mv $@.tmp $@
diff --git a/clamav.spec b/clamav.spec
index 919bf65..70932c8 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -1,4 +1,4 @@
-## $Id: clamav.spec,v 1.65 2008/01/01 17:10:12 ensc Exp $
+## $Id: clamav.spec,v 1.66 2008/01/01 17:33:05 ensc Exp $
## Fedora Extras specific customization below...
%bcond_without fedora
@@ -18,8 +18,8 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
-Version: 0.92
-Release: %release_func 6
+Version: 0.92.1
+Release: %release_func 1
License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
Group: Applications/File
@@ -30,8 +30,14 @@ Source999: http://download.sourceforge.net/sourceforge/clamav/%name-%version.tar
%else
# Unfortunately, clamav includes support for RAR v3, derived from GPL
# incompatible unrar from RARlabs. We have to pull this code out.
-# All that is needed to make the clean tarball is: rm -rf libclamunrar*
-Source0: %name-%version.clean.tar.gz
+# tarball was created by
+#
+# zcat clamav-$V.tar.gz | tar --delete -f - '*/libclamunrar/*' | bzip2 -c > clamav-$V-norar.tar.bz2
+#
+# or
+#
+# make clean-sources [TARBALL=<original-tarball>]
+Source0: %name-%version-norar.tar.bz2
%endif
Source1: clamd-wrapper
Source2: clamd.sysconfig
@@ -257,7 +263,7 @@ Sendmail customizations of the clamav-milter.
install -p -m0644 %SOURCE300 clamav-milter/
mkdir -p libclamunrar{,_iface}
-%{!?with_unrar:touch libclamunrar{,_iface}/{Makefile.in,all,install}}
+%{!?with_unrar:touch libclamunrar/{Makefile.in,all,install}}
perl -pi -e 's!^(#?LogFile ).*!\1/var/log/clamd.<SERVICE>!g;
s!^#?(LocalSocket ).*!\1/var/run/clamd.<SERVICE>/clamd.sock!g;
@@ -549,6 +555,9 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%changelog
+* Mon Feb 11 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.92.1-1
+- updated to 0.92.1
+
* Tue Jan 1 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.92-6
- redisabled unrar stuff completely by using clean sources
- splitted -milter subpackage into pieces to allow use without sendmail
diff --git a/lastver b/lastver
index ca6156a..da011ce 100644
--- a/lastver
+++ b/lastver
@@ -1 +1 @@
-0.92
+0.92.1
diff --git a/sources b/sources
index 10dd892..6e9b8a3 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-554d44a5b2265808750553d2e4d0d6fb clamav-0.92.clean.tar.gz
+aecbcc39bf5b85e8967ddfa2bef4eb90 clamav-0.92.1-norar.tar.bz2
commit 089cc9d166636f758fe483327989d9ad695b0457
Author: ensc <ensc(a)fedoraproject.org>
Date: Tue Jan 1 17:33:05 2008 +0000
minor optimizations
diff --git a/clamav.spec b/clamav.spec
index 64e1074..919bf65 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -1,4 +1,4 @@
-## $Id: clamav.spec,v 1.64 2008/01/01 14:59:15 ensc Exp $
+## $Id: clamav.spec,v 1.65 2008/01/01 17:10:12 ensc Exp $
## Fedora Extras specific customization below...
%bcond_without fedora
@@ -257,7 +257,7 @@ Sendmail customizations of the clamav-milter.
install -p -m0644 %SOURCE300 clamav-milter/
mkdir -p libclamunrar{,_iface}
-%{!?with_unrar:> libclamunrar/Makefile.in; >libclamunrar_iface/Makefile.in; touch libclamunrar{,_iface}/{all,install}}
+%{!?with_unrar:touch libclamunrar{,_iface}/{Makefile.in,all,install}}
perl -pi -e 's!^(#?LogFile ).*!\1/var/log/clamd.<SERVICE>!g;
s!^#?(LocalSocket ).*!\1/var/run/clamd.<SERVICE>/clamd.sock!g;
commit 46c82f4bf86733c97dfab69594ef9f91336a21e2
Author: ensc <ensc(a)fedoraproject.org>
Date: Tue Jan 1 17:10:12 2008 +0000
- redisabled unrar stuff completely by using clean sources
- splitted -milter subpackage into pieces to allow use without sendmail
(#239037)
diff --git a/clamav.spec b/clamav.spec
index fe53a7b..64e1074 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -1,4 +1,4 @@
-## $Id: clamav.spec,v 1.63 2008/01/01 13:19:16 ensc Exp $
+## $Id: clamav.spec,v 1.64 2008/01/01 14:59:15 ensc Exp $
## Fedora Extras specific customization below...
%bcond_without fedora
@@ -19,13 +19,20 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
Version: 0.92
-Release: %release_func 5
+Release: %release_func 6
License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
Group: Applications/File
URL: http://www.clamav.net
+%if 0%{?with_unrar:1}
Source0: http://download.sourceforge.net/sourceforge/clamav/%name-%version.tar.gz
Source999: http://download.sourceforge.net/sourceforge/clamav/%name-%version.tar.gz.sig
+%else
+# Unfortunately, clamav includes support for RAR v3, derived from GPL
+# incompatible unrar from RARlabs. We have to pull this code out.
+# All that is needed to make the clean tarball is: rm -rf libclamunrar*
+Source0: %name-%version.clean.tar.gz
+%endif
Source1: clamd-wrapper
Source2: clamd.sysconfig
Source3: clamd.logrotate
@@ -114,18 +121,32 @@ Requires(pre): %_initrddir
Requires(postun): %_initrddir
%package milter
-Summary: Sendmail-milter for the Clam Antivirus scanner
+Summary: Milter module for the Clam Antivirus scanner
+Group: System Environment/Daemons
+Requires: clamav-milter-core = %version-%release
+Requires: milter(clamav)
+
+%package milter-core
+Summary: Core milter module for the Clam Antivirus scanner
Group: System Environment/Daemons
Requires: init(clamav-milter)
-Source300: README.fedora
BuildRequires: sendmail-devel
BuildRequires: fedora-usermgmt-devel
Provides: user(%milteruser)
Provides: group(%milteruser)
-Requires: sendmail
Requires(post): coreutils
%{?FE_USERADD_REQ}
+%package milter-sendmail
+Summary: Sendmail customizations for clamav-milter
+Group: System Environment/Daemons
+Source300: README.fedora
+Requires: sendmail
+Requires: clamav-milter-core = %version-%release
+Provides: milter(clamav) = sendmail
+Conflicts: milter(clamav) < sendmail
+Conflicts: milter(clamav) > sendmail
+
%package milter-sysv
Summary: SysV initscripts for the clamav sendmail-milter
Group: System Environment/Daemons
@@ -216,6 +237,12 @@ This package contains files which are needed to run the clamav-milter.
%description milter-sysv
The SysV initscripts for clamav-milter.
+%description milter-core
+Core files for the clamav-milter.
+
+%description milter-sendmail
+Sendmail customizations of the clamav-milter.
+
## ------------------------------------------------------------
@@ -229,6 +256,8 @@ The SysV initscripts for clamav-milter.
install -p -m0644 %SOURCE300 clamav-milter/
+mkdir -p libclamunrar{,_iface}
+%{!?with_unrar:> libclamunrar/Makefile.in; >libclamunrar_iface/Makefile.in; touch libclamunrar{,_iface}/{all,install}}
perl -pi -e 's!^(#?LogFile ).*!\1/var/log/clamd.<SERVICE>!g;
s!^#?(LocalSocket ).*!\1/var/run/clamd.<SERVICE>/clamd.sock!g;
@@ -498,14 +527,20 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%files milter
%defattr(-,root,root,-)
-%doc clamav-milter/INSTALL clamav-milter/README.fedora
+
+%files milter-core
+%defattr(-,root,root,-)
+%doc clamav-milter/INSTALL
%_sbindir/*milter*
%_mandir/man8/clamav-milter*
%config(noreplace) %verify(not mtime) %_sysconfdir/clamd.d/milter.conf
-%attr(0700,%milteruser,%milteruser) %dir %milterstatedir
-%ghost %milterstatedir/*
%ghost %attr(0620,root,%milteruser) %verify(not size md5 mtime) %milterlog
+%files milter-sendmail
+%defattr(-,root,root,-)
+%doc clamav-milter/README.fedora
+%attr(0700,%milteruser,%milteruser) %dir %milterstatedir
+%ghost %milterstatedir/*
%files milter-sysv
%defattr(-,root,root,-)
@@ -514,6 +549,11 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%changelog
+* Tue Jan 1 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.92-6
+- redisabled unrar stuff completely by using clean sources
+- splitted -milter subpackage into pieces to allow use without sendmail
+ (#239037)
+
* Tue Jan 1 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.92-5
- use a better way to disable RPATH-generation (needed for '--with
unrar' builds)
diff --git a/sources b/sources
index 6999f43..10dd892 100644
--- a/sources
+++ b/sources
@@ -1,2 +1 @@
-e500651858a9187a87025c8a5c23969c clamav-0.92.tar.gz
-5ac3264d9b01b7dce93f646e247b2621 clamav-0.92.tar.gz.sig
+554d44a5b2265808750553d2e4d0d6fb clamav-0.92.clean.tar.gz
commit 00b1bfee950f366b37e29456d9ef3535b1ee820e
Author: ensc <ensc(a)fedoraproject.org>
Date: Tue Jan 1 14:59:15 2008 +0000
use a better way to disable RPATH-generation (needed for '--with unrar'
builds)
diff --git a/clamav.spec b/clamav.spec
index 71c14f3..fe53a7b 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -1,4 +1,4 @@
-## $Id: clamav.spec,v 1.62 2007/12/21 18:11:32 spot Exp $
+## $Id: clamav.spec,v 1.63 2008/01/01 13:19:16 ensc Exp $
## Fedora Extras specific customization below...
%bcond_without fedora
@@ -19,7 +19,7 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
Version: 0.92
-Release: %release_func 4
+Release: %release_func 5
License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
Group: Applications/File
@@ -248,14 +248,13 @@ export LDFLAGS='-Wl,--as-needed'
# HACK: remove me, when configure uses $LIBS instead of $LDFLAGS for milter check
export LIBS='-lmilter -lpthread'
%configure --disable-clamav --with-dbdir=/var/lib/clamav \
- --enable-milter --disable-static --disable-rpath \
+ --enable-milter --disable-static \
%{!?with_unrar:--disable-unrar}
# build with --as-needed and disable rpath
sed -i \
-e 's! -shared ! -Wl,--as-needed\0!g' \
- -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
- -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
+ -e '/sys_lib_dlsearch_path_spec=\"\/lib \/usr\/lib /s!/lib!/%_lib!g' \
libtool
@@ -515,6 +514,10 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%changelog
+* Tue Jan 1 2008 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.92-5
+- use a better way to disable RPATH-generation (needed for '--with
+ unrar' builds)
+
* Mon Dec 31 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.92-4
- added a README.fedora to the milter package (#240610)
- ship original sources again; unrar is now licensed correctly (no more
commit 019ada64a99a5d99349f06e27c29cfbaec008c10
Author: ensc <ensc(a)fedoraproject.org>
Date: Tue Jan 1 13:19:16 2008 +0000
merged with F-8
diff --git a/.cvsignore b/.cvsignore
index cdd308b..f6ee3be 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1 +1,2 @@
-clamav-0.92.clean.tar.gz
+clamav-*.tar.gz*
+clamav-*.*.rpm
diff --git a/README.fedora b/README.fedora
new file mode 100644
index 0000000..b9f572e
--- /dev/null
+++ b/README.fedora
@@ -0,0 +1,5 @@
+Add
+
+ INPUT_MAIL_FILTER(`clamav', `S=local:/var/run/clamav-milter/clamav.sock, F=, T=S:4m;R:4m')dnl
+
+to your sendmail.mc.
diff --git a/clamav-0.90rc3-private.patch b/clamav-0.90rc3-private.patch
deleted file mode 100644
index 66b662e..0000000
--- a/clamav-0.90rc3-private.patch
+++ /dev/null
@@ -1,28 +0,0 @@
---- clamav-0.90rc3/libclamav.pc.in.private 2004-07-14 13:35:38.000000000 +0200
-+++ clamav-0.90rc3/libclamav.pc.in 2007-02-04 12:24:35.000000000 +0100
-@@ -6,6 +6,6 @@
- Name: libclamav
- Description: A GPL virus scanner
- Version: @LIBCLAMAV_VERSION@
--Libs: -L${libdir} -lclamav @LIBCLAMAV_LIBS@
--Cflags: -I${includedir} @CFLAGS@
--
-+Libs: -L${libdir} -lclamav
-+Libs.private: -L${libdir} -lclamav @LIBCLAMAV_LIBS@
-+Cflags: -I${includedir}
---- clamav-0.90rc3/clamav-config.in.private 2004-06-06 03:50:08.000000000 +0200
-+++ clamav-0.90rc3/clamav-config.in 2007-02-04 12:25:27.000000000 +0100
-@@ -55,11 +55,11 @@
- ;;
-
- --cflags)
-- echo -I@includedir@ @CFLAGS@
-+ echo -I@includedir@
- ;;
-
- --libs)
-- echo -L@libdir@ @LIBCLAMAV_LIBS@
-+ echo -L@libdir@ -lclamav
- ;;
-
- *)
diff --git a/clamav-0.91.2-open.patch b/clamav-0.91.2-open.patch
deleted file mode 100644
index b933e46..0000000
--- a/clamav-0.91.2-open.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- clamav-0.91.2/clamd/dazukoio_compat12.c.open 2007-03-06 14:38:06.000000000 +0100
-+++ clamav-0.91.2/clamd/dazukoio_compat12.c 2007-08-25 12:36:30.000000000 +0200
-@@ -89,7 +89,7 @@ int dazukoRegister_TS_compat12(struct da
- if (dazuko->device < 0)
- {
-
-- dazuko->device = open("/dev/dazuko", 0);
-+ dazuko->device = open("/dev/dazuko", O_RDONLY);
- if (dazuko->device < 0)
- return -1;
-
---- clamav-0.91.2/shared/misc.c.open 2007-03-31 21:27:31.000000000 +0200
-+++ clamav-0.91.2/shared/misc.c 2007-08-25 12:36:30.000000000 +0200
-@@ -165,7 +165,7 @@ int filecopy(const char *src, const char
- if((s = open(src, O_RDONLY|O_BINARY)) == -1)
- return -1;
-
-- if((d = open(dest, O_CREAT|O_WRONLY|O_TRUNC|O_BINARY)) == -1) {
-+ if((d = open(dest, O_CREAT|O_WRONLY|O_TRUNC|O_BINARY, 0600)) == -1) {
- close(s);
- return -1;
- }
diff --git a/clamav-0.92-nounrar.patch b/clamav-0.92-nounrar.patch
deleted file mode 100644
index b63921e..0000000
--- a/clamav-0.92-nounrar.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-diff -up clamav-0.92/Makefile.in.BAD clamav-0.92/Makefile.in
---- clamav-0.92/Makefile.in.BAD 2007-12-21 12:39:00.000000000 -0500
-+++ clamav-0.92/Makefile.in 2007-12-21 12:39:11.000000000 -0500
-@@ -242,7 +242,7 @@ target_os = @target_os@
- target_vendor = @target_vendor@
- top_builddir = @top_builddir@
- top_srcdir = @top_srcdir@
--SUBDIRS = libclamunrar libclamunrar_iface libclamav clamscan clamd clamdscan freshclam sigtool clamconf database docs etc clamav-milter
-+SUBDIRS = libclamav clamscan clamd clamdscan freshclam sigtool clamconf database docs etc clamav-milter
- EXTRA_DIST = FAQ contrib test examples BUGS shared libclamav.pc.in UPGRADE COPYING.nsis COPYING.unrar COPYING.LGPL
- bin_SCRIPTS = clamav-config
- pkgconfigdir = $(libdir)/pkgconfig
-diff -up clamav-0.92/configure.in.BAD clamav-0.92/configure.in
---- clamav-0.92/configure.in.BAD 2007-12-21 12:37:51.000000000 -0500
-+++ clamav-0.92/configure.in 2007-12-21 12:38:00.000000000 -0500
-@@ -1214,8 +1214,6 @@ AC_MSG_RESULT($have_signed_rightshift_ex
- AC_C_FPU_BIGENDIAN
-
- AC_OUTPUT([
--libclamunrar/Makefile
--libclamunrar_iface/Makefile
- libclamav/Makefile
- clamscan/Makefile
- database/Makefile
-diff -up clamav-0.92/Makefile.am.BAD clamav-0.92/Makefile.am
---- clamav-0.92/Makefile.am.BAD 2007-12-21 12:38:39.000000000 -0500
-+++ clamav-0.92/Makefile.am 2007-12-21 12:38:47.000000000 -0500
-@@ -16,7 +16,7 @@
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- # MA 02110-1301, USA.
-
--SUBDIRS = libclamunrar libclamunrar_iface libclamav clamscan clamd clamdscan freshclam sigtool clamconf database docs etc clamav-milter
-+SUBDIRS = libclamav clamscan clamd clamdscan freshclam sigtool clamconf database docs etc clamav-milter
- EXTRA_DIST = FAQ contrib test examples BUGS shared libclamav.pc.in UPGRADE COPYING.nsis COPYING.unrar COPYING.LGPL
-
- bin_SCRIPTS=clamav-config
-diff -up clamav-0.92/configure.BAD clamav-0.92/configure
---- clamav-0.92/configure.BAD 2007-12-21 12:45:38.000000000 -0500
-+++ clamav-0.92/configure 2007-12-21 12:46:05.000000000 -0500
-@@ -26397,7 +26397,7 @@ echo "$as_me: WARNING: Unable to determi
- esac
-
-
--ac_config_files="$ac_config_files libclamunrar/Makefile libclamunrar_iface/Makefile libclamav/Makefile clamscan/Makefile database/Makefile docs/Makefile clamd/Makefile clamdscan/Makefile clamav-milter/Makefile freshclam/Makefile sigtool/Makefile clamconf/Makefile etc/Makefile Makefile clamav-config libclamav.pc docs/man/clamav-milter.8 docs/man/clamconf.1 docs/man/clamd.8 docs/man/clamd.conf.5 docs/man/clamdscan.1 docs/man/clamscan.1 docs/man/freshclam.1 docs/man/freshclam.conf.5 docs/man/sigtool.1"
-+ac_config_files="$ac_config_files libclamav/Makefile clamscan/Makefile database/Makefile docs/Makefile clamd/Makefile clamdscan/Makefile clamav-milter/Makefile freshclam/Makefile sigtool/Makefile clamconf/Makefile etc/Makefile Makefile clamav-config libclamav.pc docs/man/clamav-milter.8 docs/man/clamconf.1 docs/man/clamd.8 docs/man/clamd.conf.5 docs/man/clamdscan.1 docs/man/clamscan.1 docs/man/freshclam.1 docs/man/freshclam.conf.5 docs/man/sigtool.1"
-
- cat >confcache <<\_ACEOF
- # This file is a shell script that caches the results of configure
-@@ -27013,8 +27013,6 @@ do
- case $ac_config_target in
- "clamav-config.h") CONFIG_HEADERS="$CONFIG_HEADERS clamav-config.h" ;;
- "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
-- "libclamunrar/Makefile") CONFIG_FILES="$CONFIG_FILES libclamunrar/Makefile" ;;
-- "libclamunrar_iface/Makefile") CONFIG_FILES="$CONFIG_FILES libclamunrar_iface/Makefile" ;;
- "libclamav/Makefile") CONFIG_FILES="$CONFIG_FILES libclamav/Makefile" ;;
- "clamscan/Makefile") CONFIG_FILES="$CONFIG_FILES clamscan/Makefile" ;;
- "database/Makefile") CONFIG_FILES="$CONFIG_FILES database/Makefile" ;;
diff --git a/clamav-0.92-private.patch b/clamav-0.92-private.patch
new file mode 100644
index 0000000..bab2948
--- /dev/null
+++ b/clamav-0.92-private.patch
@@ -0,0 +1,29 @@
+--- clamav-0.92/libclamav.pc.in.private
++++ clamav-0.92/libclamav.pc.in
+@@ -6,6 +6,6 @@ includedir=@includedir@
+ Name: libclamav
+ Description: A GPL virus scanner
+ Version: @LIBCLAMAV_VERSION@
+-Libs: -L${libdir} -lclamav @LIBCLAMAV_LIBS@
+-Cflags: -I${includedir} @CFLAGS@
+-
++Libs: -L${libdir} -lclamav
++Libs.private: -L${libdir} -lclamav @LIBCLAMAV_LIBS@
++Cflags: -I${includedir}
+--- clamav-0.92/clamav-config.in.private
++++ clamav-0.92/clamav-config.in
+@@ -54,12 +54,8 @@ while test $# -gt 0; do
+ usage 0
+ ;;
+
+- --cflags)
+- echo -I@includedir@ @CFLAGS@
+- ;;
+-
+- --libs)
+- echo -L@libdir@ @LIBCLAMAV_LIBS@
++ (--cflags|--libs)
++ ${PKG_CONFIG:-pkg-config} "$1" libclamav
+ ;;
+
+ *)
diff --git a/clamav-notify-servers b/clamav-notify-servers
index 22d57a6..f115e89 100644
--- a/clamav-notify-servers
+++ b/clamav-notify-servers
@@ -1,16 +1,16 @@
#! /bin/bash
# Copyright (C) 2004 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de>
-#
+#
# 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.
diff --git a/clamav.spec b/clamav.spec
index 0e049d1..71c14f3 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -1,7 +1,8 @@
-## $Id: clamav.spec,v 1.61 2007/12/21 18:06:29 spot Exp $
+## $Id: clamav.spec,v 1.62 2007/12/21 18:11:32 spot Exp $
## Fedora Extras specific customization below...
-%bcond_without fedora
+%bcond_without fedora
+%bcond_with unrar
##
%global username clamav
@@ -18,19 +19,13 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
Version: 0.92
-Release: %release_func 3
+Release: %release_func 4
-License: GPLv2
+License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
Group: Applications/File
URL: http://www.clamav.net
-# Unfortunately, clamav includes support for RAR v3, derived from GPL
-# incompatible unrar from RARlabs. We have to pull this code out.
-# All that is needed to make the clean tarball is: rm -rf libclamunrar*
-# Note that you also need patch26.
-Source0: clamav-%{version}.clean.tar.gz
-# Source0: http://download.sourceforge.net/sourceforge/clamav/%name-%version.tar.gz
-# No sense in using this file for the time being.
-# Source999: http://download.sourceforge.net/sourceforge/clamav/%name-%version.tar.gz.sig
+Source0: http://download.sourceforge.net/sourceforge/clamav/%name-%version.tar.gz
+Source999: http://download.sourceforge.net/sourceforge/clamav/%name-%version.tar.gz.sig
Source1: clamd-wrapper
Source2: clamd.sysconfig
Source3: clamd.logrotate
@@ -40,9 +35,8 @@ Source7: clamd.SERVICE.init
Source8: clamav-notify-servers
Patch21: clamav-0.70-path.patch
Patch22: clamav-0.80-initoff.patch
-Patch24: clamav-0.90rc3-private.patch
+Patch24: clamav-0.92-private.patch
Patch25: clamav-0.92-open.patch
-Patch26: clamav-0.92-nounrar.patch
BuildRoot: %_tmppath/%name-%version-%release-root
Requires: clamav-lib = %version-%release
Requires: data(clamav)
@@ -73,6 +67,7 @@ Source100: clamd-gen
Requires: clamav-lib = %version-%release
Requires: clamav-filesystem = %version-%release
Requires(pre): %_libdir/pkgconfig
+Requires: pkgconfig
%package data
Summary: Virus signature data for the Clam Antivirus scanner
@@ -122,6 +117,7 @@ Requires(postun): %_initrddir
Summary: Sendmail-milter for the Clam Antivirus scanner
Group: System Environment/Daemons
Requires: init(clamav-milter)
+Source300: README.fedora
BuildRequires: sendmail-devel
BuildRequires: fedora-usermgmt-devel
Provides: user(%milteruser)
@@ -215,12 +211,7 @@ SysV initscripts template for the clamav server
%description milter
-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
-
-to your sendmail.mc.
+This package contains files which are needed to run the clamav-milter.
%description milter-sysv
The SysV initscripts for clamav-milter.
@@ -235,7 +226,9 @@ The SysV initscripts for clamav-milter.
%patch22 -p1 -b .initoff
%patch24 -p1 -b .private
%patch25 -p1 -b .open
-%patch26 -p1 -b .nounrar
+
+install -p -m0644 %SOURCE300 clamav-milter/
+
perl -pi -e 's!^(#?LogFile ).*!\1/var/log/clamd.<SERVICE>!g;
s!^#?(LocalSocket ).*!\1/var/run/clamd.<SERVICE>/clamd.sock!g;
@@ -254,12 +247,16 @@ CFLAGS="$RPM_OPT_FLAGS -Wall -W -Wmissing-prototypes -Wmissing-declarations -std
export LDFLAGS='-Wl,--as-needed'
# HACK: remove me, when configure uses $LIBS instead of $LDFLAGS for milter check
export LIBS='-lmilter -lpthread'
-%configure --disable-clamav --with-dbdir=/var/lib/clamav \
- --enable-milter --disable-static --disable-unrar
-sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool
-# No rpath
-sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
-sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
+%configure --disable-clamav --with-dbdir=/var/lib/clamav \
+ --enable-milter --disable-static --disable-rpath \
+ %{!?with_unrar:--disable-unrar}
+
+# build with --as-needed and disable rpath
+sed -i \
+ -e 's! -shared ! -Wl,--as-needed\0!g' \
+ -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
+ -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
+ libtool
make %{?_smp_mflags}
@@ -291,15 +288,20 @@ install -d -m755 \
${RPM_BUILD_ROOT}%milterstatedir \
${RPM_BUILD_ROOT}%pkgdatadir/template \
${RPM_BUILD_ROOT}%_initrddir \
- ${RPM_BUILD_ROOT}%homedir/daily.inc
+ ${RPM_BUILD_ROOT}%homedir/{main,daily}.inc
rm -f ${RPM_BUILD_ROOT}%_sysconfdir/clamd.conf \
${RPM_BUILD_ROOT}%_libdir/*.la
-for i in COPYING daily.{db,fp,hdb,info,ndb,pdb,zmd}; do
- touch ${RPM_BUILD_ROOT}%homedir/daily.inc/$i
+
+for i in cfg db fp hdb info mdb mdu ndb ndu pdb wdb zmd; do
+ touch ${RPM_BUILD_ROOT}%homedir/daily.inc/daily.$i
+ touch ${RPM_BUILD_ROOT}%homedir/main.inc/main.$i
done
+touch ${RPM_BUILD_ROOT}%homedir/daily.inc/COPYING
+touch ${RPM_BUILD_ROOT}%homedir/main.inc/COPYING
+
## prepare the server-files
mkdir _doc_server
@@ -470,14 +472,8 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%ghost %attr(0664,root,%username) %verify(not size md5 mtime) %freshclamlog
-%ghost %attr(0664,%username,%username) %homedir/daily.inc/COPYING
-%ghost %attr(0664,%username,%username) %homedir/daily.inc/daily.db
-%ghost %attr(0664,%username,%username) %homedir/daily.inc/daily.fp
-%ghost %attr(0664,%username,%username) %homedir/daily.inc/daily.hdb
-%ghost %attr(0664,%username,%username) %homedir/daily.inc/daily.info
-%ghost %attr(0664,%username,%username) %homedir/daily.inc/daily.ndb
-%ghost %attr(0664,%username,%username) %homedir/daily.inc/daily.pdb
-%ghost %attr(0664,%username,%username) %homedir/daily.inc/daily.zmd
+%ghost %attr(0664,%username,%username) %homedir/daily.inc/*
+%ghost %attr(0664,%username,%username) %homedir/main.inc/*
## -----------------------
@@ -503,7 +499,7 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%files milter
%defattr(-,root,root,-)
-%doc clamav-milter/INSTALL
+%doc clamav-milter/INSTALL clamav-milter/README.fedora
%_sbindir/*milter*
%_mandir/man8/clamav-milter*
%config(noreplace) %verify(not mtime) %_sysconfdir/clamd.d/milter.conf
@@ -519,6 +515,16 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
%changelog
+* Mon Dec 31 2007 Enrico Scholz <enrico.scholz(a)informatik.tu-chemnitz.de> - 0.92-4
+- added a README.fedora to the milter package (#240610)
+- ship original sources again; unrar is now licensed correctly (no more
+ stolen code put under GPL). Nevertheless, this license is not GPL
+ compatible, and to allow libclamav to be used by GPL applications,
+ unrar is disabled by a ./configure switch.
+- use pkg-config in clamav-config to emulate --cflags and --libs
+ operations (fixes partly multilib issues)
+- registered some m