summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Cron.hs
diff options
context:
space:
mode:
authorJoey Hess2017-07-12 19:12:36 -0400
committerJoey Hess2017-07-12 19:12:36 -0400
commit08010583fa42af1b2b5ab070e4742263d43b26cf (patch)
tree6a65363f435863139950616cc12ca7ef74042fdf /src/Propellor/Property/Cron.hs
parent8e172612f5675a9dab4c302e9353af7e77773d45 (diff)
add bootstrapWith property to support stack and more
* Hosts can be configured to build propellor using stack, by adding a property: & bootstrapWith (Robustly Stack) * Hosts can be configured to build propellor using cabal, but using only packages installed from the operating system. This will work on eg Debian: & bootstrapWith OSOnly propellor build its config using stack. (This does not affect how propellor is bootstrapped on a host by "propellor --spin host".) This has not yet been tested at all! But should probably work fine. This is based on earlier work by Arnaud Bailly, who made Propellor.Bootstrap use stack without parameterization. In Arnaud's patch, stack was installed using wget, but that only worked on linux-x86_64 and was insecure. I instead chose to use the distribution packages of stack, like is done for cabal. Debian stack has haskell-stack now, and it's getting into many distributions. This commit was sponsored by Francois Marier on Patreon.
Diffstat (limited to 'src/Propellor/Property/Cron.hs')
-rw-r--r--src/Propellor/Property/Cron.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Propellor/Property/Cron.hs b/src/Propellor/Property/Cron.hs
index 0966a7e5..ab700a9d 100644
--- a/src/Propellor/Property/Cron.hs
+++ b/src/Propellor/Property/Cron.hs
@@ -80,7 +80,8 @@ niceJob desc times user cddir command = job desc times user cddir
-- | Installs a cron job to run propellor.
runPropellor :: Times -> Property UnixLike
-runPropellor times = withOS "propellor cron job" $ \w o ->
+runPropellor times = withOS "propellor cron job" $ \w o -> do
+ bootstrapper <- getBootstrapper
ensureProperty w $
niceJob "propellor" times (User "root") localdir
- (bootstrapPropellorCommand o ++ "; ./propellor")
+ (bootstrapPropellorCommand bootstrapper o ++ "; ./propellor")