summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSean Whitton2016-06-19 19:16:14 +0900
committerSean Whitton2016-06-19 19:16:14 +0900
commit1db615375455598fb0fbe2b7db5c658769dad3b3 (patch)
tree95275033ad062536c0d637d27e2ea732976c2084 /src
parent45ad7a24d219794a093ccea8ed7914889d86183d (diff)
when on Jessie, work around #792100
Diffstat (limited to 'src')
-rw-r--r--src/Propellor/Property/Sbuild.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Propellor/Property/Sbuild.hs b/src/Propellor/Property/Sbuild.hs
index 0ef85dcf..7c98782a 100644
--- a/src/Propellor/Property/Sbuild.hs
+++ b/src/Propellor/Property/Sbuild.hs
@@ -326,12 +326,22 @@ usableBy u = User.hasGroup u (Group "sbuild") `requires` installed
keypairGenerated :: Property DebianLike
keypairGenerated = check (not <$> doesFileExist secKeyFile) $ go
`requires` installed
+ `requires` workAround792100
where
go :: Property DebianLike
go = tightenTargets $
cmdProperty "sbuild-update" ["--keygen"]
`assume` MadeChange
+ -- work around Debian bug #792100 which is present in Jessie
+ workAround792100 :: Property UnixLike
+ workAround792100 = property' "work around #792100" $ \w -> do
+ maybeOS <- getOS
+ case maybeOS of
+ Just (System (Debian _ (Stable "jessie")) _) ->
+ ensureProperty w $ File.dirExists "/root/.gnupg"
+ _ -> return NoChange
+
secKeyFile :: FilePath
secKeyFile = "/var/lib/sbuild/apt-keys/sbuild-key.sec"