summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess2015-10-20 12:26:42 -0400
committerJoey Hess2015-10-20 12:26:42 -0400
commit99b8c0c160e9ab2880143bb17ccb19ff48a6678c (patch)
treefc281205282760a67c03a706590ce37f49e3a012
parent877b2002823fb304b4aa7c8ad8ee0cb4c50ef7df (diff)
parent4c0b1f6e643882f43ac936b6bfdee78593ebc1d5 (diff)
Merge branch 'joeyconfig'
-rw-r--r--src/Propellor/Property/Chroot.hs8
-rw-r--r--src/Propellor/Property/Systemd.hs4
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.