summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2017-05-09 13:55:25 -0700
committerSean Whitton <spwhitton@spwhitton.name>2017-05-09 13:55:25 -0700
commitc9d198ffa9d2719b83c07f5157e735dad801bb4e (patch)
treeb07dddea6d96e7a12e3d8cf4c1e5a00adaf9d98f
parentfcf6cb34f80adb6cafec52db6856279f398a147e (diff)
downloaddebug-me-c9d198ffa9d2719b83c07f5157e735dad801bb4e.tar.gz
Commit Debian 3.0 (quilt) metadatadebian/1.20170505-1archive/debian/1.20170505-1
[dgit (4.0) quilt-fixup]
-rw-r--r--debian/patches/debian-changes75
1 files changed, 68 insertions, 7 deletions
diff --git a/debian/patches/debian-changes b/debian/patches/debian-changes
index 106c758..495e591 100644
--- a/debian/patches/debian-changes
+++ b/debian/patches/debian-changes
@@ -17,14 +17,16 @@ clone`.)
A single combined diff, containing all the changes, follows.
--- debug-me-1.20170505.orig/CHANGELOG
+++ debug-me-1.20170505/CHANGELOG
-@@ -1,3 +1,13 @@
+@@ -1,3 +1,15 @@
+debug-me (1.20170506) UNRELEASED; urgency=medium
+
+ * Server: Use "postmaster" as default --from-email address
+ rather than "unknown@server".
-+ * debug-me.default: Include a --from-email setting,
-+ to encourage it be configured.
++ * 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.
+
+ -- Joey Hess <id@joeyh.name> Tue, 09 May 2017 11:45:41 -0400
+
@@ -33,7 +35,39 @@ A single combined diff, containing all the changes, follows.
* First release of debug-me.
--- debug-me-1.20170505.orig/Server.hs
+++ debug-me-1.20170505/Server.hs
-@@ -262,7 +262,7 @@ emailSessionLog email o logfile
+@@ -33,6 +33,7 @@ import System.IO
+ import System.Directory
+ import System.Mem.Weak
+ import Network.Mail.Mime
++import System.Environment
+
+ type ServerState = M.Map SessionID Session
+
+@@ -95,7 +96,9 @@ closeSession :: Session -> STM ()
+ closeSession (Session bchan _ _) = closeTMChan bchan
+
+ server :: ServerOpts -> IO ()
+-server o = runSettings settings . app o =<< newServerState
++server o = do
++ o' <- checkEnv o
++ runSettings settings . app o' =<< newServerState
+ where
+ settings =
+ -- Prefer IPv6 but allow IPv4 as well
+@@ -105,6 +108,12 @@ server o = runSettings settings . app o
+ setPort (serverPort o) $
+ defaultSettings
+
++checkEnv :: ServerOpts -> IO ServerOpts
++checkEnv o = go <$> lookupEnv "DEBUG_ME_FROM_EMAIL"
++ where
++ go Nothing = o
++ go (Just email) = o { serverEmail = Just (T.pack email) }
++
+ app :: ServerOpts -> TVar ServerState -> Application
+ app o ssv = websocketsOr connectionOptions (websocketApp o ssv) webapp
+ where
+@@ -262,7 +271,7 @@ emailSessionLog email o logfile
| otherwise = return ()
where
to = Address Nothing email
@@ -42,12 +76,39 @@ A single combined diff, containing all the changes, follows.
subject = "Your recent debug-me session"
body = "Attached is the log from your recent debug-me session."
isemail = "@" `T.isInfixOf` email
+--- debug-me-1.20170505.orig/WebSockets.hs
++++ debug-me-1.20170505/WebSockets.hs
+@@ -144,7 +144,9 @@ runClientApp serverurl app = do
+ port = case uriPort serverauth of
+ (':':s) -> fromMaybe 80 (readMaybe s)
+ _ -> 80
+- endpoint = uriPath serverurl
++ endpoint = case uriPath serverurl of
++ [] -> "/"
++ p -> p
+
+ catchconnclosed ConnectionClosed = Just ()
+ catchconnclosed _ = Nothing
+--- debug-me-1.20170505.orig/debug-me.1
++++ debug-me-1.20170505/debug-me.1
+@@ -88,6 +88,8 @@ Specify a port for the debug-me server t
+ .IP "--from-email address"
+ The server will email session logs to users. It's a good idea to
+ provide a real email address, otherwise a dummy one will be used.
++You can also set the enviroment variable DEBUG_ME_FROM_EMAIL to configure
++this.
+ .IP "--delete-old-logs"
+ Normally the server will retain old log files so that users and developers
+ can refer to them. This option makes it delete the log file once the
--- debug-me-1.20170505.orig/debug-me.default
+++ debug-me-1.20170505/debug-me.default
-@@ -1,2 +1,2 @@
+@@ -1,2 +1,6 @@
++# Configure the email address that debug-me uses when emailing logs to
++# users.
++DEBUG_ME_FROM_EMAIL=postmaster
++
# Parameters to pass to debug-me when it's started as a daemon.
--DAEMON_PARAMS="--server /var/log/debug-me/ --delete-old-logs"
-+DAEMON_PARAMS="--server /var/log/debug-me/ --delete-old-logs --from-email postmaster"
+ DAEMON_PARAMS="--server /var/log/debug-me/ --delete-old-logs"
--- debug-me-1.20170505.orig/debug-me.init
+++ debug-me-1.20170505/debug-me.init
@@ -33,7 +33,7 @@ case "$1" in