b9-0.5.41: A tool and library for building virtual machine images.

Safe HaskellNone
LanguageHaskell2010

B9.Repository

Description

B9 has a concept of SharedImaged. Shared images can be pulled and pushed to/from remote locations via rsync+ssh. B9 also maintains a local cache; the whole thing is supposed to be build-server-safe, that means no two builds shall interfere with each other. This is accomplished by refraining from automatic cache updates from/to remote repositories.

Synopsis

Documentation

data RemoteRepo Source #

Instances

Data RemoteRepo Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RemoteRepo -> c RemoteRepo #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RemoteRepo #

toConstr :: RemoteRepo -> Constr #

dataTypeOf :: RemoteRepo -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c RemoteRepo) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RemoteRepo) #

gmapT :: (forall b. Data b => b -> b) -> RemoteRepo -> RemoteRepo #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RemoteRepo -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RemoteRepo -> r #

gmapQ :: (forall d. Data d => d -> u) -> RemoteRepo -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> RemoteRepo -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> RemoteRepo -> m RemoteRepo #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RemoteRepo -> m RemoteRepo #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RemoteRepo -> m RemoteRepo #

Read RemoteRepo Source # 
Show RemoteRepo Source # 

newtype RepoCache Source #

Constructors

RepoCache FilePath 

Instances

Data RepoCache Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RepoCache -> c RepoCache #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RepoCache #

toConstr :: RepoCache -> Constr #

dataTypeOf :: RepoCache -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c RepoCache) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RepoCache) #

gmapT :: (forall b. Data b => b -> b) -> RepoCache -> RepoCache #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RepoCache -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RepoCache -> r #

gmapQ :: (forall d. Data d => d -> u) -> RepoCache -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> RepoCache -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> RepoCache -> m RepoCache #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RepoCache -> m RepoCache #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RepoCache -> m RepoCache #

Read RepoCache Source # 
Show RepoCache Source # 

newtype SshPrivKey Source #

Constructors

SshPrivKey FilePath 

Instances

Data SshPrivKey Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SshPrivKey -> c SshPrivKey #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SshPrivKey #

toConstr :: SshPrivKey -> Constr #

dataTypeOf :: SshPrivKey -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c SshPrivKey) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SshPrivKey) #

gmapT :: (forall b. Data b => b -> b) -> SshPrivKey -> SshPrivKey #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SshPrivKey -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SshPrivKey -> r #

gmapQ :: (forall d. Data d => d -> u) -> SshPrivKey -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SshPrivKey -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SshPrivKey -> m SshPrivKey #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SshPrivKey -> m SshPrivKey #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SshPrivKey -> m SshPrivKey #

Read SshPrivKey Source # 
Show SshPrivKey Source # 

newtype SshRemoteHost Source #

Constructors

SshRemoteHost (String, Int) 

Instances

Data SshRemoteHost Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SshRemoteHost -> c SshRemoteHost #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SshRemoteHost #

toConstr :: SshRemoteHost -> Constr #

dataTypeOf :: SshRemoteHost -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c SshRemoteHost) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SshRemoteHost) #

gmapT :: (forall b. Data b => b -> b) -> SshRemoteHost -> SshRemoteHost #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SshRemoteHost -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SshRemoteHost -> r #

gmapQ :: (forall d. Data d => d -> u) -> SshRemoteHost -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SshRemoteHost -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SshRemoteHost -> m SshRemoteHost #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SshRemoteHost -> m SshRemoteHost #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SshRemoteHost -> m SshRemoteHost #

Read SshRemoteHost Source # 
Show SshRemoteHost Source # 

newtype SshRemoteUser Source #

Constructors

SshRemoteUser String 

Instances

Data SshRemoteUser Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SshRemoteUser -> c SshRemoteUser #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SshRemoteUser #

toConstr :: SshRemoteUser -> Constr #

dataTypeOf :: SshRemoteUser -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c SshRemoteUser) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SshRemoteUser) #

gmapT :: (forall b. Data b => b -> b) -> SshRemoteUser -> SshRemoteUser #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SshRemoteUser -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SshRemoteUser -> r #

gmapQ :: (forall d. Data d => d -> u) -> SshRemoteUser -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SshRemoteUser -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SshRemoteUser -> m SshRemoteUser #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SshRemoteUser -> m SshRemoteUser #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SshRemoteUser -> m SshRemoteUser #

Read SshRemoteUser Source # 
Show SshRemoteUser Source # 

initRepoCache :: MonadIO m => SystemPath -> m RepoCache Source #

Initialize the local repository cache directory.

initRemoteRepo :: MonadIO m => RepoCache -> RemoteRepo -> m RemoteRepo Source #

Initialize the repository; load the corresponding settings from the config file, check that the priv key exists and create the correspondig cache directory.

cleanRemoteRepo :: MonadIO m => RepoCache -> RemoteRepo -> m () Source #

Empty the repository; load the corresponding settings from the config file, check that the priv key exists and create the correspondig cache directory.

remoteRepoCheckSshPrivKey :: MonadIO m => RemoteRepo -> m RemoteRepo Source #

Check for existance of priv-key and make it an absolute path.

remoteRepoCacheDir Source #

Arguments

:: RepoCache

The repository cache directory

-> String

Id of the repository

-> FilePath

The existing, absolute path to the cache directory

Return the cache directory for a remote repository relative to the root cache dir.

localRepoDir Source #

Arguments

:: RepoCache

The repository cache directory

-> FilePath

The existing, absolute path to the directory

Return the local repository directory.

writeRemoteRepoConfig :: RemoteRepo -> ConfigParser -> Either CPError ConfigParser Source #

Persist a repo to a configuration file.

lookupRemoteRepo :: [RemoteRepo] -> String -> Maybe RemoteRepo Source #

Load a repository from a configuration file that has been written by writeRepositoryToB9Config.