Centralizes AtomOS filesystem path definitions - #71
Draft
gabrielefronze wants to merge 3 commits into
Draft
Conversation
Introduces `paths.json` to define all system and application-specific filesystem paths in a single location. `paths.py` provides a Python module to access these paths as attributes and helper functions for common path constructions. Unit tests (`test_paths.py`) ensure the consistency and accuracy of the defined paths against a frozen layout. This change improves maintainability, enhances consistency across the codebase, and lays the groundwork for future path remapping efforts, such as POSIX remapping. Relates to ATO-347.
This change realigns AtomOS paths to adhere to the Filesystem Hierarchy Standard (FHS) and POSIX guidelines, crucial for immutable operating system designs. It clearly separates: - Read-only application components under `/usr/libexec/elemento`. - Configuration under `/etc/elemento`. - Mutable persistent state under `/var/lib/elemento`. - Logs under `/var/log/elemento`. - Scratch data under `/var/tmp/elemento`. A new document, `PATHS_LAYOUT.md`, provides comprehensive guidance for operators on host directory creation and managing the transition from legacy `/opt/elemento` paths using symlinks. Relates to ATO-347.
… structure This commit refines the filesystem path definitions in `paths.json` and updates the corresponding frozen layout in `test_paths.py`. The changes include reordering and reintroducing several path definitions to ensure consistency and adherence to the Filesystem Hierarchy Standard (FHS). This update enhances maintainability and prepares the codebase for future enhancements. Relates to ATO-347.
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.
Introduces a robust system for managing AtomOS filesystem paths. This change aims to:
paths.json.paths.py) that dynamically loads these definitions, making them easily accessible throughout the codebase as module attributes.This centralization significantly improves maintainability, enhances consistency across the application, and simplifies future adjustments to the filesystem layout, such as POSIX remapping, by requiring changes only in
paths.json. Comprehensive unit tests ensure the integrity and correctness of the defined paths and helper functions.Relates to ATO-347