summaryrefslogtreecommitdiff
path: root/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs
diff options
context:
space:
mode:
authorJoey Hess2014-05-14 19:41:05 -0400
committerJoey Hess2014-05-14 19:41:05 -0400
commit7115d1ec162b4059b3e8e8f84bd8d5898c1db025 (patch)
tree42c1cce54e890e1d56484794ab33129132d8fee2 /Propellor/Property/SiteSpecific/GitAnnexBuilder.hs
parentffe371a9d42cded461236e972a24a142419d7fc4 (diff)
moved source code to src
This is to work around OSX's brain-damange regarding filename case insensitivity. Avoided moving config.hs, because it's a config file. Put in a symlink to make build work.
Diffstat (limited to 'Propellor/Property/SiteSpecific/GitAnnexBuilder.hs')
-rw-r--r--Propellor/Property/SiteSpecific/GitAnnexBuilder.hs57
1 files changed, 0 insertions, 57 deletions
diff --git a/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs b/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs
deleted file mode 100644
index 677aa760..00000000
--- a/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs
+++ /dev/null
@@ -1,57 +0,0 @@
-module Propellor.Property.SiteSpecific.GitAnnexBuilder where
-
-import Propellor
-import qualified Propellor.Property.Apt as Apt
-import qualified Propellor.Property.User as User
-import qualified Propellor.Property.Cron as Cron
-import Propellor.Property.Cron (CronTimes)
-
-builduser :: UserName
-builduser = "builder"
-
-homedir :: FilePath
-homedir = "/home/builder"
-
-gitbuilderdir :: FilePath
-gitbuilderdir = homedir </> "gitbuilder"
-
-builddir :: FilePath
-builddir = gitbuilderdir </> "build"
-
-builder :: Architecture -> CronTimes -> Bool -> Property
-builder arch crontimes rsyncupload = combineProperties "gitannexbuilder"
- [ Apt.stdSourcesList Unstable
- , Apt.buildDep ["git-annex"]
- , Apt.installed ["git", "rsync", "moreutils", "ca-certificates",
- "liblockfile-simple-perl", "cabal-install", "vim", "less"]
- , Apt.serviceInstalledRunning "cron"
- , User.accountFor builduser
- , check (not <$> doesDirectoryExist gitbuilderdir) $ userScriptProperty builduser
- [ "git clone git://git.kitenet.net/gitannexbuilder " ++ gitbuilderdir
- , "cd " ++ gitbuilderdir
- , "git checkout " ++ arch
- ]
- `describe` "gitbuilder setup"
- , check (not <$> doesDirectoryExist builddir) $ userScriptProperty builduser
- [ "git clone git://git-annex.branchable.com/ " ++ builddir
- ]
- , "git-annex source build deps installed" ==> Apt.buildDepIn builddir
- , Cron.niceJob "gitannexbuilder" crontimes builduser gitbuilderdir "git pull ; ./autobuild"
- -- 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.
- , property "rsync password" $ do
- let f = homedir </> "rsyncpassword"
- if rsyncupload
- then withPrivData (Password builduser) $ \p -> do
- oldp <- liftIO $ catchDefaultIO "" $
- readFileStrict f
- if p /= oldp
- then makeChange $ writeFile f p
- else noChange
- else do
- ifM (liftIO $ doesFileExist f)
- ( noChange
- , makeChange $ writeFile f "no password configured"
- )
- ]