From 67a11396ad5f02158294a279d19304ea3dc85a08 Mon Sep 17 00:00:00 2001 From: akhil Date: Tue, 8 Mar 2022 00:54:40 +0530 Subject: [PATCH 01/10] update to 21.0.9 --- Dockerfile | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9d8482d8..dca5fdb0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,13 @@ -FROM nextcloud:21.0.7-fpm AS nextcloud +FROM nextcloud:21.0.9-fpm AS nextcloud ARG BASE_DIR="/usr/src/nextcloud" ARG TMP_PATCH_DIR="/tmp/build_patches" ARG THEME_VERSION="21.1.1" ARG THEME_HELPER_VERSION="1.0.2" ARG NEWS_VERSION="17.0.1" -ARG QUOTA_WARN_VERSION="1.13.0" -ARG NOTES_VERSION="4.2.0" -ARG CONTACTS_VERSION="4.0.6" -ARG CALENDAR_VERSION="3.0.1" +ARG QUOTA_WARN_VERSION="1.13.1" +ARG NOTES_VERSION="4.3.1" +ARG CONTACTS_VERSION="4.0.8" +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" @@ -16,8 +16,7 @@ ARG EA_TAG="1.0.0" ARG ECLOUD_LAUNCHER_JOB_ID="222001" ARG GOOGLE_INTEGRATION_VERSION="1.0.6" -COPY patches/ ${TMP_PATCH_DIR}/ -RUN sed -i 's/21,0,7,0/21,0,7,18/' ${BASE_DIR}/version.php +RUN sed -i 's/21,0,9,0/21,0,9,0/' ${BASE_DIR}/version.php # Install unzip for unzipping artifacts RUN apt-get update && apt-get install unzip @@ -39,12 +38,12 @@ RUN curl -fsSL -o notes.tar.gz \ rm notes.tar.gz; RUN curl -fsSL -o contacts.tar.gz \ - "https://github.com/nextcloud-releases/contacts/releases/download/v${CONTACTS_VERSION}/contacts.tar.gz" && \ + "https://github.com/nextcloud-releases/contacts/releases/download/v${CONTACTS_VERSION}/contacts-v${CONTACTS_VERSION}.tar.gz" && \ tar -xf contacts.tar.gz -C ${BASE_DIR}/custom_apps/ && \ rm contacts.tar.gz; RUN curl -fsSL -o calendar.tar.gz \ - "https://github.com/nextcloud-releases/calendar/releases/download/v${CALENDAR_VERSION}/calendar.tar.gz" && \ + "https://github.com/nextcloud-releases/calendar/releases/download/v${CALENDAR_VERSION}/calendar-v${CALENDAR_VERSION}.tar.gz" && \ tar -xf calendar.tar.gz -C ${BASE_DIR}/custom_apps/ && \ rm calendar.tar.gz; @@ -97,6 +96,7 @@ RUN apt-get -y remove unzip RUN sed -i "s/\$systemConfig->setValue('theme', '');/\$systemConfig->setValue('theme', 'eCloud');/g" ${BASE_DIR}/lib/base.php # Patches +COPY patches/ ${TMP_PATCH_DIR}/ RUN patch -u ${BASE_DIR}/core/Controller/LoginController.php -i ${TMP_PATCH_DIR}/002-login-without-domain.patch RUN patch -u ${BASE_DIR}/core/templates/layout.user.php -i ${TMP_PATCH_DIR}/003-contact-search-removal.patch RUN patch -u ${BASE_DIR}/core/Controller/ContactsMenuController.php -i ${TMP_PATCH_DIR}/004-contact-search-controller-removal.patch @@ -247,7 +247,7 @@ RUN apt-get -y install imagemagick;\ rm -rf /var/lib/apt/lists/*; VOLUME /var/www/html -ENV NEXTCLOUD_VERSION 21.0.7 +ENV NEXTCLOUD_VERSION 21.0.9 ENTRYPOINT ["/custom_entrypoint.sh"] CMD ["php-fpm"] -- GitLab From ac8389e369037e246909362a539946473ec797bc Mon Sep 17 00:00:00 2001 From: akhil Date: Tue, 8 Mar 2022 00:54:57 +0530 Subject: [PATCH 02/10] Edit patches to be compatible with 21.0.9 versions --- patches/005-autocomplete-user-leak-core.patch | 113 +++++++++--------- patches/009-help-links.patch | 46 +++---- patches/011-privacy-settings.patch | 26 ++-- 3 files changed, 94 insertions(+), 91 deletions(-) diff --git a/patches/005-autocomplete-user-leak-core.patch b/patches/005-autocomplete-user-leak-core.patch index 51c01edd..0a5b90f6 100644 --- a/patches/005-autocomplete-user-leak-core.patch +++ b/patches/005-autocomplete-user-leak-core.patch @@ -33,13 +33,13 @@ diff --git lib/private/Collaboration/Collaborators/MailPlugin.php lib/private/Co +use OCP\IUserManager; use OCP\IUserSession; use OCP\Share\IShare; - -@@ -71,13 +72,15 @@ - IConfig $config, + use OCP\Mail\IMailer; +@@ -75,13 +76,15 @@ IGroupManager $groupManager, KnownUserService $knownUserService, -- IUserSession $userSession) { -+ IUserSession $userSession, + IUserSession $userSession, +- IMailer $mailer) { ++ IMailer $mailer, + IUserManager $userManager) { $this->contactsManager = $contactsManager; $this->cloudIdManager = $cloudIdManager; @@ -47,11 +47,11 @@ diff --git lib/private/Collaboration/Collaborators/MailPlugin.php lib/private/Co $this->groupManager = $groupManager; $this->knownUserService = $knownUserService; $this->userSession = $userSession; -+ $this->userManager = $userManager; ++ $this->userManager = $userManager; + $this->mailer = $mailer; $this->shareeEnumeration = $this->config->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes') === 'yes'; - $this->shareWithGroupOnly = $this->config->getAppValue('core', 'shareapi_only_share_with_group_members', 'no') === 'yes'; -@@ -209,27 +212,62 @@ +@@ -218,27 +221,61 @@ if ($exactEmailMatch) { $searchResult->markExactIdMatch($emailType); } @@ -67,31 +67,31 @@ diff --git lib/private/Collaboration/Collaborators/MailPlugin.php lib/private/Co - ]; + $isUserinInstance = $this->userManager->get($emailAddress); + if ($isUserinInstance === null) { -+ // /e/ user is not in ecloud ++ // /e/ user is not in ecloud + + $result['exact'][] = [ -+ 'label' => $displayName, -+ 'uuid' => $contact['UID'], -+ 'name' => $contact['FN'], -+ 'type' => $emailAddressType ?? '', -+ 'value' => [ -+ 'shareType' => IShare::TYPE_EMAIL, -+ 'shareWith' => $emailAddress, -+ ], -+ ]; ++ 'label' => $displayName, ++ 'uuid' => $contact['UID'], ++ 'name' => $contact['FN'], ++ 'type' => $emailAddressType ?? '', ++ 'value' => [ ++ 'shareType' => IShare::TYPE_EMAIL, ++ 'shareWith' => $emailAddress, ++ ], ++ ]; + } else { -+ // /e/ user IS an ecloud user, convert to user share type -+ if (!$isUserinInstance->isEnabled()) { -+ // Ignore disabled users -+ continue; -+ } -+ $result['exact'][] = [ -+ 'label' => $displayName, -+ 'value' => [ -+ 'shareType' => IShare::TYPE_USER, -+ 'shareWith' => $emailAddress, -+ ], -+ ]; ++ // /e/ user IS an ecloud user, convert to user share type ++ if (!$isUserinInstance->isEnabled()) { ++ // Ignore disabled users ++ continue; ++ } ++ $result['exact'][] = [ ++ 'label' => $displayName, ++ 'value' => [ ++ 'shareType' => IShare::TYPE_USER, ++ 'shareWith' => $emailAddress, ++ ], ++ ]; + } } else { - $result['wide'][] = [ @@ -104,33 +104,32 @@ diff --git lib/private/Collaboration/Collaborators/MailPlugin.php lib/private/Co - 'shareWith' => $emailAddress, - ], - ]; -+ $isUserinInstance = $this->userManager->get($emailAddress); -+ if ($isUserinInstance === null) { -+ // /e/ user is not in ecloud -+ $result['wide'][] = [ -+ 'label' => $displayName, -+ 'uuid' => $contact['UID'], -+ 'name' => $contact['FN'], -+ 'type' => $emailAddressType ?? '', -+ 'value' => [ -+ 'shareType' => IShare::TYPE_EMAIL, -+ 'shareWith' => $emailAddress, -+ ], -+ ]; -+ } else { -+ // /e/ user IS an ecloud user, convert to user share type -+ if (!$isUserinInstance->isEnabled()) { -+ // Ignore disabled users -+ continue; -+ } -+ $result['wide'][] = [ -+ 'label' => $displayName, -+ 'value' => [ -+ 'shareType' => IShare::TYPE_USER, -+ 'shareWith' => $emailAddress, -+ ], -+ ]; -+ } ++ if ($isUserinInstance === null) { ++ // /e/ user is not in ecloud ++ $result['wide'][] = [ ++ 'label' => $displayName, ++ 'uuid' => $contact['UID'], ++ 'name' => $contact['FN'], ++ 'type' => $emailAddressType ?? '', ++ 'value' => [ ++ 'shareType' => IShare::TYPE_EMAIL, ++ 'shareWith' => $emailAddress, ++ ], ++ ]; ++ } else { ++ // /e/ user IS an ecloud user, convert to user share type ++ if (!$isUserinInstance->isEnabled()) { ++ // Ignore disabled users ++ continue; ++ } ++ $result['wide'][] = [ ++ 'label' => $displayName, ++ 'value' => [ ++ 'shareType' => IShare::TYPE_USER, ++ 'shareWith' => $emailAddress, ++ ], ++ ]; ++ } } } } diff --git a/patches/009-help-links.patch b/patches/009-help-links.patch index baae85b8..3c90df7c 100644 --- a/patches/009-help-links.patch +++ b/patches/009-help-links.patch @@ -19,48 +19,54 @@ help links are shown $policy->addAllowedFrameDomain('\'self\''); --- ./apps/settings/templates/help.php 2021-07-01 15:13:08.000000000 +0530 +++ ./apps/settings/templates/help-new.php 2021-08-10 17:22:42.771569854 +0530 -@@ -3,38 +3,21 @@ - ?> +@@ -4,45 +4,25 @@ - +- -
- diff --git a/patches/011-privacy-settings.patch b/patches/011-privacy-settings.patch index 17300809..0e3b201c 100644 --- a/patches/011-privacy-settings.patch +++ b/patches/011-privacy-settings.patch @@ -6,30 +6,28 @@ This patch removes certain unnecessary sections from the "privacy" section in pe --- ./apps/privacy/lib/Settings/MissionSettings.php 2021-09-07 17:38:08.650902445 +0530 +++ ./apps/privacy/lib/Settings/MissionSettings-new.php 2021-09-07 17:40:30.078256502 +0530 -@@ -41,8 +41,8 @@ - /** - * @return string - */ -- public function getSection():string { +@@ -45,7 +45,7 @@ + return null; + } + - return 'privacy'; -+ public function getSection() { + return null; } - /** + public function getPriority(): int { + --- ./apps/privacy/lib/Settings/UserDataManifestoSettings.php 2021-09-07 17:38:06.284224253 +0530 +++ ./apps/privacy/lib/Settings/UserDataManifestoSettings-new.php 2021-09-07 17:40:42.288315736 +0530 -@@ -41,8 +41,8 @@ - /** - * @return string - */ -- public function getSection():string { +@@ -45,7 +45,7 @@ + return null; + } + - return 'privacy'; -+ public function getSection() { + return null; } - /** + public function getPriority(): int { + --- ./apps/privacy/templates/who-has-access.php 2021-09-07 17:40:05.704804878 +0530 +++ ./apps/privacy/templates/who-has-access-new.php 2021-09-07 17:40:02.714790363 +0530 @@ -1,3 +1,8 @@ -- GitLab From 48c065a535991a242beaeb54622eedf324311eb1 Mon Sep 17 00:00:00 2001 From: akhil Date: Tue, 8 Mar 2022 01:09:09 +0530 Subject: [PATCH 03/10] Fixed patch 005 --- patches/005-autocomplete-user-leak-core.patch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/patches/005-autocomplete-user-leak-core.patch b/patches/005-autocomplete-user-leak-core.patch index 0a5b90f6..26cbf334 100644 --- a/patches/005-autocomplete-user-leak-core.patch +++ b/patches/005-autocomplete-user-leak-core.patch @@ -51,7 +51,7 @@ diff --git lib/private/Collaboration/Collaborators/MailPlugin.php lib/private/Co $this->mailer = $mailer; $this->shareeEnumeration = $this->config->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes') === 'yes'; -@@ -218,27 +221,61 @@ +@@ -218,27 +221,62 @@ if ($exactEmailMatch) { $searchResult->markExactIdMatch($emailType); } @@ -104,6 +104,7 @@ diff --git lib/private/Collaboration/Collaborators/MailPlugin.php lib/private/Co - 'shareWith' => $emailAddress, - ], - ]; ++ $isUserinInstance = $this->userManager->get($emailAddress); + if ($isUserinInstance === null) { + // /e/ user is not in ecloud + $result['wide'][] = [ -- GitLab From 26fed642350651f756f0ecd1a22a4c4fdad22783 Mon Sep 17 00:00:00 2001 From: akhil Date: Tue, 8 Mar 2022 01:20:24 +0530 Subject: [PATCH 04/10] Fixed version in version.php --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index dca5fdb0..47533d72 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ ARG EA_TAG="1.0.0" ARG ECLOUD_LAUNCHER_JOB_ID="222001" ARG GOOGLE_INTEGRATION_VERSION="1.0.6" -RUN sed -i 's/21,0,9,0/21,0,9,0/' ${BASE_DIR}/version.php +RUN sed -i 's/21,0,9,1/21,0,9,1/' ${BASE_DIR}/version.php # Install unzip for unzipping artifacts RUN apt-get update && apt-get install unzip -- GitLab From 26154074b39506b5d59fbdd0def94b4dd23cb453 Mon Sep 17 00:00:00 2001 From: akhil Date: Tue, 8 Mar 2022 12:12:25 +0530 Subject: [PATCH 05/10] Set quota warning to correct version --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 47533d72..e8329d48 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ ARG TMP_PATCH_DIR="/tmp/build_patches" ARG THEME_VERSION="21.1.1" ARG THEME_HELPER_VERSION="1.0.2" ARG NEWS_VERSION="17.0.1" -ARG QUOTA_WARN_VERSION="1.13.1" +ARG QUOTA_WARN_VERSION="1.13.0" ARG NOTES_VERSION="4.3.1" ARG CONTACTS_VERSION="4.0.8" ARG CALENDAR_VERSION="3.1.0" @@ -16,7 +16,7 @@ ARG EA_TAG="1.0.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,1/' ${BASE_DIR}/version.php +RUN sed -i 's/21,0,9,1/21,0,9,2/' ${BASE_DIR}/version.php # Install unzip for unzipping artifacts RUN apt-get update && apt-get install unzip -- GitLab From 9bb066d32a54cb74a92b6f0a65741db96cf8c60b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnau=20V=C3=A0zquez?= Date: Fri, 11 Mar 2022 11:32:09 +0000 Subject: [PATCH 06/10] Update calendar and rainloop --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e8329d48..d09013c7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,10 +7,10 @@ ARG NEWS_VERSION="17.0.1" ARG QUOTA_WARN_VERSION="1.13.0" ARG NOTES_VERSION="4.3.1" ARG CONTACTS_VERSION="4.0.8" -ARG CALENDAR_VERSION="3.1.0" +ARG CALENDAR_VERSION="3.2.0" ARG USER_BACKEND_RAW_SQL_VERSION="1.1.1" ARG EMAIL_RECOVERY_JOB_ID="199763" -ARG RAINLOOP_VERSION="7.1.2" +ARG RAINLOOP_VERSION="7.1.3" ARG RAINLOOP_COMMIT_SHA="e9da581c" ARG EA_TAG="1.0.0" ARG ECLOUD_LAUNCHER_JOB_ID="222001" -- GitLab From 9e1aab839b73811e82a54efe94a54529d345fbfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnau=20V=C3=A0zquez?= Date: Fri, 11 Mar 2022 11:32:29 +0000 Subject: [PATCH 07/10] Bump ecloud version --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d09013c7..64ad2a23 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ ARG EA_TAG="1.0.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,2/' ${BASE_DIR}/version.php +RUN sed -i 's/21,0,9,1/21,0,9,3/' ${BASE_DIR}/version.php # Install unzip for unzipping artifacts RUN apt-get update && apt-get install unzip -- GitLab From 29cd5973e4068566e11fb5b5699ef22f96000e97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnau=20V=C3=A0zquez?= Date: Fri, 11 Mar 2022 11:35:49 +0000 Subject: [PATCH 08/10] Roll back rainloop - only text update --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 64ad2a23..6d3a18bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ ARG CONTACTS_VERSION="4.0.8" ARG CALENDAR_VERSION="3.2.0" ARG USER_BACKEND_RAW_SQL_VERSION="1.1.1" ARG EMAIL_RECOVERY_JOB_ID="199763" -ARG RAINLOOP_VERSION="7.1.3" +ARG RAINLOOP_VERSION="7.1.2" ARG RAINLOOP_COMMIT_SHA="e9da581c" ARG EA_TAG="1.0.0" ARG ECLOUD_LAUNCHER_JOB_ID="222001" -- GitLab From c4bb8257ecc3b64fd604414d1d585c95328f530d Mon Sep 17 00:00:00 2001 From: akhil Date: Mon, 14 Mar 2022 14:02:56 +0530 Subject: [PATCH 09/10] calendar 3.1.0, nc 21.0.9.4 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6d3a18bb..d06aae4e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ ARG NEWS_VERSION="17.0.1" ARG QUOTA_WARN_VERSION="1.13.0" ARG NOTES_VERSION="4.3.1" ARG CONTACTS_VERSION="4.0.8" -ARG CALENDAR_VERSION="3.2.0" +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" @@ -16,7 +16,7 @@ ARG EA_TAG="1.0.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,3/' ${BASE_DIR}/version.php +RUN sed -i 's/21,0,9,1/21,0,9,4/' ${BASE_DIR}/version.php # Install unzip for unzipping artifacts RUN apt-get update && apt-get install unzip -- GitLab From 17a340e45e1740116d194f7f7be335321a4b49bf Mon Sep 17 00:00:00 2001 From: Ronak P Patel Date: Mon, 14 Mar 2022 08:40:21 +0000 Subject: [PATCH 10/10] correction in class attr in patch file --- patches/009-help-links.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/009-help-links.patch b/patches/009-help-links.patch index 3c90df7c..d5ec7a66 100644 --- a/patches/009-help-links.patch +++ b/patches/009-help-links.patch @@ -27,7 +27,7 @@ help links are shown - p('active'); -} ?>" - href=""> -+ - t('User documentation')); ?> -- GitLab