/[smecontribs]/rpms/smeserver-geneweb/contribs10/smeserver-geneweb-2.3.0-TcpPort.patch
ViewVC logotype

Contents of /rpms/smeserver-geneweb/contribs10/smeserver-geneweb-2.3.0-TcpPort.patch

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


Revision 1.1 - (show annotations) (download)
Tue Mar 23 19:13:57 2021 UTC (3 years, 7 months ago) by michel
Branch: MAIN
CVS Tags: smeserver-geneweb-2_3_0-4_el7_sme, smeserver-geneweb-2_3_0-3_el7_sme, smeserver-geneweb-2_3_0-6_el7_sme, smeserver-geneweb-2_3_0-5_el7_sme, smeserver-geneweb-2_3_0-9_el7_sme, smeserver-geneweb-2_3_0-8_el7_sme, smeserver-geneweb-2_3_0-7_el7_sme, HEAD
* Tue Mar 23 2021 Michel Begue <mab974@gmail.com> 2.3.0-3.sme
- change TCPPort attributes to avoid filtering effect [SME: 10930]
- move changelog to the bottom of spec
- readd changelog from contribs9

1 diff -urN smeserver-geneweb-2.3.0.old/root/etc/e-smith/db/accounts/defaults/geneweb/type smeserver-geneweb-2.3.0/root/etc/e-smith/db/accounts/defaults/geneweb/type
2 --- smeserver-geneweb-2.3.0.old/root/etc/e-smith/db/accounts/defaults/geneweb/type 1970-01-01 04:00:00.000000000 +0400
3 +++ smeserver-geneweb-2.3.0/root/etc/e-smith/db/accounts/defaults/geneweb/type 2021-03-20 16:06:34.138000000 +0400
4 @@ -0,0 +1 @@
5 +reserved
6 diff -urN smeserver-geneweb-2.3.0.old/root/etc/e-smith/db/accounts/defaults/gwsetup/type smeserver-geneweb-2.3.0/root/etc/e-smith/db/accounts/defaults/gwsetup/type
7 --- smeserver-geneweb-2.3.0.old/root/etc/e-smith/db/accounts/defaults/gwsetup/type 1970-01-01 04:00:00.000000000 +0400
8 +++ smeserver-geneweb-2.3.0/root/etc/e-smith/db/accounts/defaults/gwsetup/type 2021-03-20 16:06:43.313000000 +0400
9 @@ -0,0 +1 @@
10 +reserved
11 diff -urN smeserver-geneweb-2.3.0.old/root/etc/e-smith/db/configuration/defaults/geneweb/TcpPort smeserver-geneweb-2.3.0/root/etc/e-smith/db/configuration/defaults/geneweb/TcpPort
12 --- smeserver-geneweb-2.3.0.old/root/etc/e-smith/db/configuration/defaults/geneweb/TcpPort 1970-01-01 04:00:00.000000000 +0400
13 +++ smeserver-geneweb-2.3.0/root/etc/e-smith/db/configuration/defaults/geneweb/TcpPort 2020-11-05 20:15:06.000000000 +0400
14 @@ -0,0 +1 @@
15 +2317
16 diff -urN smeserver-geneweb-2.3.0.old/root/etc/e-smith/db/configuration/defaults/geneweb/TCPPort smeserver-geneweb-2.3.0/root/etc/e-smith/db/configuration/defaults/geneweb/TCPPort
17 --- smeserver-geneweb-2.3.0.old/root/etc/e-smith/db/configuration/defaults/geneweb/TCPPort 2020-11-05 20:15:06.000000000 +0400
18 +++ smeserver-geneweb-2.3.0/root/etc/e-smith/db/configuration/defaults/geneweb/TCPPort 1970-01-01 04:00:00.000000000 +0400
19 @@ -1 +0,0 @@
20 -2317
21 diff -urN smeserver-geneweb-2.3.0.old/root/etc/e-smith/db/configuration/defaults/gwsetup/TcpPort smeserver-geneweb-2.3.0/root/etc/e-smith/db/configuration/defaults/gwsetup/TcpPort
22 --- smeserver-geneweb-2.3.0.old/root/etc/e-smith/db/configuration/defaults/gwsetup/TcpPort 1970-01-01 04:00:00.000000000 +0400
23 +++ smeserver-geneweb-2.3.0/root/etc/e-smith/db/configuration/defaults/gwsetup/TcpPort 2020-11-05 20:15:06.000000000 +0400
24 @@ -0,0 +1 @@
25 +2316
26 diff -urN smeserver-geneweb-2.3.0.old/root/etc/e-smith/db/configuration/defaults/gwsetup/TCPPort smeserver-geneweb-2.3.0/root/etc/e-smith/db/configuration/defaults/gwsetup/TCPPort
27 --- smeserver-geneweb-2.3.0.old/root/etc/e-smith/db/configuration/defaults/gwsetup/TCPPort 2020-11-05 20:15:06.000000000 +0400
28 +++ smeserver-geneweb-2.3.0/root/etc/e-smith/db/configuration/defaults/gwsetup/TCPPort 1970-01-01 04:00:00.000000000 +0400
29 @@ -1 +0,0 @@
30 -2316
31 diff -urN smeserver-geneweb-2.3.0.old/root/etc/e-smith/db/configuration/migrate/20geneweb smeserver-geneweb-2.3.0/root/etc/e-smith/db/configuration/migrate/20geneweb
32 --- smeserver-geneweb-2.3.0.old/root/etc/e-smith/db/configuration/migrate/20geneweb 2020-11-05 20:15:06.000000000 +0400
33 +++ smeserver-geneweb-2.3.0/root/etc/e-smith/db/configuration/migrate/20geneweb 2021-03-20 18:56:08.486000000 +0400
34 @@ -15,6 +15,11 @@
35 $rec->set_prop('domain', $service . '.' .
36 ($DB->get('DomainName')->value() || ''));
37 }
38 + # change TCPPort attributes to TcpPort
39 + if ( $rec->prop('TCPPort') ) {
40 + $rec->set_prop('TcpPort', ($DB->get('TCPPort')->value() || ''));
41 + $DB->delete_prop($service,'TCPPort');
42 + }
43 }
44 }
45
46 diff -urN smeserver-geneweb-2.3.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/28gwd_gwsProxyPass smeserver-geneweb-2.3.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/28gwd_gwsProxyPass
47 --- smeserver-geneweb-2.3.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/28gwd_gwsProxyPass 2021-03-13 21:28:10.000000000 +0400
48 +++ smeserver-geneweb-2.3.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/28gwd_gwsProxyPass 2021-03-20 15:50:27.293000000 +0400
49 @@ -1,6 +1,7 @@
50 {
51 # vim: ft=perl:
52 # proxypass for geneweb and gwsetup
53 +# difference TCPPort & TcpPort (masq!)
54
55 $haveSSL = (exists ${modSSL}{status} and ${modSSL}{status} eq "enabled") ? 'yes' : 'no';
56 $plainPort = ${'httpd-e-smith'}{TCPPort} || '80';
57 @@ -17,8 +18,8 @@
58
59 $OUT .= " ProxyRequests Off\n";
60 $OUT .= " ProxyPreserveHost On\n";
61 - $OUT .= " ProxyPass /$place http://127.0.0.1:${$place}{TCPPort} KeepAlive=On\n";
62 - $OUT .= " ProxyPassReverse /$place http://127.0.0.1:${$place}{TCPPort}\n";
63 + $OUT .= " ProxyPass /$place http://127.0.0.1:${$place}{TcpPort} KeepAlive=On\n";
64 + $OUT .= " ProxyPassReverse /$place http://127.0.0.1:${$place}{TcpPort}\n";
65 $OUT .= " RequestHeader set X-Forwarded-Proto 'http'\n";
66
67 $OUT .= " <Proxy '/$place'>\n";
68 diff -urN smeserver-geneweb-2.3.0.old/root/etc/e-smith/templates/etc/rc.d/init.d/masq/91Geneweb smeserver-geneweb-2.3.0/root/etc/e-smith/templates/etc/rc.d/init.d/masq/91Geneweb
69 --- smeserver-geneweb-2.3.0.old/root/etc/e-smith/templates/etc/rc.d/init.d/masq/91Geneweb 1970-01-01 04:00:00.000000000 +0400
70 +++ smeserver-geneweb-2.3.0/root/etc/e-smith/templates/etc/rc.d/init.d/masq/91Geneweb 2021-03-21 23:05:41.916000000 +0400
71 @@ -0,0 +1,22 @@
72 +{
73 + # geneweb port access only from localhost
74 + my $gwd_status = ${'geneweb'}{'status'} || "disabled";
75 + my $gwd_port = ${'geneweb'}{'TcpPort'} || '';
76 + if ($gwd_status eq 'enabled') {
77 + $OUT .= " # Geneweb enabled\n";
78 + $OUT .= " /sbin/iptables -I INPUT -p tcp ! -s 127.0.0.1 --dport $gwd_port --jump DROP \n";
79 + } else {
80 + $OUT .= " # Geneweb disabled\n";
81 + }
82 +
83 + # gwsetup port access only from localhost
84 + my $gws_status = ${'gwsetup'}{'status'} || "disabled";
85 + my $gws_port = ${'gwsetup'}{'TcpPort'} || '';
86 + if ($gws_status eq 'enabled') {
87 + $OUT .= " # gwsetup enabled\n";
88 + $OUT .= " /sbin/iptables -I INPUT -p tcp ! -s 127.0.0.1 --dport $gws_port --jump DROP \n";
89 + } else {
90 + $OUT .= " # gwsetup disabled\n";
91 + }
92 +}
93 +
94 diff -urN smeserver-geneweb-2.3.0.old/root/usr/lib/systemd/systemd-gwsetup smeserver-geneweb-2.3.0/root/usr/lib/systemd/systemd-gwsetup
95 --- smeserver-geneweb-2.3.0.old/root/usr/lib/systemd/systemd-gwsetup 2021-03-14 22:35:28.000000000 +0400
96 +++ smeserver-geneweb-2.3.0/root/usr/lib/systemd/systemd-gwsetup 2021-03-20 15:48:55.051000000 +0400
97 @@ -6,7 +6,7 @@
98
99 GWLANG=$(/sbin/e-smith/db configuration getprop sysconfig Language | sed -e 's/_.*$//')
100 BD=$(/sbin/e-smith/db configuration getprop geneweb DBDir || echo "/opt/geneweb/bases")
101 -TcpPort=$(/sbin/e-smith/db configuration getprop gwsetup TCPPort)
102 +TcpPort=$(/sbin/e-smith/db configuration getprop gwsetup TcpPort)
103
104 HD="/opt/geneweb/gw/gw"
105 BIN=$HD/gwsetup

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