From 4c0b1f6e643882f43ac936b6bfdee78593ebc1d5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 20 Oct 2015 12:20:46 -0400 Subject: haddocks --- src/Propellor/Property/Chroot.hs | 8 +++++--- src/Propellor/Property/Systemd.hs | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Propellor/Property/Chroot.hs b/src/Propellor/Property/Chroot.hs index 30f09862..7ec2010c 100644 --- a/src/Propellor/Property/Chroot.hs +++ b/src/Propellor/Property/Chroot.hs @@ -29,6 +29,8 @@ import qualified Data.Map as M import Data.List.Utils import System.Posix.Directory +-- | Specification of a chroot. Normally you'll use `debootstrapped` or +-- `bootstrapped` to construct a Chroot value. data Chroot where Chroot :: ChrootBootstrapper b => FilePath -> System -> b -> Host -> Chroot @@ -46,7 +48,7 @@ instance PropAccum Chroot where -- | Class of things that can do initial bootstrapping of an operating -- System in a chroot. class ChrootBootstrapper b where - -- Do initial bootstrapping of an operating system in a chroot. + -- | Do initial bootstrapping of an operating system in a chroot. -- If the operating System is not supported, return Nothing. buildchroot :: b -> System -> FilePath -> Maybe (Property HasInfo) @@ -65,8 +67,8 @@ instance ChrootBootstrapper Debootstrapped where -- Properties can be added to configure the Chroot. -- -- > debootstrapped (System (Debian Unstable) "amd64") Debootstrap.BuildD "/srv/chroot/ghc-dev" --- > & Apt.installed ["ghc", "haskell-platform"] --- > & ... +-- > & Apt.installed ["ghc", "haskell-platform"] +-- > & ... debootstrapped :: System -> Debootstrap.DebootstrapConfig -> FilePath -> Chroot debootstrapped system conf = bootstrapped system (Debootstrapped conf) diff --git a/src/Propellor/Property/Systemd.hs b/src/Propellor/Property/Systemd.hs index 3f20a9e2..d5373e15 100644 --- a/src/Propellor/Property/Systemd.hs +++ b/src/Propellor/Property/Systemd.hs @@ -206,7 +206,7 @@ container name mkchroot = Container name c h -- Reverting this property stops the container, removes the systemd unit, -- and deletes the chroot and all its contents. nspawned :: Container -> RevertableProperty -nspawned c@(Container name (Chroot.Chroot loc system builderconf _) h) = +nspawned c@(Container name (Chroot.Chroot loc system builder _) h) = p `describe` ("nspawned " ++ name) where p = enterScript c @@ -226,7 +226,7 @@ nspawned c@(Container name (Chroot.Chroot loc system builderconf _) h) = doNothing - chroot = Chroot.Chroot loc system builderconf h + chroot = Chroot.Chroot loc system builder h -- | Sets up the service file for the container, and then starts -- it running. -- cgit v1.2.3