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
- abortTransaction
- addGpgSignatureSummary
- appendGpgSignature
- checkoutAt
- checkoutGc
- checkoutTree
- commitTransaction
- copyConfig
- create
- createAt
- deleteObject
- equal
- findRemotesAsync
- findRemotesFinish
- fsckObject
- getBootloader
- getCollectionId
- getConfig
- getDefaultRepoFinders
- getDfd
- getDisableFsync
- getMinFreeSpaceBytes
- getMode
- getParent
- getPath
- getRemoteBooleanOption
- getRemoteListOption
- getRemoteOption
- gpgSignData
- gpgVerifyData
- hasObject
- hash
- importObjectFrom
- importObjectFromWithTrust
- isSystem
- isWritable
- listStaticDeltaIndexes
- listStaticDeltaNames
- loadCommit
- loadFile
- loadObjectStream
- loadVariant
- loadVariantIfExists
- lockPop
- lockPush
- markCommitPartial
- markCommitPartialReason
- modeFromString
- new
- newDefault
- newForSysrootPath
- open
- openAt
- prepareTransaction
- prune
- pruneFromReachable
- pruneStaticDeltas
- pull
- pullDefaultConsoleProgressChanged
- pullFromRemotesAsync
- pullFromRemotesFinish
- pullOneDir
- pullWithOptions
- queryObjectStorageSize
- readCommit
- readCommitDetachedMetadata
- regenerateSummary
- reloadConfig
- remoteAdd
- remoteChange
- remoteDelete
- remoteFetchSummary
- remoteFetchSummaryWithOptions
- remoteGetGpgKeys
- remoteGetGpgVerify
- remoteGetGpgVerifySummary
- remoteGetUrl
- remoteGpgImport
- remoteList
- resolveCollectionRef
- resolveKeyringForCollection
- resolveRev
- resolveRevExt
- scanHardlinks
- setAliasRefImmediate
- setCacheDir
- setCollectionId
- setCollectionRefImmediate
- setDisableFsync
- setRefImmediate
- signCommit
- signDelta
- signatureVerifyCommitData
- staticDeltaExecuteOffline
- staticDeltaExecuteOfflineWithSignature
- staticDeltaGenerate
- staticDeltaReindex
- staticDeltaVerifySignature
- transactionSetCollectionRef
- transactionSetRef
- transactionSetRefspec
- traverseParentsGetCommits
- verifyCommit
- verifyCommitExt
- verifyCommitForRemote
- verifySummary
- writeArchiveToMtree
- writeArchiveToMtreeFromFd
- writeCommit
- writeCommitDetachedMetadata
- writeCommitWithTime
- writeConfig
- writeContent
- writeContentAsync
- writeContentFinish
- writeContentTrusted
- writeDfdToMtree
- writeDirectoryToMtree
- writeMetadata
- writeMetadataAsync
- writeMetadataFinish
- writeMetadataStreamTrusted
- writeMetadataTrusted
- writeMtree
- writeRegfile
- writeRegfileInline
- writeSymlink
- Properties
- Signals
No description available in the introspection data.
Synopsis
- newtype Repo = Repo (ManagedPtr Repo)
- class (GObject o, IsDescendantOf Repo o) => IsRepo o
- toRepo :: (MonadIO m, IsRepo o) => o -> m Repo
- repoAbortTransaction :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Maybe b -> m ()
- repoAddGpgSignatureSummary :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> [Text] -> Maybe Text -> Maybe b -> m ()
- repoAppendGpgSignature :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Text -> Bytes -> Maybe b -> m ()
- repoCheckoutAt :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Maybe RepoCheckoutAtOptions -> Int32 -> Text -> Text -> Maybe b -> m ()
- repoCheckoutGc :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Maybe b -> m ()
- repoCheckoutTree :: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsRepoFile c, IsFileInfo d, IsCancellable e) => a -> RepoCheckoutMode -> RepoCheckoutOverwriteMode -> b -> c -> d -> Maybe e -> m ()
- repoCommitTransaction :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Maybe b -> m RepoTransactionStats
- repoCopyConfig :: (HasCallStack, MonadIO m, IsRepo a) => a -> m KeyFile
- repoCreate :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> RepoMode -> Maybe b -> m ()
- repoCreateAt :: (HasCallStack, MonadIO m, IsCancellable a) => Int32 -> Text -> RepoMode -> Maybe GVariant -> Maybe a -> m Repo
- repoDeleteObject :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> ObjectType -> Text -> Maybe b -> m ()
- repoEqual :: (HasCallStack, MonadIO m, IsRepo a, IsRepo b) => a -> b -> m Bool
- repoFindRemotesAsync :: (HasCallStack, MonadIO m, IsRepo a, IsAsyncProgress b, IsCancellable c) => a -> [CollectionRef] -> Maybe GVariant -> [RepoFinder] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()
- repoFindRemotesFinish :: (HasCallStack, MonadIO m, IsRepo a, IsAsyncResult b) => a -> b -> m [RepoFinderResult]
- repoFsckObject :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> ObjectType -> Text -> Maybe b -> m ()
- repoGetBootloader :: (HasCallStack, MonadIO m, IsRepo a) => a -> m Text
- repoGetCollectionId :: (HasCallStack, MonadIO m, IsRepo a) => a -> m (Maybe Text)
- repoGetConfig :: (HasCallStack, MonadIO m, IsRepo a) => a -> m KeyFile
- repoGetDefaultRepoFinders :: (HasCallStack, MonadIO m, IsRepo a) => a -> m [Text]
- repoGetDfd :: (HasCallStack, MonadIO m, IsRepo a) => a -> m Int32
- repoGetDisableFsync :: (HasCallStack, MonadIO m, IsRepo a) => a -> m Bool
- repoGetMinFreeSpaceBytes :: (HasCallStack, MonadIO m, IsRepo a) => a -> m Word64
- repoGetMode :: (HasCallStack, MonadIO m, IsRepo a) => a -> m RepoMode
- repoGetParent :: (HasCallStack, MonadIO m, IsRepo a) => a -> m Repo
- repoGetPath :: (HasCallStack, MonadIO m, IsRepo a) => a -> m File
- repoGetRemoteBooleanOption :: (HasCallStack, MonadIO m, IsRepo a) => a -> Text -> Text -> Bool -> m Bool
- repoGetRemoteListOption :: (HasCallStack, MonadIO m, IsRepo a) => a -> Text -> Text -> m [Text]
- repoGetRemoteOption :: (HasCallStack, MonadIO m, IsRepo a) => a -> Text -> Text -> Maybe Text -> m Text
- repoGpgSignData :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Bytes -> Bytes -> [Text] -> Maybe Text -> Maybe b -> m Bytes
- repoGpgVerifyData :: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsFile c, IsCancellable d) => a -> Maybe Text -> Bytes -> Bytes -> Maybe b -> Maybe c -> Maybe d -> m GpgVerifyResult
- repoHasObject :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> ObjectType -> Text -> Maybe b -> m Bool
- repoHash :: (HasCallStack, MonadIO m, IsRepo a) => a -> m Word32
- repoImportObjectFrom :: (HasCallStack, MonadIO m, IsRepo a, IsRepo b, IsCancellable c) => a -> b -> ObjectType -> Text -> Maybe c -> m ()
- repoImportObjectFromWithTrust :: (HasCallStack, MonadIO m, IsRepo a, IsRepo b, IsCancellable c) => a -> b -> ObjectType -> Text -> Bool -> Maybe c -> m ()
- repoIsSystem :: (HasCallStack, MonadIO m, IsRepo a) => a -> m Bool
- repoIsWritable :: (HasCallStack, MonadIO m, IsRepo a) => a -> m ()
- repoListStaticDeltaIndexes :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Maybe b -> m [Text]
- repoListStaticDeltaNames :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Maybe b -> m [Text]
- repoLoadCommit :: (HasCallStack, MonadIO m, IsRepo a) => a -> Text -> m (GVariant, [RepoCommitState])
- repoLoadFile :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Text -> Maybe b -> m (Maybe InputStream, Maybe FileInfo, Maybe GVariant)
- repoLoadObjectStream :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> ObjectType -> Text -> Maybe b -> m (InputStream, Word64)
- repoLoadVariant :: (HasCallStack, MonadIO m, IsRepo a) => a -> ObjectType -> Text -> m GVariant
- repoLoadVariantIfExists :: (HasCallStack, MonadIO m, IsRepo a) => a -> ObjectType -> Text -> m (Maybe GVariant)
- repoLockPop :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> RepoLockType -> Maybe b -> m ()
- repoLockPush :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> RepoLockType -> Maybe b -> m ()
- repoMarkCommitPartial :: (HasCallStack, MonadIO m, IsRepo a) => a -> Text -> Bool -> m ()
- repoMarkCommitPartialReason :: (HasCallStack, MonadIO m, IsRepo a) => a -> Text -> Bool -> [RepoCommitState] -> m ()
- repoModeFromString :: (HasCallStack, MonadIO m) => Text -> m RepoMode
- repoNew :: (HasCallStack, MonadIO m, IsFile a) => a -> m Repo
- repoNewDefault :: (HasCallStack, MonadIO m) => m Repo
- repoNewForSysrootPath :: (HasCallStack, MonadIO m, IsFile a, IsFile b) => a -> b -> m Repo
- repoOpen :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Maybe b -> m ()
- repoOpenAt :: (HasCallStack, MonadIO m, IsCancellable a) => Int32 -> Text -> Maybe a -> m Repo
- repoPrepareTransaction :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Maybe b -> m Bool
- repoPrune :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> [RepoPruneFlags] -> Int32 -> Maybe b -> m (Int32, Int32, Word64)
- repoPruneFromReachable :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> RepoPruneOptions -> Maybe b -> m (Int32, Int32, Word64)
- repoPruneStaticDeltas :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Maybe Text -> Maybe b -> m ()
- repoPull :: (HasCallStack, MonadIO m, IsRepo a, IsAsyncProgress b, IsCancellable c) => a -> Text -> Maybe [Text] -> [RepoPullFlags] -> Maybe b -> Maybe c -> m ()
- repoPullDefaultConsoleProgressChanged :: (HasCallStack, MonadIO m, IsAsyncProgress a) => a -> Ptr () -> m ()
- repoPullFromRemotesAsync :: (HasCallStack, MonadIO m, IsRepo a, IsAsyncProgress b, IsCancellable c) => a -> [RepoFinderResult] -> Maybe GVariant -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()
- repoPullFromRemotesFinish :: (HasCallStack, MonadIO m, IsRepo a, IsAsyncResult b) => a -> b -> m ()
- repoPullOneDir :: (HasCallStack, MonadIO m, IsRepo a, IsAsyncProgress b, IsCancellable c) => a -> Text -> Text -> Maybe [Text] -> [RepoPullFlags] -> Maybe b -> Maybe c -> m ()
- repoPullWithOptions :: (HasCallStack, MonadIO m, IsRepo a, IsAsyncProgress b, IsCancellable c) => a -> Text -> GVariant -> Maybe b -> Maybe c -> m ()
- repoQueryObjectStorageSize :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> ObjectType -> Text -> Maybe b -> m Word64
- repoReadCommit :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Text -> Maybe b -> m (File, Text)
- repoReadCommitDetachedMetadata :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Text -> Maybe b -> m (Maybe GVariant)
- repoRegenerateSummary :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Maybe GVariant -> Maybe b -> m ()
- repoReloadConfig :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Maybe b -> m ()
- repoRemoteAdd :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Text -> Maybe Text -> Maybe GVariant -> Maybe b -> m ()
- repoRemoteChange :: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsCancellable c) => a -> Maybe b -> RepoRemoteChange -> Text -> Maybe Text -> Maybe GVariant -> Maybe c -> m ()
- repoRemoteDelete :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Text -> Maybe b -> m ()
- repoRemoteFetchSummary :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Text -> Maybe b -> m (Bytes, Bytes)
- repoRemoteFetchSummaryWithOptions :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Text -> Maybe GVariant -> Maybe b -> m (Bytes, Bytes)
- repoRemoteGetGpgKeys :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Maybe Text -> Maybe [Text] -> Maybe b -> m [GVariant]
- repoRemoteGetGpgVerify :: (HasCallStack, MonadIO m, IsRepo a) => a -> Text -> m Bool
- repoRemoteGetGpgVerifySummary :: (HasCallStack, MonadIO m, IsRepo a) => a -> Text -> m Bool
- repoRemoteGetUrl :: (HasCallStack, MonadIO m, IsRepo a) => a -> Text -> m Text
- repoRemoteGpgImport :: (HasCallStack, MonadIO m, IsRepo a, IsInputStream b, IsCancellable c) => a -> Text -> Maybe b -> Maybe [Text] -> Maybe c -> m Word32
- repoRemoteList :: (HasCallStack, MonadIO m, IsRepo a) => a -> m [Text]
- repoResolveCollectionRef :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> CollectionRef -> Bool -> [RepoResolveRevExtFlags] -> Maybe b -> m (Maybe Text)
- repoResolveKeyringForCollection :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Text -> Maybe b -> m Remote
- repoResolveRev :: (HasCallStack, MonadIO m, IsRepo a) => a -> Text -> Bool -> m (Maybe Text)
- repoResolveRevExt :: (HasCallStack, MonadIO m, IsRepo a) => a -> Text -> Bool -> [RepoResolveRevExtFlags] -> m (Maybe Text)
- repoScanHardlinks :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Maybe b -> m ()
- repoSetAliasRefImmediate :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Maybe Text -> Text -> Maybe Text -> Maybe b -> m ()
- repoSetCacheDir :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Int32 -> Text -> Maybe b -> m ()
- repoSetCollectionId :: (HasCallStack, MonadIO m, IsRepo a) => a -> Maybe Text -> m ()
- repoSetCollectionRefImmediate :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> CollectionRef -> Maybe Text -> Maybe b -> m ()
- repoSetDisableFsync :: (HasCallStack, MonadIO m, IsRepo a) => a -> Bool -> m ()
- repoSetRefImmediate :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Maybe Text -> Text -> Maybe Text -> Maybe b -> m ()
- repoSignCommit :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Text -> Text -> Maybe Text -> Maybe b -> m ()
- repoSignDelta :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Text -> Text -> Text -> Text -> Maybe b -> m ()
- repoSignatureVerifyCommitData :: (HasCallStack, MonadIO m, IsRepo a) => a -> Text -> Bytes -> Bytes -> [RepoVerifyFlags] -> m (Maybe Text)
- repoStaticDeltaExecuteOffline :: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsCancellable c) => a -> b -> Bool -> Maybe c -> m ()
- repoStaticDeltaExecuteOfflineWithSignature :: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsSign c, IsCancellable d) => a -> b -> c -> Bool -> Maybe d -> m ()
- repoStaticDeltaGenerate :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> StaticDeltaGenerateOpt -> Maybe Text -> Text -> Maybe GVariant -> Maybe GVariant -> Maybe b -> m ()
- repoStaticDeltaReindex :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> StaticDeltaIndexFlags -> Text -> Maybe b -> m ()
- repoStaticDeltaVerifySignature :: (HasCallStack, MonadIO m, IsRepo a, IsSign b) => a -> Text -> b -> m (Maybe Text)
- repoTransactionSetCollectionRef :: (HasCallStack, MonadIO m, IsRepo a) => a -> CollectionRef -> Maybe Text -> m ()
- repoTransactionSetRef :: (HasCallStack, MonadIO m, IsRepo a) => a -> Maybe Text -> Text -> Maybe Text -> m ()
- repoTransactionSetRefspec :: (HasCallStack, MonadIO m, IsRepo a) => a -> Text -> Maybe Text -> m ()
- repoTraverseParentsGetCommits :: (HasCallStack, MonadIO m) => Map (Ptr ()) (Ptr ()) -> GVariant -> m [Text]
- repoVerifyCommit :: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsFile c, IsCancellable d) => a -> Text -> Maybe b -> Maybe c -> Maybe d -> m ()
- repoVerifyCommitExt :: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsFile c, IsCancellable d) => a -> Text -> Maybe b -> Maybe c -> Maybe d -> m GpgVerifyResult
- repoVerifyCommitForRemote :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Text -> Text -> Maybe b -> m GpgVerifyResult
- repoVerifySummary :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Text -> Bytes -> Bytes -> Maybe b -> m GpgVerifyResult
- repoWriteArchiveToMtree :: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsMutableTree c, IsCancellable d) => a -> b -> c -> Maybe RepoCommitModifier -> Bool -> Maybe d -> m ()
- repoWriteArchiveToMtreeFromFd :: (HasCallStack, MonadIO m, IsRepo a, IsMutableTree b, IsCancellable c) => a -> Int32 -> b -> Maybe RepoCommitModifier -> Bool -> Maybe c -> m ()
- repoWriteCommit :: (HasCallStack, MonadIO m, IsRepo a, IsRepoFile b, IsCancellable c) => a -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe GVariant -> b -> Maybe c -> m Text
- repoWriteCommitDetachedMetadata :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Text -> Maybe GVariant -> Maybe b -> m ()
- repoWriteCommitWithTime :: (HasCallStack, MonadIO m, IsRepo a, IsRepoFile b, IsCancellable c) => a -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe GVariant -> b -> Word64 -> Maybe c -> m Text
- repoWriteConfig :: (HasCallStack, MonadIO m, IsRepo a) => a -> KeyFile -> m ()
- repoWriteContent :: (HasCallStack, MonadIO m, IsRepo a, IsInputStream b, IsCancellable c) => a -> Maybe Text -> b -> Word64 -> Maybe c -> m ByteString
- repoWriteContentAsync :: (HasCallStack, MonadIO m, IsRepo a, IsInputStream b, IsCancellable c) => a -> Maybe Text -> b -> Word64 -> Maybe c -> Maybe AsyncReadyCallback -> m ()
- repoWriteContentFinish :: (HasCallStack, MonadIO m, IsRepo a, IsAsyncResult b) => a -> b -> m Word8
- repoWriteContentTrusted :: (HasCallStack, MonadIO m, IsRepo a, IsInputStream b, IsCancellable c) => a -> Text -> b -> Word64 -> Maybe c -> m ()
- repoWriteDfdToMtree :: (HasCallStack, MonadIO m, IsRepo a, IsMutableTree b, IsCancellable c) => a -> Int32 -> Text -> b -> Maybe RepoCommitModifier -> Maybe c -> m ()
- repoWriteDirectoryToMtree :: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsMutableTree c, IsCancellable d) => a -> b -> c -> Maybe RepoCommitModifier -> Maybe d -> m ()
- repoWriteMetadata :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> ObjectType -> Maybe Text -> GVariant -> Maybe b -> m ByteString
- repoWriteMetadataAsync :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> ObjectType -> Maybe Text -> GVariant -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- repoWriteMetadataFinish :: (HasCallStack, MonadIO m, IsRepo a, IsAsyncResult b) => a -> b -> m ByteString
- repoWriteMetadataStreamTrusted :: (HasCallStack, MonadIO m, IsRepo a, IsInputStream b, IsCancellable c) => a -> ObjectType -> Text -> b -> Word64 -> Maybe c -> m ()
- repoWriteMetadataTrusted :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> ObjectType -> Text -> GVariant -> Maybe b -> m ()
- repoWriteMtree :: (HasCallStack, MonadIO m, IsRepo a, IsMutableTree b, IsCancellable c) => a -> b -> Maybe c -> m File
- repoWriteRegfile :: (HasCallStack, MonadIO m, IsRepo a) => a -> Maybe Text -> Word32 -> Word32 -> Word32 -> Word64 -> Maybe GVariant -> m ContentWriter
- repoWriteRegfileInline :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Maybe Text -> Word32 -> Word32 -> Word32 -> Maybe GVariant -> ByteString -> Maybe b -> m Text
- repoWriteSymlink :: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) => a -> Maybe Text -> Word32 -> Word32 -> Maybe GVariant -> Text -> Maybe b -> m Text
- constructRepoPath :: (IsRepo o, MonadIO m, IsFile a) => a -> m (GValueConstruct o)
- getRepoPath :: (MonadIO m, IsRepo o) => o -> m File
- constructRepoRemotesConfigDir :: (IsRepo o, MonadIO m) => Text -> m (GValueConstruct o)
- getRepoRemotesConfigDir :: (MonadIO m, IsRepo o) => o -> m (Maybe Text)
- constructRepoSysrootPath :: (IsRepo o, MonadIO m, IsFile a) => a -> m (GValueConstruct o)
- getRepoSysrootPath :: (MonadIO m, IsRepo o) => o -> m (Maybe File)
- type RepoGpgVerifyResultCallback = Text -> GpgVerifyResult -> IO ()
- afterRepoGpgVerifyResult :: (IsRepo a, MonadIO m) => a -> ((?self :: a) => RepoGpgVerifyResultCallback) -> m SignalHandlerId
- onRepoGpgVerifyResult :: (IsRepo a, MonadIO m) => a -> ((?self :: a) => RepoGpgVerifyResultCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Instances
Eq Repo Source # | |
GObject Repo Source # | |
Defined in GI.OSTree.Objects.Repo | |
ManagedPtrNewtype Repo Source # | |
Defined in GI.OSTree.Objects.Repo toManagedPtr :: Repo -> ManagedPtr Repo | |
TypedObject Repo Source # | |
Defined in GI.OSTree.Objects.Repo | |
HasParentTypes Repo Source # | |
Defined in GI.OSTree.Objects.Repo | |
IsGValue (Maybe Repo) Source # | Convert |
Defined in GI.OSTree.Objects.Repo gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Repo -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Repo) | |
type ParentTypes Repo Source # | |
Defined in GI.OSTree.Objects.Repo type ParentTypes Repo = '[Object] |
class (GObject o, IsDescendantOf Repo o) => IsRepo o Source #
Instances
(GObject o, IsDescendantOf Repo o) => IsRepo o Source # | |
Defined in GI.OSTree.Objects.Repo |
Methods
Click to display all available methods, including inherited ones
Methods
abortTransaction, addGpgSignatureSummary, appendGpgSignature, bindProperty, bindPropertyFull, checkoutAt, checkoutGc, checkoutTree, commitTransaction, copyConfig, create, deleteObject, equal, findRemotesAsync, findRemotesFinish, forceFloating, freezeNotify, fsckObject, getv, gpgSignData, gpgVerifyData, hasObject, hash, importObjectFrom, importObjectFromWithTrust, isFloating, isSystem, isWritable, listCollectionRefs, listCommitObjectsStartingWith, listObjects, listRefs, listRefsExt, listStaticDeltaIndexes, listStaticDeltaNames, loadCommit, loadFile, loadObjectStream, loadVariant, loadVariantIfExists, lockPop, lockPush, markCommitPartial, markCommitPartialReason, notify, notifyByPspec, open, prepareTransaction, prune, pruneFromReachable, pruneStaticDeltas, pull, pullFromRemotesAsync, pullFromRemotesFinish, pullOneDir, pullWithOptions, queryObjectStorageSize, readCommit, readCommitDetachedMetadata, ref, refSink, regenerateSummary, reloadConfig, remoteAdd, remoteChange, remoteDelete, remoteFetchSummary, remoteFetchSummaryWithOptions, remoteGetGpgKeys, remoteGetGpgVerify, remoteGetGpgVerifySummary, remoteGetUrl, remoteGpgImport, remoteList, remoteListCollectionRefs, remoteListRefs, resolveCollectionRef, resolveKeyringForCollection, resolveRev, resolveRevExt, runDispose, scanHardlinks, signCommit, signDelta, signatureVerifyCommitData, staticDeltaExecuteOffline, staticDeltaExecuteOfflineWithSignature, staticDeltaGenerate, staticDeltaReindex, staticDeltaVerifySignature, stealData, stealQdata, thawNotify, transactionSetCollectionRef, transactionSetRef, transactionSetRefspec, traverseCommit, traverseReachableRefs, unref, verifyCommit, verifyCommitExt, verifyCommitForRemote, verifySummary, watchClosure, writeArchiveToMtree, writeArchiveToMtreeFromFd, writeCommit, writeCommitDetachedMetadata, writeCommitWithTime, writeConfig, writeContent, writeContentAsync, writeContentFinish, writeContentTrusted, writeDfdToMtree, writeDirectoryToMtree, writeMetadata, writeMetadataAsync, writeMetadataFinish, writeMetadataStreamTrusted, writeMetadataTrusted, writeMtree, writeRegfile, writeRegfileInline, writeSymlink.
Getters
getBootloader, getCollectionId, getConfig, getData, getDefaultRepoFinders, getDfd, getDisableFsync, getMinFreeSpaceBytes, getMode, getParent, getPath, getProperty, getQdata, getRemoteBooleanOption, getRemoteListOption, getRemoteOption.
Setters
setAliasRefImmediate, setCacheDir, setCollectionId, setCollectionRefImmediate, setData, setDataFull, setDisableFsync, setProperty, setRefImmediate.
abortTransaction
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> m () | (Can throw |
Abort the active transaction; any staged objects and ref changes will be
discarded. You *must* invoke this if you have chosen not to invoke
repoCommitTransaction
. Calling this function when not in a
transaction will do nothing and return successfully.
addGpgSignatureSummary
repoAddGpgSignatureSummary Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> [Text] |
|
-> Maybe Text |
|
-> Maybe b |
|
-> m () | (Can throw |
Add a GPG signature to a summary file.
appendGpgSignature
repoAppendGpgSignature Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Bytes |
|
-> Maybe b |
|
-> m () | (Can throw |
Append a GPG signature to a commit.
checkoutAt
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Maybe RepoCheckoutAtOptions |
|
-> Int32 |
|
-> Text |
|
-> Text |
|
-> Maybe b |
|
-> m () | (Can throw |
Similar to repoCheckoutTree
, but uses directory-relative
paths for the destination, uses a new OstreeRepoCheckoutAtOptions
,
and takes a commit checksum and optional subpath pair, rather than
requiring use of GFile
APIs for the caller.
It also replaces repoCheckoutAt
which was not safe to
use with GObject introspection.
Note in addition that unlike repoCheckoutTree
, the
default is not to use the repository-internal uncompressed objects
cache.
Since: 2016.8
checkoutGc
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> m () | (Can throw |
Call this after finishing a succession of checkout operations; it will delete any currently-unused uncompressed objects from the cache.
checkoutTree
:: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsRepoFile c, IsFileInfo d, IsCancellable e) | |
=> a |
|
-> RepoCheckoutMode |
|
-> RepoCheckoutOverwriteMode |
|
-> b |
|
-> c |
|
-> d |
|
-> Maybe e |
|
-> m () | (Can throw |
Check out source
into destination
, which must live on the
physical filesystem. source
may be any subdirectory of a given
commit. The mode
and overwriteMode
allow control over how the
files are checked out.
commitTransaction
repoCommitTransaction Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> m RepoTransactionStats | (Can throw |
Complete the transaction. Any refs set with
repoTransactionSetRef
or
repoTransactionSetRefspec
will be written out.
Note that if multiple threads are performing writes, all such threads must have terminated before this function is invoked.
Locking: Releases shared
lock acquired by ostree_repo_prepare_transaction()
Multithreading: This function is *not* MT safe; only one transaction can be
active at a time.
copyConfig
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a | |
-> m KeyFile | Returns: A newly-allocated copy of the repository config |
No description available in the introspection data.
create
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> RepoMode |
|
-> Maybe b |
|
-> m () | (Can throw |
Create the underlying structure on disk for the repository, and call
repoOpen
on the result, preparing it for use.
Since version 2016.8, this function will succeed on an existing repository, and finish creating any necessary files in a partially created repository. However, this function cannot change the mode of an existing repository, and will silently ignore an attempt to do so.
Since 2017.9, "existing repository" is defined by the existence of an
objects
subdirectory.
This function predates repoCreateAt
. It is an error to call
this function on a repository initialized via repoOpenAt
.
createAt
:: (HasCallStack, MonadIO m, IsCancellable a) | |
=> Int32 |
|
-> Text |
|
-> RepoMode |
|
-> Maybe GVariant |
|
-> Maybe a |
|
-> m Repo | Returns: A new OSTree repository reference (Can throw |
This is a file-descriptor relative version of repoCreate
.
Create the underlying structure on disk for the repository, and call
repoOpenAt
on the result, preparing it for use.
If a repository already exists at dfd
+ path
(defined by an objects/
subdirectory existing), then this function will simply call
repoOpenAt
. In other words, this function cannot be used to change
the mode or configuration (repo/config
) of an existing repo.
The options
dict may contain:
- collection-id: s: Set as collection ID in repo/config (Since 2017.9)
Since: 2017.10
deleteObject
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> ObjectType |
|
-> Text |
|
-> Maybe b |
|
-> m () | (Can throw |
Remove the object of type objtype
with checksum sha256
from the repository. An error of type IOErrorEnumNotFound
is thrown if the object does not exist.
equal
findRemotesAsync
:: (HasCallStack, MonadIO m, IsRepo a, IsAsyncProgress b, IsCancellable c) | |
=> a |
|
-> [CollectionRef] |
|
-> Maybe GVariant |
|
-> [RepoFinder] |
|
-> Maybe b |
|
-> Maybe c |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Find reachable remote URIs which claim to provide any of the given named
refs
. This will search for configured remotes (tRepoFinderConfig
),
mounted volumes (tRepoFinderMount
) and (if enabled at compile time)
local network peers (tRepoFinderAvahi
). In order to use a custom
configuration of RepoFinder
instances, call
repoFinderResolveAllAsync
on them individually.
Any remote which is found and which claims to support any of the given refs
will be returned in the results. It is possible that a remote claims to
support a given ref, but turns out not to — it is not possible to verify this
until repoPullFromRemotesAsync
is called.
The returned results will be sorted with the most useful first — this is
typically the remote which claims to provide the most of refs
, at the lowest
latency.
Each result contains a list of the subset of refs
it claims to provide. It
is possible for a non-empty list of results to be returned, but for some of
refs
to not be listed in any of the results. Callers must check for this.
Pass the results to repoPullFromRemotesAsync
to pull the given refs
from those remotes.
The following options
are currently defined:
override-commit-ids
(as
): Array of specific commit IDs to fetch. The nth commit ID applies to the nth ref, so this must be the same length asrefs
, if provided.n-network-retries
(u
): Number of times to retry each download on receiving a transient network error, such as a socket timeout; default is 5, 0 means return errors without retrying. Since: 2018.6
finders
must be a non-empty Nothing
-terminated array of the RepoFinder
instances to use, or Nothing
to use the system default set of finders, which
will typically be all available finders using their default options (but
this is not guaranteed).
GPG verification of commits will be used unconditionally.
This will use the thread-default MainContext
, but will not iterate it.
Since: 2018.6
findRemotesFinish
repoFindRemotesFinish Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m [RepoFinderResult] | Returns: a potentially empty array
of |
Finish an asynchronous pull operation started with
repoFindRemotesAsync
.
Since: 2018.6
fsckObject
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> ObjectType |
|
-> Text |
|
-> Maybe b |
|
-> m () | (Can throw |
Verify consistency of the object; this performs checks only relevant to the immediate object itself, such as checksumming. This API call will not itself traverse metadata objects for example.
Since: 2017.15
getBootloader
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> m Text | Returns: bootloader configuration for the sysroot |
Get the bootloader configured. See the documentation for the "sysroot.bootloader" config key.
Since: 2019.2
getCollectionId
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> m (Maybe Text) | Returns: collection ID for the repository |
Get the collection ID of this repository. See [collection IDs][collection-ids].
Since: 2018.6
getConfig
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a | |
-> m KeyFile | Returns: The repository configuration; do not modify |
No description available in the introspection data.
getDefaultRepoFinders
repoGetDefaultRepoFinders Source #
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> m [Text] | Returns:
|
Get the set of default repo finders configured. See the documentation for the "core.default-repo-finders" config key.
Since: 2018.9
getDfd
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> m Int32 | Returns: File descriptor for repository root - owned by |
In some cases it's useful for applications to access the repository
directly; for example, writing content into repo/tmp
ensures it's
on the same filesystem. Another case is detecting the mtime on the
repository (to see whether a ref was written).
Since: 2016.4
getDisableFsync
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> m Bool | Returns: Whether or not |
For more information see repoSetDisableFsync
.
getMinFreeSpaceBytes
repoGetMinFreeSpaceBytes Source #
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> m Word64 | (Can throw |
Determine the number of bytes of free disk space that are reserved according
to the repo config and return that number in outReservedBytes
. See the
documentation for the core.min-free-space-size and
core.min-free-space-percent repo config options.
Since: 2018.9
getMode
repoGetMode :: (HasCallStack, MonadIO m, IsRepo a) => a -> m RepoMode Source #
No description available in the introspection data.
getParent
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> m Repo | Returns: Parent repository, or |
Before this function can be used, ostree_repo_init()
must have been
called.
getPath
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> m File | Returns: Path to repo |
Note that since the introduction of repoOpenAt
, this function may
return a process-specific path in /proc
if the repository was created using
that API. In general, you should avoid use of this API.
getRemoteBooleanOption
repoGetRemoteBooleanOption Source #
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> Text |
|
-> Text |
|
-> Bool |
|
-> m Bool | (Can throw |
OSTree remotes are represented by keyfile groups, formatted like:
[remote "remotename"]
. This function returns a value named optionName
underneath that group, and returns it as a boolean.
If the option is not set, outValue
will be set to defaultValue
. If an
error is returned, outValue
will be set to False
.
Since: 2016.5
getRemoteListOption
repoGetRemoteListOption Source #
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> Text |
|
-> Text |
|
-> m [Text] | (Can throw |
OSTree remotes are represented by keyfile groups, formatted like:
[remote "remotename"]
. This function returns a value named optionName
underneath that group, and returns it as a zero terminated array of strings.
If the option is not set, or if an error is returned, outValue
will be set
to Nothing
.
Since: 2016.5
getRemoteOption
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> Text |
|
-> Text |
|
-> Maybe Text |
|
-> m Text | (Can throw |
OSTree remotes are represented by keyfile groups, formatted like:
[remote "remotename"]
. This function returns a value named optionName
underneath that group, or defaultValue
if the remote exists but not the
option name. If an error is returned, outValue
will be set to Nothing
.
Since: 2016.5
gpgSignData
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Bytes |
|
-> Bytes |
|
-> [Text] |
|
-> Maybe Text |
|
-> Maybe b |
|
-> m Bytes | (Can throw |
Sign the given data
with the specified keys in keyId
. Similar to
repoAddGpgSignatureSummary
but can be used on any
data.
You can use repoGpgVerifyData
to verify the signatures.
Since: 2020.8
gpgVerifyData
:: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsFile c, IsCancellable d) | |
=> a |
|
-> Maybe Text |
|
-> Bytes |
|
-> Bytes |
|
-> Maybe b |
|
-> Maybe c |
|
-> Maybe d |
|
-> m GpgVerifyResult | Returns: an |
Verify signatures
for data
using GPG keys in the keyring for
remoteName
, and return an GpgVerifyResult
.
The remoteName
parameter can be Nothing
. In that case it will do
the verifications using GPG keys in the keyrings of all remotes.
Since: 2016.6
hasObject
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> ObjectType |
|
-> Text |
|
-> Maybe b |
|
-> m Bool | (Can throw |
hash
Calculate a hash value for the given open repository, suitable for use when
putting it into a hash table. It is an error to call this on an Repo
which is not yet open, as a persistent hash value cannot be calculated until
the repository is open and the inode of its root directory has been loaded.
This function does no I/O.
Since: 2017.12
importObjectFrom
:: (HasCallStack, MonadIO m, IsRepo a, IsRepo b, IsCancellable c) | |
=> a |
|
-> b |
|
-> ObjectType |
|
-> Text |
|
-> Maybe c |
|
-> m () | (Can throw |
Copy object named by objtype
and checksum
into self
from the
source repository source
. If both repositories are of the same
type and on the same filesystem, this will simply be a fast Unix
hard link operation.
Otherwise, a copy will be performed.
importObjectFromWithTrust
repoImportObjectFromWithTrust Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsRepo b, IsCancellable c) | |
=> a |
|
-> b |
|
-> ObjectType |
|
-> Text |
|
-> Bool |
|
-> Maybe c |
|
-> m () | (Can throw |
Copy object named by objtype
and checksum
into self
from the
source repository source
. If trusted
is True
and both
repositories are of the same type and on the same filesystem,
this will simply be a fast Unix hard link operation.
Otherwise, a copy will be performed.
Since: 2016.5
isSystem
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> m Bool | Returns: |
No description available in the introspection data.
isWritable
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> m () | (Can throw |
Returns whether the repository is writable by the current user.
If the repository is not writable, the error
indicates why.
listStaticDeltaIndexes
repoListStaticDeltaIndexes Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> m [Text] | (Can throw |
This function synchronously enumerates all static delta indexes in the
repository, returning its result in outIndexes
.
Since: 2020.8
listStaticDeltaNames
repoListStaticDeltaNames Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> m [Text] | (Can throw |
This function synchronously enumerates all static deltas in the
repository, returning its result in outDeltas
.
loadCommit
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> Text |
|
-> m (GVariant, [RepoCommitState]) | (Can throw |
A version of repoLoadVariant
specialized to commits,
capable of returning extended state information. Currently
the only extended state is RepoCommitStatePartial
, which
means that only a sub-path of the commit is available.
loadFile
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Maybe b |
|
-> m (Maybe InputStream, Maybe FileInfo, Maybe GVariant) | (Can throw |
Load content object, decomposing it into three parts: the actual content (for regular files), the metadata, and extended attributes.
loadObjectStream
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> ObjectType |
|
-> Text |
|
-> Maybe b |
|
-> m (InputStream, Word64) | (Can throw |
Load object as a stream; useful when copying objects between repositories.
loadVariant
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> ObjectType |
|
-> Text |
|
-> m GVariant | (Can throw |
Load the metadata object sha256
of type objtype
, storing the
result in outVariant
.
loadVariantIfExists
repoLoadVariantIfExists Source #
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> ObjectType |
|
-> Text |
|
-> m (Maybe GVariant) | (Can throw |
Attempt to load the metadata object sha256
of type objtype
if it
exists, storing the result in outVariant
. If it doesn't exist,
outVariant
will be set to Nothing
and the function will still
return TRUE.
lockPop
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> RepoLockType |
|
-> Maybe b |
|
-> m () | (Can throw |
Release a lock of type lockType
from the lock state. If the lock state
becomes empty, the repository is unlocked. Otherwise, the lock state only
changes when transitioning from an exclusive lock back to a shared lock. The
requested lockType
must be the same type that was requested in the call to
repoLockPush
. It is a programmer error if these do not match and
the program may abort if the lock would reach an invalid state.
repoLockPop
waits for the lock depending on the repository's
lock-timeout-secs configuration. When lock-timeout-secs is -1, a blocking lock is
attempted. Otherwise, the lock is removed non-blocking and
repoLockPop
will sleep synchronously up to lock-timeout-secs seconds
attempting to remove the lock. If the lock cannot be removed within the
timeout, a IOErrorEnumWouldBlock
error is returned.
If self
is not writable by the user, then no unlocking is attempted and
True
is returned.
Since: 2021.3
lockPush
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> RepoLockType |
|
-> Maybe b |
|
-> m () | (Can throw |
Takes a lock on the repository and adds it to the lock state. If lockType
is RepoLockTypeShared
, a shared lock is taken. If lockType
is
RepoLockTypeExclusive
, an exclusive lock is taken. The actual lock
state is only changed when locking a previously unlocked repository or
upgrading the lock from shared to exclusive. If the requested lock type is
unchanged or would represent a downgrade (exclusive to shared), the lock
state is not changed.
repoLockPush
waits for the lock depending on the repository's
lock-timeout-secs configuration. When lock-timeout-secs is -1, a blocking lock is
attempted. Otherwise, the lock is taken non-blocking and
repoLockPush
will sleep synchronously up to lock-timeout-secs seconds
attempting to acquire the lock. If the lock cannot be acquired within the
timeout, a IOErrorEnumWouldBlock
error is returned.
If self
is not writable by the user, then no locking is attempted and
True
is returned.
Since: 2021.3
markCommitPartial
repoMarkCommitPartial Source #
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> Text |
|
-> Bool |
|
-> m () | (Can throw |
Commits in the "partial" state do not have all their child objects written. This occurs in various situations, such as during a pull, but also if a "subpath" pull is used, as well as "commit only" pulls.
This function is used by repoPullWithOptions
; you
should use this if you are implementing a different type of transport.
Since: 2017.15
markCommitPartialReason
repoMarkCommitPartialReason Source #
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> Text |
|
-> Bool |
|
-> [RepoCommitState] |
|
-> m () | (Can throw |
Allows the setting of a reason code for a partial commit. Presently it only supports setting reason bitmask to OSTREE_REPO_COMMIT_STATE_FSCK_PARTIAL, or OSTREE_REPO_COMMIT_STATE_NORMAL. This will allow successive ostree fsck operations to exit properly with an error code if the repository has been truncated as a result of fsck trying to repair it.
Since: 2019.4
modeFromString
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m RepoMode | (Can throw |
No description available in the introspection data.
new
:: (HasCallStack, MonadIO m, IsFile a) | |
=> a |
|
-> m Repo | Returns: An accessor object for an OSTree repository located at |
No description available in the introspection data.
newDefault
:: (HasCallStack, MonadIO m) | |
=> m Repo | Returns: An accessor object for an OSTree repository located at /ostree/repo |
If the current working directory appears to be an OSTree
repository, create a new Repo
object for accessing it.
Otherwise use the path in the OSTREE_REPO environment variable
(if defined) or else the default system repository located at
/ostree/repo.
newForSysrootPath
repoNewForSysrootPath Source #
:: (HasCallStack, MonadIO m, IsFile a, IsFile b) | |
=> a |
|
-> b |
|
-> m Repo | Returns: An accessor object for the OSTree repository located at |
Creates a new Repo
instance, taking the system root path explicitly
instead of assuming "/".
open
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a | |
-> Maybe b | |
-> m () | (Can throw |
No description available in the introspection data.
openAt
:: (HasCallStack, MonadIO m, IsCancellable a) | |
=> Int32 |
|
-> Text |
|
-> Maybe a | |
-> m Repo | Returns: An accessor object for an OSTree repository located at |
This combines repoNew
(but using fd-relative access) with
repoOpen
. Use this when you know you should be operating on an
already extant repository. If you want to create one, use repoCreateAt
.
Since: 2017.10
prepareTransaction
repoPrepareTransaction Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> m Bool | (Can throw |
Starts or resumes a transaction. In order to write to a repo, you
need to start a transaction. You can complete the transaction with
repoCommitTransaction
, or abort the transaction with
repoAbortTransaction
.
Currently, transactions may result in partial commits or data in the target
repository if interrupted during repoCommitTransaction
, and
further writing refs is also not currently atomic.
There can be at most one transaction active on a repo at a time per instance
of OstreeRepo
; however, it is safe to have multiple threads writing objects
on a single OstreeRepo
instance as long as their lifetime is bounded by the
transaction.
Locking: Acquires a shared
lock; release via commit or abort
Multithreading: This function is *not* MT safe; only one transaction can be
active at a time.
prune
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> [RepoPruneFlags] |
|
-> Int32 |
|
-> Maybe b |
|
-> m (Int32, Int32, Word64) | (Can throw |
Delete content from the repository. By default, this function will only delete "orphaned" objects not referred to by any commit. This can happen during a local commit operation, when we have written content objects but not saved the commit referencing them.
However, if RepoPruneFlagsRefsOnly
is provided, instead
of traversing all commits, only refs will be used. Particularly
when combined with depth
, this is a convenient way to delete
history from the repository.
Use the RepoPruneFlagsNoPrune
to just determine
statistics on objects that would be deleted, without actually
deleting them.
Locking: exclusive
pruneFromReachable
repoPruneFromReachable Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> RepoPruneOptions |
|
-> Maybe b |
|
-> m (Int32, Int32, Word64) | (Can throw |
Delete content from the repository. This function is the "backend"
half of the higher level repoPrune
. To use this function,
you determine the root set yourself, and this function finds all other
unreferenced objects and deletes them.
Use this API when you want to perform more selective pruning - for example, retain all commits from a production branch, but just GC some history from your dev branch.
The RepoPruneFlagsNoPrune
flag may be specified to just determine
statistics on objects that would be deleted, without actually deleting them.
Locking: exclusive
Since: 2017.1
pruneStaticDeltas
repoPruneStaticDeltas Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Maybe Text |
|
-> Maybe b |
|
-> m () | (Can throw |
Prune static deltas, if COMMIT is specified then delete static delta files only targeting that commit; otherwise any static delta of non existing commits are deleted.
Locking: exclusive
pull
:: (HasCallStack, MonadIO m, IsRepo a, IsAsyncProgress b, IsCancellable c) | |
=> a |
|
-> Text |
|
-> Maybe [Text] |
|
-> [RepoPullFlags] |
|
-> Maybe b |
|
-> Maybe c |
|
-> m () | (Can throw |
Connect to the remote repository, fetching the specified set of
refs refsToFetch
. For each ref that is changed, download the
commit, all metadata, and all content objects, storing them safely
on disk in self
.
If flags
contains RepoPullFlagsMirror
, and
the refsToFetch
is Nothing
, and the remote repository contains a
summary file, then all refs will be fetched.
If flags
contains RepoPullFlagsCommitOnly
, then only the
metadata for the commits in refsToFetch
is pulled.
Warning: This API will iterate the thread default main context,
which is a bug, but kept for compatibility reasons. If you want to
avoid this, use mainContextPushThreadDefault
to push a new
one around this call.
pullDefaultConsoleProgressChanged
repoPullDefaultConsoleProgressChanged Source #
:: (HasCallStack, MonadIO m, IsAsyncProgress a) | |
=> a |
|
-> Ptr () |
|
-> m () |
Convenient "changed" callback for use with
asyncProgressNewAndConnect
when pulling from a remote
repository.
Depending on the state of the AsyncProgress
, either displays a
custom status message, or else outstanding fetch progress in bytes/sec,
or else outstanding content or metadata writes to the repository in
number of objects.
Compatibility note: this function previously assumed that userData
was a pointer to a GSConsole
instance. This is no longer the case,
and userData
is ignored.
pullFromRemotesAsync
repoPullFromRemotesAsync Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsAsyncProgress b, IsCancellable c) | |
=> a |
|
-> [RepoFinderResult] |
|
-> Maybe GVariant |
|
-> Maybe b |
|
-> Maybe c |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Pull refs from multiple remotes which have been found using
repoFindRemotesAsync
.
results
are expected to be in priority order, with the best remotes to pull
from listed first. repoPullFromRemotesAsync
will generally pull
from the remotes in order, but may parallelise its downloads.
If an error is encountered when pulling from a given remote, that remote will
be ignored and another will be tried instead. If any refs have not been
downloaded successfully after all remotes have been tried, IOErrorEnumFailed
will be returned. The results of any successful downloads will remain cached
in the local repository.
If cancellable
is cancelled, IOErrorEnumCancelled
will be returned
immediately. The results of any successfully completed downloads at that
point will remain cached in the local repository.
GPG verification of commits will be used unconditionally.
The following options
are currently defined:
flags
(i
):RepoPullFlags
to apply to the pull operationinherit-transaction
(b
):True
to inherit an ongoing transaction on theRepo
, rather than encapsulating the pull in a new onedepth
(i
): How far in the history to traverse; default is 0, -1 means infinitedisable-static-deltas
(b
): Do not use static deltashttp-headers
(a(ss)
): Additional headers to add to all HTTP requestssubdirs
(as
): Pull just these subdirectoriesupdate-frequency
(u
): Frequency to call the async progress callback in milliseconds, if any; only values higher than 0 are validappend-user-agent
(s
): Additional string to append to the user agentn-network-retries
(u
): Number of times to retry each download on receiving a transient network error, such as a socket timeout; default is 5, 0 means return errors without retrying. Since: 2018.6ref-keyring-map
(a(sss)
): Array of (collection ID, ref name, keyring remote name) tuples specifying which remote's keyring should be used when doing GPG verification of each collection-ref. This is useful to prevent a remote from serving malicious updates to refs which did not originate from it. This can be a subset or superset of the refs being pulled; any ref not being pulled will be ignored and any ref without a keyring remote will be verified with the keyring of the remote being pulled from. Since: 2019.2
Since: 2018.6
pullFromRemotesFinish
repoPullFromRemotesFinish Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m () | (Can throw |
Finish an asynchronous pull operation started with
repoPullFromRemotesAsync
.
Since: 2018.6
pullOneDir
:: (HasCallStack, MonadIO m, IsRepo a, IsAsyncProgress b, IsCancellable c) | |
=> a |
|
-> Text |
|
-> Text |
|
-> Maybe [Text] |
|
-> [RepoPullFlags] |
|
-> Maybe b |
|
-> Maybe c |
|
-> m () | (Can throw |
This is similar to repoPull
, but only fetches a single
subpath.
pullWithOptions
:: (HasCallStack, MonadIO m, IsRepo a, IsAsyncProgress b, IsCancellable c) | |
=> a |
|
-> Text |
|
-> GVariant |
|
-> Maybe b |
|
-> Maybe c |
|
-> m () | (Can throw |
Like repoPull
, but supports an extensible set of flags.
The following are currently defined:
refs
(as
): Array of string refscollection-refs
(a(sss)
): Array of (collection ID, ref name, checksum) tuples to pull; mutually exclusive withrefs
andoverride-commit-ids
. Checksums may be the empty string to pull the latest commit for that refflags
(i
): An instance ofRepoPullFlags
subdir
(s
): Pull just this subdirectorysubdirs
(as
): Pull just these subdirectoriesoverride-remote-name
(s
): If local, add this remote to refspecgpg-verify
(b
): GPG verify commitsgpg-verify-summary
(b
): GPG verify summarydisable-sign-verify
(b
): Disable signapi verification of commitsdisable-sign-verify-summary
(b
): Disable signapi verification of the summarydepth
(i
): How far in the history to traverse; default is 0, -1 means infiniteper-object-fsync
(b
): Perform disk writes more slowly, avoiding a single large I/O syncdisable-static-deltas
(b
): Do not use static deltasrequire-static-deltas
(b
): Require static deltasoverride-commit-ids
(as
): Array of specific commit IDs to fetch for refstimestamp-check
(b
): Verify commit timestamps are newer than current (when pulling via ref); Since: 2017.11timestamp-check-from-rev
(s
): Verify that all fetched commit timestamps are newer than timestamp of given rev; Since: 2020.4metadata-size-restriction
(t
): Restrict metadata objects to a maximum number of bytes; 0 to disable. Since: 2018.9dry-run
(b
): Only print information on what will be downloaded (requires static deltas)override-url
(s
): Fetch objects from this URL if remote specifies no metalink in optionsinherit-transaction
(b
): Don't initiate, finish or abort a transaction, useful to do multiple pulls in one transaction.http-headers
(a(ss)
): Additional headers to add to all HTTP requestsupdate-frequency
(u
): Frequency to call the async progress callback in milliseconds, if any; only values higher than 0 are validlocalcache-repos
(as
): File paths for local repos to use as caches when doing remote fetchesappend-user-agent
(s
): Additional string to append to the user agentn-network-retries
(u
): Number of times to retry each download on receiving a transient network error, such as a socket timeout; default is 5, 0 means return errors without retrying. Since: 2018.6ref-keyring-map
(a(sss)
): Array of (collection ID, ref name, keyring remote name) tuples specifying which remote's keyring should be used when doing GPG verification of each collection-ref. This is useful to prevent a remote from serving malicious updates to refs which did not originate from it. This can be a subset or superset of the refs being pulled; any ref not being pulled will be ignored and any ref without a keyring remote will be verified with the keyring of the remote being pulled from. Since: 2019.2summary-bytes
(ay'): Contents of the
summaryfile to use. If this is specified,
summary-sig-bytesmust also be specified. This is useful if doing multiple pull operations in a transaction, using ostree_repo_remote_fetch_summary_with_options() beforehand to download the
summaryand
summary.sigonce for the entire transaction. If not specified, the
summary@ will be downloaded from the remote. Since: 2020.5summary-sig-bytes
(ay
): Contents of thesummary.sig
file. If this is specified,summary-bytes
must also be specified. Since: 2020.5disable-verify-bindings
(@b`): Disable verification of commit bindings. Since: 2020.9
queryObjectStorageSize
repoQueryObjectStorageSize Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> ObjectType |
|
-> Text |
|
-> Maybe b |
|
-> m Word64 | (Can throw |
Return the size in bytes of object with checksum sha256
, after any
compression has been applied.
readCommit
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Maybe b |
|
-> m (File, Text) | (Can throw |
Load the content for rev
into outRoot
.
readCommitDetachedMetadata
repoReadCommitDetachedMetadata Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Maybe b |
|
-> m (Maybe GVariant) | (Can throw |
OSTree commits can have arbitrary metadata associated; this
function retrieves them. If none exists, outMetadata
will be set
to Nothing
.
regenerateSummary
repoRegenerateSummary Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Maybe GVariant |
|
-> Maybe b |
|
-> m () | (Can throw |
An OSTree repository can contain a high level "summary" file that describes the available branches and other metadata.
If the timetable for making commits and updating the summary file is fairly
regular, setting the ostree.summary.expires
key in additionalMetadata
will aid clients in working out when to check for updates.
It is regenerated automatically after any ref is
added, removed, or updated if core/auto-update-summary
is set.
If the core/collection-id
key is set in the configuration, it will be
included as OSTREE_SUMMARY_COLLECTION_ID
in the summary file. Refs that
have associated collection IDs will be included in the generated summary
file, listed under the OSTREE_SUMMARY_COLLECTION_MAP
key. Collection IDs
and refs in OSTREE_SUMMARY_COLLECTION_MAP
are guaranteed to be in
lexicographic order.
Locking: shared (Prior to 2021.7, this was exclusive)
reloadConfig
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> m () | (Can throw |
By default, an Repo
will cache the remote configuration and its
own repo/config data. This API can be used to reload it.
Since: 2017.2
remoteAdd
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Maybe Text |
|
-> Maybe GVariant |
|
-> Maybe b |
|
-> m () | (Can throw |
Create a new remote named name
pointing to url
. If options
is
provided, then it will be mapped to KeyFile
entries, where the
GVariant dictionary key is an option string, and the value is
mapped as follows:
* s: keyFileSetString
* b: keyFileSetBoolean
* as: keyFileSetStringList
remoteChange
:: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsCancellable c) | |
=> a |
|
-> Maybe b |
|
-> RepoRemoteChange |
|
-> Text |
|
-> Maybe Text |
|
-> Maybe GVariant |
|
-> Maybe c |
|
-> m () | (Can throw |
A combined function handling the equivalent of
repoRemoteAdd
, repoRemoteDelete
, with more
options.
remoteDelete
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Maybe b |
|
-> m () | (Can throw |
Delete the remote named name
. It is an error if the provided
remote does not exist.
remoteFetchSummary
repoRemoteFetchSummary Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Maybe b |
|
-> m (Bytes, Bytes) | (Can throw |
Tries to fetch the summary file and any GPG signatures on the summary file
over HTTP, and returns the binary data in outSummary
and outSignatures
respectively.
If no summary file exists on the remote server, outSummary
is set to
nULL
. Likewise if the summary file is not signed, outSignatures
is
set to nULL
. In either case the function still returns True
.
This method does not verify the signature of the downloaded summary file.
Use repoVerifySummary
for that.
Parse the summary data into a GVariant
using variantNewFromBytes
with OSTREE_SUMMARY_GVARIANT_FORMAT
as the format string.
remoteFetchSummaryWithOptions
repoRemoteFetchSummaryWithOptions Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Maybe GVariant |
|
-> Maybe b |
|
-> m (Bytes, Bytes) | (Can throw |
Like repoRemoteFetchSummary
, but supports an extensible set of flags.
The following are currently defined:
- override-url (s): Fetch summary from this URL if remote specifies no metalink in options
- http-headers (a(ss)): Additional headers to add to all HTTP requests
- append-user-agent (s): Additional string to append to the user agent
- n-network-retries (u): Number of times to retry each download on receiving a transient network error, such as a socket timeout; default is 5, 0 means return errors without retrying
Since: 2016.6
remoteGetGpgKeys
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Maybe Text |
|
-> Maybe [Text] |
|
-> Maybe b |
|
-> m [GVariant] | (Can throw |
Enumerate the trusted GPG keys for the remote name
. If name
is
Nothing
, the global GPG keys will be returned. The keys will be
returned in the outKeys
PtrArray
. Each element in the array is a
GVariant
of format OSTREE_GPG_KEY_GVARIANT_FORMAT
. The keyIds
array can be used to limit which keys are included. If keyIds
is
Nothing
, then all keys are included.
Since: 2021.4
remoteGetGpgVerify
repoRemoteGetGpgVerify Source #
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> Text |
|
-> m Bool | (Can throw |
Return whether GPG verification is enabled for the remote named name
through outGpgVerify
. It is an error if the provided remote does
not exist.
remoteGetGpgVerifySummary
repoRemoteGetGpgVerifySummary Source #
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> Text |
|
-> m Bool | (Can throw |
Return whether GPG verification of the summary is enabled for the remote
named name
through outGpgVerifySummary
. It is an error if the provided
remote does not exist.
remoteGetUrl
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> Text |
|
-> m Text | (Can throw |
Return the URL of the remote named name
through outUrl
. It is an
error if the provided remote does not exist.
remoteGpgImport
:: (HasCallStack, MonadIO m, IsRepo a, IsInputStream b, IsCancellable c) | |
=> a |
|
-> Text |
|
-> Maybe b |
|
-> Maybe [Text] |
|
-> Maybe c |
|
-> m Word32 | (Can throw |
Imports one or more GPG keys from the open sourceStream
, or from the
user's personal keyring if sourceStream
is Nothing
. The keyIds
array
can optionally restrict which keys are imported. If keyIds
is Nothing
,
then all keys are imported.
The imported keys will be used to conduct GPG verification when pulling
from the remote named name
.
remoteList
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> m [Text] | Returns: a |
resolveCollectionRef
repoResolveCollectionRef Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> CollectionRef |
|
-> Bool |
|
-> [RepoResolveRevExtFlags] |
|
-> Maybe b |
|
-> m (Maybe Text) | (Can throw |
Look up the checksum for the given collection–ref, returning it in outRev
.
This will search through the mirrors and remote refs.
If allowNoent
is True
and the given ref
cannot be found, True
will be
returned and outRev
will be set to Nothing
. If allowNoent
is False
and
the given ref
cannot be found, a IOErrorEnumNotFound
error will be
returned.
If you want to check only local refs, not remote or mirrored ones, use the
flag RepoResolveRevExtFlagsLocalOnly
. This is analogous to using
repoResolveRevExt
but for collection-refs.
Since: 2018.6
resolveKeyringForCollection
repoResolveKeyringForCollection Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Maybe b |
|
-> m Remote | Returns: |
Find the GPG keyring for the given collectionId
, using the local
configuration from the given Repo
. This will search the configured
remotes for ones whose collection-id
key matches collectionId
, and will
return the first matching remote.
If multiple remotes match and have different keyrings, a debug message will be emitted, and the first result will be returned. It is expected that the keyrings should match.
If no match can be found, a IOErrorEnumNotFound
error will be returned.
Since: 2018.6
resolveRev
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> Text |
|
-> Bool |
|
-> m (Maybe Text) | (Can throw |
Look up the given refspec, returning the checksum it references in
the parameter outRev
. Will fall back on remote directory if cannot
find the given refspec in local.
resolveRevExt
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> Text |
|
-> Bool |
|
-> [RepoResolveRevExtFlags] |
|
-> m (Maybe Text) | (Can throw |
Look up the given refspec, returning the checksum it references in
the parameter outRev
. Differently from repoResolveRev
,
this will not fall back to searching through remote repos if a
local ref is specified but not found.
The flag RepoResolveRevExtFlagsLocalOnly
is implied so
using it has no effect.
Since: 2016.7
scanHardlinks
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> m () | (Can throw |
This function is deprecated in favor of using repoDevInoCacheNew
,
which allows a precise mapping to be built up between hardlink checkout files
and their checksums between ostree_repo_checkout_at()
and
ostree_repo_write_directory_to_mtree()
.
When invoking repoWriteDirectoryToMtree
, it has to compute the
checksum of all files. If your commit contains hardlinks from a checkout,
this functions builds a mapping of device numbers and inodes to their
checksum.
There is an upfront cost to creating this mapping, as this will scan the
entire objects directory. If your commit is composed of mostly hardlinks to
existing ostree objects, then this will speed up considerably, so call it
before you call repoWriteDirectoryToMtree
or similar. However,
repoDevInoCacheNew
is better as it avoids scanning all objects.
Multithreading: This function is *not* MT safe.
setAliasRefImmediate
repoSetAliasRefImmediate Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Maybe Text |
|
-> Text |
|
-> Maybe Text |
|
-> Maybe b |
|
-> m () | (Can throw |
Like repoSetRefImmediate
, but creates an alias.
Since: 2017.10
setCacheDir
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Int32 |
|
-> Text |
|
-> Maybe b |
|
-> m () | (Can throw |
Set a custom location for the cache directory used for e.g. per-remote summary caches. Setting this manually is useful when doing operations on a system repo as a user because you don't have write permissions in the repo, where the cache is normally stored.
Since: 2016.5
setCollectionId
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> Maybe Text |
|
-> m () | (Can throw |
Set or clear the collection ID of this repository. See [collection IDs][collection-ids].
The update will be made in memory, but must be written out to the repository
configuration on disk using repoWriteConfig
.
Since: 2018.6
setCollectionRefImmediate
repoSetCollectionRefImmediate Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> CollectionRef |
|
-> Maybe Text |
|
-> Maybe b |
|
-> m () | (Can throw |
This is like repoTransactionSetCollectionRef
, except it may be
invoked outside of a transaction. This is presently safe for the
case where we're creating or overwriting an existing ref.
Since: 2018.6
setDisableFsync
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> Bool |
|
-> m () |
Disable requests to fsync()
to stable storage during commits. This
option should only be used by build system tools which are creating
disposable virtual machines, or have higher level mechanisms for
ensuring data consistency.
setRefImmediate
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Maybe Text |
|
-> Text |
|
-> Maybe Text |
|
-> Maybe b |
|
-> m () | (Can throw |
This is like repoTransactionSetRef
, except it may be
invoked outside of a transaction. This is presently safe for the
case where we're creating or overwriting an existing ref.
Multithreading: This function is MT safe.
signCommit
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Text |
|
-> Maybe Text |
|
-> Maybe b |
|
-> m () | (Can throw |
Add a GPG signature to a commit.
signDelta
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Text |
|
-> Text |
|
-> Text |
|
-> Maybe b |
|
-> m () | (Can throw |
This function is deprecated, sign the summary file instead. Add a GPG signature to a static delta.
signatureVerifyCommitData
repoSignatureVerifyCommitData Source #
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> Text |
|
-> Bytes |
|
-> Bytes |
|
-> [RepoVerifyFlags] |
|
-> m (Maybe Text) | (Can throw |
Validate the commit data using the commit metadata which must contain at least one valid signature. If GPG and signapi are both enabled, then both must find at least one valid signature.
staticDeltaExecuteOffline
repoStaticDeltaExecuteOffline Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsCancellable c) | |
=> a |
|
-> b |
|
-> Bool |
|
-> Maybe c |
|
-> m () | (Can throw |
Given a directory representing an already-downloaded static delta on disk, apply it, generating a new commit. The directory must be named with the form "FROM-TO", where both are checksums, and it must contain a file named "superblock", along with at least one part.
staticDeltaExecuteOfflineWithSignature
repoStaticDeltaExecuteOfflineWithSignature Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsSign c, IsCancellable d) | |
=> a |
|
-> b |
|
-> c |
|
-> Bool |
|
-> Maybe d |
|
-> m () | (Can throw |
Given a directory representing an already-downloaded static delta on disk, apply it, generating a new commit. If sign is passed, the static delta signature is verified. If sign-verify-deltas configuration option is set and static delta is signed, signature verification will be mandatory before apply the static delta. The directory must be named with the form "FROM-TO", where both are checksums, and it must contain a file named "superblock", along with at least one part.
Since: 2020.7
staticDeltaGenerate
repoStaticDeltaGenerate Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> StaticDeltaGenerateOpt |
|
-> Maybe Text |
|
-> Text |
|
-> Maybe GVariant |
|
-> Maybe GVariant |
|
-> Maybe b |
|
-> m () | (Can throw |
Generate a lookaside "static delta" from from
(Nothing
means
from-empty) which can generate the objects in to
. This delta is
an optimization over fetching individual objects, and can be
conveniently stored and applied offline.
The params
argument should be an a{sv}. The following attributes
are known:
- min-fallback-size: u: Minimum uncompressed size in megabytes to use fallback, 0 to disable fallbacks
- max-chunk-size: u: Maximum size in megabytes of a delta part
- max-bsdiff-size: u: Maximum size in megabytes to consider bsdiff compression
for input files
- compression: y: Compression type: 0=none, x=lzma, g=gzip
- bsdiff-enabled: b: Enable bsdiff compression. Default TRUE.
- inline-parts: b: Put part data in header, to get a single file delta. Default FALSE.
- verbose: b: Print diagnostic messages. Default FALSE.
- endianness: b: Deltas use host byte order by default; this option allows choosing (G_BIG_ENDIAN or G_LITTLE_ENDIAN)
- filename: ay: Save delta superblock to this filename, and parts in the same directory. Default saves to repository.
- sign-name: ay: Signature type to use.
- sign-key-ids: as: Array of keys used to sign delta superblock.
staticDeltaReindex
repoStaticDeltaReindex Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> StaticDeltaIndexFlags |
|
-> Text |
|
-> Maybe b |
|
-> m () | (Can throw |
The delta index for a particular commit lists all the existing deltas that can be used
when downloading that commit. This operation regenerates these indexes, either for
a particular commit (if optToCommit
is non-Nothing
), or for all commits that
are reachable by an existing delta (if optToCommit
is Nothing
).
This is normally called automatically when the summary is updated in repoRegenerateSummary
.
Locking: shared
Since: 2020.8
staticDeltaVerifySignature
repoStaticDeltaVerifySignature Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsSign b) | |
=> a |
|
-> Text |
|
-> b |
|
-> m (Maybe Text) | (Can throw |
Verify static delta file signature.
Since: 2020.7
transactionSetCollectionRef
repoTransactionSetCollectionRef Source #
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> CollectionRef |
|
-> Maybe Text |
|
-> m () |
If checksum
is not Nothing
, then record it as the target of local ref named
ref
.
Otherwise, if checksum
is Nothing
, then record that the ref should
be deleted.
The change will not be written out immediately, but when the transaction
is completed with repoCommitTransaction
. If the transaction
is instead aborted with repoAbortTransaction
, no changes will
be made to the repository.
Multithreading: Since v2017.15 this function is MT safe.
Since: 2018.6
transactionSetRef
repoTransactionSetRef Source #
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> Maybe Text |
|
-> Text |
|
-> Maybe Text |
|
-> m () |
If checksum
is not Nothing
, then record it as the target of ref named
ref
; if remote
is provided, the ref will appear to originate from that
remote.
Otherwise, if checksum
is Nothing
, then record that the ref should
be deleted.
The change will be written when the transaction is completed with
repoCommitTransaction
; that function takes care of writing all of
the objects (such as the commit referred to by checksum
) before updating the
refs. If the transaction is instead aborted with
repoAbortTransaction
, no changes to the ref will be made to the
repository.
Note however that currently writing *multiple* refs is not truly atomic; if
the process or system is terminated during
repoCommitTransaction
, it is possible that just some of the refs
will have been updated. Your application should take care to handle this
case.
Multithreading: Since v2017.15 this function is MT safe.
transactionSetRefspec
repoTransactionSetRefspec Source #
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> Text |
|
-> Maybe Text |
|
-> m () |
Like repoTransactionSetRef
, but takes concatenated
refspec
format as input instead of separate remote and name
arguments.
Multithreading: Since v2017.15 this function is MT safe.
traverseParentsGetCommits
repoTraverseParentsGetCommits Source #
:: (HasCallStack, MonadIO m) | |
=> Map (Ptr ()) (Ptr ()) | |
-> GVariant | |
-> m [Text] | Returns: An array of checksums for the commits the key belongs to. |
Gets all the commits that a certain object belongs to, as recorded by a parents table gotten from ostree_repo_traverse_commit_union_with_parents.
Since: 2018.5
verifyCommit
:: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsFile c, IsCancellable d) | |
=> a |
|
-> Text |
|
-> Maybe b |
|
-> Maybe c |
|
-> Maybe d |
|
-> m () | (Can throw |
Check for a valid GPG signature on commit named by the ASCII
checksum commitChecksum
.
verifyCommitExt
:: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsFile c, IsCancellable d) | |
=> a |
|
-> Text |
|
-> Maybe b |
|
-> Maybe c |
|
-> Maybe d |
|
-> m GpgVerifyResult | Returns: an |
Read GPG signature(s) on the commit named by the ASCII checksum
commitChecksum
and return detailed results.
verifyCommitForRemote
repoVerifyCommitForRemote Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Text |
|
-> Maybe b |
|
-> m GpgVerifyResult | Returns: an |
Read GPG signature(s) on the commit named by the ASCII checksum
commitChecksum
and return detailed results, based on the keyring
configured for remote
.
Since: 2016.14
verifySummary
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Bytes |
|
-> Bytes |
|
-> Maybe b |
|
-> m GpgVerifyResult | Returns: an |
Verify signatures
for summary
data using GPG keys in the keyring for
remoteName
, and return an GpgVerifyResult
.
writeArchiveToMtree
repoWriteArchiveToMtree Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsMutableTree c, IsCancellable d) | |
=> a |
|
-> b |
|
-> c |
|
-> Maybe RepoCommitModifier |
|
-> Bool |
|
-> Maybe d |
|
-> m () | (Can throw |
Import an archive file archive
into the repository, and write its
file structure to mtree
.
writeArchiveToMtreeFromFd
repoWriteArchiveToMtreeFromFd Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsMutableTree b, IsCancellable c) | |
=> a |
|
-> Int32 |
|
-> b |
|
-> Maybe RepoCommitModifier |
|
-> Bool |
|
-> Maybe c |
|
-> m () | (Can throw |
Read an archive from fd
and import it into the repository, writing
its file structure to mtree
.
writeCommit
:: (HasCallStack, MonadIO m, IsRepo a, IsRepoFile b, IsCancellable c) | |
=> a |
|
-> Maybe Text |
|
-> Maybe Text |
|
-> Maybe Text |
|
-> Maybe GVariant |
|
-> b |
|
-> Maybe c |
|
-> m Text | (Can throw |
Write a commit metadata object, referencing rootContentsChecksum
and rootMetadataChecksum
.
This uses the current time as the commit timestamp, but it can be
overridden with an explicit timestamp via the
standard
SOURCE_DATE_EPOCH
environment flag.
writeCommitDetachedMetadata
repoWriteCommitDetachedMetadata Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Maybe GVariant |
|
-> Maybe b |
|
-> m () | (Can throw |
Replace any existing metadata associated with commit referred to by
checksum
with metadata
. If metadata
is Nothing
, then existing
data will be deleted.
writeCommitWithTime
repoWriteCommitWithTime Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsRepoFile b, IsCancellable c) | |
=> a |
|
-> Maybe Text |
|
-> Maybe Text |
|
-> Maybe Text |
|
-> Maybe GVariant |
|
-> b |
|
-> Word64 |
|
-> Maybe c |
|
-> m Text | (Can throw |
Write a commit metadata object, referencing rootContentsChecksum
and rootMetadataChecksum
.
writeConfig
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> KeyFile |
|
-> m () | (Can throw |
Save newConfig
in place of this repository's config file.
writeContent
:: (HasCallStack, MonadIO m, IsRepo a, IsInputStream b, IsCancellable c) | |
=> a |
|
-> Maybe Text |
|
-> b |
|
-> Word64 |
|
-> Maybe c |
|
-> m ByteString | (Can throw |
Store the content object streamed as objectInput
,
with total length length
. The actual checksum will
be returned as outCsum
.
writeContentAsync
repoWriteContentAsync Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsInputStream b, IsCancellable c) | |
=> a |
|
-> Maybe Text |
|
-> b |
|
-> Word64 |
|
-> Maybe c |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Asynchronously store the content object object
. If provided, the
checksum expectedChecksum
will be verified.
writeContentFinish
repoWriteContentFinish Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m Word8 | (Can throw |
Completes an invocation of repoWriteContentAsync
.
writeContentTrusted
repoWriteContentTrusted Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsInputStream b, IsCancellable c) | |
=> a |
|
-> Text |
|
-> b |
|
-> Word64 |
|
-> Maybe c |
|
-> m () | (Can throw |
Store the content object streamed as objectInput
, with total
length length
. The given checksum
will be treated as trusted.
This function should be used when importing file objects from local disk, for example.
writeDfdToMtree
:: (HasCallStack, MonadIO m, IsRepo a, IsMutableTree b, IsCancellable c) | |
=> a |
|
-> Int32 |
|
-> Text |
|
-> b |
|
-> Maybe RepoCommitModifier |
|
-> Maybe c |
|
-> m () | (Can throw |
Store as objects all contents of the directory referred to by dfd
and path
all children into the repository self
, overlaying the
resulting filesystem hierarchy into mtree
.
writeDirectoryToMtree
repoWriteDirectoryToMtree Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsFile b, IsMutableTree c, IsCancellable d) | |
=> a |
|
-> b |
|
-> c |
|
-> Maybe RepoCommitModifier |
|
-> Maybe d |
|
-> m () | (Can throw |
Store objects for dir
and all children into the repository self
,
overlaying the resulting filesystem hierarchy into mtree
.
writeMetadata
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> ObjectType |
|
-> Maybe Text |
|
-> GVariant |
|
-> Maybe b |
|
-> m ByteString | (Can throw |
Store the metadata object object
. Return the checksum
as outCsum
.
If expectedChecksum
is not Nothing
, verify it against the
computed checksum.
writeMetadataAsync
repoWriteMetadataAsync Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> ObjectType |
|
-> Maybe Text |
|
-> GVariant |
|
-> Maybe b |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Asynchronously store the metadata object variant
. If provided,
the checksum expectedChecksum
will be verified.
writeMetadataFinish
repoWriteMetadataFinish Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m ByteString | (Can throw |
Complete a call to repoWriteMetadataAsync
.
writeMetadataStreamTrusted
repoWriteMetadataStreamTrusted Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsInputStream b, IsCancellable c) | |
=> a |
|
-> ObjectType |
|
-> Text |
|
-> b |
|
-> Word64 |
|
-> Maybe c |
|
-> m () | (Can throw |
Store the metadata object variant
; the provided checksum
is
trusted.
writeMetadataTrusted
repoWriteMetadataTrusted Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> ObjectType |
|
-> Text |
|
-> GVariant |
|
-> Maybe b |
|
-> m () | (Can throw |
Store the metadata object variant
; the provided checksum
is
trusted.
writeMtree
:: (HasCallStack, MonadIO m, IsRepo a, IsMutableTree b, IsCancellable c) | |
=> a |
|
-> b |
|
-> Maybe c |
|
-> m File | (Can throw |
Write all metadata objects for mtree
to repo; the resulting
outFile
points to the ObjectTypeDirTree
object that
the mtree
represented.
writeRegfile
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> Maybe Text |
|
-> Word32 |
|
-> Word32 |
|
-> Word32 |
|
-> Word64 |
|
-> Maybe GVariant |
|
-> m ContentWriter | Returns: A new writer, or |
Create an OstreeContentWriter
that allows streaming output into
the repository.
Since: 2021.2
writeRegfileInline
repoWriteRegfileInline Source #
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Maybe Text |
|
-> Word32 |
|
-> Word32 |
|
-> Word32 |
|
-> Maybe GVariant |
|
-> ByteString |
|
-> Maybe b |
|
-> m Text | Returns: Checksum (as a hex string) of the committed file (Can throw |
Synchronously create a file object from the provided content. This API is intended for small files where it is reasonable to buffer the entire content in memory.
Unlike ostree_repo_write_content()
, if expectedChecksum
is provided,
this function will not check for the presence of the object beforehand.
Since: 2021.2
writeSymlink
:: (HasCallStack, MonadIO m, IsRepo a, IsCancellable b) | |
=> a |
|
-> Maybe Text |
|
-> Word32 |
|
-> Word32 |
|
-> Maybe GVariant |
|
-> Text |
|
-> Maybe b |
|
-> m Text | Returns: Checksum (as a hex string) of the committed file (Can throw |
Synchronously create a symlink object.
Unlike ostree_repo_write_content()
, if expectedChecksum
is provided,
this function will not check for the presence of the object beforehand.
Since: 2021.2
Properties
path
Path to repository. Note that if this repository was created
via ostree_repo_new_at()
, this value will refer to a value in
the Linux kernel's /proc/self/fd
directory. Generally, you
should avoid using this property at all; you can gain a reference
to the repository's directory fd via ostree_repo_get_dfd()
and
use file-descriptor relative operations.
constructRepoPath :: (IsRepo 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
.
getRepoPath :: (MonadIO m, IsRepo o) => o -> m File Source #
Get the value of the “path
” property.
When overloading is enabled, this is equivalent to
get
repo #path
remotesConfigDir
Path to directory containing remote definitions. The default is NULL
.
If a sysroot-path
property is defined, this value will default to
${sysroot_path}/etc/ostree/remotes.d
.
This value will only be used for system repositories.
constructRepoRemotesConfigDir :: (IsRepo o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “remotes-config-dir
” property. This is rarely needed directly, but it is used by new
.
getRepoRemotesConfigDir :: (MonadIO m, IsRepo o) => o -> m (Maybe Text) Source #
Get the value of the “remotes-config-dir
” property.
When overloading is enabled, this is equivalent to
get
repo #remotesConfigDir
sysrootPath
A system using libostree for the host has a "system" repository; this
property will be set for repositories referenced via
ostree_sysroot_repo()
for example.
You should avoid using this property; if your code is operating
on a system repository, use OstreeSysroot
and access the repository
object via ostree_sysroot_repo()
.
constructRepoSysrootPath :: (IsRepo o, MonadIO m, IsFile a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “sysroot-path
” property. This is rarely needed directly, but it is used by new
.
getRepoSysrootPath :: (MonadIO m, IsRepo o) => o -> m (Maybe File) Source #
Get the value of the “sysroot-path
” property.
When overloading is enabled, this is equivalent to
get
repo #sysrootPath
Signals
gpgVerifyResult
type RepoGpgVerifyResultCallback Source #
= Text |
|
-> GpgVerifyResult |
|
-> IO () |
Emitted during a pull operation upon GPG verification (if enabled). Applications can connect to this signal to output the verification results if desired.
The signal will be emitted from whichever MainContext
is the
thread-default at the point when repoPullWithOptions
is called.
afterRepoGpgVerifyResult :: (IsRepo a, MonadIO m) => a -> ((?self :: a) => RepoGpgVerifyResultCallback) -> m SignalHandlerId Source #
Connect a signal handler for the gpgVerifyResult signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
repo #gpgVerifyResult 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.
onRepoGpgVerifyResult :: (IsRepo a, MonadIO m) => a -> ((?self :: a) => RepoGpgVerifyResultCallback) -> m SignalHandlerId Source #
Connect a signal handler for the gpgVerifyResult signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
repo #gpgVerifyResult callback