cherry-pick 7196db9c conflicts solved

main
Evilham 2023-02-27 19:38:41 +01:00 committed by Antoni Bertran
parent 74b850191a
commit 23f22abb29
5 changed files with 35 additions and 45 deletions

View File

@ -82,11 +82,9 @@ COPY saml.sh /
COPY template.docx / COPY template.docx /
## Save current forms plugin hash ## Save current forms plugin hash
#RUN sh -c 'curl -sL https://api.github.com/repos/3iPunt/nextcloud_forms/commits/STABLE_25 | jq -r .sha > /forms.hash' RUN sh -c 'curl -sL https://api.github.com/repos/3iPunt/nextcloud_forms/commits/STABLE_25 | jq -r .sha > /forms.hash'
## And current forms code ## And current forms code
#RUN sh -c 'curl -sL "https://github.com/3iPunt/nextcloud_forms/archive/$(cat /forms.hash).zip" > /forms.zip' RUN sh -c 'curl -sL "https://github.com/3iPunt/nextcloud_forms/archive/$(cat /forms.hash).zip" > /forms.zip'
# Mail app patches. To remove in NC 25
COPY nc_mail/ /nc_mail/
# Setup cron as documented in: # Setup cron as documented in:
# https://github.com/nextcloud/docker/blob/master/.examples/dockerfiles/cron/fpm-alpine/Dockerfile # https://github.com/nextcloud/docker/blob/master/.examples/dockerfiles/cron/fpm-alpine/Dockerfile

View File

@ -2,7 +2,4 @@
# file license author source # file license author source
nginx.conf AGPL-3.0-or-later https://github.com/nextcloud/ https://raw.githubusercontent.com/nextcloud/docker/04ab3157e4f1197a9f8f4b91cf2430586356dd9a/.examples/docker-compose/with-nginx-proxy/postgres/fpm/web/nginx.conf nginx.conf AGPL-3.0-or-later https://github.com/nextcloud/ https://raw.githubusercontent.com/nextcloud/docker/04ab3157e4f1197a9f8f4b91cf2430586356dd9a/.examples/docker-compose/with-nginx-proxy/postgres/fpm/web/nginx.conf
supervisord.conf AGPL-3.0-or-later https://github.com/nextcloud/ https://raw.githubusercontent.com/nextcloud/docker/04ab3157e4f1197a9f8f4b91cf2430586356dd9a/.examples/dockerfiles/cron/fpm-alpine/supervisord.conf supervisord.conf AGPL-3.0-or-later https://github.com/nextcloud/ https://raw.githubusercontent.com/nextcloud/docker/04ab3157e4f1197a9f8f4b91cf2430586356dd9a/.examples/dockerfiles/cron/fpm-alpine/supervisord.conf
nc_mail/appinfo/info.xml AGPL-3.0-or-later https://github.com/nextcloud/ https://raw.githubusercontent.com/nextcloud/mail/v1.15.2/appinfo/info.xml src/themes/dd/core/templates/layout.user.php AGPL-3.0-or-later https://github.com/nextcloud/ https://raw.githubusercontent.com/nextcloud/server/v25.0.5/core/templates/layout.user.php
nc_mail/lib/Command/UpdateAccount.php AGPL-3.0-or-later https://github.com/nextcloud/ https://raw.githubusercontent.com/nextcloud/mail/1e777a1783254bd4b7f69f39a6c5123323f8b701/lib/Command/UpdateAccount.php
nc_mail/lib/Db/MailAccountMapper.php AGPL-3.0-or-later https://github.com/nextcloud/ https://raw.githubusercontent.com/nextcloud/mail/1e777a1783254bd4b7f69f39a6c5123323f8b701/lib/Db/MailAccountMapper.php
src/themes/dd/core/templates/layout.user.php AGPL-3.0-or-later https://github.com/nextcloud/ https://raw.githubusercontent.com/nextcloud/server/v21.0.9/core/templates/layout.user.php

View File

