summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs')
-rw-r--r--src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs29
1 files changed, 16 insertions, 13 deletions
diff --git a/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs b/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs
index e3d21ac1..7984a2aa 100644
--- a/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs
+++ b/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs
@@ -151,7 +151,7 @@ stackInstalled = withOS "stack installed" $ \w o ->
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-" ++ archname, "-O", tmptar]
+ & cmdProperty "wget" [url, "-O", tmptar]
`assume` MadeChange
& File.dirExists tmpdir
& cmdProperty "tar" ["xf", tmptar, "-C", tmpdir, "--strip-components=1"]
@@ -160,27 +160,30 @@ stackInstalled = withOS "stack installed" $ \w o ->
`assume` MadeChange
& cmdProperty "rm" ["-rf", tmpdir, tmptar]
`assume` MadeChange
+ & case arch of
+ ARMEL -> setupRevertableProperty $
+ "/lib/ld-linux-armhf.so.3"
+ `File.isSymlinkedTo`
+ File.LinkTarget "/lib/ld-linux.so.3"
+ _ -> doNothing
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"
+ url = case arch of
+ X86_32 -> "https://www.stackage.org/stack/linux-i386"
+ X86_64 -> "https://www.stackage.org/stack/linux-x86_64"
+ ARMEL -> "https://github.com/commercialhaskell/stack/releases/download/v1.7.1/stack-1.7.1-linux-arm.tar.gz"
-- Probably not available.
- a -> architectureToDebianArchString a
+ a -> "https://www.stackage.org/stack/linux-" ++ architectureToDebianArchString a
binstack = "/usr/bin/stack"
tmptar = "/root/stack.tar.gz"
tmpdir = "/root/stack"
-armAutoBuilder :: DebianSuite -> Architecture -> Flavor -> Property (HasInfo + Debian)
-armAutoBuilder suite arch flavor =
+armAutoBuilder :: (DebianSuite -> Architecture -> Flavor -> Property (HasInfo + Debian)) -> DebianSuite -> Architecture -> Flavor -> Property (HasInfo + Debian)
+armAutoBuilder baseautobuilder suite arch flavor =
propertyList "arm git-annex autobuilder" $ props
- & standardAutoBuilder suite arch flavor
- & buildDepsApt
+ & baseautobuilder suite arch flavor
-- Works around ghc crash with parallel builds on arm.
& (homedir </> ".cabal" </> "config")
- `File.lacksLine` "jobs: $ncpus"
+ `File.containsLine` "jobs: 1"
-- Work around https://github.com/systemd/systemd/issues/7135
& Systemd.containerCfg "--system-call-filter=set_tls"