prootapps
PRoot Apps catalogs: folders of application packages that sessions install from.
A catalog is a shared record of proot_catalogs.yml naming the apps an
administrator picked from one or more remotes. A remote (Remote) is a
repository built like linuxserver/proot-apps: its metadata/metadata.yml
lists the apps and each app is a one-layer image tagged with its name under
one registry prefix. A GitHub owner/repo names one served from
raw.githubusercontent.com with images on ghcr.io/<owner>/<repo>; any other
is named by the base URL metadata/ is served under and the registry prefix,
one space apart. The node's credentials (registries) and mirrors serve
both fetches. Every node keeps its own copy of a catalog's content under
proot_apps_path/<id>, in the layout proot-apps reads through
PA_REPO_FOLDER:
metadata/metadata.yml the apps, for the graphical installer
metadata/img/<icon> their icons
<registry>_<app>/ app.tar.gz, the image's layer, and SHALAYER, its digest;
the image reference with `/` and `:` as `_`A session of a user whose effective settings name a catalog mounts that
folder read-only at MOUNT_PATH with PA_REPO_FOLDER pointing at it, so
proot-apps install, update, and the installer take everything from the
folder and reach no registry. The catalog names the apps of the default
remote, proot_apps_remote, by their short names and every other app by its
image, and the session's PA_DEFAULT_REPO (default_repo) is the registry
those short names are tags of. The content follows the record: a node syncs a
catalog whenever the record's revision is newer than its copy, and the
auto-update job syncs every catalog that asks for it; a sync fetches only the
apps whose layer digest changed, and removes the folders of apps no longer
picked. The record is small and shared; the content and the state of the
copy (node_state_path/proot-apps/<id>.yml) are this node's own.
attributelogger= logging.getLogger(__name__)attributeMOUNT_PATH= '/mnt/proot-apps'attributeMANIFEST_TYPES= ('application/vnd.oci.image.index.v1+json', 'application/vnd.oci.image.manifest.v1+json', 'application/vnd.docker.distribution.manifest.list.v2+json', 'application/vnd.docker.distribution.manifest.v2+json')attributeREMOTE_CACHE_SECONDS= 900