summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs
diff options
context:
space:
mode:
authorJoey Hess2017-02-15 15:22:17 -0400
committerJoey Hess2017-02-15 15:22:17 -0400
commitf515da36f5adbe28875674fdf92a9f015376e3f4 (patch)
tree5a39203c27f2a8ff15e939142eff14450d23e28e /src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs
parenta55aea985f7d461c34f75cc1b933569122cb742f (diff)
more arches for stackInstalled
There is no armel build, unfortunately; the "arm" build is armhf at least currently.
Diffstat (limited to 'src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs')
-rw-r--r--src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs b/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs
index d40964b3..bd4d0928 100644
--- a/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs
+++ b/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs
@@ -143,15 +143,15 @@ stackAutoBuilder suite arch flavor =
stackInstalled :: Property Linux
stackInstalled = withOS "stack installed" $ \w o ->
case o of
- (Just (System (Debian Linux (Stable "jessie")) X86_32)) ->
- ensureProperty w $ manualinstall X86_32
+ (Just (System (Debian Linux (Stable "jessie")) arch)) ->
+ ensureProperty w $ manualinstall arch
_ -> ensureProperty w $ Apt.installed ["haskell-stack"]
where
-- Warning: Using a binary downloaded w/o validation.
manualinstall :: Architecture -> Property Linux
manualinstall arch = tightenTargets $ check (not <$> doesFileExist binstack) $
propertyList "stack installed from upstream tarball" $ props
- & cmdProperty "wget" ["https://www.stackage.org/stack/linux-" ++ architectureToDebianArchString arch, "-O", tmptar]
+ & cmdProperty "wget" ["https://www.stackage.org/stack/linux-" ++ archname, "-O", tmptar]
`assume` MadeChange
& File.dirExists tmpdir
& cmdProperty "tar" ["xf", tmptar, "-C", tmpdir, "--strip-components=1"]
@@ -160,6 +160,15 @@ stackInstalled = withOS "stack installed" $ \w o ->
`assume` MadeChange
& cmdProperty "rm" ["-rf", tmpdir, tmptar]
`assume` MadeChange
+ where
+ -- See https://www.stackage.org/stack/ for the list of
+ -- binaries.
+ archname = case arch of
+ X86_32 -> "i386"
+ X86_64 -> "x86_64"
+ ARMHF -> "arm"
+ -- Probably not available.
+ a -> architectureToDebianArchString a
binstack = "/usr/bin/stack"
tmptar = "/root/stack.tar.gz"
tmpdir = "/root/stack"