Skip to content

Centralizes AtomOS filesystem path definitions - #71

Draft
gabrielefronze wants to merge 3 commits into
developfrom
dev-posix-paths-ato347
Draft

Centralizes AtomOS filesystem path definitions#71
gabrielefronze wants to merge 3 commits into
developfrom
dev-posix-paths-ato347

Conversation

@gabrielefronze

Copy link
Copy Markdown
Member

Introduces a robust system for managing AtomOS filesystem paths. This change aims to:

  • Establish a single, central source of truth for all critical system paths within paths.json.
  • Provide a Python module (paths.py) that dynamically loads these definitions, making them easily accessible throughout the codebase as module attributes.
  • Offer utility functions for constructing derived paths based on the central definitions.

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

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.
@gabrielefronze gabrielefronze self-assigned this Aug 10, 2026
@gabrielefronze gabrielefronze added the enhancement New feature or request label Aug 10, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant