summaryrefslogtreecommitdiff
path: root/Propellor/Property
diff options
context:
space:
mode:
authorJoey Hess2014-04-01 17:08:48 -0400
committerJoey Hess2014-04-01 17:08:48 -0400
commitec61b8f5d6a35360692c650e417f87e98582c53f (patch)
tree388f4a5642cfbb727ff91acefce97e15369198e7 /Propellor/Property
parentb4480162635aa372cef21b84c336abe0638ebeb2 (diff)
propellor spin
Diffstat (limited to 'Propellor/Property')
-rw-r--r--Propellor/Property/SiteSpecific/GitAnnexBuilder.hs19
1 files changed, 13 insertions, 6 deletions
diff --git a/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs b/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs
index 6c0ece40..93d81bae 100644
--- a/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs
+++ b/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs
@@ -15,17 +15,24 @@ builddir = "gitbuilder"
builder :: Arch -> CronTimes -> Property
builder arch crontimes = combineProperties
- [ Apt.buildDep ["git-annex"]
+ [ Apt.stdSourcesList Unstable
+ , Apt.buildDep ["git-annex"]
, Apt.installed ["git", "rsync", "liblockfile-simple-perl"]
, serviceRunning "cron" `requires` Apt.installed ["cron"]
, User.accountFor builduser
- , check (not <$> hasbuilddir) $ userScriptProperty builduser
+ , check (lacksdir builddir) $ userScriptProperty builduser
[ "cabal update"
, "git clone https://github.com/joeyh/gitbuilder/"
- , "cd gitbuilder && git checkout " ++ arch
+ , "cd gitbuilder"
+ , "git checkout " ++ arch
+ , "git clone https://git-annex.branchable.com/ git-annex"
, "echo '"++crontimes++" cd gitbuilder/autobuild' | crontab -"
]
`describe` "gitbuilder setup"
+ , check (lacksdir $ builddir </> "git-annex") $ userScriptProperty builduser
+ [ "cd gitbuilder"
+ , "git clone https://git-annex.branchable.com/ git-annex"
+ ]
-- The builduser account does not have a password set,
-- instead use the password privdata to hold the rsync server
-- password used to upload the built image.
@@ -40,6 +47,6 @@ builder arch crontimes = combineProperties
]
where
homedir = fromMaybe ("/home/" ++ builduser) <$> User.homedir builduser
- hasbuilddir = do
- d <- homedir
- doesDirectoryExist (d </> builddir)
+ lacksdir d = do
+ h <- homedir
+ not <$> doesDirectoryExist (h </> d)