| Age | Commit message (Collapse) | Author |
|
* 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.
|
|
(cherry picked from commit df40046fd65bc07eced41adb73c7e227d2b54cd1)
|
|
(cherry picked from commit c3a23f89092d1ef8367c37ab8993ea7031124f4b)
|
|
(cherry picked from commit 313a94cd87cd0f977310a6eada559dd383f6e9f0)
|
|
(cherry picked from commit 1a485202eeab60d9d677576278480a4109db72fb)
|
|
(cherry picked from commit 4705d6be44d1ce6ff5eb0c7b8bc3a904b6e8d220)
|
|
(cherry picked from commit 864bff7743bd3a77f1bfdb37bdeeea49e31e1f52)
|
|
(cherry picked from commit f16e0e4f632032c70adcb9ba9f108e87a6ae4321)
|
|
(cherry picked from commit 26fd68a9cda543e74492dc71680d10eaa881f351)
|
|
(cherry picked from commit 2214aca8f3ca92b9739b2884cb59274edad9170e)
|
|
(cherry picked from commit c97f1308739aa7877aac2f3c949c4aadf2266775)
|
|
(cherry picked from commit 226bf3e8230037ad2de38760c962033ab6c64d9f)
|
|
(cherry picked from commit 57f7d81f1124fa5c56a593b9d5de6448155a938e)
|
|
(cherry picked from commit 202f9c282ee34897461dc56a79e607244c94cd99)
|
|
(cherry picked from commit ecff879cfeacfbff00649f4a3b9dd19eaefe134f)
|
|
(cherry picked from commit d4653a2c4683ff3eeb4decbb3c61bb9e9cef2c64)
|
|
(cherry picked from commit 34ee25d51b502af8da81c7b0701ac02cf1f43c1e)
|
|
(cherry picked from commit 717e693b2ad0bf39865ef28952f37670e70d8582)
|
|
|
|
These show up in the haddock documentation on the sidebar.
The author emails are not hyperlinked, so hopefully this is not a spam
source.
Keeping track of Maintainers of modules is becoming necessary because I
don't use all these modules and am not the best person to maintain them,
beyond simple changes to keep them building. I'll loop in the Maintainer if
there's a bug etc on their module.
|
|
|
|
|
|
|
|
|
|
Propellor.Property.Cmd, so they are available for use in constricting your own Properties when using propellor as a library.
Several imports of Utility.SafeCommand now redundant.
|
|
* Property has been converted to a GADT, and will be Property NoInfo
or Property HasInfo.
This was done to make sure that ensureProperty is only used on
properties that do not have Info.
Transition guide:
- Change all "Property" to "Property NoInfo" or "Property WithInfo"
(The compiler can tell you if you got it wrong!)
- To construct a RevertableProperty, it is useful to use the new
(<!>) operator
- Constructing a list of properties can be problimatic, since
Property NoInto and Property WithInfo are different types and cannot
appear in the same list. To deal with this, "props" has been added,
and can built up a list of properties of different types,
using the same (&) and (!) operators that are used to build
up a host's properties.
|
|
|
|
(cherry picked from commit 1d02d589c79781cc4b0bd82467edbdf64c40f34d)
|
|
propellor runs as root, and /sbin should always be in root's path
|
|
|
|
|
|
|
|
|
|
|