summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/DiskImage.hs
AgeCommit message (Collapse)Author
2016-03-28type safe targets for propertiesJoey Hess
* Property types have been improved to indicate what systems they target. This prevents using eg, Property FreeBSD on a Debian system. Transition guide for this sweeping API change: - Change "host name & foo & bar" to "host name $ props & foo & bar" - Similarly, `propertyList` and `combineProperties` need `props` to be used to combine together properties; they no longer accept lists of properties. (If you have such a list, use `toProps`.) - And similarly, Chroot, Docker, and Systemd container need `props` to be used to combine together the properies used inside them. - The `os` property is removed. Instead use `osDebian`, `osBuntish`, or `osFreeBSD`. These tell the type checker the target OS of a host. - Change "Property NoInfo" to "Property UnixLike" - Change "Property HasInfo" to "Property (HasInfo + UnixLike)" - Change "RevertableProperty NoInfo" to "RevertableProperty UnixLike UnixLike" - Change "RevertableProperty HasInfo" to "RevertableProperty (HasInfo + UnixLike) UnixLike" - GHC needs {-# LANGUAGE TypeOperators #-} to use these fancy types. This is enabled by default for all modules in propellor.cabal. But if you are using propellor as a library, you may need to enable it manually. - If you know a property only works on a particular OS, like Debian or FreeBSD, use that instead of "UnixLike". For example: "Property Debian" - It's also possible make a property support a set of OS's, for example: "Property (Debian + FreeBSD)" - Removed `infoProperty` and `simpleProperty` constructors, instead use `property` to construct a Property. - Due to the polymorphic type returned by `property`, additional type signatures tend to be needed when using it. For example, this will fail to type check, because the type checker cannot guess what type you intend the intermediate property "go" to have: foo :: Property UnixLike foo = go `requires` bar where go = property "foo" (return NoChange) To fix, specify the type of go: go :: Property UnixLike - `ensureProperty` now needs to be passed a witness to the type of the property it's used in. change this: foo = property desc $ ... ensureProperty bar to this: foo = property' desc $ \w -> ... ensureProperty w bar - General purpose properties like cmdProperty have type "Property UnixLike". When using that to run a command only available on Debian, you can tighten the type to only the OS that your more specific property works on. For example: upgraded :: Property Debian upgraded = tightenTargets (cmdProperty "apt-get" ["upgrade"]) - Several utility functions have been renamed: getInfo to fromInfo propertyInfo to getInfo propertyDesc to getDesc propertyChildren to getChildren * The new `pickOS` property combinator can be used to combine different properties, supporting different OS's, into one Property that chooses which to use based on the Host's OS. * Re-enabled -O0 in propellor.cabal to reign in ghc's memory use handling these complex new types. * Added dependency on concurrent-output; removed embedded copy.
2015-12-06allow using `check` on a UncheckedProperty, which yields a PropertyJoey Hess
2015-12-05UncheckedProperty for cmdProperty et alJoey Hess
* Properties that run an arbitrary command, such as cmdProperty and scriptProperty are converted to use UncheckedProperty, since they cannot tell on their own if the command truely made a change or not. (API Change) Transition guide: - When GHC complains about an UncheckedProperty, add: `assume` MadeChange - Since these properties used to always return MadeChange, that change is always safe to make. - Or, if you know that the command should modifiy a file, use: `changesFile` filename * A few properties have had their Result improved, for example Apt.buldDep and Apt.autoRemove now check if a change was made or not.
2015-11-24haddock improvementsJoey Hess
2015-11-17DiskImage creation automatically uses Chroot.noServices.Joey Hess
2015-10-27Explicit Info/NoInfo for RevertableProperty (API change)Joey Hess
RevertableProperty used to be assumed to contain info, but this is now made explicit, with RevertableProperty HasInfo or RevertableProperty NoInfo. Transition guide: - If you define a RevertableProperty, expect some type check failures like: "Expecting one more argument to ‘RevertableProperty’". - Change it to "RevertableProperty NoInfo" - The compiler will then tell you if it needs "HasInfo" instead. - If you have code that uses the RevertableProperty constructor that fails to type check, use the more powerful <!> operator
2015-10-23allow specifying filesystem mount optionsJoey Hess
2015-10-23refactorJoey Hess
2015-10-23propellor spinJoey Hess
2015-10-23propellor spinJoey Hess
2015-10-23propellor spinJoey Hess
2015-10-23propellor spinJoey Hess
2015-10-23propellor spinJoey Hess
2015-10-23propellor spinJoey Hess
2015-10-23propellor spinJoey Hess
2015-10-23propellor spinJoey Hess
2015-10-23propellor spinJoey Hess
2015-10-23propellor spinJoey Hess
2015-10-23propellor spinJoey Hess
2015-10-23Added Mount.fstabbed property to generate /etc/fstab to replicate current ↵Joey Hess
mounts.
2015-10-22propellor spinJoey Hess
2015-10-22propellor spinJoey Hess
2015-10-22propellor spinJoey Hess
2015-10-22disk image finalization may workJoey Hess
2015-10-22propellor spinJoey Hess
2015-10-22avoid grub install failure in chrootJoey Hess
2015-10-10propellor spinJoey Hess
2015-09-13Follow some hlint suggestions.Mario Lang
2015-09-11todoJoey Hess
2015-09-04propellor spinJoey Hess
2015-09-04update docsJoey Hess
2015-09-04fudge factor for partition sizesJoey Hess
2015-09-04propellor spinJoey Hess
2015-09-04wipJoey Hess
2015-09-03propellor spinJoey Hess
2015-09-03improve formatJoey Hess
2015-09-03reorderJoey Hess
2015-09-03improve types for PartSpec DSLJoey Hess
2015-09-03partition setup dslJoey Hess
2015-09-02improve exportsJoey Hess
2015-09-02refactorJoey Hess
2015-09-02propellor spinJoey Hess
2015-09-02propellor spinJoey Hess
2015-09-02propellor spinJoey Hess
2015-09-02propellor spinJoey Hess
2015-09-02cleanupJoey Hess
2015-09-02haddockJoey Hess
2015-09-02import unqualifiedJoey Hess
2015-09-02renameJoey Hess
2015-09-02todosJoey Hess