From 50b6e377906785a711371856e796ea14f295a76d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 22 Nov 2014 21:10:35 -0400 Subject: propellor spin --- src/Propellor/Property/Debootstrap.hs | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'src/Propellor/Property') diff --git a/src/Propellor/Property/Debootstrap.hs b/src/Propellor/Property/Debootstrap.hs index 0611e735..fe87cc27 100644 --- a/src/Propellor/Property/Debootstrap.hs +++ b/src/Propellor/Property/Debootstrap.hs @@ -141,8 +141,26 @@ installed = RevertableProperty install remove aptremove = Apt.removed ["debootstrap"] sourceInstall :: Property -sourceInstall = property "debootstrap installed from source" - (liftIO sourceInstall') +sourceInstall = property "debootstrap installed from source" (liftIO sourceInstall') + `requires` perlInstalled + `requires` arInstalled + +perlInstalled :: Property +perlInstalled = check (not <$> inPath "perl") $ property "perl installed" $ do + v <- liftIO $ firstM id + [ yumInstall "perl" + ] + if isJust v then return MadeChange else return FailedChange + +arInstalled :: Property +arInstalled = check (not <$> inPath "ar") $ property "ar installed" $ do + v <- liftIO $ firstM id + [ yumInstall "binutils" + ] + if isJust v then return MadeChange else return FailedChange + +yumInstall :: String -> IO Bool +yumInstall p = boolSystem "yum" [Param "-y", Param "install", Param p] sourceInstall' :: IO Result sourceInstall' = withTmpDir "debootstrap" $ \tmpd -> do -- cgit v1.2.3 From 1d5d911aa09297c2f9d4e6db1f9437ff8c014a74 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 22 Nov 2014 21:30:50 -0400 Subject: propellor spin --- src/Propellor/Property/Debootstrap.hs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/Propellor/Property') diff --git a/src/Propellor/Property/Debootstrap.hs b/src/Propellor/Property/Debootstrap.hs index fe87cc27..2ba9faac 100644 --- a/src/Propellor/Property/Debootstrap.hs +++ b/src/Propellor/Property/Debootstrap.hs @@ -78,7 +78,8 @@ built target system@(System _ arch) config = , Param target ] cmd <- fromMaybe "debootstrap" <$> programPath - ifM (boolSystem cmd params) + de <- debootstrapEnv + ifM (boolSystemEnv cmd params (Just de)) ( do fixForeignDev target return MadeChange @@ -107,6 +108,15 @@ built target system@(System _ arch) config = , return False ) +-- workaround for http://bugs.debian.org/770658 +debootstrapEnv :: IO [(String, String)] +debootstrapEnv = do + path <- getEnvDefault "/bin" "PATH" + addEntry "PATH" (path ++ debianPath) + <$> getEnvironment + where + debianPath = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + mountPoints :: IO [FilePath] mountPoints = lines <$> readProcess "findmnt" ["-rn", "--output", "target"] -- cgit v1.2.3 From cc8babccc8992f0f169c5613d583ae5d82373272 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 22 Nov 2014 21:37:39 -0400 Subject: propellor spin --- src/Propellor/Property/Debootstrap.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Propellor/Property') diff --git a/src/Propellor/Property/Debootstrap.hs b/src/Propellor/Property/Debootstrap.hs index 2ba9faac..b04bda71 100644 --- a/src/Propellor/Property/Debootstrap.hs +++ b/src/Propellor/Property/Debootstrap.hs @@ -111,7 +111,7 @@ built target system@(System _ arch) config = -- workaround for http://bugs.debian.org/770658 debootstrapEnv :: IO [(String, String)] debootstrapEnv = do - path <- getEnvDefault "/bin" "PATH" + path <- getEnvDefault "PATH" "/bin" addEntry "PATH" (path ++ debianPath) <$> getEnvironment where -- cgit v1.2.3 From 5360e466d35d01f83f782496ee672206530a85cd Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 22 Nov 2014 21:50:49 -0400 Subject: reorg --- src/Propellor/Property/Debootstrap.hs | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'src/Propellor/Property') diff --git a/src/Propellor/Property/Debootstrap.hs b/src/Propellor/Property/Debootstrap.hs index b04bda71..a8c80348 100644 --- a/src/Propellor/Property/Debootstrap.hs +++ b/src/Propellor/Property/Debootstrap.hs @@ -108,15 +108,6 @@ built target system@(System _ arch) config = , return False ) --- workaround for http://bugs.debian.org/770658 -debootstrapEnv :: IO [(String, String)] -debootstrapEnv = do - path <- getEnvDefault "PATH" "/bin" - addEntry "PATH" (path ++ debianPath) - <$> getEnvironment - where - debianPath = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" - mountPoints :: IO [FilePath] mountPoints = lines <$> readProcess "findmnt" ["-rn", "--output", "target"] @@ -243,6 +234,15 @@ makeWrapperScript dir = do ] modifyFileMode wrapperScript (addModes $ readModes ++ executeModes) +-- workaround for http://bugs.debian.org/770658 +debootstrapEnv :: IO [(String, String)] +debootstrapEnv = do + path <- getEnvDefault "PATH" "/bin" + addEntry "PATH" (path ++ debianPath) + <$> getEnvironment + where + debianPath = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + -- Work around for http://bugs.debian.org/770217 makeDevicesTarball :: IO () makeDevicesTarball = do @@ -256,8 +256,9 @@ makeDevicesTarball = do tarcmd = "(cd / && tar cf - dev) | gzip > devices.tar.gz" fixForeignDev :: FilePath -> IO () -fixForeignDev target = whenM (doesFileExist (target ++ foreignDevFlag)) $ - void $ boolSystem "chroot" +fixForeignDev target = whenM (doesFileExist (target ++ foreignDevFlag)) $ do + de <- debootstrapEnv + void $ boolSystemEnv "chroot" [ File target , Param "sh" , Param "-c" @@ -268,6 +269,7 @@ fixForeignDev target = whenM (doesFileExist (target ++ foreignDevFlag)) $ , "/sbin/MAKEDEV std ptmx fd consoleonly" ] ] + (Just de) foreignDevFlag :: FilePath foreignDevFlag = "/dev/.propellor-foreign-dev" -- cgit v1.2.3 From 96ecbaad25076901802dd7a311161d46a1212d68 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 22 Nov 2014 22:10:53 -0400 Subject: pute full path to bin/propellor inside shim --- src/Propellor/Property/Chroot.hs | 2 +- src/Propellor/Property/Debootstrap.hs | 3 ++- src/Propellor/Property/Docker.hs | 2 +- src/Propellor/Shim.hs | 6 +++--- src/Propellor/Spin.hs | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) (limited to 'src/Propellor/Property') diff --git a/src/Propellor/Property/Chroot.hs b/src/Propellor/Property/Chroot.hs index c3b14a8e..f45e2fc1 100644 --- a/src/Propellor/Property/Chroot.hs +++ b/src/Propellor/Property/Chroot.hs @@ -88,7 +88,7 @@ propellChroot c@(Chroot loc _ _ _) mkproc systemdonly = property (chrootDesc c " let me = localdir "propellor" shim <- liftIO $ ifM (doesDirectoryExist d) ( pure (Shim.file me d) - , Shim.setup me d + , Shim.setup me Nothing d ) ifM (liftIO $ bindmount shim) ( chainprovision shim diff --git a/src/Propellor/Property/Debootstrap.hs b/src/Propellor/Property/Debootstrap.hs index a8c80348..f85eb2e6 100644 --- a/src/Propellor/Property/Debootstrap.hs +++ b/src/Propellor/Property/Debootstrap.hs @@ -263,7 +263,8 @@ fixForeignDev target = whenM (doesFileExist (target ++ foreignDevFlag)) $ do , Param "sh" , Param "-c" , Param $ intercalate " && " - [ "rm -rf /dev" + [ "apt-get -y install makedev" + , "rm -rf /dev" , "mkdir /dev" , "cd /dev" , "/sbin/MAKEDEV std ptmx fd consoleonly" diff --git a/src/Propellor/Property/Docker.hs b/src/Propellor/Property/Docker.hs index 460bc3ec..586ebc2e 100644 --- a/src/Propellor/Property/Docker.hs +++ b/src/Propellor/Property/Docker.hs @@ -377,7 +377,7 @@ runningContainer cid@(ContainerId hn cn) image runps = containerDesc cid $ prope liftIO $ do clearProvisionedFlag cid createDirectoryIfMissing True (takeDirectory $ identFile cid) - shim <- liftIO $ Shim.setup (localdir "propellor") (localdir shimdir cid) + shim <- liftIO $ Shim.setup (localdir "propellor") Nothing (localdir shimdir cid) liftIO $ writeFile (identFile cid) (show ident) ensureProperty $ boolProperty "run" $ runContainer img (runps ++ ["-i", "-d", "-t"]) diff --git a/src/Propellor/Shim.hs b/src/Propellor/Shim.hs index 6262ea5c..a97bf5c8 100644 --- a/src/Propellor/Shim.hs +++ b/src/Propellor/Shim.hs @@ -21,8 +21,8 @@ import System.Posix.Files -- -- Propellor may be running from an existing shim, in which case it's -- simply reused. -setup :: FilePath -> FilePath -> IO FilePath -setup propellorbin dest = checkAlreadyShimmed propellorbin $ do +setup :: FilePath -> Maybe FilePath -> FilePath -> IO FilePath +setup propellorbin propellorbinpath dest = checkAlreadyShimmed propellorbin $ do createDirectoryIfMissing True dest libs <- parseLdd <$> readProcess "ldd" [propellorbin] @@ -44,7 +44,7 @@ setup propellorbin dest = checkAlreadyShimmed propellorbin $ do , "GCONV_PATH=" ++ shellEscape gconvdir , "export GCONV_PATH" , "exec " ++ unwords (map shellEscape $ linker : linkerparams) ++ - " " ++ shellEscape propellorbin ++ " \"$@\"" + " " ++ shellEscape (fromMaybe propellorbin propellorbinpath) ++ " \"$@\"" ] modifyFileMode shim (addModes executeModes) return shim diff --git a/src/Propellor/Spin.hs b/src/Propellor/Spin.hs index 6add4f9f..228c4027 100644 --- a/src/Propellor/Spin.hs +++ b/src/Propellor/Spin.hs @@ -224,7 +224,7 @@ sendPrecompiled hn = void $ actionMessage ("Uploading locally compiled propellor createDirectoryIfMissing True "bin" unlessM (boolSystem "cp" [File me, File "bin/propellor"]) $ errorMessage "failed copying in propellor" - void $ Shim.setup "bin/propellor" "." + void $ Shim.setup "bin/propellor" (localdir "bin/propellor") "." changeWorkingDirectory tmpdir withTmpFile "propellor.tar." $ \tarball _ -> allM id [ boolSystem "strip" [File me] -- cgit v1.2.3 From ca09087caf5298b01f05bae4a4601fce47966c4f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 22 Nov 2014 22:24:09 -0400 Subject: propellor spin --- src/Propellor/Engine.hs | 3 +++ src/Propellor/Property/Debootstrap.hs | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src/Propellor/Property') diff --git a/src/Propellor/Engine.hs b/src/Propellor/Engine.hs index b551ca05..0b65fb7e 100644 --- a/src/Propellor/Engine.hs +++ b/src/Propellor/Engine.hs @@ -11,6 +11,8 @@ import "mtl" Control.Monad.Reader import Control.Exception (bracket) import System.PosixCompat import System.Posix.IO +import System.FilePath +import System.Directory import Propellor.Types import Propellor.Message @@ -60,6 +62,7 @@ onlyProcess :: FilePath -> IO a -> IO a onlyProcess lockfile a = bracket lock unlock (const a) where lock = do + createDirectoryIfMissing True (takeDirectory lockfile) l <- createFile lockfile stdFileMode setLock l (WriteLock, AbsoluteSeek, 0, 0) `catchIO` const alreadyrunning diff --git a/src/Propellor/Property/Debootstrap.hs b/src/Propellor/Property/Debootstrap.hs index f85eb2e6..32e892bb 100644 --- a/src/Propellor/Property/Debootstrap.hs +++ b/src/Propellor/Property/Debootstrap.hs @@ -263,10 +263,12 @@ fixForeignDev target = whenM (doesFileExist (target ++ foreignDevFlag)) $ do , Param "sh" , Param "-c" , Param $ intercalate " && " - [ "apt-get -y install makedev" + [ "apt-get update" + , "apt-get -y install makedev" , "rm -rf /dev" , "mkdir /dev" , "cd /dev" + , "mount -t proc proc /proc" , "/sbin/MAKEDEV std ptmx fd consoleonly" ] ] -- cgit v1.2.3 From 5fefb161c388f72fa598c238295ce1f051cc0029 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 22 Nov 2014 22:37:25 -0400 Subject: propellor spin --- propellor.cabal | 1 + src/Propellor/Property/Chroot.hs | 5 ++++- src/Propellor/Property/Chroot/Util.hs | 15 +++++++++++++++ src/Propellor/Property/Debootstrap.hs | 14 +++----------- 4 files changed, 23 insertions(+), 12 deletions(-) create mode 100644 src/Propellor/Property/Chroot/Util.hs (limited to 'src/Propellor/Property') diff --git a/propellor.cabal b/propellor.cabal index 20aba22e..a09a80d1 100644 --- a/propellor.cabal +++ b/propellor.cabal @@ -126,6 +126,7 @@ Library Propellor.PrivData.Paths Propellor.Protocol Propellor.Shim + Propellor.Property.Chroot.Util Utility.Applicative Utility.Data Utility.Directory diff --git a/src/Propellor/Property/Chroot.hs b/src/Propellor/Property/Chroot.hs index f45e2fc1..3da8b0d6 100644 --- a/src/Propellor/Property/Chroot.hs +++ b/src/Propellor/Property/Chroot.hs @@ -11,6 +11,7 @@ module Propellor.Property.Chroot ( import Propellor import Propellor.Types.Chroot +import Propellor.Property.Chroot.Util import qualified Propellor.Property.Debootstrap as Debootstrap import qualified Propellor.Property.Systemd.Core as Systemd import qualified Propellor.Shim as Shim @@ -109,12 +110,14 @@ propellChroot c@(Chroot loc _ _ _) mkproc systemdonly = property (chrootDesc c " chainprovision shim = do parenthost <- asks hostName cmd <- liftIO $ toChain parenthost c systemdonly + pe <- liftIO standardPathEnv let p = mkproc [ shim , "--continue" , show cmd ] - liftIO $ withHandle StdoutHandle createProcessSuccess p + let p' = p { env = Just pe } + liftIO $ withHandle StdoutHandle createProcessSuccess p' processChainOutput toChain :: HostName -> Chroot -> Bool -> IO CmdLine diff --git a/src/Propellor/Property/Chroot/Util.hs b/src/Propellor/Property/Chroot/Util.hs new file mode 100644 index 00000000..feb71d01 --- /dev/null +++ b/src/Propellor/Property/Chroot/Util.hs @@ -0,0 +1,15 @@ +module Propellor.Property.Chroot.Util where + +import Utility.Env +import Control.Applicative + +-- When chrooting, it's useful to ensure that PATH has all the standard +-- directories in it. This adds those directories to whatever PATH is +-- already set. +standardPathEnv :: IO [(String, String)] +standardPathEnv = do + path <- getEnvDefault "PATH" "/bin" + addEntry "PATH" (path ++ std) + <$> getEnvironment + where + std = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" diff --git a/src/Propellor/Property/Debootstrap.hs b/src/Propellor/Property/Debootstrap.hs index 32e892bb..ab5bddf4 100644 --- a/src/Propellor/Property/Debootstrap.hs +++ b/src/Propellor/Property/Debootstrap.hs @@ -8,6 +8,7 @@ module Propellor.Property.Debootstrap ( import Propellor import qualified Propellor.Property.Apt as Apt +import Propellor.Property.Chroot.Util import Utility.Path import Utility.SafeCommand import Utility.FileMode @@ -78,7 +79,7 @@ built target system@(System _ arch) config = , Param target ] cmd <- fromMaybe "debootstrap" <$> programPath - de <- debootstrapEnv + de <- standardPathEnv ifM (boolSystemEnv cmd params (Just de)) ( do fixForeignDev target @@ -234,15 +235,6 @@ makeWrapperScript dir = do ] modifyFileMode wrapperScript (addModes $ readModes ++ executeModes) --- workaround for http://bugs.debian.org/770658 -debootstrapEnv :: IO [(String, String)] -debootstrapEnv = do - path <- getEnvDefault "PATH" "/bin" - addEntry "PATH" (path ++ debianPath) - <$> getEnvironment - where - debianPath = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" - -- Work around for http://bugs.debian.org/770217 makeDevicesTarball :: IO () makeDevicesTarball = do @@ -257,7 +249,7 @@ makeDevicesTarball = do fixForeignDev :: FilePath -> IO () fixForeignDev target = whenM (doesFileExist (target ++ foreignDevFlag)) $ do - de <- debootstrapEnv + de <- standardPathEnv void $ boolSystemEnv "chroot" [ File target , Param "sh" -- cgit v1.2.3 From f4e06ae77818f32c16c5051b4fe40a7bc993b624 Mon Sep 17 00:00:00 2001 From: Félix Sipma Date: Sun, 23 Nov 2014 18:25:39 +0100 Subject: User: hasGroup Signed-off-by: Félix Sipma --- src/Propellor/Property/User.hs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/Propellor/Property') diff --git a/src/Propellor/Property/User.hs b/src/Propellor/Property/User.hs index f9c400a8..b7bd5e93 100644 --- a/src/Propellor/Property/User.hs +++ b/src/Propellor/Property/User.hs @@ -30,7 +30,7 @@ hasSomePassword user context = check ((/= HasPassword) <$> getPasswordStatus use hasPassword :: UserName -> Context -> Property hasPassword user context = withPrivData (Password user) context $ \getpassword -> - property (user ++ " has password") $ + property (user ++ " has password") $ getpassword $ \password -> makeChange $ withHandle StdinHandle createProcessSuccess (proc "chpasswd" []) $ \h -> do @@ -60,3 +60,12 @@ isLockedPassword user = (== LockedPassword) <$> getPasswordStatus user homedir :: UserName -> IO FilePath homedir user = homeDirectory <$> getUserEntryForName user + +hasGroup :: UserName -> GroupName -> Property +hasGroup user group' = check test $ cmdProperty "adduser" + [ user + , group' + ] + `describe` unwords ["user", user, "in group", group'] + where + test = not <$> elem group' <$> words <$> readProcess "groups" [user] -- cgit v1.2.3 From 69eace8e9a9d4fb2c6193e9e44ea836bd0bf8ba4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 23 Nov 2014 14:37:37 -0400 Subject: preferred style --- src/Propellor/Property/User.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Propellor/Property') diff --git a/src/Propellor/Property/User.hs b/src/Propellor/Property/User.hs index b7bd5e93..6a51703a 100644 --- a/src/Propellor/Property/User.hs +++ b/src/Propellor/Property/User.hs @@ -68,4 +68,4 @@ hasGroup user group' = check test $ cmdProperty "adduser" ] `describe` unwords ["user", user, "in group", group'] where - test = not <$> elem group' <$> words <$> readProcess "groups" [user] + test = not . elem group' . words <$> readProcess "groups" [user] -- cgit v1.2.3 From 6aa21366d57679f82fbaf96a90f93d2d1ac7f223 Mon Sep 17 00:00:00 2001 From: Félix Sipma Date: Sun, 23 Nov 2014 18:33:26 +0100 Subject: Group properties Signed-off-by: Félix Sipma --- propellor.cabal | 1 + src/Propellor/Property/Group.hs | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 src/Propellor/Property/Group.hs (limited to 'src/Propellor/Property') diff --git a/propellor.cabal b/propellor.cabal index a09a80d1..cd34d4bf 100644 --- a/propellor.cabal +++ b/propellor.cabal @@ -83,6 +83,7 @@ Library Propellor.Property.Firewall Propellor.Property.Git Propellor.Property.Gpg + Propellor.Property.Group Propellor.Property.Grub Propellor.Property.Network Propellor.Property.Nginx diff --git a/src/Propellor/Property/Group.hs b/src/Propellor/Property/Group.hs new file mode 100644 index 00000000..f03510cf --- /dev/null +++ b/src/Propellor/Property/Group.hs @@ -0,0 +1,14 @@ +module Propellor.Property.Group where + +import Propellor + +type GID = Int + +exists :: GroupName -> Maybe GID -> Property +exists group' mgid = check test (cmdProperty "addgroup" $ args mgid) + `describe` unwords ["group", group'] + where + groupFile = "/etc/group" + test = not <$> elem group' <$> words <$> readProcess "cut" ["-d:", "-f1", groupFile] + args Nothing = [group'] + args (Just gid) = ["--gid", show gid, group'] -- cgit v1.2.3 From 226981cda4597f6564b9e31d826efc84a2ce61a5 Mon Sep 17 00:00:00 2001 From: Félix Sipma Date: Sun, 23 Nov 2014 18:42:36 +0100 Subject: Git: bareRepo Signed-off-by: Félix Sipma --- src/Propellor/Property/Git.hs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/Propellor/Property') diff --git a/src/Propellor/Property/Git.hs b/src/Propellor/Property/Git.hs index 8d49cbd0..a2bec5ef 100644 --- a/src/Propellor/Property/Git.hs +++ b/src/Propellor/Property/Git.hs @@ -94,3 +94,23 @@ cloned owner url dir mbranch = check originurl (property desc checkout) isGitDir :: FilePath -> IO Bool isGitDir dir = isNothing <$> catchMaybeIO (readProcess "git" ["rev-parse", "--resolve-git-dir", dir]) + +data GitShared = Shared GroupName | SharedAll | NotShared + +bareRepo :: FilePath -> UserName -> GitShared -> Property +bareRepo repo user gitshared = check (isRepo repo) $ propertyList ("git repo: " ++ repo) $ + dirExists repo : case gitshared of + NotShared -> + [ ownerGroup repo user user + , userScriptProperty user ["git", "init", "--bare", "--shared=false", repo] + ] + SharedAll -> + [ ownerGroup repo user user + , userScriptProperty user ["git", "init", "--bare", "--shared=all", repo] + ] + Shared group' -> + [ ownerGroup repo user group' + , userScriptProperty user ["git", "init", "--bare", "--shared=group", repo] + ] + where + isRepo repo' = isNothing <$> catchMaybeIO (readProcess "git" ["rev-parse", "--resolve-git-dir", repo']) -- cgit v1.2.3 From 3c952a0de9d228eafe6e208007be7d2e018d68b8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 23 Nov 2014 14:40:28 -0400 Subject: comment --- src/Propellor/Property/Git.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Propellor/Property') diff --git a/src/Propellor/Property/Git.hs b/src/Propellor/Property/Git.hs index a2bec5ef..eb7801c1 100644 --- a/src/Propellor/Property/Git.hs +++ b/src/Propellor/Property/Git.hs @@ -57,8 +57,9 @@ type Branch = String -- | Specified git repository is cloned to the specified directory. -- --- If the firectory exists with some other content, it will be recursively --- deleted. +-- If the directory exists with some other content (either a non-git +-- repository, or a git repository cloned from some other location), +-- it will be recursively deleted first. -- -- A branch can be specified, to check out. cloned :: UserName -> RepoUrl -> FilePath -> Maybe Branch -> Property -- cgit v1.2.3