From 21d46c4c4c9cb9d984636a5f75d04c9ae98de71c Mon Sep 17 00:00:00 2001 From: akhil Date: Wed, 30 Mar 2022 19:13:52 +0530 Subject: [PATCH 1/3] Added mail usage patch --- Dockerfile | 6 ++++-- patches/014-add-mail-usage.patch | 23 +++++++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 patches/014-add-mail-usage.patch diff --git a/Dockerfile b/Dockerfile index 75899b25..07b840c3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,11 +12,12 @@ ARG USER_BACKEND_RAW_SQL_VERSION="1.1.1" ARG EMAIL_RECOVERY_JOB_ID="199763" ARG RAINLOOP_VERSION="7.1.2" ARG RAINLOOP_COMMIT_SHA="e9da581c" -ARG EA_TAG="1.0.0" +# set Ecloud Accounts version to nc21 temporarily during validation +ARG EA_TAG="nc21" ARG ECLOUD_LAUNCHER_JOB_ID="222001" ARG GOOGLE_INTEGRATION_VERSION="1.0.6" -RUN sed -i 's/21,0,9,1/21,0,9,6/' ${BASE_DIR}/version.php +RUN sed -i 's/21,0,9,1/21,0,9,7/' ${BASE_DIR}/version.php # Install unzip for unzipping artifacts RUN apt-get update && apt-get install unzip @@ -111,6 +112,7 @@ RUN patch -u ${BASE_DIR}/lib/private/Updater.php -i ${TMP_PATCH_DIR}/010-disable RUN cd ${BASE_DIR} && patch -p0 < ${TMP_PATCH_DIR}/011-privacy-settings.patch RUN cd ${BASE_DIR} && patch -u ${BASE_DIR}/apps/dashboard/lib/Controller/DashboardController.php -i ${TMP_PATCH_DIR}/012-remove-user-status-widget.patch RUN patch -u ${BASE_DIR}/lib/private/Authentication/Token/PublicKeyTokenProvider.php -i ${TMP_PATCH_DIR}/013-revert-token-password-update.patch +RUN patch -u ${BASE_DIR}/lib/private/legacy/OC_Helper.php -i ${TMP_PATCH_DIR}/014-add-mail-usage.patch RUN rm -rf ${TMP_PATCH_DIR} # autocomplete leak tweak apps frontend with sed, disable group suggestion diff --git a/patches/014-add-mail-usage.patch b/patches/014-add-mail-usage.patch new file mode 100644 index 00000000..608a7ddd --- /dev/null +++ b/patches/014-add-mail-usage.patch @@ -0,0 +1,23 @@ +--- OC_Helper.php 2022-03-30 19:09:02.242478886 +0530 ++++ OC_Helper-new.php 2022-03-30 19:11:16.877960366 +0530 +@@ -530,6 +530,12 @@ + $quota = $sourceStorage->getQuota(); + } + $free = $sourceStorage->free_space($rootInfo->getInternalPath()); ++ $ownerId = $storage->getOwner($path); ++ $mailQuotaUsage = (int) \OC::$server->getConfig()->getUserValue($ownerId, 'ecloud-accounts', 'mailQuotaUsage', 0); ++ $free = $free - $mailQuotaUsage; ++ if($path === '/') { ++ $used = $used + $mailQuotaUsage; ++ } + if ($free >= 0) { + $total = $free + $used; + } else { +@@ -545,7 +551,6 @@ + $relative = 0; + } + +- $ownerId = $storage->getOwner($path); + $ownerDisplayName = ''; + $owner = \OC::$server->getUserManager()->get($ownerId); + if ($owner) { -- GitLab From 1bae28186c355d405b0b5808a7ef747b58906d41 Mon Sep 17 00:00:00 2001 From: akhil Date: Wed, 6 Apr 2022 12:20:52 +0530 Subject: [PATCH 2/3] Updated ecloud-accounts tag and bumped version number --- Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 07b840c3..3cb0bee0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,12 +12,11 @@ ARG USER_BACKEND_RAW_SQL_VERSION="1.1.1" ARG EMAIL_RECOVERY_JOB_ID="199763" ARG RAINLOOP_VERSION="7.1.2" ARG RAINLOOP_COMMIT_SHA="e9da581c" -# set Ecloud Accounts version to nc21 temporarily during validation -ARG EA_TAG="nc21" +ARG EA_TAG="1.1.0" ARG ECLOUD_LAUNCHER_JOB_ID="222001" ARG GOOGLE_INTEGRATION_VERSION="1.0.6" -RUN sed -i 's/21,0,9,1/21,0,9,7/' ${BASE_DIR}/version.php +RUN sed -i 's/21,0,9,1/21,0,9,8/' ${BASE_DIR}/version.php # Install unzip for unzipping artifacts RUN apt-get update && apt-get install unzip -- GitLab From b94dd6a06f49fe49cc99642d9688edf8ebb84dc6 Mon Sep 17 00:00:00 2001 From: akhil Date: Wed, 6 Apr 2022 12:37:32 +0530 Subject: [PATCH 3/3] Updated rainloop version --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3cb0bee0..75d80f01 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,12 +11,12 @@ ARG CALENDAR_VERSION="3.1.0" ARG USER_BACKEND_RAW_SQL_VERSION="1.1.1" ARG EMAIL_RECOVERY_JOB_ID="199763" ARG RAINLOOP_VERSION="7.1.2" -ARG RAINLOOP_COMMIT_SHA="e9da581c" +ARG RAINLOOP_COMMIT_SHA="546794f5" ARG EA_TAG="1.1.0" ARG ECLOUD_LAUNCHER_JOB_ID="222001" ARG GOOGLE_INTEGRATION_VERSION="1.0.6" -RUN sed -i 's/21,0,9,1/21,0,9,8/' ${BASE_DIR}/version.php +RUN sed -i 's/21,0,9,1/21,0,9,9/' ${BASE_DIR}/version.php # Install unzip for unzipping artifacts RUN apt-get update && apt-get install unzip -- GitLab