/[smecontribs]/rpms/smeserver-nextcloud/contribs10/smeserver-nextcloud-1.2.0-bz11086-dav-externalfs.patch
ViewVC logotype

Contents of /rpms/smeserver-nextcloud/contribs10/smeserver-nextcloud-1.2.0-bz11086-dav-externalfs.patch

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


Revision 1.1 - (show annotations) (download)
Sun Jun 6 08:38:54 2021 UTC (2 years, 11 months ago) by jpp
Branch: MAIN
CVS Tags: smeserver-nextcloud-1_2_0-10_el7_sme, smeserver-nextcloud-1_2_0-9_el7_sme
* Sun Jun 06 2021 Jean-Philippe Pialasse <tests@pialasse.com> 1.2.0-9.sme
- fix dav redirections for domain use and subdir  [SME: 11086]
- refresh externalfs on loading, best for ibays
- tidying

1 diff -Nur --no-dereference smeserver-nextcloud-1.2.0.old/root/etc/e-smith/events/actions/nextcloud-conf smeserver-nextcloud-1.2.0/root/etc/e-smith/events/actions/nextcloud-conf
2 --- smeserver-nextcloud-1.2.0.old/root/etc/e-smith/events/actions/nextcloud-conf 2021-06-06 02:51:53.245000000 -0400
3 +++ smeserver-nextcloud-1.2.0/root/etc/e-smith/events/actions/nextcloud-conf 2021-06-06 02:57:14.268000000 -0400
4 @@ -8,15 +8,6 @@
5 TERM=dumb /usr/bin/OCC $params
6 }
7
8 -# check if inodb is enabled for up to SME9, if not do it.
9 -innodb=$(/sbin/e-smith/db configuration getprop mysqld InnoDB || echo "disabled")
10 -if [[ "$innodb" != "enabled" ]]; then
11 - /sbin/e-smith/db configuration setprop mysqld InnoDB enabled
12 - /sbin/e-smith/expand-template /etc/my.cnf
13 - sv t /service/mariadb
14 - sleep 8
15 -fi
16 -
17 # important configuration variables
18 password=`/sbin/e-smith/db configuration getprop nextcloud DbPassword || echo "missing"`
19 dbname=`/sbin/e-smith/db configuration getprop nextcloud DbName || echo "nextcloud"`
20 diff -Nur --no-dereference smeserver-nextcloud-1.2.0.old/root/etc/e-smith/events/actions/nextcloud-occ-conf smeserver-nextcloud-1.2.0/root/etc/e-smith/events/actions/nextcloud-occ-conf
21 --- smeserver-nextcloud-1.2.0.old/root/etc/e-smith/events/actions/nextcloud-occ-conf 2021-06-06 02:51:53.248000000 -0400
22 +++ smeserver-nextcloud-1.2.0/root/etc/e-smith/events/actions/nextcloud-occ-conf 2021-06-06 03:02:26.666000000 -0400
23 @@ -104,11 +104,12 @@
24 OCC "config:system:set trusted_domains $i --value=".$_;
25 $i++;
26 }
27 -my $CloudDomain = $cdb->get_prop('nextcloud','TrustedDomains') || '';
28 +my $CloudDomain = $cdb->get_prop('nextcloud','CloudDomain') || '';
29 OCC "config:system:set trusted_domains 99 --value=$CloudDomain" unless $CloudDomain eq "";
30
31 -# enable files_external
32 +# enable files_external and allow auto refresh
33 OCC "app:enable files_external";
34 +OCC "config:system:set filesystem_check_changes --value=1";
35
36 # set memcache
37 OCC "config:system:set memcache.local --value='\\OC\\Memcache\\APCu'";
38 diff -Nur --no-dereference smeserver-nextcloud-1.2.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98nextcloud smeserver-nextcloud-1.2.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98nextcloud
39 --- smeserver-nextcloud-1.2.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98nextcloud 2021-06-06 02:51:53.245000000 -0400
40 +++ smeserver-nextcloud-1.2.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98nextcloud 2021-06-06 04:38:05.269000000 -0400
41 @@ -2,14 +2,9 @@
42 my $access = $nextcloud{'access'} || 'private';
43 my $allow = ($access eq 'public')?'all':"$localAccess $externalSSLAccess";
44 my $authtype = $nextcloud{'Authentication'} || 'none';
45 -my $CloudDomain = $nextcloud{'CloudDomain'} || 'none';
46
47 my $alias = (($nextcloud{'AliasOnPrimary'} || 'enabled') eq 'enabled') ?
48 'Alias /nextcloud /usr/share/nextcloud' : '';
49 -$alias .= "\nAlias /.well-known/acme-challenge/ /home/e-smith/files/ibays/Primary/html/.well-known/acme-challenge/" unless $CloudDomain eq 'none';
50 -
51 -my $redirectif = "";
52 -$redirectif = 'RewriteCond "%\{HTTP_HOST\}" "!^'. (quotemeta $CloudDomain) .'" [NC]' unless $CloudDomain eq 'none';
53
54 my $maxupload = $nextcloud{'MaxUploadSize'} || '1024';
55 my $maxpost = $maxupload+1;
56 @@ -93,11 +88,6 @@
57
58 $config
59
60 -$redirectif
61 -RewriteRule /.well-known/carddav/(.+) /nextcloud/remote.php/dav/\$1 [R=301,L]
62 -$redirectif
63 -RewriteRule /.well-known/caldav/(.+) /nextcloud/remote.php/dav/\$1 [R=301,L]
64 -
65 END
66 }
67 else{
68 diff -Nur --no-dereference smeserver-nextcloud-1.2.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/28nextcloud smeserver-nextcloud-1.2.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/28nextcloud
69 --- smeserver-nextcloud-1.2.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/28nextcloud 2018-03-30 14:36:14.000000000 -0400
70 +++ smeserver-nextcloud-1.2.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/28nextcloud 2021-06-06 04:38:05.025000000 -0400
71 @@ -1,14 +1,37 @@
72 #
73 -# 40nextcloud
74 +# 28nextcloud
75 #
76 -
77 +LogLevel alert rewrite:trace6
78 {
79 + my $CloudDomain = $nextcloud{'CloudDomain'} || 'none';
80 $OUT = '';
81 if ((${'nextcloud'}{'status'} || 'disabled') eq 'enabled' ){
82
83 if (($port eq "80") && ($haveSSL eq 'yes')){
84 $OUT .= " RewriteRule ^/nextcloud(/.*|\$) https://%{HTTP_HOST}/nextcloud\$1 [L,R=301]\n";
85 }
86 + elsif ( $CloudDomain eq "none" or $CloudDomain ne $virtualHost )
87 + {
88 + $OUT .= "
89 + RewriteEngine on
90 + RewriteRule ^/\\.well-known/host-meta /nextcloud/public.php?service=host-meta [QSA,L]
91 + RewriteRule ^/\\.well-known/host-meta\.json /nextcloud/public.php?service=host-meta-json [QSA,L]
92 + RewriteRule ^/\\.well-known/webfinger /nextcloud/public.php?service=webfinger [QSA,L]
93 + RewriteRule ^/\\.well-known/carddav /nextcloud/remote.php/dav [R=301,L]
94 + RewriteRule ^/\\.well-known/caldav /nextcloud/remote.php/dav [R=301,L]
95 + RewriteRule ^/remote.php/dav /nextcloud/remote.php/dav [R=301,L]\n";
96 + }
97 + elsif ( $CloudDomain eq $virtualHost )
98 + {
99 + $OUT .= "
100 + RewriteEngine on
101 + RewriteRule ^/\\.well-known/host-meta /public.php?service=host-meta [QSA,L]
102 + RewriteRule ^/\\.well-known/host-meta\.json /public.php?service=host-meta-json [QSA,L]
103 + RewriteRule ^/\\.well-known/webfinger /public.php?service=webfinger [QSA,L]
104 + RewriteRule ^/\\.well-known/carddav /remote.php/dav [R=301,L]
105 + RewriteRule ^/\\.well-known/caldav /remote.php/dav [R=301,L]\n";
106 + }
107 +
108 }
109 }
110

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