gi-ostree-1.0.2: OSTree bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.OSTree.Objects.Sysroot

Contents

Description

 

Synopsis

Exported types

newtype Sysroot Source #

Constructors

Sysroot (ManagedPtr Sysroot) 

Instances

GObject Sysroot Source # 
IsObject Sysroot Source # 
IsSysroot Sysroot Source # 
((~) * info (ResolveSysrootMethod t Sysroot), MethodInfo * info Sysroot p) => IsLabel t (Sysroot -> p) Source # 

Methods

fromLabel :: Proxy# Symbol t -> Sysroot -> p #

((~) * info (ResolveSysrootMethod t Sysroot), MethodInfo * info Sysroot p) => IsLabelProxy t (Sysroot -> p) Source # 

Methods

fromLabelProxy :: Proxy Symbol t -> Sysroot -> p #

HasAttributeList * Sysroot Source # 
type AttributeList Sysroot Source # 
type SignalList Sysroot Source # 

Methods

cleanup

data SysrootCleanupMethodInfo Source #

Instances

((~) * signature (Maybe b -> m ()), MonadIO m, IsSysroot a, IsCancellable b) => MethodInfo * SysrootCleanupMethodInfo a signature Source # 

sysrootCleanup Source #

Arguments

:: (HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) 
=> a

self: Sysroot

-> Maybe b

cancellable: Cancellable

-> m ()

(Can throw GError)

Delete any state that resulted from a partially completed transaction, such as incomplete deployments.

deployTree

sysrootDeployTree Source #

Arguments

:: (HasCallStack, MonadIO m, IsSysroot a, IsDeployment b, IsCancellable c) 
=> a

self: Sysroot

-> Maybe Text

osname: osname to use for merge deployment

-> Text

revision: Checksum to add

-> Maybe KeyFile

origin: Origin to use for upgrades

-> Maybe b

providedMergeDeployment: Use this deployment for merge path

-> Maybe [Text]

overrideKernelArgv: Use these as kernel arguments; if Nothing, inherit options from provided_merge_deployment

-> Maybe c

cancellable: Cancellable

-> m Deployment

(Can throw GError)

Check out deployment tree with revision revision, performing a 3 way merge with providedMergeDeployment for configuration.

deploymentSetKargs

sysrootDeploymentSetKargs Source #

Arguments

:: (HasCallStack, MonadIO m, IsSysroot a, IsDeployment b, IsCancellable c) 
=> a

self: Sysroot

-> b

deployment: A deployment

-> [Text]

newKargs: Replace deployment's kernel arguments

-> Maybe c

cancellable: Cancellable

-> m ()

(Can throw GError)

Entirely replace the kernel arguments of deployment with the values in newKargs.

deploymentSetMutable

sysrootDeploymentSetMutable Source #

Arguments

:: (HasCallStack, MonadIO m, IsSysroot a, IsDeployment b, IsCancellable c) 
=> a

self: Sysroot

-> b

deployment: A deployment

-> Bool

isMutable: Whether or not deployment's files can be changed

-> Maybe c 
-> m ()

(Can throw GError)

By default, deployment directories are not mutable. This function will allow making them temporarily mutable, for example to allow layering additional non-OSTree content.

deploymentUnlock

sysrootDeploymentUnlock Source #

Arguments

:: (HasCallStack, MonadIO m, IsSysroot a, IsDeployment b, IsCancellable c) 
=> a

self: Sysroot

-> b

deployment: Deployment

-> DeploymentUnlockedState

unlockedState: Transition to this unlocked state

-> Maybe c

cancellable: Cancellable

-> m ()

(Can throw GError)

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.

ensureInitialized

sysrootEnsureInitialized Source #

Arguments

:: (HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) 
=> a

self: Sysroot

-> Maybe b

cancellable: Cancellable

-> m ()

(Can throw GError)

Ensure that self is set up as a valid rootfs, by creating /ostree/repo, among other things.

getBootedDeployment

sysrootGetBootedDeployment Source #

Arguments

:: (HasCallStack, MonadIO m, IsSysroot a) 
=> a

self: Sysroot

-> m Deployment

Returns: The currently booted deployment, or Nothing if none

No description available in the introspection data.

getBootversion

sysrootGetBootversion :: (HasCallStack, MonadIO m, IsSysroot a) => a -> m Int32 Source #

No description available in the introspection data.

getDeploymentDirectory

sysrootGetDeploymentDirectory Source #

Arguments

:: (HasCallStack, MonadIO m, IsSysroot a, IsDeployment b) 
=> a

self: Sysroot

-> b

