From 81a0518b179f9036b51bd9ea23a931f46b2a0dda Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 20 Aug 2020 14:06:40 -0400 Subject: add news item for debug-me 1.20200820 --- doc/news/version_1.20170509.mdwn | 11 ----------- doc/news/version_1.20200820.mdwn | 6 ++++++ 2 files changed, 6 insertions(+), 11 deletions(-) delete mode 100644 doc/news/version_1.20170509.mdwn create mode 100644 doc/news/version_1.20200820.mdwn diff --git a/doc/news/version_1.20170509.mdwn b/doc/news/version_1.20170509.mdwn deleted file mode 100644 index 7ec6d4b..0000000 --- a/doc/news/version_1.20170509.mdwn +++ /dev/null @@ -1,11 +0,0 @@ -debug-me 1.20170509 released with [[!toggle text="these changes"]] -[[!toggleable text=""" - * Server: Use "postmaster" as default --from-email address - rather than "unknown@server". - * Server: DEBUG\_ME\_FROM\_EMAIL can be used to specify the --from-email. - This is used in debug-me.default to encourage configuring it. - Thanks, Sean Whitton. - * Avoid crash when --use-server is given an url that does not - include a path. - * Fix bug that prevented creating ~/.debug-me/log/remote/ - when ~/.debug-me/ didn't already exist."""]] \ No newline at end of file diff --git a/doc/news/version_1.20200820.mdwn b/doc/news/version_1.20200820.mdwn new file mode 100644 index 0000000..b72c3f9 --- /dev/null +++ b/doc/news/version_1.20200820.mdwn @@ -0,0 +1,6 @@ +debug-me 1.20200820 released with [[!toggle text="these changes"]] +[[!toggleable text=""" + * debug-me.service: Remove /etc from InaccessiblePaths, + as that prevents the server sending email using eg postfix, + which needs to read its config files. + * Update to lts-14.27, support websockets 0.12.7."""]] \ No newline at end of file -- cgit v1.2.3 From 6b5b38f71ad7afb700a672a9f3bcd55073ddee03 Mon Sep 17 00:00:00 2001 From: "david@1439a1cab13195a56248b6a8fd98a62028bcba8a" Date: Sat, 22 Aug 2020 19:00:32 +0000 Subject: --- doc/forum/configure_defaultServerUrl.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/forum/configure_defaultServerUrl.mdwn diff --git a/doc/forum/configure_defaultServerUrl.mdwn b/doc/forum/configure_defaultServerUrl.mdwn new file mode 100644 index 0000000..95b64d6 --- /dev/null +++ b/doc/forum/configure_defaultServerUrl.mdwn @@ -0,0 +1 @@ +I'm thinking about using debug-me for a course, and in that setting I'd like to default to a server at the same university. It would be nice if there was some way (environment variable, e.g.) to configure the default server URL. As it is I guess I will make a shell script wrapper. -- cgit v1.2.3 From 78d69cc0c5c6a65d2ca50e5c610274953095d646 Mon Sep 17 00:00:00 2001 From: david Date: Mon, 24 Aug 2020 16:07:25 +0000 Subject: --- doc/bugs/pgp.cs.uu.nl_is_dead.mdwn | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 doc/bugs/pgp.cs.uu.nl_is_dead.mdwn diff --git a/doc/bugs/pgp.cs.uu.nl_is_dead.mdwn b/doc/bugs/pgp.cs.uu.nl_is_dead.mdwn new file mode 100644 index 0000000..eeb82af --- /dev/null +++ b/doc/bugs/pgp.cs.uu.nl_is_dead.mdwn @@ -0,0 +1,2 @@ +Visiting the page in a browser, I see "this page is no longer maintained". That probably explains why the debug-me web-of-trust +check always fails. -- cgit v1.2.3 From 342d4dea8496b62d0b9f4567675fab9e152da8f6 Mon Sep 17 00:00:00 2001 From: Tony Zorman Date: Thu, 24 Mar 2022 10:56:28 +0100 Subject: Support GHC 8.8 As part of the MonadFail proposal[1], the fail method was removed from the Monad type class in GHC 8.8. As such, one now needs a MonadFail constraint for the relevant functions. [1]: https://wiki.haskell.org/MonadFail_Proposal --- Val.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Val.hs b/Val.hs index f024b9d..5c52c82 100644 --- a/Val.hs +++ b/Val.hs @@ -42,7 +42,7 @@ instance FromJSON Val where b64 :: B.ByteString -> T.Text b64 = T.decodeUtf8 . B64.encode -unb64 :: Monad m => T.Text -> m B.ByteString +unb64 :: MonadFail m => T.Text -> m B.ByteString unb64 t = either (\_ -> fail "bad base64 data") return -- cgit v1.2.3 From c7bae27f009ccaae4d365dc2471c0725de2f5793 Mon Sep 17 00:00:00 2001 From: Tony Zorman Date: Thu, 24 Mar 2022 10:58:13 +0100 Subject: Support aeson 2.0 As per the aeson 2.0.0.0 changelog[1], starting with that version the map type used by Object is now abstract, as is the key type of that map. Related: https://github.com/haskell/aeson/pull/866 Related: https://github.com/haskell/aeson/pull/868 [1]: https://hackage.haskell.org/package/aeson-2.0.0.0/changelog --- Gpg/Wot.hs | 13 ++++++++++++- debug-me.cabal | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Gpg/Wot.hs b/Gpg/Wot.hs index 2a6d541..d916ebc 100644 --- a/Gpg/Wot.hs +++ b/Gpg/Wot.hs @@ -3,6 +3,7 @@ - Licensed under the GNU AGPL version 3 or higher. -} +{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveGeneric #-} -- | Gpg web of trust checking, using wotsap's JSON output @@ -15,8 +16,13 @@ import JSON import Network.HTTP.Client import Network.HTTP.Client.TLS import Data.List -import qualified Data.HashMap.Strict as M import qualified Data.Text as T +#if MIN_VERSION_aeson(2, 0, 0) +import qualified Data.Aeson.KeyMap as AM +import qualified Data.Aeson.Key as AK +#else +import qualified Data.HashMap.Strict as M +#endif data WotStats = WotStats { key :: Node @@ -43,9 +49,14 @@ data Node = Node -- | wotsap's json has some upper-case fields; lowercase field for parsing jsonLower :: Value -> Value +#if MIN_VERSION_aeson(2, 0, 0) +jsonLower (Object o) = Object . AM.mapKeyVal lowerKey id $ o + where lowerKey = AK.fromText . T.toLower . AK.toText +#else jsonLower (Object o) = Object . M.fromList . map lowerPair . M.toList $ o where lowerPair (k, v) = (T.toLower k, v) +#endif jsonLower x = x instance FromJSON WotStats where diff --git a/debug-me.cabal b/debug-me.cabal index d859cbb..db7cc63 100644 --- a/debug-me.cabal +++ b/debug-me.cabal @@ -64,7 +64,7 @@ Executable debug-me , stm-chans (>= 3.0) , posix-pty (>= 0.2.1) , terminal-size (>= 0.3) - , aeson (>= 0.11 && < 1.5) + , aeson (>= 0.11 && < 2.1) , sandi (>= 0.4) , text (>= 1.2.2) , optparse-applicative (>= 0.12) -- cgit v1.2.3 From 9c729078848fc0a1d245852164aa573f83bfa84b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 24 Mar 2022 11:39:45 -0400 Subject: update to lts-19.0 Tony noted it builds with this after his patches. --- CHANGELOG | 10 ++++++++++ stack.yaml | 6 +++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 1071abf..238e995 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,13 @@ +debug-me (1.20200821) UNRELEASED; urgency=medium + + * Support ghc 8.8. + Thanks, Tony Zorman + * Support aeson 2.0. + Thanks, Tony Zorman + * Update to lts-19.0. + + -- Joey Hess Thu, 24 Mar 2022 11:37:38 -0400 + debug-me (1.20200820) unstable; urgency=medium * debug-me.service: Remove /etc from InaccessiblePaths, diff --git a/stack.yaml b/stack.yaml index 90b2c54..1dea8c4 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,8 +1,8 @@ packages: - '.' -resolver: lts-14.27 +resolver: lts-19.0 extra-deps: -- graphviz-2999.20.0.3 -- posix-pty-0.2.1.1 +- graphviz-2999.20.1.0 +- posix-pty-0.2.2 - sandi-0.5 explicit-setup-deps: -- cgit v1.2.3 From d1a28900ea59e0850fd4ae65f0ebcef9e1a5bf9e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 24 Mar 2022 12:22:07 -0400 Subject: qualify GHC.Generics to avoid warning Seems that Generic is in scope w/o the import in new ghc, I assume but have not verified that old ghc needed the import. --- Val.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Val.hs b/Val.hs index 5c52c82..d010a2a 100644 --- a/Val.hs +++ b/Val.hs @@ -9,8 +9,8 @@ module Val where import Memory import JSON +import qualified GHC.Generics as G -import GHC.Generics (Generic) import Data.Aeson.Types import qualified Codec.Binary.Base64 as B64 import qualified Data.Text as T @@ -20,7 +20,7 @@ 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, Sem.Semigroup, Monoid) + deriving (Show, G.Generic, Eq, Sem.Semigroup, Monoid) instance DataSize Val where dataSize (Val b) = fromIntegral (B.length b) -- cgit v1.2.3 From d007b5beddd398f380494403378e5f4c102592f5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 24 Mar 2022 12:27:02 -0400 Subject: use withPingThread to avoid build warning forkPingThread is deprecated. Also, websockets-0.9 did not include forkPingThread so the old dep was wrong. --- WebSockets.hs | 18 +++++++++--------- debug-me.cabal | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/WebSockets.hs b/WebSockets.hs index 7a53c8c..8aec057 100644 --- a/WebSockets.hs +++ b/WebSockets.hs @@ -164,16 +164,16 @@ clientApp -> (AnyMessage -> Maybe received) -> (TMChan sent -> TMChan (MissingHashes received) -> SessionID -> IO a) -> ClientApp a -clientApp mode mksent filterreceived a conn = do +clientApp mode mksent filterreceived a conn = -- Ping every 30 seconds to avoid timeouts caused by proxies etc. - forkPingThread conn 30 - _v <- negotiateWireVersion conn - sendBinaryData conn (SelectMode ClientSends mode) - r <- receiveData conn - case r of - Ready ServerSends sid -> bracket setup cleanup (go sid) - WireProtocolError e -> error e - _ -> protocolError conn "Did not get expected Ready message from server" + withPingThread conn 30 (return ()) $ do + _v <- negotiateWireVersion conn + sendBinaryData conn (SelectMode ClientSends mode) + r <- receiveData conn + case r of + Ready ServerSends sid -> bracket setup cleanup (go sid) + WireProtocolError e -> error e + _ -> protocolError conn "Did not get expected Ready message from server" where setup = do schan <- newTMChanIO diff --git a/debug-me.cabal b/debug-me.cabal index db7cc63..d5a44e9 100644 --- a/debug-me.cabal +++ b/debug-me.cabal @@ -1,5 +1,5 @@ Name: debug-me -Version: 1.20200820 +Version: 1.20220324 Cabal-Version: >= 1.10 Maintainer: Joey Hess Author: Joey Hess @@ -81,7 +81,7 @@ Executable debug-me , http-types (>= 0.9) , http-client (>= 0.4) , http-client-tls (>= 0.2) - , websockets (>= 0.9) + , websockets (>= 0.12.6.0) , wai-websockets (>= 3.0) , uuid (>= 1.3) , protobuf (>= 0.2) -- cgit v1.2.3 From dc753f6815f5b8906ae54ebee801b72c60cdef3a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 24 Mar 2022 12:28:10 -0400 Subject: releasing package debug-me version 1.20220324 --- CHANGELOG | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 238e995..6cb9478 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,4 @@ -debug-me (1.20200821) UNRELEASED; urgency=medium +debug-me (1.20220324) unstable; urgency=medium * Support ghc 8.8. Thanks, Tony Zorman @@ -6,7 +6,7 @@ debug-me (1.20200821) UNRELEASED; urgency=medium Thanks, Tony Zorman * Update to lts-19.0. - -- Joey Hess Thu, 24 Mar 2022 11:37:38 -0400 + -- Joey Hess Thu, 24 Mar 2022 11:39:51 -0400 debug-me (1.20200820) unstable; urgency=medium -- cgit v1.2.3