From b0ba7d2406ef905c47656c0053e8c0453cab5397 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Tue, 25 Jul 2023 12:15:34 +0200 Subject: [PATCH] nixos/tests/nextcloud: Fix broken webdav url Starting with Rclone v1.63, which is used in the Nextcloud tests for synchronization, the client relies on the correct WebDAV endpoint url, see https://github.com/rclone/rclone/issues/7103 --- nixos/tests/nextcloud/basic.nix | 6 +++--- nixos/tests/nextcloud/openssl-sse.nix | 2 +- .../with-declarative-redis-and-secrets.nix | 14 +++++++------- nixos/tests/nextcloud/with-mysql-and-memcached.nix | 2 +- .../tests/nextcloud/with-postgresql-and-redis.nix | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/nixos/tests/nextcloud/basic.nix b/nixos/tests/nextcloud/basic.nix index e17f701c54b7..db5cee9f6584 100644 --- a/nixos/tests/nextcloud/basic.nix +++ b/nixos/tests/nextcloud/basic.nix @@ -14,12 +14,12 @@ in { client = { ... }: { services.davfs2.enable = true; system.activationScripts.davfs2-secrets = '' - echo "http://nextcloud/remote.php/webdav/ ${adminuser} ${adminpass}" > /tmp/davfs2-secrets + echo "http://nextcloud/remote.php/dav/files/${adminuser} ${adminuser} ${adminpass}" > /tmp/davfs2-secrets chmod 600 /tmp/davfs2-secrets ''; virtualisation.fileSystems = { "/mnt/dav" = { - device = "http://nextcloud/remote.php/webdav/"; + device = "http://nextcloud/remote.php/dav/files/${adminuser}"; fsType = "davfs"; options = let davfs2Conf = (pkgs.writeText "davfs2.conf" "secrets /tmp/davfs2-secrets"); @@ -70,7 +70,7 @@ in { withRcloneEnv = pkgs.writeScript "with-rclone-env" '' #!${pkgs.runtimeShell} export RCLONE_CONFIG_NEXTCLOUD_TYPE=webdav - export RCLONE_CONFIG_NEXTCLOUD_URL="http://nextcloud/remote.php/webdav/" + export RCLONE_CONFIG_NEXTCLOUD_URL="http://nextcloud/remote.php/dav/files/${adminuser}" export RCLONE_CONFIG_NEXTCLOUD_VENDOR="nextcloud" export RCLONE_CONFIG_NEXTCLOUD_USER="${adminuser}" export RCLONE_CONFIG_NEXTCLOUD_PASS="$(${pkgs.rclone}/bin/rclone obscure ${adminpass})" diff --git a/nixos/tests/nextcloud/openssl-sse.nix b/nixos/tests/nextcloud/openssl-sse.nix index 659a4311cddd..92beb869eb03 100644 --- a/nixos/tests/nextcloud/openssl-sse.nix +++ b/nixos/tests/nextcloud/openssl-sse.nix @@ -33,7 +33,7 @@ in { withRcloneEnv = host: pkgs.writeScript "with-rclone-env" '' #!${pkgs.runtimeShell} export RCLONE_CONFIG_NEXTCLOUD_TYPE=webdav - export RCLONE_CONFIG_NEXTCLOUD_URL="http://${host}/remote.php/webdav/" + export RCLONE_CONFIG_NEXTCLOUD_URL="http://${host}/remote.php/dav/files/${adminuser}" export RCLONE_CONFIG_NEXTCLOUD_VENDOR="nextcloud" export RCLONE_CONFIG_NEXTCLOUD_USER="${adminuser}" export RCLONE_CONFIG_NEXTCLOUD_PASS="$(${pkgs.rclone}/bin/rclone obscure ${adminpass})" diff --git a/nixos/tests/nextcloud/with-declarative-redis-and-secrets.nix b/nixos/tests/nextcloud/with-declarative-redis-and-secrets.nix index 915fa58ab145..e638f2e5b861 100644 --- a/nixos/tests/nextcloud/with-declarative-redis-and-secrets.nix +++ b/nixos/tests/nextcloud/with-declarative-redis-and-secrets.nix @@ -1,6 +1,6 @@ args@{ nextcloudVersion ? 27, ... }: (import ../make-test-python.nix ({ pkgs, ...}: let - username = "custom_admin_username"; + adminuser = "custom_admin_username"; # This will be used both for redis and postgresql pass = "hunter2"; # Don't do this at home, use a file outside of the nix store instead @@ -34,9 +34,9 @@ in { config = { dbtype = "pgsql"; dbname = "nextcloud"; - dbuser = username; + dbuser = adminuser; dbpassFile = passFile; - adminuser = username; + adminuser = adminuser; adminpassFile = passFile; }; secretFile = "/etc/nextcloud-secrets.json"; @@ -66,9 +66,9 @@ in { systemd.services.postgresql.postStart = pkgs.lib.mkAfter '' password=$(cat ${passFile}) ${config.services.postgresql.package}/bin/psql <