[Pkg-haskell-commits] darcs: haskell-dav: unstable backport
joeyh at debian.org
joeyh at debian.org
Thu Nov 15 16:51:52 UTC 2012
Thu Nov 15 16:49:45 UTC 2012 joeyh at debian.org
* unstable backport
Ignore-this: 94eebab63aa774cb6e91a24800ce3a30
M ./changelog +7
M ./control -7 +7
A ./patches/
A ./patches/series
A ./patches/unstable-backport
Thu Nov 15 16:49:45 UTC 2012 joeyh at debian.org
* unstable backport
Ignore-this: 94eebab63aa774cb6e91a24800ce3a30
diff -rN -u old-haskell-dav//changelog new-haskell-dav//changelog
--- old-haskell-dav//changelog 2012-11-15 16:51:52.775957350 +0000
+++ new-haskell-dav//changelog 2012-11-15 16:51:52.779878751 +0000
@@ -1,3 +1,10 @@
+haskell-dav (0.1-2) unstable; urgency=low
+
+ * Patches to use the oldver versions of lens, http-conduit, and http-types
+ in unstable.
+
+ -- Joey Hess <joeyh at debian.org> Thu, 15 Nov 2012 11:17:08 -0400
+
haskell-dav (0.1-1) experimental; urgency=low
* New upstream version.
diff -rN -u old-haskell-dav//control new-haskell-dav//control
--- old-haskell-dav//control 2012-11-15 16:51:52.767864607 +0000
+++ new-haskell-dav//control 2012-11-15 16:51:52.779878751 +0000
@@ -4,7 +4,7 @@
Maintainer: Debian Haskell Group <pkg-haskell-maintainers at lists.alioth.debian.org>
Uploaders: Clint Adams <clint at debian.org>
Build-Depends: debhelper (>= 7.0)
- , haskell-devscripts (>= 0.8.13)
+ , haskell-devscripts (>= 0.8.12)
, cdbs
, ghc
, ghc-prof
@@ -15,9 +15,9 @@
, libghc-cmdargs-prof
, libghc-http-conduit-dev (>> 1.4)
, libghc-http-conduit-prof
- , libghc-http-types-dev (>> 0.7)
+ , libghc-http-types-dev (>> 0.6)
, libghc-http-types-prof
- , libghc-lens-dev (>> 3.0)
+ , libghc-lens-dev (>> 2.4)
, libghc-lens-prof
, libghc-lifted-base-dev (>> 0.1)
, libghc-lifted-base-prof
@@ -29,12 +29,12 @@
, libghc-resourcet-prof
, libghc-transformers-dev (>> 0.3)
, libghc-transformers-prof
- , libghc-xml-conduit-dev (>> 1.0)
- , libghc-xml-conduit-dev (<< 1.1)
+ , libghc-xml-conduit-dev (>> 0.7)
+ , libghc-xml-conduit-dev (<< 0.7.0.3)
, libghc-xml-conduit-dev
, libghc-xml-conduit-prof
- , libghc-xml-hamlet-dev (>> 0.4)
- , libghc-xml-hamlet-dev (<< 0.5)
+ , libghc-xml-hamlet-dev (>> 0.3)
+ , libghc-xml-hamlet-dev (<< 0.3.0.2)
, libghc-xml-hamlet-dev
, libghc-xml-hamlet-prof
Build-Depends-Indep: ghc-doc
diff -rN -u old-haskell-dav//patches/series new-haskell-dav//patches/series
--- old-haskell-dav//patches/series 1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-dav//patches/series 2012-11-15 16:51:52.783720371 +0000
@@ -0,0 +1 @@
+unstable-backport
diff -rN -u old-haskell-dav//patches/unstable-backport new-haskell-dav//patches/unstable-backport
--- old-haskell-dav//patches/unstable-backport 1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-dav//patches/unstable-backport 2012-11-15 16:51:52.783720371 +0000
@@ -0,0 +1,149 @@
+Description: backport to unstable
+ Adjust code and build deps for packages in unstable.
+ This mostly consisted of reverting 3 commits in upstream git:
+ f49d16fd6a0d15b68b3b8587f952535c8d027103
+ 34b30b4917097d067ef8f69666266e65742d6095
+ d3ca5d99fc5d6f62987f27f5a446fa5dd3897092
+Author: Joey Hess <joeyh at debian.org>
+
+--- haskell-dav-0.1.orig/DAV.cabal
++++ haskell-dav-0.1/DAV.cabal
+@@ -24,35 +24,32 @@ library
+ exposed-modules: Network.Protocol.HTTP.DAV
+ other-modules: Network.Protocol.HTTP.DAV.TH
+ ghc-options: -Wall
+- build-depends: base >= 4.5 && <= 5
++ build-depends: base ==4.5.*
+ , bytestring
+ , case-insensitive >= 0.4
+- , containers
+ , http-conduit >= 1.4
+- , http-types >= 0.7
+- , lens >= 3.0
++ , http-types >= 0.6
++ , lens >= 2.4
+ , lifted-base >= 0.1
+ , mtl >= 2.1
+ , resourcet >= 0.3
+ , transformers >= 0.3
+- , xml-conduit >= 1.0 && <= 1.1
+- , xml-hamlet >= 0.4 && <= 0.5
++ , xml-conduit >= 0.7 && <= 0.7.0.3
++ , xml-hamlet >= 0.3 && <= 0.3.0.1
+ executable hdav
+ main-is: hdav.hs
+ ghc-options: -Wall
+- build-depends: base >= 4.5 && <= 5
+- , bytestring
++ build-depends: base ==4.5.*
+ , bytestring
+ , case-insensitive >= 0.4
+ , cmdargs >= 0.9
+- , containers
+ , http-conduit >= 1.4
+- , http-types >= 0.7
+- , lens >= 3.0
++ , http-types >= 0.6
++ , lens >= 2.4
+ , lifted-base >= 0.1
+ , mtl >= 2.1
+ , network >= 2.3
+ , resourcet >= 0.3
+ , transformers >= 0.3
+- , xml-conduit >= 1.0 && <= 1.1
+- , xml-hamlet >= 0.4 && <= 0.5
++ , xml-conduit >= 0.7 && <= 0.7.0.3
++ , xml-hamlet >= 0.3 && <= 0.3.0.1
+--- haskell-dav-0.1.orig/Network/Protocol/HTTP/DAV.hs
++++ haskell-dav-0.1/Network/Protocol/HTTP/DAV.hs
+@@ -39,12 +39,11 @@ import Control.Monad.Trans.State.Lazy (e
+
+ import qualified Data.ByteString as B
+ import qualified Data.ByteString.Lazy as BL
+-import qualified Data.Map as Map
+
+ import Data.Maybe (fromMaybe)
+
+ import Network.HTTP.Conduit (httpLbs, parseUrl, applyBasicAuth, Request(..), RequestBody(..), Response(..), newManager, closeManager, ManagerSettings(..), def, HttpException(..))
+-import Network.HTTP.Types (hContentType, Method, RequestHeaders, unauthorized401)
++import Network.HTTP.Types (headerContentType, Method, RequestHeaders, unauthorized401)
+
+ import qualified Text.XML as XML
+ import Text.XML.Cursor (($/), (&/), element, node, fromDocument, checkName)
+@@ -98,7 +97,7 @@ getOptions = do
+
+ lockResource :: MonadResourceBase m => Bool -> DAVState m ()
+ lockResource nocreate = do
+- let ahs' = [(hContentType, "application/xml; charset=\"utf-8\""), (mk "Depth", "0"), (mk "Timeout", "Second-300")]
++ let ahs' = [headerContentType "application/xml; charset=\"utf-8\"", (mk "Depth", "0"), (mk "Timeout", "Second-300")]
+ let ahs = if nocreate then (mk "If-Match", "*"):ahs' else ahs'
+ lockresp <- davRequest "LOCK" ahs (xmlBody locky)
+ let hdrtoken = (lookup "Lock-Token" . responseHeaders) lockresp
+@@ -118,21 +117,21 @@ supportsLocking = liftA2 (&&) ("LOCK" `e
+
+ getAllProps :: MonadResourceBase m => DAVState m XML.Document
+ getAllProps = do
+- let ahs = [(hContentType, "application/xml; charset=\"utf-8\"")]
++ let ahs = [headerContentType "application/xml; charset=\"utf-8\""]
+ propresp <- davRequest "PROPFIND" ahs (xmlBody propname)
+ return $ (XML.parseLBS_ def . responseBody) propresp
+
+ getContent :: MonadResourceBase m => DAVState m (Maybe B.ByteString, BL.ByteString)
+ getContent = do
+ resp <- davRequest "GET" [] emptyBody
+- let ct = lookup (hContentType) (responseHeaders resp)
++ let ct = lookup (mk "Content-Type") (responseHeaders resp)
+ return $ (ct, responseBody resp)
+
+ putContent :: MonadResourceBase m => (Maybe B.ByteString, BL.ByteString) -> DAVState m ()
+ putContent (ct, body) = do
+ d <- get
+ let ahs' = fromMaybe [] (fmap (return . (,) (mk "If") . parenthesize) (d ^. lockToken))
+- let ahs = ahs' ++ fromMaybe [] (fmap (return . (,) (hContentType)) ct)
++ let ahs = ahs' ++ fromMaybe [] (fmap (return . (,) (mk "Content-Type")) ct)
+ _ <- davRequest "PUT" ahs (RequestBodyLBS body)
+ return ()
+
+@@ -147,7 +146,7 @@ parenthesize x = B.concat ["(", x, ")"]
+ putProps :: MonadResourceBase m => XML.Document -> DAVState m ()
+ putProps props = do
+ d <- get
+- let ah' = (hContentType, "application/xml; charset=\"utf-8\"")
++ let ah' = headerContentType "application/xml; charset=\"utf-8\""
+ let ahs = ah':fromMaybe [] (fmap (return . (,) (mk "If") . parenthesize) (_lockToken d))
+ _ <- davRequest "PROPPATCH" ahs ((RequestBodyLBS . props2patch) props) -- FIXME: should diff and remove props from target
+ return ()
+@@ -157,12 +156,11 @@ props2patch = XML.renderLBS XML.def . pa
+ where
+ props cursor = map node (cursor $/ element "{DAV:}response" &/ element "{DAV:}propstat" &/ element "{DAV:}prop" &/ checkName (not . flip elem blacklist))
+ patch prop = XML.Document (XML.Prologue [] Nothing []) (root prop) []
+- root [] = propertyupdate []
+- root prop = propertyupdate
+- [ XML.NodeElement $ XML.Element "D:set" Map.empty
+- [ XML.NodeElement $ XML.Element "D:prop" Map.empty prop ]
++ root [] = XML.Element "D:propertyupdate" [("xmlns:D", "DAV:")] []
++ root prop = XML.Element "D:propertyupdate" [("xmlns:D", "DAV:")]
++ [ XML.NodeElement $ XML.Element "D:set" []
++ [ XML.NodeElement $ XML.Element "D:prop" [] prop ]
+ ]
+- propertyupdate = XML.Element "D:propertyupdate" (Map.fromList [("xmlns:D", "DAV:")])
+ blacklist = [ "{DAV:}creationdate"
+ , "{DAV:}displayname"
+ , "{DAV:}getcontentlength"
+@@ -203,14 +201,14 @@ deleteContent url username password = wi
+ propname :: XML.Document
+ propname = XML.Document (XML.Prologue [] Nothing []) root []
+ where
+- root = XML.Element "D:propfind" (Map.fromList [("xmlns:D", "DAV:")]) [xml|
++ root = XML.Element "D:propfind" [("xmlns:D", "DAV:")] [xml|
+ <D:allprop>
+ |]
+
+ locky :: XML.Document
+ locky = XML.Document (XML.Prologue [] Nothing []) root []
+ where
+- root = XML.Element "D:lockinfo" (Map.fromList [("xmlns:D", "DAV:")]) [xml|
++ root = XML.Element "D:lockinfo" [("xmlns:D", "DAV:")] [xml|
+ <D:lockscope>
+ <D:exclusive>
+ <D:locktype>
More information about the Pkg-haskell-commits
mailing list