summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Tor.hs
AgeCommit message (Collapse)Author
2019-07-02Revert "Revert "custom type error messages""Joey Hess
This reverts commit 665ea0d3d9e1b0e90278fd659dee0ef8642030da.
2019-07-02Revert "custom type error messages"Joey Hess
This reverts commits 14f6ae30809d8bbdb10b91cc59757e865a365df8 de21ef26861db458b0dfb0212cf501f9f8ed459b e20662e6a8881db55394a6366be17ca4e509bc2a Until this bug is resolved, these custom error types hide more basic errors. https://gitlab.haskell.org/ghc/ghc/issues/16894
2019-07-01fix build with ghc 8.0.1Joey Hess
Something in commit 14f6ae30809d8bbdb10b91cc59757e865a365df8 ghc 8.0.1 in a few cases unable to infer types when ensureProperty or tightenTargets is used. Newer versions of ghc, including 8.4.4 were able to infer these types. Perhaps it tries harder, or an inference bug was fixed. Seemed best to work around the problem to keep supporting ghc 8.0.1 and the current Debian stable. Since only 3 uses out of hundreds in propellor were affected, it's pretty unlikely it will affect user's properties, but I mentioned in in the changelog anyway. Hopefully a new Debian release will soon mean I no longer need to support 8.0.1, but the code changes also generally made it clearer and easier to read. And, I made custom type errors suggesting adding annotations to help any user who does encounter it. (Included in commit de21ef26861db458b0dfb0212cf501f9f8ed459b; may also help with other cases than an old ghc.)
2019-04-01Added Utility.FileMode to the modules exported by Propellor.UtilitiesJoey Hess
Since File.mode uses FileMode, it seems it ought to be exported by propellor somewhere. I don't want to make propellor Property modules themselves export core data types though, so this is a compromise of dubious utility.
2017-03-19Merge branch 'joeyconfig'Joey Hess
2017-03-19switch to kite4Joey Hess
lost kite2 ed25519 key
2017-03-19Tor.named, Tor.torPrivKey: Include the new ed25519 public/private key pair ↵Joey Hess
in addition to the old secret_id_key.
2017-03-18Tor: Restart daemon after installing private key.Joey Hess
2017-02-26use ConfigurableValue where applicableJoey Hess
* Removed fromPort (use val instead). (API change) * Removed several Show instances that were only used for generating configuration, replacing with ConfigurableValue instances. (API change) It's somewhat annoying that IsInfo requires a Show instance. That's needed to be able to display Info in ghci, but some non-derived Show instances had to be kept to support that.
2017-02-20Tor bugfix: use fromPort instead of showFélix Sipma
2017-01-30fix type error: hiddenService -> hiddenService'Sean Whitton
2017-01-18Tor: enable multiple ports hidden services with ↵Félix Sipma
hiddenService'/hiddenServiceAvailable'
2016-09-15propellor spinJoey Hess
2016-09-15avoid using a warning to display hidden service hostnameJoey Hess
2016-09-01Tor.hiddenServiceAvailable: The hidden service hostname file may not be ↵Joey Hess
available immedaitely after configuring tor; avoid ugly error in this case.
2016-09-01propellor spinJoey Hess
2016-09-01Tor.hiddenService: Converted port parameter from Int to Port. (API change)Joey Hess
2016-03-26more portedJoey Hess
2016-03-18propellor spinJoey 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.
2015-10-10propellor spinJoey Hess
2015-09-14clean up privdata excess/lacking newline issueJoey Hess
* PrivData converted to newtype (API change). * Stopped stripping trailing newlines when setting PrivData; this was previously done to avoid mistakes when pasting eg passwords with an unwanted newline. Instead, PrivData consumers should use either privDataLines or privDataVal, to extract respectively lines or a value (without internal newlines) from PrivData.
2015-08-25use ConfFile.ajustSection to define Tor.hiddenServiceFélix Sipma
It should be possible to have multiple hidden services with this. Signed-off-by: Félix Sipma <felix.sipma@no-log.org>
2015-07-31Propellor.Property.Tor: remove duplicate codeFélix Sipma
Signed-off-by: Félix Sipma <felix.sipma@no-log.org>
2015-04-22API change: Added User and Group newtypes, and Properties that used to use ↵Joey Hess
the type UserName = String were changed to use them. Note that UserName is kept and PrivData still uses it in its sum type. This is to avoid breaking PrivData serialization.
2015-02-27propellor spinJoey Hess
2015-02-27propellor spinJoey Hess
2015-02-27propellor spinJoey Hess
2015-02-27propellor spinJoey Hess
2015-01-29propellor spinJoey Hess
2015-01-29propellor spinJoey Hess
2015-01-24GADT properties seem to work (untested)Joey Hess
* 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.
2014-12-07Fixed privdata introspection for User.hasPassword and User.hasSomePasswordJoey Hess
This is not a complete fix for the problem that Info doen't propigate from the called property when code does something like: do hostname <- asks hostName ensureProperty $ foo hostname Instead, I just eliminated the need to implement hasPassword that way, by making the PrivData Info use a HostContext which automatically gets the right hostname passed to it. All other uses of withPrivData don't have the problem. It's still possible for the user to run into the problem if they write something like the above, where foo is a property that uses privdata. However, all properties that take a Context now also accept a HostContext, so it's at least less likely the user needs to write that.
2014-11-13Tor: change unlines to unwords in hiddenServiceFélix Sipma
Signed-off-by: Félix Sipma <felix.sipma@no-log.org>
2014-11-12Tor: change unlines to unwords in description messagesFélix Sipma
Signed-off-by: Félix Sipma <felix.sipma@no-log.org>
2014-11-11Tor: hiddenServiceDataFélix Sipma
Signed-off-by: Félix Sipma <felix.sipma@no-log.org>
2014-11-11Tor: varRunFélix Sipma
Signed-off-by: Félix Sipma <felix.sipma@no-log.org>
2014-11-11Tor: rename 'varPath' to 'varLib'Félix Sipma
Signed-off-by: Félix Sipma <felix.sipma@no-log.org>
2014-11-11Tor: mainConfig, varPath, hidden service by hostnameFélix Sipma
Signed-off-by: Félix Sipma <felix.sipma@no-log.org>
2014-11-10didn't need quite so much indentationJoey Hess
2014-11-10Tor: hidden serviceFélix Sipma
Signed-off-by: Félix Sipma <felix.sipma@no-log.org>
2014-09-23use Daemon.restarted consistently, and implement using Service.restartedJoey Hess
2014-05-14moved source code to srcJoey Hess
This is to work around OSX's brain-damange regarding filename case insensitivity. Avoided moving config.hs, because it's a config file. Put in a symlink to make build work.