Hello community, here is the log from the commit of package cabal2spec for openSUSE:Factory checked in at 2020-03-09 14:14:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/cabal2spec (Old) and /work/SRC/openSUSE:Factory/.cabal2spec.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cabal2spec" Mon Mar 9 14:14:18 2020 rev:7 rq:780007 version:2.5 Changes: -------- --- /work/SRC/openSUSE:Factory/cabal2spec/cabal2spec.changes 2020-01-29 13:12:43.629996421 +0100 +++ /work/SRC/openSUSE:Factory/.cabal2spec.new.26092/cabal2spec.changes 2020-03-09 14:14:23.678546569 +0100 @@ -1,0 +2,6 @@ +Tue Jan 28 11:15:01 UTC 2020 - psim...@suse.com + +- Update cabal2spec to version 2.5. + Upstream does not provide a change log file. + +------------------------------------------------------------------- Old: ---- cabal2spec-2.4.1.tar.gz New: ---- cabal2spec-2.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cabal2spec.spec ++++++ --- /var/tmp/diff_new_pack.udCH7E/_old 2020-03-09 14:14:24.466547088 +0100 +++ /var/tmp/diff_new_pack.udCH7E/_new 2020-03-09 14:14:24.470547091 +0100 @@ -19,7 +19,7 @@ %global pkg_name cabal2spec %bcond_with tests Name: %{pkg_name} -Version: 2.4.1 +Version: 2.5 Release: 0 Summary: Convert Cabal files into rpm spec files License: GPL-3.0-or-later ++++++ cabal2spec-2.4.1.tar.gz -> cabal2spec-2.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal2spec-2.4.1/cabal2spec/Main.hs new/cabal2spec-2.5/cabal2spec/Main.hs --- old/cabal2spec-2.4.1/cabal2spec/Main.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/cabal2spec-2.5/cabal2spec/Main.hs 2001-09-09 03:46:40.000000000 +0200 @@ -17,13 +17,14 @@ import System.FilePath data Options = Options - { optPlatform :: Platform - , optCompiler :: CompilerId - , optForceExe :: ForceBinary - , optRunTests :: RunTests - , optFlags :: [(FlagName, Bool)] - , optOutputFile :: Maybe FilePath - , optCabalFile :: FilePath + { optPlatform :: Platform + , optCompiler :: CompilerId + , optForceExe :: ForceBinary + , optRunTests :: RunTests + , optCopyrightYear :: Maybe CopyrightYear + , optFlags :: [(FlagName, Bool)] + , optOutputFile :: Maybe FilePath + , optCabalFile :: FilePath } deriving (Show) @@ -33,6 +34,7 @@ <*> option (maybeReader simpleParse) (long "compiler" <> help "compiler to use when evaluating the Cabal file" <> value buildCompilerId <> showDefaultWith (show . display)) <*> switch (long "force-exe" <> help "treat this package as a executable-only build even if it defined a library") <*> switch (long "enable-tests" <> help "enable the test suite in the generated build") + <*> optional (option auto (long "copyright-year" <> help "specify the year to be used in the copyright header")) <*> many (option parseFlag (short 'f' <> long "flag" <> help "Cabal flag (may be specified multiple times)")) <*> optional (strOption (short 'o' <> long "output" <> metavar "FILE" <> help "write generated spec file to this path")) <*> strArgument (metavar "CABAL-FILE") @@ -59,4 +61,4 @@ Options {..} <- execParser pinfo let specFile = fromMaybe (optCabalFile `replaceExtension` "spec") optOutputFile putStrLn $ "Writing spec file to " ++ show specFile ++ " ..." - cabal2spec optPlatform optCompiler (mkFlagAssignment optFlags) optForceExe optRunTests optCabalFile specFile + cabal2spec optPlatform optCompiler (mkFlagAssignment optFlags) optForceExe optRunTests optCopyrightYear optCabalFile specFile diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal2spec-2.4.1/cabal2spec.cabal new/cabal2spec-2.5/cabal2spec.cabal --- old/cabal2spec-2.4.1/cabal2spec.cabal 2001-09-09 03:46:40.000000000 +0200 +++ new/cabal2spec-2.5/cabal2spec.cabal 2001-09-09 03:46:40.000000000 +0200 @@ -1,5 +1,5 @@ name: cabal2spec -version: 2.4.1 +version: 2.5 synopsis: Convert Cabal files into rpm spec files description: Convert Cabal files into a @@ -14,7 +14,7 @@ license-file: LICENSE author: Peter Simons, Bryan O'Sullivan, Jens Petersen maintainer: sim...@cryp.to -tested-with: GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.1, GHC == 8.10.1 +tested-with: GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.2 category: Distribution homepage: https://github.com/peti/cabal2spec build-type: Simple @@ -28,27 +28,21 @@ location: git://github.com/peti/cabal2spec.git library - exposed-modules: Cabal2Spec - hs-source-dirs: src - build-depends: base < 5, Cabal > 3.0 && < 3.2, filepath, time >= 1.5 - default-language: Haskell2010 - ghc-options: -Wall -Wcompat -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wredundant-constraints + exposed-modules: Cabal2Spec + hs-source-dirs: src + build-depends: base < 5, Cabal > 3.0 && < 3.2, filepath, time >= 1.5 + default-language: Haskell2010 executable cabal2spec - main-is: Main.hs - other-modules: Paths_cabal2spec - hs-source-dirs: cabal2spec - build-depends: base, Cabal, cabal2spec, filepath, optparse-applicative - default-language: Haskell2010 - ghc-options: -Wall -Wcompat -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wredundant-constraints + main-is: Main.hs + other-modules: Paths_cabal2spec + hs-source-dirs: cabal2spec + build-depends: base, Cabal, cabal2spec, filepath, optparse-applicative + default-language: Haskell2010 test-suite regression-test - type: exitcode-stdio-1.0 - main-is: Main.hs - hs-source-dirs: test - build-depends: base, Cabal, cabal2spec, filepath, tasty, tasty-golden - default-language: Haskell2010 - ghc-options: -Wall -Wcompat -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wredundant-constraints + type: exitcode-stdio-1.0 + main-is: Main.hs + hs-source-dirs: test + build-depends: base, Cabal, cabal2spec, filepath, tasty, tasty-golden + default-language: Haskell2010 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal2spec-2.4.1/src/Cabal2Spec.hs new/cabal2spec-2.5/src/Cabal2Spec.hs --- old/cabal2spec-2.4.1/src/Cabal2Spec.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/cabal2spec-2.5/src/Cabal2Spec.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,4 +1,4 @@ -module Cabal2Spec ( cabal2spec, createSpecFile, ForceBinary, RunTests ) where +module Cabal2Spec ( cabal2spec, createSpecFile, ForceBinary, RunTests, CopyrightYear ) where import Control.Monad import Data.Char @@ -26,14 +26,15 @@ type ForceBinary = Bool type RunTests = Bool +type CopyrightYear = Int -cabal2spec :: Platform -> CompilerId -> FlagAssignment -> ForceBinary -> RunTests +cabal2spec :: Platform -> CompilerId -> FlagAssignment -> ForceBinary -> RunTests -> Maybe CopyrightYear -> FilePath -> FilePath -> IO () -cabal2spec platform compilerId flags forceBinary runTests cabalFile specFile = do +cabal2spec platform compilerId flags forceBinary runTests copyrightYear cabalFile specFile = do gpd <- readGenericPackageDescription silent cabalFile case finalizePD flags requestedComponents (const True) platform (unknownCompilerInfo compilerId NoAbiTag) [] gpd of Left missing -> fail ("finalizePD: " ++ show missing) - Right (pd,_) -> createSpecFile specFile pd forceBinary runTests flags + Right (pd,_) -> createSpecFile specFile pd forceBinary runTests flags copyrightYear requestedComponents :: ComponentRequestedSpec requestedComponents = defaultComponentRequestedSpec @@ -50,8 +51,8 @@ mapTools "gtk2hsTypeGen" = "gtk2hs-buildtools" mapTools tool = tool -createSpecFile :: FilePath -> PackageDescription -> ForceBinary -> RunTests -> FlagAssignment -> IO () -createSpecFile specFile pkgDesc forceBinary runTests flagAssignment = do +createSpecFile :: FilePath -> PackageDescription -> ForceBinary -> RunTests -> FlagAssignment -> Maybe CopyrightYear -> IO () +createSpecFile specFile pkgDesc forceBinary runTests flagAssignment copyrightYear = do let deps :: [String] deps = map showDep deps' deps' :: [String] @@ -97,8 +98,9 @@ ghcPkgDevel = if binlib then "-n ghc-%{name}-devel" else "devel" do - now <- getCurrentTime - let year = formatTime defaultTimeLocale "%Y" now + year <- case copyrightYear of + Just y -> return (show y) + Nothing -> formatTime defaultTimeLocale "%Y" <$> getCurrentTime put "#" put $ "# spec file for package " ++ pkgname put "#" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal2spec-2.4.1/test/Main.hs new/cabal2spec-2.5/test/Main.hs --- old/cabal2spec-2.4.1/test/Main.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/cabal2spec-2.5/test/Main.hs 2001-09-09 03:46:40.000000000 +0200 @@ -24,4 +24,4 @@ (\ref new -> ["diff", "-u", ref, new]) goldenFile specFile - (cabal2spec pid cid mempty True False cabalFile specFile) + (cabal2spec pid cid mempty True False (Just 2020) cabalFile specFile)