diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/Property/Sbuild.hs | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/Propellor/Property/Sbuild.hs b/src/Propellor/Property/Sbuild.hs index 48499ca5..f9b766a1 100644 --- a/src/Propellor/Property/Sbuild.hs +++ b/src/Propellor/Property/Sbuild.hs @@ -47,6 +47,8 @@ module Propellor.Property.Sbuild ( updated, updatedFor, -- * Global sbuild configuration + installed, + keypairGenerated, shareAptCache, usableBy, ) where @@ -171,13 +173,20 @@ keypairGenerated = cmdProperty "sbuild-update" ["--keygen"] `assume` MadeChange secKeyFile = "/var/lib/sbuild/apt-keys/sbuild-key.sec" +-- ==== utility function ==== -schrootLoc :: Suite -> Architecture -> FilePath -schrootLoc s a = "/srv/chroot" </> s ++ "-" ++ a - -schrootConfLoc :: Suite -> Architecture -> FilePath -schrootConfLoc s a = "/etc/schroot/chroot.d" </> s ++ "-" ++ a ++ "-sbuild-propellor" +schrootFromSystem :: System -> Maybe SbuildSchroot +schrootFromSystem system@(System _ arch) = + extractSuite system + >>= \suite -> return $ SbuildSchroot suite arch stdMirror :: System -> Apt.Url stdMirror (System (Debian s) _) = "http://httpredir.debian.org/debian" stdMirror (System (Buntish r) _) = "TODO" + +schrootRoot :: SbuildSchroot -> FilePath +schrootRoot (SbuildSchroot s a) = "/srv/chroot" </> s ++ "-" ++ a + +schrootConf :: SbuildSchroot -> FilePath +schrootConf (SbuildSchroot s a) = + "/etc/schroot/chroot.d" </> s ++ "-" ++ a ++ "-sbuild-propellor" |
