From 43d3f8c5c092df5506292c31e4b886fc6d7ce219 Mon Sep 17 00:00:00 2001 From: Hugo Renard Date: Mon, 13 Dec 2021 19:40:01 +0100 Subject: [PATCH] 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