# Binman - Manifests are descriptions of system files - Compositions are a system's configuration Commands: - `binman check current` checks the integrity of system files against the current manifests - `binman check latest` checks the integrity of system files against the latest manifests - `binman repair` restore any files that fail an integrity check against a current manifest. - `binman refresh` downloads latest manifests - `binman apply` applies latest manifests - `binman license ` prints the license information for a particular file path if the file was installed by binman and the information is available - `binman source ` downloads the source package associated with a path if the file was installed by binman and a source package is available File structure - `/etc/composition` binman composition for this system - `/var/binman` directory for manifests and their blobs - `/var/binman/base-system` directory for base-system manifest (for example) - `/var/binman/base-system/0` manifest with serial 0 - `/var/binman/base-system/1` manifest with serial 1 - `/var/binman/base-system/3` manifest with serial 3... - `/var/binman/base-system/latest` symbolic link to latest cached manifest - `/var/binman/base-system/current` symbolic link to the last applied manifest - `/var/binman/base-system/previous` symbolic link to the previously applied manifest - `/var/binman/base-system/blob` directory containing any `content` blobs downloaded - `/var/binman/base-system/blob/yKwwfp7AeSqgvdX2ZoiB0Qp3IxFEAT0SeMvIJChXBzMNrOvVcQhl9G6ZaHdzPEAe6FTy8shm27ZkDkfaQoMA0g==` bash, as in below example. Reflink copied from here to `/bin/bash` on application. ## Manifest First entry is header, subsequent entries are files, last entry is signature. `post-exec` is run after the changes are applied. `target` applies only to symlinks. Entire file is xz compressed. `ccs` is the corresponding source code package, and `bin` is the binary file to install - both are technically optional and can be set to `null`. `mod` is the `mode_t` of the file to be created in decimal form. ```jsonl { "name": "base-system", "desc": "Base operating system", "serial": 0 "post-exec": "/bin/os-setup", "key": "Vm10OzcoMHsneDl2Rm1kbjd3b19QNEpeOF5dIV5Wdmt3fng=", "remotes": [ "ipfs://QmPRHT1b8DA1NHJRrYy77yx9jrSiRbxkH82quqonfkiLn3/base-system/", "https://download.astrologue.nz/binaries/base-system/" ], } { "path": "/bin/bash", "uid": 0, "gid": 0, "mod": 33261, "target": null, "licence": "/usr/share/common-licenses/GPL-3", "bin": { "checksum": "yKwwfp7AeSqgvdX2ZoiB0Qp3IxFEAT0SeMvIJChXBzMNrOvVcQhl9G6ZaHdzPEAe6FTy8shm27ZkDkfaQoMA0g==", "size": 1740896, "remote-path": "0/bin/bash" }, "ccs": { "checksum": "akcwfp7AeSqgvdX2ZoiB0Qp3IxFEAT0SeMvIJChXBzMNrOvkk8iosG6ZaHdzPEAe6FTy8shm27ZkDkz8j4mA0a==", "size": 482734, "remote-path": "0/bash-source.tar.xz", } } { "signature": "0VPgiGlMCqNUgAaNcBZDXxA0ASBMql0mprScGPFXfNN8z9nTcuABMFO594TqNyA41idphV+Qb9yqmhw9WYeiSw==", } ``` ## Composition ```jsonl { "name": "base-system", "key": "Vm10OzcoMHsneDl2Rm1kbjd3b19QNEpeOF5dIV5Wdmt3fng=", "uris": [ "ipfs://QmPRHT1b8DA1NHJRrYy77yx9jrSiRbxkH82quqonfkiLn3/base-system.manifest.xz", "https://download.astrologue.nz/binaries/base-system.manifest.xz" ], } { "name": "gnome-desktop", "key": "Vm10OzcoMHsneDl2Rm1kbjd3b19QNEpeOF5dIV5Wdmt3fng=", "uris": [ "ipfs://QmPRHT1b8DA1NHJRrYy77yx9jrSiRbxkH82quqonfkiLn3/gnome-desktop.manifest.xz", "https://download.astrologue.nz/binaries/gnome-desktop.manifest.xz" ], } ```