From 442dbe23119e585e2d38456a87e46b265ba3acb6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 1 Jun 2014 02:53:42 -0400 Subject: propellor spin --- src/Propellor/Property/Apt.hs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/Propellor/Property/Apt.hs') diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index d3f47a80..69144d72 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -254,3 +254,9 @@ trustsKey k = RevertableProperty trust untrust hPutStr h (pubkey k) hClose h nukeFile $ f ++ "~" -- gpg dropping + +-- | Cleans apt's cache of downloaded packages to avoid using up disk +-- space. +cacheCleaned :: Property +cacheCleaned = cmdProperty "apt-get" ["clean"] + `describe` "apt cache cleaned" -- cgit v1.3-2-g0d8e From 6dd22d3f26c348ca15bc37113686ba3e22292454 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 5 Jun 2014 16:39:35 -0400 Subject: propellor spin --- src/Propellor/Property/Apt.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/Propellor/Property/Apt.hs') diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index 69144d72..f5dd74b5 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -214,7 +214,12 @@ unattendedUpgrades = RevertableProperty enable disable "/etc/apt/apt.conf.d/50unattended-upgrades" `File.containsLine` ("Unattended-Upgrade::Origins-Pattern { \"o=Debian,a="++showSuite suite++"\"; };") - _ -> noChange + | otherwise -> do + liftIO $ print ("xxx ", suite) + noChange + _ -> do + liftIO $ print "xxx" + noChange -- | Preseeds debconf values and reconfigures the package so it takes -- effect. -- cgit v1.3-2-g0d8e From dbffd982bac47cebd3fc67e51b46182f7e43392d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 5 Jun 2014 16:52:41 -0400 Subject: fix os attribute --- src/Propellor/Property/Apt.hs | 7 +------ src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs | 4 ++++ 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'src/Propellor/Property/Apt.hs') diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index f5dd74b5..69144d72 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -214,12 +214,7 @@ unattendedUpgrades = RevertableProperty enable disable "/etc/apt/apt.conf.d/50unattended-upgrades" `File.containsLine` ("Unattended-Upgrade::Origins-Pattern { \"o=Debian,a="++showSuite suite++"\"; };") - | otherwise -> do - liftIO $ print ("xxx ", suite) - noChange - _ -> do - liftIO $ print "xxx" - noChange + _ -> noChange -- | Preseeds debconf values and reconfigures the package so it takes -- effect. diff --git a/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs b/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs index 2f467669..6e4ca81a 100644 --- a/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs +++ b/src/Propellor/Property/SiteSpecific/GitAnnexBuilder.hs @@ -99,6 +99,7 @@ cabalDeps = flagFile go cabalupdated standardAutoBuilderContainer :: (System -> Docker.Image) -> Architecture -> Int -> TimeOut -> Host standardAutoBuilderContainer dockerImage arch buildminute timeout = Docker.container (arch ++ "-git-annex-builder") (dockerImage $ System (Debian Unstable) arch) + & os (System (Debian Unstable) arch) & Apt.stdSourcesList Unstable & Apt.installed ["systemd"] & Apt.unattendedUpgrades @@ -116,6 +117,7 @@ androidAutoBuilderContainer dockerImage crontimes timeout = androidContainer :: (System -> Docker.Image) -> Docker.ContainerName -> Property -> FilePath -> Host androidContainer dockerImage name setupgitannexdir gitannexdir = Docker.container name (dockerImage $ System (Debian Stable) "i386") + & os (System (Debian Stable) "i386") & Apt.stdSourcesList Stable & Apt.installed ["systemd"] & User.accountFor builduser @@ -142,6 +144,7 @@ androidContainer dockerImage name setupgitannexdir gitannexdir = Docker.containe armelCompanionContainer :: (System -> Docker.Image) -> Host armelCompanionContainer dockerImage = Docker.container "armel-git-annex-builder-companion" (dockerImage $ System (Debian Unstable) "amd64") + & os (System (Debian Unstable) "amd64") & Apt.stdSourcesList Unstable & Apt.installed ["systemd"] & Apt.unattendedUpgrades @@ -159,6 +162,7 @@ armelCompanionContainer dockerImage = Docker.container "armel-git-annex-builder- armelAutoBuilderContainer :: (System -> Docker.Image) -> Cron.CronTimes -> TimeOut -> Host armelAutoBuilderContainer dockerImage crontimes timeout = Docker.container "armel-git-annex-builder" (dockerImage $ System (Debian Unstable) "armel") + & os (System (Debian Unstable) "armel") & Apt.stdSourcesList Unstable & Apt.unattendedUpgrades & Apt.installed ["systemd"] -- cgit v1.3-2-g0d8e