Commit 1bb590f0 authored by Jérome Perrin's avatar Jérome Perrin

software/nextcloud: version up nextcloud 27.1.2 (and plugins)

parent a2654a47
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# not need these here). # not need these here).
[template-nextcloud-install.sh] [template-nextcloud-install.sh]
filename = nextcloud-install.sh.in filename = nextcloud-install.sh.in
md5sum = 094c26b177fdde69b41d81b89bab542b md5sum = 013dc0734073bdb913633a5303b8aec4
[template-nextcloud-config.json] [template-nextcloud-config.json]
filename = nextcloud-config.json.in filename = nextcloud-config.json.in
......
...@@ -4,7 +4,7 @@ set -e ...@@ -4,7 +4,7 @@ set -e
set -x set -x
php_cmd () { php_cmd () {
{{ parameter_dict['php-bin'] }} -c {{ parameter_dict['php-ini'] }} $@ {{ parameter_dict['php-bin'] }} --define=apc.enable_cli=1 -c {{ parameter_dict['php-ini'] }} $@
} }
status=$(php_cmd {{ parameter_dict['nextcloud'] }}/occ status | grep 'installed: true' || true) status=$(php_cmd {{ parameter_dict['nextcloud'] }}/occ status | grep 'installed: true' || true)
...@@ -52,7 +52,7 @@ cat <<EOF >> {{ parameter_dict['nextcloud'] }}/config/config.php ...@@ -52,7 +52,7 @@ cat <<EOF >> {{ parameter_dict['nextcloud'] }}/config/config.php
'mail_smtppassword' => '{{ parameter_dict["mail.smtppassword"] }}', 'mail_smtppassword' => '{{ parameter_dict["mail.smtppassword"] }}',
'activity_expire_days' => 14, 'activity_expire_days' => 14,
'auth.bruteforce.protection.enabled' => true, 'auth.bruteforce.protection.enabled' => true,
'forwarded_for_headers' => 'forwarded_for_headers' =>
array ( array (
0 => 'HTTP_X_FORWARDED', 0 => 'HTTP_X_FORWARDED',
), ),
...@@ -67,13 +67,13 @@ array ( ...@@ -67,13 +67,13 @@ array (
{% endfor -%} {% endfor -%}
), ),
{% endif -%} {% endif -%}
'blacklisted_files' => 'blacklisted_files' =>
array ( array (
0 => '.htaccess', 0 => '.htaccess',
1 => 'Thumbs.db', 1 => 'Thumbs.db',
2 => 'thumbs.db', 2 => 'thumbs.db',
), ),
'csrf.optout' => 'csrf.optout' =>
array ( array (
0 => '/^WebDAVFS/', 0 => '/^WebDAVFS/',
1 => '/^Microsoft-WebDAV-MiniRedir/', 1 => '/^Microsoft-WebDAV-MiniRedir/',
...@@ -81,7 +81,7 @@ array ( ...@@ -81,7 +81,7 @@ array (
), ),
'cron_log' => true, 'cron_log' => true,
'enable_previews' => true, 'enable_previews' => true,
'enabledPreviewProviders' => 'enabledPreviewProviders' =>
array ( array (
0 => 'OC\\Preview\\PNG', 0 => 'OC\\Preview\\PNG',
1 => 'OC\\Preview\\JPEG', 1 => 'OC\\Preview\\JPEG',
...@@ -110,7 +110,7 @@ array ( ...@@ -110,7 +110,7 @@ array (
'preview_max_x' => 1024, 'preview_max_x' => 1024,
'preview_max_y' => 768, 'preview_max_y' => 768,
'preview_max_scale_factor' => 1, 'preview_max_scale_factor' => 1,
'redis' => 'redis' =>
array ( array (
'host' => '{{ parameter_dict["redis-socket"] }}', 'host' => '{{ parameter_dict["redis-socket"] }}',
'port' => 0, 'port' => 0,
...@@ -134,7 +134,7 @@ EOF ...@@ -134,7 +134,7 @@ EOF
php_cmd {{ parameter_dict['nextcloud'] }}/occ config:app:set richdocuments wopi_url --value="{{ parameter_dict.get('collabora-url', '') }}" php_cmd {{ parameter_dict['nextcloud'] }}/occ config:app:set richdocuments wopi_url --value="{{ parameter_dict.get('collabora-url', '') }}"
php_cmd {{ parameter_dict['nextcloud'] }}/occ config:app:set spreed stun_servers --value="[\"{{ parameter_dict['stun-server'] }}\"]" php_cmd {{ parameter_dict['nextcloud'] }}/occ config:app:set spreed stun_servers --value="[\"{{ parameter_dict['stun-server'] }}\"]"
php_cmd {{ parameter_dict['nextcloud'] }}/occ config:app:set spreed turn_servers --value="[{\"server\":\"{{ parameter_dict['turn-server'] }}\",\"secret\":\"{{ parameter_dict['turn-secret'] }}\",\"protocols\":\"udp,tcp\"}]" php_cmd {{ parameter_dict['nextcloud'] }}/occ config:app:set spreed turn_servers --value="[{\"server\":\"{{ parameter_dict['turn-server'] }}\",\"secret\":\"{{ parameter_dict['turn-secret'] }}\",\"protocols\":\"udp,tcp\"}]"
sed -i 's#useCronUpdates\s*=.*#useCronUpdates = false#g' {{ parameter_dict['data-dir'] }}/news/config/config.ini php_cmd {{ parameter_dict['nextcloud'] }}/occ config:app:set news useCronUpdates --value=false
if [ -f "{{ parameter_dict['nextcloud'] }}/config/CAN_INSTALL" ]; then if [ -f "{{ parameter_dict['nextcloud'] }}/config/CAN_INSTALL" ]; then
rm {{ parameter_dict['nextcloud'] }}/config/CAN_INSTALL rm {{ parameter_dict['nextcloud'] }}/config/CAN_INSTALL
......
...@@ -9,8 +9,8 @@ recipe = slapos.recipe.build:download ...@@ -9,8 +9,8 @@ recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
[application] [application]
url = https://download.nextcloud.com/server/releases/nextcloud-16.0.3.tar.bz2 url = https://download.nextcloud.com/server/releases/nextcloud-27.1.2.tar.bz2
md5sum = d81902d2dec5d547779bec6336a438be md5sum = a23afb146993d7449b78395739f27742
[template-nextcloud-install.sh] [template-nextcloud-install.sh]
<= nc-download <= nc-download
...@@ -46,37 +46,37 @@ shared = true ...@@ -46,37 +46,37 @@ shared = true
[news-updater] [news-updater]
<= nc-download-unpacked <= nc-download-unpacked
url = https://github.com/nextcloud/news-updater/archive/10.0.1.tar.gz url = https://github.com/nextcloud/news-updater/archive/11.0.0.tar.gz
md5sum = 37387199c0482e08d01e9294cd95eaad md5sum = 1e75222638cab49d3f66b7c76394f104
[nextcloud-app-spreed] [nextcloud-app-spreed]
<= nc-download-unpacked <= nc-download-unpacked
url = https://github.com/nextcloud/spreed/releases/download/v6.0.5/spreed-6.0.5.tar.gz url = https://github.com/nextcloud-releases/spreed/releases/download/v17.1.1/spreed-v17.1.1.tar.gz
md5sum = 002c09e543edc141f6ca848782573376 md5sum = 24e6be17fb232a3c18de5e9c0a03c7c3
[nextcloud-app-richdocuments] [nextcloud-app-richdocuments]
<= nc-download-unpacked <= nc-download-unpacked
url = https://github.com/nextcloud/richdocuments/releases/download/v3.7.17/richdocuments.tar.gz url = https://github.com/nextcloud/richdocuments/releases/download/v8.2.0/richdocuments.tar.gz
md5sum = 5559cd14a4a0a93d2a39b260538839f8 md5sum = 1e9176b0f08670996488572aea081996
[nextcloud-app-calendar] [nextcloud-app-calendar]
<= nc-download-unpacked <= nc-download-unpacked
url = https://github.com/nextcloud/calendar/releases/download/v1.7.3/calendar.tar.gz url = https://github.com/nextcloud-releases/calendar/releases/download/v4.5.2/calendar-v4.5.2.tar.gz
md5sum = ab398d943eb6939e3e71df5b1a1abf87 md5sum = 88adcbc34ef7e461f515ba96b82365d9
[nextcloud-app-rainloop] [nextcloud-app-snappymail]
<= nc-download-unpacked <= nc-download-unpacked
url = https://github.com/pierre-alain-b/rainloop-nextcloud/releases/download/6.1.4/rainloop.tar.gz url = https://snappymail.eu/repository/nextcloud/snappymail-2.29.1-nextcloud.tar.gz
md5sum = 7cefc3dd3bd52b42d381de7d7447691f md5sum = b7500ea4e089d8a9e3fa381d6df3a3b0
[nextcloud-app-news] [nextcloud-app-news]
<= nc-download-unpacked <= nc-download-unpacked
url = https://github.com/nextcloud/news/releases/download/14.2.2/news.tar.gz url = https://github.com/nextcloud/news/releases/download/24.0.0/news.tar.gz
md5sum = f48d4b5dcbc078131bb86a4ae619da99 md5sum = 8e1a7e3e49e6dbd754bc1b9ff2f85371
[nextcloud-apps] [nextcloud-apps]
spreed = ${nextcloud-app-spreed:location} spreed = ${nextcloud-app-spreed:location}
richdocuments = ${nextcloud-app-richdocuments:location} richdocuments = ${nextcloud-app-richdocuments:location}
calendar = ${nextcloud-app-calendar:location} calendar = ${nextcloud-app-calendar:location}
rainloop = ${nextcloud-app-rainloop:location} snappymail = ${nextcloud-app-snappymail:location}
news = ${nextcloud-app-news:location} news = ${nextcloud-app-news:location}
...@@ -227,6 +227,7 @@ class TestServices(NextCloudTestCase): ...@@ -227,6 +227,7 @@ class TestServices(NextCloudTestCase):
php_bin = os.path.join(self.partition_dir, 'bin/php') php_bin = os.path.join(self.partition_dir, 'bin/php')
nextcloud_status = subprocess.check_output([ nextcloud_status = subprocess.check_output([
php_bin, php_bin,
'--define=apc.enable_cli=1',
os.path.join(self.nextcloud_path, 'occ'), os.path.join(self.nextcloud_path, 'occ'),
'status', 'status',
'--output', '--output',
...@@ -257,6 +258,7 @@ class TestServices(NextCloudTestCase): ...@@ -257,6 +258,7 @@ class TestServices(NextCloudTestCase):
self.assertEqual(config_dict, expected_dict) self.assertEqual(config_dict, expected_dict)
collabora_config = subprocess.check_output([ collabora_config = subprocess.check_output([
php_bin, php_bin,
'--define=apc.enable_cli=1',
occ, occ,
"config:app:get", "config:app:get",
"richdocuments", "richdocuments",
...@@ -265,6 +267,7 @@ class TestServices(NextCloudTestCase): ...@@ -265,6 +267,7 @@ class TestServices(NextCloudTestCase):
self.assertEqual(collabora_config.strip(), b'https://collabora.host.vifib.net/') self.assertEqual(collabora_config.strip(), b'https://collabora.host.vifib.net/')
stun_config = subprocess.check_output([ stun_config = subprocess.check_output([
php_bin, php_bin,
'--define=apc.enable_cli=1',
occ, occ,
"config:app:get", "config:app:get",
"spreed", "spreed",
...@@ -273,16 +276,23 @@ class TestServices(NextCloudTestCase): ...@@ -273,16 +276,23 @@ class TestServices(NextCloudTestCase):
self.assertEqual(stun_config.strip(), b'["turn.vifib.com:5349"]') self.assertEqual(stun_config.strip(), b'["turn.vifib.com:5349"]')
turn_config = subprocess.check_output([ turn_config = subprocess.check_output([
php_bin, php_bin,
'--define=apc.enable_cli=1',
occ, occ,
"config:app:get", "config:app:get",
"spreed", "spreed",
"turn_servers" "turn_servers"
]) ])
self.assertEqual(turn_config.strip(), b'[{"server":"","secret":"","protocols":"udp,tcp"}]') self.assertEqual(turn_config.strip(), b'[{"server":"","secret":"","protocols":"udp,tcp"}]')
news_config_file = os.path.join(self.partition_dir, 'srv/data/news/config/config.ini')
with open(news_config_file) as f: news_config = subprocess.check_output([
config = f.read() php_bin,
self.assertRegex(config, r"(useCronUpdates\s+=\s+false)") '--define=apc.enable_cli=1',
occ,
"config:app:get",
"news",
"useCronUpdates"
])
self.assertEqual(news_config.strip(), b'false')
class TestNextCloudParameters(NextCloudTestCase): class TestNextCloudParameters(NextCloudTestCase):
...@@ -354,6 +364,7 @@ class TestNextCloudParameters(NextCloudTestCase): ...@@ -354,6 +364,7 @@ class TestNextCloudParameters(NextCloudTestCase):
self.assertEqual(config_dict, expected_dict) self.assertEqual(config_dict, expected_dict)
collabora_config = subprocess.check_output([ collabora_config = subprocess.check_output([
php_bin, php_bin,
'--define=apc.enable_cli=1',
occ, occ,
"config:app:get", "config:app:get",
"richdocuments", "richdocuments",
...@@ -362,6 +373,7 @@ class TestNextCloudParameters(NextCloudTestCase): ...@@ -362,6 +373,7 @@ class TestNextCloudParameters(NextCloudTestCase):
self.assertEqual(collabora_config.strip(), b'https://my-custom.collabora.net') self.assertEqual(collabora_config.strip(), b'https://my-custom.collabora.net')
stun_config = subprocess.check_output([ stun_config = subprocess.check_output([
php_bin, php_bin,
'--define=apc.enable_cli=1',
occ, occ,
"config:app:get", "config:app:get",
"spreed", "spreed",
...@@ -370,6 +382,7 @@ class TestNextCloudParameters(NextCloudTestCase): ...@@ -370,6 +382,7 @@ class TestNextCloudParameters(NextCloudTestCase):
self.assertEqual(stun_config.strip(), b'["stun.example.net:5439"]') self.assertEqual(stun_config.strip(), b'["stun.example.net:5439"]')
turn_config = subprocess.check_output([ turn_config = subprocess.check_output([
php_bin, php_bin,
'--define=apc.enable_cli=1',
occ, occ,
"config:app:get", "config:app:get",
"spreed", "spreed",
......
...@@ -30,7 +30,7 @@ md5sum = e49410f0a4bf28993a56bb28aff0a6f0 ...@@ -30,7 +30,7 @@ md5sum = e49410f0a4bf28993a56bb28aff0a6f0
[template-php.ini] [template-php.ini]
filename = php.ini.in filename = php.ini.in
md5sum = 980f603c34fcb008ce73a9dde2dbceb3 md5sum = e2bef45e25cd355659d9daec196845e2
[template-apache-httpd] [template-apache-httpd]
filename = apache-httpd.conf.in filename = apache-httpd.conf.in
......
...@@ -34,6 +34,7 @@ extension=redis ...@@ -34,6 +34,7 @@ extension=redis
extension=imagick extension=imagick
apc.enabled=1 apc.enabled=1
apc.enable_cli=1
apc.file_update_protection=2 apc.file_update_protection=2
apc.optimization=0 apc.optimization=0
apc.shm_size=256M apc.shm_size=256M
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment