[Pkg-haskell-commits] [package-plan] 01/01: patch notmuch-web for newer conduit/resourcet

Clint Adams clint at moszumanska.debian.org
Tue Jun 10 11:56:09 UTC 2014


This is an automated email from the git hooks/post-receive script.

clint pushed a commit to branch conduit-1.1
in repository package-plan.

commit 53b5e6407a925313fb4a3c30b09bd6c6cc3cec2c
Author: Clint Adams <clint at debian.org>
Date:   Tue Jun 10 07:55:55 2014 -0400

    patch notmuch-web for newer conduit/resourcet
---
 patches/notmuch-web/0.2.0/config-in-etc            | 40 ++++++++++++++++++
 patches/notmuch-web/0.2.0/newer-resourcet.diff     | 48 ++++++++++++++++++++++
 .../notmuch-web/0.2.0/no-attoparsec-conduit.diff   | 32 +++++++++++++++
 patches/notmuch-web/0.2.0/series                   |  4 ++
 patches/notmuch-web/0.2.0/testsuite-http-code      | 12 ++++++
 5 files changed, 136 insertions(+)

diff --git a/patches/notmuch-web/0.2.0/config-in-etc b/patches/notmuch-web/0.2.0/config-in-etc
new file mode 100644
index 0000000..e694e24
--- /dev/null
+++ b/patches/notmuch-web/0.2.0/config-in-etc
@@ -0,0 +1,40 @@
+--- a/main.hs
++++ b/main.hs
+@@ -27,7 +27,7 @@
+ import System.Environment   (getArgs)
+ import System.Exit          (exitWith, ExitCode(..))
+ import System.IO            (hSetEcho, hFlush, stdin, stdout, hPutStrLn, stderr)
+-import Yesod.Default.Config (fromArgs)
++import Yesod.Default.Config (fromArgsSettings, configSettings, ConfigSettings(csParseExtra, csFile))
+ import Yesod.Default.Main   (defaultMain)
+ 
+ genPassword :: IO ()
+@@ -51,4 +51,7 @@
+   a <- getArgs
+   if "--make-password" `elem` a
+     then genPassword
+-    else defaultMain (fromArgs parseExtra) makeApplication
++    else defaultMain etchack makeApplication
++  where
++      etchack = fromArgsSettings $ \env -> return (configSettings env) { csParseExtra = parseExtra
++                                                                       , csFile = const (return "/etc/notmuch-web/settings.yml") }
+--- a/notmuch-web.cabal
++++ b/notmuch-web.cabal
+@@ -146,7 +146,7 @@
+                      , warp
+                      , xss-sanitize                  >= 0.3.4
+                      , yaml
+-                     , yesod                         >= 1.2    && < 1.3
++                     , yesod                         >= 1.2.2  && < 1.3
+                      , yesod-auth
+                      , yesod-static                  >= 1.2.1  && < 1.3
+     else
+@@ -194,7 +194,7 @@
+                      , warp
+                      , xss-sanitize                  >= 0.3.4
+                      , yaml
+-                     , yesod                         >= 1.2    && < 1.3
++                     , yesod                         >= 1.2.2  && < 1.3
+                      , yesod-auth
+                      , yesod-static                  >= 1.2.1  && < 1.3
+ 
diff --git a/patches/notmuch-web/0.2.0/newer-resourcet.diff b/patches/notmuch-web/0.2.0/newer-resourcet.diff
new file mode 100644
index 0000000..a99d18b
--- /dev/null
+++ b/patches/notmuch-web/0.2.0/newer-resourcet.diff
@@ -0,0 +1,48 @@
+--- a/src/NotmuchCmd.hs
++++ b/src/NotmuchCmd.hs
+@@ -54,6 +54,7 @@
+ import Control.Exception (Exception, throw)
+ import Control.Applicative
+ import Control.Monad.IO.Class (MonadIO(..))
++import Control.Monad.Trans.Resource (MonadResource, runResourceT)
+ import Data.Aeson
+ import Data.Aeson.Types (Parser)
+ import Data.ByteString (ByteString)
+--- a/notmuch-web.cabal
++++ b/notmuch-web.cabal
+@@ -134,6 +134,7 @@
+                      , process-conduit               >= 0.5
+                      , pwstore-fast
+                      , random
++                     , resourcet
+                      , tagsoup
+                      , template-haskell
+                      , text
+@@ -181,6 +182,7 @@
+                      , process-conduit               >= 0.5
+                      , pwstore-fast
+                      , random
++                     , resourcet
+                      , tagsoup
+                      , template-haskell
+                      , text
+--- a/src/Handler/Abook.hs
++++ b/src/Handler/Abook.hs
+@@ -18,6 +18,7 @@
+ 
+ import Import
+ import Control.Exception.Lifted (try)
++import Control.Monad.Trans.Resource (runResourceT)
+ import Data.Conduit.Process
+ import System.Exit (ExitCode(..))
+ import qualified Data.Text as T
+--- a/src/Handler/View.hs
++++ b/src/Handler/View.hs
+@@ -28,6 +28,7 @@
+ import Handler.Tags
+ 
+ import Blaze.ByteString.Builder (fromByteString)
++import Control.Monad.Trans.Resource (ResourceT)
+ import Text.Blaze.Html.Renderer.Text (renderHtml)
+ import Text.Markdown
+ import qualified Data.ByteString as B
diff --git a/patches/notmuch-web/0.2.0/no-attoparsec-conduit.diff b/patches/notmuch-web/0.2.0/no-attoparsec-conduit.diff
new file mode 100644
index 0000000..c9df68b
--- /dev/null
+++ b/patches/notmuch-web/0.2.0/no-attoparsec-conduit.diff
@@ -0,0 +1,32 @@
+--- a/notmuch-web.cabal
++++ b/notmuch-web.cabal
+@@ -107,13 +107,13 @@
+ 
+                      , aeson
+                      , attoparsec
+-                     , attoparsec-conduit
+                      , blaze-builder
+                      , blaze-html
+                      , blaze-markup
+                      , bytestring
+                      , case-insensitive
+                      , conduit
++                     , conduit-extra
+                      , containers
+                      , directory
+                      , data-default
+@@ -154,13 +154,13 @@
+ 
+                      , aeson
+                      , attoparsec
+-                     , attoparsec-conduit
+                      , blaze-builder
+                      , blaze-html
+                      , blaze-markup
+                      , bytestring
+                      , case-insensitive
+                      , conduit
++                     , conduit-extra
+                      , containers
+                      , data-default
+                      , directory
diff --git a/patches/notmuch-web/0.2.0/series b/patches/notmuch-web/0.2.0/series
new file mode 100644
index 0000000..e9443ab
--- /dev/null
+++ b/patches/notmuch-web/0.2.0/series
@@ -0,0 +1,4 @@
+testsuite-http-code
+config-in-etc
+no-attoparsec-conduit.diff
+newer-resourcet.diff
diff --git a/patches/notmuch-web/0.2.0/testsuite-http-code b/patches/notmuch-web/0.2.0/testsuite-http-code
new file mode 100644
index 0000000..ac28087
--- /dev/null
+++ b/patches/notmuch-web/0.2.0/testsuite-http-code
@@ -0,0 +1,12 @@
+Index: haskell-notmuch-web-0.2.0/tests/HomeTest.hs
+===================================================================
+--- haskell-notmuch-web-0.2.0.orig/tests/HomeTest.hs	2014-03-11 08:53:21.497243833 +0100
++++ haskell-notmuch-web-0.2.0/tests/HomeTest.hs	2014-03-11 08:53:42.005243076 +0100
+@@ -11,6 +11,6 @@
+   ydescribe "Basic home page tests" $
+     yit "main page redirects to the login page" $ do
+       get HomeR
+-      statusIs 303
++      statusIs 302
+       get ("/auth/login" :: String)
+       bodyContains "Password"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-haskell/package-plan.git



More information about the Pkg-haskell-commits mailing list