/[smeserver]/rpms/smeserver-php/sme10/smeserver-php-3.0.0-bz11173-bz11015-logging.patch
ViewVC logotype

Contents of /rpms/smeserver-php/sme10/smeserver-php-3.0.0-bz11173-bz11015-logging.patch

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


Revision 1.2 - (show annotations) (download)
Mon Dec 7 05:02:29 2020 UTC (3 years, 11 months ago) by jpp
Branch: MAIN
CVS Tags: smeserver-php-3_0_0-18_el7_sme
Changes since 1.1: +47 -0 lines
* Mon Dec 07 2020 Jean-Philipe Pialasse <tests@pialasse.com> 3.0.0-18.sme
- fix logrotate error because parent directory has insecure permissions [SME: 11173]

1 diff -Nur smeserver-php-3.0.0.old/createlinks smeserver-php-3.0.0/createlinks
2 --- smeserver-php-3.0.0.old/createlinks 2020-11-18 21:37:29.437000000 -0500
3 +++ smeserver-php-3.0.0/createlinks 2020-11-18 21:50:34.695000000 -0500
4 @@ -20,6 +20,9 @@
5 ));
6 }
7
8 +templates2events("/etc/rsyslog.conf","smeserver-php-update");
9 +safe_symlink("restart", "root/etc/e-smith/events/smeserver-php-update/services2adjust/rsyslog");
10 +
11 #new php-fpm
12 foreach $service (qw(php-fpm)){
13 foreach $event (qw(webapps-update ibay-create ibay-delete ibay-modify ibay-modify-files ibay-modify-servers )){
14 @@ -58,8 +61,17 @@
15 safe_symlink('/etc/e-smith/templates-default/template-begin-ini', "root/etc/e-smith/templates/etc/php.ini/template-begin");
16
17 foreach $file (qw( /etc/sysconfig/php-fpm
18 - /etc/logrotate.d/php-fpm )){
19 - templates2events($file, qw(webapps-update bootstrap-console-save));
20 + /etc/logrotate.d/php-fpm
21 + /etc/logrotate.d/php55-php-fpm
22 + /etc/logrotate.d/php56-php-fpm
23 + /etc/logrotate.d/php70-php-fpm
24 + /etc/logrotate.d/php70-php-fpm
25 + /etc/logrotate.d/php71-php-fpm
26 + /etc/logrotate.d/php72-php-fpm
27 + /etc/logrotate.d/php73-php-fpm
28 + /etc/logrotate.d/php74-php-fpm
29 + )){
30 + templates2events($file, qw(webapps-update bootstrap-console-save smeserver-php-update));
31 }
32
33 #php5*
34 diff -Nur smeserver-php-3.0.0.old/root/etc/e-smith/templates/etc/rsyslog.conf/02php smeserver-php-3.0.0/root/etc/e-smith/templates/etc/rsyslog.conf/02php
35 --- smeserver-php-3.0.0.old/root/etc/e-smith/templates/etc/rsyslog.conf/02php 2020-11-18 21:37:29.333000000 -0500
36 +++ smeserver-php-3.0.0/root/etc/e-smith/templates/etc/rsyslog.conf/02php 1969-12-31 19:00:00.000000000 -0500
37 @@ -1,19 +0,0 @@
38 -#php logging
39 -
40 -:programname, isequal, "php" /var/log/php/php/error.log
41 -:programname, isequal, "php" ~
42 -:programname, startswith, "php-fpm" /var/log/php/php/php-fpm.log
43 -:programname, startswith, "php-fpm" ~
44 -:programname, startswith, "php56-fpm" /var/log/php/php56/php56-fpm.log
45 -:programname, startswith, "php56-fpm" ~
46 -:programname, startswith, "php70-fpm" /var/log/php/php70/php70-fpm.log
47 -:programname, startswith, "php70-fpm" ~
48 -:programname, startswith, "php71-fpm" /var/log/php/php71/php71-fpm.log
49 -:programname, startswith, "php71-fpm" ~
50 -:programname, startswith, "php72-fpm" /var/log/php/php72/php72-fpm.log
51 -:programname, startswith, "php72-fpm" ~
52 -:programname, startswith, "php73-fpm" /var/log/php/php73/php73-fpm.log
53 -:programname, startswith, "php73-fpm" ~
54 -:programname, startswith, "php74-fpm" /var/log/php/php74/php74-fpm.log
55 -:programname, startswith, "php74-fpm" ~
56 -
57 diff -Nur smeserver-php-3.0.0.old/root/etc/e-smith/templates/etc/rsyslog.conf/32php smeserver-php-3.0.0/root/etc/e-smith/templates/etc/rsyslog.conf/32php
58 --- smeserver-php-3.0.0.old/root/etc/e-smith/templates/etc/rsyslog.conf/32php 1969-12-31 19:00:00.000000000 -0500
59 +++ smeserver-php-3.0.0/root/etc/e-smith/templates/etc/rsyslog.conf/32php 2020-11-18 21:45:34.169000000 -0500
60 @@ -0,0 +1,19 @@
61 +#php logging
62 +
63 +:programname, isequal, "php" /var/log/php/php/error.log
64 +:programname, isequal, "php" stop
65 +:programname, startswith, "php-fpm" /var/log/php/php/php-fpm.log
66 +:programname, startswith, "php-fpm" stop
67 +:programname, startswith, "php56-fpm" /var/log/php/php56/php56-fpm.log
68 +:programname, startswith, "php56-fpm" stop
69 +:programname, startswith, "php70-fpm" /var/log/php/php70/php70-fpm.log
70 +:programname, startswith, "php70-fpm" stop
71 +:programname, startswith, "php71-fpm" /var/log/php/php71/php71-fpm.log
72 +:programname, startswith, "php71-fpm" stop
73 +:programname, startswith, "php72-fpm" /var/log/php/php72/php72-fpm.log
74 +:programname, startswith, "php72-fpm" stop
75 +:programname, startswith, "php73-fpm" /var/log/php/php73/php73-fpm.log
76 +:programname, startswith, "php73-fpm" stop
77 +:programname, startswith, "php74-fpm" /var/log/php/php74/php74-fpm.log
78 +:programname, startswith, "php74-fpm" stop
79 +
80 diff -Nur smeserver-php-3.0.0.old/root/etc/e-smith/templates/etc/logrotate.d/php-fpm/php-fpm smeserver-php-3.0.0/root/etc/e-smith/templates/etc/logrotate.d/php-fpm/php-fpm
81 --- smeserver-php-3.0.0.old/root/etc/e-smith/templates/etc/logrotate.d/php-fpm/php-fpm 2019-12-09 23:00:07.000000000 -0500
82 +++ smeserver-php-3.0.0/root/etc/e-smith/templates/etc/logrotate.d/php-fpm/php-fpm 2020-12-07 00:00:29.405000000 -0500
83 @@ -1,8 +1,14 @@
84 -/var/log/php/*/*.log \{
85 +{
86 +
87 +return "# all versions in php-fpm file" unless $PHP_VERSION ="";
88 +
89 +$OUT = "/var/log/php/*/php*fpm.log {
90 missingok
91 notifempty
92 sharedscripts
93 delaycompress
94 + su root root
95 + create 600 root root
96 postrotate
97 /sbin/e-smith/service php-fpm reload >/dev/null 2>&1 || true
98 /sbin/e-smith/service php55-php-fpm reload >/dev/null 2>&1 || true
99 @@ -13,4 +19,26 @@
100 /sbin/e-smith/service php73-php-fpm reload >/dev/null 2>&1 || true
101 /sbin/e-smith/service php74-php-fpm reload >/dev/null 2>&1 || true
102 endscript
103 -\}
104 +}
105 +
106 +/var/log/php/*/[!php]*.log {
107 + missingok
108 + notifempty
109 + sharedscripts
110 + delaycompress
111 + su www www
112 + create 600 www www
113 + postrotate
114 + /sbin/e-smith/service php-fpm reload >/dev/null 2>&1 || true
115 + /sbin/e-smith/service php55-php-fpm reload >/dev/null 2>&1 || true
116 + /sbin/e-smith/service php56-php-fpm reload >/dev/null 2>&1 || true
117 + /sbin/e-smith/service php70-php-fpm reload >/dev/null 2>&1 || true
118 + /sbin/e-smith/service php71-php-fpm reload >/dev/null 2>&1 || true
119 + /sbin/e-smith/service php72-php-fpm reload >/dev/null 2>&1 || true
120 + /sbin/e-smith/service php73-php-fpm reload >/dev/null 2>&1 || true
121 + /sbin/e-smith/service php74-php-fpm reload >/dev/null 2>&1 || true
122 + endscript
123 +}
124 +";
125 +
126 +}

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