diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..80bd12f7eecb46423b76ddcd4d5c1ace6658e830 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +base/apps/apps \ No newline at end of file diff --git a/.gitmodules b/.gitmodules index 063da10d347c22617fe57e11ce508518c3836010..94ccd6417e957afb843fc3b17bc50df283cf9a2a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "upstream"] path = upstream url = https://github.com/pierreozoux/docker-1 +[submodule "base/apps/multioffice"] + path = base/apps/multioffice + url = https://lab.libreho.st/libre.sh/nextcloud-apps/multioffice.git diff --git a/base/Dockerfile b/base/Dockerfile index 8f4139a83ff1846e4fd181efcd7f4949e1fcd813..0d9a5c2881c17070c055b405dda2cdfaba3dd18f 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -1,11 +1,13 @@ ARG VERSION FROM alpine as apps -RUN apk add --no-cache jq curl bash +RUN apk add --no-cache jq curl bash patch COPY apps /apps WORKDIR /apps ARG VERSION RUN ./install.sh RUN rm ./install.sh ./install-list +RUN ./patches/apply.sh +RUN rm -rf ./patches FROM nextcloud:${VERSION}-fpm-alpine COPY redis.ini /usr/local/etc/php/conf.d/ @@ -14,6 +16,7 @@ COPY php-fpm.conf /usr/local/etc/php-fpm.conf COPY --chown=www-data:root config/* /usr/src/nextcloud/config/ COPY --from=apps --chown=www-data:root /apps/* /usr/src/nextcloud/apps/ COPY --chown=www-data:root ./apps/indie_external /usr/src/nextcloud/apps/indie_external +COPY --chown=www-data:root ./apps/multioffice /usr/src/nextcloud/apps/multioffice WORKDIR /usr/src/nextcloud COPY ./img/logo /usr/src/nextcloud/core/img/logo COPY ./img/favicon.ico /usr/src/nextcloud/core/img/favicon.ico diff --git a/base/apps/multioffice b/base/apps/multioffice new file mode 160000 index 0000000000000000000000000000000000000000..fc0139fc3132e57896428dc97602f15c4a1d57a4 --- /dev/null +++ b/base/apps/multioffice @@ -0,0 +1 @@ +Subproject commit fc0139fc3132e57896428dc97602f15c4a1d57a4 diff --git a/base/apps/patches/apply.sh b/base/apps/patches/apply.sh new file mode 100755 index 0000000000000000000000000000000000000000..c49ab7ac7e90f39b47ae6686dd42544fa4272c0f --- /dev/null +++ b/base/apps/patches/apply.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +for patch in ./patches/*.diff +do + patch -p0 < $patch +done + +# Associated PR/discussion: +# https://github.com/ONLYOFFICE/onlyoffice-nextcloud/pull/570/files +# https://github.com/nextcloud/richdocuments/issues/1400 diff --git a/base/apps/patches/onlyoffice-l10n-fr-patch.diff b/base/apps/patches/onlyoffice-l10n-fr-patch.diff new file mode 100644 index 0000000000000000000000000000000000000000..10ee32ad8b6024a7e5c07a7d0e70242edaa49254 --- /dev/null +++ b/base/apps/patches/onlyoffice-l10n-fr-patch.diff @@ -0,0 +1,32 @@ +diff '--color=auto' --text --unified --new-file -r apps/onlyoffice/l10n/fr.js apps/onlyoffice-patched/l10n/fr.js +--- apps/onlyoffice/l10n/fr.js 2021-12-13 20:06:03.417828731 +0100 ++++ apps/onlyoffice-patched/l10n/fr.js 2021-12-13 20:07:01.890000000 +0100 +@@ -24,9 +24,9 @@ + "File created" : "Fichier créé", + "Open in ONLYOFFICE" : "Ouvrir dans ONLYOFFICE", + "Convert with ONLYOFFICE" : "Convertir avec ONLYOFFICE", +- "Document" : "Document", +- "Spreadsheet" : "Feuille de calcul", +- "Presentation" : "Présentation", ++ "Document" : "Nouveau document", ++ "Spreadsheet" : "Nouvelle feuille de calcul", ++ "Presentation" : "Nouvelle présentation", + "Error when trying to connect" : "Erreur durant la tentative de connexion", + "Settings have been successfully updated" : "Les paramètres ont été mis à jour avec succès", + "Server can't read xml" : "Le serveur ne peut pas lire le XML", +diff '--color=auto' --text --unified --new-file -r apps/onlyoffice/l10n/fr.json apps/onlyoffice-patched/l10n/fr.json +--- apps/onlyoffice/l10n/fr.json 2021-12-13 20:06:03.417828731 +0100 ++++ apps/onlyoffice-patched/l10n/fr.json 2021-12-13 20:09:57.832477970 +0100 +@@ -22,9 +22,9 @@ + "File created" : "Fichier créé", + "Open in ONLYOFFICE" : "Ouvrir dans ONLYOFFICE", + "Convert with ONLYOFFICE" : "Convertir avec ONLYOFFICE", +- "Document" : "Document", +- "Spreadsheet" : "Feuille de calcul", +- "Presentation" : "Présentation", ++ "Document" : "Nouveau document", ++ "Spreadsheet" : "Nouvelle feuille de calcul", ++ "Presentation" : "Nouvelle présentation", + "Error when trying to connect" : "Erreur durant la tentative de connexion", + "Settings have been successfully updated" : "Les paramètres ont été mis à jour avec succès", + "Server can't read xml" : "Le serveur ne peut pas lire le XML", diff --git a/base/apps/patches/richdocuments-mime-patch.diff b/base/apps/patches/richdocuments-mime-patch.diff new file mode 100644 index 0000000000000000000000000000000000000000..ac8db833560db7b94ba0e19e02edf607dab49e72 --- /dev/null +++ b/base/apps/patches/richdocuments-mime-patch.diff @@ -0,0 +1,35 @@ +diff '--color=auto' --text --unified --new-file -r apps/richdocuments/lib/Capabilities.php apps/richdocuments-patched/lib/Capabilities.php +--- apps/richdocuments/lib/Capabilities.php 2021-09-14 20:47:52.000000000 +0200 ++++ apps/richdocuments-patched/lib/Capabilities.php 2021-12-13 20:31:39.711896724 +0100 +@@ -38,30 +38,8 @@ + 'application/vnd.visio', + 'application/vnd.ms-visio.drawing', + 'application/vnd.wordperfect', +- 'application/msonenote', +- 'application/msword', + 'application/rtf', +- 'text/rtf', +- 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', +- 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', +- 'application/vnd.ms-word.document.macroEnabled.12', +- 'application/vnd.ms-word.template.macroEnabled.12', +- 'application/vnd.ms-excel', +- 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', +- 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', +- 'application/vnd.ms-excel.sheet.macroEnabled.12', +- 'application/vnd.ms-excel.template.macroEnabled.12', +- 'application/vnd.ms-excel.addin.macroEnabled.12', +- 'application/vnd.ms-excel.sheet.binary.macroEnabled.12', +- 'application/vnd.ms-powerpoint', +- 'application/vnd.openxmlformats-officedocument.presentationml.presentation', +- 'application/vnd.openxmlformats-officedocument.presentationml.template', +- 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', +- 'application/vnd.ms-powerpoint.addin.macroEnabled.12', +- 'application/vnd.ms-powerpoint.presentation.macroEnabled.12', +- 'application/vnd.ms-powerpoint.template.macroEnabled.12', +- 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12', +- 'text/csv' ++ 'text/rtf' + ]; + + const MIMETYPES_OPTIONAL = [