From e3303afafde6a591229194c5609e16c299cfe19e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 23 Sep 2015 12:23:40 -0400 Subject: add "ancient" git-annex autobuilder using debian stable i386 --- config-joey.hs | 9 ++++--- .../Property/SiteSpecific/GitAnnexBuilder.hs | 28 ++++++++++++---------- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/config-joey.hs b/config-joey.hs index 65cf0d46..56bb17f8 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 "wheezy")) "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..3449dc69 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" 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 -- cgit v1.2.3 -- cgit v1.2.3 From 66c3fca11cbf126ad38f20836d428a43c97627e7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 23 Sep 2015 12:27:21 -0400 Subject: propellor spin --- src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs b/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs index 3449dc69..f2a2f012 100644 --- a/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs +++ b/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs @@ -104,7 +104,7 @@ autoBuilderContainer mkprop osver@(System _ arch) flavor crontime timeout = & buildDepsApt & autobuilder arch crontime timeout where - name = arch ++ "-git-annex-builder" + name = arch ++ fromMaybe "" flavor ++ "-git-annex-builder" bootstrap = Chroot.debootstrapped osver mempty type Flavor = Maybe String -- cgit v1.2.3 From 1e016d9eac1470b98ceff10a979bf813ce74cac2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 23 Sep 2015 12:29:50 -0400 Subject: propellor spin --- config-joey.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config-joey.hs b/config-joey.hs index 56bb17f8..a8eb1347 100644 --- a/config-joey.hs +++ b/config-joey.hs @@ -150,7 +150,7 @@ orca = standardSystem "orca.kitenet.net" Unstable "amd64" (System (Debian Unstable) "i386") Nothing fifteenpast "2h") & Systemd.nspawned (GitAnnexBuilder.autoBuilderContainer GitAnnexBuilder.standardAutoBuilder - (System (Debian (Stable "wheezy")) "i386") (Just "ancient") fifteenpast "2h") + (System (Debian (Stable "jessie")) "i386") (Just "ancient") fifteenpast "2h") & Systemd.nspawned (GitAnnexBuilder.androidAutoBuilderContainer (Cron.Times "1 1 * * *") "3h") where -- cgit v1.2.3 -- cgit v1.2.3