summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton2016-08-24 19:52:36 -0700
committerSean Whitton2016-08-25 19:16:50 -0700
commitfecfefa7066ccc0ffd23526363c2ef5478d6ce1a (patch)
treef53d8d0c0cd83809324e3355760e955a972dc206
parentdb6b564455e3b2366762126d760ca7c300526446 (diff)
explain how to customise the sbuild chroot
-rw-r--r--debian/changelog4
-rw-r--r--src/Propellor/Property/Sbuild.hs26
2 files changed, 23 insertions, 7 deletions
diff --git a/debian/changelog b/debian/changelog
index 3b4c2320..990dbe2e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,10 @@ propellor (3.1.2) UNRELEASED; urgency=medium
* Pass --allow-unrelated-histories to git merge when run with git 2.9 or
newer. This fixes the /usr/bin/propellor wrapper with this version of git.
* Update Sbuild.hs haddock for sbuild 0.71.0
+ * Add instructions to Sbuild.hs haddock for customising the chroot
+ with propellor.
+ * Don't add deb-src lines when creating sbuild chroots.
+ Speeds up updating the chroot with sbuild-update.
-- Joey Hess <id@joeyh.name> Sun, 24 Jul 2016 13:34:37 -0400
diff --git a/src/Propellor/Property/Sbuild.hs b/src/Propellor/Property/Sbuild.hs
index ffc3218a..42eba357 100644
--- a/src/Propellor/Property/Sbuild.hs
+++ b/src/Propellor/Property/Sbuild.hs
@@ -31,15 +31,27 @@ In @~/.sbuildrc@:
> $autopkgtest_root_args = "";
> $autopkgtest_opts = ["--", "schroot", "%r-%a-sbuild"];
-We use @sbuild-createchroot(1)@ to create a chroot to the specification of
-@sbuild-setup(7)@. This differs from the approach taken by picca's Sbuild.hs,
-which uses 'Propellor.Property.Debootstrap' to construct the chroot. This is
-because we don't want to run propellor inside the chroot in order to keep the
-sbuild environment as standard as possible.
+We use @sbuild-createchroot(1)@ to create a chroot to the
+specification of @sbuild-setup(7)@. This avoids running propellor
+inside the chroot to set it up. While that approach is flexible, a
+propellor spin pulls in a lot of dependencies. This could defeat
+using sbuild to determine if you've included all necessary build
+dependencies in your source package control file.
+
+Nevertheless, the chroot that @sbuild-createchroot(1)@ creates might
+not meet your needs. For example, you might need to enable an apt
+cacher. In that case you can do something like this in @config.hs@:
+
+> & Sbuild.built (System (Debian Unstable) X86_32) `before` mySetup
+> where
+> mySetup = Chroot.provisioned myChroot
+> myChroot = Chroot.debootstrapped
+> Debootstrap.BuilddD "/srv/chroot/unstable-i386"
+> -- the extra configuration you need:
+> & Apt.installed ["apt-transport-https"]
-}
--- If you wanted to do it with Propellor.Property.Debootstrap, note that
--- sbuild-createchroot has a --setup-only option
+-- Also see the --setup-only option of sbuild-creatchroot
module Propellor.Property.Sbuild (
-- * Creating and updating sbuild schroots