feat(skeleton): use skeleton folder from mounted volume in v24.04#477
Open
DeepDiver1975 wants to merge 1 commit into
Open
feat(skeleton): use skeleton folder from mounted volume in v24.04#477DeepDiver1975 wants to merge 1 commit into
DeepDiver1975 wants to merge 1 commit into
Conversation
Replace the OWNCLOUD_SKELETON_DIRECTORY env var with a fixed folder
inside the mounted data volume at ${OWNCLOUD_VOLUME_ROOT}/skeleton.
When that folder holds content it is used as the skeleton directory;
when it is empty the 'skeletondirectory' key is left unset so
owncloud/core falls back to its built-in core/skeleton default. The
emptiness check runs at request time in config.php via
FilesystemIterator, so adding/removing skeleton content takes effect
without regenerating config.
The folder is created alongside the other volume folders and is
covered by the existing recursive chown of the volume root.
This is a breaking change in v24.04 for anyone relying on
OWNCLOUD_SKELETON_DIRECTORY. v20.04 and v22.04 are intentionally left
unchanged.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
6d9d56a to
82b808a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the
OWNCLOUD_SKELETON_DIRECTORYenv var with a fixed folder inside the mounted data volume at${OWNCLOUD_VOLUME_ROOT}/skeleton(e.g./mnt/data/skeleton), for v24.04 only.Behavior:
skeletondirectoryis left unset so owncloud/core falls back to its built-incore/skeletondefault.The emptiness check runs at request time in
config.phpviaFilesystemIterator, so adding/removing skeleton content takes effect without regenerating config.Changes (v24.04 only)
overlay/etc/templates/config.php— replace the env-var-driven skeleton block with a runtime check of${OWNCLOUD_VOLUME_ROOT}/skeleton.overlay/etc/entrypoint.d/85-others.sh— remove theOWNCLOUD_SKELETON_DIRECTORYdeclaration.overlay/etc/owncloud.d/10-folders.sh— create${OWNCLOUD_VOLUME_ROOT}/skeletonalongside the other volume folders (covered by the existing recursive chown of the volume root).Feasibility
Verified against owncloud/core:
copySkeleton()callsgetSystemValue('skeletondirectory', \OC::\$SERVERROOT . '/core/skeleton'). Omitting the key yields the core default (the desired fallback); an empty string would instead disable skeleton copying — which is why the key is omitted, not set to"", when the folder is empty.Compatibility
OWNCLOUD_SKELETON_DIRECTORY.v20.04andv22.04retain the env-var behavior unchanged, soENVIRONMENT.mdremains accurate and is untouched.Verification
php -l v24.04/overlay/etc/templates/config.php→ no syntax errors.grep -rn "SKELETON_DIRECTORY" v24.04/→ no matches.🤖 Generated with Claude Code