/[smeserver]/rpms/smeserver-dovecot/sme10/smeserver-dovecot-1.6.0-bz11101-systemd.patch
ViewVC logotype

Annotation of /rpms/smeserver-dovecot/sme10/smeserver-dovecot-1.6.0-bz11101-systemd.patch

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


Revision 1.5 - (hide annotations) (download)
Tue Mar 16 20:34:59 2021 UTC (3 years, 7 months ago) by jpp
Branch: MAIN
CVS Tags: smeserver-dovecot-1_6_0-21_el7_sme, smeserver-dovecot-1_6_0-18_el7_sme, smeserver-dovecot-1_6_0-20_el7_sme, smeserver-dovecot-1_6_0-19_el7_sme, HEAD
Changes since 1.4: +1 -1 lines
* Tue Mar 16 2021 Jean-Philippe Pialasse <tests@pialasse.com> 1.6.0-18.sme
- clean rsyslog syntax for dovecot [SME: 11422]

1 jpp 1.1 diff -Nur smeserver-dovecot-1.6.0.old/createlinks smeserver-dovecot-1.6.0/createlinks
2     --- smeserver-dovecot-1.6.0.old/createlinks 2020-12-06 23:25:22.439000000 -0500
3     +++ smeserver-dovecot-1.6.0/createlinks 2020-12-07 01:08:10.627000000 -0500
4     @@ -2,28 +2,25 @@
5    
6     use esmith::Build::CreateLinks qw(:all);
7    
8     -service_link_enhanced("dovecot", "S65", "7");
9     -service_link_enhanced("dovecot", "K35", "6");
10     -service_link_enhanced("dovecot", "K35", "0");
11     -service_link_enhanced("dovecot", "K35", "1");
12    
13     templates2events("/etc/dovecot/dovecot.conf", qw(email-update bootstrap-console-save ssl-update smeserver-dovecot-update ip-change));
14     templates2events("/etc/dovecot/master.users", qw(email-update bootstrap-console-save smeserver-dovecot-update));
15     templates2events("/etc/pam.d/dovecotadmin", qw(email-update bootstrap-console-save smeserver-dovecot-update));
16    
17     -safe_touch("root/var/service/dovecot/down");
18     -safe_symlink("../daemontools" , 'root/etc/rc.d/init.d/supervise/dovecot');
19     -safe_symlink("/var/service/dovecot" , 'root/service/dovecot');
20     safe_symlink("sigusr2", "root/etc/e-smith/events/email-update/services2adjust/dovecot");
21     -# Create a symlink for /service/imap so pop3s still find the imapd.pem file
22     -safe_symlink("/var/service/dovecot", "root/service/imap");
23    
24     event_link("adjust-dovecot", "email-update", "02");
25     event_link("adjust-dovecot", "bootstrap-console-save", "02");
26    
27     #smeserver-dovecot-update
28     safe_symlink("restart", "root/etc/e-smith/events/smeserver-dovecot-update/services2adjust/dovecot");
29     +safe_symlink("restart", "root/etc/e-smith/events/smeserver-dovecot-update/services2adjust/rsyslog");
30     event_link("adjust-dovecot", "smeserver-dovecot-update", "02");
31 jpp 1.3 +event_link("systemd-reload", "smeserver-dovecot-update", "89");
32     +event_link("systemd-default", "smeserver-dovecot-update", "88");
33     +templates2events("/etc/rsyslog.conf","smeserver-dovecot-update");
34     +templates2events("/usr/lib/systemd/system/dovecot.service.d/50koozali.conf", qw(bootstrap-console-save console-save post-install post-upgrade smeserver-dovecot-update ));
35 jpp 1.1 +
36    
37     # in case the ip change
38     safe_symlink("sigusr2", "root/etc/e-smith/events/ip-change/services2adjust/dovecot");
39     diff -Nur smeserver-dovecot-1.6.0.old/root/etc/e-smith/templates/etc/dovecot/dovecot.conf/20log smeserver-dovecot-1.6.0/root/etc/e-smith/templates/etc/dovecot/dovecot.conf/20log
40     --- smeserver-dovecot-1.6.0.old/root/etc/e-smith/templates/etc/dovecot/dovecot.conf/20log 2013-02-26 12:57:10.000000000 -0500
41     +++ smeserver-dovecot-1.6.0/root/etc/e-smith/templates/etc/dovecot/dovecot.conf/20log 2020-12-07 01:02:18.003000000 -0500
42     @@ -1,3 +1,4 @@
43     -log_path = /dev/stderr
44     -log_timestamp = ""
45     +log_path = syslog
46     +# we choose same as rsyslog for SME "%b %e %H:%M:%S " and not "%b %d %H:%M:%S "
47     +log_timestamp = "%b %e %H:%M:%S "
48     auth_verbose = yes
49     diff -Nur smeserver-dovecot-1.6.0.old/root/etc/e-smith/templates/etc/dovecot/dovecot.conf/35ssl smeserver-dovecot-1.6.0/root/etc/e-smith/templates/etc/dovecot/dovecot.conf/35ssl
50     --- smeserver-dovecot-1.6.0.old/root/etc/e-smith/templates/etc/dovecot/dovecot.conf/35ssl 2020-12-06 23:25:22.432000000 -0500
51     +++ smeserver-dovecot-1.6.0/root/etc/e-smith/templates/etc/dovecot/dovecot.conf/35ssl 2020-12-07 00:28:39.035000000 -0500
52     @@ -1,6 +1,6 @@
53     ssl = {$OUT .= ( (($imaps{'status'} || 'enabled') eq 'enabled') || (($pops{'status'} || 'enabled') eq 'enabled') ) ? 'yes':'no';}
54     -ssl_cert = </var/service/dovecot/ssl/imapd.pem
55     -ssl_key = </var/service/dovecot/ssl/imapd.pem
56     +ssl_cert = </etc/dovecot/ssl/imapd.pem
57     +ssl_key = </etc/dovecot/ssl/imapd.pem
58     {
59    
60     my $proto = '';
61     diff -Nur smeserver-dovecot-1.6.0.old/root/etc/e-smith/templates/etc/rsyslog.conf/32dovecot smeserver-dovecot-1.6.0/root/etc/e-smith/templates/etc/rsyslog.conf/32dovecot
62     --- smeserver-dovecot-1.6.0.old/root/etc/e-smith/templates/etc/rsyslog.conf/32dovecot 1969-12-31 19:00:00.000000000 -0500
63     +++ smeserver-dovecot-1.6.0/root/etc/e-smith/templates/etc/rsyslog.conf/32dovecot 2020-12-07 01:05:21.279000000 -0500
64     @@ -0,0 +1,6 @@
65     +
66     +#dovecot
67     +:programname, isequal, "dovecot" /var/log/dovecot/dovecot.log
68 jpp 1.5 +& stop
69 jpp 1.1 +
70     +
71     diff -Nur smeserver-dovecot-1.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/dovecot.service.d/50koozali.conf/40service smeserver-dovecot-1.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/dovecot.service.d/50koozali.conf/40service
72     --- smeserver-dovecot-1.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/dovecot.service.d/50koozali.conf/40service 1969-12-31 19:00:00.000000000 -0500
73     +++ smeserver-dovecot-1.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/dovecot.service.d/50koozali.conf/40service 2020-12-03 23:24:00.397227278 -0500
74 jpp 1.4 @@ -0,0 +1,10 @@
75 jpp 1.1 +[Service]
76     +#first we reset the ExecStartPre
77     +ExecStartPre=
78     +#our needs
79     +ExecStartPre=-/sbin/e-smith/service-status dovecot
80     +ExecStartPre=-/sbin/e-smith/expand-template /etc/dovecot/dovecot.conf
81     +ExecStartPre=-/sbin/e-smith/expand-template /etc/dovecot/master.users
82     +ExecStartPre=-/sbin/e-smith/systemd/dovecot-control
83     +ExecStartPre=-/usr/sbin/portrelease dovecot
84 jpp 1.4 +Restart=always
85 jpp 1.1 diff -Nur smeserver-dovecot-1.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/dovecot.service.d/50koozali.conf/80install smeserver-dovecot-1.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/dovecot.service.d/50koozali.conf/80install
86     --- smeserver-dovecot-1.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/dovecot.service.d/50koozali.conf/80install 1969-12-31 19:00:00.000000000 -0500
87     +++ smeserver-dovecot-1.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/dovecot.service.d/50koozali.conf/80install 2020-12-03 23:18:07.193615380 -0500
88     @@ -0,0 +1,2 @@
89     +[Install]
90     +WantedBy=sme-server.target
91     diff -Nur smeserver-dovecot-1.6.0.old/root/etc/logrotate.d/dovecot smeserver-dovecot-1.6.0/root/etc/logrotate.d/dovecot
92     --- smeserver-dovecot-1.6.0.old/root/etc/logrotate.d/dovecot 1969-12-31 19:00:00.000000000 -0500
93     +++ smeserver-dovecot-1.6.0/root/etc/logrotate.d/dovecot 2020-12-07 01:03:16.023000000 -0500
94     @@ -0,0 +1,18 @@
95     +/var/log/dovecot/dovecot.log {
96     + weekly
97     + rotate 4
98     + missingok
99     + notifempty
100     + compress
101     + delaycompress
102     + sharedscripts
103     + su root root
104     + create 600 root root
105     + postrotate
106     + #/usr/bin/systemctl reload-or-try-restart dovecot
107     + # kill -s USR2 `cat /var/run/dovecot/master.pid`
108     + doveadm log reopen
109     + # in case of issues with SELinux
110     + # kill -s 0 `cat /var/run/dovecot/master.pid` || kill -s USR1 `cat /var/run/dovecot/master.pid`
111     + endscript
112     +}
113     diff -Nur smeserver-dovecot-1.6.0.old/root/sbin/e-smith/systemd/dovecot-control smeserver-dovecot-1.6.0/root/sbin/e-smith/systemd/dovecot-control
114     --- smeserver-dovecot-1.6.0.old/root/sbin/e-smith/systemd/dovecot-control 1969-12-31 19:00:00.000000000 -0500
115     +++ smeserver-dovecot-1.6.0/root/sbin/e-smith/systemd/dovecot-control 2020-12-06 23:34:00.603000000 -0500
116     @@ -0,0 +1,41 @@
117     +#!/usr/bin/perl -w
118     +
119     +#----------------------------------------------------------------------
120     +# copyright (C) 2011 Firewall-Services
121     +# daniel@firewall-services.com
122     +#
123     +# This program is free software; you can redistribute it and/or modify
124     +# it under the terms of the GNU General Public License as published by
125     +# the Free Software Foundation; either version 2 of the License, or
126     +# (at your option) any later version.
127     +#
128     +# This program is distributed in the hope that it will be useful,
129     +# but WITHOUT ANY WARRANTY; without even the implied warranty of
130     +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
131     +# GNU General Public License for more details.
132     +#
133     +# You should have received a copy of the GNU General Public License
134     +# along with this program; if not, write to the Free Software
135     +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
136     +#
137     +#----------------------------------------------------------------------
138     +
139     +
140     +use esmith::util;
141     +use esmith::ConfigDB;
142     +use File::Copy;
143     +
144     +my $c = esmith::ConfigDB->open_ro;
145     +my $s = $c->get('SystemName')->value;
146     +my $d = $c->get('DomainName')->value;
147     +
148     +my $pem = "/etc/dovecot/ssl/imapd.pem";
149     +# Now copy system pem file into jail used by ldap
150     +copy("/home/e-smith/ssl.pem/$s.$d.pem", "$pem.$$")
151     + or die "failed to copy SSL PEM: $!";
152     +chmod 0440, "$pem.$$";
153     +esmith::util::chownFile("root", "stunnel", "$pem.$$");
154     +rename("$pem.$$", "$pem")
155     + or die "failed to rename $pem.$$ to $pem: $!";
156     +
157     +
158     diff -Nur smeserver-dovecot-1.6.0.old/root/var/service/dovecot/control/1 smeserver-dovecot-1.6.0/root/var/service/dovecot/control/1
159     --- smeserver-dovecot-1.6.0.old/root/var/service/dovecot/control/1 2016-02-05 18:43:48.000000000 -0500
160     +++ smeserver-dovecot-1.6.0/root/var/service/dovecot/control/1 1969-12-31 19:00:00.000000000 -0500
161     @@ -1,41 +0,0 @@
162     -#!/usr/bin/perl -w
163     -
164     -#----------------------------------------------------------------------
165     -# copyright (C) 2011 Firewall-Services
166     -# daniel@firewall-services.com
167     -#
168     -# This program is free software; you can redistribute it and/or modify
169     -# it under the terms of the GNU General Public License as published by
170     -# the Free Software Foundation; either version 2 of the License, or
171     -# (at your option) any later version.
172     -#
173     -# This program is distributed in the hope that it will be useful,
174     -# but WITHOUT ANY WARRANTY; without even the implied warranty of
175     -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
176     -# GNU General Public License for more details.
177     -#
178     -# You should have received a copy of the GNU General Public License
179     -# along with this program; if not, write to the Free Software
180     -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
181     -#
182     -#----------------------------------------------------------------------
183     -
184     -
185     -use esmith::util;
186     -use esmith::ConfigDB;
187     -use File::Copy;
188     -
189     -my $c = esmith::ConfigDB->open_ro;
190     -my $s = $c->get('SystemName')->value;
191     -my $d = $c->get('DomainName')->value;
192     -
193     -my $pem = "./ssl/imapd.pem";
194     -# Now copy system pem file into jail used by ldap
195     -copy("/home/e-smith/ssl.pem/$s.$d.pem", "$pem.$$")
196     - or die "failed to copy SSL PEM: $!";
197     -chmod 0440, "$pem.$$";
198     -esmith::util::chownFile("root", "stunnel", "$pem.$$");
199     -rename("$pem.$$", "$pem")
200     - or die "failed to rename $pem.$$ to $pem: $!";
201     -
202     -
203     diff -Nur smeserver-dovecot-1.6.0.old/root/var/service/dovecot/log/run smeserver-dovecot-1.6.0/root/var/service/dovecot/log/run
204     --- smeserver-dovecot-1.6.0.old/root/var/service/dovecot/log/run 2013-02-26 12:57:10.000000000 -0500
205     +++ smeserver-dovecot-1.6.0/root/var/service/dovecot/log/run 1969-12-31 19:00:00.000000000 -0500
206     @@ -1,10 +0,0 @@
207     -#!/bin/sh
208     -
209     -NUM=$(/sbin/e-smith/db configuration getprop dovecot KeepLogFiles)
210     -
211     -exec \
212     - /usr/local/bin/setuidgid smelog \
213     - /usr/local/bin/multilog t s5000000 \
214     - n${NUM:-10} \
215     - /var/log/dovecot/
216     -
217     diff -Nur smeserver-dovecot-1.6.0.old/root/var/service/dovecot/run smeserver-dovecot-1.6.0/root/var/service/dovecot/run
218     --- smeserver-dovecot-1.6.0.old/root/var/service/dovecot/run 2013-02-26 12:57:10.000000000 -0500
219     +++ smeserver-dovecot-1.6.0/root/var/service/dovecot/run 1969-12-31 19:00:00.000000000 -0500
220     @@ -1,6 +0,0 @@
221     -#!/bin/sh
222     -
223     -exec 2>&1
224     -./control/1
225     -exec /usr/sbin/dovecot -F
226     -

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