Merge pull request #140089 from yayayayaka/nextcloud-21.0.5

nextcloud: 20.0.12 -> 20.0.13, 21.0.4 -> 21.0.5, 22.1.1 -> 22.2.0
This commit is contained in:
Maximilian Bosch 2021-10-01 18:40:06 +02:00 committed by GitHub
commit d022b4987a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 40 additions and 7 deletions

View file

@ -399,13 +399,39 @@ in {
The package can be upgraded by explicitly declaring the service-option
`services.nextcloud.package`.
'';
# FIXME(@Ma27) remove as soon as nextcloud properly supports
# mariadb >=10.6.
isUnsupportedMariadb =
# All currently supported Nextcloud versions are affected.
(versionOlder cfg.package.version "23")
# This module uses mysql
&& (cfg.config.dbtype == "mysql")
# MySQL is managed via NixOS
&& config.services.mysql.enable
# We're using MariaDB
&& (getName config.services.mysql.package) == "mariadb-server"
# MariaDB is at least 10.6 and thus not supported
&& (versionAtLeast (getVersion config.services.mysql.package) "10.6");
in (optional (cfg.poolConfig != null) ''
Using config.services.nextcloud.poolConfig is deprecated and will become unsupported in a future release.
Please migrate your configuration to config.services.nextcloud.poolSettings.
'')
++ (optional (versionOlder cfg.package.version "20") (upgradeWarning 19 "21.05"))
++ (optional (versionOlder cfg.package.version "21") (upgradeWarning 20 "21.05"))
++ (optional (versionOlder cfg.package.version "22") (upgradeWarning 21 "21.11"));
++ (optional (versionOlder cfg.package.version "22") (upgradeWarning 21 "21.11"))
++ (optional isUnsupportedMariadb ''
You seem to be using MariaDB at an unsupported version (i.e. at least 10.6)!
Please note that this isn't supported officially by Nextcloud. You can either
* Switch to `pkgs.mysql`
* Downgrade MariaDB to at least 10.5
* Work around Nextcloud's problems by specifying `innodb_read_only_compressed=0`
For further context, please read
https://help.nextcloud.com/t/update-to-next-cloud-21-0-2-has-get-an-error/117028/15
'');
services.nextcloud.package = with pkgs;
mkDefault (

View file

@ -39,6 +39,13 @@ in {
enable = true;
bind = "127.0.0.1";
package = pkgs.mariadb;
# FIXME(@Ma27) Nextcloud isn't compatible with mariadb 10.6,
# this is a workaround.
# See https://help.nextcloud.com/t/update-to-next-cloud-21-0-2-has-get-an-error/117028/22
extraOptions = ''
innodb_read_only_compressed=0
'';
initialScript = pkgs.writeText "mysql-init" ''
CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY 'hunter2';
CREATE DATABASE IF NOT EXISTS nextcloud;

View file

@ -44,18 +44,18 @@ in {
'';
nextcloud20 = generic {
version = "20.0.12";
sha256 = "sha256-gIIPuWVcWv/5nuXMWticcPBKMjJVsCmvs83tj8fdbgY=";
version = "20.0.13";
sha256 = "15mi51aayi3m8brxc0w51mbxp4h3hjv14gr5mm7ch2930x655gg9";
};
nextcloud21 = generic {
version = "21.0.4";
sha256 = "sha256-Sg0w/r+6UxGLqZCgwtLBZ2e3eqZ2r8k30gGNaGXF/jo=";
version = "21.0.5";
sha256 = "1q46h480kn97k7h3xm7r5gsa8l3f0kfiicapi46sh0p39pbjbyhv";
};
nextcloud22 = generic {
version = "22.1.1";
sha256 = "sha256-5VtuuXf7U5CB4zp9jxluOEMOszfMdr8DeaZjpJf73ls=";
version = "22.2.0";
sha256 = "07ryvynws65k42n6ca20nni1vqr90fsrd2dpx2bvh09mwhyblg97";
};
# tip: get she sha with:
# curl 'https://download.nextcloud.com/server/releases/nextcloud-${version}.tar.bz2.sha256'