librelad 0de7f40f5d feat(storage): registry helper, fitness checks, CLI and the Disks view
Phase 1 of docs/roadmap/storage-locations.md — locations can now exist.
Nothing places an app on one yet; that is phase 2.

libreportal-storage is the only writer of the root-owned registry, and
its admission rules are what make adding a location safe: absolute and
canonical (a symlinked path is refused), outside the protected system
set, non-nesting with any known root in either direction, and EMPTY — or
already carrying our marker, which is the adopt case for a drive that
already holds app data. Root only ever chowns an empty directory, so
acceptance cannot hand away anything that existed. The parent must also
not be manager-writable, which is what closes the validate-then-chown
race; /mnt and /srv qualify, a path inside the manager's home does not.

The fitness checks answer a different question — "will app data actually
work here" — and grade rather than refuse. Only checks 1-5 (filesystem
type, mount options, ownership, sub-UID range, write/read-back) can block.
Reboot persistence and removability warn, because both describe supported
setups and start-up is already gated by the marker test.

The ownership probe had to move into the root helper. For a candidate the
directory is not ours yet — a fresh /mnt/disk is root-owned 0755 — so an
unprivileged probe could only ever report "cannot create a directory
here", which says nothing about the filesystem. Verified against a real
loopback ext4: it now reports ownership, sub-UID and read-back cleanly.

The Disks view unions the registry with attached hardware, registry
first. Verified on the live box that pulling a drive leaves its row in
place as not-attached, naming the app stranded on it, rather than the row
silently disappearing at exactly the moment someone needs it.

Also registers storage_scripts with both loaders, adds the CLI category
(auto-dispatched by cli_initialize.sh), and bumps footprint_version to 6
for the new root helper and the widened sudoers allowlist.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-24 20:30:46 +01:00

42 lines
1.5 KiB
Bash
Executable File

#!/bin/bash
# This file is auto-generated by generate_arrays.sh
# Do not edit manually - run './scripts/source/files/generate_arrays.sh run' to regenerate
source_scripts=(
"source/artifacts.sh"
"source/fetch.sh"
"source/files/arrays/files_app.sh"
"source/files/arrays/files_backup.sh"
"source/files/arrays/files_catalog.sh"
"source/files/arrays/files_checks.sh"
"source/files/arrays/files_cli.sh"
"source/files/arrays/files_config.sh"
"source/files/arrays/files_crontab.sh"
"source/files/arrays/files_database.sh"
"source/files/arrays/files_docker.sh"
"source/files/arrays/files_function.sh"
"source/files/arrays/files_install.sh"
"source/files/arrays/files_instance.sh"
"source/files/arrays/files_logs.sh"
"source/files/arrays/files_menu.sh"
"source/files/arrays/files_migrate.sh"
"source/files/arrays/files_network.sh"
"source/files/arrays/files_os.sh"
"source/files/arrays/files_peer.sh"
"source/files/arrays/files_restore.sh"
"source/files/arrays/files_setup.sh"
"source/files/arrays/files_source.sh"
"source/files/arrays/files_ssh.sh"
"source/files/arrays/files_start.sh"
"source/files/arrays/files_storage.sh"
"source/files/arrays/files_task.sh"
"source/files/arrays/files_update.sh"
"source/files/arrays/files_validation.sh"
"source/files/arrays/files_webui.sh"
"source/files/arrays/function_manifest.sh"
"source/files/generate_function_manifest.sh"
"source/verify.sh"
)