OSTree.RepoCommitModifier¶
Fields¶
None
Methods¶
class |
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class OSTree.RepoCommitModifier¶
A structure allowing control over commits.
- classmethod new(flags, commit_filter, *user_data)¶
- Parameters:
flags (
OSTree.RepoCommitModifierFlags
) – Control options for filtercommit_filter (
OSTree.RepoCommitFilter
orNone
) – Function that can inspect individual files
- Returns:
A new commit modifier.
- Return type:
- ref()¶
- Return type:
- set_devino_cache(cache)¶
- Parameters:
cache (
OSTree.RepoDevInoCache
) – A hash table caching device,inode to checksums
See the documentation for
ostree_repo_devino_cache_new()
. This function can then be used for later calls toostree_repo_write_directory_to_mtree()
to optimize commits.Note if your process has multiple writers, you should use separate
OSTreeRepo
instances if you want to also use this API.This function will add a reference to cache without copying - you should avoid further mutation of the cache.
New in version 2017.13.
- set_sepolicy(sepolicy)¶
- Parameters:
sepolicy (
OSTree.SePolicy
orNone
) – Policy to use for labeling
If policy is non-
None
, use it to look up labels to use for “security.selinux” extended attributes.Note that any policy specified this way operates in addition to any extended attributes provided via
OSTree.RepoCommitModifier.set_xattr_callback
(). However if both specify a value for “security.selinux”, then the one from the policy wins.
- set_sepolicy_from_commit(repo, rev, cancellable)¶
- Parameters:
repo (
OSTree.Repo
) – OSTree repo containing revrev (
str
) – Find SELinux policy from this base commitcancellable (
Gio.Cancellable
orNone
) –
- Raises:
- Return type:
In many cases, one wants to create a “derived” commit from base commit. SELinux policy labels are part of that base commit. This API allows one to easily set up SELinux labeling from a base commit.
New in version 2020.4.
- set_xattr_callback(callback, *user_data)¶
- Parameters:
callback (
OSTree.RepoCommitModifierXattrCallback
) – Function to be invoked, should return extended attributes for path
If set, this function should return extended attributes to use for the given path. This is useful for things like ACLs and SELinux, where a build system can label the files as it’s committing to the repository.
- unref()¶