summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog6
-rw-r--r--doc/news/version_3.4.0.mdwn14
-rw-r--r--doc/news/version_4.5.2.mdwn5
-rw-r--r--joeyconfig.hs1
-rw-r--r--propellor.cabal2
-rw-r--r--src/Propellor/Property/DiskImage.hs9
6 files changed, 16 insertions, 21 deletions
diff --git a/debian/changelog b/debian/changelog
index ca9e40e9..948a44b4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,10 @@
-propellor (4.5.2) UNRELEASED; urgency=medium
+propellor (4.5.2) unstable; urgency=medium
* Added Rsync.installed property.
- * Added DiskImage.vmdkBuilt property which is useful for booting
+ * Added DiskImage.vmdkBuiltFor property which is useful for booting
a disk image in VirtualBox.
- -- Joey Hess <id@joeyh.name> Tue, 25 Jul 2017 17:08:52 -0400
+ -- Joey Hess <id@joeyh.name> Tue, 25 Jul 2017 17:58:46 -0400
propellor (4.5.1) unstable; urgency=medium
diff --git a/doc/news/version_3.4.0.mdwn b/doc/news/version_3.4.0.mdwn
deleted file mode 100644
index d38716e1..00000000
--- a/doc/news/version_3.4.0.mdwn
+++ /dev/null
@@ -1,14 +0,0 @@
-propellor 3.4.0 released with [[!toggle text="these changes"]]
-[[!toggleable text="""
- * Added ConfigurableValue type class, for values that can be used in a
- config file, or to otherwise configure a program.
- * The val function converts such values to String.
- * Removed fromPort and fromIPAddr (use val instead). (API change)
- * Removed several Show instances that were only used for generating
- configuration, replacing with ConfigurableValue instances. (API change)
- * The github mirror of propellor's git repository has been removed,
- since github's terms of service has started imposing unwanted licensing
- requirements.
- * propellor --init: The option to clone propellor's git repository
- used to use the github mirror, and has been changed to use a different
- mirror."""]] \ No newline at end of file
diff --git a/doc/news/version_4.5.2.mdwn b/doc/news/version_4.5.2.mdwn
new file mode 100644
index 00000000..f7268048
--- /dev/null
+++ b/doc/news/version_4.5.2.mdwn
@@ -0,0 +1,5 @@
+propellor 4.5.2 released with [[!toggle text="these changes"]]
+[[!toggleable text="""
+ * Added Rsync.installed property.
+ * Added DiskImage.vmdkBuiltFor property which is useful for booting
+ a disk image in VirtualBox."""]] \ No newline at end of file
diff --git a/joeyconfig.hs b/joeyconfig.hs
index a6d913ef..35b5363c 100644
--- a/joeyconfig.hs
+++ b/joeyconfig.hs
@@ -99,6 +99,7 @@ darkstar = host "darkstar.kitenet.net" $ props
, partition EXT4 `mountedAt` "/"
, swapPartition (MegaBytes 256)
]
+ `before` vmdkBuiltFor "/srv/test.img"
where
mychroot d = debootstrapped mempty d $ props
& osDebian Unstable X86_64
diff --git a/propellor.cabal b/propellor.cabal
index 79451c45..170aed7e 100644
--- a/propellor.cabal
+++ b/propellor.cabal
@@ -1,5 +1,5 @@
Name: propellor
-Version: 4.5.1
+Version: 4.5.2
Cabal-Version: >= 1.20
License: BSD2
Maintainer: Joey Hess <id@joeyh.name>
diff --git a/src/Propellor/Property/DiskImage.hs b/src/Propellor/Property/DiskImage.hs
index dd42265d..55ccad76 100644
--- a/src/Propellor/Property/DiskImage.hs
+++ b/src/Propellor/Property/DiskImage.hs
@@ -13,7 +13,7 @@ module Propellor.Property.DiskImage (
imageRebuilt,
imageBuiltFrom,
imageExists,
- vmdkBuilt,
+ vmdkBuiltFor,
Grub.BIOS(..),
) where
@@ -34,6 +34,7 @@ import Propellor.Types.Info
import Propellor.Types.Bootloader
import Propellor.Container
import Utility.Path
+import Utility.FileMode
import Data.List (isPrefixOf, isInfixOf, sortBy, unzip4)
import Data.Function (on)
@@ -412,8 +413,8 @@ toSysDir chrootdir d = case makeRelative chrootdir d of
sysdir -> "/" ++ sysdir
-- | Builds a VirtualBox .vmdk file for the specified disk image file.
-vmdkBuilt :: FilePath -> RevertableProperty DebianLike UnixLike
-vmdkBuilt diskimage = (setup <!> cleanup)
+vmdkBuiltFor :: FilePath -> RevertableProperty DebianLike UnixLike
+vmdkBuiltFor diskimage = (setup <!> cleanup)
`describe` (vmdkfile ++ " built")
where
vmdkfile = diskimage ++ ".vmdk"
@@ -423,5 +424,7 @@ vmdkBuilt diskimage = (setup <!> cleanup)
, "-rawdisk", diskimage
]
`changesFile` vmdkfile
+ `onChange` File.mode vmdkfile (combineModes (ownerWriteMode : readModes))
`requires` Apt.installed ["virtualbox"]
+ `requires` File.notPresent vmdkfile
cleanup = File.notPresent vmdkfile