diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-09-23 13:01:39 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-09-23 13:01:39 -0400 |
| commit | 65ef400d40170e8331c6e556d2abb911556f2b5a (patch) | |
| tree | eb5274475ca3312e3e643dd2979503ebd76f27af | |
| parent | 163f84805eaf548020b88d65586979650c6a4795 (diff) | |
| parent | 96047530cac80061156776af613d60ea02dbb0e6 (diff) | |
Merge branch 'joeyconfig'
| -rw-r--r-- | config-joey.hs | 9 | ||||
| -rw-r--r-- | src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs | 30 |
2 files changed, 22 insertions, 17 deletions
diff --git a/config-joey.hs b/config-joey.hs index 65cf0d46..a8eb1347 100644 --- a/config-joey.hs +++ b/config-joey.hs @@ -144,10 +144,13 @@ orca = standardSystem "orca.kitenet.net" Unstable "amd64" & Systemd.nspawned (GitAnnexBuilder.autoBuilderContainer GitAnnexBuilder.standardAutoBuilder - (System (Debian Unstable) "amd64") fifteenpast "2h") + (System (Debian Unstable) "amd64") Nothing fifteenpast "2h") & Systemd.nspawned (GitAnnexBuilder.autoBuilderContainer GitAnnexBuilder.standardAutoBuilder - (System (Debian Unstable) "i386") fifteenpast "2h") + (System (Debian Unstable) "i386") Nothing fifteenpast "2h") + & Systemd.nspawned (GitAnnexBuilder.autoBuilderContainer + GitAnnexBuilder.standardAutoBuilder + (System (Debian (Stable "jessie")) "i386") (Just "ancient") fifteenpast "2h") & Systemd.nspawned (GitAnnexBuilder.androidAutoBuilderContainer (Cron.Times "1 1 * * *") "3h") where @@ -179,7 +182,7 @@ honeybee = standardSystem "honeybee.kitenet.net" Testing "armhf" & Systemd.nspawned (GitAnnexBuilder.autoBuilderContainer GitAnnexBuilder.armAutoBuilder - (System (Debian Unstable) "armel") Cron.Daily "22h") + (System (Debian Unstable) "armel") Nothing Cron.Daily "22h") -- This is not a complete description of kite, since it's a -- multiuser system with eg, user passwords that are not deployed diff --git a/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs b/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs index bd8b1ff3..f2a2f012 100644 --- a/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs +++ b/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs @@ -46,8 +46,8 @@ autobuilder arch crontimes timeout = combineProperties "gitannexbuilder" $ props then makeChange $ writeFile pwfile want else noChange -tree :: Architecture -> Property HasInfo -tree buildarch = combineProperties "gitannexbuilder tree" $ props +tree :: Architecture -> Flavor -> Property HasInfo +tree buildarch flavor = combineProperties "gitannexbuilder tree" $ props & Apt.installed ["git"] & File.dirExists gitbuilderdir & File.ownerGroup gitbuilderdir (User builduser) (Group builduser) @@ -58,7 +58,7 @@ tree buildarch = combineProperties "gitannexbuilder tree" $ props userScriptProperty (User builduser) [ "git clone git://git.kitenet.net/gitannexbuilder " ++ gitbuilderdir , "cd " ++ gitbuilderdir - , "git checkout " ++ buildarch + , "git checkout " ++ buildarch ++ fromMaybe "" flavor ] `describe` "gitbuilder setup" builddircloned = check (not <$> doesDirectoryExist builddir) $ userScriptProperty (User builduser) @@ -97,29 +97,31 @@ cabalDeps = flagFile go cabalupdated go = userScriptProperty (User builduser) ["cabal update && cabal install git-annex --only-dependencies || true"] cabalupdated = homedir </> ".cabal" </> "packages" </> "hackage.haskell.org" </> "00-index.cache" -autoBuilderContainer :: (System -> Property HasInfo) -> System -> Times -> TimeOut -> Systemd.Container -autoBuilderContainer mkprop osver@(System _ arch) crontime timeout = +autoBuilderContainer :: (System -> Flavor -> Property HasInfo) -> System -> Flavor -> Times -> TimeOut -> Systemd.Container +autoBuilderContainer mkprop osver@(System _ arch) flavor crontime timeout = Systemd.container name bootstrap - & mkprop osver + & mkprop osver flavor & buildDepsApt & autobuilder arch crontime timeout where - name = arch ++ "-git-annex-builder" + name = arch ++ fromMaybe "" flavor ++ "-git-annex-builder" bootstrap = Chroot.debootstrapped osver mempty -standardAutoBuilder :: System -> Property HasInfo -standardAutoBuilder osver@(System _ arch) = +type Flavor = Maybe String + +standardAutoBuilder :: System -> Flavor -> Property HasInfo +standardAutoBuilder osver@(System _ arch) flavor = propertyList "standard git-annex autobuilder" $ props & os osver & Apt.stdSourcesList & Apt.unattendedUpgrades & User.accountFor (User builduser) - & tree arch + & tree arch flavor -armAutoBuilder :: System -> Property HasInfo -armAutoBuilder osver = +armAutoBuilder :: System -> Flavor -> Property HasInfo +armAutoBuilder osver flavor = propertyList "arm git-annex autobuilder" $ props - & standardAutoBuilder osver + & standardAutoBuilder osver flavor & buildDepsNoHaskellLibs -- Works around ghc crash with parallel builds on arm. & (homedir </> ".cabal" </> "config") @@ -130,7 +132,7 @@ armAutoBuilder osver = androidAutoBuilderContainer :: Times -> TimeOut -> Systemd.Container androidAutoBuilderContainer crontimes timeout = - androidContainer "android-git-annex-builder" (tree "android") builddir + androidContainer "android-git-annex-builder" (tree "android" Nothing) builddir & Apt.unattendedUpgrades & buildDepsNoHaskellLibs & autobuilder "android" crontimes timeout |
