From 3a9e79144515d2fa0b1acf703a3fb92284e66582 Mon Sep 17 00:00:00 2001 From: akhil Date: Wed, 13 Oct 2021 15:35:38 +0530 Subject: [PATCH 01/32] Updated version numbers in Dockerfile --- Dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index a786563f..a826d132 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,13 @@ -FROM nextcloud:20.0.12-fpm +FROM nextcloud:21.0.5-fpm ARG BASE_DIR="/usr/src/nextcloud" ARG TMP_PATCH_DIR="/tmp/build_patches" ARG THEME_VERSION="20.1.2" ARG THEME_HELPER_VERSION="1.0.1" -ARG NEWS_VERSION="16.0.1" -ARG QUOTA_WARN_VERSION="1.9.1" +ARG NEWS_VERSION="16.1.0" +ARG QUOTA_WARN_VERSION="1.11.0" ARG NOTES_VERSION="4.1.1" -ARG CONTACTS_VERSION="4.0.1" -ARG CALENDAR_VERSION="2.3.3" +ARG CONTACTS_VERSION="4.0.3" +ARG CALENDAR_VERSION="2.3.4" ARG USER_BACKEND_RAW_SQL_VERSION="1.1.0" ARG EMAIL_RECOVERY_JOB_ID="199763" ARG RAINLOOP_VERSION="7.1.2" @@ -20,7 +20,7 @@ RUN mkdir -p /var/www/skeleton/Documents && mkdir -p /var/www/skeleton/Images COPY patches/ ${TMP_PATCH_DIR}/ COPY custom_entrypoint.sh / RUN chmod +x /custom_entrypoint.sh -RUN sed -i 's/20,0,12,1/20,0,12,14/' ${BASE_DIR}/version.php +RUN sed -i 's/21,0,5,0/21,0,5,0/' ${BASE_DIR}/version.php # Install unzip for unzipping artifacts RUN apt-get update && apt-get install unzip -- GitLab From 7b48a1624cddb8076d2ff883308d6e537fd77c27 Mon Sep 17 00:00:00 2001 From: akhil Date: Wed, 13 Oct 2021 17:07:09 +0530 Subject: [PATCH 02/32] Brought patches up to date with new nc versionn --- Dockerfile | 2 +- patches/005-autocomplete-user-leak-core.patch | 95 ++++++++----------- patches/006-recovery-email-changes.patch | 5 +- 3 files changed, 42 insertions(+), 60 deletions(-) diff --git a/Dockerfile b/Dockerfile index a826d132..32891a7e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,7 +32,7 @@ RUN curl -fsSL -o news.tar.gz \ rm news.tar.gz; RUN curl -fsSL -o quota_warning.tar.gz \ - "https://github.com/nextcloud/quota_warning/releases/download/v${QUOTA_WARN_VERSION}/quota_warning-${QUOTA_WARN_VERSION}.tar.gz" && \ + "https://github.com/nextcloud-releases/quota_warning/releases/download/v${QUOTA_WARN_VERSION}/quota_warning-${QUOTA_WARN_VERSION}.tar.gz" && \ tar -xf quota_warning.tar.gz -C ${BASE_DIR}/custom_apps/ && \ rm quota_warning.tar.gz; diff --git a/patches/005-autocomplete-user-leak-core.patch b/patches/005-autocomplete-user-leak-core.patch index ea8b0f9f..51c01edd 100644 --- a/patches/005-autocomplete-user-leak-core.patch +++ b/patches/005-autocomplete-user-leak-core.patch @@ -26,7 +26,7 @@ diff --git lib/private/Collaboration/Collaborators/UserPlugin.php lib/private/Co diff --git lib/private/Collaboration/Collaborators/MailPlugin.php lib/private/Collaboration/Collaborators/MailPlugin-new.php --- lib/private/Collaboration/Collaborators/MailPlugin.php 2021-06-22 14:53:24.451402977 +0530 +++ lib/private/Collaboration/Collaborators/MailPlugin-new.php 2021-06-22 14:56:31.201379020 +0530 -@@ -36,6 +36,7 @@ +@@ -37,6 +37,7 @@ use OCP\IConfig; use OCP\IGroupManager; use OCP\IUser; @@ -34,22 +34,24 @@ diff --git lib/private/Collaboration/Collaborators/MailPlugin.php lib/private/Co use OCP\IUserSession; use OCP\Share\IShare; -@@ -56,12 +57,13 @@ - /** @var IUserSession */ - private $userSession; - -- public function __construct(IManager $contactsManager, ICloudIdManager $cloudIdManager, IConfig $config, IGroupManager $groupManager, IUserSession $userSession) { -+ public function __construct(IManager $contactsManager, ICloudIdManager $cloudIdManager, IConfig $config, IGroupManager $groupManager, IUserSession $userSession, IUserManager $userManager) { +@@ -71,13 +72,15 @@ + IConfig $config, + IGroupManager $groupManager, + KnownUserService $knownUserService, +- IUserSession $userSession) { ++ IUserSession $userSession, ++ IUserManager $userManager) { $this->contactsManager = $contactsManager; $this->cloudIdManager = $cloudIdManager; $this->config = $config; $this->groupManager = $groupManager; - $this->userSession = $userSession; -+ $this->userManager = $userManager; + $this->knownUserService = $knownUserService; + $this->userSession = $userSession; ++ $this->userManager = $userManager; $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'; -@@ -185,43 +187,78 @@ +@@ -209,27 +212,62 @@ if ($exactEmailMatch) { $searchResult->markExactIdMatch($emailType); } @@ -103,53 +105,32 @@ 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 -+ $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, ++ ], ++ ]; ++ } } } } - } - - $reachedEnd = true; -- if (!$this->shareeEnumeration) { -- $result['wide'] = []; -- $userResults['wide'] = []; -- } else { -+// if (!$this->shareeEnumeration) { -+// $result['wide'] = []; -+// $userResults['wide'] = []; -+// } else { - $reachedEnd = (count($result['wide']) < $offset + $limit) && - (count($userResults['wide']) < $offset + $limit); - - $result['wide'] = array_slice($result['wide'], $offset, $limit); - $userResults['wide'] = array_slice($userResults['wide'], $offset, $limit); -- } -+// } - - - if (!$searchResult->hasExactIdMatch($emailType) && filter_var($search, FILTER_VALIDATE_EMAIL)) { diff --git a/patches/006-recovery-email-changes.patch b/patches/006-recovery-email-changes.patch index be661bc7..adc5377e 100644 --- a/patches/006-recovery-email-changes.patch +++ b/patches/006-recovery-email-changes.patch @@ -54,12 +54,13 @@ diff --git ./core/Controller/LostController.php ./core/Controller/LostController diff --git ./apps/settings/templates/settings/personal/personal.info.php ./apps/settings/templates/settings/personal/personal.info.new.php --- ./apps/settings/templates/settings/personal/personal.info.php 2021-04-22 07:49:34.926418855 +0530 +++ ./apps/settings/templates/settings/personal/personal.info.new.php 2021-04-22 07:50:00.026660710 +0530 -@@ -160,7 +160,7 @@ +@@ -157,7 +157,7 @@ print_unescaped('class="hidden"'); } ?> placeholder="t('Your email address')); ?>" - autocomplete="on" autocapitalize="none" autocorrect="off" /> + autocomplete="on" autocapitalize="none" autocorrect="off" readonly /> - + + -- GitLab From 37f3a3a7d0428bccbcb830666e9641488cba3b85 Mon Sep 17 00:00:00 2001 From: akhil Date: Wed, 13 Oct 2021 17:16:00 +0530 Subject: [PATCH 03/32] Corrected nc version --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 32891a7e..4bcca076 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,7 @@ RUN mkdir -p /var/www/skeleton/Documents && mkdir -p /var/www/skeleton/Images COPY patches/ ${TMP_PATCH_DIR}/ COPY custom_entrypoint.sh / RUN chmod +x /custom_entrypoint.sh -RUN sed -i 's/21,0,5,0/21,0,5,0/' ${BASE_DIR}/version.php +RUN sed -i 's/21,0,5,1/21,0,5,1/' ${BASE_DIR}/version.php # Install unzip for unzipping artifacts RUN apt-get update && apt-get install unzip -- GitLab From 1050a21a66c0bb584d7c57ed1f94af6e5a360444 Mon Sep 17 00:00:00 2001 From: akhil Date: Thu, 14 Oct 2021 17:42:30 +0530 Subject: [PATCH 04/32] Rsync integration_google app --- custom_entrypoint.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/custom_entrypoint.sh b/custom_entrypoint.sh index 36dfb301..65ebb0f0 100644 --- a/custom_entrypoint.sh +++ b/custom_entrypoint.sh @@ -29,6 +29,7 @@ if version_greater "$image_version" "$installed_version"; then rsync $rsync_options --include "/ecloud_drop_account/" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ rsync $rsync_options --include "/ecloud-theme-helper/" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ rsync $rsync_options --include "/ecloud-launcher/" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ + rsync $rsync_options --include "/integration_google/" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ rsync $rsync_options --include "/eCloud/" --exclude '/*' $SRC_DIR/themes/ $DST_DIR/themes/ else -- GitLab From 4acdb1d7edd3c940e66fafcbc62349f982361442 Mon Sep 17 00:00:00 2001 From: akhil Date: Thu, 14 Oct 2021 20:11:14 +0530 Subject: [PATCH 05/32] Updated launcher job id and eda tag --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4bcca076..61f84b76 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,8 +12,8 @@ ARG USER_BACKEND_RAW_SQL_VERSION="1.1.0" ARG EMAIL_RECOVERY_JOB_ID="199763" ARG RAINLOOP_VERSION="7.1.2" ARG RAINLOOP_COMMIT_SHA="aa5c57a7" -ARG EDA_TAG="nc-20" -ARG ECLOUD_LAUNCHER_JOB_ID="204816" +ARG EDA_TAG="nc-21" +ARG ECLOUD_LAUNCHER_JOB_ID="208960" ARG GOOGLE_INTEGRATION_VERSION="1.0.5-1-nightly" RUN mkdir -p /var/www/skeleton/Documents && mkdir -p /var/www/skeleton/Images -- GitLab From f0714dc2bd206f01a5a3c1a6c6cc8d119224eccf Mon Sep 17 00:00:00 2001 From: akhil Date: Wed, 20 Oct 2021 10:55:53 +0530 Subject: [PATCH 06/32] Added install imagemagick step --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 61f84b76..1fcb2d73 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,6 +25,9 @@ RUN sed -i 's/21,0,5,1/21,0,5,1/' ${BASE_DIR}/version.php # Install unzip for unzipping artifacts RUN apt-get update && apt-get install unzip +# To resolve warning about "SVG support" +RUN apt-get install imagemagick + # Custom apps RUN curl -fsSL -o news.tar.gz \ "https://github.com/nextcloud/news/releases/download/${NEWS_VERSION}/news.tar.gz" && \ -- GitLab From ffe82b636526f6cff33d0978eaaab2bcbb7f39d8 Mon Sep 17 00:00:00 2001 From: akhil Date: Wed, 20 Oct 2021 11:22:02 +0530 Subject: [PATCH 07/32] added -y when installing imagemagick --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1fcb2d73..165b2fcf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,7 +26,7 @@ RUN sed -i 's/21,0,5,1/21,0,5,1/' ${BASE_DIR}/version.php RUN apt-get update && apt-get install unzip # To resolve warning about "SVG support" -RUN apt-get install imagemagick +RUN apt-get -y install imagemagick # Custom apps RUN curl -fsSL -o news.tar.gz \ -- GitLab From 13364340d88ca87fd4e5d699f998ff84f9624e3e Mon Sep 17 00:00:00 2001 From: akhil Date: Tue, 16 Nov 2021 12:23:32 +0530 Subject: [PATCH 08/32] Fixed icons cacher and updater patches --- Dockerfile | 12 +++--- patches/008-icons-cacher-theme-svgs.patch | 44 +++++++++++---------- patches/010-disable-app-store-upgrade.patch | 21 +++++----- 3 files changed, 40 insertions(+), 37 deletions(-) diff --git a/Dockerfile b/Dockerfile index 165b2fcf..94cf52a5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,12 @@ -FROM nextcloud:21.0.5-fpm +FROM nextcloud:21.0.6-fpm ARG BASE_DIR="/usr/src/nextcloud" ARG TMP_PATCH_DIR="/tmp/build_patches" ARG THEME_VERSION="20.1.2" ARG THEME_HELPER_VERSION="1.0.1" -ARG NEWS_VERSION="16.1.0" +ARG NEWS_VERSION="16.2.0" ARG QUOTA_WARN_VERSION="1.11.0" -ARG NOTES_VERSION="4.1.1" -ARG CONTACTS_VERSION="4.0.3" +ARG NOTES_VERSION="4.2.0" +ARG CONTACTS_VERSION="4.0.6" ARG CALENDAR_VERSION="2.3.4" ARG USER_BACKEND_RAW_SQL_VERSION="1.1.0" ARG EMAIL_RECOVERY_JOB_ID="199763" @@ -14,13 +14,13 @@ ARG RAINLOOP_VERSION="7.1.2" ARG RAINLOOP_COMMIT_SHA="aa5c57a7" ARG EDA_TAG="nc-21" ARG ECLOUD_LAUNCHER_JOB_ID="208960" -ARG GOOGLE_INTEGRATION_VERSION="1.0.5-1-nightly" +ARG GOOGLE_INTEGRATION_VERSION="1.0.6-1-nightly" RUN mkdir -p /var/www/skeleton/Documents && mkdir -p /var/www/skeleton/Images COPY patches/ ${TMP_PATCH_DIR}/ COPY custom_entrypoint.sh / RUN chmod +x /custom_entrypoint.sh -RUN sed -i 's/21,0,5,1/21,0,5,1/' ${BASE_DIR}/version.php +RUN sed -i 's/21,0,6,1/21,0,6,1/' ${BASE_DIR}/version.php # Install unzip for unzipping artifacts RUN apt-get update && apt-get install unzip diff --git a/patches/008-icons-cacher-theme-svgs.patch b/patches/008-icons-cacher-theme-svgs.patch index 3a1aac74..11a7d2d6 100644 --- a/patches/008-icons-cacher-theme-svgs.patch +++ b/patches/008-icons-cacher-theme-svgs.patch @@ -6,40 +6,42 @@ This patch modifies Icons Cacher to check theme for icons and if they exist, cache them instead of the icons in core or apps directories diff --git ./lib/private/Template/IconsCacher.php ./lib/private/Template/IconsCacher-new.php ---- ./lib/private/Template/IconsCacher.php 2021-07-22 18:05:40.133856200 +0530 -+++ ./lib/private/Template/IconsCacher-new.php 2021-07-27 20:43:14.122338212 +0530 -@@ -161,20 +161,27 @@ - $location = ''; +--- ./lib/private/Template/IconsCacher.php 2021-11-16 11:42:40.162071882 +0530 ++++ ./lib/private/Template/IconsCacher-new.php 2021-11-16 11:59:07.575908578 +0530 +@@ -162,21 +162,29 @@ $color = ''; $base = $this->getRoutePrefix() . '/svg/'; -- $cleanUrl = \substr($url, \strlen($base)); -+ $cleanUrl = \substr($url, \strlen($base)); -+ $theme = \OC::$server->getConfig()->getSystemValue("theme"); + $cleanUrl = \substr($url, \strlen($base)); ++ $theme = \OC::$server->getConfig()->getSystemValue("theme"); if (\strpos($url, $base . 'core') === 0) { $cleanUrl = \substr($cleanUrl, \strlen('core')); if (\preg_match('/\/([a-zA-Z0-9-_\~\/\.\=\:\;\+\,]+)\?color=([0-9a-fA-F]{3,6})/', $cleanUrl, $matches)) { -- list(,$cleanUrl,$color) = $matches; + list(,$cleanUrl,$color) = $matches; - $location = \OC::$SERVERROOT . '/core/img/' . $cleanUrl . '.svg'; -+ list(,$cleanUrl,$color) = $matches; -+ $location = \OC::$SERVERROOT . '/themes/'. $theme . '/core/img/' . $cleanUrl . '.svg'; -+ if(!file_exists($location)){ -+ $location = \OC::$SERVERROOT . '/core/img/' . $cleanUrl . '.svg'; -+ } ++ $location = \OC::$SERVERROOT . '/themes/'. $theme . '/core/img/' . $cleanUrl . '.svg'; ++ if(!file_exists($location)){ ++ $location = \OC::$SERVERROOT . '/core/img/' . $cleanUrl . '.svg'; ++ } } } elseif (\strpos($url, $base) === 0) { if (\preg_match('/([A-z0-9\_\-]+)\/([a-zA-Z0-9-_\~\/\.\=\:\;\+\,]+)\?color=([0-9a-fA-F]{3,6})/', $cleanUrl, $matches)) { list(,$app,$cleanUrl, $color) = $matches; -- $location = \OC_App::getAppPath($app) . '/img/' . $cleanUrl . '.svg'; +- $appPath = \OC_App::getAppPath($app); +- if ($appPath !== false) { +- $location = $appPath . '/img/' . $cleanUrl . '.svg'; +- } - if ($app === 'settings') { - $location = \OC::$SERVERROOT . '/settings/img/' . $cleanUrl . '.svg'; -- } -+ $location = \OC::$SERVERROOT . '/themes/' . $theme . '/apps/' . $app . '/img/' . $cleanUrl . '.svg'; ++ $location = \OC::$SERVERROOT . '/themes/' . $theme . '/apps/' . $app . '/img/' . $cleanUrl . '.svg'; ++ + if(!file_exists($location)) { -+ $location = \OC_App::getAppPath($app) . '/img/' . $cleanUrl . '.svg'; -+ if ($app === 'settings') { -+ $location = \OC::$SERVERROOT . '/settings/img/' . $cleanUrl . '.svg'; -+ } ++ $appPath = \OC_App::getAppPath($app); ++ if ($appPath !== false) { ++ $location = $appPath . '/img/' . $cleanUrl . '.svg'; ++ } ++ if ($app === 'settings') { ++ $location = \OC::$SERVERROOT . '/settings/img/' . $cleanUrl . '.svg'; + } + } } } - return [ diff --git a/patches/010-disable-app-store-upgrade.patch b/patches/010-disable-app-store-upgrade.patch index 0810c6e2..569905c9 100644 --- a/patches/010-disable-app-store-upgrade.patch +++ b/patches/010-disable-app-store-upgrade.patch @@ -4,18 +4,19 @@ Subject: [PATCH] Disables app store checking during "occ upgrade" This patch disables checking the app store for app updates during "occ upgrade" ---- ./lib/private/Updater.php 2021-08-11 19:46:04.607195791 +0530 -+++ ./lib/private/Updater-new.php 2021-08-11 19:46:15.173946740 +0530 -@@ -261,9 +261,9 @@ - \OC::$server->getAppFetcher()->setVersion($currentVersion); +--- ./lib/private/Updater.php 2021-11-16 12:12:35.631823438 +0530 ++++ ./lib/private/Updater-new.php 2021-11-16 12:14:28.445155684 +0530 +@@ -268,11 +268,11 @@ + $appManager = \OC::$server->getAppManager(); // upgrade appstore apps -- $this->upgradeAppStoreApps(\OC::$server->getAppManager()->getInstalledApps()); -- $autoDisabledApps = \OC::$server->getAppManager()->getAutoDisabledApps(); -- $this->upgradeAppStoreApps($autoDisabledApps, true); -+ //$this->upgradeAppStoreApps(\OC::$server->getAppManager()->getInstalledApps()); -+ //$autoDisabledApps = \OC::$server->getAppManager()->getAutoDisabledApps(); -+ //$this->upgradeAppStoreApps($autoDisabledApps, true); +- $this->upgradeAppStoreApps($appManager->getInstalledApps()); ++ /*$this->upgradeAppStoreApps($appManager->getInstalledApps()); + $autoDisabledApps = $appManager->getAutoDisabledApps(); + if (!empty($autoDisabledApps)) { + $this->upgradeAppStoreApps(array_keys($autoDisabledApps), $autoDisabledApps); +- } ++ }*/ // install new shipped apps on upgrade $errors = Installer::installShippedApps(true); -- GitLab From 879502d75f8c9a83adbb047468374e6598a582b5 Mon Sep 17 00:00:00 2001 From: akhil Date: Tue, 16 Nov 2021 19:04:25 +0530 Subject: [PATCH 09/32] Added sed for new-contact event emission --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 94cf52a5..843b14e8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -123,6 +123,7 @@ RUN rm -rf ${TMP_PATCH_DIR} # autocomplete leak tweak apps frontend with sed, disable group suggestion RUN cd ${BASE_DIR}/custom_apps/contacts && sed -i 's/"GROUP","INDIVIDUAL"/"INDIVIDUAL"/g' js/contacts-main.js +RUN cd ${BASE_DIR}/custom_apps/contacts && sed -i 's/emit("new-contact")/emit("newContact")/g' js/contacts-main.js RUN cd ${BASE_DIR}/custom_apps/calendar && sed -i 's/"GROUP","INDIVIDUAL"/"INDIVIDUAL"/g' js/calendar.js RUN cd ${BASE_DIR}/custom_apps/calendar && sed -i 's/anyof/allof/g' js/calendar.js -- GitLab From 374deedced50c40a6f866a1fc7f066b03e23d18a Mon Sep 17 00:00:00 2001 From: akhil Date: Wed, 17 Nov 2021 13:20:01 +0530 Subject: [PATCH 10/32] NC 21.0.7 and php8 --- Dockerfile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 843b14e8..bcbcf84b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM nextcloud:21.0.6-fpm +FROM nextcloud:21.0.7-fpm AS nextcloud ARG BASE_DIR="/usr/src/nextcloud" ARG TMP_PATCH_DIR="/tmp/build_patches" ARG THEME_VERSION="20.1.2" @@ -16,11 +16,8 @@ ARG EDA_TAG="nc-21" ARG ECLOUD_LAUNCHER_JOB_ID="208960" ARG GOOGLE_INTEGRATION_VERSION="1.0.6-1-nightly" -RUN mkdir -p /var/www/skeleton/Documents && mkdir -p /var/www/skeleton/Images COPY patches/ ${TMP_PATCH_DIR}/ -COPY custom_entrypoint.sh / -RUN chmod +x /custom_entrypoint.sh -RUN sed -i 's/21,0,6,1/21,0,6,1/' ${BASE_DIR}/version.php +RUN sed -i 's/21,0,7,1/21,0,7,1/' ${BASE_DIR}/version.php # Install unzip for unzipping artifacts RUN apt-get update && apt-get install unzip @@ -144,5 +141,12 @@ RUN curl -fsSL -o eCloud-theme.tar.gz \ # Replace "Get your own free account" NC link with /e/ Account link in public pages RUN sed -i 's/https:\/\/nextcloud.com\/signup\//https:\/\/e\.foundation\/\/e-email-invite\//' ${BASE_DIR}/core/templates/layout.public.php +FROM php:8.0.12-fpm-bullseye +RUN mkdir -p /var/www/skeleton/Documents && mkdir -p /var/www/skeleton/Images +COPY --from=nextcloud /usr/src/nextcloud /usr/src/nextcloud + +COPY custom_entrypoint.sh / +RUN chmod +x /custom_entrypoint.sh + ENTRYPOINT ["/custom_entrypoint.sh"] CMD ["php-fpm"] -- GitLab From e22526f902b9beee5d38dd5f6cc86781e41cbb96 Mon Sep 17 00:00:00 2001 From: akhil Date: Wed, 17 Nov 2021 13:33:32 +0530 Subject: [PATCH 11/32] Copying entrypoint.sh from nextcloud stage --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index bcbcf84b..91b425b0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -146,7 +146,9 @@ RUN mkdir -p /var/www/skeleton/Documents && mkdir -p /var/www/skeleton/Images COPY --from=nextcloud /usr/src/nextcloud /usr/src/nextcloud COPY custom_entrypoint.sh / +COPY --from=nextcloud /entrypoint.sh / RUN chmod +x /custom_entrypoint.sh +RUN chmod +x /entrypoint.sh ENTRYPOINT ["/custom_entrypoint.sh"] CMD ["php-fpm"] -- GitLab From 5bbf46686f14ab1f43db4ff3432174c55d4e6d30 Mon Sep 17 00:00:00 2001 From: akhil Date: Wed, 17 Nov 2021 14:28:47 +0530 Subject: [PATCH 12/32] Copy over php to nc instead of nc to php --- Dockerfile | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 91b425b0..32d1b37d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,6 @@ -FROM nextcloud:21.0.7-fpm AS nextcloud +FROM php:8.0.12-fpm-bullseye as php8 + +FROM nextcloud:21.0.7-fpm ARG BASE_DIR="/usr/src/nextcloud" ARG TMP_PATCH_DIR="/tmp/build_patches" ARG THEME_VERSION="20.1.2" @@ -16,7 +18,12 @@ ARG EDA_TAG="nc-21" ARG ECLOUD_LAUNCHER_JOB_ID="208960" ARG GOOGLE_INTEGRATION_VERSION="1.0.6-1-nightly" +COPY --from=php8 /usr/local/ /usr/local/ + +RUN mkdir -p /var/www/skeleton/Documents && mkdir -p /var/www/skeleton/Images COPY patches/ ${TMP_PATCH_DIR}/ +COPY custom_entrypoint.sh / +RUN chmod +x /custom_entrypoint.sh RUN sed -i 's/21,0,7,1/21,0,7,1/' ${BASE_DIR}/version.php # Install unzip for unzipping artifacts @@ -141,14 +148,5 @@ RUN curl -fsSL -o eCloud-theme.tar.gz \ # Replace "Get your own free account" NC link with /e/ Account link in public pages RUN sed -i 's/https:\/\/nextcloud.com\/signup\//https:\/\/e\.foundation\/\/e-email-invite\//' ${BASE_DIR}/core/templates/layout.public.php -FROM php:8.0.12-fpm-bullseye -RUN mkdir -p /var/www/skeleton/Documents && mkdir -p /var/www/skeleton/Images -COPY --from=nextcloud /usr/src/nextcloud /usr/src/nextcloud - -COPY custom_entrypoint.sh / -COPY --from=nextcloud /entrypoint.sh / -RUN chmod +x /custom_entrypoint.sh -RUN chmod +x /entrypoint.sh - ENTRYPOINT ["/custom_entrypoint.sh"] CMD ["php-fpm"] -- GitLab From f99f09feff6a16c8335c07d18e40c90a5e2a5ad1 Mon Sep 17 00:00:00 2001 From: akhil Date: Wed, 17 Nov 2021 16:10:55 +0530 Subject: [PATCH 13/32] back to nc first and php next stage --- Dockerfile | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 32d1b37d..7fdcead1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,4 @@ -FROM php:8.0.12-fpm-bullseye as php8 - -FROM nextcloud:21.0.7-fpm +FROM nextcloud:21.0.7-fpm AS nextcloud ARG BASE_DIR="/usr/src/nextcloud" ARG TMP_PATCH_DIR="/tmp/build_patches" ARG THEME_VERSION="20.1.2" @@ -18,8 +16,6 @@ ARG EDA_TAG="nc-21" ARG ECLOUD_LAUNCHER_JOB_ID="208960" ARG GOOGLE_INTEGRATION_VERSION="1.0.6-1-nightly" -COPY --from=php8 /usr/local/ /usr/local/ - RUN mkdir -p /var/www/skeleton/Documents && mkdir -p /var/www/skeleton/Images COPY patches/ ${TMP_PATCH_DIR}/ COPY custom_entrypoint.sh / @@ -150,3 +146,17 @@ RUN sed -i 's/https:\/\/nextcloud.com\/signup\//https:\/\/e\.foundation\/ Date: Wed, 17 Nov 2021 16:35:53 +0530 Subject: [PATCH 14/32] Added extension install into php8 --- Dockerfile | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 91 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7fdcead1..78a90209 100644 --- a/Dockerfile +++ b/Dockerfile @@ -150,13 +150,103 @@ CMD ["php-fpm"] FROM php:8.0.12-fpm-bullseye RUN mkdir -p /var/www/skeleton/Documents && mkdir -p /var/www/skeleton/Images COPY --from=nextcloud /usr/src/nextcloud /usr/src/nextcloud +COPY --from=nextcloud /usr/local/etc/php/conf.d/ /usr/local/etc/php/conf.d/ +COPY --from=nextcloud /*.sh / +COPY --from=nextcloud /upgrade.exclude / COPY custom_entrypoint.sh / COPY --from=nextcloud /entrypoint.sh / RUN chmod +x /custom_entrypoint.sh RUN chmod +x /entrypoint.sh -RUN apt-get update && apt-get install -y rsync +RUN set -ex; \ + \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + rsync \ + bzip2 \ + busybox-static \ + libldap-common \ + ; \ + rm -rf /var/lib/apt/lists/*; \ + \ + mkdir -p /var/spool/cron/crontabs; \ + echo '*/5 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data + +# install the PHP extensions we need +# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html +ENV PHP_MEMORY_LIMIT 512M +ENV PHP_UPLOAD_LIMIT 512M +RUN set -ex; \ + \ + savedAptMark="$(apt-mark showmanual)"; \ + \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + libcurl4-openssl-dev \ + libevent-dev \ + libfreetype6-dev \ + libicu-dev \ + libjpeg-dev \ + libldap2-dev \ + libmcrypt-dev \ + libmemcached-dev \ + libpng-dev \ + libpq-dev \ + libxml2-dev \ + libmagickwand-dev \ + libzip-dev \ + libwebp-dev \ + libgmp-dev \ + ; \ + \ + debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ + docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp; \ + docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \ + docker-php-ext-install -j "$(nproc)" \ + bcmath \ + exif \ + gd \ + intl \ + ldap \ + opcache \ + pcntl \ + pdo_mysql \ + pdo_pgsql \ + zip \ + gmp \ + ; \ + \ +# pecl will claim success even if one install fails, so we need to perform each install separately + pecl install APCu-5.1.21; \ + pecl install memcached-3.1.5; \ + pecl install redis-5.3.4; \ + pecl install imagick-3.5.1; \ + \ + docker-php-ext-enable \ + apcu \ + memcached \ + redis \ + imagick \ + ; \ + rm -r /tmp/pear; \ + \ +# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies + apt-mark auto '.*' > /dev/null; \ + apt-mark manual $savedAptMark; \ + ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \ + | awk '/=>/ { print $3 }' \ + | sort -u \ + | xargs -r dpkg-query -S \ + | cut -d: -f1 \ + | sort -u \ + | xargs -rt apt-mark manual; \ + \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ + rm -rf /var/lib/apt/lists/* + +VOLUME /var/www/html +ENV NEXTCLOUD_VERSION 21.0.7 ENTRYPOINT ["/custom_entrypoint.sh"] CMD ["php-fpm"] \ No newline at end of file -- GitLab From f7edee41183889789d99b845eb5f2fe63491ad6c Mon Sep 17 00:00:00 2001 From: akhil Date: Wed, 17 Nov 2021 16:40:08 +0530 Subject: [PATCH 15/32] Copy over the crontabs file --- Dockerfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 78a90209..524ef25c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -153,6 +153,7 @@ COPY --from=nextcloud /usr/src/nextcloud /usr/src/nextcloud COPY --from=nextcloud /usr/local/etc/php/conf.d/ /usr/local/etc/php/conf.d/ COPY --from=nextcloud /*.sh / COPY --from=nextcloud /upgrade.exclude / +COPY --from=nextcloud /var/spool/cron/crontabs /var/spool/cron/crontabs COPY custom_entrypoint.sh / COPY --from=nextcloud /entrypoint.sh / @@ -168,10 +169,7 @@ RUN set -ex; \ busybox-static \ libldap-common \ ; \ - rm -rf /var/lib/apt/lists/*; \ - \ - mkdir -p /var/spool/cron/crontabs; \ - echo '*/5 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data + rm -rf /var/lib/apt/lists/*; # install the PHP extensions we need # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html -- GitLab From 1186ef28589d08108c2a68df320b306fe2d0af63 Mon Sep 17 00:00:00 2001 From: akhil Date: Wed, 17 Nov 2021 16:49:52 +0530 Subject: [PATCH 16/32] Added comments --- Dockerfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 524ef25c..032a7774 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,11 +16,8 @@ ARG EDA_TAG="nc-21" ARG ECLOUD_LAUNCHER_JOB_ID="208960" ARG GOOGLE_INTEGRATION_VERSION="1.0.6-1-nightly" -RUN mkdir -p /var/www/skeleton/Documents && mkdir -p /var/www/skeleton/Images COPY patches/ ${TMP_PATCH_DIR}/ -COPY custom_entrypoint.sh / -RUN chmod +x /custom_entrypoint.sh -RUN sed -i 's/21,0,7,1/21,0,7,1/' ${BASE_DIR}/version.php +RUN sed -i 's/21,0,7,0/21,0,7,0/' ${BASE_DIR}/version.php # Install unzip for unzipping artifacts RUN apt-get update && apt-get install unzip @@ -149,17 +146,21 @@ CMD ["php-fpm"] FROM php:8.0.12-fpm-bullseye RUN mkdir -p /var/www/skeleton/Documents && mkdir -p /var/www/skeleton/Images + +# Copy all the required files from the nextcloud stage COPY --from=nextcloud /usr/src/nextcloud /usr/src/nextcloud COPY --from=nextcloud /usr/local/etc/php/conf.d/ /usr/local/etc/php/conf.d/ COPY --from=nextcloud /*.sh / COPY --from=nextcloud /upgrade.exclude / COPY --from=nextcloud /var/spool/cron/crontabs /var/spool/cron/crontabs +COPY --from=nextcloud /entrypoint.sh / +# Copy entrypoints and add correct permissions COPY custom_entrypoint.sh / -COPY --from=nextcloud /entrypoint.sh / RUN chmod +x /custom_entrypoint.sh RUN chmod +x /entrypoint.sh +# Install required dependencies of nextcloud RUN set -ex; \ \ apt-get update; \ -- GitLab From da52d53788a331acf655147c5550d3a89902c5d1 Mon Sep 17 00:00:00 2001 From: akhil Date: Wed, 17 Nov 2021 16:54:27 +0530 Subject: [PATCH 17/32] Added imagemagick install step --- Dockerfile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 032a7774..4fe64086 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,9 +22,6 @@ RUN sed -i 's/21,0,7,0/21,0,7,0/' ${BASE_DIR}/version.php # Install unzip for unzipping artifacts RUN apt-get update && apt-get install unzip -# To resolve warning about "SVG support" -RUN apt-get -y install imagemagick - # Custom apps RUN curl -fsSL -o news.tar.gz \ "https://github.com/nextcloud/news/releases/download/${NEWS_VERSION}/news.tar.gz" && \ @@ -141,9 +138,7 @@ RUN curl -fsSL -o eCloud-theme.tar.gz \ # Replace "Get your own free account" NC link with /e/ Account link in public pages RUN sed -i 's/https:\/\/nextcloud.com\/signup\//https:\/\/e\.foundation\/\/e-email-invite\//' ${BASE_DIR}/core/templates/layout.public.php -ENTRYPOINT ["/custom_entrypoint.sh"] -CMD ["php-fpm"] - +# Use php 8 image FROM php:8.0.12-fpm-bullseye RUN mkdir -p /var/www/skeleton/Documents && mkdir -p /var/www/skeleton/Images @@ -169,6 +164,7 @@ RUN set -ex; \ bzip2 \ busybox-static \ libldap-common \ + imagemagick \ ; \ rm -rf /var/lib/apt/lists/*; -- GitLab From 7758040f01c45c96d8a1fcf57cddc7cc07517973 Mon Sep 17 00:00:00 2001 From: akhil Date: Wed, 17 Nov 2021 16:54:58 +0530 Subject: [PATCH 18/32] Bumped version number --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4fe64086..8adc2826 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ ARG ECLOUD_LAUNCHER_JOB_ID="208960" ARG GOOGLE_INTEGRATION_VERSION="1.0.6-1-nightly" COPY patches/ ${TMP_PATCH_DIR}/ -RUN sed -i 's/21,0,7,0/21,0,7,0/' ${BASE_DIR}/version.php +RUN sed -i 's/21,0,7,0/21,0,7,1/' ${BASE_DIR}/version.php # Install unzip for unzipping artifacts RUN apt-get update && apt-get install unzip -- GitLab From 3a77f1be38c5b263fb876c97d70d6539280ee87e Mon Sep 17 00:00:00 2001 From: akhil Date: Wed, 17 Nov 2021 17:05:21 +0530 Subject: [PATCH 19/32] Added imagemagick installation after other packages --- Dockerfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8adc2826..106ad44e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ ARG ECLOUD_LAUNCHER_JOB_ID="208960" ARG GOOGLE_INTEGRATION_VERSION="1.0.6-1-nightly" COPY patches/ ${TMP_PATCH_DIR}/ -RUN sed -i 's/21,0,7,0/21,0,7,1/' ${BASE_DIR}/version.php +RUN sed -i 's/21,0,7,0/21,0,7,2/' ${BASE_DIR}/version.php # Install unzip for unzipping artifacts RUN apt-get update && apt-get install unzip @@ -164,7 +164,6 @@ RUN set -ex; \ bzip2 \ busybox-static \ libldap-common \ - imagemagick \ ; \ rm -rf /var/lib/apt/lists/*; @@ -237,8 +236,11 @@ RUN set -ex; \ | sort -u \ | xargs -rt apt-mark manual; \ \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/* + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; + +# Install imagemagick +RUN apt-get -y install imagemagick +RUN rm -rf /var/lib/apt/lists/* VOLUME /var/www/html ENV NEXTCLOUD_VERSION 21.0.7 -- GitLab From cee32cfa9943eba45264719a20e8d4e87daac799 Mon Sep 17 00:00:00 2001 From: akhil Date: Thu, 18 Nov 2021 13:02:36 +0530 Subject: [PATCH 20/32] Updated news and user backend to latest versions --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 106ad44e..0b1190d3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,12 +3,12 @@ ARG BASE_DIR="/usr/src/nextcloud" ARG TMP_PATCH_DIR="/tmp/build_patches" ARG THEME_VERSION="20.1.2" ARG THEME_HELPER_VERSION="1.0.1" -ARG NEWS_VERSION="16.2.0" +ARG NEWS_VERSION="16.2.1" ARG QUOTA_WARN_VERSION="1.11.0" ARG NOTES_VERSION="4.2.0" ARG CONTACTS_VERSION="4.0.6" ARG CALENDAR_VERSION="2.3.4" -ARG USER_BACKEND_RAW_SQL_VERSION="1.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="aa5c57a7" @@ -17,7 +17,7 @@ ARG ECLOUD_LAUNCHER_JOB_ID="208960" ARG GOOGLE_INTEGRATION_VERSION="1.0.6-1-nightly" COPY patches/ ${TMP_PATCH_DIR}/ -RUN sed -i 's/21,0,7,0/21,0,7,2/' ${BASE_DIR}/version.php +RUN sed -i 's/21,0,7,2/21,0,7,3/' ${BASE_DIR}/version.php # Install unzip for unzipping artifacts RUN apt-get update && apt-get install unzip -- GitLab From 0daf28fed8089fea82e35359b06e200d59e1159f Mon Sep 17 00:00:00 2001 From: akhil Date: Thu, 18 Nov 2021 13:19:57 +0530 Subject: [PATCH 21/32] Fixes for google migration app translations --- Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0b1190d3..5a596c06 100644 --- a/Dockerfile +++ b/Dockerfile @@ -95,9 +95,6 @@ RUN apt-get -y remove unzip # force eCloud theme not to be disabled even when there is an upgrade process launched RUN sed -i "s/\$systemConfig->setValue('theme', '');/\$systemConfig->setValue('theme', 'eCloud');/g" ${BASE_DIR}/lib/base.php -# fix min version of google data migration app -RUN sed -i "s/min-version=\"22\"/min-version=\"20\"/" ${BASE_DIR}/custom_apps/integration_google/appinfo/info.xml - # Patches 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 @@ -127,6 +124,11 @@ RUN sed -i 's/recommendations,spreed,mail,calendar/calendar,tasks,notes/' ${BASE # Remove colored background from email template logo RUN sed -i 's/$this->header, \[$this->themingDefaults->getColorPrimary()/$this->header, \["none"/' ${BASE_DIR}/lib/private/Mail/EMailTemplate.php +# fix min version of google data migration app +RUN sed -i "s/min-version=\"22\"/min-version=\"21\"/" ${BASE_DIR}/custom_apps/integration_google/appinfo/info.xml +RUN sed -i 's/ in Nextcloud/ /' ${BASE_DIR}/custom_apps/integration_google/js/integration_google-personalSettings.js +RUN sed -i 's/Nextcloud administator/administator/' ${BASE_DIR}/custom_apps/integration_google/js/integration_google-personalSettings.js + # Custom theme RUN curl -fsSL -o eCloud-theme.tar.gz \ "https://gitlab.e.foundation/e/infra/nextcloud-theme/-/archive/${THEME_VERSION}/nextcloud-theme-${THEME_VERSION}.tar.gz" && \ -- GitLab From b49781b2a3db4dd7b2ec480ab8a11e6bc3a1c3a8 Mon Sep 17 00:00:00 2001 From: akhil Date: Thu, 18 Nov 2021 13:39:55 +0530 Subject: [PATCH 22/32] Corrected version change sed --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5a596c06..d47b7631 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ ARG ECLOUD_LAUNCHER_JOB_ID="208960" ARG GOOGLE_INTEGRATION_VERSION="1.0.6-1-nightly" COPY patches/ ${TMP_PATCH_DIR}/ -RUN sed -i 's/21,0,7,2/21,0,7,3/' ${BASE_DIR}/version.php +RUN sed -i 's/21,0,7,0/21,0,7,3/' ${BASE_DIR}/version.php # Install unzip for unzipping artifacts RUN apt-get update && apt-get install unzip -- GitLab From c21b95be2cdd73b649e7c81fb787bee8711eebeb Mon Sep 17 00:00:00 2001 From: akhil Date: Mon, 22 Nov 2021 19:04:39 +0530 Subject: [PATCH 23/32] Added sed for default event access class --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d47b7631..9629b45c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ ARG ECLOUD_LAUNCHER_JOB_ID="208960" ARG GOOGLE_INTEGRATION_VERSION="1.0.6-1-nightly" COPY patches/ ${TMP_PATCH_DIR}/ -RUN sed -i 's/21,0,7,0/21,0,7,3/' ${BASE_DIR}/version.php +RUN sed -i 's/21,0,7,0/21,0,7,4/' ${BASE_DIR}/version.php # Install unzip for unzipping artifacts RUN apt-get update && apt-get install unzip @@ -129,6 +129,9 @@ RUN sed -i "s/min-version=\"22\"/min-version=\"21\"/" ${BASE_DIR}/custom_apps/in RUN sed -i 's/ in Nextcloud/ /' ${BASE_DIR}/custom_apps/integration_google/js/integration_google-personalSettings.js RUN sed -i 's/Nextcloud administator/administator/' ${BASE_DIR}/custom_apps/integration_google/js/integration_google-personalSettings.js +# Set shared access class to CONFIDENTIAL by default +sed -i 's/defaultValue:"PUBLIC"/defaultValue:"CONFIDENTIAL"/' ${BASE_DIR}/custom_apps/calendar/js/calendar.js + # Custom theme RUN curl -fsSL -o eCloud-theme.tar.gz \ "https://gitlab.e.foundation/e/infra/nextcloud-theme/-/archive/${THEME_VERSION}/nextcloud-theme-${THEME_VERSION}.tar.gz" && \ -- GitLab From 8699f0007e3f76b7eecc48880b2b47e67858f0cb Mon Sep 17 00:00:00 2001 From: akhil Date: Mon, 22 Nov 2021 19:10:45 +0530 Subject: [PATCH 24/32] Set theme version to nc21; install imagemagick b4 extensions --- Dockerfile | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9629b45c..7f45949e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,8 @@ FROM nextcloud:21.0.7-fpm AS nextcloud ARG BASE_DIR="/usr/src/nextcloud" ARG TMP_PATCH_DIR="/tmp/build_patches" -ARG THEME_VERSION="20.1.2" +# temporarily setting theme version to "nc21" to test +ARG THEME_VERSION="nc21" ARG THEME_HELPER_VERSION="1.0.1" ARG NEWS_VERSION="16.2.1" ARG QUOTA_WARN_VERSION="1.11.0" @@ -14,7 +15,7 @@ ARG RAINLOOP_VERSION="7.1.2" ARG RAINLOOP_COMMIT_SHA="aa5c57a7" ARG EDA_TAG="nc-21" ARG ECLOUD_LAUNCHER_JOB_ID="208960" -ARG GOOGLE_INTEGRATION_VERSION="1.0.6-1-nightly" +ARG GOOGLE_INTEGRATION_VERSION="1.0.6" COPY patches/ ${TMP_PATCH_DIR}/ RUN sed -i 's/21,0,7,0/21,0,7,4/' ${BASE_DIR}/version.php @@ -169,9 +170,13 @@ RUN set -ex; \ bzip2 \ busybox-static \ libldap-common \ - ; \ + ; + +# Install imagemagick +RUN apt-get -y install imagemagick; \ rm -rf /var/lib/apt/lists/*; + # install the PHP extensions we need # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html ENV PHP_MEMORY_LIMIT 512M @@ -241,11 +246,8 @@ RUN set -ex; \ | sort -u \ | xargs -rt apt-mark manual; \ \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; - -# Install imagemagick -RUN apt-get -y install imagemagick -RUN rm -rf /var/lib/apt/lists/* + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ + rm -rf /var/lib/apt/lists/*; VOLUME /var/www/html ENV NEXTCLOUD_VERSION 21.0.7 -- GitLab From bed26709a725d3833085f9265800f763b4dd5faf Mon Sep 17 00:00:00 2001 From: akhil Date: Mon, 22 Nov 2021 19:14:54 +0530 Subject: [PATCH 25/32] Fixed syntax error --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7f45949e..ff1defe4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -131,7 +131,7 @@ RUN sed -i 's/ in Nextcloud/ /' ${BASE_DIR}/custom_apps/integration_google/js/in RUN sed -i 's/Nextcloud administator/administator/' ${BASE_DIR}/custom_apps/integration_google/js/integration_google-personalSettings.js # Set shared access class to CONFIDENTIAL by default -sed -i 's/defaultValue:"PUBLIC"/defaultValue:"CONFIDENTIAL"/' ${BASE_DIR}/custom_apps/calendar/js/calendar.js +RUN sed -i 's/defaultValue:"PUBLIC"/defaultValue:"CONFIDENTIAL"/' ${BASE_DIR}/custom_apps/calendar/js/calendar.js # Custom theme RUN curl -fsSL -o eCloud-theme.tar.gz \ -- GitLab From 57b4798dddeeae82cc7ea762caf0f113e0fab3b7 Mon Sep 17 00:00:00 2001 From: akhil Date: Mon, 22 Nov 2021 20:10:17 +0530 Subject: [PATCH 26/32] move back imagemagick install --- Dockerfile | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index ff1defe4..f3356aec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ ARG ECLOUD_LAUNCHER_JOB_ID="208960" ARG GOOGLE_INTEGRATION_VERSION="1.0.6" COPY patches/ ${TMP_PATCH_DIR}/ -RUN sed -i 's/21,0,7,0/21,0,7,4/' ${BASE_DIR}/version.php +RUN sed -i 's/21,0,7,0/21,0,7,5/' ${BASE_DIR}/version.php # Install unzip for unzipping artifacts RUN apt-get update && apt-get install unzip @@ -170,13 +170,9 @@ RUN set -ex; \ bzip2 \ busybox-static \ libldap-common \ - ; - -# Install imagemagick -RUN apt-get -y install imagemagick; \ + ; \ rm -rf /var/lib/apt/lists/*; - # install the PHP extensions we need # see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html ENV PHP_MEMORY_LIMIT 512M @@ -246,7 +242,10 @@ RUN set -ex; \ | sort -u \ | xargs -rt apt-mark manual; \ \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; + +# Install imagemagick +RUN apt-get -y install imagemagick;\ rm -rf /var/lib/apt/lists/*; VOLUME /var/www/html -- GitLab From 724671512b4e17666d3263bf53b6943ff5e77d2b Mon Sep 17 00:00:00 2001 From: akhil Date: Tue, 23 Nov 2021 21:20:15 +0530 Subject: [PATCH 27/32] Added sed for calendar search using only email --- Dockerfile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index f3356aec..20c491dd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ ARG ECLOUD_LAUNCHER_JOB_ID="208960" ARG GOOGLE_INTEGRATION_VERSION="1.0.6" COPY patches/ ${TMP_PATCH_DIR}/ -RUN sed -i 's/21,0,7,0/21,0,7,5/' ${BASE_DIR}/version.php +RUN sed -i 's/21,0,7,0/21,0,7,6/' ${BASE_DIR}/version.php # Install unzip for unzipping artifacts RUN apt-get update && apt-get install unzip @@ -117,7 +117,8 @@ RUN rm -rf ${TMP_PATCH_DIR} RUN cd ${BASE_DIR}/custom_apps/contacts && sed -i 's/"GROUP","INDIVIDUAL"/"INDIVIDUAL"/g' js/contacts-main.js RUN cd ${BASE_DIR}/custom_apps/contacts && sed -i 's/emit("new-contact")/emit("newContact")/g' js/contacts-main.js RUN cd ${BASE_DIR}/custom_apps/calendar && sed -i 's/"GROUP","INDIVIDUAL"/"INDIVIDUAL"/g' js/calendar.js -RUN cd ${BASE_DIR}/custom_apps/calendar && sed -i 's/anyof/allof/g' js/calendar.js +RUN cd ${BASE_DIR}/custom_apps/calendar && sed -i 's/{name:\[a,"displayname"\]},//' js/calendar.js +RUN cd ${BASE_DIR}/custom_apps/calendar && sed -i 's/defaultValue:"PUBLIC"/defaultValue:"CONFIDENTIAL"/' js/calendar.js # Set default widgets to calendar, tasks and notes RUN sed -i 's/recommendations,spreed,mail,calendar/calendar,tasks,notes/' ${BASE_DIR}/apps/dashboard/lib/Controller/DashboardController.php @@ -130,9 +131,6 @@ RUN sed -i "s/min-version=\"22\"/min-version=\"21\"/" ${BASE_DIR}/custom_apps/in RUN sed -i 's/ in Nextcloud/ /' ${BASE_DIR}/custom_apps/integration_google/js/integration_google-personalSettings.js RUN sed -i 's/Nextcloud administator/administator/' ${BASE_DIR}/custom_apps/integration_google/js/integration_google-personalSettings.js -# Set shared access class to CONFIDENTIAL by default -RUN sed -i 's/defaultValue:"PUBLIC"/defaultValue:"CONFIDENTIAL"/' ${BASE_DIR}/custom_apps/calendar/js/calendar.js - # Custom theme RUN curl -fsSL -o eCloud-theme.tar.gz \ "https://gitlab.e.foundation/e/infra/nextcloud-theme/-/archive/${THEME_VERSION}/nextcloud-theme-${THEME_VERSION}.tar.gz" && \ -- GitLab From f57929e2b35e75b2e7e70a81f7ad9c3132229f75 Mon Sep 17 00:00:00 2001 From: akhil Date: Tue, 23 Nov 2021 21:24:00 +0530 Subject: [PATCH 28/32] Updated launcher job id --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 20c491dd..294b3202 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ ARG EMAIL_RECOVERY_JOB_ID="199763" ARG RAINLOOP_VERSION="7.1.2" ARG RAINLOOP_COMMIT_SHA="aa5c57a7" ARG EDA_TAG="nc-21" -ARG ECLOUD_LAUNCHER_JOB_ID="208960" +ARG ECLOUD_LAUNCHER_JOB_ID="221991" ARG GOOGLE_INTEGRATION_VERSION="1.0.6" COPY patches/ ${TMP_PATCH_DIR}/ -- GitLab From b4a5b52e1648301896d4f491c4597ecfbf91d0ae Mon Sep 17 00:00:00 2001 From: akhil Date: Wed, 24 Nov 2021 16:32:22 +0530 Subject: [PATCH 29/32] Updated launcher job id and incremented version to get latest theme --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 294b3202..959a6d07 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,11 +14,11 @@ ARG EMAIL_RECOVERY_JOB_ID="199763" ARG RAINLOOP_VERSION="7.1.2" ARG RAINLOOP_COMMIT_SHA="aa5c57a7" ARG EDA_TAG="nc-21" -ARG ECLOUD_LAUNCHER_JOB_ID="221991" +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,6/' ${BASE_DIR}/version.php +RUN sed -i 's/21,0,7,0/21,0,7,7/' ${BASE_DIR}/version.php # Install unzip for unzipping artifacts RUN apt-get update && apt-get install unzip -- GitLab From 8f6ee87b6030b5ffb32ee5c3e7377181c70c8466 Mon Sep 17 00:00:00 2001 From: akhil Date: Wed, 24 Nov 2021 16:38:23 +0530 Subject: [PATCH 30/32] Added ecloud-main as theme helper version to test --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 959a6d07..7e32359e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ ARG BASE_DIR="/usr/src/nextcloud" ARG TMP_PATCH_DIR="/tmp/build_patches" # temporarily setting theme version to "nc21" to test ARG THEME_VERSION="nc21" -ARG THEME_HELPER_VERSION="1.0.1" +ARG THEME_HELPER_VERSION="ecloud-main" ARG NEWS_VERSION="16.2.1" ARG QUOTA_WARN_VERSION="1.11.0" ARG NOTES_VERSION="4.2.0" -- GitLab From 953740bbf56150ec92113df853037bee65042790 Mon Sep 17 00:00:00 2001 From: akhil Date: Wed, 24 Nov 2021 18:23:08 +0530 Subject: [PATCH 31/32] added new theme version and helper version --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7e32359e..92bbef1b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,8 @@ FROM nextcloud:21.0.7-fpm AS nextcloud ARG BASE_DIR="/usr/src/nextcloud" ARG TMP_PATCH_DIR="/tmp/build_patches" # temporarily setting theme version to "nc21" to test -ARG THEME_VERSION="nc21" -ARG THEME_HELPER_VERSION="ecloud-main" +ARG THEME_VERSION="21.0.0" +ARG THEME_HELPER_VERSION="1.0.2" ARG NEWS_VERSION="16.2.1" ARG QUOTA_WARN_VERSION="1.11.0" ARG NOTES_VERSION="4.2.0" @@ -18,7 +18,7 @@ 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,7/' ${BASE_DIR}/version.php +RUN sed -i 's/21,0,7,0/21,0,7,8/' ${BASE_DIR}/version.php # Install unzip for unzipping artifacts RUN apt-get update && apt-get install unzip -- GitLab From 9edffd67329d65d8e186e4b767a109cdd9c09477 Mon Sep 17 00:00:00 2001 From: akhil Date: Wed, 24 Nov 2021 19:38:44 +0530 Subject: [PATCH 32/32] Corrected typo --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 92bbef1b..11bc0466 100644 --- a/Dockerfile +++ b/Dockerfile @@ -129,7 +129,7 @@ RUN sed -i 's/$this->header, \[$this->themingDefaults->getColorPrimary()/$this-> # fix min version of google data migration app RUN sed -i "s/min-version=\"22\"/min-version=\"21\"/" ${BASE_DIR}/custom_apps/integration_google/appinfo/info.xml RUN sed -i 's/ in Nextcloud/ /' ${BASE_DIR}/custom_apps/integration_google/js/integration_google-personalSettings.js -RUN sed -i 's/Nextcloud administator/administator/' ${BASE_DIR}/custom_apps/integration_google/js/integration_google-personalSettings.js +RUN sed -i 's/Nextcloud administrator/administrator/' ${BASE_DIR}/custom_apps/integration_google/js/integration_google-personalSettings.js # Custom theme RUN curl -fsSL -o eCloud-theme.tar.gz \ -- GitLab