Constants

Details

OSTree.COMMIT_GVARIANT_STRING = '(a{sv}aya(say)sstayay)'
OSTree.COMMIT_META_KEY_ARCHITECTURE = 'ostree.architecture'

GLib.Variant type s. Intended to describe the CPU architecture. This is a freeform string, and some distributions which have existing package managers might want to match that schema. If you don’t have a prior schema, it’s recommended to use uname -m by default (i.e. the Linux kernel schema). In the future ostree might include a builtin function to compare architectures.

New in version 2020.4.

OSTree.COMMIT_META_KEY_COLLECTION_BINDING = 'ostree.collection-binding'

GLib.Variant type s. If this is added to a commit, ostree_repo_pull() will enforce that the commit was retrieved from a repository which has the same collection ID. See ostree_repo_set_collection_id(). This is most useful in concert with OSTREE_COMMIT_META_KEY_REF_BINDING, as it more strongly binds the commit to the repository and branch.

New in version 2018.6.

OSTree.COMMIT_META_KEY_ENDOFLIFE = 'ostree.endoflife'

GLib.Variant type s. This metadata key is used to display vendor’s message when an update stream for a particular branch ends. It usually provides update instructions for the users.

New in version 2017.7.

OSTree.COMMIT_META_KEY_ENDOFLIFE_REBASE = 'ostree.endoflife-rebase'

GLib.Variant type s. Should contain a refspec defining a new target branch; ostree admin upgrade and OstreeSysrootUpgrader will automatically initiate a rebase upon encountering this metadata key.

New in version 2017.7.

OSTree.COMMIT_META_KEY_REF_BINDING = 'ostree.ref-binding'

GLib.Variant type as; each element is a branch name. If this is added to a commit, ostree_repo_pull() will enforce that the commit was retrieved from one of the branch names in this array. This prevents “sidegrade” attacks. The rationale for having this support multiple branch names is that it helps support a “promotion” model of taking a commit and moving it between development and production branches.

New in version 2017.9.

OSTree.COMMIT_META_KEY_SOURCE_TITLE = 'ostree.source-title'

GLib.Variant type s. This should hold a relatively short single line value containing a human-readable “source” for a commit, intended to be displayed near the origin ref. This is particularly useful for systems that inject content into an OSTree commit from elsewhere - for example, generating from an OCI or qcow2 image. Or if generating from packages, the enabled repository names and their versions.

Try to keep this key short (e.g. < 80 characters) and human-readable; if you desire machine readable data, consider injecting separate metadata keys.

New in version 2017.13.

OSTree.COMMIT_META_KEY_VERSION = 'version'

GLib.Variant type s. This metadata key is used for version numbers. A freeform string; the intention is that systems using ostree do not interpret this semantically as traditional package managers do.

This is the only ostree-defined metadata key that does not start with ostree..

New in version 2014.9.

OSTree.DIRMETA_GVARIANT_STRING = '(uuua(ayay))'
OSTree.FILEMETA_GVARIANT_STRING = '(uuua(ayay))'
OSTree.GPG_KEY_GVARIANT_STRING = '(aa{sv}aa{sv}a{sv})'
OSTree.MAX_METADATA_SIZE = 134217728

Default limit for maximum permitted size in bytes of metadata objects fetched over HTTP (including repo/config files, refs, and commit/dirtree/dirmeta objects). This is an arbitrary number intended to mitigate disk space exhaustion attacks.

OSTree.MAX_METADATA_WARN_SIZE = 7340032

This variable is no longer meaningful, it is kept only for compatibility.

OSTree.METADATA_KEY_BOOTABLE = 'ostree.bootable'

GLib.Variant type b : Set if this commit is intended to be bootable

New in version 2021.1.

OSTree.METADATA_KEY_LINUX = 'ostree.linux'

GLib.Variant type s : Contains the Linux kernel release (i.e. uname -r)

New in version 2021.1.

OSTree.META_KEY_DEPLOY_COLLECTION_ID = 'ostree.deploy-collection-id'

GLib.Variant type s. This key can be used in the repo metadata which is stored in OSTree.REPO_METADATA_REF as well as in the summary. The semantics of this are that the remote repository wants clients to update their remote config to add this collection ID (clients can’t do P2P operations involving a remote without a collection ID configured on it, even if one is configured on the server side). Clients must never change or remove a collection ID already set in their remote config.

Currently, OSTree does not implement changing a remote config based on this key, but it may do so in a later release, and until then clients such as Flatpak may implement it.

This is a replacement for the similar metadata key implemented by flatpak, xa.collection-id, which is now deprecated as clients which supported it had bugs with their P2P implementations.

New in version 2018.9.

OSTree.ORIGIN_TRANSIENT_GROUP = 'libostree-transient'

The name of a GKeyFile group for data that should not be carried across upgrades. For more information, see OSTree.Deployment.origin_remove_transient_state().

New in version 2018.3.

OSTree.PATH_BOOTED = '/run/ostree-booted'

Filesystem path that is created on an ostree-booted system.

New in version 2022.2.

OSTree.RELEASE_VERSION = 7

ostree release version component (e.g. 2 if OSTree.VERSION is 2017.2)

New in version 2017.4.

OSTree.REPO_METADATA_REF = 'ostree-metadata'

The name of a ref which is used to store metadata for the entire repository, such as its expected update time (ostree.summary.expires), name, or new GPG keys. Metadata is stored on contentless commits in the ref, and hence is signed with the commits.

This supersedes the additional metadata dictionary in the summary file (see OSTree.Repo.regenerate_summary()), as the use of a ref means that the metadata for multiple upstream repositories can be included in a single mirror repository, disambiguating the refs using collection IDs. In order to support peer to peer redistribution of repository metadata, repositories must set a collection ID (OSTree.Repo.set_collection_id()).

Users of OSTree may place arbitrary metadata in commits on this ref, but the keys must be namespaced by product or developer. For example, exampleos.end-of-life. The ostree. prefix is reserved.

New in version 2018.6.

OSTree.SHA256_DIGEST_LEN = 32

Length of a sha256 digest when expressed as raw bytes

OSTree.SHA256_STRING_LEN = 64

Length of a sha256 digest when expressed as a hexadecimal string

OSTree.SIGN_NAME_ED25519 = 'ed25519'

The name of the default ed25519 signing type.

New in version 2020.4.

OSTree.SUMMARY_GVARIANT_STRING = '(a(s(taya{sv}))a{sv})'
OSTree.SUMMARY_SIG_GVARIANT_STRING = 'a{sv}'
OSTree.TIMESTAMP = 0

The mtime used for stored files. This was originally 0, changed to 1 for a few releases, then was reverted due to regressions it introduced from users who had been using zero before.

OSTree.TREE_GVARIANT_STRING = '(a(say)a(sayay))'
OSTree.VERSION = 2024.7

ostree version.

New in version 2017.4.

OSTree.VERSION_S = '2024.7'

ostree version, encoded as a string, useful for printing and concatenation.

New in version 2017.4.

OSTree.YEAR_VERSION = 2024

ostree year version component (e.g. 2017 if OSTree.VERSION is 2017.2)

New in version 2017.4.