summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton2019-03-29 16:27:14 -0700
committerJoey Hess2019-04-01 11:35:05 -0400
commit5e793353bfffead43e540ff8a9a2636b5bf15fad (patch)
treecf3fdbd177f1997082362037b0fa764dd1a95d79
parent5c95642844f75183b23c4f6db5557e5585e945b5 (diff)
sbuild: break Apt.stdSourcesList out of Sbuilt.built
Apt.stdSourcesList supports only Debian, so having it inside Sbuilt.built was blocking using Sbuild.built with non-Debian schroots. Note that we cannot break out the installation of eatmydata and ccache, because Sbuild.built assumes that those are available in the schroot config files that it writes out. This is a minimal fix. If it becomes clear that there are properties which would be wanted in every Buntish schroot, say, we might replace Sbuild.osDebianStandard with an Sbuild.standard property which uses pickOS to install the right set of properties. Reported-by: David Bremner <david@tethera.net> Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r--src/Propellor/Property/Sbuild.hs11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/Propellor/Property/Sbuild.hs b/src/Propellor/Property/Sbuild.hs
index 8cc2e3be..fbd3da7a 100644
--- a/src/Propellor/Property/Sbuild.hs
+++ b/src/Propellor/Property/Sbuild.hs
@@ -29,6 +29,7 @@ Suggested usage in @config.hs@:
> where
> sidSchrootBuilt = Sbuild.built Sbuild.UseCcache $ props
> & osDebian Unstable X86_32
+> & Sbuild.osDebianStandard
> & Sbuild.update `period` Weekly (Just 1)
> & Sbuild.useHostProxy mybox
@@ -65,6 +66,7 @@ module Propellor.Property.Sbuild (
-- * Properties for use inside sbuild schroots
update,
useHostProxy,
+ osDebianStandard,
-- * Global sbuild configuration
-- blockNetwork,
keypairGenerated,
@@ -222,8 +224,7 @@ built' cc (Props ps) suite arch = provisioned <!> deleted
schroot = Chroot.debootstrapped Debootstrap.BuilddD
schrootRoot (Props schrootProps)
schrootProps =
- ps ++ [toChildProperty Apt.stdSourcesList
- , toChildProperty $ Apt.installed ["eatmydata", "ccache"]]
+ ps ++ [toChildProperty $ Apt.installed ["eatmydata", "ccache"]]
-- static values
suiteArch = suite ++ "-" ++ arch
@@ -251,6 +252,12 @@ built' cc (Props ps) suite arch = provisioned <!> deleted
where
base = ["eatmydata"]
+-- | Properties that will be wanted in almost any Debian schroot, but not in
+-- schroots for other operating systems.
+osDebianStandard :: Property Debian
+osDebianStandard = propertyList "standard Debian sbuild properties" $ props
+ & Apt.stdSourcesList
+
-- | Ensure that an sbuild schroot's packages and apt indexes are updated
--
-- This replaces use of sbuild-update(1).