packages feed

darcsden 1.1 → 1.1.1

raw patch · 5 files changed

+23/−33 lines, 5 files

Files

CHANGES.md view
@@ -1,6 +1,10 @@ # All changes by release  +## darcsden 1.1.1 (2015/4/22)++  * require ssh 0.3+ to avoid a vulnerability+ ## darcsden 1.1 (2013/07/20)    * finalise docs some more
darcsden.cabal view
@@ -1,5 +1,5 @@ name:            darcsden-version:         1.1+version:         1.1.1 synopsis:        Darcs repository UI and hosting/collaboration app (hub.darcs.net branch). description:     A web application and SSH server for browsing and hosting darcs@@ -17,7 +17,7 @@ maintainer:      Alex Suraci <suraci.alex@gmail.com>, Simon Michael <simon@joyful.com> homepage:        http://hackage.haskell.org/package/darcsden category:        Development, Distribution, Web-tested-with:     GHC==7.6.3+tested-with:     GHC==7.8.4 extra-source-files:                      CHANGES.md                     LICENSE@@ -166,7 +166,7 @@   if flag(ssh)     cpp-options: -DSSH_FLAG     build-depends:-      ssh >= 0.2.12+      ssh >= 0.3    build-depends:       base >= 4 && < 5@@ -257,7 +257,7 @@   if flag(ssh)     cpp-options: -DSSH_FLAG     build-depends:-      ssh >= 0.2.12+      ssh >= 0.3  executable darcsden-post-hook   hs-source-dirs:  src
public/uptime.txt view
@@ -1,1 +0,0 @@-success
src/DarcsDen/Handler/Repository.hs view
@@ -18,7 +18,6 @@ import System.Process (readProcessWithExitCode) import Database.CouchDB (doc) import Snap.Core-import Text.Printf (printf)  import qualified Darcs.Repository as R import qualified Darcs.Patch.V1.Core as P@@ -299,20 +298,14 @@     crumb = map pathToRepoItem . tail . inits          getMime p = do-        (exc, out, err) <- liftIO $ readProcessWithExitCode xdgMimePath ["query", "filetype", p] ""+        (exc, st_out, _) <- liftIO $ readProcessWithExitCode xdgMimePath ["query", "filetype", p] ""         if exc == ExitSuccess-         then do-             let removeCharset xs = maybe xs (flip take xs) (elemIndex ';' xs)-             let out' = removeCharset out-             let msg = printf "Identifying %s as: %s" p out'-             flip message s msg-             liftIO $ putStrLn msg-             return $ filter (not.isSpace) out'+         then return $ filter (not.isSpace) $ removeCharset st_out          else do-             let msg = printf "Could not run %s, defaulting to text/plain\nExit code: %s\nError:\n%s" xdgMimePath (show exc) err-             flip warn s msg-             liftIO $ putStrLn msg+             warn "Unable to identify file type, defaulting to plain text" s              return $ "text/plain"++    removeCharset xs = maybe xs (flip take xs) (elemIndex ';' xs)      pathToRepoItem p =         RepoItem
src/DarcsDen/Settings.hs view
@@ -4,8 +4,6 @@ module DarcsDen.Settings where import HSP import qualified Database.Redis.Redis as R-import Control.Monad.Trans (liftIO)-import DarcsDen.Util (doMarkdown')  multiuser, issuetrackers, deletefiles :: Bool adminEmail, adminName, sendEmail, sendName, hostname, basePort, basePath, baseUrl, version, version', buildDate, buildTime, couchHost, redisHost, redisPort, githubAppIdVarName, githubAppPwdVarName, googleAppIdVarName, googleAppPwdVarName :: String@@ -13,7 +11,6 @@ homeDir, usersDir, accessLog, errorLog, xdgMimePath :: FilePath siteLink, siteFooter, frontPageContent :: HSP XML --- hub.darcs.net settings:  -- optional features multiuser     = True  -- Enable user registration ?@@ -22,9 +19,9 @@  -- app url baseUrl  = "http://" ++ hostname ++ basePort ++ basePath-hostname = "hub.darcs.net"+hostname = "localhost" #ifndef DEBUG-basePort = ""+basePort = ":8900" #else basePort = ":8901" #endif@@ -42,8 +39,8 @@ googleAppPwdVarName = "GOOGLE_CLIENT_SECRET"  -- contact info-adminEmail = "simon@joyful.com"-adminName = "Simon"+adminEmail = "webmaster@"++hostname+adminName = "admin"  -- send address: you need to be able to send mails from -- this address using the default sendmail executable@@ -75,7 +72,7 @@  -- content -version = "1.1"+version = "1.1.1" #ifndef DEBUG version' = version #else@@ -84,20 +81,17 @@ buildDate = __DATE__ buildTime = __TIME__ -siteLink = <a class="name" href=(baseUrl) style="font-size:36px;"><% hostname %></a>+siteLink = <a class="name" href=(baseUrl)><% hostname %></a>  siteFooter =   <ul>-    <li><a href="http://hub.darcs.net/simon/darcsden">darcsden</a> <% version' %> built <% buildDate %> <% buildTime %></li>-    <li><a href="http://stats.pingdom.com/olo874j6ixzj/632910">uptime</a></li>+    <li>darcsden <% version' %> built <% buildDate %> <% buildTime %></li>     <% if null adminEmail         then <% "" %>-        else <% <li>report problems to <a href=("mailto:"++adminEmail++"?subject=darcsden:%20")><% adminName %></a> or <a href="irc://irc.freenode.net/#darcs">#darcs</a> or the <a href="http://hub.darcs.net/simon/darcsden/issues">issue tracker</a></li> %>+        else <% <li>report problems to <a href=("mailto:"++adminEmail++"?subject=darcsden:%20")><% adminName %></a></li> %>      %>   </ul>  frontPageContent =-  -- read front page content on each request for easy tweaking-  do h <- liftIO $ doMarkdown' `fmap` (readFile $ homeDir ++ "/docs/README.md")-     <div class="blurb markdown"><% cdata h %></div>-+   <p class="blurb">+   </p>