diff options
| author | Joey Hess <joeyh@joeyh.name> | 2017-07-12 19:12:36 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2017-07-12 19:12:36 -0400 |
| commit | 08010583fa42af1b2b5ab070e4742263d43b26cf (patch) | |
| tree | 6a65363f435863139950616cc12ca7ef74042fdf /src/Propellor/Spin.hs | |
| parent | 8e172612f5675a9dab4c302e9353af7e77773d45 (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/Spin.hs')
| -rw-r--r-- | src/Propellor/Spin.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Propellor/Spin.hs b/src/Propellor/Spin.hs index cd964e16..7146ad4c 100644 --- a/src/Propellor/Spin.hs +++ b/src/Propellor/Spin.hs @@ -93,6 +93,9 @@ spin' mprivdata relay target hst = do sys = case fromInfo (hostInfo hst) of InfoVal o -> Just o NoInfoVal -> Nothing + bootstrapper = case fromInfo (hostInfo hst) of + NoInfoVal -> defaultBootstrapper + InfoVal bs -> bs relaying = relay == Just target viarelay = isJust relay && not relaying @@ -109,7 +112,7 @@ spin' mprivdata relay target hst = do updatecmd = intercalate " && " [ "cd " ++ localdir - , bootstrapPropellorCommand sys + , bootstrapPropellorCommand bootstrapper sys , if viarelay then "./propellor --continue " ++ shellEscape (show (Relay target)) |