deployment: A deployment

-> m File

Returns: Path to deployment root directory

No description available in the introspection data.

getDeploymentDirpath

sysrootGetDeploymentDirpath Source #

Arguments

:: (HasCallStack, MonadIO m, IsSysroot a, IsDeployment b) 
=> a

self: Repo

-> b

deployment: A deployment

-> 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 #

Arguments

:: (HasCallStack, MonadIO m, IsFile a) 
=> a

deploymentPath: A deployment path

-> m File

Returns: Path to deployment origin file

No description available in the introspection data.

getDeployments

sysrootGetDeployments Source #

Arguments

:: (HasCallStack, MonadIO m, IsSysroot a) 
=> a

self: Sysroot

-> m [Deployment]

Returns: Ordered list of deployments

No description available in the introspection data.

getFd

data SysrootGetFdMethodInfo Source #

Instances

((~) * signature (m Int32), MonadIO m, IsSysroot a) => MethodInfo * SysrootGetFdMethodInfo a signature Source # 

sysrootGetFd Source #

Arguments

:: (HasCallStack, MonadIO m, IsSysroot a) 
=> a

self: Sysroot

-> m Int32

Returns: A file descriptor valid for the lifetime of self

Access a file descriptor that refers to the root directory of this sysroot. sysrootLoad must have been invoked prior to calling this function.

getMergeDeployment

sysrootGetMergeDeployment Source #

Arguments

:: (HasCallStack, MonadIO m, IsSysroot a) 
=> a

self: Sysroot

-> Maybe Text

osname: Operating system group

-> m 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

data SysrootGetPathMethodInfo Source #

Instances

((~) * signature (m File), MonadIO m, IsSysroot a) => MethodInfo * SysrootGetPathMethodInfo a signature Source # 

sysrootGetPath Source #

Arguments

:: (HasCallStack, MonadIO m, IsSysroot a) 
=> a 
-> m File

Returns: Path to rootfs

No description available in the introspection data.

getRepo

data SysrootGetRepoMethodInfo Source #

Instances

((~) * signature (Maybe b -> m Repo), MonadIO m, IsSysroot a, IsCancellable b) => MethodInfo * SysrootGetRepoMethodInfo a signature Source # 

sysrootGetRepo Source #

Arguments

:: (HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) 
=> a

self: Sysroot

-> Maybe b

cancellable: Cancellable

-> m Repo

(Can throw GError)

Retrieve the OSTree repository in sysroot self.

getSubbootversion

sysrootGetSubbootversion :: (HasCallStack, MonadIO m, IsSysroot a) => a -> m Int32 Source #

No description available in the introspection data.

initOsname

data SysrootInitOsnameMethodInfo Source #

Instances

((~) * signature (Text -> Maybe b -> m ()), MonadIO m, IsSysroot a, IsCancellable b) => MethodInfo * SysrootInitOsnameMethodInfo a signature Source # 

sysrootInitOsname Source #

Arguments

:: (HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) 
=> a

self: Sysroot

-> Text

osname: Name group of operating system checkouts

-> Maybe b

cancellable: Cancellable

-> m ()

(Can throw GError)

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.

load

data SysrootLoadMethodInfo Source #

Instances

((~) * signature (Maybe b -> m ()), MonadIO m, IsSysroot a, IsCancellable b) => MethodInfo * SysrootLoadMethodInfo a signature Source # 

Methods

overloadedMethod :: MethodProxy SysrootLoadMethodInfo a -> signature -> s #

sysrootLoad Source #

Arguments

:: (HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) 
=> a

self: Sysroot

-> Maybe b

cancellable: Cancellable

-> m ()

(Can throw GError)

Load deployment list, bootversion, and subbootversion from the rootfs self.

loadIfChanged

sysrootLoadIfChanged Source #

Arguments

:: (HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) 
=> a 
-> Bool 
-> Maybe b 
-> m ()

(Can throw GError)

No description available in the introspection data.

lock

data SysrootLockMethodInfo Source #

Instances

((~) * signature (m ()), MonadIO m, IsSysroot a) => MethodInfo * SysrootLockMethodInfo a signature Source # 

Methods

overloadedMethod :: MethodProxy SysrootLockMethodInfo a -> signature -> s #

sysrootLock Source #

Arguments

:: (HasCallStack, MonadIO m, IsSysroot a) 
=> a

self: Self

-> m ()

(Can throw GError)

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

sysrootLockAsync Source #

Arguments

:: (HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) 
=> a

self: Self

-> Maybe b

cancellable: Cancellable

-> Maybe AsyncReadyCallback

callback: Callback

