/[smeserver]/rpms/smeserver-clamav/sme10/smeserver-clamav-2.7.0-bz11103-improvements.patch
ViewVC logotype

Annotation of /rpms/smeserver-clamav/sme10/smeserver-clamav-2.7.0-bz11103-improvements.patch

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


Revision 1.2 - (hide annotations) (download)
Wed Jan 6 22:21:19 2021 UTC (3 years, 9 months ago) by jpp
Branch: MAIN
CVS Tags: smeserver-clamav-2_7_0-3_el7_sme
Changes since 1.1: +1 -1 lines
* Wed Jan 06 2021 Jean-Philipe Pialasse <tests@pialasse.com> 2.7.0-3.sme
- fix Transaction check error [SME: 11311]

1 jpp 1.1 diff -Nur smeserver-clamav-2.7.0.old/createlinks smeserver-clamav-2.7.0/createlinks
2     --- smeserver-clamav-2.7.0.old/createlinks 2020-12-15 10:05:24.000000000 -0500
3     +++ smeserver-clamav-2.7.0/createlinks 2021-01-02 23:22:08.027000000 -0500
4     @@ -5,7 +5,6 @@
5     my $panel = "manager";
6     panel_link("clamav", $panel);
7    
8     -my $event = "clamav-update";
9    
10     # For templates in all main events
11    
12     @@ -17,7 +16,6 @@
13     /etc/logrotate.d/freshclam
14     /usr/lib/tmpfiles.d/clamd.conf
15     /usr/lib/systemd/system/clamd.service.d/50koozali.conf
16     - /usr/lib/systemd/system/freshclam.service.d/50koozali.conf
17     ))
18     {
19     templates2events("$_",qw(
20     @@ -27,25 +25,41 @@
21     console-save
22     email-update
23     clamav-update
24     + smeserver-clamav-update
25     ));
26     }
27    
28     # For templates only in certain individual events
29    
30     # Not required now
31     -# templates2events("/etc/cron.daily/freshclam", "bootstrap-console-save");
32     +templates2events("/etc/cron.daily/freshclam", "bootstrap-console-save");
33     +templates2events("/etc/cron.d/clamav-update", "bootstrap-console-save" );
34     +
35     +my $event = "clamav-update";
36     +templates2events("/etc/crontab", $event);
37     +templates2events("/etc/systemd/system-preset/49-koozali.preset", $event );
38     +templates2events("/etc/cron.daily/freshclam", $event );
39     +templates2events("/etc/cron.d/clamav-update", $event );
40     +safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/clamd");
41    
42     -templates2events("/etc/crontab", "clamav-update");
43     -templates2events("/etc/systemd/system-preset/49-koozali.preset", "clamav-update");
44    
45     # clamav-update events
46     +my $event = "smeserver-clamav-update";
47     +templates2events("/etc/crontab", $event);
48     +templates2events("/etc/systemd/system-preset/49-koozali.preset", $event );
49     +templates2events("/etc/cron.daily/freshclam", $event );
50     +templates2events("/etc/cron.d/clamav-update", $event );
51 jpp 1.2 +
52 jpp 1.1 +safe_touch("root/etc/e-smith/templates/etc/cron.d/clamav-update");
53     event_link("systemd-default", $event, "88"); # updates all the service files etc
54     event_link("systemd-reload", $event, "89"); # systemctl daemon-reload
55     -event_link("clamav-update", $event, "99"); # Hopefully restarts clamd
56     +event_link("clamav-update", $event, "99");
57     +safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/clamd");
58     +safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/freshclam");
59    
60     # email-update events - required?
61     -#my $event = "email-update";
62     -#event_link("clamav-update", $event, "89"); # Hopefully restarts clamd
63     +$event = "email-update";
64     +safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/clamd");
65    
66     exit 0;
67    
68     diff -Nur smeserver-clamav-2.7.0.old/root/etc/e-smith/events/actions/clamav-update smeserver-clamav-2.7.0/root/etc/e-smith/events/actions/clamav-update
69     --- smeserver-clamav-2.7.0.old/root/etc/e-smith/events/actions/clamav-update 2020-12-10 06:23:56.000000000 -0500
70     +++ smeserver-clamav-2.7.0/root/etc/e-smith/events/actions/clamav-update 2021-01-02 22:52:12.066000000 -0500
71     @@ -1,2 +1,2 @@
72     #!/usr/bin/bash
73     -/usr/bin/systemctl restart clamd
74     +#keeping that to help migration from older clamd
75     diff -Nur smeserver-clamav-2.7.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/clamd.service.d/50koozali.conf/40service smeserver-clamav-2.7.0/root/etc/e-smith/templates/usr/lib/systemd/system/clamd.service.d/50koozali.conf/40service
76     --- smeserver-clamav-2.7.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/clamd.service.d/50koozali.conf/40service 2020-12-07 13:58:23.000000000 -0500
77     +++ smeserver-clamav-2.7.0/root/etc/e-smith/templates/usr/lib/systemd/system/clamd.service.d/50koozali.conf/40service 2021-01-02 22:53:53.541000000 -0500
78     @@ -1,4 +1,3 @@
79     -# MEM="`head -1 ./env/MEMLIMIT`"
80     [Service]
81     {
82     # memory limit to catch any memory leak before it kills the system
83     @@ -6,4 +5,3 @@
84     $OUT .= ($clamd{MemLimit} > "1610612736") ? $clamd{MemLimit} : "1610612736";
85     }
86    
87     -ExecStartPre=-/sbin/e-smith/expand-template /etc/clamd.d/clamd.conf
88     diff -Nur smeserver-clamav-2.7.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/clamd.service.d/50koozali.conf/80install smeserver-clamav-2.7.0/root/etc/e-smith/templates/usr/lib/systemd/system/clamd.service.d/50koozali.conf/80install
89     --- smeserver-clamav-2.7.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/clamd.service.d/50koozali.conf/80install 2020-12-04 06:36:49.000000000 -0500
90     +++ smeserver-clamav-2.7.0/root/etc/e-smith/templates/usr/lib/systemd/system/clamd.service.d/50koozali.conf/80install 1969-12-31 19:00:00.000000000 -0500
91     @@ -1,2 +0,0 @@
92     -[Install]
93     -WantedBy=sme-server.target
94     diff -Nur smeserver-clamav-2.7.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/freshclam.service.d/50koozali.conf/40service smeserver-clamav-2.7.0/root/etc/e-smith/templates/usr/lib/systemd/system/freshclam.service.d/50koozali.conf/40service
95     --- smeserver-clamav-2.7.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/freshclam.service.d/50koozali.conf/40service 2020-12-07 13:58:37.000000000 -0500
96     +++ smeserver-clamav-2.7.0/root/etc/e-smith/templates/usr/lib/systemd/system/freshclam.service.d/50koozali.conf/40service 1969-12-31 19:00:00.000000000 -0500
97     @@ -1,2 +0,0 @@
98     -[Service]
99     -ExecStartPre=-/sbin/e-smith/expand-template /etc/freshclam.conf
100     diff -Nur smeserver-clamav-2.7.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/freshclam.service.d/50koozali.conf/80install smeserver-clamav-2.7.0/root/etc/e-smith/templates/usr/lib/systemd/system/freshclam.service.d/50koozali.conf/80install
101     --- smeserver-clamav-2.7.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/freshclam.service.d/50koozali.conf/80install 2020-12-04 06:37:00.000000000 -0500
102     +++ smeserver-clamav-2.7.0/root/etc/e-smith/templates/usr/lib/systemd/system/freshclam.service.d/50koozali.conf/80install 1969-12-31 19:00:00.000000000 -0500
103     @@ -1,2 +0,0 @@
104     -[Install]
105     -WantedBy=sme-server.target
106     diff -Nur smeserver-clamav-2.7.0.old/root/etc/e-smith/templates.metadata/etc/cron.d/clamav-update smeserver-clamav-2.7.0/root/etc/e-smith/templates.metadata/etc/cron.d/clamav-update
107     --- smeserver-clamav-2.7.0.old/root/etc/e-smith/templates.metadata/etc/cron.d/clamav-update 1969-12-31 19:00:00.000000000 -0500
108     +++ smeserver-clamav-2.7.0/root/etc/e-smith/templates.metadata/etc/cron.d/clamav-update 2021-01-02 22:20:42.750000000 -0500
109     @@ -0,0 +1 @@
110     +DELETE=DELETE
111     diff -Nur smeserver-clamav-2.7.0.old/root/etc/e-smith/templates.metadata/etc/cron.daily/freshclam smeserver-clamav-2.7.0/root/etc/e-smith/templates.metadata/etc/cron.daily/freshclam
112     --- smeserver-clamav-2.7.0.old/root/etc/e-smith/templates.metadata/etc/cron.daily/freshclam 2020-12-02 11:37:01.000000000 -0500
113     +++ smeserver-clamav-2.7.0/root/etc/e-smith/templates.metadata/etc/cron.daily/freshclam 2021-01-02 22:19:58.444000000 -0500
114     @@ -1 +1 @@
115     -PERMS=0755
116     +DELETE=DELETE
117     diff -Nur smeserver-clamav-2.7.0.old/root/etc/yum/post-actions/clamd.action smeserver-clamav-2.7.0/root/etc/yum/post-actions/clamd.action
118     --- smeserver-clamav-2.7.0.old/root/etc/yum/post-actions/clamd.action 1969-12-31 19:00:00.000000000 -0500
119     +++ smeserver-clamav-2.7.0/root/etc/yum/post-actions/clamd.action 2021-01-02 22:48:10.779000000 -0500
120     @@ -0,0 +1,8 @@
121     +#action to avoid freshclam from cron
122     +clamav-update:any:/usr/bin/rm -f /etc/cron.d/clamav-update
123     +#old freshclam
124     +clam*:any:/usr/bin/rm -f /etc/cron.daily/freshclam
125     +#avoid config not needed
126     +clamav-filesystem:any:/usr/bin/rm -f /etc/clamd.d/scan.conf
127     +clam*:any:/sbin/e-smith/signal-event smeserver-clamav-update
128     +clamav-update:any:/sbin/e-smith/expand-template /etc/logrotate.d/clamav-update
129     diff -Nur smeserver-clamav-2.7.0.old/root/usr/lib/systemd/system/clamd.service smeserver-clamav-2.7.0/root/usr/lib/systemd/system/clamd.service
130     --- smeserver-clamav-2.7.0.old/root/usr/lib/systemd/system/clamd.service 2020-12-09 07:34:47.000000000 -0500
131     +++ smeserver-clamav-2.7.0/root/usr/lib/systemd/system/clamd.service 2021-01-02 22:10:07.220000000 -0500
132     @@ -1,18 +1,20 @@
133     [Unit]
134     # New service file specifically for SME
135     # Copied from clamav install file
136     -Description = clamd scanner (%i) daemon
137     +Description=clamd scanner (%i) daemon
138     Documentation=man:clamd(8) man:clamd.conf(5) https://www.clamav.net/documents/
139     -After = syslog.target nss-lookup.target network.target
140     +After=syslog.target nss-lookup.target network.target
141    
142     [Service]
143     Type = forking
144     -ExecStart = /usr/sbin/clamd -c /etc/clamd.d/clamd.conf
145     +ExecStartPre=/sbin/e-smith/service-status clamd
146     +ExecStartPre=-/sbin/e-smith/expand-template /etc/clamd.d/clamd.conf
147     +ExecStart=/usr/sbin/clamd -c /etc/clamd.d/clamd.conf
148     # Reload the database
149     ExecReload=/bin/kill -USR2 $MAINPID
150     -Restart = on-failure
151     +Restart=on-failure
152     TimeoutStartSec=420
153    
154     [Install]
155     -WantedBy = multi-user.target
156     +WantedBy=sme-server.target
157    
158     diff -Nur smeserver-clamav-2.7.0.old/root/usr/lib/systemd/system/clamd@.service.d/51koozali.conf smeserver-clamav-2.7.0/root/usr/lib/systemd/system/clamd@.service.d/51koozali.conf
159     --- smeserver-clamav-2.7.0.old/root/usr/lib/systemd/system/clamd@.service.d/51koozali.conf 1969-12-31 19:00:00.000000000 -0500
160     +++ smeserver-clamav-2.7.0/root/usr/lib/systemd/system/clamd@.service.d/51koozali.conf 2021-01-02 18:47:46.844000000 -0500
161     @@ -0,0 +1,5 @@
162     +[Service]
163     +# we do not allow mulitple instance on Koozali SME Server
164     +ExecStart=
165     +ExecStart=/bin/false
166     +
167     diff -Nur smeserver-clamav-2.7.0.old/root/usr/lib/systemd/system/freshclam.service smeserver-clamav-2.7.0/root/usr/lib/systemd/system/freshclam.service
168     --- smeserver-clamav-2.7.0.old/root/usr/lib/systemd/system/freshclam.service 2020-12-09 08:08:07.000000000 -0500
169     +++ smeserver-clamav-2.7.0/root/usr/lib/systemd/system/freshclam.service 2021-01-02 22:16:02.495000000 -0500
170     @@ -1,7 +1,4 @@
171     [Unit]
172     -# Shamelessly hacked from examples online
173     -# No idea if this is correct
174     -
175     Description=ClamAV virus database updater
176     Documentation=man:freshclam(1) man:freshclam.conf(5) https://www.clamav.net/documents
177    
178     @@ -13,9 +10,10 @@
179    
180     [Service]
181     Type=forking
182     +ExecStartPre=/sbin/e-smith/service-status freshclam
183     ExecStart=/usr/bin/freshclam -d --config-file=/etc/freshclam.conf
184     -Restart = on-failure
185     +Restart=on-failure
186     StandardOutput=syslog
187    
188     [Install]
189     -WantedBy=multi-user.target
190     +WantedBy=sme-server.target

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