summaryrefslogtreecommitdiff
path: root/src/Propellor/Types/Info.hs
AgeCommit message (Collapse)Author
2018-04-30fix broken SemigroupMonoid transition <<loop>>Joey Hess
Turns out that with ghc 8.2.2, the instructions given on the page don't work. And the cppless variant that I had compiles, but into effectively mappend = mappend so it loops. The only way I can see to make it work without cpp is to use mappend = (Sem.<>) which is ugly and a land mine waiting to explode if someone changes it to a nicer mappend = (<>) with a newer version of ghc which will compile it and work ok, while breaking it with 8.2.2. Sigh. I posted to haskell-cafe about this.
2018-04-23semigroup monoid change fallout; drop ghc 7 supportJoey Hess
Fix build with ghc 8.4, which broke due to the Semigroup Monoid change. See https://prime.haskell.org/wiki/Libraries/Proposals/SemigroupMonoid Dropped support for building propellor with ghc 7 (as in debian oldstable), to avoid needing to depend on the semigroups transitional package, but also because it's just too old to be worth supporting. If we indeed drop ghc 7 support entirely, some code to support "jessie" can be removed; concurrent-output can be de-embedded, and the Singletons code can be simplified. This commit was sponsored by Jack Hill on Patreon.
2017-10-25Make addInfo accumulate Info in order properties appear, not reverse orderJoey Hess
This fixes a bug involving reverting Systemd.resolvConfed or Systemd.linkJournal. addInfo was prepending to the list for efficiency. But, that was in conflict with mappend of two Info, which appended the second to the first. In the case where Systemd.resolvConfed was added reverted, to override the one added by default, that led to a list of info that had first the reversion and then the default, so the default won. Which was wrong. So, make addInfo accumulate in the same order mappend combines things, even though it's a little less efficient. The efficiency probably does not matter; there is not typically a whole lot of info. There's some risk this change has unexpected consequences, if something relied on the old addInfo order without using fromInfo to access to info. But if so, that something would have been broken before when two Info properties were combined. With this change, it would just be broken the other way around. This commit was sponsored by Jochen Bartl on Patreon.
2017-10-04improve commentJoey Hess
2017-07-27Propellor.Types.Info: add missing import for 'cast'Sergei Trofimovich
The change fixes the following build failure on ghc-8.2.1: [ 6 of 160] Compiling Propellor.Types.Info ( src/Propellor/Types/Info.hs, dist/dist-sandbox-2ceaa3c0/build/Propellor/Types/Info.o ) src/Propellor/Types/Info.hs:38:34: error: • Variable not in scope: cast :: v1 -> Maybe v • Perhaps you meant one of these: data constructor ‘Last’ (imported from Data.Monoid), ‘last’ (imported from Prelude) | 38 | extractInfoEntry (InfoEntry v) = cast v | ^^^^ Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2017-03-11don't propagate DNS info from DiskImage chrootsJoey Hess
* DiskImage building properties used to propagate DNS info out from the chroot used to build the disk image to the Host. That is no longer done, since that chroot only exists as a side effect of the disk image creation and servers will not be running in it. * The IsInfo types class's propagateInfo function changed to use a PropagateInfo data type. (API change) This is particularly important when using hostChroot, since the host could well have DNS settings then. This commit was sponsored by Ole-Morten Duesund on Patreon.
2016-03-27improve haddocks and move code around to make them more clearJoey Hess
2016-03-26ported propagateContainerJoey Hess
Renamed several utility functions along the way.
2016-03-24refactorJoey Hess
2015-12-19Clean build with ghc 7.10.Joey Hess
Import Prelude after modules that cause warnings due to AMP change
2015-10-19simplify using type safe castJoey Hess
2015-10-19improve Info type using GADT, at nomeata's suggestionJoey Hess
This makes Show Info work, and simplifies the implementation.
2015-10-18fix typo: propigate → propagateFelix Gruber
2015-10-17newtype info allows deriving monoidJoey Hess
2015-09-30change HostContext for containersJoey Hess
Privdata that uses HostContext inside a container will now have the name of the container as its context, rather than the name of the host(s) where the container is used. This allows eg, having different passwords for a user in different containers. Note that previously, propellor would prompt using the container name as the context, but not actually use privdata using that context; so this is a bug fix. I don't entirely like the implementation; I had to put the code to change the context in PropAccum, and it's not generalized past PrivInfo.
2015-09-08better Show for InfoJoey Hess
2015-09-06Added Propellor.Property.Rsync. WIP; untestedJoey Hess
Convert Info to use Data.Dynamic, so properties can export and consume info of any type that is Typeable and a Monoid, including data types private to a module. (API change) Thanks to Joachim Breitner for the idea.
2014-11-20fix docker container provisioningJoey Hess
Since the containers are no longer on the host list, they were not found while provisioning, oops. To fix, had to add to a host's info a map of the containers docked to it. Unfortunately, that required Propellor.Types.Info be glommed into Propellor.Types, since it needed to refer to Host.
2014-11-19separate docker container typeJoey Hess
Docker containers are now a separate data type, cannot be included in the main host list, and are instead passed to Docker.docked. (API change)
2014-07-23propellor spinJoey Hess
2014-07-06propellor spinJoey Hess
2014-06-09Attr is renamed to Info.Joey Hess