Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: Spamassassin installs a cron job to run sa-update.cron. This script checks to see if spamd or amavisd are running, or if updates are set in /etc/sysconfig/sa-update. If so, it runs sa-update to update the Spamassassin definitions. This fails detect amavisd, and never runs sa-update even if amavisd is running. Version-Release number of selected component (if applicable): 3.3.2-18 How reproducible: Always Steps to Reproduce: 1. Start amavisd. 2. Run /usr/share/spamassassin/sa-update.cron 2. Check /var/log/sa-update.log. Actual results: No status is reported (or file is not created). Expected results: A message like 23-Jan-2014 15:35:01: SpamAssassin: No update available or 24-Jan-2014 04:42:53: SpamAssassin: Update processed successfully Additional info: sa-update.cron uses pgrep to find processes named "spamd" or "amavisd". This was changed from pidof in bug 755644 because pidof wasn't matching when there was extra text in the command line for spamd. Unfortunately, this still doesn't work for amavisd. pgrep uses /proc/[pid]/stat to check the process name but that is truncated to 15 characters. Amavisd appears like "/usr/bin/amavi" and thus doesn't match. The pgrep should probably be changed to pgrep -f, which checks the full command line.
I should also note that yes, pgrep -f increases the chance of a false hit, but checking for processes by name is an inexact science regardless. The "correct" way is probably via systemctl, replacing the pgrep line with /usr/bin/systemctl --quiet is-active $daemon This works with amavisd; I don't have spamd running so I can't check that.
Can you test this scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=6465137 It has the pgrep -f change as well as switching to gnupg2 instead of gnupg1 (bug 1055593) Feedback welcome.
It did detect amavisd, and installed an update successfully.
spamassassin-3.4.0-3.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/spamassassin-3.4.0-3.fc20
Package spamassassin-3.4.0-3.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing spamassassin-3.4.0-3.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-4171/spamassassin-3.4.0-3.fc20 then log in and leave karma (feedback).
spamassassin-3.4.0-4.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/spamassassin-3.4.0-4.fc20
Package spamassassin-3.4.0-4.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing spamassassin-3.4.0-4.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-6643/spamassassin-3.4.0-4.fc20 then log in and leave karma (feedback).
spamassassin-3.4.0-4.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.