packages feed

cabal-debian 4.24.8 → 4.24.9

raw patch · 4 files changed

+32/−87 lines, 4 filesdep ~prettyPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: pretty

API changes (from Hackage documentation)

Files

Tests.hs view
@@ -580,13 +580,13 @@ test6 :: String -> Test test6 label =     TestLabel label $-    TestCase (do result <- readProcessWithExitCode "runhaskell" ["-isrc", "-DMIN_VERSION_Cabal(a,b,c)=1", "test-data/artvaluereport2/input/debian/Debianize.hs"] ""+    TestCase (do result <- readProcessWithExitCode "runhaskell" ["--ghc-arg=-package-db=dist/package.conf.inplace", "test-data/artvaluereport2/input/debian/Debianize.hs", "--dry-run"] ""                  assertEqual label (ExitSuccess, "", "") result)  test7 :: String -> Test test7 label =     TestLabel label $-    TestCase (do new <- readProcessWithExitCode "runhaskell" ["-isrc", "-DMIN_VERSION_Cabal(a,b,c)=1", "debian/Debianize.hs", "--executable=cabal-debian", "--executable=cabal-debian-tests", "--standards-version=3.9.3", "--native"] ""+    TestCase (do new <- readProcessWithExitCode "runhaskell" ["--ghc-arg=-package-db=dist/package.conf.inplace", "debian/Debianize.hs", "--dry-run", "--native"] ""                  assertEqual label (ExitSuccess, "", "Ignored: debian/cabal-debian.1\nIgnored: debian/cabal-debian.manpages\n") new)  test8 :: String -> Test
cabal-debian.cabal view
@@ -1,5 +1,5 @@ Name:           cabal-debian-Version:        4.24.8+Version:        4.24.9 Copyright:      Copyright (c) 2007-2014, David Fox, Jeremy Shaw License:        BSD3 License-File:   LICENSE@@ -284,7 +284,8 @@   if !flag(local-debian)     Build-Depends: debian >= 3.87 -Executable cabal-debian-tests+Test-Suite cabal-debian-tests+  Type: exitcode-stdio-1.0   Hs-Source-Dirs: .   Main-is: Tests.hs   ghc-options: -threaded -Wall -O2
debian/Debianize.hs view
@@ -1,107 +1,41 @@--- To run the test: runhaskell -isrc -DMIN_VERSION_Cabal\(a,b,c\)=1 debian/Debianize.hs------ This doesn't actually modify the debianization, it just sees--- whether the debianization it would have generated matches the one--- that is already in debian/.  If not it either means a bug was--- introduced, or the changes are good and need to be checked in.------ Be sure to run it with the local-debian flag turned off!--import OldLens hiding ((%=), (~=))+-- To run the test: runhaskell --ghc-arg=-package-db=dist/package.conf.inplace debian/Debianize.hs --dry-run  import Control.Exception (throw)-import Control.Monad.State (get)-import Data.Default (def)-import Data.List (intercalate)+import Control.Monad.State (evalStateT) import Data.Map as Map (insert)-import Data.Maybe (fromMaybe)-import Data.Monoid (mempty)-import Data.Set as Set (singleton, insert)-import Data.Text as Text (Text, pack)+import Data.Set as Set (insert)+import Data.Text as Text (pack) import Data.Version (Version(Version))-import Debian.Changes (ChangeLog(ChangeLog)) import Debian.Debianize+import Debian.Relation (BinPkgName(BinPkgName), Relations, parseRelations) import Distribution.Package (PackageName(PackageName))-{--import Debian.Debianize (inputChangeLog, inputDebianization)-import Debian.Debianize.Details (debianDefaultAtoms)-import Debian.Debianize.Finalize (debianize)-import Debian.Debianize.InputCabalPackageDescription (newFlags)-import Debian.Debianize.Types as T-    (changelog, compat, conflicts, control, depends, debianDescription, homepage, packageDescription,-     installCabalExec, sourceFormat, standardsVersion, utilsPackageNameBase, copyright, xDescription)-import Debian.Debianize.Types.Atoms as T (Atoms, newAtoms, DebInfo, debInfo, makeDebInfo, atomSet, Atom(..))-import Debian.Debianize.Monad (Atoms, CabalT, execCabalT, evalCabalT, execDebianT, liftCabal)-import Debian.Debianize.Output (compareDebianization)-import Debian.Debianize.Prelude ((~=), (~?=), (%=), (+=), (++=))-import Debian.Debianize.Types.CopyrightDescription (CopyrightDescription(..), FilesOrLicenseDescription(..), newCopyrightDescription)-import Debian.Debianize.Types.SourceDebDescription (SourceDebDescription)-import Debian.Policy (SourceFormat(Native3), StandardsVersion(StandardsVersion), License(OtherLicense))--}-import Debian.Relation (BinPkgName(BinPkgName), Relation(Rel), VersionReq(SLT, GRE), Relations, parseRelations)-import Debian.Version (parseDebianVersion)-import Distribution.Compiler(CompilerFlavor(GHC))-import Prelude hiding (log)-import System.Directory (copyFile)  main :: IO ()-main =-    do -- Copy the changelog into the top directory so that hackage-       -- will see it.-       copyFile "debian/changelog" "changelog"-       -- This is both a debianization script and a unit test - it-       -- makes sure the debianization generated matches the one-       -- checked into version control.-       log <- newFlags >>= newCabalInfo >>= evalCabalT (liftCabal inputChangeLog >> access (debInfo . changelog))-       old <- newFlags >>= execDebianT inputDebianization . makeDebInfo-       new <- newFlags >>= newCabalInfo >>= execCabalT (debianize (do debianDefaults-                                                                      (debInfo . changelog) ~?= log-                                                                      customize-                                                                      copyFirstLogEntry old))-       diff <- compareDebianization old (getL debInfo new)-       case diff of-         "" -> return ()-         s -> error $ "Debianization mismatch:\n" ++ s-       -- This would overwrite the existing debianization rather than-       -- just make sure it matches:-       -- writeDebianization "." new+main = newFlags >>= newCabalInfo >>= evalStateT cabalDebian     where+      cabalDebian = do+        -- Read and inspect the cabal info to compute the debianization+        debianize customize+        -- Write, compare, or validate the resulting debianization,+        -- or print usage message, depending on options.+        finishDebianization+       customize :: Monad m => CabalT m ()       customize =-          do mapCabal (PackageName "Cabal") (DebBase "cabal-122")+          do debianDefaults+             -- Force some values so they match the expected results rather than+             -- changing as new package versions arrive.+             mapCabal (PackageName "Cabal") (DebBase "cabal-122")              splitCabal (PackageName "Cabal") (DebBase "cabal") (Version [1,22] [])              (debInfo . sourceFormat) ~= Just Native3              (debInfo . control . standardsVersion) ~= Just (StandardsVersion 3 9 3 Nothing)              (debInfo . compat) ~= Just 9              (debInfo . utilsPackageNameBase) ~= Just "cabal-debian"-             -- (copyright . debInfo) %= (Just . copyrightFn . fromMaybe def)-             -- (conflicts . relations . binaryDebDescription (BinPkgName "cabal-debian") . debInfo) %= (++ (rels "haskell-debian-utils (<< 3.59)"))              (debInfo . binaryDebDescription (BinPkgName "cabal-debian") . relations . depends) %= (++ (rels "apt-file, debian-policy, debhelper, haskell-devscripts (>= 0.8.19)"))              (debInfo . binaryDebDescription (BinPkgName "libghc-cabal-debian-dev") . relations . depends) %= (++ (rels "debian-policy"))-             (debInfo . executable) %= (Map.insert (BinPkgName "cabal-debian-tests") (InstallFile "cabal-debian-tests" Nothing Nothing "cabal-debian-tests"))              (debInfo . atomSet) %= (Set.insert $ InstallCabalExec (BinPkgName "cabal-debian") "cabal-debian" "usr/bin")              (debInfo . utilsPackageNameBase) ~= Just "cabal-debian"-             -- extraDevDeps (BinPkgName "debian-policy")              (debInfo . control . homepage) ~= Just (pack "https://github.com/ddssff/cabal-debian")  rels :: String -> Relations rels = either (throw . userError . show) id . parseRelations---- | This copies the first log entry of deb1 into deb2.  Because the--- debianization process updates that log entry, we need to undo that--- update in order to get a clean comparison.-copyFirstLogEntry :: Monad m => DebInfo -> CabalT m ()-copyFirstLogEntry src =-    do dst <- get-       let Just (ChangeLog (hd1 : _)) = getL changelog src-           Just (ChangeLog (_ : tl2)) = getL (debInfo . changelog) dst-       (debInfo . changelog) ~= Just (ChangeLog (hd1 : tl2))-{--    get >>= \ dst -> -copyFirstLogEntry :: Atoms -> Atoms -> Atoms-copyFirstLogEntry deb1 deb2 =-    modL changelog (const (Just (ChangeLog (hd1 : tl2)))) deb2-    where-      ChangeLog (hd1 : _) = fromMaybe (error "Missing debian/changelog") (getL changelog deb1)-      ChangeLog (_ : tl2) = fromMaybe (error "Missing debian/changelog") (getL changelog deb2)--}
debian/changelog view
@@ -1,3 +1,13 @@+haskell-cabal-debian (4.24.9) unstable; urgency=low++  * Make debian/Debianize.hs a standard debianization script+  * Make the test executable into a cabal test suite+  * Make ghc-7.10 support official+  * Simplify main in CabalDebian.hs+  * Get rid of old --substvars option++ -- David Fox <dsf@seereason.com>  Wed, 01 Apr 2015 10:00:45 -0700+ haskell-cabal-debian (4.24.8) unstable; urgency=low    * use ghcjs --numeric-ghc-version to set the compilerInfoCompat field