From eacfeefcdd254585dd8d7a69f60b94b771b30c0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= <1005065+DeepDiver1975@users.noreply.github.com> Date: Tue, 18 Aug 2026 16:14:02 +0200 Subject: [PATCH 1/3] fix(apps): respect apps that ship in the image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The install branch of 40-apps.sh only checked ${OWNCLOUD_VOLUME_APPS}/${VAL}, never /var/www/owncloud/apps/${VAL}, while the enable/disable branches in the same file check both. Any app bundled in the release tarball was therefore handed to `occ market:install` on every start. For an OCL app such as admin_audit that lookup fails, `market:install` exits 1, and since the hook is sourced by /usr/bin/owncloud under `set -eo pipefail` the container dies before `exec "$@"` - with no error banner. Check both directories, move the `market:upgrade --major` call inside the guard (UpgradeApp fails on the same exception path), and report why a marketplace install failed instead of dying silently. Fixes #539 Co-Authored-By: Claude Opus 5 Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> --- v22.04/overlay/etc/owncloud.d/40-apps.sh | 14 +++++++++----- v24.04/overlay/etc/owncloud.d/40-apps.sh | 14 +++++++++----- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/v22.04/overlay/etc/owncloud.d/40-apps.sh b/v22.04/overlay/etc/owncloud.d/40-apps.sh index bbd75d69..325d84a6 100755 --- a/v22.04/overlay/etc/owncloud.d/40-apps.sh +++ b/v22.04/overlay/etc/owncloud.d/40-apps.sh @@ -18,13 +18,17 @@ if [[ -n "${OWNCLOUD_APPS_INSTALL}" ]]; then echo "Deleting ${NAME} tarball..." rm -f "/tmp/${NAME}" else - if [[ ! -d ${OWNCLOUD_VOLUME_APPS}/${VAL} ]]; then + if [[ ! -d ${OWNCLOUD_VOLUME_APPS}/${VAL} && ! -d /var/www/owncloud/apps/${VAL} ]]; then echo "Installing ${VAL} app..." - occ market:install -n "${VAL}" - fi + if ! occ market:install -n "${VAL}"; then + echo "ERROR: failed to install app '${VAL}' from the marketplace." >&2 + echo " If '${VAL}' ships with the image, list it in OWNCLOUD_APPS_ENABLE instead of OWNCLOUD_APPS_INSTALL." >&2 + exit 1 + fi - if [[ $OWNCLOUD_APPS_INSTALL_MAJOR == "true" ]]; then - occ market:upgrade -n -q --major "${VAL}" + if [[ $OWNCLOUD_APPS_INSTALL_MAJOR == "true" ]]; then + occ market:upgrade -n -q --major "${VAL}" + fi fi fi done diff --git a/v24.04/overlay/etc/owncloud.d/40-apps.sh b/v24.04/overlay/etc/owncloud.d/40-apps.sh index bbd75d69..325d84a6 100755 --- a/v24.04/overlay/etc/owncloud.d/40-apps.sh +++ b/v24.04/overlay/etc/owncloud.d/40-apps.sh @@ -18,13 +18,17 @@ if [[ -n "${OWNCLOUD_APPS_INSTALL}" ]]; then echo "Deleting ${NAME} tarball..." rm -f "/tmp/${NAME}" else - if [[ ! -d ${OWNCLOUD_VOLUME_APPS}/${VAL} ]]; then + if [[ ! -d ${OWNCLOUD_VOLUME_APPS}/${VAL} && ! -d /var/www/owncloud/apps/${VAL} ]]; then echo "Installing ${VAL} app..." - occ market:install -n "${VAL}" - fi + if ! occ market:install -n "${VAL}"; then + echo "ERROR: failed to install app '${VAL}' from the marketplace." >&2 + echo " If '${VAL}' ships with the image, list it in OWNCLOUD_APPS_ENABLE instead of OWNCLOUD_APPS_INSTALL." >&2 + exit 1 + fi - if [[ $OWNCLOUD_APPS_INSTALL_MAJOR == "true" ]]; then - occ market:upgrade -n -q --major "${VAL}" + if [[ $OWNCLOUD_APPS_INSTALL_MAJOR == "true" ]]; then + occ market:upgrade -n -q --major "${VAL}" + fi fi fi done From 3ceba33f48eedd3911ae6ef7c082a9b28183675f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= <1005065+DeepDiver1975@users.noreply.github.com> Date: Tue, 18 Aug 2026 16:14:21 +0200 Subject: [PATCH 2/3] feat(marketplace)!: remove the dead OWNCLOUD_MARKETPLACE_KEY MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Marketplace API keys no longer exist, so OWNCLOUD_MARKETPLACE_KEY (and its OWNCLOUD_MARKETPLACE_APIKEY fallback) and the marketplace.key config value they write are dead configuration surface. marketplace.ca, appstoreenabled and appstoreurl stay: the store still serves community apps anonymously and those keys still allow disabling the appstore or pointing at a private one. config.php is regenerated on every start, so marketplace.key disappears from existing deployments on the next restart. Fixes #540 Co-Authored-By: Claude Opus 5 Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> --- ENVIRONMENT.md | 2 -- v22.04/overlay/etc/entrypoint.d/55-marketplace.sh | 3 --- v22.04/overlay/etc/templates/config.php | 4 ---- v24.04/overlay/etc/entrypoint.d/55-marketplace.sh | 3 --- v24.04/overlay/etc/templates/config.php | 4 ---- 5 files changed, 16 deletions(-) diff --git a/ENVIRONMENT.md b/ENVIRONMENT.md index edd282b7..7a4d0f1f 100644 --- a/ENVIRONMENT.md +++ b/ENVIRONMENT.md @@ -217,8 +217,6 @@ Enable maintenance mode to disable ownCloud (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_sample_php_parameters.html#enable-maintenance-mode-to-disable-owncloud)). - `OWNCLOUD_MARKETPLACE_CA=` \ Developer option to connect to Marketplace testing instances. -- `OWNCLOUD_MARKETPLACE_KEY=${OWNCLOUD_MARKETPLACE_APIKEY}` \ - Developer option to get access to unreleased Apps in your Marketplace account. - `OWNCLOUD_MEMCACHED_ENABLED=false` \ Enabled memory caching via memcached (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_sample_php_parameters.html#memory-caching-backend-for-distributed-data)). - `OWNCLOUD_MEMCACHED_HOST=memcached` \ diff --git a/v22.04/overlay/etc/entrypoint.d/55-marketplace.sh b/v22.04/overlay/etc/entrypoint.d/55-marketplace.sh index 2ae0d46e..7b15e780 100755 --- a/v22.04/overlay/etc/entrypoint.d/55-marketplace.sh +++ b/v22.04/overlay/etc/entrypoint.d/55-marketplace.sh @@ -1,8 +1,5 @@ #!/usr/bin/env bash -declare -x OWNCLOUD_MARKETPLACE_KEY -[[ -z "${OWNCLOUD_MARKETPLACE_KEY}" ]] && OWNCLOUD_MARKETPLACE_KEY="${OWNCLOUD_MARKETPLACE_APIKEY}" - declare -x OWNCLOUD_MARKETPLACE_CA [[ -z "${OWNCLOUD_MARKETPLACE_CA}" ]] && OWNCLOUD_MARKETPLACE_CA="" diff --git a/v22.04/overlay/etc/templates/config.php b/v22.04/overlay/etc/templates/config.php index d2730f52..a1eb5cf6 100644 --- a/v22.04/overlay/etc/templates/config.php +++ b/v22.04/overlay/etc/templates/config.php @@ -473,10 +473,6 @@ function getConfigFromEnv() { $config['license-class'] = getenv('OWNCLOUD_LICENSE_CLASS'); } - if (getenv('OWNCLOUD_MARKETPLACE_KEY') != '') { - $config['marketplace.key'] = getenv('OWNCLOUD_MARKETPLACE_KEY'); - } - if (getenv('OWNCLOUD_MARKETPLACE_CA') != '') { $config['marketplace.ca'] = getenv('OWNCLOUD_MARKETPLACE_CA'); } diff --git a/v24.04/overlay/etc/entrypoint.d/55-marketplace.sh b/v24.04/overlay/etc/entrypoint.d/55-marketplace.sh index 2ae0d46e..7b15e780 100755 --- a/v24.04/overlay/etc/entrypoint.d/55-marketplace.sh +++ b/v24.04/overlay/etc/entrypoint.d/55-marketplace.sh @@ -1,8 +1,5 @@ #!/usr/bin/env bash -declare -x OWNCLOUD_MARKETPLACE_KEY -[[ -z "${OWNCLOUD_MARKETPLACE_KEY}" ]] && OWNCLOUD_MARKETPLACE_KEY="${OWNCLOUD_MARKETPLACE_APIKEY}" - declare -x OWNCLOUD_MARKETPLACE_CA [[ -z "${OWNCLOUD_MARKETPLACE_CA}" ]] && OWNCLOUD_MARKETPLACE_CA="" diff --git a/v24.04/overlay/etc/templates/config.php b/v24.04/overlay/etc/templates/config.php index 26e92fae..bc54b4b4 100644 --- a/v24.04/overlay/etc/templates/config.php +++ b/v24.04/overlay/etc/templates/config.php @@ -570,10 +570,6 @@ function getConfigFromEnv() { $config['license-class'] = getenv('OWNCLOUD_LICENSE_CLASS'); } - if (getenv('OWNCLOUD_MARKETPLACE_KEY') != '') { - $config['marketplace.key'] = getenv('OWNCLOUD_MARKETPLACE_KEY'); - } - if (getenv('OWNCLOUD_MARKETPLACE_CA') != '') { $config['marketplace.ca'] = getenv('OWNCLOUD_MARKETPLACE_CA'); } From 364896b19b6bc84c4a9fec143d8235a08de02a52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= <1005065+DeepDiver1975@users.noreply.github.com> Date: Tue, 18 Aug 2026 16:41:18 +0200 Subject: [PATCH 3/3] docs(changelog): add entries for #539 and #540 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> --- CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d04c0294..9fec0b61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## 2026-08-18 + +* Fixed + * Apps that ship in the image are no longer sent to the marketplace, so listing + one in `OWNCLOUD_APPS_INSTALL` no longer aborts the container startup. A + failing marketplace install now logs why it failed + [#539](https://github.com/owncloud-docker/base/issues/539) + +* Changed + * Removed env variable `OWNCLOUD_MARKETPLACE_KEY` (and its + `OWNCLOUD_MARKETPLACE_APIKEY` fallback) for the `marketplace.key` config key, + as marketplace API keys no longer exist + [#540](https://github.com/owncloud-docker/base/issues/540) + ## 2026-07-09 * Added