summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG6
-rw-r--r--CmdLine.hs1
-rw-r--r--Crypto.hs8
-rw-r--r--Graphviz.hs3
-rw-r--r--ProtocolBuffers.hs3
-rw-r--r--Role/Developer.hs3
-rw-r--r--Role/User.hs3
-rw-r--r--Session.hs1
-rw-r--r--Types.hs6
-rw-r--r--Val.hs3
-rw-r--r--WebSockets.hs3
-rw-r--r--debug-me.cabal9
-rw-r--r--doc/bugs/fails_to_build_against_current_LTS_Haskell.mdwn2
-rw-r--r--doc/bugs/fails_to_build_against_current_LTS_Haskell/comment_1_a65679d04d33e0037d15f0a47f313aeb._comment10
-rw-r--r--doc/bugs/master_fails_to_build.mdwn32
-rw-r--r--doc/faq.mdwn4
-rw-r--r--doc/forum.mdwn4
-rw-r--r--doc/index.mdwn6
-rw-r--r--doc/news/version_1.20170810.mdwn4
-rw-r--r--doc/todo/command_review_mode.mdwn3
-rw-r--r--stack.yaml5
21 files changed, 102 insertions, 17 deletions
diff --git a/CHANGELOG b/CHANGELOG
index b500a85..cb3b0de 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,9 @@
+debug-me (1.20181208) unstable; urgency=medium
+
+ * Update to lts-12.10, support ghc 8.4, and aeson 1.3.
+
+ -- Joey Hess <id@joeyh.name> Sat, 08 Dec 2018 13:29:33 -0400
+
debug-me (1.20170810) unstable; urgency=medium
* Fix build with websockets-0.10.0.0 which did not support compression.
diff --git a/CmdLine.hs b/CmdLine.hs
index 2a64b6c..28227d4 100644
--- a/CmdLine.hs
+++ b/CmdLine.hs
@@ -8,7 +8,6 @@ module CmdLine where
import Types
import ServerList
-import Data.Monoid
import Options.Applicative
import Network.URI
import Network.Wai.Handler.Warp (Port)
diff --git a/Crypto.hs b/Crypto.hs
index 2fe27e0..af3ad17 100644
--- a/Crypto.hs
+++ b/Crypto.hs
@@ -16,6 +16,7 @@ import Crypto.Error
import Crypto.Random.Entropy
import Data.ByteArray (convert)
import qualified Data.ByteString as B
+import qualified Data.Semigroup as Sem
dummySignature :: Signature
dummySignature = OtherSignature (Val mempty)
@@ -78,10 +79,13 @@ mkSigVerifier (PublicKey (Val pk)) =
CryptoPassed pk' -> SigVerifier 1 (Ed25519.verify pk')
CryptoFailed _ -> mempty
+instance Sem.Semigroup SigVerifier where
+ SigVerifier na a <> SigVerifier nb b =
+ SigVerifier (na+nb) $ \d s -> b d s || a d s
+
instance Monoid SigVerifier where
mempty = SigVerifier 0 $ \_b _s -> False
- mappend (SigVerifier na a) (SigVerifier nb b) =
- SigVerifier (na+nb) $ \d s -> b d s || a d s
+ mappend = (Sem.<>)
data MySessionKey = MySessionKey Ed25519.SecretKey Ed25519.PublicKey
diff --git a/Graphviz.hs b/Graphviz.hs
index f8f165c..abbb93a 100644
--- a/Graphviz.hs
+++ b/Graphviz.hs
@@ -12,7 +12,6 @@ import CmdLine
import Log
import Data.Char hiding (Control)
-import Data.Monoid
import Data.GraphViz
import Data.GraphViz.Attributes.Complete
import Data.GraphViz.Types.Generalised as G
@@ -23,6 +22,8 @@ import qualified Data.ByteString.Lazy as L
import qualified Data.Text.Lazy as T
import qualified Data.Text.Lazy.Encoding as T
import Data.Text.Encoding.Error
+import Data.Monoid
+import Prelude
graphviz :: GraphvizOpts -> IO ()
graphviz opts = do
diff --git a/ProtocolBuffers.hs b/ProtocolBuffers.hs
index e87a156..d7c7799 100644
--- a/ProtocolBuffers.hs
+++ b/ProtocolBuffers.hs
@@ -5,7 +5,7 @@
{-# LANGUAGE DeriveGeneric, DataKinds, MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleContexts, UndecidableInstances #-}
-{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE OverloadedStrings, MonoLocalBinds #-}
{- | Protocol buffers serialization for the debug-me wire protocol.
-
@@ -319,6 +319,7 @@ instance Encode a => Encode (MessageP a)
-- This is why UndecidableInstances is needed. The need
-- for a Monoid instance is an implementation detail of
-- Data.ProtocolBuffers.
+-- MonoLocalBinds is also used to avoid a ghc warning.
instance (Monoid (Message a), Generic a, Decode a) => Decode (MessageP a)
instance Encode a => Encode (ActivityP a)
instance (Monoid (Message a), Generic a, Decode a) => Decode (ActivityP a)
diff --git a/Role/Developer.hs b/Role/Developer.hs
index d706a7a..abdad08 100644
--- a/Role/Developer.hs
+++ b/Role/Developer.hs
@@ -38,9 +38,10 @@ import qualified Data.Text as T
import Data.List
import Data.Maybe
import Control.Monad
-import Data.Monoid
import Data.Time.Clock.POSIX
import Network.URI
+import Data.Monoid
+import Prelude
run :: DeveloperOpts -> IO ()
run = run' developer . debugUrl
diff --git a/Role/User.hs b/Role/User.hs
index 6ee1a42..6ec0302 100644
--- a/Role/User.hs
+++ b/Role/User.hs
@@ -30,11 +30,12 @@ import System.Exit
import qualified Data.Text.IO as T
import qualified Data.ByteString as B
import Data.List.NonEmpty (NonEmpty(..), toList)
-import Data.Monoid
import Data.Maybe
import Data.Time.Clock.POSIX
import System.IO
import System.Environment
+import Data.Monoid
+import Prelude
run :: UserOpts -> IO ExitCode
run os = fromMaybe (ExitFailure 101) <$> connect
diff --git a/Session.hs b/Session.hs
index 9571ed1..7343e82 100644
--- a/Session.hs
+++ b/Session.hs
@@ -11,6 +11,7 @@ import qualified Data.ByteString as B
import qualified Data.ByteString.Char8 as B8
import System.Exit
import Data.Monoid
+import Prelude
startSession :: B.ByteString
startSession = "** debug-me session started"
diff --git a/Types.hs b/Types.hs
index ce986c7..bbf296f 100644
--- a/Types.hs
+++ b/Types.hs
@@ -22,6 +22,7 @@ import JSON
import qualified Data.Text as T
import Data.Time.Clock.POSIX
+import qualified Data.Semigroup as Sem
-- | Things that the developer sees.
data Seen = Seen
@@ -194,9 +195,12 @@ newtype ElapsedTime = ElapsedTime Double
mkElapsedTime :: POSIXTime -> POSIXTime -> ElapsedTime
mkElapsedTime start end = ElapsedTime $ fromRational $ toRational (end - start)
+instance Sem.Semigroup ElapsedTime where
+ ElapsedTime a <> ElapsedTime b = ElapsedTime (a+b)
+
instance Monoid ElapsedTime where
mempty = ElapsedTime 0
- mappend (ElapsedTime a) (ElapsedTime b) = ElapsedTime (a+b)
+ mappend = (Sem.<>)
instance DataSize ElapsedTime where
dataSize _ = 16 -- 128 bit Double
diff --git a/Val.hs b/Val.hs
index c395a95..f024b9d 100644
--- a/Val.hs
+++ b/Val.hs
@@ -16,10 +16,11 @@ import qualified Codec.Binary.Base64 as B64
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
import qualified Data.ByteString as B
+import qualified Data.Semigroup as Sem
-- | Newtype of ByteString so we can have JSON instances without orphans.
newtype Val = Val { val :: B.ByteString }
- deriving (Show, Generic, Eq, Monoid)
+ deriving (Show, Generic, Eq, Sem.Semigroup, Monoid)
instance DataSize Val where
dataSize (Val b) = fromIntegral (B.length b)
diff --git a/WebSockets.hs b/WebSockets.hs
index c2fcb95..7a53c8c 100644
--- a/WebSockets.hs
+++ b/WebSockets.hs
@@ -40,12 +40,13 @@ import qualified Data.Serialize
import qualified Data.Text as T
import qualified Data.ByteString.Lazy as L
import Data.List
-import Data.Monoid
import Data.Maybe
import Text.Read
import Control.Monad
import Network.URI
import System.IO
+import Data.Monoid
+import Prelude
-- | Framing protocol used over a websocket connection.
--
diff --git a/debug-me.cabal b/debug-me.cabal
index c761ee0..385ef8a 100644
--- a/debug-me.cabal
+++ b/debug-me.cabal
@@ -1,5 +1,5 @@
Name: debug-me
-Version: 1.20170810
+Version: 1.20181208
Cabal-Version: >= 1.8
Maintainer: Joey Hess <joey@kitenet.net>
Author: Joey Hess
@@ -45,6 +45,9 @@ Extra-Source-Files:
debug-me.default
developer-keyring.gpg
+custom-setup
+ Setup-Depends: base (>= 4.9 && < 5.0), Cabal, filepath
+
Executable debug-me
Main-Is: debug-me.hs
GHC-Options: -threaded -Wall -fno-warn-tabs -O2
@@ -60,11 +63,11 @@ Executable debug-me
, stm-chans (>= 3.0)
, posix-pty (>= 0.2.1)
, terminal-size (>= 0.3)
- , aeson (>= 0.11 && < 1.3)
+ , aeson (>= 0.11 && < 1.4)
, sandi (>= 0.4)
, text (>= 1.2.2)
, optparse-applicative (>= 0.12)
- , graphviz (== 2999.20.*)
+ , graphviz (>= 2999.18.0 && < 2999.21)
, time (>= 1.6)
, filepath (>= 1.4)
, directory (>= 1.2)
diff --git a/doc/bugs/fails_to_build_against_current_LTS_Haskell.mdwn b/doc/bugs/fails_to_build_against_current_LTS_Haskell.mdwn
index 52b9faf..2d1c0aa 100644
--- a/doc/bugs/fails_to_build_against_current_LTS_Haskell.mdwn
+++ b/doc/bugs/fails_to_build_against_current_LTS_Haskell.mdwn
@@ -13,3 +13,5 @@ debug-me fails to build against LTS 8.23:
make[2]: *** [debug-me] Error 1
--spwhitton
+
+> [[fixed|done]] --[[Joey]]
diff --git a/doc/bugs/fails_to_build_against_current_LTS_Haskell/comment_1_a65679d04d33e0037d15f0a47f313aeb._comment b/doc/bugs/fails_to_build_against_current_LTS_Haskell/comment_1_a65679d04d33e0037d15f0a47f313aeb._comment
new file mode 100644
index 0000000..6206213
--- /dev/null
+++ b/doc/bugs/fails_to_build_against_current_LTS_Haskell/comment_1_a65679d04d33e0037d15f0a47f313aeb._comment
@@ -0,0 +1,10 @@
+[[!comment format=mdwn
+ username="spwhitton"
+ avatar="http://cdn.libravatar.org/avatar/9c3f08f80e67733fd506c353239569eb"
+ subject="comment 1"
+ date="2018-12-05T04:41:07Z"
+ content="""
+Debian has moved onto LTS 12.10 and debug-me requires haskell-aeson older than 1.3.
+
+Unless debug-me is updated, it will unfortunately not be included in Debian buster, which would scupper plans for a debug-me.debian.org.
+"""]]
diff --git a/doc/bugs/master_fails_to_build.mdwn b/doc/bugs/master_fails_to_build.mdwn
new file mode 100644
index 0000000..1571c16
--- /dev/null
+++ b/doc/bugs/master_fails_to_build.mdwn
@@ -0,0 +1,32 @@
+```
+Downloading lts-9.0 build plan ...
+Downloaded lts-9.0 build plan.
+Updating package index Hackage (mirrored at https://s3.amazonaws.com/hackage.fpcomplete.com/) ...
+Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/
+Downloading root
+Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/
+Downloading timestamp
+Downloading snapshot
+Downloading mirrors
+Cannot update index (no local copy)
+Downloading index
+Updated package list downloaded
+Populating index cache ...
+Populated index cache.
+
+Error: While constructing the build plan, the following exceptions were encountered:
+
+In the dependencies for debug-me-1.20170810:
+ posix-pty must match (>=0.2.1), but the stack configuration has no specified version (latest applicable is 0.2.1.1)
+needed since debug-me-1.20170810 is a build target.
+
+Recommended action: try adding the following to your extra-deps in /builddir/debug-me-1.20170810/stack.yaml:
+- posix-pty-0.2.1.1
+
+You may also want to try the 'stack solver' command
+Plan construction failed.
+```
+
+I couldn't see posix-pty in the lts package list? Was it erroneously removed from stack.yaml?
+
+> posix-pty is in stack.yaml since last year, so [[done]] --[[Joey]]
diff --git a/doc/faq.mdwn b/doc/faq.mdwn
index 10d6422..f559d87 100644
--- a/doc/faq.mdwn
+++ b/doc/faq.mdwn
@@ -24,8 +24,8 @@ also put keyrings in that directory, and then debug-me will be able to
tell then a developer of a project is connecting.
If debug-me says that "John Doe is probably a real person", it means
-that he's connected to the strong set of the GnuPG web of trust.
-Other people, who certianly are real, have verified his identity.
+that he's connected to the strong set of the GnuPG web of trust. That
+means: Other people, who certianly are real, have verified his identity.
So even if you don't know his name, it can be safe to let him connect,
but if in doubt, don't let him.
diff --git a/doc/forum.mdwn b/doc/forum.mdwn
new file mode 100644
index 0000000..732c4bb
--- /dev/null
+++ b/doc/forum.mdwn
@@ -0,0 +1,4 @@
+This is a place to discuss using debug-me, share tips and tricks, etc.
+If you need help, advice, or anything, post about it here.
+
+[[!inline pages="forum/* and !*/Discussion" archive=yes rootpage=forum postformtext="Add a new thread titled:"]]
diff --git a/doc/index.mdwn b/doc/index.mdwn
index 14fec93..7ea627d 100644
--- a/doc/index.mdwn
+++ b/doc/index.mdwn
@@ -4,6 +4,7 @@
* [[News]]
* [[Bugs]]
* [[Todo]]
+* [[Forum]]
* [[Protocol]]
* [[Evidence]]
* [[Servers]]
@@ -15,7 +16,10 @@ Debugging a problem over email/irc/BTS is slow, tedious, and hard. The
developer needs to see the your problem to understand it. Debug-me aims to
make debugging fast, fun, and easy, by letting the developer access your
computer remotely, so they can immediately see and interact with the
-problem. Making your problem their problem gets it fixed fast.
+problem. Making your problem their problem gets it fixed fast. As
+Simon Tatham [[puts it|https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]],
+"In a nutshell, the aim of a bug report is to enable the programmer to see the
+program failing in front of them." debug-me does just that!
A debug-me session is logged and signed with the developer's GnuPG key,
producing a [[chain of evidence|evidence]] of what they saw and what they
diff --git a/doc/news/version_1.20170810.mdwn b/doc/news/version_1.20170810.mdwn
new file mode 100644
index 0000000..3597a23
--- /dev/null
+++ b/doc/news/version_1.20170810.mdwn
@@ -0,0 +1,4 @@
+debug-me 1.20170810 released with [[!toggle text="these changes"]]
+[[!toggleable text="""
+ * Fix build with websockets-0.10.0.0 which did not support compression.
+ * Update to lts-9.0."""]] \ No newline at end of file
diff --git a/doc/todo/command_review_mode.mdwn b/doc/todo/command_review_mode.mdwn
new file mode 100644
index 0000000..6ff8d60
--- /dev/null
+++ b/doc/todo/command_review_mode.mdwn
@@ -0,0 +1,3 @@
+It would be nice to have a command review mode where the owner of the debugged computer would have to review and approve each command submitted by the debugger.
+
+This would be useful for slightly more technical or paranoid folks who would like more control over the debug session than just post-facto reputation degradation.
diff --git a/stack.yaml b/stack.yaml
index a1a2869..ca6d0ad 100644
--- a/stack.yaml
+++ b/stack.yaml
@@ -1,5 +1,8 @@
packages:
- '.'
-resolver: lts-9.0
+resolver: lts-12.10
extra-deps:
+- graphviz-2999.20.0.2
+- posix-pty-0.2.1.1
+- sandi-0.4.2
explicit-setup-deps: