From 39f28bea44faad09132fe88420cff16b0e864235 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Mon, 23 Jan 2023 18:21:28 +0530 Subject: [PATCH 1/7] selfhost 23 --- Dockerfile | 7 ++++++- custom_entrypoint.sh | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index f754e315..728c1eef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ ARG RAINLOOP_COMMIT_SHA="523518ba" ARG EA_JOB_ID="445966" ARG ECLOUD_LAUNCHER_JOB_ID="458901" ARG GOOGLE_INTEGRATION_VERSION="1.0.8" - +ARG ECLOUD_DASHBOARD_JOB_ID="485170" RUN sed -i 's/24,0,8,2/24,0,8,5/' ${BASE_DIR}/version.php COPY custom_entrypoint.sh / @@ -94,6 +94,11 @@ RUN curl -fsSL -o 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/ecloud-dashboard/-/jobs/${ECLOUD_DASHBOARD_JOB_ID}/artifacts/download" && \ + unzip ecloud-dashboard.zip && \ + mv dist/ecloud-dashboard ${BASE_DIR}/custom_apps/ && \ + rm ecloud-dashboard.zip; # Remove unzip when unzipping is done RUN apt-get -y remove unzip diff --git a/custom_entrypoint.sh b/custom_entrypoint.sh index caaf8d8b..ad2911c5 100644 --- a/custom_entrypoint.sh +++ b/custom_entrypoint.sh @@ -32,7 +32,7 @@ if version_greater "$image_version" "$installed_version"; then 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 "/ecloud-dashboard/" --exclude '/*' $SRC_DIR/custom_apps/ /$DST_DIR/custom_apps/ rsync $rsync_options --include "/eCloud/" --exclude '/*' $SRC_DIR/themes/ $DST_DIR/themes/ else echo "Skipping rsync step as version not updated!" -- GitLab From 1334b183b243a3c91320335a3497698525f524cc Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Mon, 23 Jan 2023 18:28:34 +0530 Subject: [PATCH 2/7] version bump --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 728c1eef..99d80b62 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ ARG ECLOUD_LAUNCHER_JOB_ID="458901" ARG GOOGLE_INTEGRATION_VERSION="1.0.8" ARG ECLOUD_DASHBOARD_JOB_ID="485170" -RUN sed -i 's/24,0,8,2/24,0,8,5/' ${BASE_DIR}/version.php +RUN sed -i 's/24,0,8,2/24,0,8,6/' ${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 -- GitLab From 8ba1a6aad7e260ecc3914a5b999eb982b69811ac Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 24 Jan 2023 20:46:33 +0530 Subject: [PATCH 3/7] version bump --- Dockerfile | 5 +++-- custom_entrypoint.sh | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 99d80b62..1a35dda5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ ARG ECLOUD_LAUNCHER_JOB_ID="458901" ARG GOOGLE_INTEGRATION_VERSION="1.0.8" ARG ECLOUD_DASHBOARD_JOB_ID="485170" -RUN sed -i 's/24,0,8,2/24,0,8,6/' ${BASE_DIR}/version.php +RUN sed -i 's/24,0,8,2/24,0,8,7/' ${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 @@ -166,7 +166,7 @@ RUN patch -u ${BASE_DIR}/core/Controller/ContactsMenuController.php -i ${TMP_PAT RUN cd ${BASE_DIR} && patch -p0 < ${TMP_PATCH_DIR}/005-autocomplete-user-leak-core.patch RUN cd ${BASE_DIR}/custom_apps && patch -p0 < ${TMP_PATCH_DIR}/005-autocomplete-user-leak-custom-app.patch RUN cd ${BASE_DIR} && patch -u ${BASE_DIR}/apps/dashboard/lib/Controller/DashboardController.php -i ${TMP_PATCH_DIR}/012-remove-user-status-widget.patch -RUN patch -u ${BASE_DIR}/core/templates/layout.guest.php -i ${TMP_PATCH_DIR}/016-login-screen.patch + RUN patch -u ${BASE_DIR}/lib/private/Notification/Manager.php -i ${TMP_PATCH_DIR}/020-fairuse-notification-fix.patch RUN rm -rf ${TMP_PATCH_DIR} @@ -222,4 +222,5 @@ RUN rm -rf ${BASE_DIR}/themes/eCloud && \ # Seds to fix displayname save regression RUN sed -i "s/'email' ||/'email'/" ${BASE_DIR}/apps/settings/js/federationsettingsview.js RUN sed -i "s/field === 'displayname'//" ${BASE_DIR}/apps/settings/js/federationsettingsview.js +RUN patch -u ${BASE_DIR}/core/templates/layout.guest.php -i ${TMP_PATCH_DIR}/016-login-screen.patch diff --git a/custom_entrypoint.sh b/custom_entrypoint.sh index ad2911c5..09e2e491 100644 --- a/custom_entrypoint.sh +++ b/custom_entrypoint.sh @@ -34,6 +34,7 @@ if version_greater "$image_version" "$installed_version"; then rsync $rsync_options --include "/oidc_login/" --exclude '/*' $SRC_DIR/custom_apps/ /$DST_DIR/custom_apps/ rsync $rsync_options --include "/ecloud-dashboard/" --exclude '/*' $SRC_DIR/custom_apps/ /$DST_DIR/custom_apps/ rsync $rsync_options --include "/eCloud/" --exclude '/*' $SRC_DIR/themes/ $DST_DIR/themes/ + su -p www-data -s /bin/sh -c "php $DST_DIR/occ app:enable ecloud-dashboard" else echo "Skipping rsync step as version not updated!" fi -- GitLab From aa31cfe80d14cb326cb3638c1edeab8c6c00de11 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Tue, 24 Jan 2023 20:53:27 +0530 Subject: [PATCH 4/7] code reverted and version bump --- Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1a35dda5..99d80b62 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ ARG ECLOUD_LAUNCHER_JOB_ID="458901" ARG GOOGLE_INTEGRATION_VERSION="1.0.8" ARG ECLOUD_DASHBOARD_JOB_ID="485170" -RUN sed -i 's/24,0,8,2/24,0,8,7/' ${BASE_DIR}/version.php +RUN sed -i 's/24,0,8,2/24,0,8,6/' ${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 @@ -166,7 +166,7 @@ RUN patch -u ${BASE_DIR}/core/Controller/ContactsMenuController.php -i ${TMP_PAT RUN cd ${BASE_DIR} && patch -p0 < ${TMP_PATCH_DIR}/005-autocomplete-user-leak-core.patch RUN cd ${BASE_DIR}/custom_apps && patch -p0 < ${TMP_PATCH_DIR}/005-autocomplete-user-leak-custom-app.patch RUN cd ${BASE_DIR} && patch -u ${BASE_DIR}/apps/dashboard/lib/Controller/DashboardController.php -i ${TMP_PATCH_DIR}/012-remove-user-status-widget.patch - +RUN patch -u ${BASE_DIR}/core/templates/layout.guest.php -i ${TMP_PATCH_DIR}/016-login-screen.patch RUN patch -u ${BASE_DIR}/lib/private/Notification/Manager.php -i ${TMP_PATCH_DIR}/020-fairuse-notification-fix.patch RUN rm -rf ${TMP_PATCH_DIR} @@ -222,5 +222,4 @@ RUN rm -rf ${BASE_DIR}/themes/eCloud && \ # Seds to fix displayname save regression RUN sed -i "s/'email' ||/'email'/" ${BASE_DIR}/apps/settings/js/federationsettingsview.js RUN sed -i "s/field === 'displayname'//" ${BASE_DIR}/apps/settings/js/federationsettingsview.js -RUN patch -u ${BASE_DIR}/core/templates/layout.guest.php -i ${TMP_PATCH_DIR}/016-login-screen.patch -- GitLab From 116870a3318e5c4ad54b11b87fdb2384b8f485dd Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 25 Jan 2023 10:24:17 +0530 Subject: [PATCH 5/7] code moved and version bump --- Dockerfile | 2 +- custom_entrypoint.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 99d80b62..64a024e4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ ARG ECLOUD_LAUNCHER_JOB_ID="458901" ARG GOOGLE_INTEGRATION_VERSION="1.0.8" ARG ECLOUD_DASHBOARD_JOB_ID="485170" -RUN sed -i 's/24,0,8,2/24,0,8,6/' ${BASE_DIR}/version.php +RUN sed -i 's/24,0,8,2/24,0,8,7/' ${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 diff --git a/custom_entrypoint.sh b/custom_entrypoint.sh index 09e2e491..94d848a7 100644 --- a/custom_entrypoint.sh +++ b/custom_entrypoint.sh @@ -34,15 +34,16 @@ if version_greater "$image_version" "$installed_version"; then rsync $rsync_options --include "/oidc_login/" --exclude '/*' $SRC_DIR/custom_apps/ /$DST_DIR/custom_apps/ rsync $rsync_options --include "/ecloud-dashboard/" --exclude '/*' $SRC_DIR/custom_apps/ /$DST_DIR/custom_apps/ rsync $rsync_options --include "/eCloud/" --exclude '/*' $SRC_DIR/themes/ $DST_DIR/themes/ - su -p www-data -s /bin/sh -c "php $DST_DIR/occ app:enable ecloud-dashboard" else echo "Skipping rsync step as version not updated!" fi if [ "$(id -u)" = 0 ]; then su -p www-data -s /bin/sh -c "php $DST_DIR/occ config:system:set profile.enabled --value=false --type=boolean" + su -p www-data -s /bin/sh -c "php $DST_DIR/occ app:enable ecloud-dashboard" else sh -c "php $DST_DIR/occ config:system:set profile.enabled --value=false --type=boolean" + su -p www-data -s /bin/sh -c "php $DST_DIR/occ app:enable ecloud-dashboard" fi /entrypoint.sh "$@" -- GitLab From 4aa1d1f6b2dad584b750c6bf75aa16905423f352 Mon Sep 17 00:00:00 2001 From: Avinash Gusain Date: Wed, 25 Jan 2023 16:31:31 +0530 Subject: [PATCH 6/7] code moved and version bump --- custom_entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_entrypoint.sh b/custom_entrypoint.sh index 94d848a7..43c58300 100644 --- a/custom_entrypoint.sh +++ b/custom_entrypoint.sh @@ -43,7 +43,7 @@ if [ "$(id -u)" = 0 ]; then su -p www-data -s /bin/sh -c "php $DST_DIR/occ app:enable ecloud-dashboard" else sh -c "php $DST_DIR/occ config:system:set profile.enabled --value=false --type=boolean" - su -p www-data -s /bin/sh -c "php $DST_DIR/occ app:enable ecloud-dashboard" + sh -c "php $DST_DIR/occ app:enable ecloud-dashboard" fi /entrypoint.sh "$@" -- GitLab From 580658be0bf2f229ebed3ff120478c9157f46b5b Mon Sep 17 00:00:00 2001 From: Akhil Date: Wed, 25 Jan 2023 18:21:10 +0530 Subject: [PATCH 7/7] No need to run enable ecloud-dashboard --- custom_entrypoint.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/custom_entrypoint.sh b/custom_entrypoint.sh index 43c58300..ad2911c5 100644 --- a/custom_entrypoint.sh +++ b/custom_entrypoint.sh @@ -40,10 +40,8 @@ fi if [ "$(id -u)" = 0 ]; then su -p www-data -s /bin/sh -c "php $DST_DIR/occ config:system:set profile.enabled --value=false --type=boolean" - su -p www-data -s /bin/sh -c "php $DST_DIR/occ app:enable ecloud-dashboard" else sh -c "php $DST_DIR/occ config:system:set profile.enabled --value=false --type=boolean" - sh -c "php $DST_DIR/occ app:enable ecloud-dashboard" fi /entrypoint.sh "$@" -- GitLab