Bug 1217990

Summary: sa-learn complains about the wrong version of config files
Product: [Fedora] Fedora Reporter: Bojan Smojver <bojan>
Component: spamassassinAssignee: Kevin Fenzi <kevin>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 22CC: jjelen, kevin, nb, plautrba, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: spamassassin-3.4.1-2.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-05-11 19:04:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Bojan Smojver 2015-05-03 21:57:50 UTC
Description of problem:
config: configuration file "/usr/share/spamassassin/20_advance_fee.cf" requires version 3.004000 of SpamAssassin, but this is code version 3.004001. Maybe you need to use the -C switch, or remove the old config files? Skipping this file at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Conf/Parser.pm line 406.
config: configuration file "/usr/share/spamassassin/20_body_tests.cf" requires version 3.004000 of SpamAssassin, but this is code version 3.004001. Maybe you need to use the -C switch, or remove the old config files? Skipping this file at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Conf/Parser.pm line 406.
config: configuration file "/usr/share/spamassassin/20_compensate.cf" requires version 3.004000 of SpamAssassin, but this is code version 3.004001. Maybe you need to use the -C switch, or remove the old config files? Skipping this file at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Conf/Parser.pm line 406.
config: configuration file "/usr/share/spamassassin/20_dnsbl_tests.cf" requires version 3.004000 of SpamAssassin, but this is code version 3.004001. Maybe you need to use the -C switch, or remove the old config files? Skipping this file at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Conf/Parser.pm line 406.
config: configuration file "/usr/share/spamassassin/20_drugs.cf" requires version 3.004000 of SpamAssassin, but this is code version 3.004001. Maybe you need to use the -C switch, or remove the old config files? Skipping this file at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Conf/Parser.pm line 406.
config: configuration file "/usr/share/spamassassin/20_dynrdns.cf" requires version 3.004000 of SpamAssassin, but this is code version 3.004001. Maybe you need to use the -C switch, or remove the old config files? Skipping this file at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Conf/Parser.pm line 406.
config: configuration file "/usr/share/spamassassin/20_fake_helo_tests.cf" requires version 3.004000 of SpamAssassin, but this is code version 3.004001. Maybe you need to use the -C switch, or remove the old config files? Skipping this file at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Conf/Parser.pm line 406.
config: configuration file "/usr/share/spamassassin/20_head_tests.cf" requires version 3.004000 of SpamAssassin, but this is code version 3.004001. Maybe you need to use the -C switch, or remove the old config files? Skipping this file at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Conf/Parser.pm line 406.
config: configuration file "/usr/share/spamassassin/20_html_tests.cf" requires version 3.004000 of SpamAssassin, but this is code version 3.004001. Maybe you need to use the -C switch, or remove the old config files? Skipping this file at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Conf/Parser.pm line 406.
config: configuration file "/usr/share/spamassassin/20_meta_tests.cf" requires version 3.004000 of SpamAssassin, but this is code version 3.004001. Maybe you need to use the -C switch, or remove the old config files? Skipping this file at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Conf/Parser.pm line 406.
config: configuration file "/usr/share/spamassassin/20_net_tests.cf" requires version 3.004000 of SpamAssassin, but this is code version 3.004001. Maybe you need to use the -C switch, or remove the old config files? Skipping this file at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Conf/Parser.pm line 406.
config: configuration file "/usr/share/spamassassin/20_phrases.cf" requires version 3.004000 of SpamAssassin, but this is code version 3.004001. Maybe you need to use the -C switch, or remove the old config files? Skipping this file at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Conf/Parser.pm line 406.
config: configuration file "/usr/share/spamassassin/20_porn.cf" requires version 3.004000 of SpamAssassin, but this is code version 3.004001. Maybe you need to use the -C switch, or remove the old config files? Skipping this file at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Conf/Parser.pm line 406.
config: configuration file "/usr/share/spamassassin/20_uri_tests.cf" requires version 3.004000 of SpamAssassin, but this is code version 3.004001. Maybe you need to use the -C switch, or remove the old config files? Skipping this file at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Conf/Parser.pm line 406.
config: configuration file "/usr/share/spamassassin/23_bayes.cf" requires version 3.004000 of SpamAssassin, but this is code version 3.004001. Maybe you need to use the -C switch, or remove the old config files? Skipping this file at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Conf/Parser.pm line 406.
config: configuration file "/usr/share/spamassassin/72_active.cf" requires version 3.004000 of SpamAssassin, but this is code version 3.004001. Maybe you need to use the -C switch, or remove the old config files? Skipping this file at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Conf/Parser.pm line 406.
config: configuration file "/usr/share/spamassassin/73_sandbox_manual_scores.cf" requires version 3.004000 of SpamAssassin, but this is code version 3.004001. Maybe you need to use the -C switch, or remove the old config files? Skipping this file at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Conf/Parser.pm line 406.
Learned tokens from 6 message(s) (5309 message(s) examined)

