From 1db615375455598fb0fbe2b7db5c658769dad3b3 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 19 Jun 2016 19:16:14 +0900 Subject: when on Jessie, work around #792100 --- src/Propellor/Property/Sbuild.hs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/Propellor/Property/Sbuild.hs') 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" -- cgit v1.2.3