-> m () 

An asynchronous version of sysrootLock.

lockFinish

data SysrootLockFinishMethodInfo Source #

Instances

((~) * signature (b -> m ()), MonadIO m, IsSysroot a, IsAsyncResult b) => MethodInfo * SysrootLockFinishMethodInfo a signature Source # 

sysrootLockFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsSysroot a, IsAsyncResult b) 
=> a

self: Self

-> b

result: Result

-> m ()

(Can throw GError)

Call when sysrootLockAsync is ready.

new

sysrootNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsFile a) 
=> Maybe a

path: Path to a system root directory, or Nothing

-> m Sysroot

Returns: An accessor object for an system root located at path

No description available in the introspection data.

newDefault

sysrootNewDefault Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Sysroot

Returns: An accessor for the current visible root / filesystem

No description available in the introspection data.

originNewFromRefspec

sysrootOriginNewFromRefspec Source #

Arguments

:: (HasCallStack, MonadIO m, IsSysroot a) 
=> a 
-> Text

refspec: A refspec

-> m KeyFile

Returns: A new config file which sets refspec as an origin

No description available in the introspection data.

prepareCleanup

sysrootPrepareCleanup Source #

Arguments

:: (HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) 
=> a

self: Sysroot

-> Maybe b

cancellable: Cancellable

-> m ()

(Can throw GError)

Like sysrootCleanup in that it cleans up incomplete deployments and old boot versions, but does NOT prune the repository.

simpleWriteDeployment

sysrootSimpleWriteDeployment Source #

Arguments

:: (HasCallStack, MonadIO m, IsSysroot a, IsDeployment b, IsDeployment c, IsCancellable d) 
=> a

sysroot: Sysroot

-> Maybe Text

osname: OS name

-> b

newDeployment: Prepend this deployment to the list

-> Maybe c

mergeDeployment: Use this deployment for configuration merge

-> [SysrootSimpleWriteDeploymentFlags]

flags: Flags controlling behavior

-> Maybe d

cancellable: Cancellable

-> m ()

(Can throw GError)

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 SysrootSimpleWriteDeploymentFlagsNotDefault is specified, then instead of prepending, the new deployment will be added right after the booted or merge deployment, instead of first.

tryLock

data SysrootTryLockMethodInfo Source #

Instances

((~) * signature (m Bool), MonadIO m, IsSysroot a) => MethodInfo * SysrootTryLockMethodInfo a signature Source # 

sysrootTryLock Source #

Arguments

:: (HasCallStack, MonadIO m, IsSysroot a) 
=> a

self: Self

-> m Bool

(Can throw GError)

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

data SysrootUnloadMethodInfo Source #

Instances

((~) * signature (m ()), MonadIO m, IsSysroot a) => MethodInfo * SysrootUnloadMethodInfo a signature Source # 

sysrootUnload Source #

Arguments

:: (HasCallStack, MonadIO m, IsSysroot a) 
=> a

self: Sysroot

-> 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

data SysrootUnlockMethodInfo Source #

Instances

((~) * signature (m ()), MonadIO m, IsSysroot a) => MethodInfo * SysrootUnlockMethodInfo a signature Source # 

sysrootUnlock Source #

Arguments

:: (HasCallStack, MonadIO m, IsSysroot a) 
=> a

self: Self

-> 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 #

Arguments

:: (HasCallStack, MonadIO m, IsSysroot a, IsCancellable b) 
=> a

self: Sysroot

-> [Deployment]

newDeployments: List of new deployments

-> Maybe b

cancellable: Cancellable

-> m ()

(Can throw GError)

Assuming newDeployments have already been deployed in place on disk, atomically update bootloader configuration.

writeOriginFile

sysrootWriteOriginFile Source #

Arguments

:: (HasCallStack, MonadIO m, IsSysroot a, IsDeployment b, IsCancellable c) 
=> a

sysroot: System root

-> b

deployment: Deployment

-> Maybe KeyFile

newOrigin: Origin content

-> Maybe c

cancellable: Cancellable

-> m ()

(Can throw GError)

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

data SysrootPathPropertyInfo Source #

Instances

AttrInfo SysrootPathPropertyInfo Source # 
type AttrOrigin SysrootPathPropertyInfo Source # 
type AttrLabel SysrootPathPropertyInfo Source # 
type AttrGetType SysrootPathPropertyInfo Source # 
type AttrBaseTypeConstraint SysrootPathPropertyInfo Source # 
type AttrSetTypeConstraint SysrootPathPropertyInfo Source # 
type AttrAllowedOps SysrootPathPropertyInfo Source #