git.iko.soy/typeable/nixpkgs
on master help sign in
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

commitd022b4987a7fd93002202c10cfc37bd83cebb1be authorMaximilian Bosch <maximilian@mbosch.me> dateFri 1 Oct 2021, 18:40 (5 years ago) parentbf4cf0d675e262
3 files changed+40−7
nixos/modules/services/web-apps/nextcloud.nix+27−1 nixos/tests/nextcloud/with-mysql-and-memcached.nix+7 pkgs/servers/nextcloud/default.nix+6−6
nixos/modules/services/web-apps/nextcloud.nix+27−1
@@ -399,13 +399,39 @@ in {
399399 The package can be upgraded by explicitly declaring the service-option
400400 `services.nextcloud.package`.
401401 '';
402+
403+ # FIXME(@Ma27) remove as soon as nextcloud properly supports
404+ # mariadb >=10.6.
405+ isUnsupportedMariadb =
406+ # All currently supported Nextcloud versions are affected.
407+ (versionOlder cfg.package.version "23")
408+ # This module uses mysql
409+ && (cfg.config.dbtype == "mysql")
410+ # MySQL is managed via NixOS
411+ && config.services.mysql.enable
412+ # We're using MariaDB
413+ && (getName config.services.mysql.package) == "mariadb-server"
414+ # MariaDB is at least 10.6 and thus not supported
415+ && (versionAtLeast (getVersion config.services.mysql.package) "10.6");
416+
402417 in (optional (cfg.poolConfig != null) ''
403418 Using config.services.nextcloud.poolConfig is deprecated and will become unsupported in a future release.
404419 Please migrate your configuration to config.services.nextcloud.poolSettings.
405420 '')
406421 ++ (optional (versionOlder cfg.package.version "20") (upgradeWarning 19 "21.05"))
407422 ++ (optional (versionOlder cfg.package.version "21") (upgradeWarning 20 "21.05"))
408− ++ (optional (versionOlder cfg.package.version "22") (upgradeWarning 21 "21.11"));
423+ ++ (optional (versionOlder cfg.package.version "22") (upgradeWarning 21 "21.11"))
424+ ++ (optional isUnsupportedMariadb ''
425+ You seem to be using MariaDB at an unsupported version (i.e. at least 10.6)!
426+ Please note that this isn't supported officially by Nextcloud. You can either
427+
428+ * Switch to `pkgs.mysql`
429+ * Downgrade MariaDB to at least 10.5
430+ * Work around Nextcloud's problems by specifying `innodb_read_only_compressed=0`
431+
432+ For further context, please read
433+ https://help.nextcloud.com/t/update-to-next-cloud-21-0-2-has-get-an-error/117028/15
434+ '');
409435
410436 services.nextcloud.package = with pkgs;
411437 mkDefault (
nixos/tests/nextcloud/with-mysql-and-memcached.nix+7
@@ -39,6 +39,13 @@ in {
3939 enable = true;
4040 bind = "127.0.0.1";
4141 package = pkgs.mariadb;
42+
43+ # FIXME(@Ma27) Nextcloud isn't compatible with mariadb 10.6,
44+ # this is a workaround.
45+ # See https://help.nextcloud.com/t/update-to-next-cloud-21-0-2-has-get-an-error/117028/22
46+ extraOptions = ''
47+ innodb_read_only_compressed=0
48+ '';
4249 initialScript = pkgs.writeText "mysql-init" ''
4350 CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY 'hunter2';
4451 CREATE DATABASE IF NOT EXISTS nextcloud;
pkgs/servers/nextcloud/default.nix+6−6
@@ -44,18 +44,18 @@ in {
4444 '';
4545
4646 nextcloud20 = generic {
47− version = "20.0.12";
48− sha256 = "sha256-gIIPuWVcWv/5nuXMWticcPBKMjJVsCmvs83tj8fdbgY=";
47+ version = "20.0.13";
48+ sha256 = "15mi51aayi3m8brxc0w51mbxp4h3hjv14gr5mm7ch2930x655gg9";
4949 };
5050
5151 nextcloud21 = generic {
52− version = "21.0.4";
53− sha256 = "sha256-Sg0w/r+6UxGLqZCgwtLBZ2e3eqZ2r8k30gGNaGXF/jo=";
52+ version = "21.0.5";
53+ sha256 = "1q46h480kn97k7h3xm7r5gsa8l3f0kfiicapi46sh0p39pbjbyhv";
5454 };
5555
5656 nextcloud22 = generic {
57− version = "22.1.1";
58− sha256 = "sha256-5VtuuXf7U5CB4zp9jxluOEMOszfMdr8DeaZjpJf73ls=";
57+ version = "22.2.0";
58+ sha256 = "07ryvynws65k42n6ca20nni1vqr90fsrd2dpx2bvh09mwhyblg97";
5959 };
6060 # tip: get she sha with:
6161 # curl 'https://download.nextcloud.com/server/releases/nextcloud-${version}.tar.bz2.sha256'