[server-pro] extend hotfix 5.5.5: avoid creating user_files directory (#28738)

* [WIP] restore 100_make_overleaf_data_dirs.sh

* [WIP] patch for hotfix 5.5.5

* Revert "[WIP] patch for hotfix 5.5.5"

This reverts commit cc83a526ecd86ed7b1a0e061b074d2fb15d4d672.

* Revert "[WIP] restore 100_make_overleaf_data_dirs.sh"

This reverts commit e9b0597fe8451e9ef1deaf7ed31790f7d7fc996e.

* [server-pro] extend hotfix 5.5.5: avoid creating user_files directory

* [server-ce] run binary files migration in CI

GitOrigin-RevId: ac5bb86df92b441201c69dfac6b302058b501d8e
This commit is contained in:
Jakob Ackermann
2025-09-26 18:52:14 +02:00
committed by Copybot
parent 84e4808812
commit e05ec0321b
8 changed files with 64 additions and 7 deletions

View File

@@ -3,5 +3,7 @@ FROM sharelatex/sharelatex:5.5.4
# ../../bin/import_pr_patch.sh 27932
# Remove web migrations changes
# Remove test changes
COPY *.patch .
RUN bash -ec 'for p in *.patch; do echo "=== Applying $p ==="; patch -p1 < "$p" && rm $p; done'
# Add init script change (commit cc83a526ecd86ed7b1a0e061b074d2fb15d4d672 in PR 28738)
COPY *.patch* .
RUN bash -ec 'for p in *.patch; do echo "=== Applying $p ==="; patch -p1 < "$p" && rm $p; done' \
&& bash -ec 'cd / && for p in /overleaf/*.patch-abs; do echo "=== Applying $p ==="; patch -p1 < "$p" && rm $p; done'

View File

@@ -0,0 +1,12 @@
--- a/etc/my_init.d/100_make_overleaf_data_dirs.sh
+++ b/etc/my_init.d/100_make_overleaf_data_dirs.sh
@@ -4,8 +4,10 @@ set -e
mkdir -p /var/lib/overleaf/data
chown www-data:www-data /var/lib/overleaf/data
-mkdir -p /var/lib/overleaf/data/user_files
-chown www-data:www-data /var/lib/overleaf/data/user_files
+if [[ "${OVERLEAF_FILESTORE_MIGRATION_LEVEL:-0}" != "2" ]]; then
+ mkdir -p /var/lib/overleaf/data/user_files
+ chown www-data:www-data /var/lib/overleaf/data/user_files
+fi