Version-Release number of selected component (if applicable):
spamassassin-3.4.1-1.fc22.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. Run sa-learn under spampd account.

Actual results:
Above messages since upgrade to 3.4.1.

Expected results:
No messages.

Additional info:
Not sure whether this is something to do with my local spampd account or not. Anyhow, the contents of ~spampd/.spamassassin is:

-bash-4.3$ ls -l .spamassassin/
total 19532
-rw-------. 1 spampd spampd  2813952 Feb 26  2014 auto-whitelist
-rw-------. 1 spampd spampd 20185088 May  4 07:41 bayes_seen
-rw-------. 1 spampd spampd  5283840 May  4 07:41 bayes_toks

Comment 1 Bojan Smojver 2015-05-04 00:43:47 UTC
[root@beauty spamassassin]# pwd
/usr/share/spamassassin
[root@beauty spamassassin]# grep -ar require_version *
20_advance_fee.cf:require_version 3.004000
20_body_tests.cf:require_version 3.004000
20_compensate.cf:require_version 3.004000
20_dnsbl_tests.cf:require_version 3.004000
20_drugs.cf:require_version 3.004000
20_dynrdns.cf:require_version 3.004000
20_fake_helo_tests.cf:require_version 3.004000
20_head_tests.cf:require_version 3.004000
20_html_tests.cf:require_version 3.004000
20_meta_tests.cf:require_version 3.004000
20_net_tests.cf:require_version 3.004000
20_phrases.cf:require_version 3.004000
20_porn.cf:require_version 3.004000
20_uri_tests.cf:require_version 3.004000
23_bayes.cf:require_version 3.004000
72_active.cf:require_version 3.004000
73_sandbox_manual_scores.cf:require_version 3.004000

Comment 2 Bojan Smojver 2015-05-04 00:48:54 UTC
One other, unrelated note.

Packaging /var/run/spamassassin like this won't work:

%dir %{_localstatedir}/run/spamassassin

Directory /var/run is a symlink to /run, which is a temporary file system and gets nuked on every reboot. If this directory is really required for something, it should be created using something like /usr/lib/tmpfiles.d/spamassassin.conf.

Comment 3 Kevin Fenzi 2015-05-04 00:51:54 UTC
What does: 

rpm -V spamassassin

output?

Normally you shouldn't need to run sa-update as spampd, spamassassin will use a timer unit to run the update nightly if spampd is running.

Comment 4 Bojan Smojver 2015-05-04 00:53:51 UTC
[root@beauty ~]# rpm -V spamassassin
S.5....T.  c /etc/mail/spamassassin/local.cf
missing     /var/run/spamassassin

Comment 5 Bojan Smojver 2015-05-04 00:55:18 UTC
BTW, I downloaded the package again from koji and ran rpm2cpio on it. The versions are encoded in the files themselves. Not local to my machine.

Comment 6 Bojan Smojver 2015-05-04 00:57:27 UTC
(In reply to Kevin Fenzi from comment #3)

> Normally you shouldn't need to run sa-update as spampd, spamassassin will
> use a timer unit to run the update nightly if spampd is running.

I also update my own rules. I am aware of the system wide update.

Comment 7 Kevin Fenzi 2015-05-04 00:59:07 UTC
ok. I see the issue. ;( There's a sed for the version that wasn't updated when I updated to 3.4.1.

I'll see about a fixed package tomorrow... and good catch on the run dir, will also make sure to add a tmpfiles.d for it.

Comment 8 Kevin Fenzi 2015-05-04 14:28:47 UTC
Can you try this scratch build: 

https://koji.fedoraproject.org/koji/taskinfo?taskID=9653306

This should correct the versions. 

Turns out we actually don't use the run directory, so I just dropped it.

Comment 9 Bojan Smojver 2015-05-04 21:57:33 UTC
(In reply to Kevin Fenzi from comment #8)
> Can you try this scratch build: 
> 
> https://koji.fedoraproject.org/koji/taskinfo?taskID=9653306
> 
> This should correct the versions. 

All good. Thanks.

Comment 10 Bojan Smojver 2015-05-04 22:25:34 UTC
(In reply to Kevin Fenzi from comment #8)

> Turns out we actually don't use the run directory, so I just dropped it.

I guess you can also kill:

mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/spamassassin

Comment 11 Fedora Update System 2015-05-04 22:59:39 UTC
spamassassin-3.4.1-2.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/spamassassin-3.4.1-2.fc22

Comment 12 Fedora Update System 2015-05-04 23:00:13 UTC
spamassassin-3.4.1-2.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/spamassassin-3.4.1-2.fc21

Comment 13 Fedora Update System 2015-05-08 07:30:49 UTC
Package spamassassin-3.4.1-2.fc21:
* should fix your issue,
* was pushed to the Fedora 21 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.1-2.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-7604/spamassassin-3.4.1-2.fc21
then log in and leave karma (feedback).

Comment 14 Fedora Update System 2015-05-11 19:04:07 UTC
spamassassin-3.4.1-2.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.