From a885a14bff6ced539dfe7c2e26664bf982502d07 Mon Sep 17 00:00:00 2001 From: Hugo Renard Date: Mon, 13 Dec 2021 18:05:38 +0100 Subject: [PATCH 1/5] add multioffice app --- .gitmodules | 3 +++ base/apps/multioffice | 1 + 2 files changed, 4 insertions(+) create mode 160000 base/apps/multioffice diff --git a/.gitmodules b/.gitmodules index 063da10..94ccd64 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/apps/multioffice b/base/apps/multioffice new file mode 160000 index 0000000..2361324 --- /dev/null +++ b/base/apps/multioffice @@ -0,0 +1 @@ +Subproject commit 23613248bd717f3c9223b916ca17a9995165133c -- GitLab From 43d3f8c5c092df5506292c31e4b886fc6d7ce219 Mon Sep 17 00:00:00 2001 From: Hugo Renard Date: Mon, 13 Dec 2021 19:40:01 +0100 Subject: [PATCH 2/5] patch richdocuments capabilities --- base/Dockerfile | 5 ++- base/apps/patches/apply.sh | 6 ++++ .../patches/richdocuments-mime-patch.diff | 33 +++++++++++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100755 base/apps/patches/apply.sh create mode 100644 base/apps/patches/richdocuments-mime-patch.diff diff --git a/base/Dockerfile b/base/Dockerfile index 8f4139a..0d9a5c2 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/patches/apply.sh b/base/apps/patches/apply.sh new file mode 100755 index 0000000..5c9ed07 --- /dev/null +++ b/base/apps/patches/apply.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +for patch in ./patches/*.diff +do + patch -p1 < $patch +done diff --git a/base/apps/patches/richdocuments-mime-patch.diff b/base/apps/patches/richdocuments-mime-patch.diff new file mode 100644 index 0000000..efc5242 --- /dev/null +++ b/base/apps/patches/richdocuments-mime-patch.diff @@ -0,0 +1,33 @@ +--- apps/apps/richdocuments/lib/Capabilities.php 2021-09-14 20:47:52.000000000 +0200 ++++ apps/apps/richdocuments/Capabilities.php 2021-12-13 18:21:01.084038761 +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' + ]; + + const MIMETYPES_OPTIONAL = [ -- GitLab From 16237c3598adac1322b647f290a60e8b577d3d4b Mon Sep 17 00:00:00 2001 From: Hugo Renard Date: Tue, 14 Dec 2021 12:29:45 +0100 Subject: [PATCH 3/5] update patches --- .gitignore | 1 + base/apps/patches/apply.sh | 2 +- .../patches/onlyoffice-l10n-fr-patch.diff | 32 +++++++++++++++++++ .../patches/richdocuments-mime-patch.diff | 8 +++-- 4 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 .gitignore create mode 100644 base/apps/patches/onlyoffice-l10n-fr-patch.diff diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..80bd12f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +base/apps/apps \ No newline at end of file diff --git a/base/apps/patches/apply.sh b/base/apps/patches/apply.sh index 5c9ed07..29dbf72 100755 --- a/base/apps/patches/apply.sh +++ b/base/apps/patches/apply.sh @@ -2,5 +2,5 @@ for patch in ./patches/*.diff do - patch -p1 < $patch + patch -p0 < $patch done 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 0000000..10ee32a --- /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 index efc5242..ac8db83 100644 --- a/base/apps/patches/richdocuments-mime-patch.diff +++ b/base/apps/patches/richdocuments-mime-patch.diff @@ -1,5 +1,6 @@ ---- apps/apps/richdocuments/lib/Capabilities.php 2021-09-14 20:47:52.000000000 +0200 -+++ apps/apps/richdocuments/Capabilities.php 2021-12-13 18:21:01.084038761 +0100 +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', @@ -7,7 +8,7 @@ - 'application/msonenote', - 'application/msword', 'application/rtf', - 'text/rtf', +- 'text/rtf', - 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', - 'application/vnd.ms-word.document.macroEnabled.12', @@ -28,6 +29,7 @@ - 'application/vnd.ms-powerpoint.template.macroEnabled.12', - 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12', - 'text/csv' ++ 'text/rtf' ]; const MIMETYPES_OPTIONAL = [ -- GitLab From 57d4a747f6f6ea26c8258810cc5fb0263338ef6f Mon Sep 17 00:00:00 2001 From: Hugo Renard Date: Tue, 14 Dec 2021 13:05:50 +0100 Subject: [PATCH 4/5] update multioffice app --- base/apps/multioffice | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/apps/multioffice b/base/apps/multioffice index 2361324..fc0139f 160000 --- a/base/apps/multioffice +++ b/base/apps/multioffice @@ -1 +1 @@ -Subproject commit 23613248bd717f3c9223b916ca17a9995165133c +Subproject commit fc0139fc3132e57896428dc97602f15c4a1d57a4 -- GitLab From ebcfc6403e46c4d01497c7f82bc36227bc3b3d9f Mon Sep 17 00:00:00 2001 From: Pierre Ozoux Date: Wed, 15 Dec 2021 17:21:19 +0000 Subject: [PATCH 5/5] Adds links to PR in the patch script. --- base/apps/patches/apply.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/base/apps/patches/apply.sh b/base/apps/patches/apply.sh index 29dbf72..c49ab7a 100755 --- a/base/apps/patches/apply.sh +++ b/base/apps/patches/apply.sh @@ -4,3 +4,7 @@ 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 -- GitLab