summaryrefslogtreecommitdiff
path: root/debian
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.
2016-03-25changelogJoey Hess
2016-03-25Avoid generating excessively long paths to the unix socket file used for ssh ↵Joey Hess
connection caching. Mostly. Can still generate a too long one if $HOME is longer than 60 bytes.
2016-03-24no longer falsing rulesJoey Hess
2016-03-24prep releaseJoey Hess
2016-03-18Tor.named: Fix bug that sometimes caused the property to fail the first ↵Joey Hess
time, though retrying succeeded. May have only been a problem on debian stable, the /var/lib/tor/keys/ was not created by installing the package.
2016-03-09Speed up propellor's build of itself, by asking cabal to only build the ↵Joey Hess
propellor-config binary and not all the libraries. This is a super speedup!
2016-03-09reorderJoey Hess
2016-03-07changelogJoey Hess
2016-03-07change joeyconfig back after merging from masterJoey Hess
(cherry picked from commit 7743ef8542b6490c3c42ac826a26aa0b24991f22)
2016-03-07Merge remote-tracking branch 'remotes/misandrist/FreeBSD' into wipJoey Hess
2016-03-07updateJoey Hess
2016-03-07changelogJoey Hess
2016-03-06Force ssh, scp, and git commands to be run in the foreground.Joey Hess
Before, they could run in the background if another process was running, and so their output wouldn't immediately be visible. With this change, the concurrent-output layer is not used for these interactive commands.
2016-03-06Merge branch 'joeyconfig'Joey Hess
2016-03-06Locale.available: Run locale-gen, instead of dpkg-reconfigure locales, which ↵Joey Hess
modified the locale.gen file and sometimes caused the property to need to make changes every time.
2016-03-04Merge branch 'joeyconfig'Joey Hess
2016-03-04changelogJoey Hess
2016-03-02Merge branch 'joeyconfig'Joey Hess
2016-03-02api changeJoey Hess
2016-03-02changelogJoey Hess
2016-03-02avoid repeated rebuilds, more type safelyJoey Hess
buildFirst re-runs propellor with --continue, which is supposed to make defaultMain bypass subsequent calls to buildFirst. But, use of a Bool to do that caused the code to be unclear, and some of the cases lost track of that. --continue SimpleRun would buildFirst, and if the binary changed, would --continue SimpleRun. This could loop repatedly, on systems such as FreeBSD where building re-links the binary even when there are no changes. As discussed in github pull #11 Fixed by introducing a CanRebuild data type, which buildFirst and updateFirst require in order to do any work makes it more clear what's going on. It's not a type-level proof that propellor won't rebuild repeatedly, but gets closer to one. (Only remaining way such a bug could slip in is if the CanRebuild value was reused in a call to buildFirst and also inside the IO action passed to it.) There were some other weirdnesses around repeated builds. In particular, Run as non-root did an updateFirst, followed by a buildFirst. I think this redundant build was an accident, and have removed it.
2016-02-29Merge branch 'joeyconfig'Joey Hess
2016-02-29apt upgrade improvementsJoey Hess
* Apt.upgrade: Run dpkg --configure -a first, to recover from interrupted upgrades. * Apt: Add safeupgrade.
2016-02-27Merge branch 'joeyconfig'Joey Hess
2016-02-27reorderJoey Hess
2016-02-27Merge branch 'joeyconfig'Joey Hess
2016-02-27prep releaseJoey Hess
2016-02-26Merge branch 'joeyconfig'Joey Hess
2016-02-26Removed Ssh.unauthorizedKey and made Ssh.authorizedKey revertable. (API change)Joey Hess
2016-02-26Merge branch 'joeyconfig'Joey Hess
2016-02-26Ssh.authorizedKey: Fix bug preventing it from working when the ↵Joey Hess
authorized_keys file does not yet exist.
2016-02-25FooBuntu -> BuntishJoey Hess
Seems that Canonical have trademarked numerous words ending in "buntu", and would like to trademark anything ending in that to the extent their lawyers can make that happen.
2016-02-25changelogJoey Hess
2016-02-24Merge branch 'joeyconfig'Joey Hess
2016-02-19trademark nonsenseJoey Hess
Removed references to *buntu from code and documentation because of an unfortunate trademark use policy. http://joeyh.name/blog/entry/trademark_nonsense/ That included changing a data constructor to "FooBuntu", an API change.
2016-02-19Obnam: Only let one backup job run at a time when a host has multiple ↵Joey Hess
different backup properties, to avoid concurrent jobs fighting over scarce resources (particularly memory). Other jobs block on a lock file.
2016-02-11Merge branch 'joeyconfig'Joey Hess
2016-02-11prep releaseJoey Hess
2016-02-08Merge branch 'joeyconfig'Joey Hess
2016-02-08Allow using combineProperties and propertyList with lists of RevertableProperty.Joey Hess
2016-02-07Merge branch 'joeyconfig'Joey Hess
2016-02-07letsencryptJoey Hess
* Added Propellor.Property.LetsEncrypt * Apache.httpsVirtualHost: New property, setting up a https vhost with the certificate automatically obtained using letsencrypt.
2016-02-07Delete /etc/apt/apt.conf.d/50unattended-upgrades.ucf-dist when ↵Joey Hess
unattended-upgrades is installed, to work around #812380 which results in many warnings from apt, including in cron mails.
2016-02-06Obnam: To cause old generations to be forgotten, keepParam can be passed to ↵Joey Hess
a backup property; this causes obnam forget to be run.
2016-01-18Merge branch 'joeyconfig'Joey Hess
2016-01-18changelogJoey Hess
2016-01-12Merge branch 'joeyconfig'Joey Hess
2016-01-12prep releaseJoey Hess
2016-01-12changelogJoey Hess