diff --git a/Dockerfile b/Dockerfile index 5112e630dc1cb4d8a37885588946c08e3a85b552..55bd939ce8ad9f55fa72bb5f4b73060ac8586391 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,22 +1,22 @@ -FROM nextcloud:27.1.8-fpm AS nextcloud +FROM nextcloud:28.0.9-fpm AS nextcloud ARG BASE_DIR="/usr/src/nextcloud" ARG TMP_PATCH_DIR="/tmp/build_patches" -ARG THEME_HELPER_JOB_ID="881917" -ARG NOTES_VERSION="4.9.4" +ARG THEME_HELPER_JOB_ID="998222" +ARG NOTES_VERSION="4.10.1" ARG CONTACTS_JOB_ID="881946" -ARG CALENDAR_JOB_ID="872766" -ARG EMAIL_RECOVERY_JOB_ID="940904" -ARG EA_JOB_ID="953602" -ARG LAUNCHER_JOB_ID="881954" +ARG CALENDAR_JOB_ID="991372" +ARG EMAIL_RECOVERY_JOB_ID="997842" +ARG EA_JOB_ID="991394" +ARG LAUNCHER_JOB_ID="991418" ARG GOOGLE_INTEGRATION_VERSION="2.2.0" -ARG DASHBOARD_JOB_ID="881962" -ARG SNAPPY_VERSION="2.36.0" +ARG DASHBOARD_JOB_ID="991426" +ARG SNAPPY_VERSION="2.37.2" ARG SNAPPY_THEME_VERSION="4.0.0" -ARG USER_MIGRATION_JOB_ID="881933" -ARG MEMORIES_VERSION="6.2.2" -ARG DROP_ACCOUNT_VERSION="2.3.2" +ARG USER_MIGRATION_JOB_ID="991454" +ARG MEMORIES_VERSION="7.3.1" +ARG DROP_ACCOUNT_VERSION="2.5.0" -RUN sed -i 's/27,1,8,2/27,1,8,4/' ${BASE_DIR}/version.php +RUN sed -i 's/28,0,9,1/28,0,9,3/' ${BASE_DIR}/version.php COPY custom_entrypoint.sh / RUN chmod +x /custom_entrypoint.sh RUN mkdir -p /var/www/skeleton/Documents && mkdir -p /var/www/skeleton/Images @@ -24,92 +24,92 @@ RUN mkdir -p /var/www/skeleton/Documents && mkdir -p /var/www/skeleton/Images RUN apt-get update && apt-get install -y unzip ffmpeg RUN curl -fsSL -o notes.tar.gz \ - "https://github.com/nextcloud/notes/releases/download/v${NOTES_VERSION}/notes.tar.gz" && \ - tar -xf notes.tar.gz -C ${BASE_DIR}/custom_apps/ && \ - rm notes.tar.gz; + "https://github.com/nextcloud-releases/notes/releases/download/v${NOTES_VERSION}/notes-v${NOTES_VERSION}.tar.gz" && \ + tar -xf notes.tar.gz -C ${BASE_DIR}/custom_apps/ && \ + rm notes.tar.gz; # custom Contact RUN curl -fsSL -o contacts.zip \ - "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/contacts/-/jobs/${CONTACTS_JOB_ID}/artifacts/download" && \ - unzip contacts.zip && \ - mv dist/contacts ${BASE_DIR}/custom_apps/ && \ - rm contacts.zip; + "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/contacts/-/jobs/${CONTACTS_JOB_ID}/artifacts/download" && \ + unzip contacts.zip && \ + mv dist/contacts ${BASE_DIR}/custom_apps/ && \ + rm contacts.zip; RUN curl -fsSL -o calendar.zip \ - "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/calendar/-/jobs/${CALENDAR_JOB_ID}/artifacts/download" && \ - unzip calendar.zip && \ - mv dist/calendar ${BASE_DIR}/custom_apps/ && \ - rm calendar.zip; + "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/calendar/-/jobs/${CALENDAR_JOB_ID}/artifacts/download" && \ + unzip calendar.zip && \ + mv dist/calendar ${BASE_DIR}/custom_apps/ && \ + rm calendar.zip; RUN curl -fsSL -o email-recovery.zip \ - "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/email-recovery/-/jobs/${EMAIL_RECOVERY_JOB_ID}/artifacts/download" && \ - unzip email-recovery.zip && \ - mv dist/email-recovery ${BASE_DIR}/custom_apps/ && \ - rm email-recovery.zip; + "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/email-recovery/-/jobs/${EMAIL_RECOVERY_JOB_ID}/artifacts/download" && \ + unzip email-recovery.zip && \ + mv dist/email-recovery ${BASE_DIR}/custom_apps/ && \ + rm email-recovery.zip; RUN curl -fsSL -o ecloud-theme-helper.zip \ - "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/ecloud-theme-helper/-/jobs/${THEME_HELPER_JOB_ID}/artifacts/download" && \ - unzip ecloud-theme-helper.zip && \ - mv dist/ecloud-theme-helper ${BASE_DIR}/custom_apps/ && \ - rm ecloud-theme-helper.zip; + "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/ecloud-theme-helper/-/jobs/${THEME_HELPER_JOB_ID}/artifacts/download" && \ + unzip ecloud-theme-helper.zip && \ + mv dist/ecloud-theme-helper ${BASE_DIR}/custom_apps/ && \ + rm ecloud-theme-helper.zip; RUN curl -fsSL -o murena_launcher.zip \ - "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/launcher/-/jobs/${LAUNCHER_JOB_ID}/artifacts/download" && \ - unzip murena_launcher.zip && \ - mv dist/murena_launcher ${BASE_DIR}/custom_apps/ && \ - rm murena_launcher.zip; + "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/launcher/-/jobs/${LAUNCHER_JOB_ID}/artifacts/download" && \ + unzip murena_launcher.zip && \ + mv dist/murena_launcher ${BASE_DIR}/custom_apps/ && \ + rm murena_launcher.zip; RUN curl -fsSL -o integration_google.tar.gz \ - "https://github.com/nextcloud-releases/integration_google/releases/download/v${GOOGLE_INTEGRATION_VERSION}/integration_google-v${GOOGLE_INTEGRATION_VERSION}.tar.gz" && \ - tar -xf integration_google.tar.gz -C ${BASE_DIR}/custom_apps/ && \ - chown -R www-data:www-data ${BASE_DIR}/custom_apps/integration_google && \ - rm integration_google.tar.gz; + "https://github.com/nextcloud-releases/integration_google/releases/download/v${GOOGLE_INTEGRATION_VERSION}/integration_google-v${GOOGLE_INTEGRATION_VERSION}.tar.gz" && \ + tar -xf integration_google.tar.gz -C ${BASE_DIR}/custom_apps/ && \ + chown -R www-data:www-data ${BASE_DIR}/custom_apps/integration_google && \ + rm integration_google.tar.gz; RUN curl -fsSL -o ecloud-accounts.zip \ - "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/ecloud-accounts/-/jobs/${EA_JOB_ID}/artifacts/download" && \ - unzip ecloud-accounts.zip && \ - mv dist/ecloud-accounts ${BASE_DIR}/custom_apps/ && \ - rm ecloud-accounts.zip; + "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/ecloud-accounts/-/jobs/${EA_JOB_ID}/artifacts/download" && \ + unzip ecloud-accounts.zip && \ + mv dist/ecloud-accounts ${BASE_DIR}/custom_apps/ && \ + rm ecloud-accounts.zip; RUN curl -fsSL -o ecloud-dashboard.zip \ - "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/murena-dashboard/-/jobs/${DASHBOARD_JOB_ID}/artifacts/download" && \ - unzip ecloud-dashboard.zip && \ - mv dist/murena-dashboard ${BASE_DIR}/custom_apps/ && \ - rm ecloud-dashboard.zip; + "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/murena-dashboard/-/jobs/${DASHBOARD_JOB_ID}/artifacts/download" && \ + unzip ecloud-dashboard.zip && \ + mv dist/murena-dashboard ${BASE_DIR}/custom_apps/ && \ + rm ecloud-dashboard.zip; RUN curl -fsSL -o snappymail.tar.gz \ - "https://snappymail.eu/repository/nextcloud/snappymail-${SNAPPY_VERSION}-nextcloud.tar.gz" && \ - tar -xf snappymail.tar.gz -C ${BASE_DIR}/custom_apps/ && \ - rm snappymail.tar.gz; + "https://snappymail.eu/repository/nextcloud/snappymail-${SNAPPY_VERSION}-nextcloud.tar.gz" && \ + tar -xf snappymail.tar.gz -C ${BASE_DIR}/custom_apps/ && \ + rm snappymail.tar.gz; RUN curl -fsSL -o user_migration.zip \ - "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/user_migration/-/jobs/${USER_MIGRATION_JOB_ID}/artifacts/download" && \ - unzip user_migration.zip && \ - mv dist/user_migration ${BASE_DIR}/custom_apps/ && \ - rm user_migration.zip; + "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/user_migration/-/jobs/${USER_MIGRATION_JOB_ID}/artifacts/download" && \ + unzip user_migration.zip && \ + mv dist/user_migration ${BASE_DIR}/custom_apps/ && \ + rm user_migration.zip; # Fix snappymail icon RUN sed -i 's/logo-white-64x64.png/app.svg/' ${BASE_DIR}/custom_apps/snappymail/appinfo/info.xml # Snappy theme RUN curl -fsSL -o Murena-snappymail-theme.tar.gz \ - "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/snappymail-theme/-/archive/${SNAPPY_THEME_VERSION}/snappymail-theme-${SNAPPY_THEME_VERSION}.tar.gz" && \ - tar -xf Murena-snappymail-theme.tar.gz -C /tmp/ && \ - mkdir -p ${BASE_DIR}/themes/Murena && \ - mv /tmp/snappymail-theme-${SNAPPY_THEME_VERSION}/ ${BASE_DIR}/themes/Murena/snappymail && \ - chown -R www-data:www-data ${BASE_DIR}/themes/Murena/ && \ - rm -rf Murena-snappymail-theme.tar.gz + "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/snappymail-theme/-/archive/${SNAPPY_THEME_VERSION}/snappymail-theme-${SNAPPY_THEME_VERSION}.tar.gz" && \ + tar -xf Murena-snappymail-theme.tar.gz -C /tmp/ && \ + mkdir -p ${BASE_DIR}/themes/Murena && \ + mv /tmp/snappymail-theme-${SNAPPY_THEME_VERSION}/ ${BASE_DIR}/themes/Murena/snappymail && \ + chown -R www-data:www-data ${BASE_DIR}/themes/Murena/ && \ + rm -rf Murena-snappymail-theme.tar.gz RUN curl -fsSL -o memories.tar.gz \ - "https://github.com/pulsejet/memories/releases/download/v${MEMORIES_VERSION}/memories.tar.gz" && \ - tar -xf memories.tar.gz -C ${BASE_DIR}/custom_apps/ && \ - rm memories.tar.gz; + "https://github.com/pulsejet/memories/releases/download/v${MEMORIES_VERSION}/memories.tar.gz" && \ + tar -xf memories.tar.gz -C ${BASE_DIR}/custom_apps/ && \ + rm memories.tar.gz; RUN curl -fsSL -o drop_account.tar.gz \ - "https://packages.framasoft.org/projects/nextcloud-apps/drop-account/drop_account-${DROP_ACCOUNT_VERSION}.tar.gz" && \ - tar -xf drop_account.tar.gz -C ${BASE_DIR}/custom_apps/ && \ - rm drop_account.tar.gz; + "https://packages.framasoft.org/projects/nextcloud-apps/drop-account/drop_account-${DROP_ACCOUNT_VERSION}.tar.gz" && \ + tar -xf drop_account.tar.gz -C ${BASE_DIR}/custom_apps/ && \ + rm drop_account.tar.gz; @@ -120,7 +120,7 @@ RUN apt-get -y remove unzip RUN sed -i "s/\$systemConfig->setValue('theme', '');/\$systemConfig->setValue('theme', 'eCloud');/g" ${BASE_DIR}/lib/base.php # Disable editor feature of media viewer -RUN sed -i 's/!this.isMobile/!this.isMobile\&\&false/' ${BASE_DIR}/apps/viewer/js/viewer-main.js +RUN sed -i 's/canEdit(){var e,t;return!this.isMobile/canEdit(){var e,t;return!this.isMobile\&\&false/' ${BASE_DIR}/apps/viewer/js/viewer-main.js ENTRYPOINT ["/custom_entrypoint.sh"] CMD ["php-fpm"] @@ -129,7 +129,7 @@ From nextcloud as selfhost ARG BASE_DIR="/usr/src/nextcloud" ARG TMP_PATCH_DIR="/tmp/build_patches" ARG THEME_VERSION="26.0.2" -ARG USER_BACKEND_RAW_SQL_VERSION="1.3.0" +ARG USER_BACKEND_RAW_SQL_VERSION="2.0.1" ARG SELFHOST_THEME_VERSION="2.0.0" ARG IS_SELFHOST=true @@ -147,7 +147,7 @@ RUN cd ${BASE_DIR} && patch -p0 < ${TMP_PATCH_DIR}/015-email-mail-template.patch RUN patch -u ${BASE_DIR}/core/Command/User/Setting.php -i ${TMP_PATCH_DIR}/018-occ-user-setting.patch RUN patch -u ${BASE_DIR}/apps/files/js/files.js -i ${TMP_PATCH_DIR}/021-repeated-storage-dialog-fix.patch RUN cd ${BASE_DIR} && patch -u ${BASE_DIR}/3rdparty/sabre/vobject/lib/ITip/Broker.php -i ${TMP_PATCH_DIR}/022-significantchange.patch -RUN patch -u ${BASE_DIR}/apps/theming/lib/Themes/CommonThemeTrait.php -i ${TMP_PATCH_DIR}/026-primary-color-fix.patch +RUN cd ${BASE_DIR} && patch -p0 < ${TMP_PATCH_DIR}/026-primary-color-fix.patch RUN patch -u ${BASE_DIR}/lib/private/Template/JSResourceLocator.php -i ${TMP_PATCH_DIR}/031-theme-custom-app-translations.patch RUN patch -u ${BASE_DIR}/lib/private/L10N/Factory.php -i ${TMP_PATCH_DIR}/032-select-lang-from-session.patch # UserConfigChangedEvent Ref: https://github.com/nextcloud/server/pull/42039 @@ -156,27 +156,27 @@ RUN rm -rf ${TMP_PATCH_DIR} # Custom theme RUN curl -fsSL -o eCloud-theme.tar.gz \ - "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/nextcloud-theme/-/archive/${THEME_VERSION}/nextcloud-theme-${THEME_VERSION}.tar.gz" && \ - tar -xf eCloud-theme.tar.gz -C /tmp/ && \ - mv /tmp/nextcloud-theme-${THEME_VERSION}/ ${BASE_DIR}/themes/eCloud && \ - chown -R www-data:www-data ${BASE_DIR}/themes/eCloud/ && \ - rm -rf eCloud-theme.tar.gz ${BASE_DIR}/themes/example/ + "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/nextcloud-theme/-/archive/${THEME_VERSION}/nextcloud-theme-${THEME_VERSION}.tar.gz" && \ + tar -xf eCloud-theme.tar.gz -C /tmp/ && \ + mv /tmp/nextcloud-theme-${THEME_VERSION}/ ${BASE_DIR}/themes/eCloud && \ + chown -R www-data:www-data ${BASE_DIR}/themes/eCloud/ && \ + rm -rf eCloud-theme.tar.gz ${BASE_DIR}/themes/example/ # User Backend RUN curl -fsSL -o user_backend_sql_raw.tar.gz \ - "https://github.com/PanCakeConnaisseur/user_backend_sql_raw/releases/download/v${USER_BACKEND_RAW_SQL_VERSION}/user_backend_sql_raw.tar.gz" && \ - tar -xf user_backend_sql_raw.tar.gz -C ${BASE_DIR}/custom_apps/ && \ - rm user_backend_sql_raw.tar.gz; + "https://github.com/PanCakeConnaisseur/user_backend_sql_raw/releases/download/v${USER_BACKEND_RAW_SQL_VERSION}/user_backend_sql_raw.tar.gz" && \ + tar -xf user_backend_sql_raw.tar.gz -C ${BASE_DIR}/custom_apps/ && \ + rm user_backend_sql_raw.tar.gz; # Selfhost theme RUN if [ "$IS_SELFHOST" = true ]; then \ - curl -fsSL -o selfhost-theme-helper.tar.gz \ - "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/selfhost-theme-helper/-/archive/${SELFHOST_THEME_VERSION}/selfhost-theme-helper-${SELFHOST_THEME_VERSION}.tar.gz" && \ - tar -xf selfhost-theme-helper.tar.gz -C /tmp/ && \ - mv /tmp/selfhost-theme-helper-${SELFHOST_THEME_VERSION}/ ${BASE_DIR}/custom_apps/selfhost-theme-helper && \ - chown -R www-data:www-data ${BASE_DIR}/custom_apps/selfhost-theme-helper/ && \ - rm -f selfhost-theme-helper.tar.gz;\ - fi + curl -fsSL -o selfhost-theme-helper.tar.gz \ + "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/selfhost-theme-helper/-/archive/${SELFHOST_THEME_VERSION}/selfhost-theme-helper-${SELFHOST_THEME_VERSION}.tar.gz" && \ + tar -xf selfhost-theme-helper.tar.gz -C /tmp/ && \ + mv /tmp/selfhost-theme-helper-${SELFHOST_THEME_VERSION}/ ${BASE_DIR}/custom_apps/selfhost-theme-helper && \ + chown -R www-data:www-data ${BASE_DIR}/custom_apps/selfhost-theme-helper/ && \ + rm -f selfhost-theme-helper.tar.gz;\ + fi @@ -198,23 +198,23 @@ RUN sed -i "s/\['total'\]/\['quota'\]/" ${BASE_DIR}/apps/provisioning_api/lib/Co # Fix API call in files script RUN sed -i "s/ajax\/getstoragestats/api\/v1\/stats/g" ${BASE_DIR}/apps/files/js/files.js +#fix for who can access data- its needed with 011-privacy-settings.patch +RUN sed -i 's|Your home storage is encrypted using {linkopen}server-side-encryption ↗{linkclose} with a master key\. It means that administrators can access your files, but not read their content\.|Like in most cloud services, a reduced number of administrators can see your files and all the information in the database as they need to make backups, perform upgrades, reset passwords, etc.
{linkopen1}Learn more about this topic here. ↗{linkclose1}|g' ${BASE_DIR}/apps/privacy/js/privacy-main.js +RUN sed -i 's/t((0,n\.Iu)("privacy","Your files on external storages may be encrypted using {linkopen}server-side-encryption ↗{linkclose} with a master key based on their configuration\."))/t("{linkopen}"+(0,n\.Iu)("privacy","To protect your data, we have implemented server-side-encryption on our servers which hides by default the content of your files and notes even to these administrators")+"↗{linkclose}")/g' ${BASE_DIR}/apps/privacy/js/privacy-main.js +RUN sed -i 's|t=t=>e.push(t.replace("{linkopen}",'"'"''"'"').replace("{linkclose}",""))|t=t=>e.push(t.replace("{linkopen}",'"'"''"'"').replace("{linkclose}",""))|g' ${BASE_DIR}/apps/privacy/js/privacy-main.js +RUN sed -i 's|.replace("{linkclose}","")|.replace("{linkclose}","").replace("{linkopen1}",'"'"''"'"').replace("{linkclose1}","")|g' ${BASE_DIR}/apps/privacy/js/privacy-main.js + From selfhost as ecloud ARG BASE_DIR="/usr/src/nextcloud" ARG TMP_PATCH_DIR="/tmp/build_patches" -ARG THEME_VERSION="26.0.2" -ARG LDAP_WRITE_SUPPORT_VERSION="1.9.0" -ARG OIDC_LOGIN_VERSION="3.0.2" +ARG THEME_VERSION="28.0.1" +ARG LDAP_WRITE_SUPPORT_VERSION="1.10.0" ARG IS_SELFHOST=false RUN curl -fsSL -o ldap_write_support.tar.gz \ - "https://github.com/nextcloud-releases/ldap_write_support/releases/download/v${LDAP_WRITE_SUPPORT_VERSION}/ldap_write_support-v${LDAP_WRITE_SUPPORT_VERSION}.tar.gz" && \ - tar -xf ldap_write_support.tar.gz -C ${BASE_DIR}/custom_apps && \ - rm ldap_write_support.tar.gz - -RUN curl -fsSL -o oidc_login.tar.gz \ - "https://github.com/pulsejet/nextcloud-oidc-login/releases/download/v${OIDC_LOGIN_VERSION}/oidc_login.tar.gz" && \ - tar -xf oidc_login.tar.gz -C ${BASE_DIR}/custom_apps && \ - rm oidc_login.tar.gz + "https://github.com/nextcloud-releases/ldap_write_support/releases/download/v${LDAP_WRITE_SUPPORT_VERSION}/ldap_write_support-v${LDAP_WRITE_SUPPORT_VERSION}.tar.gz" && \ + tar -xf ldap_write_support.tar.gz -C ${BASE_DIR}/custom_apps && \ + rm ldap_write_support.tar.gz # Patches COPY patches/ ${TMP_PATCH_DIR}/ @@ -236,19 +236,13 @@ RUN rm -rf ${TMP_PATCH_DIR} # Remove user avatar generation for system addressbook card RUN sed -i 's/$this->getAvatarImage($user)/null/' ${BASE_DIR}/apps/dav/lib/CardDAV/Converter.php -# 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 - # show reset pwd page with a query param # RUN cd ${BASE_DIR}/dist && sed -i 's/resetPassword:!1/resetPassword:!1||Z.showResetPassword==="1"/' core-login.js -# hide oidc login button -RUN sed -i 's/$context->registerAlternativeLogin(OIDCLoginOption::class);/\/\/$context->registerAlternativeLogin(OIDCLoginOption::class);/' ${BASE_DIR}/custom_apps/oidc_login/lib/AppInfo/Application.php - # add attr about how many notifications to notif icon -RUN sed -i 's/attrs:{id:"notifications",/attrs:{id:"notifications","data-has-notifications":0!==t.notifications.length,/' ${BASE_DIR}/apps/notifications/js/notifications-node_modules_moment_locale_sync_recursive_-src_NotificationsApp_vue.js +RUN sed -i 's/attrs:{id:"notifications",/attrs:{id:"notifications","data-has-notifications":0!==t.notifications.length,/' ${BASE_DIR}/apps/notifications/js/notifications-node_modules_moment_locale_sync_recursive_-src_NotificationsApp_vue-data_image_svg_xml_base64-ab95a3.js # Add data-object-type to notification -RUN sed -i 's/"data-id":t.notificationId,/"data-id":t.notificationId,"data-object-type":t.objectType,/' ${BASE_DIR}/apps/notifications/js/notifications-node_modules_moment_locale_sync_recursive_-src_NotificationsApp_vue.js +RUN sed -i 's/"data-id":t.notificationId,/"data-id":t.notificationId,"data-object-type":t.objectType,/' ${BASE_DIR}/apps/notifications/js/notifications-node_modules_moment_locale_sync_recursive_-src_NotificationsApp_vue-data_image_svg_xml_base64-ab95a3.js # Rename Memories to Gallery RUN sed -i 's/Memories<\/name>/Gallery<\/name>/g' ${BASE_DIR}/custom_apps/memories/appinfo/info.xml @@ -276,19 +270,26 @@ RUN sed -i 's/$this->changeAvatar/\/\/ $this->changeAvatar/' ${BASE_DIR}/custom_ # Remove 'fix broken values of calendar objects' repair step RUN sed -i '/OCA\\DAV\\Migration\\CalDAVRemoveEmptyValue<\/step>/d' ${BASE_DIR}/apps/dav/appinfo/info.xml +# Hide `Play sound when a call started (requires Nextcloud Talk)` checkbox from notification setting +RUN sed -i 's/attrs:{checked:e\.config\.sound_talk}/staticClass:"notification_talk",attrs:{checked:e\.config\.sound_talk}/g' ${BASE_DIR}/apps/notifications/js/notifications-settings.js + +# Hide `Navigation bar settings` from theming +RUN sed -i 's/{attrs:{name:t.t("theming","Navigation bar settings")}}/{staticClass:"navigation-bar-settings",attrs:{name:t.t("theming","Navigation bar settings")}}/g' ${BASE_DIR}/dist/theming-personal-theming.js + + # Custom theme RUN rm -rf ${BASE_DIR}/themes/eCloud && \ - curl -fsSL -o eCloud-theme.tar.gz \ - "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/nextcloud-theme/-/archive/${THEME_VERSION}/nextcloud-theme-${THEME_VERSION}.tar.gz" && \ - tar -xf eCloud-theme.tar.gz -C /tmp/ && \ - mv /tmp/nextcloud-theme-${THEME_VERSION}/ ${BASE_DIR}/themes/eCloud && \ - chown -R www-data:www-data ${BASE_DIR}/themes/eCloud/ && \ - rm -rf eCloud-theme.tar.gz ${BASE_DIR}/themes/example/ + curl -fsSL -o eCloud-theme.tar.gz \ + "https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/nextcloud-theme/-/archive/${THEME_VERSION}/nextcloud-theme-${THEME_VERSION}.tar.gz" && \ + tar -xf eCloud-theme.tar.gz -C /tmp/ && \ + mv /tmp/nextcloud-theme-${THEME_VERSION}/ ${BASE_DIR}/themes/eCloud && \ + chown -R www-data:www-data ${BASE_DIR}/themes/eCloud/ && \ + rm -rf eCloud-theme.tar.gz ${BASE_DIR}/themes/example/ # Remove Selfhost theme RUN if [ "$IS_SELFHOST" = false ]; then \ - rm -rf ${BASE_DIR}/custom_apps/selfhost-theme-helper;\ - fi + rm -rf ${BASE_DIR}/custom_apps/selfhost-theme-helper;\ + fi # Seds to fix displayname save regression RUN sed -i "s/'email' ||/'email'/" ${BASE_DIR}/apps/settings/js/federationsettingsview.js @@ -299,3 +300,9 @@ RUN sed -i "s/return in_array(\$user->getBackendClassName(), \['Database', 'Gues # Seds to remove share option from notes RUN sed -i ':a;N;$!ba;s/t("NcActionButton",{on:{click:e.onToggleSharing},scopedSlots:e._u(\[{key:"icon",fn:function(){return\[t("ShareVariantIcon",{attrs:{size:20}})\]},proxy:!0}\])},\[e._v("\\n\\t\\t\\t"+e._s(e.t("notes","Share"))+"\\n\\t\\t")\]),e._v(" "),/''/g' ${BASE_DIR}/custom_apps/notes/js/notes-main.js + +# Add id to delete account settings section and hide it by default +Run sed -i 's/"NcSettingsSection",{attrs:{/"NcSettingsSection",{attrs:{id:"delete-account-settings-section",style:"visibility:hidden;",/' ${BASE_DIR}/custom_apps/drop_account/js/drop_account-personal-settings.js + +# Fix of https://github.com/nextcloud/server/commit/e727a3b00bd9b574279d25c006a0bc6b8fa4eec3 for availability setting +RUN sed -i 's/n.data/await n.text()/' ${BASE_DIR}/dist/dav-settings-personal-availability.js \ No newline at end of file diff --git a/custom_entrypoint.sh b/custom_entrypoint.sh index 98a3984ccdced10c7610dd56bf082a2f3e7cdc42..2e385232fa181299d261c5d23dc576507ec0f5d3 100644 --- a/custom_entrypoint.sh +++ b/custom_entrypoint.sh @@ -28,7 +28,6 @@ if version_greater "$image_version" "$installed_version"; then rsync $rsync_options --include "/murena_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 "/ldap_write_support/" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ - rsync $rsync_options --include "/oidc_login/" --exclude '/*' $SRC_DIR/custom_apps/ /$DST_DIR/custom_apps/ rsync $rsync_options --include "/murena-dashboard/" --exclude '/*' $SRC_DIR/custom_apps/ /$DST_DIR/custom_apps/ rsync $rsync_options --include "/snappymail/" --exclude '/*' $SRC_DIR/custom_apps/ /$DST_DIR/custom_apps/ rsync $rsync_options --include "/eCloud/" --exclude '/*' $SRC_DIR/themes/ $DST_DIR/themes/ diff --git a/patches/005-autocomplete-user-leak-core.patch b/patches/005-autocomplete-user-leak-core.patch index a1a781a396e170c65fd22da228363bb27a0c41f4..8fed793e1b19d59fe9e37939ba3e1ebee35cd6ff 100644 --- a/patches/005-autocomplete-user-leak-core.patch +++ b/patches/005-autocomplete-user-leak-core.patch @@ -33,31 +33,23 @@ diff --git lib/private/Collaboration/Collaborators/MailPlugin.php lib/private/Co +++ lib/private/Collaboration/Collaborators/MailPlugin-new.php 2023-02-01 21:51:00.382603635 +0530 @@ -39,6 +39,7 @@ use OCP\IUserSession; - use OCP\Share\IShare; use OCP\Mail\IMailer; + use OCP\Share\IShare; +use OCP\IUserManager; class MailPlugin implements ISearchPlugin { - /* @var bool */ -@@ -76,7 +77,8 @@ - IGroupManager $groupManager, - KnownUserService $knownUserService, - IUserSession $userSession, -- IMailer $mailer) { -+ IMailer $mailer, -+ IUserManager $userManager) { - $this->contactsManager = $contactsManager; - $this->cloudIdManager = $cloudIdManager; - $this->config = $config; -@@ -84,6 +86,7 @@ - $this->knownUserService = $knownUserService; - $this->userSession = $userSession; - $this->mailer = $mailer; + protected bool $shareWithGroupOnly; +@@ -61,7 +62,9 @@ + private KnownUserService $knownUserService, + private IUserSession $userSession, + private IMailer $mailer, ++ private IUserManager $userManager, + ) { + $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'; -@@ -230,27 +233,61 @@ + $this->shareeEnumerationInGroupOnly = $this->shareeEnumeration && $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_to_group', 'no') === 'yes'; +@@ -207,27 +210,61 @@ if ($exactEmailMatch) { $searchResult->markExactIdMatch($emailType); } @@ -74,29 +66,29 @@ 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['exact'][] = [ ++ '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, -+ '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, -+ ], -+ ]; ++ 'value' => [ ++ 'shareType' => IShare::TYPE_USER, ++ 'shareWith' => $emailAddress, ++ ], ++ ]; + } } else { - $result['wide'][] = [ @@ -111,30 +103,30 @@ 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, -+ ], -+ ]; ++ // /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, -+ ], -+ ]; ++ // /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 c0e7cbf6924aea9db323d7967a0448e60e473be9..68a072a8e3ac5d6fa23fd5447db9446c750b572f 100644 --- a/patches/009-help-links.patch +++ b/patches/009-help-links.patch @@ -5,71 +5,110 @@ Subject: [PATCH] Changes help links to point to the correct links This patch adds changes to the "Settings" app's help template, controller and stylesheet to make sure the correct help links are shown ---- ./apps/settings/lib/Controller/HelpController.php 2023-02-01 18:59:44.491700506 +0530 -+++ ./apps/settings/lib/Controller/HelpController-new.php 2023-02-01 21:01:10.933837383 +0530 -@@ -98,6 +98,7 @@ +--- ./apps/settings/lib/Controller/HelpController.php 2024-07-25 16:11:57 +0530 ++++ ./apps/settings/lib/Controller/HelpController-new.php 2024-07-25 16:12:51 +0530 +@@ -114,6 +114,7 @@ 'urlAdminDocs' => $urlAdminDocs, 'mode' => $mode, 'pageTitle' => $pageTitle, + 'ncVersion' => \OCP\Util::getVersion()[0], + 'knowledgebaseEmbedded' => $knowledgebaseEmbedded, ]); - $policy = new ContentSecurityPolicy(); - $policy->addAllowedFrameDomain('\'self\''); ---- ./apps/settings/templates/help.php 2023-02-01 20:49:47.625123858 +0530 -+++ ./apps/settings/templates/help-new.php 2023-02-01 20:55:46.533199855 +0530 -@@ -4,45 +4,26 @@ - -- --
-- --
- + + --- ./apps/settings/css/help.css 2021-08-20 14:16:57.951439620 +0530 +++ ./apps/settings/css/help-new.css 2021-08-20 17:02:43.549016337 +0530 @@ -10,3 +10,12 @@ diff --git a/patches/011-privacy-settings.patch b/patches/011-privacy-settings.patch index 887b9bb0895c574facd00d74e8056dce6600219d..fbf44d2f7b6e335a4c91ae8f8c755bad1a6df81c 100644 --- a/patches/011-privacy-settings.patch +++ b/patches/011-privacy-settings.patch @@ -6,7 +6,7 @@ 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 -@@ -45,7 +45,7 @@ +@@ -52,7 +52,7 @@ return null; } @@ -28,62 +28,16 @@ This patch removes certain unnecessary sections from the "privacy" section in pe 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 @@ -+ -+ -
-

t('Who has access to your data?')) ?>

-

t('Administrators')); ?>

- ---- ./apps/privacy/templates/who-has-access.php 2022-03-17 16:48:46.124670200 +0530 -+++ ./apps/privacy/templates/who-has-access-new.php 2022-03-17 16:41:15.624670200 +0530 -@@ -4,20 +4,27 @@ - ?> - -
--

t('Who has access to your data?')) ?>

