propellor spin

This commit is contained in:
Joey Hess 2014-04-01 17:08:48 -04:00
parent b448016263
commit ec61b8f5d6
Failed to extract signature
1 changed files with 13 additions and 6 deletions

View File

@ -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)