/[smeserver]/rpms/smeserver-spamassassin/sme10/smeserver-spamassassin-2.7.0-bz11375-remove-spamd.patch
ViewVC logotype

Contents of /rpms/smeserver-spamassassin/sme10/smeserver-spamassassin-2.7.0-bz11375-remove-spamd.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Mon Feb 22 04:04:24 2021 UTC (3 years, 9 months ago) by jpp
Branch: MAIN
CVS Tags: smeserver-spamassassin-2_7_0-12_el7_sme, smeserver-spamassassin-2_7_0-7_el7_sme, smeserver-spamassassin-2_7_0-8_el7_sme, smeserver-spamassassin-2_7_0-9_el7_sme, smeserver-spamassassin-2_7_0-11_el7_sme, smeserver-spamassassin-2_7_0-10_el7_sme, HEAD
Error occurred while calculating annotation data.
* Sun Feb 21 2021 Jean-Philipe Pialasse <tests@pialasse.com> 2.7.0-7.sme
- remove spamd reference as service use spamassassin.service [SME: 11375]
  migrate spamd propertie SpamLearning to spamassassin
  template for /etc/sysconfig/spamassassin, revert --allow-tell option
  stop spamassassin spamd and delete /etc/systemd/system/spamassassin.service link if exists

1 diff -Nur smeserver-spamassassin-2.7.0.old/createlinks smeserver-spamassassin-2.7.0/createlinks
2 --- smeserver-spamassassin-2.7.0.old/createlinks 2021-02-21 22:06:00.033000000 -0500
3 +++ smeserver-spamassassin-2.7.0/createlinks 2021-02-21 23:01:18.362000000 -0500
4 @@ -15,6 +15,7 @@
5
6 foreach (qw(
7 /etc/mail/spamassassin/local.cf
8 + /etc/sysconfig/spamassassin
9 ))
10 {
11 templates2events("$_",qw(
12 @@ -32,10 +33,11 @@
13 event_link("systemd-default", $event, "88"); # updates all the service files etc
14 event_link("systemd-reload", $event, "89"); # systemctl daemon-reload
15 event_link("spamassassin-update", $event, "99"); # Hopefully restarts spamassassin
16 -safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/spamd");
17 +safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/spamassassin");
18 templates2events("/etc/rsyslog.conf",$event);
19 +templates2events("/etc/sysconfig/spamassassin",$event);
20 safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/rsyslog");
21
22 # email-update events required?
23 $event = "email-update";
24 -safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/spamd");
25 +safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/spamassassin");
26 diff -Nur smeserver-spamassassin-2.7.0.old/root/etc/e-smith/db/configuration/defaults/spamd/status smeserver-spamassassin-2.7.0/root/etc/e-smith/db/configuration/defaults/spamd/status
27 --- smeserver-spamassassin-2.7.0.old/root/etc/e-smith/db/configuration/defaults/spamd/status 2003-06-26 12:07:33.000000000 -0400
28 +++ smeserver-spamassassin-2.7.0/root/etc/e-smith/db/configuration/defaults/spamd/status 1969-12-31 19:00:00.000000000 -0500
29 @@ -1 +0,0 @@
30 -enabled
31 diff -Nur smeserver-spamassassin-2.7.0.old/root/etc/e-smith/db/configuration/defaults/spamd/type smeserver-spamassassin-2.7.0/root/etc/e-smith/db/configuration/defaults/spamd/type
32 --- smeserver-spamassassin-2.7.0.old/root/etc/e-smith/db/configuration/defaults/spamd/type 2003-03-14 14:26:45.000000000 -0500
33 +++ smeserver-spamassassin-2.7.0/root/etc/e-smith/db/configuration/defaults/spamd/type 1969-12-31 19:00:00.000000000 -0500
34 @@ -1 +0,0 @@
35 -service
36 diff -Nur smeserver-spamassassin-2.7.0.old/root/etc/e-smith/db/configuration/migrate/10spamassassin smeserver-spamassassin-2.7.0/root/etc/e-smith/db/configuration/migrate/10spamassassin
37 --- smeserver-spamassassin-2.7.0.old/root/etc/e-smith/db/configuration/migrate/10spamassassin 2006-03-15 19:41:02.000000000 -0500
38 +++ smeserver-spamassassin-2.7.0/root/etc/e-smith/db/configuration/migrate/10spamassassin 2021-02-21 22:57:36.008000000 -0500
39 @@ -32,4 +32,15 @@
40 $DB->set_prop('spamassassin', 'SubjectTag',
41 ($value ? 'enabled' : 'disabled'));
42 }
43 +
44 + # migrate only interesting value from spamd and delete it
45 + my $spamd = $DB->get("spamd");
46 + if ($spamd){
47 + my $SpamLearning = $DB->get_prop('spamassassin', 'SpamLearning') || "empty";
48 + if ( exists $spamd{'SpamLearning'} && ! exists $spamassassin{'SpamLearning'} ) {
49 + $DB->set_prop('spamassassin', 'SpamLearning', $spamd{'SpamLearning'});
50 + }
51 + $spamd->delete;
52 + }
53 +
54 }
55 diff -Nur smeserver-spamassassin-2.7.0.old/root/etc/e-smith/templates/etc/sysconfig/spamassassin/10options smeserver-spamassassin-2.7.0/root/etc/e-smith/templates/etc/sysconfig/spamassassin/10options
56 --- smeserver-spamassassin-2.7.0.old/root/etc/e-smith/templates/etc/sysconfig/spamassassin/10options 1969-12-31 19:00:00.000000000 -0500
57 +++ smeserver-spamassassin-2.7.0/root/etc/e-smith/templates/etc/sysconfig/spamassassin/10options 2021-02-21 22:39:49.693000000 -0500
58 @@ -0,0 +1,18 @@
59 +{
60 +
61 + # Default options to spamd
62 + #SPAMDOPTIONS="-c -m5 -H --razor-home-dir='/var/lib/razor/' --razor-log-file='sys-syslog'"
63 + # previous sme9 options
64 + # -u spamd --syslog=stderr --ipv4-only
65 + my @args = qw(-u spamd -c -m5 -H --ipv4-only --razor-home-dir='/var/lib/razor/' --razor-log-file='sys-syslog');
66 +
67 + my $bayes = $spamassassin{'UseBayes'} || '0';
68 + my $tell = $spamassassin{'SpamLearning'} || 'disabled';
69 +
70 + if ($bayes =~ m/^1|yes|on|enabled$/ && $tell =~ m/^1|yes|on|enabled$/){
71 + push @args, '--allow-tell';
72 + }
73 +
74 + $OUT .= "SPAMDOPTIONS=\"@args\"";
75 +
76 +}
77 diff -Nur smeserver-spamassassin-2.7.0.old/root/usr/lib/systemd/system/spamassassin.service.d/49koozali.conf smeserver-spamassassin-2.7.0/root/usr/lib/systemd/system/spamassassin.service.d/49koozali.conf
78 --- smeserver-spamassassin-2.7.0.old/root/usr/lib/systemd/system/spamassassin.service.d/49koozali.conf 2021-02-21 22:06:00.026000000 -0500
79 +++ smeserver-spamassassin-2.7.0/root/usr/lib/systemd/system/spamassassin.service.d/49koozali.conf 2021-02-21 23:02:46.934000000 -0500
80 @@ -1,3 +1,5 @@
81 [Service]
82 -ExecStart=
83 -ExecStart=/bin/false
84 +ExecStartPre=-/sbin/e-smith/service-status spamassassin
85 +
86 +[Install]
87 +WantedBy=sme-server.target
88 diff -Nur smeserver-spamassassin-2.7.0.old/root/usr/lib/systemd/system/spamd.service smeserver-spamassassin-2.7.0/root/usr/lib/systemd/system/spamd.service
89 --- smeserver-spamassassin-2.7.0.old/root/usr/lib/systemd/system/spamd.service 2021-02-21 22:06:00.026000000 -0500
90 +++ smeserver-spamassassin-2.7.0/root/usr/lib/systemd/system/spamd.service 1969-12-31 19:00:00.000000000 -0500
91 @@ -1,16 +0,0 @@
92 -[Unit]
93 -Description=Spamassassin daemon
94 -After=syslog.target network.target
95 -Wants=sa-update.timer
96 -
97 -[Service]
98 -EnvironmentFile=-/etc/sysconfig/spamassassin
99 -ExecStart=/usr/bin/spamd $SPAMDOPTIONS
100 -StandardOutput=null
101 -StandardError=null
102 -Restart=always
103 -
104 -[Install]
105 -WantedBy=multi-user.target sme-server.target
106 -# Create a shortcut spamassassin to spamd
107 -Alias=spamassassin.service

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed