From c358b72d4ea20bb3c4f36d3cad8aa1303e3ee9af Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 10 Aug 2017 14:18:11 -0400 Subject: add news item for debug-me 1.20170810 --- doc/news/version_1.20170810.mdwn | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 doc/news/version_1.20170810.mdwn 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 -- cgit v1.2.3 From c9b2dd2f08d9ef69c847eaa2cad17a21b3451ab4 Mon Sep 17 00:00:00 2001 From: "monroef4@5fd6d70c9fe11f52f6186c3b4e784f66ebf38af4" Date: Wed, 16 Aug 2017 14:07:57 +0000 Subject: --- doc/bugs/master_fails_to_build.mdwn | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 doc/bugs/master_fails_to_build.mdwn diff --git a/doc/bugs/master_fails_to_build.mdwn b/doc/bugs/master_fails_to_build.mdwn new file mode 100644 index 0000000..97675d5 --- /dev/null +++ b/doc/bugs/master_fails_to_build.mdwn @@ -0,0 +1,30 @@ +``` +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? -- cgit v1.2.3 From e4d98c321597309a1ba6f5a64f7c8e01348cb4a0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 19 Feb 2018 11:14:29 -0400 Subject: improve wording --- doc/faq.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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. -- cgit v1.2.3 From 92f8c67aaddd24caade87433b75a279582cc6b8b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 10 Mar 2018 12:28:14 -0400 Subject: add forum --- doc/forum.mdwn | 4 ++++ doc/index.mdwn | 1 + 2 files changed, 5 insertions(+) create mode 100644 doc/forum.mdwn 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..16af569 100644 --- a/doc/index.mdwn +++ b/doc/index.mdwn @@ -4,6 +4,7 @@ * [[News]] * [[Bugs]] * [[Todo]] +* [[Forum]] * [[Protocol]] * [[Evidence]] * [[Servers]] -- cgit v1.2.3 From 3431a9757a5654fce1e472073a5bf97aa515553f Mon Sep 17 00:00:00 2001 From: spwhitton Date: Sun, 8 Jul 2018 20:17:00 +0000 Subject: add link to simon tatham essay --- doc/index.mdwn | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/index.mdwn b/doc/index.mdwn index 16af569..7ea627d 100644 --- a/doc/index.mdwn +++ b/doc/index.mdwn @@ -16,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 -- cgit v1.2.3 From 418f0117f3021cb2f4b1886cb92ca00ea6527ed7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 10 Jul 2018 13:29:34 -0400 Subject: stack.yaml: Update to lts-11.17. Note that this needs a newer version of stack than is in Debian stable. --- CHANGELOG | 6 ++++++ stack.yaml | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index b500a85..c4f2857 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,9 @@ +debug-me (1.20170811) UNRELEASED; urgency=medium + + * stack.yaml: Update to lts-11.17. + + -- Joey Hess Tue, 10 Jul 2018 13:28:50 -0400 + debug-me (1.20170810) unstable; urgency=medium * Fix build with websockets-0.10.0.0 which did not support compression. diff --git a/stack.yaml b/stack.yaml index a1a2869..abe5576 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,5 +1,9 @@ packages: - '.' -resolver: lts-9.0 +resolver: lts-11.17 extra-deps: +- graphviz-2999.18.1.2 +- posix-pty-0.2.1.1 +- sandi-0.4.2 +- fgl-5.5.4.0 explicit-setup-deps: -- cgit v1.2.3 From f3911b4e15b4f3c63d69e168f5e3e7fc0f749b73 Mon Sep 17 00:00:00 2001 From: "pabs3@49c776417680694a0f3295ee80df4edfca300096" Date: Mon, 23 Jul 2018 09:28:47 +0000 Subject: command review mode --- doc/todo/command_review_mode.mdwn | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 doc/todo/command_review_mode.mdwn 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. -- cgit v1.2.3 From 1f24b020c5d477c14ce6727dae4b43339f94df76 Mon Sep 17 00:00:00 2001 From: spwhitton Date: Wed, 5 Dec 2018 04:41:07 +0000 Subject: Added a comment --- .../comment_1_a65679d04d33e0037d15f0a47f313aeb._comment | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 doc/bugs/fails_to_build_against_current_LTS_Haskell/comment_1_a65679d04d33e0037d15f0a47f313aeb._comment 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. +"""]] -- cgit v1.2.3 From ad33cd0f276eb898db5287dd36bf06fd6258f911 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 8 Dec 2018 12:51:45 -0400 Subject: close already fixed bug --- doc/bugs/master_fails_to_build.mdwn | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/bugs/master_fails_to_build.mdwn b/doc/bugs/master_fails_to_build.mdwn index 97675d5..1571c16 100644 --- a/doc/bugs/master_fails_to_build.mdwn +++ b/doc/bugs/master_fails_to_build.mdwn @@ -28,3 +28,5 @@ 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]] -- cgit v1.2.3 From 9d7e697474720b2c6e78fbf11066a8499fc55807 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 8 Dec 2018 13:26:14 -0400 Subject: Update to lts-12.10, support ghc 8.4, and aeson 1.3. Don't fully understand the need for the MonoLocalBinds language extension, which was not needed before but now ghc complains if it's not included, but I've tested it and it does work. All the rest of the changes are straightforward AMP changes and dep updates. Removed fgl from stack.yaml because it seems that indirect dep no longer needs to be specified for stack to build. Added custom-setup stanza since stack now warns without one. This commit was sponsored by Trenton Cronholm on Patreon. --- CHANGELOG | 4 ++-- CmdLine.hs | 1 - Crypto.hs | 8 ++++++-- Graphviz.hs | 3 ++- ProtocolBuffers.hs | 3 ++- Role/Developer.hs | 3 ++- Role/User.hs | 3 ++- Session.hs | 1 + Types.hs | 6 +++++- Val.hs | 3 ++- WebSockets.hs | 3 ++- debug-me.cabal | 7 +++++-- doc/bugs/fails_to_build_against_current_LTS_Haskell.mdwn | 2 ++ stack.yaml | 5 ++--- 14 files changed, 35 insertions(+), 17 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index c4f2857..d80372c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,6 @@ -debug-me (1.20170811) UNRELEASED; urgency=medium +debug-me (1.20181208) UNRELEASED; urgency=medium - * stack.yaml: Update to lts-11.17. + * Update to lts-12.10, support ghc 8.4, and aeson 1.3. -- Joey Hess Tue, 10 Jul 2018 13:28:50 -0400 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 a601e34..9fa28b9 100644 --- a/debug-me.cabal +++ b/debug-me.cabal @@ -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.18.*) + , 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/stack.yaml b/stack.yaml index abe5576..ca6d0ad 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,9 +1,8 @@ packages: - '.' -resolver: lts-11.17 +resolver: lts-12.10 extra-deps: -- graphviz-2999.18.1.2 +- graphviz-2999.20.0.2 - posix-pty-0.2.1.1 - sandi-0.4.2 -- fgl-5.5.4.0 explicit-setup-deps: -- cgit v1.2.3 From 9f282483310c2ce028c507cc385e69342ad6c7bc Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 8 Dec 2018 13:29:53 -0400 Subject: releasing package debug-me version 1.20181208 --- CHANGELOG | 4 ++-- debug-me.cabal | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index d80372c..cb3b0de 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,8 +1,8 @@ -debug-me (1.20181208) UNRELEASED; urgency=medium +debug-me (1.20181208) unstable; urgency=medium * Update to lts-12.10, support ghc 8.4, and aeson 1.3. - -- Joey Hess Tue, 10 Jul 2018 13:28:50 -0400 + -- Joey Hess Sat, 08 Dec 2018 13:29:33 -0400 debug-me (1.20170810) unstable; urgency=medium diff --git a/debug-me.cabal b/debug-me.cabal index 9fa28b9..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 Author: Joey Hess -- cgit v1.2.3