From 1f62b0d3a3d247f16f875f02e5bc89c7b7dc9ace Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 23 Oct 2015 14:18:19 -0400 Subject: Changed how the operating system is provided to Chroot (API change). * Where before debootstrapped and bootstrapped took a System parameter, the os property should now be added to the Chroot. * Follow-on change to Systemd.container, which now takes a System parameter. Two motivations for this change: 1. When using ChrootTarball, there may be no particular System that makes sense for the contents of the tarball, so don't force the user to specify one. 2. When creating a chroot for a disk image with the same properties as an existing Host, using hostProperties host to get them, this allows inheriting the os property from the host, and doesn't require it to be redundantly passed to Chroot.debootstrapped. --- config-joey.hs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'config-joey.hs') diff --git a/config-joey.hs b/config-joey.hs index fce4f7a1..8d6c9f33 100644 --- a/config-joey.hs +++ b/config-joey.hs @@ -88,7 +88,8 @@ darkstar = host "darkstar.kitenet.net" , swapPartition (MegaBytes 256) ] where - c d = Chroot.debootstrapped (System (Debian Unstable) "amd64") mempty d + c d = Chroot.debootstrapped mempty d + & os (System (Debian Unstable) "amd64") & Apt.installed ["linux-image-amd64"] & User "root" `User.hasInsecurePassword` "root" @@ -494,14 +495,13 @@ standardSystemUnhardened hn suite arch motd = host hn -- This is my standard container setup, Featuring automatic upgrades. standardContainer :: Systemd.MachineName -> DebianSuite -> Architecture -> Systemd.Container -standardContainer name suite arch = Systemd.container name chroot - & os system - & Apt.stdSourcesList `onChange` Apt.upgrade - & Apt.unattendedUpgrades - & Apt.cacheCleaned +standardContainer name suite arch = + Systemd.container name system (Chroot.debootstrapped mempty) + & Apt.stdSourcesList `onChange` Apt.upgrade + & Apt.unattendedUpgrades + & Apt.cacheCleaned where system = System (Debian suite) arch - chroot = Chroot.debootstrapped system mempty standardStableContainer :: Systemd.MachineName -> Systemd.Container standardStableContainer name = standardContainer name (Stable "jessie") "amd64" -- cgit v1.2.3