Description of problem: The following Fedora files need to find their way into the EPEL branch: clamd.SERVICE.init clamav-update.cron clamav-update.logrotate clamd.logrotate clamd-README and maybe more complete README documents for installation. Version-Release number of selected component (if applicable): 0.97.3-1 How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
I should also add that I've taken the lastest fc16.src.rpm and mock built it as epel-6-x86_64 successfully.
The clamd package should have a init file, logrotate and readme. The clamav-db package has the update and logrotate. What functionality is missing?
(In reply to comment #2) > The clamd package should have a init file, logrotate and readme. > > The clamav-db package has the update and logrotate. > > What functionality is missing? The sysconfig file would be a start.
Hum. I'm not sure I see a sysconfig file in the Fedora packaging either. Can you elaborate on what this file is/would do?
(In reply to comment #4) > Hum. I'm not sure I see a sysconfig file in the Fedora packaging either. Can > you elaborate on what this file is/would do? [root@mail clamav-server-0.97.3]# rpm -qa --filesbypkg clamav* clamd* | grep sysconfig clamav-update /etc/sysconfig/freshclam clamav-server /usr/share/doc/clamav-server-0.97.3/clamd.sysconfig [root@mail clamav-server-0.97.3]# cat clamd.sysconfig #CLAMD_CONFIGFILE=/etc/clamd.d/<SERVICE>.conf #CLAMD_SOCKET=/var/run/clamd.<SERVICE>/clamd.sock #CLAMD_OPTIONS= [root@mail clamav-server-0.97.3]# cat clamd.init #!/bin/bash # # chkconfig: - 75 35 # description: The clamd server running for <SERVICE> CLAMD_SERVICE=<SERVICE> . /usr/share/clamav/clamd-wrapper [root@mail clamav-server-0.97.3]# If you look at /usr/share/clamav/clamd-wrapper, you'll see that it sets up (defaults?) on some of the values that are supposed to be inherited from clamd.sysconfig (but will be defaulted in the absence of that file). It's not clear why EL needs both the clamav.init and the 2nd tarball's clamd-wrapper. I'll also note that you don't need to specify the pidfile on the command line in the clamd-wrapper: daemon --pidfile=${CLAMD_PIDFILE} \ exec -a $procname /usr/sbin/clamd \ ${CLAMD_CONFIGFILE:+-c $CLAMD_CONFIGFILE} ${CLAMD_OPTIONS} --pid ${CLAMD_PIDFILE} since it already came out of the config a few lines above: CLAMD_PIDFILE=`grep ^PidFile ${CLAMD_CONFIGFILE} | awk '{print $2}'` I would note, though, that I'd grep the PID value *after* sourcing the CONFIGFILE, i.e.: test -f "$sysconffile" && . "$sysconffile" CLAMD_PIDFILE=`grep ^PidFile ${CLAMD_CONFIGFILE} | awk '{print $2}'` just in case the sysconfig file changed the values of CLAMD_CONFIGFILE. It also raises the question of "should the sysconffile be allowed to specify a CLAMD_PIDFILE"? I don't think so. I think the value coming out of the CLAMD_CONFIGFILE should be mandatory and authoritative. Likewise should CLAMD_SOCKET come out of a sysconfig file, or should it always be grepped out of the CLAMD_CONFIGFILE? In short, EL provides some of the files necessary to allow individually configured instances of clamd to run, but not enough information to do so.
> In short, EL provides some of the files necessary to allow individually > configured instances of clamd to run, but not enough information to do so. Did you see /usr/share/clamav/README.clamd-wrapper
Hmmm.... on 2nd glance, the whole sequence: ## 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 can safely be deleted from clamd-wrapper, as it never gets used elsewhere in the script.
(In reply to comment #6) > > In short, EL provides some of the files necessary to allow individually > > configured instances of clamd to run, but not enough information to do so. > > > Did you see /usr/share/clamav/README.clamd-wrapper Well, yes. And it refers to a non-existent clamd.init and clamd.sysconfig file, which is my point in filing this bug.
Created attachment 536484 [details] Add missing init and sysconfig files; clean up wrapper script
Fix has been posted. Can we please get some movement on this?
clamav-0.97.3-2.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/clamav-0.97.3-2.el6
clamav-0.97.3-2.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/clamav-0.97.3-2.el5
Package clamav-0.97.3-2.el6: * should fix your issue, * was pushed to the Fedora EPEL 6 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=epel-testing clamav-0.97.3-2.el6' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-EPEL-2011-5235/clamav-0.97.3-2.el6 then log in and leave karma (feedback).
clamav-0.97.3-2.el5 has been pushed to the Fedora EPEL 5 stable repository. If problems still persist, please make note of it in this bug report.
clamav-0.97.3-2.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.
I disagree with this update. It broke logrotate freshclam config: # rpm -qf /etc/logrotate.d/freshclam clamav-db-0.97.3-2.el5 # rpm -qV clamav-db # cat /etc/logrotate.d/freshclam /var/log/clamav/freshclam.log { missingok notifempty create 644 clam clam } /var/log/clamav/freshclam.log { missingok notifempty create 644 clam clam } # logrotate /etc/logrotate.d/freshclam error: /etc/logrotate.d/freshclam:6 duplicate log entry for /var/log/clamav/freshclam.log error: found error in /var/log/clamav/freshclam.log , skipping # Thanks.
I already have fixed this in GIT for EL6 and EL5, but no new build has been created from that so far, IIRC.
Reverted these changes, and resolving this bug as WONTFIX. They are breaking existing installations and no changes appear to be necessary. Feel free to request a new package to add separate scripts for maintaining multiple clamd installations. You can maintain your own clamav-wrapper package if you would like.
Great, thanks for reverting and prioritizing stability. Completely agree.
(In reply to comment #19) > Great, thanks for reverting and prioritizing stability. Completely agree. No one tries to destabilize code. It happens as an unintended consequence of trying to make code more maintainable, and in this case trying to simplify organization and identify shared parts with different distros. In this instance, it was a regression introduced by a single-line change that's been corrected.
Philip, of course no one tries to destabilize code, but too much was being fixed or re-organized at the same time here. I did read trough all your patches when you submitted them, couldn't see anything specifically wrong, most changes looked obviously correct, but was very uneasy about changing this much at once in EPEL. > In this instance, it was a regression introduced by a single-line change that's > been corrected. BTW: you did notice bz #771025 too, right ?
(In reply to comment #21) > Philip, of course no one tries to destabilize code, but too much was being > fixed or re-organized at the same time here. I did read trough all your patches > when you submitted them, couldn't see anything specifically wrong, most changes > looked obviously correct, but was very uneasy about changing this much at once > in EPEL. > > > > In this instance, it was a regression introduced by a single-line change that's > > been corrected. > > BTW: you did notice bz #771025 too, right ? Yes, and I responded: https://bugzilla.redhat.com/show_bug.cgi?id=771025#c6