Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
- Exported types
- Methods
- cleanup
- cleanupPruneRepo
- deployTree
- deployTreeWithOptions
- deploymentSetKargs
- deploymentSetKargsInPlace
- deploymentSetMutable
- deploymentSetPinned
- deploymentUnlock
- ensureInitialized
- getBootedDeployment
- getBootversion
- getDeploymentDirectory
- getDeploymentDirpath
- getDeploymentOriginPath
- getDeployments
- getFd
- getMergeDeployment
- getPath
- getRepo
- getStagedDeployment
- getSubbootversion
- initOsname
- initialize
- isBooted
- load
- lock
- lockAsync
- lockFinish
- new
- newDefault
- originNewFromRefspec
- prepareCleanup
- queryDeploymentsFor
- repo
- requireBootedDeployment
- setMountNamespaceInUse
- simpleWriteDeployment
- stageOverlayInitrd
- stageTree
- stageTreeWithOptions
- tryLock
- unload
- unlock
- writeDeployments
- writeDeploymentsWithOptions
- writeOriginFile
- Properties
- Signals
No description available in the introspection data.
Synopsis
- newtype Sysroot = Sysroot (ManagedPtr Sysroot)
- class (GObject o, IsDescendantOf Sysroot o) => IsSysroot o
- toSysroot :: (MonadIO m, IsSysroot o) => o -> m Sysroot
- sysrootCleanup :: (HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) => a -> Maybe b -> m ()
- sysrootCleanupPruneRepo :: (HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) => a -> RepoPruneOptions -> Maybe b -> m (Int32, Int32, Word64)
- sysrootDeployTree :: (HasCallStack, MonadIO m, IsSysroot a, IsDeployment b, IsCancellable c) => a -> Maybe Text -> Text -> Maybe KeyFile -> Maybe b -> Maybe [Text] -> Maybe c -> m Deployment
- sysrootDeployTreeWithOptions :: (HasCallStack, MonadIO m, IsSysroot a, IsDeployment b, IsCancellable c) => a -> Maybe Text -> Text -> Maybe KeyFile -> Maybe b -> Maybe SysrootDeployTreeOpts -> Maybe c -> m Deployment
- sysrootDeploymentSetKargs :: (HasCallStack, MonadIO m, IsSysroot a, IsDeployment b, IsCancellable c) => a -> b -> [Text] -> Maybe c -> m ()
- sysrootDeploymentSetKargsInPlace :: (HasCallStack, MonadIO m, IsSysroot a, IsDeployment b, IsCancellable c) => a -> b -> Text -> Maybe c -> m ()
- sysrootDeploymentSetMutable :: (HasCallStack, MonadIO m, IsSysroot a, IsDeployment b, IsCancellable c) => a -> b -> Bool -> Maybe c -> m ()
- sysrootDeploymentSetPinned :: (HasCallStack, MonadIO m, IsSysroot a, IsDeployment b) => a -> b -> Bool -> m ()
- sysrootDeploymentUnlock :: (HasCallStack, MonadIO m, IsSysroot a, IsDeployment b, IsCancellable c) => a -> b -> DeploymentUnlockedState -> Maybe c -> m ()
- sysrootEnsureInitialized :: (HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) => a -> Maybe b -> m ()
- sysrootGetBootedDeployment :: (HasCallStack, MonadIO m, IsSysroot a) => a -> m (Maybe Deployment)
- sysrootGetBootversion :: (HasCallStack, MonadIO m, IsSysroot a) => a -> m Int32
- sysrootGetDeploymentDirectory :: (HasCallStack, MonadIO m, IsSysroot a, IsDeployment b) => a -> b -> m File
- sysrootGetDeploymentDirpath :: (HasCallStack, MonadIO m, IsSysroot a, IsDeployment b) => a -> b -> m Text
- sysrootGetDeploymentOriginPath :: (HasCallStack, MonadIO m, IsFile a) => a -> m File
- sysrootGetDeployments :: (HasCallStack, MonadIO m, IsSysroot a) => a -> m [Deployment]
- sysrootGetFd :: (HasCallStack, MonadIO m, IsSysroot a) => a -> m Int32
- sysrootGetMergeDeployment :: (HasCallStack, MonadIO m, IsSysroot a) => a -> Maybe Text -> m (Maybe Deployment)
- sysrootGetPath :: (HasCallStack, MonadIO m, IsSysroot a) => a -> m File
- sysrootGetRepo :: (HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) => a -> Maybe b -> m Repo
- sysrootGetStagedDeployment :: (HasCallStack, MonadIO m, IsSysroot a) => a -> m (Maybe Deployment)
- sysrootGetSubbootversion :: (HasCallStack, MonadIO m, IsSysroot a) => a -> m Int32
- sysrootInitOsname :: (HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) => a -> Text -> Maybe b -> m ()
- sysrootInitialize :: (HasCallStack, MonadIO m, IsSysroot a) => a -> m ()
- sysrootIsBooted :: (HasCallStack, MonadIO m, IsSysroot a) => a -> m Bool
- sysrootLoad :: (HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) => a -> Maybe b -> m ()
- sysrootLock :: (HasCallStack, MonadIO m, IsSysroot a) => a -> m ()
- sysrootLockAsync :: (HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- sysrootLockFinish :: (HasCallStack, MonadIO m, IsSysroot a, IsAsyncResult b) => a -> b -> m ()
- sysrootNew :: (HasCallStack, MonadIO m, IsFile a) => Maybe a -> m Sysroot
- sysrootNewDefault :: (HasCallStack, MonadIO m) => m Sysroot
- sysrootOriginNewFromRefspec :: (HasCallStack, MonadIO m, IsSysroot a) => a -> Text -> m KeyFile
- sysrootPrepareCleanup :: (HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) => a -> Maybe b -> m ()
- sysrootQueryDeploymentsFor :: (HasCallStack, MonadIO m, IsSysroot a) => a -> Maybe Text -> m (Maybe Deployment, Maybe Deployment)
- sysrootRepo :: (HasCallStack, MonadIO m, IsSysroot a) => a -> m Repo
- sysrootRequireBootedDeployment :: (HasCallStack, MonadIO m, IsSysroot a) => a -> m Deployment
- sysrootSetMountNamespaceInUse :: (HasCallStack, MonadIO m, IsSysroot a) => a -> m ()
- sysrootSimpleWriteDeployment :: (HasCallStack, MonadIO m, IsSysroot a, IsDeployment b, IsDeployment c, IsCancellable d) => a -> Maybe Text -> b -> Maybe c -> [SysrootSimpleWriteDeploymentFlags] -> Maybe d -> m ()
- sysrootStageOverlayInitrd :: (HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) => a -> Int32 -> Maybe b -> m Text
- sysrootStageTree :: (HasCallStack, MonadIO m, IsSysroot a, IsDeployment b, IsCancellable c) => a -> Maybe Text -> Text -> Maybe KeyFile -> Maybe b -> Maybe [Text] -> Maybe c -> m Deployment
- sysrootStageTreeWithOptions :: (HasCallStack, MonadIO m, IsSysroot a, IsDeployment b, IsCancellable c) => a -> Maybe Text -> Text -> Maybe KeyFile -> Maybe b -> SysrootDeployTreeOpts -> Maybe c -> m Deployment
- sysrootTryLock :: (HasCallStack, MonadIO m, IsSysroot a) => a -> m Bool
- sysrootUnload :: (HasCallStack, MonadIO m, IsSysroot a) => a -> m ()
- sysrootUnlock :: (HasCallStack, MonadIO m, IsSysroot a) => a -> m ()
- sysrootWriteDeployments :: (HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) => a -> [Deployment] -> Maybe b -> m ()
- sysrootWriteDeploymentsWithOptions :: (HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) => a -> [Deployment] -> SysrootWriteDeploymentsOpts -> Maybe b -> m ()
- sysrootWriteOriginFile :: (HasCallStack, MonadIO m, IsSysroot a, IsDeployment b, IsCancellable c) => a -> b -> Maybe KeyFile -> Maybe c -> m ()
- constructSysrootPath :: (IsSysroot o, MonadIO m, IsFile a) => a -> m (GValueConstruct o)
- getSysrootPath :: (MonadIO m, IsSysroot o) => o -> m File
- type SysrootJournalMsgCallback = Text -> IO ()
- afterSysrootJournalMsg :: (IsSysroot a, MonadIO m) => a -> ((?self :: a) => SysrootJournalMsgCallback) -> m SignalHandlerId
- onSysrootJournalMsg :: (IsSysroot a, MonadIO m) => a -> ((?self :: a) => SysrootJournalMsgCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Instances
Eq Sysroot Source # | |
GObject Sysroot Source # | |
Defined in GI.OSTree.Objects.Sysroot | |
ManagedPtrNewtype Sysroot Source # | |
Defined in GI.OSTree.Objects.Sysroot toManagedPtr :: Sysroot -> ManagedPtr Sysroot | |
TypedObject Sysroot Source # | |
Defined in GI.OSTree.Objects.Sysroot | |
HasParentTypes Sysroot Source # | |
Defined in GI.OSTree.Objects.Sysroot | |
IsGValue (Maybe Sysroot) Source # | Convert |
Defined in GI.OSTree.Objects.Sysroot gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Sysroot -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Sysroot) | |
type ParentTypes Sysroot Source # | |
Defined in GI.OSTree.Objects.Sysroot type ParentTypes Sysroot = '[Object] |
class (GObject o, IsDescendantOf Sysroot o) => IsSysroot o Source #
Instances
(GObject o, IsDescendantOf Sysroot o) => IsSysroot o Source # | |
Defined in GI.OSTree.Objects.Sysroot |
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, cleanup, cleanupPruneRepo, deployTree, deployTreeWithOptions, deploymentSetKargs, deploymentSetKargsInPlace, deploymentSetMutable, deploymentSetPinned, deploymentUnlock, ensureInitialized, forceFloating, freezeNotify, getv, initOsname, initialize, isBooted, isFloating, load, loadIfChanged, lock, lockAsync, lockFinish, notify, notifyByPspec, originNewFromRefspec, prepareCleanup, queryDeploymentsFor, ref, refSink, repo, requireBootedDeployment, runDispose, simpleWriteDeployment, stageOverlayInitrd, stageTree, stageTreeWithOptions, stealData, stealQdata, thawNotify, tryLock, unload, unlock, unref, watchClosure, writeDeployments, writeDeploymentsWithOptions, writeOriginFile.
Getters
getBootedDeployment, getBootversion, getData, getDeploymentDirectory, getDeploymentDirpath, getDeployments, getFd, getMergeDeployment, getPath, getProperty, getQdata, getRepo, getStagedDeployment, getSubbootversion.
Setters
cleanup
:: (HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> m () | (Can throw |
Delete any state that resulted from a partially completed transaction, such as incomplete deployments.
cleanupPruneRepo
sysrootCleanupPruneRepo Source #
:: (HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) | |
=> a |
|
-> RepoPruneOptions |
|
-> Maybe b |
|
-> m (Int32, Int32, Word64) | (Can throw |
Prune the system repository. This is a thin wrapper
around repoPruneFromReachable
; the primary
addition is that this function automatically gathers
all deployed commits into the reachable set.
You generally want to at least set the OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY
flag in options
. A commit traversal depth of 0
is assumed.
Locking: exclusive
Since: 2018.6
deployTree
:: (HasCallStack, MonadIO m, IsSysroot a, IsDeployment b, IsCancellable c) | |
=> a |
|
-> Maybe Text |
|
-> Text |
|
-> Maybe KeyFile |
|
-> Maybe b |
|
-> Maybe [Text] |
|
-> Maybe c |
|
-> m Deployment | (Can throw |
Older version of sysrootStageTreeWithOptions
.
Since: 2018.5
deployTreeWithOptions
sysrootDeployTreeWithOptions Source #
:: (HasCallStack, MonadIO m, IsSysroot a, IsDeployment b, IsCancellable c) | |
=> a |
|
-> Maybe Text |
|
-> Text |
|
-> Maybe KeyFile |
|
-> Maybe b |
|
-> Maybe SysrootDeployTreeOpts |
|
-> Maybe c |
|
-> m Deployment | (Can throw |
Check out deployment tree with revision revision
, performing a 3
way merge with providedMergeDeployment
for configuration.
When booted into the sysroot, you should use the
sysrootStageTree
API instead.
Since: 2020.7
deploymentSetKargs
sysrootDeploymentSetKargs Source #
:: (HasCallStack, MonadIO m, IsSysroot a, IsDeployment b, IsCancellable c) | |
=> a |
|
-> b |
|
-> [Text] |
|
-> Maybe c |
|
-> m () | (Can throw |
Entirely replace the kernel arguments of deployment
with the
values in newKargs
.
deploymentSetKargsInPlace
sysrootDeploymentSetKargsInPlace Source #
:: (HasCallStack, MonadIO m, IsSysroot a, IsDeployment b, IsCancellable c) | |
=> a |
|
-> b |
|
-> Text |
|
-> Maybe c |
|
-> m () | (Can throw |
Replace the kernel arguments of deployment
with the values in kargsStr
.
deploymentSetMutable
sysrootDeploymentSetMutable Source #
:: (HasCallStack, MonadIO m, IsSysroot a, IsDeployment b, IsCancellable c) | |
=> a |
|
-> b |
|
-> Bool |
|
-> Maybe c |
|
-> m () | (Can throw |
By default, deployment directories are not mutable. This function will allow making them temporarily mutable, for example to allow layering additional non-OSTree content.
deploymentSetPinned
sysrootDeploymentSetPinned Source #
:: (HasCallStack, MonadIO m, IsSysroot a, IsDeployment b) | |
=> a |
|
-> b |
|
-> Bool |
|
-> m () | (Can throw |
By default, deployments may be subject to garbage collection. Typical uses of
libostree only retain at most 2 deployments. If isPinned
is TRUE
, a
metadata bit will be set causing libostree to avoid automatic GC of the
deployment. However, this is really an "advisory" note; it's still possible
for e.g. older versions of libostree unaware of pinning to GC the deployment.
This function does nothing and returns successfully if the deployment is already in the desired pinning state. It is an error to try to pin the staged deployment (as it's not in the bootloader entries).
Since: 2018.3
deploymentUnlock
sysrootDeploymentUnlock Source #
:: (HasCallStack, MonadIO m, IsSysroot a, IsDeployment b, IsCancellable c) | |
=> a |
|
-> b |
|
-> DeploymentUnlockedState |
|
-> Maybe c |
|
-> m () | (Can throw |
Configure the target deployment deployment
such that it
is writable. There are multiple modes, essentially differing
in whether or not any changes persist across reboot.
The OSTREE_DEPLOYMENT_UNLOCKED_HOTFIX
state is persistent
across reboots.
Since: 2016.4
ensureInitialized
sysrootEnsureInitialized Source #
:: (HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> m () | (Can throw |
Ensure that self
is set up as a valid rootfs, by creating
/ostree/repo, among other things.
getBootedDeployment
sysrootGetBootedDeployment Source #
:: (HasCallStack, MonadIO m, IsSysroot a) | |
=> a |
|
-> m (Maybe Deployment) | Returns: The currently booted deployment, or |
This function may only be called if the sysroot is loaded.
getBootversion
sysrootGetBootversion :: (HasCallStack, MonadIO m, IsSysroot a) => a -> m Int32 Source #
No description available in the introspection data.
getDeploymentDirectory
sysrootGetDeploymentDirectory Source #
:: (HasCallStack, MonadIO m, IsSysroot a, IsDeployment b) | |
=> a |
|
-> b |
|
-> m File | Returns: Path to deployment root directory |
No description available in the introspection data.
getDeploymentDirpath
sysrootGetDeploymentDirpath Source #
:: (HasCallStack, MonadIO m, IsSysroot a, IsDeployment b) | |
=> a |
|
-> b |
|
-> m Text | Returns: Path to deployment root directory, relative to sysroot |
Note this function only returns a *relative* path - if you want
to access, it, you must either use fd-relative api such as openat()
,
or concatenate it with the full sysrootGetPath
.
getDeploymentOriginPath
sysrootGetDeploymentOriginPath Source #
:: (HasCallStack, MonadIO m, IsFile a) | |
=> a |
|
-> m File | Returns: Path to deployment origin file |
No description available in the introspection data.
getDeployments
sysrootGetDeployments Source #
:: (HasCallStack, MonadIO m, IsSysroot a) | |
=> a |
|
-> m [Deployment] | Returns: Ordered list of deployments |
No description available in the introspection data.
getFd
:: (HasCallStack, MonadIO m, IsSysroot a) | |
=> a |
|
-> m Int32 | Returns: A file descriptor valid for the lifetime of |
Access a file descriptor that refers to the root directory of this sysroot.
sysrootInitialize
(or sysrootLoad
) must have been invoked
prior to calling this function.
getMergeDeployment
sysrootGetMergeDeployment Source #
:: (HasCallStack, MonadIO m, IsSysroot a) | |
=> a |
|
-> Maybe Text |
|
-> m (Maybe Deployment) | Returns: Configuration merge deployment |
Find the deployment to use as a configuration merge source; this is the first one in the current deployment list which matches osname.
getPath
:: (HasCallStack, MonadIO m, IsSysroot a) | |
=> a |
|
-> m File | Returns: Path to rootfs |
No description available in the introspection data.
getRepo
:: (HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> m Repo | (Can throw |
Retrieve the OSTree repository in sysroot self
. The repo is guaranteed to be open
(see repoOpen
).
getStagedDeployment
sysrootGetStagedDeployment Source #
:: (HasCallStack, MonadIO m, IsSysroot a) | |
=> a |
|
-> m (Maybe Deployment) | Returns: The currently staged deployment, or |
No description available in the introspection data.
Since: 2018.5
getSubbootversion
sysrootGetSubbootversion :: (HasCallStack, MonadIO m, IsSysroot a) => a -> m Int32 Source #
No description available in the introspection data.
initOsname
:: (HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Maybe b |
|
-> m () | (Can throw |
Initialize the directory structure for an "osname", which is a
group of operating system deployments, with a shared /var
. One
is required for generating a deployment.
Since: 2016.4
initialize
:: (HasCallStack, MonadIO m, IsSysroot a) | |
=> a |
|
-> m () | (Can throw |
Subset of sysrootLoad
; performs basic initialization. Notably, one
can invoke ostree_sysroot_get_fd()
after calling this function.
It is not necessary to call this function if sysrootLoad
is
invoked.
Since: 2020.1
isBooted
:: (HasCallStack, MonadIO m, IsSysroot a) | |
=> a |
|
-> m Bool | Returns: |
Can only be invoked after ostree_sysroot_initialize()
.
Since: 2020.1
load
:: (HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> m () | (Can throw |
Load deployment list, bootversion, and subbootversion from the
rootfs self
.
lock
:: (HasCallStack, MonadIO m, IsSysroot a) | |
=> a |
|
-> m () | (Can throw |
Acquire an exclusive multi-process write lock for self
. This call
blocks until the lock has been acquired. The lock is not
reentrant.
Release the lock with sysrootUnlock
. The lock will also
be released if self
is deallocated.
lockAsync
:: (HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
An asynchronous version of sysrootLock
.
lockFinish
:: (HasCallStack, MonadIO m, IsSysroot a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m () | (Can throw |
Call when sysrootLockAsync
is ready.
new
:: (HasCallStack, MonadIO m, IsFile a) | |
=> Maybe a |
|
-> m Sysroot | Returns: An accessor object for an system root located at |
Create a new Sysroot
object for the sysroot at path
. If path
is Nothing
,
the current visible root file system is used, equivalent to
sysrootNewDefault
.
newDefault
:: (HasCallStack, MonadIO m) | |
=> m Sysroot | Returns: An accessor for the current visible root / filesystem |
No description available in the introspection data.
originNewFromRefspec
sysrootOriginNewFromRefspec Source #
:: (HasCallStack, MonadIO m, IsSysroot a) | |
=> a |
|
-> Text |
|
-> m KeyFile | Returns: A new config file which sets |
No description available in the introspection data.
prepareCleanup
sysrootPrepareCleanup Source #
:: (HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> m () | (Can throw |
Like sysrootCleanup
in that it cleans up incomplete deployments
and old boot versions, but does NOT prune the repository.
queryDeploymentsFor
sysrootQueryDeploymentsFor Source #
:: (HasCallStack, MonadIO m, IsSysroot a) | |
=> a |
|
-> Maybe Text |
|
-> m (Maybe Deployment, Maybe Deployment) |
Find the pending and rollback deployments for osname
. Pass Nothing
for osname
to use the booted deployment's osname. By default, pending deployment is the
first deployment in the order that matches osname
, and rollback
will be the
next one after the booted deployment, or the deployment after the pending if
we're not looking at the booted deployment.
Since: 2017.7
repo
:: (HasCallStack, MonadIO m, IsSysroot a) | |
=> a |
|
-> m Repo | Returns: The OSTree repository in sysroot |
This function is a variant of sysrootGetRepo
that cannot fail, and
returns a cached repository. Can only be called after sysrootInitialize
or sysrootLoad
has been invoked successfully.
Since: 2017.7
requireBootedDeployment
sysrootRequireBootedDeployment Source #
:: (HasCallStack, MonadIO m, IsSysroot a) | |
=> a |
|
-> m Deployment | Returns: The currently booted deployment, or an error (Can throw |
Find the booted deployment, or return an error if not booted via OSTree.
Since: 2021.1
setMountNamespaceInUse
sysrootSetMountNamespaceInUse :: (HasCallStack, MonadIO m, IsSysroot a) => a -> m () Source #
If this function is invoked, then libostree will assume that a private Linux mount namespace has been created by the process. The primary use case for this is to have e.g. /sysroot mounted read-only by default.
If this function has been called, then when a function which requires
writable access is invoked, libostree will automatically remount as writable
any mount points on which it operates. This currently is just /sysroot
and
/boot
.
If you invoke this function, it must be before sysrootLoad
; it may
be invoked before or after sysrootInitialize
.
Since: 2020.1
simpleWriteDeployment
sysrootSimpleWriteDeployment Source #
:: (HasCallStack, MonadIO m, IsSysroot a, IsDeployment b, IsDeployment c, IsCancellable d) | |
=> a |
|
-> Maybe Text |
|
-> b |
|
-> Maybe c |
|
-> [SysrootSimpleWriteDeploymentFlags] |
|
-> Maybe d |
|
-> m () | (Can throw |
Prepend newDeployment
to the list of deployments, commit, and
cleanup. By default, all other deployments for the given osname
except the merge deployment and the booted deployment will be
garbage collected.
If SysrootSimpleWriteDeploymentFlagsRetain
is
specified, then all current deployments will be kept.
If SysrootSimpleWriteDeploymentFlagsRetainPending
is
specified, then pending deployments will be kept.
If SysrootSimpleWriteDeploymentFlagsRetainRollback
is
specified, then rollback deployments will be kept.
If SysrootSimpleWriteDeploymentFlagsNotDefault
is
specified, then instead of prepending, the new deployment will be
added right after the booted or merge deployment, instead of first.
If SysrootSimpleWriteDeploymentFlagsNoClean
is
specified, then no cleanup will be performed after adding the
deployment. Make sure to call sysrootCleanup
sometime
later, instead.
stageOverlayInitrd
sysrootStageOverlayInitrd Source #
:: (HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) | |
=> a |
|
-> Int32 |
|
-> Maybe b |
|
-> m Text | (Can throw |
Stage an overlay initrd to be used in an upcoming deployment. Returns a checksum which
can be passed to sysrootDeployTreeWithOptions
or
sysrootStageTreeWithOptions
via the overlay_initrds
array option.
Since: 2020.7
stageTree
:: (HasCallStack, MonadIO m, IsSysroot a, IsDeployment b, IsCancellable c) | |
=> a |
|
-> Maybe Text |
|
-> Text |
|
-> Maybe KeyFile |
|
-> Maybe b |
|
-> Maybe [Text] |
|
-> Maybe c |
|
-> m Deployment | (Can throw |
Older version of sysrootStageTreeWithOptions
.
Since: 2018.5
stageTreeWithOptions
sysrootStageTreeWithOptions Source #
:: (HasCallStack, MonadIO m, IsSysroot a, IsDeployment b, IsCancellable c) | |
=> a |
|
-> Maybe Text |
|
-> Text |
|
-> Maybe KeyFile |
|
-> Maybe b |
|
-> SysrootDeployTreeOpts |
|
-> Maybe c |
|
-> m Deployment | (Can throw |
Like sysrootDeployTree
, but "finalization" only occurs at OS
shutdown time.
Since: 2020.7
tryLock
:: (HasCallStack, MonadIO m, IsSysroot a) | |
=> a |
|
-> m Bool | (Can throw |
Try to acquire an exclusive multi-process write lock for self
. If
another process holds the lock, this function will return
immediately, setting outAcquired
to False
, and returning True
(and no error).
Release the lock with sysrootUnlock
. The lock will also
be released if self
is deallocated.
unload
:: (HasCallStack, MonadIO m, IsSysroot a) | |
=> a |
|
-> m () |
Release any resources such as file descriptors referring to the root directory of this sysroot. Normally, those resources are cleared by finalization, but in garbage collected languages that may not be predictable.
This undoes the effect of ostree_sysroot_load()
.
unlock
:: (HasCallStack, MonadIO m, IsSysroot a) | |
=> a |
|
-> m () |
Clear the lock previously acquired with sysrootLock
. It
is safe to call this function if the lock has not been previously
acquired.
writeDeployments
sysrootWriteDeployments Source #
:: (HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) | |
=> a |
|
-> [Deployment] |
|
-> Maybe b |
|
-> m () | (Can throw |
Older version of sysrootWriteDeploymentsWithOptions
. This
version will perform post-deployment cleanup by default.
writeDeploymentsWithOptions
sysrootWriteDeploymentsWithOptions Source #
:: (HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) | |
=> a |
|
-> [Deployment] |
|
-> SysrootWriteDeploymentsOpts |
|
-> Maybe b |
|
-> m () | (Can throw |
Assuming newDeployments
have already been deployed in place on disk via
sysrootDeployTree
, atomically update bootloader configuration. By
default, no post-transaction cleanup will be performed. You should invoke
sysrootCleanup
at some point after the transaction, or specify
do_postclean
in opts
. Skipping the post-transaction cleanup is useful
if for example you want to control pruning of the repository.
Since: 2017.4
writeOriginFile
sysrootWriteOriginFile Source #
:: (HasCallStack, MonadIO m, IsSysroot a, IsDeployment b, IsCancellable c) | |
=> a |
|
-> b |
|
-> Maybe KeyFile |
|
-> Maybe c |
|
-> m () | (Can throw |
Immediately replace the origin file of the referenced deployment
with the contents of newOrigin
. If newOrigin
is Nothing
,
this function will write the current origin of deployment
.
Properties
path
No description available in the introspection data.
constructSysrootPath :: (IsSysroot o, MonadIO m, IsFile a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “path
” property. This is rarely needed directly, but it is used by new
.
getSysrootPath :: (MonadIO m, IsSysroot o) => o -> m File Source #
Get the value of the “path
” property.
When overloading is enabled, this is equivalent to
get
sysroot #path
Signals
journalMsg
type SysrootJournalMsgCallback Source #
libostree will log to the journal various events, such as the /etc merge status, and transaction completion. Connect to this signal to also synchronously receive the text for those messages. This is intended to be used by command line tools which link to libostree as a library.
Currently, the structured data is only available via the systemd journal.
Since: 2017.10
afterSysrootJournalMsg :: (IsSysroot a, MonadIO m) => a -> ((?self :: a) => SysrootJournalMsgCallback) -> m SignalHandlerId Source #
Connect a signal handler for the journalMsg signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
sysroot #journalMsg callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onSysrootJournalMsg :: (IsSysroot a, MonadIO m) => a -> ((?self :: a) => SysrootJournalMsgCallback) -> m SignalHandlerId Source #
Connect a signal handler for the journalMsg signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
sysroot #journalMsg callback