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

71 lines
3.0 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
cli_scripts=(
"cli/cli_initialize.sh"
"cli/cli_update.sh"
"cli/commands/app/cli_app_commands.sh"
"cli/commands/app/cli_app_header.sh"
"cli/commands/app/cli_app_restore.sh"
"cli/commands/app/cli_app_tool_list.sh"
"cli/commands/artifact/cli_artifact_apply.sh"
"cli/commands/artifact/cli_artifact_commands.sh"
"cli/commands/artifact/cli_artifact_header.sh"
"cli/commands/backup/cli_backup_commands.sh"
"cli/commands/backup/cli_backup_header.sh"
"cli/commands/catalog/cli_catalog_commands.sh"
"cli/commands/catalog/cli_catalog_header.sh"
"cli/commands/config/cli_config_commands.sh"
"cli/commands/config/cli_config_header.sh"
"cli/commands/debug/cli_debug_commands.sh"
"cli/commands/debug/cli_debug_header.sh"
"cli/commands/dockertype/cli_dockertype_commands.sh"
"cli/commands/dockertype/cli_dockertype_header.sh"
"cli/commands/firewall/cli_firewall_commands.sh"
"cli/commands/firewall/cli_firewall_header.sh"
"cli/commands/help/cli_help_commands.sh"
"cli/commands/help/cli_help_header.sh"
"cli/commands/install/cli_install_commands.sh"
"cli/commands/install/cli_install_header.sh"
"cli/commands/instance/cli_instance_commands.sh"
"cli/commands/instance/cli_instance_header.sh"
"cli/commands/ip/cli_ip_commands.sh"
"cli/commands/ip/cli_ip_header.sh"
"cli/commands/notify/cli_notify_commands.sh"
"cli/commands/notify/cli_notify_header.sh"
"cli/commands/peer/cli_peer_commands.sh"
"cli/commands/peer/cli_peer_header.sh"
"cli/commands/regen/cli_regen_commands.sh"
"cli/commands/regen/cli_regen_header.sh"
"cli/commands/reset/cli_reset_commands.sh"
"cli/commands/reset/cli_reset_header.sh"
"cli/commands/restore/cli_restore_commands.sh"
"cli/commands/restore/cli_restore_header.sh"
"cli/commands/setup/cli_setup_commands.sh"
"cli/commands/setup/cli_setup_header.sh"
"cli/commands/ssh/cli_ssh_commands.sh"
"cli/commands/ssh/cli_ssh_header.sh"
"cli/commands/storage/cli_storage_commands.sh"
"cli/commands/storage/cli_storage_header.sh"
"cli/commands/system/cli_system_commands.sh"
"cli/commands/system/cli_system_header.sh"
"cli/commands/update/cli_update_commands.sh"
"cli/commands/update/cli_update_header.sh"
"cli/commands/updater/cli_updater_auto.sh"
"cli/commands/updater/cli_updater_commands.sh"
"cli/commands/updater/cli_updater_header.sh"
"cli/commands/updater/cli_updater_ladder.sh"
"cli/commands/updater/cli_updater_upgrade.sh"
"cli/commands/updater/cli_updater_verify.sh"
"cli/commands/validation/cli_validation_commands.sh"
"cli/commands/validation/cli_validation_header.sh"
"cli/commands/verify/cli_verify_commands.sh"
"cli/commands/verify/cli_verify_header.sh"
"cli/commands/webui/cli_webui_commands.sh"
"cli/commands/webui/cli_webui_header.sh"
"cli/task/cli_task_run.sh"
)