-
Notifications
You must be signed in to change notification settings - Fork 1
feat(HDNEXT-1608): migrate app-list config to ncw-config's .list format #148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Arsalanulhaq
merged 8 commits into
ionos-dev-v33
from
as/dev/HDNEXT-1608-ncw-config-migration
Aug 21, 2026
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
a5a9a85
feat(HDNEXT-1608): migrate app-list config to ncw-config's .list format
Arsalanulhaq 59ac5fc
feat(HDNEXT-1608): check_dependencies also verifies jq is available
Arsalanulhaq cc6188e
feat(HDNEXT-1608): add execute_occ_secret_command wrapper for secret-…
Arsalanulhaq 3626215
feat(HDNEXT-1608): add validate_env_vars helper, use it for multi-var…
Arsalanulhaq 0d7b06c
feat(HDNEXT-1608): add validate_env_vars to configure-object-store.sh
Arsalanulhaq 4182095
feat(HDNEXT-1608): fix undefined fail() calls in configure-user-oidc.sh
Arsalanulhaq 23124de
feat(HDNEXT-1608): add validate_env_vars to configure-user-oidc.sh
Arsalanulhaq eba5dda
fix(HDNEXT-1608): address PR review comments
Arsalanulhaq File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # SPDX-FileCopyrightText: 2025 STRATO GmbH | ||
| # SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
|
||
| # List files: simple line-based configuration files | ||
| *.list text eol=lf linguist-language=Shell |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
| <!-- | ||
| - SPDX-FileCopyrightText: 2025 STRATO GmbH | ||
| - SPDX-License-Identifier: AGPL-3.0-or-later | ||
| --> | ||
|
|
||
| # List File Format Specification | ||
|
|
||
| ## Overview | ||
|
|
||
| Files with the `.list` extension in this project contain simple, line-based lists of items. This format is used for configuration purposes, particularly for managing app inclusion/exclusion lists. | ||
|
|
||
| ## Syntax Rules | ||
|
|
||
| ### Basic Format | ||
| - **One item per line**: Each line contains a single item (app name, identifier, etc.) | ||
| - **Case sensitive**: Item names are processed as-is | ||
| - **No quotes needed**: Items are plain text without quotes or delimiters | ||
|
|
||
| ### Comments | ||
| - **Shell-style comments**: Lines starting with `#` are treated as comments | ||
| - **Full-line comments only**: Inline comments (after an item) are NOT supported | ||
| - **Whitespace before `#`**: Leading whitespace before `#` is allowed | ||
|
|
||
| ### Empty Lines | ||
| - **Ignored**: Blank lines and lines with only whitespace are ignored | ||
| - **Used for readability**: Can be used to group related items visually | ||
|
|
||
| ### Example | ||
|
|
||
| ```list | ||
| # Core apps that should be disabled | ||
| dashboard | ||
| weather_status | ||
|
|
||
| # Communication apps | ||
| calendar | ||
|
|
||
| # Optional: These are disabled for performance reasons | ||
| # circles | ||
| # federation | ||
| ``` | ||
|
|
||
| ## Files Using This Format | ||
|
|
||
| - **`disabled-apps.list`**: Nextcloud apps to disable during build | ||
| - **`enabled-core-apps.list`**: Nextcloud apps to check/re-enable if presently disabled | ||
| - **`always-enabled-apps.list`**: Nextcloud apps added to the `alwaysEnabled` array in `core/shipped.json`, so they cannot be disabled by administrators | ||
| - **`removed-apps.txt`**: Nextcloud apps to completely remove from package | ||
|
|
||
| ## Processing | ||
|
|
||
| Scripts process these files using standard shell commands: | ||
| ```bash | ||
| # Example: Read and filter | ||
| grep -v '^[[:space:]]*#' file.list | grep -v '^[[:space:]]*$' | ||
| ``` | ||
|
|
||
| This approach: | ||
| 1. Removes comment lines (`^[[:space:]]*#`, including comments indented with leading whitespace) | ||
| 2. Removes empty lines (`^[[:space:]]*$`) | ||
| 3. Preserves item names exactly as written (leading/trailing whitespace on item lines is NOT trimmed) | ||
|
|
||
| ## IDE Support | ||
|
|
||
| ### EditorConfig | ||
| The `.editorconfig` file in this directory configures basic formatting for `.list` files: | ||
| - Character encoding: UTF-8 | ||
| - Line endings: LF (Unix-style) | ||
| - Indentation: 2 spaces | ||
| - Final newline: Required | ||
|
|
||
| ### Syntax Highlighting | ||
|
|
||
| For JetBrains IDEs (IntelliJ IDEA, WebStorm, PyCharm, etc.): | ||
| 1. Go to **Settings** → **Editor** → **File Types** | ||
| 2. Find or create **"Shell Script"** file type | ||
| 3. Add `*.list` to the file name patterns | ||
| 4. This enables shell-style comment highlighting | ||
|
|
||
| For VS Code: | ||
| 1. Add to `.vscode/settings.json`: | ||
| ```json | ||
| { | ||
| "files.associations": { | ||
| "*.list": "shellscript" | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ## Best Practices | ||
|
|
||
| 1. **Add comments**: Explain why items are included, especially for non-obvious choices | ||
| 2. **Group logically**: Use empty lines to separate related groups of items | ||
| 3. **Keep sorted**: Consider alphabetically sorting items within groups for easier maintenance | ||
| 4. **Document changes**: When adding/removing items, document the reason in comments or commit messages | ||
| 5. **Avoid duplicates**: Each item should appear only once in the file | ||
|
|
||
| ## Validation | ||
|
|
||
| To validate a `.list` file: | ||
| ```bash | ||
| # Check for duplicates | ||
| sort file.list | uniq -d | ||
|
|
||
| # Preview processed output (what scripts will see) | ||
| grep -v '^[[:space:]]*#' file.list | grep -v '^[[:space:]]*$' | ||
| ``` |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # SPDX-FileCopyrightText: 2025 STRATO GmbH | ||
| # SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
|
||
| ################################################################################ | ||
| # Always Enabled Apps List | ||
| ################################################################################ | ||
| # | ||
| # This file contains a list of Nextcloud apps that should be added to the | ||
| # 'alwaysEnabled' array in core/shipped.json, ensuring they cannot be | ||
| # disabled by administrators. | ||
| # | ||
| # Format: | ||
| # - One app name per line | ||
| # - Lines starting with # are comments | ||
| # - Empty lines are ignored | ||
| # | ||
| # This list is currently empty: no HiDrive Next apps have been decided as | ||
| # always-enabled yet. Add entries here deliberately, on a case-by-case basis. | ||
| ################################################################################ |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.