Hello, On Sun, Aug 16, 2015 at 10:46:06PM +0200, Uwe Kleine-König wrote: > I'm currently in NM trying to become DD. As part of the process I > prepared an NMU for this with the following debdiff. It's that big > because I converted the package from dpatch to 3.0 (quilt). My AM asked me why I changed from dpatch to 3.0 and if it's appropriate to do this in an NMU. Well, reasons to do this are:
- it fixes the following lintian warnings: E: drift source: build-depends-on-obsolete-package build-depends: dpatch W: drift source: patch-system-but-no-source-readme W: drift source: debian-rules-uses-deprecated-makefile line 5 /usr/share/cdbs/1/rules/dpatch.mk - it fixes a build warning /usr/share/cdbs/1/rules/dpatch.mk:33: CDBS WARNING: dpatch.mk is deprecated since 0.4.85 - please use source format 3.0 (quilt) instead - 3.0 (quilt) it much easier to work with (I admit this might be subjective, but I don't expect that many people are still fluent in dpatch.) - it fixes #708822 (which I failed to point out in the changelog however) I spend some time to create an NMU that doesn't drop dpatch. The resulting debdiff is (obviously) nicer and I tend to slightly prefer this approach. Here is the new debdiff: diff -u drift-2.2.3/debian/changelog drift-2.2.3/debian/changelog --- drift-2.2.3/debian/changelog +++ drift-2.2.3/debian/changelog @@ -1,3 +1,11 @@ +drift (2.2.3-2.3) unstable; urgency=medium + + * Non-maintainer upload. + * fold upstream changes in 2.2.3-2.2's .diff.gz into ghc-7.4-fixes.dpatch + * fix build errors with ghc 7.6 (Closes: #713313, #753765) + + -- Uwe Kleine-König <u...@kleine-koenig.org> Wed, 09 Sep 2015 20:23:46 +0200 + drift (2.2.3-2.2) unstable; urgency=low * Non-maintainer upload. diff -u drift-2.2.3/debian/patches/00list drift-2.2.3/debian/patches/00list --- drift-2.2.3/debian/patches/00list +++ drift-2.2.3/debian/patches/00list @@ -1,0 +2 @@ +ghc-7.6-fixes.dpatch diff -u drift-2.2.3/debian/patches/ghc-7.4-fixes.dpatch drift-2.2.3/debian/patches/ghc-7.4-fixes.dpatch --- drift-2.2.3/debian/patches/ghc-7.4-fixes.dpatch +++ drift-2.2.3/debian/patches/ghc-7.4-fixes.dpatch @@ -281,0 +282,42 @@ +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' drift-2.2.3~/src/DataP.lhs drift-2.2.3/src/DataP.lhs +--- drift-2.2.3~/src/DataP.lhs 2008-02-10 14:38:31.000000000 +0000 ++++ drift-2.2.3/src/DataP.lhs 2012-09-18 21:23:49.074270747 +0100 +@@ -10,9 +10,9 @@ needs to be fixed. + >where + + >import ParseLib2 +->import Char +->import List +->import Monad ++>import Data.Char ++>import Data.List ++>import Control.Monad + + + >data Statement = DataStmt | NewTypeStmt deriving (Eq,Show) +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' drift-2.2.3~/src/DrIFT.hs drift-2.2.3/src/DrIFT.hs +--- drift-2.2.3~/src/DrIFT.hs ++++ drift-2.2.3/src/DrIFT.hs +@@ -17,7 +17,7 @@ import RuleUtils (commentLine,texts) + import RuleUtils(Rule,Tag) + import Version + import qualified Rules(rules) +-import qualified System ++import System.Environment (getArgs) + + data Op = OpList | OpDerive | OpVersion + +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' drift-2.2.3~/src/ParseLib2.hs drift-2.2.3/src/ParseLib2.hs +--- drift-2.2.3~/src/ParseLib2.hs ++++ drift-2.2.3/src/ParseLib2.hs +@@ -31,8 +31,8 @@ module ParseLib2 + many1_offside,many_offside,off, + opt, skipUntil, skipUntilOff,skipUntilParse,skipNest) where + +-import Char +-import Monad ++import Data.Char ++import Control.Monad + + infixr 5 +++ + reverted: --- drift-2.2.3/src/DataP.lhs +++ drift-2.2.3.orig/src/DataP.lhs @@ -10,9 +10,9 @@ >where >import ParseLib2 +>import Char +>import List +>import Monad ->import Data.Char ->import Data.List ->import Control.Monad >data Statement = DataStmt | NewTypeStmt deriving (Eq,Show) reverted: --- drift-2.2.3/src/DrIFT.hs +++ drift-2.2.3.orig/src/DrIFT.hs @@ -17,7 +17,7 @@ import RuleUtils(Rule,Tag) import Version import qualified Rules(rules) +import qualified System -import System.Environment (getArgs) data Op = OpList | OpDerive | OpVersion reverted: --- drift-2.2.3/src/ParseLib2.hs +++ drift-2.2.3.orig/src/ParseLib2.hs @@ -31,8 +31,8 @@ many1_offside,many_offside,off, opt, skipUntil, skipUntilOff,skipUntilParse,skipNest) where +import Char +import Monad -import Data.Char -import Control.Monad infixr 5 +++ only in patch2: unchanged: --- drift-2.2.3.orig/debian/patches/ghc-7.6-fixes.dpatch +++ drift-2.2.3/debian/patches/ghc-7.6-fixes.dpatch @@ -0,0 +1,52 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run + +@DPATCH@ +--- a/src/GenUtil.hs ++++ b/src/GenUtil.hs +@@ -96,16 +96,18 @@ + import Data.List(intersperse, sortBy, groupBy) + import Control.Monad hiding (replicateM, replicateM_) + import System.IO (hPutStr, stderr) +-import System.IO.Error(isDoesNotExistError) ++import System.IO.Error(isDoesNotExistError, catchIOError) + import System.Random(StdGen, newStdGen, Random(randomR)) + import System.Exit (exitWith, ExitCode(ExitSuccess), exitFailure) +-import System.Environment ++import System.Environment hiding (lookupEnv) + import System.Time + import Data.Time + + {-# SPECIALIZE snub :: [String] -> [String] #-} + {-# SPECIALIZE snub :: [Int] -> [Int] #-} + ++catch = catchIOError ++ + -- | sorted nub of list, much more efficient than nub, but doesnt preserve ordering. + snub :: Ord a => [a] -> [a] + snub = map head . group . sort +@@ -286,8 +288,8 @@ + lefts :: [Either a b] -> [a] + lefts xs = [x | Left x <- xs] + +-ioM :: Monad m => IO a -> IO (m a) +-ioM action = catch (fmap return action) (\e -> return (fail (show e))) ++--ioM :: Monad m => IO a -> IO (m a) ++ioM action = catch (fmap return action) (\e -> return (fail "hoppla")) + + ioMp :: MonadPlus m => IO a -> IO (m a) + ioMp action = catch (fmap return action) (\_ -> return mzero) +--- a/src/ChaseImports.hs ++++ b/src/ChaseImports.hs +@@ -28,9 +28,10 @@ + import qualified Unlit + import Control.Monad + import System.Environment(getEnv) ++import System.IO.Error(catchIOError) + import GenUtil + +-try x = catch (x >>= return . Right) (return . Left) ++try x = catchIOError (x >>= return . Right) (return . Left) + + --- Split up input --------------------------------------------------------- + splitString :: String -> String -> (String,String) + Best regards Uwe