@ -20,7 +20,10 @@ plugin_status() {
printf "%s\t%s" "enabled" "${version}" printf "%s\t%s" "enabled" "${version}"
else else
version="$(echo "${plugins_state}" | jq -r ".disabled.${plugin}")" version="$(echo "${plugins_state}" | jq -r ".disabled.${plugin}")"
if [ "${version}" != "null" ]; then is_available="$(echo "${plugins_state}" | jq -r \
--arg plugin "${plugin}" \
'.disabled | to_entries[] | select(.key == $plugin) | .key')"
if [ "${is_available}" = "${plugin}" ]; then
printf "%s\t%s" "disabled" "${version}" printf "%s\t%s" "disabled" "${version}"
else else
printf "%s\t%s" "n/a" "n/a" printf "%s\t%s" "n/a" "n/a"
@ -58,7 +61,7 @@ occupgrade
# Operators should instead rely on the environment variables to ease deployment # Operators should instead rely on the environment variables to ease deployment
# EXTRA_PLUGINS_ENABLE and EXTRA_PLUGINS_DISABLE # EXTRA_PLUGINS_ENABLE and EXTRA_PLUGINS_DISABLE
CORE_PLUGINS_ENABLE="user_saml,bruteforcesettings,polls,calendar,spreed,bbb,mail,ownpad,onlyoffice" CORE_PLUGINS_ENABLE="user_saml,bruteforcesettings,polls,calendar,spreed,bbb,mail,ownpad,onlyoffice"
CORE_PLUGINS_DISABLE="firstrunwizard,recommendations,dashboard,circles,forms" CORE_PLUGINS_DISABLE="firstrunwizard,recommendations,dashboard,circles"
if [ "${DISABLE_CLAMAV:-true}" = "false" ]; then if [ "${DISABLE_CLAMAV:-true}" = "false" ]; then
CORE_PLUGINS_ENABLE="${CORE_PLUGINS_ENABLE},files_antivirus" CORE_PLUGINS_ENABLE="${CORE_PLUGINS_ENABLE},files_antivirus"
@ -73,7 +76,7 @@ PLUGINS="${CORE_PLUGINS_ENABLE},${CORE_PLUGINS_DISABLE},${EXTRA_PLUGINS_ENABLE:-
# Install all plugins # Install all plugins
# shellcheck disable=SC2086 # We do want multiple arguments # shellcheck disable=SC2086 # We do want multiple arguments
for plugin in $(echo "${PLUGINS}" | tr ',' '\n'); do for plugin in $(echo "${PLUGINS}" | tr ',' '\n'); do
if plugin_status "${plugin}" | grep -q "n/a"; then if plugin_status "${plugin}" | grep -qE "^n/a"; then
echo "--> Installing ${plugin}" echo "--> Installing ${plugin}"
./occ --no-warnings app:install "${plugin}" ./occ --no-warnings app:install "${plugin}"
fi fi
@ -118,40 +121,32 @@ done
occupgrade occupgrade
# Temporary patch while upstream lands our changes
# See: https://github.com/nextcloud/mail/pull/6908
for f in appinfo/info.xml lib/Command/UpdateAccount.php lib/Db/MailAccountMapper.php; do
install -m 0644 -o www-data -g www-data "/nc_mail/$f" "/var/www/html/custom_apps/mail/$f"
done
occupgrade
## Forms ## Forms
# TODO: This is broken in NC 24 due to: ## This should be upstreamed, see:
# https://github.com/nextcloud/forms/pull/1149/files ## https://github.com/juanan3ip/form/issues/76
## TODO: request explanations and reduce upstream diff ## This is what is being used: https://github.com/3iPunt/nextcloud_forms
## This is what is being used: https://github.com/juanan3ip/form FORMS_EXPECTED_HASH="$(cat /forms.hash)"
#FORMS_EXPECTED_HASH="$(cat /forms.hash)" FORMS_DIR="/var/www/html/custom_apps/forms"
#FORMS_DIR="/var/www/html/custom_apps/forms" FORMS_HASH=""
#FORMS_HASH="" if [ -f "${FORMS_DIR}.hash" ]; then
#if [ -f "${FORMS_DIR}.hash" ]; then FORMS_HASH="$(cat "${FORMS_DIR}.hash")"
# FORMS_HASH="$(cat "${FORMS_DIR}.hash")" fi
#fi if [ "${FORMS_EXPECTED_HASH}" != "${FORMS_HASH}" ]; then
#if [ "${FORMS_EXPECTED_HASH}" != "${FORMS_HASH}" ]; then # Remove old plugin
# # Remove old plugin rm -rf "${FORMS_DIR}"
# rm -rf "${FORMS_DIR}" # Install new one
# # Install new one unzip -o /forms.zip -d /tmp
# unzip -o /forms.zip -d /tmp mv "/tmp/nextcloud_forms-${FORMS_EXPECTED_HASH}" "${FORMS_DIR}"
# mv "/tmp/form-${FORMS_EXPECTED_HASH}" "${FORMS_DIR}" # Perform config / install
# # Perform config / install npm --prefix "${FORMS_DIR}" install
# npm --prefix "${FORMS_DIR}" install composer --ignore-platform-req=ext-dom -d"${FORMS_DIR}" install --no-dev -o
# composer --ignore-platform-req=ext-dom -d"${FORMS_DIR}" install --no-dev -o # Place hash marker
# # Place hash marker cp /forms.hash "${FORMS_DIR}.hash"
# cp /forms.hash "${FORMS_DIR}.hash" fi
#fi if plugin_status "${plugin}" | grep -qE "^disabled"; then
#if plugin_status "${plugin}" | grep -qE "^disabled"; then ./occ app:enable forms
# ./occ app:enable forms fi
#fi
# #
#occupgrade #occupgrade

View File

@ -26,7 +26,7 @@ services:
dockerfile: Dockerfile dockerfile: Dockerfile
args: args:
# Update dd.conf.sample when bumping this version in main # Update dd.conf.sample when bumping this version in main
- IMG=${NEXTCLOUD_IMG_OVERRIDE-nextcloud:25.0.4-fpm-alpine} - IMG=${NEXTCLOUD_IMG_OVERRIDE-nextcloud:25.0.5-fpm-alpine}
container_name: dd-apps-nextcloud-app container_name: dd-apps-nextcloud-app
image: registry.dd-work.space/dd/apps-nextcloud:${DD_BUILD:-latest} image: registry.dd-work.space/dd/apps-nextcloud:${DD_BUILD:-latest}
restart: unless-stopped restart: unless-stopped

View File

@ -172,7 +172,7 @@ MOODLE_MEMORY_LIMIT=128M
## NEXTCLOUD ## NEXTCLOUD
# If enabled overrides nextcloud.yaml default image. # If enabled overrides nextcloud.yaml default image.
# You usually do not want to change this, but instead rely on DD's version. # You usually do not want to change this, but instead rely on DD's version.
#NEXTCLOUD_IMG_OVERRIDE=nextcloud:25.0.4-fpm-alpine #NEXTCLOUD_IMG_OVERRIDE=nextcloud:25.0.5-fpm-alpine
## ONLYOFFICE ## ONLYOFFICE
ONLYOFFICE_IMG=alehoho/oo-ce-docker-license:6.3.1.32 ONLYOFFICE_IMG=alehoho/oo-ce-docker-license:6.3.1.32