Treefile

A "treefile" is a made up term for a JSON-formatted specification used as input to rpm-ostree compose tree to bind "set of RPMs with configuration" to "OSTree commit".

It's recommended to keep them in git, and set up a CI system like Jenkins to operate on them as it changes.

It supports the following parameters:

Each array element is an array, whose first member is a package name, and subsequent members are regular expressions (compatible with JavaScript).

Example: remove-from-packages: [["cpio", "/usr/share/.*"], ["dhclient", "/usr/lib/.*", "/usr/share/.*"]]

Note this does not alter the RPM database, so rpm -V will complain.

Example: check-passwd: { "type": "none" } Example: check-passwd: { "type": "previous" } Example: check-passwd: { "type": "file", "filename": "local-passwd" } Example: check-passwd: { "type": "data", "entries": { "bin": 1, "adm": [3, 4] } } See also: ignore-remove-users

Example: check-groups: { "type": "none" } Example: check-groups: { "type": "previous" } Example: check-groups: { "type": "file", "filename": "local-group" } Example: check-groups: { "type": "data", "entries": { "bin": 1, "adm": 4 } } See also: ignore-remove-groups

Example: ignore-removed-users: ["avahi-autoipd", "tss"]

Example: ignore-removed-groups: ["avahi"]

Example: releasever: "26"

This means that on an empty branch with an automatic_version_prefix of "22" the first three commits would get the versions: "22", "22.1", "22.2"

Example: automatic_version_prefix: "22.0"

It is strongly recommended to avoid using this except as a last resort. Having the system generated through RPMs allows administrators to understand the inputs to the system. Any new files created through this mechanism will not have the versioning inherent in RPM.

Only the script file will be copied in; thus if it has any dependencies, on data beyond what is in the target tree, you must embed them in the binary itself.

An example use for this is working around bugs in the input RPMs that are hard to fix in stable releases.

Note this does not alter the RPM database, so rpm -V will complain.

If you want to depend on network access, or tools not in the target host, you can use the split-up rpm-ostree compose install and rpm-ostree compose postprocess/commit commands.

Each array element is an array, whose first member is the source file name, and the second element is the destination name. The source file must be in the same directory as the treefile.

Example: "add-files": [["bar", "/usr/share/bar"], ["foo", "/lib/foo"]]

Note that in the OSTree model, not all directories are managed by OSTree. In short, only files in /usr (or UsrMove symlinks into /usr) and /etc are supported. For more details, see the OSTree manual: https://ostree.readthedocs.io/en/latest/manual/deployment/

Experimental options

All options listed here are subject to change or removal in a future version of rpm-ostree.