diff options
-rw-r--r-- | Utility/WebApp.hs | 22 | ||||
-rw-r--r-- | Utility/Yesod.hs | 32 | ||||
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | debian/control | 10 | ||||
-rw-r--r-- | debian/copyright | 4 | ||||
-rw-r--r-- | git-annex.cabal | 13 |
6 files changed, 18 insertions, 65 deletions
diff --git a/Utility/WebApp.hs b/Utility/WebApp.hs index 54f2d6f2b..ce6a61c42 100644 --- a/Utility/WebApp.hs +++ b/Utility/WebApp.hs @@ -94,11 +94,7 @@ fixSockAddr addr = addr -- disable buggy sloworis attack prevention code webAppSettings :: Settings -#if MIN_VERSION_warp(2,1,0) webAppSettings = setTimeout halfhour defaultSettings -#else -webAppSettings = defaultSettings { settingsTimeout = halfhour } -#endif where halfhour = 30 * 60 @@ -155,11 +151,7 @@ lookupRequestField k req = fromMaybe "" . lookup k $ Wai.requestHeaders req {- Rather than storing a session key on disk, use a random key - that will only be valid for this run of the webapp. -} -#if MIN_VERSION_yesod(1,2,0) webAppSessionBackend :: Yesod.Yesod y => y -> IO (Maybe Yesod.SessionBackend) -#else -webAppSessionBackend :: Yesod.Yesod y => y -> IO (Maybe (Yesod.SessionBackend y)) -#endif webAppSessionBackend _ = do g <- newGenIO :: IO SystemRandom case genBytes 96 g of @@ -170,18 +162,8 @@ webAppSessionBackend _ = do where timeout = 120 * 60 -- 120 minutes use key = -#if MIN_VERSION_yesod(1,2,0) Just . Yesod.clientSessionBackend key . fst <$> Yesod.clientSessionDateCacher timeout -#else -#if MIN_VERSION_yesod(1,1,7) - Just . Yesod.clientSessionBackend2 key . fst - <$> Yesod.clientSessionDateCacher timeout -#else - return $ Just $ - Yesod.clientSessionBackend key timeout -#endif -#endif #ifdef WITH_WEBAPP_SECURE type AuthToken = SecureMem @@ -219,11 +201,7 @@ genAuthToken = do - Note that the usual Yesod error page is bypassed on error, to avoid - possibly leaking the auth token in urls on that page! -} -#if MIN_VERSION_yesod(1,2,0) checkAuthToken :: (Monad m, Yesod.MonadHandler m) => (Yesod.HandlerSite m -> AuthToken) -> m Yesod.AuthResult -#else -checkAuthToken :: forall t sub. (t -> AuthToken) -> Yesod.GHandler sub t Yesod.AuthResult -#endif checkAuthToken extractAuthToken = do webapp <- Yesod.getYesod req <- Yesod.getRequest diff --git a/Utility/Yesod.hs b/Utility/Yesod.hs index 231bb291e..a8055d34d 100644 --- a/Utility/Yesod.hs +++ b/Utility/Yesod.hs @@ -20,69 +20,37 @@ module Utility.Yesod #if ! MIN_VERSION_yesod(1,4,0) , withUrlRenderer #endif -#if ! MIN_VERSION_yesod(1,2,0) - , Html -#endif ) where -#if MIN_VERSION_yesod(1,2,0) import Yesod as Y -#else -import Yesod as Y hiding (Html) -#endif -#if MIN_VERSION_yesod_form(1,3,8) import Yesod.Form.Bootstrap3 as Y hiding (bfs) -#else -import Assistant.WebApp.Bootstrap3 as Y hiding (bfs) -#endif #ifndef __NO_TH__ import Yesod.Default.Util import Language.Haskell.TH.Syntax (Q, Exp) -#if MIN_VERSION_yesod_default(1,1,0) import Data.Default (def) import Text.Hamlet hiding (Html) #endif -#endif #if ! MIN_VERSION_yesod(1,4,0) -#if MIN_VERSION_yesod(1,2,0) import Data.Text (Text) #endif -#endif #ifndef __NO_TH__ widgetFile :: String -> Q Exp -#if ! MIN_VERSION_yesod_default(1,1,0) -widgetFile = widgetFileNoReload -#else widgetFile = widgetFileNoReload $ def { wfsHamletSettings = defaultHamletSettings { hamletNewlines = AlwaysNewlines } } -#endif hamletTemplate :: FilePath -> FilePath hamletTemplate f = globFile "hamlet" f #endif {- Lift Handler to Widget -} -#if MIN_VERSION_yesod(1,2,0) liftH :: Monad m => HandlerT site m a -> WidgetT site m a liftH = handlerToWidget -#else -liftH :: MonadLift base m => base a -> m a -liftH = lift -#endif -{- Misc new names for stuff. -} -#if ! MIN_VERSION_yesod(1,2,0) -withUrlRenderer :: forall master sub. HtmlUrl (Route master) -> GHandler sub master RepHtml -withUrlRenderer = hamletToRepHtml - -type Html = RepHtml -#else #if ! MIN_VERSION_yesod_core(1,2,20) withUrlRenderer :: MonadHandler m => ((Route (HandlerSite m) -> [(Text, Text)] -> Text) -> output) -> m output withUrlRenderer = giveUrlRenderer #endif -#endif diff --git a/debian/changelog b/debian/changelog index ad08554d8..e71152bd7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ git-annex (5.20150421) UNRELEASED; urgency=medium * S3: Enable debug logging when annex.debug or --debug is set. + * Dropped support for older versions of yesod and warp than the ones + in Debian Jessie. -- Joey Hess <id@joeyh.name> Tue, 21 Apr 2015 15:54:10 -0400 diff --git a/debian/control b/debian/control index 85a3e67e6..f49751251 100644 --- a/debian/control +++ b/debian/control @@ -33,13 +33,15 @@ Build-Depends: libghc-stm-dev (>= 2.3), libghc-dbus-dev (>= 0.10.3) [linux-any], libghc-fdo-notify-dev (>= 0.3) [linux-any], - libghc-yesod-dev [i386 amd64 kfreebsd-i386 kfreebsd-amd64 powerpc], - libghc-yesod-static-dev [i386 amd64 kfreebsd-i386 kfreebsd-amd64 powerpc], - libghc-yesod-default-dev [i386 amd64 kfreebsd-amd64 powerpc], + libghc-yesod-dev (>= 1.2.6.1) [i386 amd64 kfreebsd-i386 kfreebsd-amd64 powerpc], + libghc-yesod-core-dev (>= 1.2.19) [i386 amd64 kfreebsd-i386 kfreebsd-amd64 powerpc], + libghc-yesod-form-dev (>= 1.3.15) [i386 amd64 kfreebsd-i386 kfreebsd-amd64 powerpc], + libghc-yesod-static-dev (>= 1.2.4) [i386 amd64 kfreebsd-i386 kfreebsd-amd64 powerpc], + libghc-yesod-default-dev (>= 1.2.0) [i386 amd64 kfreebsd-amd64 powerpc], libghc-hamlet-dev [i386 amd64 kfreebsd-i386 kfreebsd-amd64 powerpc], libghc-shakespeare-dev [i386 amd64 kfreebsd-i386 kfreebsd-amd64 powerpc], libghc-clientsession-dev [i386 amd64 kfreebsd-i386 kfreebsd-amd64 powerpc], - libghc-warp-dev [i386 amd64 kfreebsd-i386 kfreebsd-amd64 powerpc], + libghc-warp-dev (>= 3.0.0.5) [i386 amd64 kfreebsd-i386 kfreebsd-amd64 powerpc], libghc-warp-tls-dev [i386 amd64 kfreebsd-i386 kfreebsd-amd64 powerpc], libghc-wai-dev [i386 amd64 kfreebsd-i386 kfreebsd-amd64 powerpc], libghc-wai-extra-dev [i386 amd64 kfreebsd-i386 kfreebsd-amd64 powerpc], diff --git a/debian/copyright b/debian/copyright index 7b9807680..322d68f04 100644 --- a/debian/copyright +++ b/debian/copyright @@ -28,10 +28,6 @@ Files: Utility/Gpg.hs Utility/DirWatcher* Copyright: © 2010-2014 Joey Hess <id@joeyh.name> License: GPL-3+ -Files: Assistant/WebApp/Bootstrap3.hs -Copyright: 2010 Michael Snoyman -License: BSD-2-clause - Files: doc/logo* */favicon.ico standalone/osx/git-annex.app/Contents/Resources/git-annex.icns standalone/android/icons/* Copyright: 2007 Henrik Nyh <http://henrik.nyh.se/> 2010 Joey Hess <id@joeyh.name> diff --git a/git-annex.cabal b/git-annex.cabal index e49bb9a58..dc1773224 100644 --- a/git-annex.cabal +++ b/git-annex.cabal @@ -199,10 +199,17 @@ Executable git-annex if flag(Webapp) Build-Depends: - yesod, yesod-default, yesod-static, yesod-form, yesod-core, - wai, wai-extra, warp, warp-tls, + yesod (>= 1.2.6), + yesod-default (>= 1.2.0), + yesod-static (>= 1.2.4), + yesod-form (>= 1.3.15), + yesod-core (>= 1.2.19), + path-pieces (>= 0.1.4), + warp (>= 3.0.0.5), + warp-tls, + wai, wai-extra, blaze-builder, crypto-api, hamlet, clientsession, - template-haskell, aeson, path-pieces, + template-haskell, aeson, shakespeare CPP-Options: -DWITH_WEBAPP if flag(Webapp) && flag (Webapp-secure) |