diff options
author | Leonardo Arena <rnalrd@alpinelinux.org> | 2018-12-13 07:36:40 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2018-12-13 07:37:20 +0000 |
commit | 3081799dc53b2472d5602714ed41b670da8de269 (patch) | |
tree | 8cf4f599cfe1da5bf1e64765a5bb6d1dacfba5b7 /community | |
parent | 4fa43bd6e2ed33b769940bb7847515122c86c8d1 (diff) | |
download | aports-3081799dc53b2472d5602714ed41b670da8de269.tar.bz2 aports-3081799dc53b2472d5602714ed41b670da8de269.tar.xz |
community/nextcloud: upgrade to 13.0.8
12.x is no longer supported upstream
Diffstat (limited to 'community')
-rw-r--r-- | community/nextcloud/APKBUILD | 35 | ||||
-rw-r--r-- | community/nextcloud/app-encryption-info-add-mcrypt.patch | 5 | ||||
-rw-r--r-- | community/nextcloud/dont-update-htaccess.patch | 32 | ||||
-rw-r--r-- | community/nextcloud/fpm-pool.conf | 10 | ||||
-rw-r--r-- | community/nextcloud/iconv-ascii-translit-not-supported.patch | 11 | ||||
-rw-r--r-- | community/nextcloud/nextcloud-1202-fix-6028.patch | 22 | ||||
-rw-r--r-- | community/nextcloud/nextcloud-config.php | 11 | ||||
-rw-r--r-- | community/nextcloud/nextcloud.confd | 3 | ||||
-rw-r--r-- | community/nextcloud/nextcloud.post-upgrade | 5 | ||||
-rw-r--r-- | community/nextcloud/postgresql10.patch | 20 |
10 files changed, 95 insertions, 59 deletions
diff --git a/community/nextcloud/APKBUILD b/community/nextcloud/APKBUILD index 33dd9712d9..73d2b58d0a 100644 --- a/community/nextcloud/APKBUILD +++ b/community/nextcloud/APKBUILD @@ -1,35 +1,39 @@ # Maintainer: Leonardo Arena <rnalrd@alpinelinux.org> # Contributor: Jakub Jirutka <jakub@jirutka.cz> pkgname=nextcloud -pkgver=12.0.13 +pkgver=13.0.8 pkgrel=0 pkgdesc="A safe home for all your data" url="http://nextcloud.com" arch="noarch" -license="AGPL" +license="AGPL-3.0-only" _php=php7 _php_mods="-ctype -curl -dom -gd -fileinfo -iconv -json -mbstring -openssl - -posix -session -simplexml -xml -xmlreader -xmlwriter -zlib -zip" + -pcntl -posix -session -simplexml -xml -xmlreader -xmlwriter -zlib -zip" depends="ca-certificates $_php ${_php_mods//-/$_php-}" makedepends="xmlstarlet" provides="$pkgname-dav=$pkgver-r$pkgrel $pkgname-files=$pkgver-r$pkgrel - $pkgname-provisioning_api=$pkgver-r$pkgrel" -install="$pkgname.pre-install $pkgname.pre-upgrade $pkgname.post-upgrade" + $pkgname-provisioning_api=$pkgver-r$pkgrel + $pkgname-federatedfilesharing=$pkgver-r$pkgrel" +install="$pkgname.pre-install $pkgname.pre-upgrade $pkgname.post-upgrade + $pkgname-initscript.post-install" subpackages="$pkgname-doc $pkgname-initscript $pkgname-mysql $pkgname-pgsql $pkgname-sqlite $pkgname-default-apps:_default_apps" source="https://download.nextcloud.com/server/releases/$pkgname-$pkgver.zip nextcloud10-dont-chmod.patch + dont-update-htaccess.patch disable-integrity-check-as-default.patch app-encryption-info-add-mcrypt.patch + iconv-ascii-translit-not-supported.patch use-external-docs-if-local-not-avail.patch - postgresql10.patch $pkgname-config.php $pkgname.logrotate $pkgname.confd $pkgname.cron fpm-pool.conf + occ " options="!check" pkgusers="nextcloud" @@ -43,7 +47,6 @@ _apps="activity admin_audit comments encryption - federatedfilesharing federation files_external files_pdfviewer @@ -96,7 +99,7 @@ package() { # Let's not ship upstream's 'updatenotification' app and updater, which # has zero chance of working and a big chance of blowing things up. rm -r ./$wwwdir/apps/updatenotification \ - ./$wwwdir/updater + ./$wwwdir/lib/private/Updater # Replace bundled CA bundle with ours. ln -sf /etc/ssl/certs/ca-certificates.crt ./$wwwdir/resources/config/ca-bundle.crt @@ -122,6 +125,7 @@ package() { install -m 644 -D "$srcdir"/$pkgname.logrotate ./etc/logrotate.d/$pkgname + install -m 755 -D "$srcdir"/occ ./usr/bin/occ # Clean some unnecessary files. find . -name .gitignore -delete \ @@ -143,7 +147,6 @@ doc() { initscript() { pkgdesc="Init script that runs Nextcloud with php-fpm" depends="$pkgname $_php-fpm" - install="$subpkgname.post-install" local confdir="$subpkgdir/etc/$_php/php-fpm.d" local fpm_name="php-fpm${_php#php}" @@ -220,14 +223,16 @@ _package_app() { mv "$pkgdir"/$_appsdir/$appname "$subpkgdir"/$_appsdir/ } -sha512sums="52df43d1af86c01708df2d206872de90e49102283e76b20c6ed794f938ef0be2b82602ad75450311dd4ede1c4720c3f4255007b4dc9d7bc47a0165fb658b8178 nextcloud-12.0.13.zip +sha512sums="091f69776718adfab54fff92de983f6c94c0d686640b2b2afe22997823db632555f15a90365d336d911d87b06cafffda6497b5e56bc8a92d06421b99042ae3a3 nextcloud-13.0.8.zip 9c20237c4952ff543171768160c17c3608cc43ad9592fecccaeb337787d566f039f27f30f118359dfff7db58cd12d811c05be15e5994efee57a9ed75787d71f5 nextcloud10-dont-chmod.patch +aef3c92497d738d6968e0f0b0d415b4953500db24ae14af41ef972665cf7eff00cb6c53dc953845fdbb389c3c965a75b8b14b9247513c05cf4130fe1cfc61731 dont-update-htaccess.patch 04783385ca35be9e8b895e91294b082cd2a1f50c4e17dc195901885ecd421db9a6fe45360d7eac623873ae4efad80b92f31ebde59f4ed76d832c8cac450dac85 disable-integrity-check-as-default.patch -8d3cb1436aa79f1ac0a7b4b3370fcfb5c50dbe811e631cabcb8170fb80da5967a88a15bc39cd04eaccffb3177bdf90fcba2a512e28e034e16d6bc9b445d2d137 app-encryption-info-add-mcrypt.patch +d6f951cbcb7ca48beb88d77e02a8669677e87bc32189b1eb7e63edc29c293bd6e1ee471c37b622e6b38fd2baf6cf198c872f92b256ffab17c92c31a3a05b5aa0 app-encryption-info-add-mcrypt.patch +7d60ba2f1c012b0a1cded30f757b7ec0efe7fc4bfa7b5c6879f35eb80711ac1d5e6c894356346222a0de68b0808c99bac358aaae1c69124a855da2a98cdff6ec iconv-ascii-translit-not-supported.patch 478f5cd7c5d30380ea619d3e8ec623217a06a09b27534266f00297545c7d276b068c5d984673eebc5676e8bac7f45112549498944ce3fa678ac8a69541d7c430 use-external-docs-if-local-not-avail.patch -98cc88b4c6f24c1704be3fc4eed61d702ea8c126f4a73e5d72e50f04b46d1196b31b7ef218b7392ba334a5af6dd44de21564e05185fba654482f56b97bfa8510 postgresql10.patch -89c941e2719629ee633421c4c75b55026c1a0a6b255e7f1f2c14612c10325045051b16dc5f17975af4a2a34ec187008de2eb15a53ac4cd06d26a5cbbd79fb73a nextcloud-config.php +5f73cd9399fa484ef15bd47e803c93381deffbc7699eceadbb5c27e43b20156806d74e5021a64d28f0165ef87b519e962780651711a37bceb9f0b04455dfdce1 nextcloud-config.php f224d72799ee5819979089eb58978225454223bee597c938681a4f6279eb49297fe9250ac54ccf8bcb33ae262bce43d085affb77723492ee662263710d4008c9 nextcloud.logrotate -35cf156839215113b5d8fb8842b4c1e19a50be3c16be7048879fdd808674e4875dbacf3e2dd884fd182258595b7a137d7d3c2dc602a7ff5613c8b65fae0abe67 nextcloud.confd +dcc57735d7d4af4a7ebbdd1186d301e51d2ae4675022aea6bf1111222dfa188a3a490ebd6e7c8a7ac30046cb7d93f81cec72a51acbc60d0c10b7fb64630c637a nextcloud.confd edb699ea6127b231793254115b334006c2d50a0d2ecc846188c3521ddffc3c0e19c5e2944f03cae81e6c645c859258380691081b1c522a22d40939b31db36e8a nextcloud.cron -ebe88e451de5dc84ee8bbcd9af48e2ceae4807546b9c069cf15ecc73e2c408a6e8c7502870f7b45a2e5e0632fc7dec878cad24c1d3a20ff3b812067dd7b07de8 fpm-pool.conf" +ee9073a6df4286cba2d1d855cf40863968f20677729b2c7848ab50a70d4915b8e84c957a850a03a707231256c11312e5792e7817dd50afbf73efe767fef2112d fpm-pool.conf +959852e34f010e635470829d66713f3e22c47717ec2c6487759eed2b6aeff9fd1421fe0271d494a02781bd1c98beb2823583623ee2cf03057cd5db794627d6c2 occ" diff --git a/community/nextcloud/app-encryption-info-add-mcrypt.patch b/community/nextcloud/app-encryption-info-add-mcrypt.patch index f115fdbead..35b7557ab5 100644 --- a/community/nextcloud/app-encryption-info-add-mcrypt.patch +++ b/community/nextcloud/app-encryption-info-add-mcrypt.patch @@ -4,11 +4,12 @@ dependencies can be read in info.xml). --- a/apps/encryption/appinfo/info.xml +++ b/apps/encryption/appinfo/info.xml -@@ -24,6 +24,7 @@ +@@ -25,6 +25,7 @@ </types> <dependencies> <lib>openssl</lib> + <lib>mcrypt</lib> - <nextcloud min-version="12" max-version="12" /> + <nextcloud min-version="13" max-version="13" /> </dependencies> <settings> + diff --git a/community/nextcloud/dont-update-htaccess.patch b/community/nextcloud/dont-update-htaccess.patch new file mode 100644 index 0000000000..aecaebc715 --- /dev/null +++ b/community/nextcloud/dont-update-htaccess.patch @@ -0,0 +1,32 @@ +Don't mess with .htaccess files. + +Patch ported from https://src.fedoraproject.org/cgit/rpms/nextcloud.git/tree/nextcloud-9.1.0-dont_update_htacess.patch + +--- a/core/register_command.php ++++ b/core/register_command.php +@@ -135,7 +135,6 @@ + $application->add(new OC\Core\Command\Maintenance\Mimetype\UpdateDB(\OC::$server->getMimeTypeDetector(), \OC::$server->getMimeTypeLoader())); + $application->add(new OC\Core\Command\Maintenance\Mimetype\UpdateJS(\OC::$server->getMimeTypeDetector())); + $application->add(new OC\Core\Command\Maintenance\Mode(\OC::$server->getConfig())); +- $application->add(new OC\Core\Command\Maintenance\UpdateHtaccess()); + $application->add(new OC\Core\Command\Maintenance\UpdateTheme(\OC::$server->getMimeTypeDetector(), \OC::$server->getMemCacheFactory())); + + $application->add(new OC\Core\Command\Upgrade(\OC::$server->getConfig(), \OC::$server->getLogger(), \OC::$server->query(\OC\Installer::class))); + +--- a/lib/private/Updater.php ++++ b/lib/private/Updater.php +@@ -233,14 +233,6 @@ + throw new \Exception('Updates between multiple major versions and downgrades are unsupported.'); + } + +- // Update .htaccess files +- try { +- Setup::updateHtaccess(); +- Setup::protectDataDirectory(); +- } catch (\Exception $e) { +- throw new \Exception($e->getMessage()); +- } +- + // create empty file in data dir, so we can later find + // out that this is indeed an ownCloud data directory + // (in case it didn't exist before) diff --git a/community/nextcloud/fpm-pool.conf b/community/nextcloud/fpm-pool.conf index 4e09b57028..69fef6e37a 100644 --- a/community/nextcloud/fpm-pool.conf +++ b/community/nextcloud/fpm-pool.conf @@ -185,3 +185,13 @@ php_admin_value[always_populate_raw_post_data] = -1 ; Disable certain functions for security reasons. ; http://php.net/disable-functions php_admin_value[disable_functions] = exec,passthru,shell_exec,system,proc_open,curl_multi_exec,show_source + +; Set recommended settings for OpCache. +; https://docs.nextcloud.com/server/13/admin_manual/configuration_server/server_tuning.html#enable-php-opcache +php_admin_flag[opcache.enable] = true +php_admin_flag[opcache.enable_cli] = true +php_admin_flag[opcache.save_comments] = true +php_admin_value[opcache.interned_strings_buffer] = 8 +php_admin_value[opcache.max_accelerated_files] = 10000 +php_admin_value[opcache.memory_consumption] = 128 +php_admin_value[opcache.revalidate_freq] = 1 diff --git a/community/nextcloud/iconv-ascii-translit-not-supported.patch b/community/nextcloud/iconv-ascii-translit-not-supported.patch new file mode 100644 index 0000000000..f599a1b020 --- /dev/null +++ b/community/nextcloud/iconv-ascii-translit-not-supported.patch @@ -0,0 +1,11 @@ +--- a/apps/user_ldap/lib/Access.php ++++ b/apps/user_ldap/lib/Access.php +@@ -1318,7 +1318,7 @@ + } + + // Transliteration to ASCII +- $transliterated = @iconv('UTF-8', 'ASCII//TRANSLIT', $name); ++ $transliterated = @iconv('UTF-8', 'ASCII', $name); + if($transliterated !== false) { + // depending on system config iconv can work or not + $name = $transliterated; diff --git a/community/nextcloud/nextcloud-1202-fix-6028.patch b/community/nextcloud/nextcloud-1202-fix-6028.patch deleted file mode 100644 index bc7f64f796..0000000000 --- a/community/nextcloud/nextcloud-1202-fix-6028.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/lib/private/Template/CSSResourceLocator.php -+++ b/lib/private/Template/CSSResourceLocator.php -@@ -117,7 +117,7 @@ - parent::append($root, $file, $webRoot, $throw); - } else { - if (!$webRoot) { -- $tmpRoot = realpath($root); -+ $tmpRoot = $root; - /* - * traverse the potential web roots upwards in the path - * ---- a/lib/private/Template/ResourceLocator.php -+++ b/lib/private/Template/ResourceLocator.php -@@ -125,7 +125,7 @@ - } - - if (!$webRoot) { -- $tmpRoot = realpath($root); -+ $tmpRoot = $root; - /* - * traverse the potential web roots upwards in the path - * diff --git a/community/nextcloud/nextcloud-config.php b/community/nextcloud/nextcloud-config.php index de572edc28..035fb790ec 100644 --- a/community/nextcloud/nextcloud-config.php +++ b/community/nextcloud/nextcloud-config.php @@ -22,5 +22,16 @@ $CONFIG = array ( // Uncomment to enable Zend OPcache. //'memcache.local' => '\OC\Memcache\APCu', + // Uncomment this and add user nextcloud to the redis group to enable Redis + // cache for file locking. This is highly recommended, see + // https://github.com/nextcloud/server/issues/9305. + //'memcache.locking' => '\OC\Memcache\Redis', + //'redis' => array( + // 'host' => '/run/redis/redis.sock', + // 'port' => 0, + // 'dbindex' => 0, + // 'timeout' => 1.5, + //), + 'installed' => false, ); diff --git a/community/nextcloud/nextcloud.confd b/community/nextcloud/nextcloud.confd index aae73dc2f3..b24f26d7f1 100644 --- a/community/nextcloud/nextcloud.confd +++ b/community/nextcloud/nextcloud.confd @@ -3,3 +3,6 @@ name="Nextcloud" user="nextcloud" group="www-data" + +# Uncomment if you use Nextcloud with Redis for caching. +#rc_need="redis" diff --git a/community/nextcloud/nextcloud.post-upgrade b/community/nextcloud/nextcloud.post-upgrade index 95cf241ccc..19813daf4a 100644 --- a/community/nextcloud/nextcloud.post-upgrade +++ b/community/nextcloud/nextcloud.post-upgrade @@ -1,5 +1,6 @@ #!/bin/sh +ver_new="$1" ver_old="$2" if [ $(apk version -t "$ver_old" '12.0.0-r2') = '<' ]; then @@ -27,3 +28,7 @@ if [ $(apk version -t "$ver_old" '12.0.0-r2') = '<' ]; then EOF fi fi + +if [ "${ver_new%-r*}" != "${ver_old%-r*}" ]; then + echo '* Run "occ upgrade" to finish upgrade of your NextCloud instance!' >&2 +fi diff --git a/community/nextcloud/postgresql10.patch b/community/nextcloud/postgresql10.patch deleted file mode 100644 index 7b1a6f40be..0000000000 --- a/community/nextcloud/postgresql10.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php.orig 2017-11-05 15:37:27.538064270 +0100 -+++ b/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php 2017-11-05 15:38:54.014644323 +0100 -@@ -289,7 +289,16 @@ - $sequenceName = $sequence['relname']; - } - -- $data = $this->_conn->fetchAll('SELECT min_value, increment_by FROM ' . $this->_platform->quoteIdentifier($sequenceName)); -+ $version = floatval($this->_conn->getWrappedConnection()->getServerVersion()); -+ -+ if ($version >= 10) { -+ $data = $this->_conn->fetchAll('SELECT min_value, increment_by FROM pg_sequences WHERE schemaname = \'public\' AND sequencename = '.$this->_conn->quote($sequenceName)); -+ } -+ else -+ { -+ $data = $this->_conn->fetchAll('SELECT min_value, increment_by FROM ' . $this->_platform->quoteIdentifier($sequenceName)); -+ } -+// $data = $this->_conn->fetchAll('SELECT min_value, increment_by FROM ' . $this->_platform->quoteIdentifier($sequenceName)); - - return new Sequence($sequenceName, $data[0]['increment_by'], $data[0]['min_value']); - } |