From cde547af5cbe22cbe52a6a124bfc8924f6e6c72c Mon Sep 17 00:00:00 2001 From: diroots Date: Mon, 24 May 2021 15:23:49 +0200 Subject: [PATCH 1/9] update nc version, and add new sed to calendar js for autocomplete bug. --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 624b50fa..0afe099a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM nextcloud:19.0.10-fpm +FROM nextcloud:19.0.12-fpm ARG BASE_DIR="/usr/src/nextcloud" ARG TMP_PATCH_DIR="/tmp/build_patches" ARG THEME_VERSION="19.0.9.3" @@ -14,7 +14,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/19,0,10,1/19,0,10,2/' ${BASE_DIR}/version.php +RUN sed -i 's/19,0,12,1/19,0,12,2/' ${BASE_DIR}/version.php # Custom apps RUN curl -fsSL -o news.tar.gz \ @@ -66,6 +66,7 @@ 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/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 # Custom theme RUN curl -fsSL -o eelo-theme.tar.gz \ -- GitLab From 988d257a3a42f25a0b3ff94e694728b8e6439c83 Mon Sep 17 00:00:00 2001 From: akhil Date: Tue, 1 Jun 2021 14:41:24 +0530 Subject: [PATCH 2/9] Added custom rainloop to Dockerfile --- Dockerfile | 8 ++++++++ custom_entrypoint.sh | 1 + 2 files changed, 9 insertions(+) diff --git a/Dockerfile b/Dockerfile index 0afe099a..0683baf1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,8 @@ ARG CONTACTS_VERSION="3.5.1" ARG CALENDAR_VERSION="2.0.5" ARG USER_BACKEND_RAW_SQL_VERSION="1.0.12" ARG EMAIL_RECOVERY_VERSION="1.0.0" +ARG RAINLOOP_VERSION="7.1.0" +ARG RAINLOOP_COMMIT_SHA="c21dfcab" RUN mkdir -p /var/www/skeleton/Documents && mkdir -p /var/www/skeleton/Images COPY patches/ ${TMP_PATCH_DIR}/ @@ -52,6 +54,12 @@ RUN curl -fsSL -o email-recovery.tar.gz \ tar -xf email-recovery.tar.gz -C ${BASE_DIR}/custom_apps/ && \ rm email-recovery.tar.gz; +RUN curl -fsSL -o rainloop.tar.gz \ + "https://gitlab.e.foundation/e/infra/selfhost/nextcloud-apps/rainloop-nextcloud/-/archive/${RAINLOOP_VERSION}-${RAINLOOP_COMMIT_SHA}/rainloop-nextcloud-${RAINLOOP_VERSION}-${RAINLOOP_COMMIT_SHA}.tar.gz" && \ + tar -xf rainloop.tar.gz -C ${BASE_DIR}/custom_apps/ && \ + mv "${BASE_DIR}/custom_apps/rainloop-nextcloud-${RAINLOOP_VERSION}-${RAINLOOP_COMMIT_SHA}" "${BASE_DIR}/custom_apps/rainloop" && \ + rm rainloop.tar.gz; + # 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 diff --git a/custom_entrypoint.sh b/custom_entrypoint.sh index 7863eebb..694baf2a 100644 --- a/custom_entrypoint.sh +++ b/custom_entrypoint.sh @@ -12,6 +12,7 @@ rsync $rsync_options --include "/quota_warning/" --exclude '/*' $SRC_DIR/custom_ rsync $rsync_options --include "/calendar/" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ rsync $rsync_options --include "/contacts/" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ rsync $rsync_options --include "/user_backend_sql_raw/" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ +rsync $rsync_options --include "/rainloop" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ rsync $rsync_options --include "/eelo/" --exclude '/*' $SRC_DIR/themes/ $DST_DIR/themes/ -- GitLab From e9dfed9762dbad8e53e8e3d6ffb9443f0e4c1fc0 Mon Sep 17 00:00:00 2001 From: akhil Date: Thu, 3 Jun 2021 13:50:31 +0530 Subject: [PATCH 3/9] Updated versions; fixed dir names; added usc and email-recovery to rsync --- Dockerfile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0683baf1..70321a98 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,17 @@ FROM nextcloud:19.0.12-fpm ARG BASE_DIR="/usr/src/nextcloud" ARG TMP_PATCH_DIR="/tmp/build_patches" -ARG THEME_VERSION="19.0.9.3" +ARG THEME_VERSION="19.0.9.6" ARG NEWS_VERSION="14.2.2" ARG QUOTA_WARN_VERSION="1.8.0" ARG NOTES_VERSION="3.6.4" ARG CONTACTS_VERSION="3.5.1" ARG CALENDAR_VERSION="2.0.5" ARG USER_BACKEND_RAW_SQL_VERSION="1.0.12" -ARG EMAIL_RECOVERY_VERSION="1.0.0" +ARG EMAIL_RECOVERY_VERSION="1.0.2" ARG RAINLOOP_VERSION="7.1.0" ARG RAINLOOP_COMMIT_SHA="c21dfcab" +ARG USC_VERSION="1.0.0" RUN mkdir -p /var/www/skeleton/Documents && mkdir -p /var/www/skeleton/Images COPY patches/ ${TMP_PATCH_DIR}/ @@ -52,6 +53,7 @@ RUN curl -fsSL -o user_backend_sql_raw.tar.gz \ RUN curl -fsSL -o email-recovery.tar.gz \ "https://gitlab.e.foundation/e/infra/selfhost/nextcloud-apps/email-recovery/-/archive/1.0.0/email-recovery-${EMAIL_RECOVERY_VERSION}.tar.gz" && \ tar -xf email-recovery.tar.gz -C ${BASE_DIR}/custom_apps/ && \ + mv "${BASE_DIR}/custom_apps/email-recovery-${EMAIL_RECOVERY_VERSION}" "${BASE_DIR}/custom_apps/email-recovery" && \ rm email-recovery.tar.gz; RUN curl -fsSL -o rainloop.tar.gz \ @@ -60,6 +62,12 @@ RUN curl -fsSL -o rainloop.tar.gz \ mv "${BASE_DIR}/custom_apps/rainloop-nextcloud-${RAINLOOP_VERSION}-${RAINLOOP_COMMIT_SHA}" "${BASE_DIR}/custom_apps/rainloop" && \ rm rainloop.tar.gz; +RUN curl -fsSL -o user-support-center.tar.gz \ + "https://gitlab.e.foundation/e/infra/selfhost/nextcloud-apps/user-search-support/-/archive/${USC_VERSION}/user-search-support-${USC_VERSION}.tar.gz" && \ + tar -xf user-support-center.tar.gz -C ${BASE_DIR}/custom_apps/ && \ + mv "${BASE_DIR}/custom_apps/user-support-center-${USC_VERSION}" "${BASE_DIR}/custom_apps/user-support-center" && \ + rm user-support-center.tar.gz; + # 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 -- GitLab From 87e9ccd516a5a82695ec5a38713e97ba0b61b06f Mon Sep 17 00:00:00 2001 From: akhil Date: Thu, 3 Jun 2021 13:51:59 +0530 Subject: [PATCH 4/9] Added usc and email-recovery to rsync --- custom_entrypoint.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/custom_entrypoint.sh b/custom_entrypoint.sh index 694baf2a..72f02219 100644 --- a/custom_entrypoint.sh +++ b/custom_entrypoint.sh @@ -13,6 +13,8 @@ rsync $rsync_options --include "/calendar/" --exclude '/*' $SRC_DIR/custom_apps/ rsync $rsync_options --include "/contacts/" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ rsync $rsync_options --include "/user_backend_sql_raw/" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ rsync $rsync_options --include "/rainloop" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ +rsync $rsync_options --include "/email-recovery" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ +rsync $rsync_options --include "/user-support-center" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ rsync $rsync_options --include "/eelo/" --exclude '/*' $SRC_DIR/themes/ $DST_DIR/themes/ -- GitLab From affc8b1fd1b3dfbbe6a118833a2d92be06ef4eca Mon Sep 17 00:00:00 2001 From: Akhil Date: Thu, 3 Jun 2021 08:23:05 +0000 Subject: [PATCH 5/9] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 70321a98..083b91cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,7 +51,7 @@ RUN curl -fsSL -o user_backend_sql_raw.tar.gz \ rm user_backend_sql_raw.tar.gz; RUN curl -fsSL -o email-recovery.tar.gz \ - "https://gitlab.e.foundation/e/infra/selfhost/nextcloud-apps/email-recovery/-/archive/1.0.0/email-recovery-${EMAIL_RECOVERY_VERSION}.tar.gz" && \ + "https://gitlab.e.foundation/e/infra/selfhost/nextcloud-apps/email-recovery/-/archive/${EMAIL_RECOVERY_VERSION}/email-recovery-${EMAIL_RECOVERY_VERSION}.tar.gz" && \ tar -xf email-recovery.tar.gz -C ${BASE_DIR}/custom_apps/ && \ mv "${BASE_DIR}/custom_apps/email-recovery-${EMAIL_RECOVERY_VERSION}" "${BASE_DIR}/custom_apps/email-recovery" && \ rm email-recovery.tar.gz; -- GitLab From 45e149cc9ab748eeb3a915973817a4f3500e6da2 Mon Sep 17 00:00:00 2001 From: Akhil Date: Thu, 3 Jun 2021 09:17:22 +0000 Subject: [PATCH 6/9] Comment out usc for now --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 083b91cd..b047ec48 100644 --- a/Dockerfile +++ b/Dockerfile @@ -62,11 +62,11 @@ RUN curl -fsSL -o rainloop.tar.gz \ mv "${BASE_DIR}/custom_apps/rainloop-nextcloud-${RAINLOOP_VERSION}-${RAINLOOP_COMMIT_SHA}" "${BASE_DIR}/custom_apps/rainloop" && \ rm rainloop.tar.gz; -RUN curl -fsSL -o user-support-center.tar.gz \ - "https://gitlab.e.foundation/e/infra/selfhost/nextcloud-apps/user-search-support/-/archive/${USC_VERSION}/user-search-support-${USC_VERSION}.tar.gz" && \ - tar -xf user-support-center.tar.gz -C ${BASE_DIR}/custom_apps/ && \ - mv "${BASE_DIR}/custom_apps/user-support-center-${USC_VERSION}" "${BASE_DIR}/custom_apps/user-support-center" && \ - rm user-support-center.tar.gz; +#RUN curl -fsSL -o user-support-center.tar.gz \ +# "https://gitlab.e.foundation/e/infra/selfhost/nextcloud-apps/user-search-support/-/archive/${USC_VERSION}/user-search-support-${USC_VERSION}.tar.gz" && \ +# tar -xf user-support-center.tar.gz -C ${BASE_DIR}/custom_apps/ && \ +# mv "${BASE_DIR}/custom_apps/user-support-center-${USC_VERSION}" "${BASE_DIR}/custom_apps/user-support-center" && \ +# rm user-support-center.tar.gz; # Patches RUN patch -u ${BASE_DIR}/core/Controller/LoginController.php -i ${TMP_PATCH_DIR}/002-login-without-domain.patch -- GitLab From a4fc80ef20ea7411e9ef23490beea34dcab170b9 Mon Sep 17 00:00:00 2001 From: akhil Date: Thu, 3 Jun 2021 17:25:41 +0530 Subject: [PATCH 7/9] Removed USC --- Dockerfile | 6 ------ custom_entrypoint.sh | 1 - 2 files changed, 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index b047ec48..1da331b1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -62,12 +62,6 @@ RUN curl -fsSL -o rainloop.tar.gz \ mv "${BASE_DIR}/custom_apps/rainloop-nextcloud-${RAINLOOP_VERSION}-${RAINLOOP_COMMIT_SHA}" "${BASE_DIR}/custom_apps/rainloop" && \ rm rainloop.tar.gz; -#RUN curl -fsSL -o user-support-center.tar.gz \ -# "https://gitlab.e.foundation/e/infra/selfhost/nextcloud-apps/user-search-support/-/archive/${USC_VERSION}/user-search-support-${USC_VERSION}.tar.gz" && \ -# tar -xf user-support-center.tar.gz -C ${BASE_DIR}/custom_apps/ && \ -# mv "${BASE_DIR}/custom_apps/user-support-center-${USC_VERSION}" "${BASE_DIR}/custom_apps/user-support-center" && \ -# rm user-support-center.tar.gz; - # 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 diff --git a/custom_entrypoint.sh b/custom_entrypoint.sh index 72f02219..9d9b0a2a 100644 --- a/custom_entrypoint.sh +++ b/custom_entrypoint.sh @@ -14,7 +14,6 @@ rsync $rsync_options --include "/contacts/" --exclude '/*' $SRC_DIR/custom_apps/ rsync $rsync_options --include "/user_backend_sql_raw/" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ rsync $rsync_options --include "/rainloop" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ rsync $rsync_options --include "/email-recovery" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ -rsync $rsync_options --include "/user-support-center" --exclude '/*' $SRC_DIR/custom_apps/ $DST_DIR/custom_apps/ rsync $rsync_options --include "/eelo/" --exclude '/*' $SRC_DIR/themes/ $DST_DIR/themes/ -- GitLab From a42c3d2a698953621a2ee76578ecdb08c78d0fd8 Mon Sep 17 00:00:00 2001 From: akhil Date: Thu, 3 Jun 2021 17:40:37 +0530 Subject: [PATCH 8/9] Added email-recovery through job id --- Dockerfile | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1da331b1..a96fdf6d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ ARG NOTES_VERSION="3.6.4" ARG CONTACTS_VERSION="3.5.1" ARG CALENDAR_VERSION="2.0.5" ARG USER_BACKEND_RAW_SQL_VERSION="1.0.12" -ARG EMAIL_RECOVERY_VERSION="1.0.2" +ARG EMAIL_RECOVERY_JOB_ID="162557" ARG RAINLOOP_VERSION="7.1.0" ARG RAINLOOP_COMMIT_SHA="c21dfcab" ARG USC_VERSION="1.0.0" @@ -19,6 +19,9 @@ COPY custom_entrypoint.sh / RUN chmod +x /custom_entrypoint.sh RUN sed -i 's/19,0,12,1/19,0,12,2/' ${BASE_DIR}/version.php +# Install unzip for unzipping artifacts +RUN apt-get update && apt-get install unzip + # Custom apps RUN curl -fsSL -o news.tar.gz \ "https://github.com/nextcloud/news/releases/download/${NEWS_VERSION}/news.tar.gz" && \ @@ -50,10 +53,10 @@ RUN curl -fsSL -o 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; -RUN curl -fsSL -o email-recovery.tar.gz \ - "https://gitlab.e.foundation/e/infra/selfhost/nextcloud-apps/email-recovery/-/archive/${EMAIL_RECOVERY_VERSION}/email-recovery-${EMAIL_RECOVERY_VERSION}.tar.gz" && \ - tar -xf email-recovery.tar.gz -C ${BASE_DIR}/custom_apps/ && \ - mv "${BASE_DIR}/custom_apps/email-recovery-${EMAIL_RECOVERY_VERSION}" "${BASE_DIR}/custom_apps/email-recovery" && \ +RUN curl -fsSL -o email-recovery.zip \ + "https://gitlab.e.foundation/e/infra/selfhost/nextcloud-apps/email-recovery/-/jobs/${EMAIL_RECOVERY_JOB_ID}/artifacts/download" && \ + unzip email-recovery.zip && \ + cd dist && tar -xf email-recovery.tar.gz -C ${BASE_DIR}/custom_apps/ && \ rm email-recovery.tar.gz; RUN curl -fsSL -o rainloop.tar.gz \ @@ -62,6 +65,9 @@ RUN curl -fsSL -o rainloop.tar.gz \ mv "${BASE_DIR}/custom_apps/rainloop-nextcloud-${RAINLOOP_VERSION}-${RAINLOOP_COMMIT_SHA}" "${BASE_DIR}/custom_apps/rainloop" && \ rm rainloop.tar.gz; +# Remove unzip when unzipping is done +RUN apt-get -y remove unzip + # 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 -- GitLab From 75dc538f78f6c9fb588115783dff8ad328261542 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnau=20V=C3=A0zquez?= Date: Fri, 4 Jun 2021 14:03:04 +0000 Subject: [PATCH 9/9] Comment out NC version change --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a96fdf6d..3f3f4e84 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,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/19,0,12,1/19,0,12,2/' ${BASE_DIR}/version.php +# RUN sed -i 's/19,0,12,0/19,0,12,1/' ${BASE_DIR}/version.php # Install unzip for unzipping artifacts RUN apt-get update && apt-get install unzip -- GitLab