--

t('Administrators')); ?>

--
-+

t('Who has access to your data?')) ?>

-+

t('People you shared documents or folders with')) ?>:

-+
-+

 

-+

t('Like in most cloud services, a reduced number of administrators can see your files and all the information in the database as they need to make backups, perform upgrades, reset passwords, etc.')); ?> -+

-+

t('Learn more about this topic here.')); ?> ↗ -+

- --

t('People you shared with')) ?>

--
-+ -+

t('Privacy policy')) ?>

-+

-+ t('Read the privacy policy.')) ?> -+

-+ - -- --

t('Privacy policy')) ?>

--

-- t('Read the privacy policy.')) ?> --

-- +--- ./apps/privacy/lib/Controller/PersonalController.php 2024-08-01 12:57:29 +0530 ++++ ./apps/privacy/lib/Controller/PersonalController-new.php 2024-08-01 12:57:03 +0530 +@@ -103,7 +103,7 @@ + 'internal' => false, + ]; + } - --

t('Encryption')) ?>

--
--
-+

t('Encryption')) ?>

-+

-+ t('To protect your data, we have implemented server-side-encryption on our servers which hides by default the content of your files and notes even to these administrators.')); ?> -+ ↗ -+

-+
++ $uids = []; + return new JSONResponse($uids, Http::STATUS_OK); + } + } \ No newline at end of file diff --git a/patches/013-revert-token-password-update.patch b/patches/013-revert-token-password-update.patch index c043207767b580ecab38d723a1af56f67e4ee853..dd8278b1c669c96d2972c141d5d0d06d4f488d9d 100644 --- a/patches/013-revert-token-password-update.patch +++ b/patches/013-revert-token-password-update.patch @@ -5,17 +5,17 @@ Subject: [PATCH] Reverts token password update on each login NC 21 started updating password of each and every token on each login. This introduces a huge load on database. This patch reverts to only update when there are expired tokens. ---- ./lib/private/Authentication/Token/PublicKeyTokenProvider.php 2021-11-16 01:32:54.000000000 +0530 -+++ ./lib/private/Authentication/Token/PublicKeyTokenProvider-new.php 2021-12-16 17:13:48.893560398 +0530 -@@ -414,6 +414,11 @@ - public function updatePasswords(string $uid, string $password) { - $this->cache->clear(); +--- ./lib/private/Authentication/Token/PublicKeyTokenProvider.php 2024-07-25 17:51:37 +0530 ++++ ./lib/private/Authentication/Token/PublicKeyTokenProvider-new.php 2024-07-25 17:53:16 +0530 +@@ -509,6 +509,11 @@ + } + public function updatePasswords(string $uid, string $password) { ++ + if (!$this->mapper->hasExpiredTokens($uid)) { + // Nothing to do here + return; -+ } -+ ++ } // prevent setting an empty pw as result of pw-less-login - if ($password === '') { + if ($password === '' || !$this->config->getSystemValueBool('auth.storeCryptedPassword', true)) { return; diff --git a/patches/014-add-mail-usage.patch b/patches/014-add-mail-usage.patch index 67109857aa8c38254483a282002909f3291f96e8..2ccfa97cd64e79dfc031374e73132f23f7d02c34 100644 --- a/patches/014-add-mail-usage.patch +++ b/patches/014-add-mail-usage.patch @@ -1,6 +1,6 @@ --- lib/private/legacy/OC_Helper.php 2022-11-23 19:35:50.880495300 +0530 +++ lib/private/legacy/OC_Helper-new.php 2022-11-23 19:40:09.970495300 +0530 -@@ -543,6 +543,12 @@ +@@ -542,6 +542,12 @@ } try { $free = $sourceStorage->free_space($rootInfo->getInternalPath()); @@ -8,17 +8,17 @@ + $mailQuotaUsage = (int) \OC::$server->getConfig()->getUserValue($ownerId, 'ecloud-accounts', 'mailQuotaUsage', 0); + $free = max(0,$free - $mailQuotaUsage); + if($path === '/') { -+ $used = $used + $mailQuotaUsage; -+ } - } catch (\Exception $e) { - if ($path === "") { - throw $e; -@@ -569,7 +575,7 @@ ++ $used = $used + $mailQuotaUsage; ++ } + if (is_bool($free)) { + $free = 0.0; + } +@@ -571,8 +577,6 @@ $relative = 0; } - + +- /** @var string $ownerId */ - $ownerId = $storage->getOwner($path); -+ $ownerDisplayName = ''; - $owner = \OC::$server->getUserManager()->get($ownerId); - if ($owner) { \ No newline at end of file + if ($ownerId) { + $ownerDisplayName = \OC::$server->getUserManager()->getDisplayName($ownerId) ?? ''; \ No newline at end of file diff --git a/patches/016-login-screen.patch b/patches/016-login-screen.patch index 524c56d2d42a522564dc8324b9bb1a7dba018464..939529202b36db9198cdda77bfdbbc63758e5cdb 100644 --- a/patches/016-login-screen.patch +++ b/patches/016-login-screen.patch @@ -1,5 +1,7 @@ --- ./core/templates/layout.guest.php 2024-03-15 19:20:21 +++ ./core/templates/layout.guest-new.php 2024-03-15 19:24:49 +--- layout.guest.php 2024-07-25 19:23:57 ++++ layout.guest-new.php 2024-07-25 19:34:27 @@ -22,6 +22,7 @@ @@ -8,7 +10,6 @@ -\ No newline at end of file @@ -30,12 +31,37 @@ $initialState) { ?> @@ -16,30 +17,30 @@ -
-
+
" > -+ -+