Merge pull request #140181 from yayayayaka/backport-140089-to-release-21.05
[Backport release-21.05] nextcloud: 20.0.12 -> 20.0.13, 21.0.4 -> 21.0.5, 22.1.1 -> 22.2.0
This commit is contained in:
commit
d4c8773058
@ -399,13 +399,40 @@ in {
|
|||||||
The package can be upgraded by explicitly declaring the service-option
|
The package can be upgraded by explicitly declaring the service-option
|
||||||
`services.nextcloud.package`.
|
`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) ''
|
in (optional (cfg.poolConfig != null) ''
|
||||||
Using config.services.nextcloud.poolConfig is deprecated and will become unsupported in a future release.
|
Using config.services.nextcloud.poolConfig is deprecated and will become unsupported in a future release.
|
||||||
Please migrate your configuration to config.services.nextcloud.poolSettings.
|
Please migrate your configuration to config.services.nextcloud.poolSettings.
|
||||||
'')
|
'')
|
||||||
++ (optional (versionOlder cfg.package.version "19") (upgradeWarning 18 "20.09"))
|
++ (optional (versionOlder cfg.package.version "19") (upgradeWarning 18 "20.09"))
|
||||||
++ (optional (versionOlder cfg.package.version "20") (upgradeWarning 19 "21.05"))
|
++ (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 "21") (upgradeWarning 20 "21.05"))
|
||||||
|
++ (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;
|
services.nextcloud.package = with pkgs;
|
||||||
mkDefault (
|
mkDefault (
|
||||||
|
@ -39,6 +39,13 @@ in {
|
|||||||
enable = true;
|
enable = true;
|
||||||
bind = "127.0.0.1";
|
bind = "127.0.0.1";
|
||||||
package = pkgs.mariadb;
|
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" ''
|
initialScript = pkgs.writeText "mysql-init" ''
|
||||||
CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY 'hunter2';
|
CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY 'hunter2';
|
||||||
CREATE DATABASE IF NOT EXISTS nextcloud;
|
CREATE DATABASE IF NOT EXISTS nextcloud;
|
||||||
|
@ -55,18 +55,18 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
nextcloud20 = generic {
|
nextcloud20 = generic {
|
||||||
version = "20.0.12";
|
version = "20.0.13";
|
||||||
sha256 = "sha256-gIIPuWVcWv/5nuXMWticcPBKMjJVsCmvs83tj8fdbgY=";
|
sha256 = "15mi51aayi3m8brxc0w51mbxp4h3hjv14gr5mm7ch2930x655gg9";
|
||||||
};
|
};
|
||||||
|
|
||||||
nextcloud21 = generic {
|
nextcloud21 = generic {
|
||||||
version = "21.0.4";
|
version = "21.0.5";
|
||||||
sha256 = "sha256-Sg0w/r+6UxGLqZCgwtLBZ2e3eqZ2r8k30gGNaGXF/jo=";
|
sha256 = "1q46h480kn97k7h3xm7r5gsa8l3f0kfiicapi46sh0p39pbjbyhv";
|
||||||
};
|
};
|
||||||
|
|
||||||
nextcloud22 = generic {
|
nextcloud22 = generic {
|
||||||
version = "22.1.1";
|
version = "22.2.0";
|
||||||
sha256 = "sha256-5VtuuXf7U5CB4zp9jxluOEMOszfMdr8DeaZjpJf73ls=";
|
sha256 = "07ryvynws65k42n6ca20nni1vqr90fsrd2dpx2bvh09mwhyblg97";
|
||||||
};
|
};
|
||||||
# tip: get she sha with:
|
# tip: get she sha with:
|
||||||
# curl 'https://download.nextcloud.com/server/releases/nextcloud-${version}.tar.bz2.sha256'
|
# curl 'https://download.nextcloud.com/server/releases/nextcloud-${version}.tar.bz2.sha256'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user