cabal-debian 4.35.6 → 4.35.8
raw patch · 9 files changed
+60/−25 lines, 9 files
Files
- cabal-debian.cabal +1/−1
- debian/control +4/−4
- src/Debian/Debianize/DebInfo.hs +4/−0
- src/Debian/Debianize/Finalize.hs +6/−0
- src/Debian/Debianize/Goodies.hs +28/−19
- src/Debian/Debianize/Optparse.hs +4/−0
- src/Debian/Debianize/SourceDebDescription.hs +5/−1
- src/Debian/Orphans.hs +4/−0
- src/Debian/Policy.hs +4/−0
cabal-debian.cabal view
@@ -1,5 +1,5 @@ Name: cabal-debian-Version: 4.35.6+Version: 4.35.8 Copyright: Copyright (c) 2007-2014, David Fox, Jeremy Shaw License: BSD3 License-File: LICENSE
debian/control view
@@ -7,9 +7,9 @@ cdbs, ghc, ghc-prof,- libghc-cabal-dev (>= 1.16) | ghc,- libghc-cabal-dev (>= 1.18) | ghc,- libghc-cabal-prof (>= 1.18) | ghc-prof,+ ghc | libghc-cabal-dev (>= 1.16),+ ghc | libghc-cabal-dev (>= 1.18),+ ghc-prof | libghc-cabal-prof (>= 1.18), libghc-diff-dev (>= 0.3.1), libghc-diff-prof (>= 0.3.1), libghc-hunit-dev,@@ -57,7 +57,7 @@ libghc-utf8-string-dev, libghc-utf8-string-prof, Build-Depends-Indep: ghc-doc,- libghc-cabal-doc | ghc-doc,+ ghc-doc | libghc-cabal-doc, libghc-diff-doc, libghc-hunit-doc, libghc-unixutils-doc,
src/Debian/Debianize/DebInfo.hs view
@@ -108,7 +108,11 @@ import Debian.Relation (BinPkgName, Relations, SrcPkgName) import Debian.Version (DebianVersion) import Prelude hiding (init, init, log, log)+#if MIN_VERSION_hsemail(2,0,0)+import Text.Parsec.Rfc2822 (NameAddr)+#else import Text.ParserCombinators.Parsec.Rfc2822 (NameAddr)+#endif -- | Information required to represent a non-cabal debianization. data DebInfo
src/Debian/Debianize/Finalize.hs view
@@ -60,7 +60,11 @@ import System.Directory (doesFileExist) import System.FilePath ((<.>), (</>), makeRelative, splitFileName, takeDirectory, takeFileName) import System.IO (hPutStrLn, stderr)+#if MIN_VERSION_hsemail(2,0,0)+import Text.Parsec.Rfc2822 (NameAddr(..))+#else import Text.ParserCombinators.Parsec.Rfc2822 (NameAddr(..))+#endif import Text.PrettyPrint.HughesPJClass (Pretty(pPrint)) -- | @debianize customize@ initializes the CabalT state from the@@ -410,6 +414,8 @@ zoom (D.binaryDebDescription b . B.relations) $ do when (typ == B.Development) $ do B.depends %= (edds ++)+ B.depends %= (anyrel "${shlibs:Depends}" : )+ when (typ == B.Utilities) $ B.depends %= (anyrel "${shlibs:Depends}" : ) B.depends %= ([anyrel "${haskell:Depends}", anyrel "${misc:Depends}"] ++) B.recommends %= (anyrel "${haskell:Recommends}" : )
src/Debian/Debianize/Goodies.hs view
@@ -1,6 +1,6 @@ -- | Things that seem like they could be clients of this library, but -- are instead included as part of the library.-{-# LANGUAGE CPP, OverloadedStrings #-}+{-# LANGUAGE CPP, FlexibleContexts, OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-do-bind #-} module Debian.Debianize.Goodies ( tightDependencyFixup@@ -13,12 +13,14 @@ , oldClckwrksSiteFlags , oldClckwrksServerFlags , siteAtoms+ , logrotate , serverAtoms , backupAtoms , execAtoms ) where import Control.Lens+import Control.Monad.State (MonadState) import Data.Char (isSpace) import Data.List as List (dropWhileEnd, intercalate, intersperse, map) import Data.Map as Map (insert, insertWith)@@ -178,24 +180,7 @@ (A.debInfo . D.atomSet) %= (Set.insert $ D.Link b ("/etc/apache2/sites-available/" ++ D.domain site ++ ".conf") ("/etc/apache2/sites-enabled/" ++ D.domain site ++ ".conf")) (A.debInfo . D.atomSet) %= (Set.insert $ D.File b ("/etc/apache2/sites-available" </> D.domain site ++ ".conf") apacheConfig) (A.debInfo . D.atomSet) %= (Set.insert $ D.InstallDir b (apacheLogDirectory b))- (A.debInfo . D.logrotateStanza) %= Map.insertWith mappend b- (singleton- (Text.unlines $ [ pack (apacheAccessLog b) <> " {"- , " copytruncate" -- hslogger doesn't notice when the log is rotated, maybe this will help- , " weekly"- , " rotate 5"- , " compress"- , " missingok"- , "}"]))- (A.debInfo . D.logrotateStanza) %= Map.insertWith mappend b- (singleton- (Text.unlines $ [ pack (apacheErrorLog b) <> " {"- , " copytruncate"- , " weekly"- , " rotate 5"- , " compress"- , " missingok"- , "}" ]))) .+ {-logrotate b-}) . serverAtoms pkgDesc b (D.server site) True where -- An apache site configuration file. This is installed via a line@@ -235,6 +220,30 @@ , " ProxyPassReverse / http://127.0.0.1:" <> port' <> "/" , "</VirtualHost>" ] port' = pack (show (D.port (D.server site)))++-- | Install configuration files to do log rotation. This does not+-- work well with the haskell logging library, so it is no longer+-- called in siteAtoms.+logrotate :: MonadState CabalInfo m => BinPkgName -> m ()+logrotate b = do+ (A.debInfo . D.logrotateStanza) %= Map.insertWith mappend b+ (singleton+ (Text.unlines $ [ pack (apacheAccessLog b) <> " {"+ , " copytruncate" -- hslogger doesn't notice when the log is rotated, maybe this will help+ , " weekly"+ , " rotate 5"+ , " compress"+ , " missingok"+ , "}"]))+ (A.debInfo . D.logrotateStanza) %= Map.insertWith mappend b+ (singleton+ (Text.unlines $ [ pack (apacheErrorLog b) <> " {"+ , " copytruncate"+ , " weekly"+ , " rotate 5"+ , " compress"+ , " missingok"+ , "}" ])) serverAtoms :: PackageDescription -> BinPkgName -> D.Server -> Bool -> CabalInfo -> CabalInfo serverAtoms pkgDesc b server' isSite =
src/Debian/Debianize/Optparse.hs view
@@ -46,7 +46,11 @@ import System.Environment (getArgs) import System.FilePath(splitFileName, (</>)) import System.Process (showCommandForUser)+#if MIN_VERSION_hsemail(2,0,0)+import Text.Parsec.Rfc2822 (NameAddr(..))+#else import Text.ParserCombinators.Parsec.Rfc2822 (NameAddr(..))+#endif import Text.PrettyPrint.ANSI.Leijen (linebreak, (<+>), string, indent) import qualified Debian.Debianize.DebInfo as D import qualified Data.Map as Map
src/Debian/Debianize/SourceDebDescription.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE DeriveDataTypeable, FlexibleInstances, TemplateHaskell, TypeSynonymInstances #-}+{-# LANGUAGE CPP, DeriveDataTypeable, FlexibleInstances, TemplateHaskell, TypeSynonymInstances #-} module Debian.Debianize.SourceDebDescription ( SourceDebDescription , newSourceDebDescription@@ -34,7 +34,11 @@ import Debian.Policy (PackagePriority, Section, StandardsVersion) import Debian.Relation (Relations, SrcPkgName) import Prelude hiding (init, init, log, log, unlines)+#if MIN_VERSION_hsemail(2,0,0)+import Text.Parsec.Rfc2822 (NameAddr)+#else import Text.ParserCombinators.Parsec.Rfc2822 (NameAddr)+#endif -- | This type represents the debian/control file, which is the core -- of the source package debianization. It includes the information
src/Debian/Orphans.hs view
@@ -27,7 +27,11 @@ import Language.Haskell.Extension (Extension(..), KnownExtension(..)) #endif import Network.URI (URI)+#if MIN_VERSION_hsemail(2,0,0)+import Text.Parsec.Rfc2822 (NameAddr(..))+#else import Text.ParserCombinators.Parsec.Rfc2822 (NameAddr(..))+#endif import Text.PrettyPrint.HughesPJClass (hcat, Pretty(pPrint), text) deriving instance Typeable Compiler
src/Debian/Policy.hs view
@@ -64,7 +64,11 @@ import System.FilePath ((</>)) import System.Process (readProcess) import Text.Parsec (parse)+#if MIN_VERSION_hsemail(2,0,0)+import Text.Parsec.Rfc2822 (address, NameAddr(..))+#else import Text.ParserCombinators.Parsec.Rfc2822 (address, NameAddr(..))+#endif import Text.PrettyPrint.HughesPJClass (Pretty(pPrint), text) import Text.Read (readMaybe)